WO2019192044A1 - 一种环境光检测的方法及终端 - Google Patents

一种环境光检测的方法及终端 Download PDF

Info

Publication number
WO2019192044A1
WO2019192044A1 PCT/CN2018/085107 CN2018085107W WO2019192044A1 WO 2019192044 A1 WO2019192044 A1 WO 2019192044A1 CN 2018085107 W CN2018085107 W CN 2018085107W WO 2019192044 A1 WO2019192044 A1 WO 2019192044A1
Authority
WO
WIPO (PCT)
Prior art keywords
brightness value
terminal
brightness
value
pixels
Prior art date
Application number
PCT/CN2018/085107
Other languages
English (en)
French (fr)
Inventor
王举友
李辰龙
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201880072800.0A priority Critical patent/CN111345019B/zh
Priority to US17/043,201 priority patent/US11250813B2/en
Priority to JP2020554133A priority patent/JP7142715B2/ja
Priority to KR1020207030583A priority patent/KR102434930B1/ko
Priority to CN202110991142.9A priority patent/CN113923422B/zh
Publication of WO2019192044A1 publication Critical patent/WO2019192044A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/10Circuitry of solid-state image sensors [SSIS]; Control thereof for transforming different wavelengths into image signals
    • H04N25/11Arrangement of colour filter arrays [CFA]; Filter mosaics
    • H04N25/13Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0264Details of the structure or mounting of specific components for a camera module assembly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0266Details of the structure or mounting of specific components for a display module assembly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/22Illumination; Arrangements for improving the visibility of characters on dials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/44Receiver circuitry for the reception of television signals according to analogue transmission standards
    • H04N5/57Control of contrast or brightness
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/0626Adjustment of display parameters for control of overall brightness
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2360/00Aspects of the architecture of display systems
    • G09G2360/14Detecting light within display terminals, e.g. using a single or a plurality of photosensors
    • G09G2360/144Detecting light within display terminals, e.g. using a single or a plurality of photosensors the light being ambient light
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2201/00Electronic components, circuits, software, systems or apparatus used in telephone systems
    • H04M2201/38Displays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to an ambient light detecting method and terminal.
  • the mobile phone installs the ambient light sensor under the display screen, and the ambient light sensor performs the detection of the ambient light, and then the mobile phone adjusts the brightness of the display screen according to the detection result to enhance the user's visual experience.
  • the ambient light sensor since the ambient light sensor needs to receive ambient light through the display screen, the portion of the display screen that covers the ambient light sensor cannot be used for display. Therefore, the ambient light sensor is generally installed at the head position of the mobile phone, and the portion of the display screen covering the ambient light sensor is not used for displaying the picture, thereby affecting the screen ratio of the mobile phone (the ratio of the screen area to the area of the whole machine). Affects the user experience.
  • the ambient light detecting method and the terminal provided by the embodiments of the present invention can save the head space of the mobile phone, improve the screen ratio of the mobile phone, and improve the user experience.
  • the method provided by the present application is applied to a terminal including a camera and a display screen.
  • the camera includes at least two areas, each of which includes at least one first pixel.
  • the method specifically includes:
  • the terminal acquires a first brightness value of each first pixel, where each first pixel corresponds to a first brightness value; the terminal acquires the first area of each area according to the first brightness value of all the first pixels included in each area The second brightness value, each area corresponding to a second brightness value; the terminal acquires the brightness value of the current ambient light according to all the second brightness values; the terminal adjusts the brightness of the display screen according to the brightness value of the ambient light.
  • the light distribution of the lens is different. In other words, different areas of the camera have different attenuation of light. Therefore, the brightness of the light collected by the camera in the sub-area is detected, and the brightness values of the detected regions are compensated to different degrees, which is beneficial to improving the accuracy of the detected brightness value.
  • the terminal receives an operation for starting the camera; in response to the operation, the terminal activates at least one second pixel.
  • the terminal includes a first pixel and a second pixel.
  • the second pixel is a pixel that is not designated for ambient light detection.
  • the terminal uses all the pixels in the camera, including the first pixel and the second pixel, for implementing the camera function. Therefore, when the terminal turns on the camera function, the terminal controls all the first pixels and all the second pixels to be in an active state, and can work.
  • each first pixel is in an active state, and each second pixel is in an inactive state; if the camera is activated , each first pixel and each second pixel are in an active state.
  • the terminal acquiring the current brightness value of the ambient light according to all the second brightness values includes: the terminal uses the maximum value of all the second brightness values as the brightness value of the current ambient light.
  • the K1 first brightness values acquire the third brightness value of the red light, the K1 red light pixels correspond to the third brightness value of the 1 red light; and the terminal according to the first brightness value of the K2 green light pixels included in the first area Acquiring a third brightness value of the green light, the K2 green light pixels corresponding to the third brightness value of the green light; the terminal acquiring the third brightness value of the blue light according to the first brightness value of the K3 blue light pixels included in the first area, The K3 blue light pixels correspond to a third brightness value of one blue light; the terminal determines the second brightness value of the first area according to the third brightness value of the red light, the third brightness value of the green light, and the third brightness value of the blue light.
  • K1, K2 and K3 may be the same or different.
  • the third luminance value of the red light obtained by the terminal according to the K1 first brightness values of the K1 red light pixels included in the first area includes: the terminal averages K1 first brightness values or K1 The maximum value of the first brightness values is determined as the third brightness value of the red light;
  • the third brightness value of the green light obtained by the terminal according to the K2 first brightness values of the K2 green pixels included in the first area includes: Determining an average value of the K2 first brightness values or a maximum value of the K2 first brightness values as a third brightness value of the green light; the terminal according to the K3 first brightness values of the K3 blue pixels included in the first area
  • Obtaining the third brightness value of the blue light comprises: the terminal determining the average value of the K3 first brightness values or the maximum value of the K3 first brightness values as the third brightness value of the blue light.
  • the visual experience presented to the user is different because the same brightness value is at different color temperatures. Therefore, different weights can be added to the luminance values of the R light, the G light, and the B light according to the color temperature, and then the luminance values of the R light, the G light, and the B light are added according to the weights to obtain the luminance value of the region, and finally the current The brightness value of ambient light.
  • different light sources include different components of R light, G light, and B light
  • the terminal in the process of acquiring the second brightness value of each area according to the first brightness value of all the first pixels included in each area, the terminal performs the following operations on each area:
  • the terminal uses the first average value as the second brightness value of the first area, and the first average value is an average value of the first brightness values of all the first pixels in the first area; wherein the first area is in at least two areas anyone.
  • a terminal in a second aspect, includes a camera, a processor, and a display screen.
  • the camera includes at least two regions, each of the regions includes at least one first pixel, and a camera is configured to acquire a first brightness value of each of the first pixels.
  • Each of the first pixels corresponds to a first brightness value
  • the processor is configured to obtain a second brightness value of each region according to the first brightness value of all the first pixels included in each region, where each region corresponds to one a second brightness value;
  • the processor is further configured to obtain a brightness value of the current ambient light according to all the second brightness values; and the processor is further configured to adjust the brightness of the display screen according to the brightness value of the ambient light.
  • the processor before the terminal acquires the first brightness value of each first pixel, the processor is further configured to enable a function of automatically adjusting the display brightness of the display screen; in response to the opening, the camera is also used to control the terminal.
  • Each first pixel is in an active state.
  • the processor when acquiring the brightness value of the current ambient light according to all the second brightness values, is specifically configured to use the maximum value of all the second brightness values as the brightness value of the current ambient light.
  • the processor when determining the second brightness value of the first region according to the third brightness value of the red light, the third brightness value of the green light, and the third brightness value of the blue light, the processor is specifically configured to acquire the red light. a weighted average of the third brightness value, the third brightness value of the green light, and the third brightness value of the blue light; the processor is further configured to use the weighted average value as the second brightness value of the first area.
  • the processor when determining the second brightness value of the first region according to the third brightness value of the red light, the third brightness value of the green light, and the third brightness value of the blue light, the processor is specifically configured to acquire the red light. a weighted average of the third brightness value, the third brightness value of the green light, and the third brightness value of the blue light; the weighted average is compensated according to the position of the first area to obtain the second brightness value of the first area.
  • the processor performs the following operations for each area:
  • the compensation for the weighted average or the first average is smaller; if the first area is farther from the center of the camera, the weighted average is The greater the compensation of the value or the first average.
  • the processor is any one of a sensor hub sensor hub and an application processor.
  • a third aspect a terminal, comprising: a processor, a memory and a touch screen, the memory, the touch screen being coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions, and the processor reading the computer instruction from the memory To perform the method as described in any of the possible design methods of the first aspect.
  • a fourth aspect a computer storage medium comprising computer instructions that, when executed on a terminal, cause the terminal to perform the method as described in any of the possible design methods of the first aspect.
  • a fifth aspect a computer program product, when the computer program product is run on a computer, causing the computer to perform the method as described in any of the possible design methods of the first aspect.
  • FIG. 1 is a schematic structural diagram 1 of a terminal according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a camera of a terminal according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram 1 of a divided area of a camera sensor of a terminal according to an embodiment of the present disclosure
  • FIG. 3b is a schematic diagram 2 of a divided area of a camera sensor of a terminal according to an embodiment of the present disclosure
  • 3c is a schematic diagram 3 of a divided area of a camera sensor of a terminal according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram 2 of a terminal according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a method for compensating different regions in a camera according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a method for detecting ambient light according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram 3 of a terminal according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram 4 of a terminal according to an embodiment of the present disclosure.
  • the ambient light sensor occupies space in the head position of the mobile phone, thereby affecting the problem of the proportion of the mobile phone screen.
  • the embodiment of the present application proposes a method for performing ambient light detection by using a camera. In this way, the mobile phone can no longer need to install an ambient light sensor, which saves the position of a device for the head space of the mobile phone, and is beneficial to increasing the proportion of the mobile phone screen and improving the user experience.
  • the method provided by the embodiment of the present application can be applied to a terminal having a display screen and a camera.
  • the terminal can use the camera to perform ambient light detection, and adjust the brightness of the display screen according to the result of ambient light detection.
  • the brightness of the display screen located on the same side of the camera can be adjusted according to the result of the ambient light detected by the camera. For example, use the results of the front camera detection to adjust the brightness of the display on the front of the phone. In some scenarios, such as when the difference in ambient light level between the front of the phone and the back of the phone is not large, you can also adjust the brightness of the display on the front of the phone by using the result of the rear camera detection of the phone. Or, if there is a display on the back of the phone, you can adjust the brightness of the display on the back of the phone based on the detection results of the rear camera. This embodiment of the present application does not limit this.
  • the terminal in the present application may be a mobile phone (such as the mobile phone 100 shown in FIG. 1), a tablet computer, a personal computer (PC), a personal digital assistant (personal), which can install an application and display an application icon.
  • Digital assistant (PDA) smart watch, netbook, wearable electronic device, Augmented Reality (AR) device, Virtual Reality (VR) device, etc.
  • the application does not impose any special restrictions on the specific form of the terminal. .
  • the mobile phone 100 is used as an example of the terminal.
  • the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, and one or more sensors 106. , Wireless Fidelity (WI-FI) device 107, positioning device 108, audio circuit 109, peripheral interface 110, and power supply device 111. These components can communicate over one or more communication buses or signal lines (not shown in Figure 1). It will be understood by those skilled in the art that the hardware structure shown in FIG. 1 does not constitute a limitation to a mobile phone, and the mobile phone 100 may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • RF radio frequency
  • WI-FI Wireless Fidelity
  • the processor 101 is a control center of the mobile phone 100, and connects various parts of the mobile phone 100 by using various interfaces and lines, and executes the mobile phone 100 by running or executing an application stored in the memory 103 and calling data stored in the memory 103.
  • processor 101 can include one or more processing units, for example, processor 101 can include a baseband processor and an application processor.
  • the radio frequency circuit 102 can be used to receive and transmit wireless signals during transmission or reception of information or calls.
  • the radio frequency circuit 102 can process the downlink data of the base station and then process it to the processor 101; in addition, transmit the data related to the uplink to the base station.
  • radio frequency circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency circuit 102 can also communicate with other devices through wireless communication.
  • the wireless communication can use any communication standard or protocol, including but not limited to global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
  • the memory 103 is used to store applications and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running applications and data stored in the memory 103.
  • the memory 103 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); the storage data area can be stored according to the use of the mobile phone. Data created at 100 o'clock (such as audio data, phone book, etc.).
  • the memory 103 may include a high speed random access memory (RAM), and may also include a nonvolatile memory such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
  • the memory 103 can store various operating systems, for example, developed by Apple. Operating system, developed by Google Inc. Operating system, etc.
  • the above memory 103 may be independent and connected to the processor 101 via the above communication bus; the memory 103 may also be integrated with the processor 101.
  • the memory 103 includes a storage device 207.
  • the touch screen 104 may specifically include a touch panel 104-1 and a display 104-2.
  • the touch panel 104-1 can collect touch events on or near the user of the mobile phone 100 (for example, the user uses any suitable object such as a finger, a stylus, or the like on the touch panel 104-1 or on the touchpad 104.
  • the operation near -1), and the collected touch information is sent to other devices (for example, processor 101).
  • the touch event of the user in the vicinity of the touch panel 104-1 may be referred to as a hovering touch; the hovering touch may mean that the user does not need to directly touch the touchpad in order to select, move or drag a target (eg, an icon, etc.) , and only the user is located near the device to perform the desired function.
  • the touch panel 104-1 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • a display (also referred to as display) 104-2 can be used to display information entered by the user or information provided to the user as well as various menus of the mobile phone 100.
  • the display 104-2 can be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the touchpad 104-1 can be overlaid on the display 104-2, and when the touchpad 104-1 detects a touch event on or near it, it is transmitted to the processor 101 to determine the type of touch event, and then the processor 101 may provide a corresponding visual output on display 104-2 depending on the type of touch event.
  • the touchpad 104-1 and the display 104-2 are implemented as two separate components to implement the input and output functions of the handset 100, in some embodiments, the touchpad 104- 1 is integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100.
  • the touch screen 104 is formed by stacking a plurality of layers of materials, which will not be described in detail in the embodiment of the present application.
  • the touch panel 104-1 may be disposed on the front surface of the mobile phone 100 in the form of a full-board
  • the display screen 104-2 may also be disposed on the front surface of the mobile phone 100 in the form of a full-board, so that the front of the mobile phone can be borderless.
  • the structure such as a full screen phone.
  • the mobile phone 100 can also have a fingerprint recognition function.
  • the fingerprint reader 112 can be configured on the back of the handset 100 (eg, below the rear camera) or on the front side of the handset 100 (eg, below the touch screen 104).
  • the fingerprint collection device 112 can be configured in the touch screen 104 to implement the fingerprint recognition function, that is, the fingerprint collection device 112 can be integrated with the touch screen 104 to implement the fingerprint recognition function of the mobile phone 100.
  • the fingerprint capture device 112 is disposed in the touch screen 104 and may be part of the touch screen 104 or may be otherwise disposed in the touch screen 104.
  • the main component of the fingerprint collection device 112 in the embodiment of the present application is a fingerprint sensor, which can employ any type of sensing technology, including but not limited to optical, capacitive, piezoelectric or ultrasonic sensing technologies.
  • the mobile phone 100 may also include a Bluetooth device 105 for enabling data exchange between the handset 100 and other short-range devices (eg, mobile phones, smart watches, etc.).
  • the Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip or the like.
  • the handset 100 can also include at least one type of sensor 106, such as a light sensor, motion sensor, and other sensors.
  • the light sensor can include a proximity sensor, wherein the proximity sensor can turn off the power of the display when the handset 100 is moved to the ear.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the mobile phone 100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the WI-FI device 107 is configured to provide the mobile phone 100 with network access complying with the WI-FI related standard protocol, and the mobile phone 100 can access the WI-FI access point through the WI-FI device 107, thereby helping the user to send and receive emails. Browsing web pages and accessing streaming media, etc., it provides users with wireless broadband Internet access.
  • the WI-FI device 107 can also function as a WI-FI wireless access point, and can provide WI-FI network access for other devices.
  • the positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 can be specifically a receiver of a positioning system such as a Global Positioning System (GPS) or a Beidou satellite navigation system or a Russian GLONASS. After receiving the geographical location transmitted by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends it to the memory 103 for storage. In some other embodiments, the positioning device 108 can also be a receiver of an Assisted Global Positioning System (AGPS), which assists the positioning device 108 in performing ranging and positioning services by acting as an auxiliary server.
  • AGPS Assisted Global Positioning System
  • the secondary location server provides location assistance over a wireless communication network in communication with a location device 108 (i.e., a GPS receiver) of the device, such as handset 100.
  • the positioning device 108 can also be a WI-FI access point based positioning technology. Since each WI-FI access point has a globally unique (Media Access Control, MAC) address, the device can scan and collect the broadcast signals of the surrounding WI-FI access points when WI-FI is turned on. Therefore, the MAC address broadcasted by the WI-FI access point can be obtained; the device sends the data (such as the MAC address) capable of indicating the WI-FI access point to the location server through the wireless communication network, and each location is retrieved by the location server. The geographic location of the WI-FI access point, combined with the strength of the WI-FI broadcast signal, calculates the geographic location of the device and sends it to the location device 108 of the device.
  • MAC Media Access Control
  • the audio circuit 109, the speaker 113, and the microphone 114 can provide an audio interface between the user and the handset 100.
  • the audio circuit 109 can transmit the converted electrical data of the received audio data to the speaker 113 for conversion to the sound signal output by the speaker 113; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal by the audio circuit 109. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for transmission to, for example, another mobile phone, or the audio data is output to the memory 103 for further processing.
  • the peripheral interface 110 is used to provide various interfaces for external input/output devices (such as a keyboard, a mouse, an external display, an external memory, a subscriber identity module card, etc.). For example, it is connected to the mouse through a Universal Serial Bus (USB) interface, and is connected to a Subscriber Identification Module (SIM) card provided by the service provider through a metal contact on the card slot of the subscriber identity module. . Peripheral interface 110 can be used to couple the external input/output peripherals described above to processor 101 and memory 103.
  • USB Universal Serial Bus
  • SIM Subscriber Identification Module
  • the mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) that supplies power to the various components.
  • the battery may be logically connected to the processor 101 through the power management chip to manage charging, discharging, and power management through the power supply device 111. And other functions.
  • the handset 100 can also include one or more cameras 115.
  • the mobile phone may include one or more of the front camera, and may also include one or more rear cameras, and may also include one or more of the front camera and one or more rear cameras.
  • the specific structure of the camera 115 can be referred to the following description of FIG. 2, and details are not described herein.
  • the mobile phone 100 may further include a flash, a micro projection device, a Near Field Communication (NFC) device, and the like, and details are not described herein.
  • NFC Near Field Communication
  • FIG. 2 is a schematic structural diagram of a camera 115 in the mobile phone 100.
  • the camera mainly includes a lens 201, an infrared cut (IR cut) 202, a sensor integrated circuit (Sensor IC) 203, and a digital signal processing (DSP) chip 204.
  • IR cut infrared cut
  • Sensor IC sensor integrated circuit
  • DSP digital signal processing
  • the lens 201 is a lens structure generally composed of one or more lenses, which determines the light extraction rate of the sensor.
  • the lens comprises a plastic lens (PLASTIC) or a glass lens (GLASS).
  • Common lens structures are: 1P, 2P, 1G1P, 1G3P, 2G2P, 4G, etc.
  • the dichroic filter 202 is used to separate the light entering through the lens 201.
  • the color separation filter has two color separation methods: RGB (Red Green Blue) primary color separation method (ie, three primary color separation method) and CMYK (Cyan Magenta Yellow Key-Plate) complementary color separation method. Since any color of the natural light can be mixed by the three colors of R, G, and B in different proportions, in the embodiment of the present application, the color separation filter 202 can be used to decompose the natural light into R, G and B three kinds of monochromatic light.
  • RGB Red Green Blue
  • CMYK Cyan Magenta Yellow Key-Plate
  • the sensor integrated circuit 203 includes a sensor, which may also be referred to as an image sensor, a camera sensor, or a photo sensor.
  • the sensor is a semiconductor chip whose surface contains a plurality of photosensitive elements such as photodiodes.
  • the photosensitive element receives the monochromatic light after being filtered by the filter, and then generates a corresponding electric charge. That is to say, the sensor converts the light conducted from the lens 201 into an electrical signal, and then converts the electrical signal into a digital signal through an internal analog to digital (AD) conversion. At this time, the data of the digital signal is called original. Raw data.
  • each photosensitive element can only be photosensitive monochromatic light, such as R light, or B light, or G light.
  • each pixel may comprise one of said photosensitive elements.
  • each of the pixels includes a photosensitive element and a filter corresponding to the photosensitive element.
  • each of the pixels may include other related components in addition to a photosensitive element and a filter corresponding to the photosensitive element.
  • the digital signal processing chip 204 is configured to acquire raw data from the sensor, and after a series of processing, send the processed data to a processor in the video output device, and finally display the image through the video output device.
  • the digital signal processing chip 204 is further configured to refresh the sensor after transmitting the data to the processor, so that the sensor acquires the next set of raw data.
  • the data signal processing chip 204 includes an image signal processor (ISP), specifically for converting the obtained raw data into a format supported by the display, such as a YUV format or an RGB format.
  • ISP image signal processor
  • the data signal processing chip 204 further includes a camera interface (CAMIF), which is specifically configured to send the ISP processed data to the mobile phone processor.
  • CAMIF camera interface
  • the working principle of the camera may be: after the light outside the mobile phone passes through the lens 201, it is filtered by the color separation filter 202 and then irradiated onto the sensor surface.
  • the sensor converts the received light into an electrical signal, and then converts it into a digital signal through internal AD to obtain raw data. If the sensor does not have an integrated DSP, the raw data is transferred to the processor in the phone, and the data format is RAW DATA. If the sensor integrates the DSP, the resulting raw data is processed through a series of processes to output data in YUV or RGB format. Finally, it will be sent to the video output device (for example: framebuffer) by the processor in the mobile phone for image display.
  • the video output device for example: framebuffer
  • the brightness of the display screen is adjusted according to the brightness value of the ambient light detected by the front camera as an example.
  • a plurality of pixels included in the sensor of the front camera in the terminal are divided into N regions, and N is an integer greater than 1.
  • the brightness values of the respective regions are respectively obtained, and the brightness values of the ambient light are determined according to the brightness values of the respective regions. Then adjust the brightness of the display according to the determined brightness value of the ambient light.
  • the method for dividing the N regions may be equally divided, that is, the area of each region is the same, or may be divided according to the optical characteristics of the lens.
  • the principle of the partitioning and the pixels in each region after the partitioning are applied in this embodiment of the present application.
  • the quantity is not limited.
  • the pixels in the sensor are equally divided into nine regions, and the nine regions have the same size, wherein each region contains the same number of pixels.
  • the pixels in the sensor are divided into 12 regions, and the sizes of the 12 regions are different, and the number of pixels included in each region is not equal.
  • the divided area herein does not physically separate pixels of different areas, but is equivalent to grouping a plurality of pixels.
  • the principle of grouping is to group adjacent pixels into one group.
  • the pixels are equivalent to being in one area.
  • the divided area or grouping here is preset.
  • the light distribution of the lens is different. In other words, different areas of the camera have different attenuation of light. Therefore, the brightness of the light collected by the camera in the sub-area is detected, and the brightness values of the detected regions are compensated to different degrees, which is beneficial to improving the accuracy of the detected brightness value.
  • the brightness values of the respective regions may be compensated according to a preset compensation rule, and the brightness value of the current ambient light is determined from the brightness values of the compensated regions.
  • the preset compensation rule may be: the brightness value detected in the area located at the center position of the camera is compensated to be zero or the compensation is small, and the detection of the area farther from the center position is compensated for the higher the brightness value.
  • the distance of a certain area from the center position may be the distance from the center of the area to the center position.
  • a circular area (area 1) centered on point A and having a radius r1 can be regarded as a center area, and no compensation can be performed, or the compensation value is small (less than the latter). P1).
  • the value of the compensation in the region (region 2) whose radius from the point A is larger than r1 and smaller than r2 is P1
  • the value of the compensation in the region (region 3) whose radius is greater than r2 and smaller than r3 from the point A is P2.
  • the brightness value of the camera center position and the field of view (FOV) edge position may be pre-tested to obtain a difference or ratio of two brightness values, and the difference or ratio of the two brightness values is used as a difference The basis for compensation.
  • the brightness value of the center position of the reading camera is Q1 lux (lighting unit)
  • the brightness value of the edge position of the reading camera FOV is Q2 lux.
  • the difference between Q1 and Q2 ( ⁇ Q) or the ratio of Q1 and Q2 can be determined as a basis for compensation based on factors such as the optical characteristics of the camera or the characteristics of the light source. It is assumed that the difference ( ⁇ Q) between Q1 and Q2 is used as the basis for compensation.
  • the actually measured center position has a brightness value of Q3 lux
  • the actually measured FOV edge position has a brightness value of Q4 lux.
  • the actual measured Q3 may not be compensated, that is, the current brightness value of the camera center position is determined to be Q3 lux.
  • the actual measured Q4 is compensated, for example, it can be (Q4 + ⁇ Q) lux, that is, the current brightness value of the edge position of the FOV of the camera is determined to be (Q4 + ⁇ Q) lux.
  • the light source may be identified according to the condition that the optical signal is received by each area, and then different compensation rules or adjustment strategies of the display brightness are adopted. For example, if only one of the regions of the sensor or the adjacent regions have a large luminance value, it can be determined that the light source is a point source. Higher compensation can be made for the brightness values measured at the edges of the camera's FOV range. If there are several non-adjacent areas in all areas of the sensor with large brightness values, it can be determined that the light source is a multi-point light source.
  • the brightness value measured on the sensor can be compensated according to the distribution of multiple light sources, and the specific compensation method is not limited. If the brightness value of each area in the sensor area changes greatly and has a certain regularity, it can be determined that the terminal is in the motion state, and the brightness of the display screen may not be adjusted.
  • the brightness value of the ambient light detected by the camera is a relatively stable value.
  • the brightness value of the ambient light detected by the camera will fall off the cliff.
  • the FOV range of the camera can be increased to improve the accuracy of the ambient light brightness value determined by the terminal.
  • a brightness value of the M pixels in the region may be obtained by using a brightness value of the M pixels in the region, for example, reading a brightness value of the M pixels in the region, and then The brightness value of the area is determined based on the brightness values of the M pixels. For example, the luminance values of the M pixels can be weighted to obtain the luminance value of the region. Wherein, the number of pixels included in the area is greater than or equal to M.
  • M may be an integer greater than or equal to 3
  • the luminance values of the read M pixels may include a value of at least one R light, a value of at least one G light, and a value of at least one B light.
  • different weights can be added to the luminance values of the R light, the G light, and the B light according to the situation, and added, thereby obtaining the luminance value of the region.
  • each of the regions in the terminal includes a plurality of first pixels and a plurality of second pixels.
  • the first pixel is a pixel for the terminal to detect ambient light
  • the M pixels in each region are read as M first pixels.
  • the second pixel is a pixel that is not designated for ambient light detection.
  • the terminal uses all of the pixels, including the first pixel and the second pixel, for the camera function.
  • the terminal When the terminal turns on the function of automatically adjusting the display brightness of the display, the terminal needs to perform ambient light detection. Then, all the first pixels in the terminal are in an active state, that is, a state in which they can work. When the terminal turns on the camera function, all of the first pixels and all of the second pixels are activated. When the terminal turns on the function of automatically adjusting the display brightness of the display screen, and the camera function is not turned on, the first pixel is in an active state, and the second pixel is in an inactive state.
  • the terminal turns on the function of automatically adjusting the display brightness of the display screen
  • the terminal activates all the second pixels (because the first pixel is activated when the function of automatically adjusting the display brightness of the display screen is turned on) ).
  • each area is pre-designated with two R light pixels, one G light pixel, and one B light pixel.
  • the embodiment of the present application does not limit the number of first pixels in each area, nor the number of specific R light pixels, G light pixels, and B light pixels.
  • the number of first pixels in any two regions may also be different.
  • the values of M may be different in different regions.
  • the brightness value of M1 pixels may be taken in the first area for calculation, and the brightness value of M2 pixels may be taken in the second area for calculation; wherein M1 and M2 may be equal or unequal.
  • the number of luminance values of the read R light pixels, the number of luminance values of the G light pixels, and the number of luminance values of the B light pixels may be the same or different.
  • the luminance values of K1 R-light pixels, the luminance values of K2 G-light pixels, and the luminance values of K3 B-light pixels are read, wherein K1, K2, and K3 may be the same, Can be different.
  • the first pixel specified in advance has a total of three pixels, namely: one R light pixel, one G light pixel and one B light pixel.
  • a total of four pre-designated first pixels are respectively: two R light pixels, one G light pixel and one B light pixel.
  • a total of five pre-designated first pixels are respectively: two R light pixels, two G light pixels and one B light pixel.
  • the first pixel specified in other areas is shown in the drawing and will not be described again.
  • the visual experience presented to the user is different because the same brightness value is at different color temperatures. Therefore, different weights can be added to the luminance values of the R light, the G light, and the B light according to the color temperature, and then the luminance values of the R light, the G light, and the B light are added according to the weights to obtain the luminance value of the region, and finally the current The brightness value of ambient light. For example, in the case of a high color temperature, such as in an outdoor with strong sunlight, the image on the display may appear reddish. Therefore, when calculating the luminance value, the weight of the luminance value of the R light can be increased. In this way, the calculated brightness value will be larger.
  • the brightness can be dimmed to improve the user experience.
  • the image on the display looks blue in color. Therefore, when calculating the luminance value, the weight of the luminance value of the B light can be increased. In this way, the calculated brightness value will be larger.
  • the terminal adjusts the brightness of the display screen according to the calculated brightness value the brightness can be dimmed to improve the user experience.
  • the weight corresponding to the R light is H1
  • the weight corresponding to the G light is J1
  • the weight corresponding to the B light is K1.
  • H1+J1+K1 1.
  • the current brightness value of a certain area the brightness value of the R light * H1 + the brightness value of the G light * J1 + the brightness value of the B light * K1.
  • the brightness value of the R light may be the maximum value (or average value) of the brightness values of all the R lights preset in the area.
  • the luminance value of the G light may be the maximum value (or average value) of the luminance values of all the G lights preset in the region.
  • the luminance value of the B light may be the maximum value (or average value) of the luminance values of all the B lights preset in the region.
  • the weight corresponding to the R light is H2
  • the weight corresponding to the G light is J2
  • the weight corresponding to the B light is K2.
  • H2+J2+K2 1.
  • H1 is different from H2
  • J1 is different from J2
  • K1 and K2 are different.
  • the current brightness value of a certain area the brightness value of the R light * the brightness value of the light of the H + G light * the brightness value * J2 of the light of the JJ.
  • the brightness value of the R light may be the maximum value (or average value) of the brightness values of all the R lights preset in the area.
  • the luminance value of the G light may be the maximum value (or average value) of the luminance values of all the G lights preset in the region.
  • the luminance value of the B light may be the maximum value (or average value) of the luminance values of all the B lights preset in the region.
  • different light sources include different components of R light, G light, and B light
  • the weight of the R light can be increased when calculating the brightness value of the area, so that the calculated brightness value is larger.
  • the terminal increases the weight of the R light, and the calculated brightness value is larger.
  • the brightness of the display screen is adjusted according to the calculated brightness value, the brightness can be dimmed to improve the user experience.
  • the weight of the R light can be increased when calculating the brightness value of the area.
  • the weight of the R light can be increased when calculating the brightness value of the area.
  • the sensor controls all pixels (including the first pixel and the second pixel) to be in an active state, and the luminance value of the entire image is output to the register by all the pixels, and the terminal reads the A register obtains a brightness value of the image and displays the image according to the brightness value.
  • the sensor controls all the pixels to be inactive, and does not need to sensitize and correspondingly illuminate the illumination on the sensor.
  • a flowchart of a method for detecting ambient light includes:
  • the first pixel in the terminal control camera is in an active state, and acquires a first brightness value detected by each of the first pixels.
  • each pixel of the camera is divided into at least two regions, each region includes a plurality of pixels, and at least three pixels of the plurality of pixels of each region are used as the first pixel.
  • each first pixel is in an active state.
  • the brightness value of the illumination detected by the first pixel in the active state is the first brightness value.
  • each first pixel corresponds to a first brightness value.
  • the sensor can control the state of each pixel included in the sensor to be in an active state or an inactive state.
  • the pixel in the active state can receive illumination and perform photoelectric conversion to convert the optical signal into an electrical signal; then perform analog-to-digital conversion on the electrical signal to convert it into a digital signal; the digital signal includes the brightness value of the pixel.
  • the brightness value of the pixel is stored in a register, and the sensor hub can acquire the brightness value by reading the value in the register through, for example, an Inter-Integrated Circuit (IIC).
  • IIC Inter-Integrated Circuit
  • the terminal can preset some pixels (ie, the first pixel) in each area for detecting ambient light.
  • the sensor controls the preset pixels to be in an active state, is used to detect the brightness value of the current illumination, and stores the first brightness value detected by each pixel into the register.
  • each first pixel can correspond to one register.
  • the terminal obtains a second brightness value of each area according to the first brightness value detected by each of the first pixels.
  • each area includes a plurality of first pixels.
  • the luminance value of the region that is, the second luminance value, can be obtained according to the first luminance value detected by all the first pixels in one region. It can be seen that one area corresponds to a second brightness value.
  • the second luminance value obtained from the plurality of first luminance values of a certain region is used to represent the luminance value of the region.
  • the terminal may not perform the action of the specific divided area. Rather, all the first pixels may be grouped in advance in the terminal, each group includes a plurality of first pixels, each group corresponding to one region; and then the group is corresponding according to the first brightness value corresponding to all the first pixels of each group.
  • a second brightness value that is, a second brightness value corresponding to the corresponding area of the group.
  • the sensor hub of the terminal can read the first brightness value in each register, and report the first brightness value to a processor (eg, an application processor) of the terminal, and perform weighting calculation by the processor of the terminal.
  • a processor eg, an application processor
  • the brightness value of the area ie the second brightness value).
  • the sensor in the terminal camera can read the first brightness value in each register, and then weight the first brightness values to obtain the brightness value of the area (ie, the second brightness value). Then, the second brightness value is read by the sensor hub and reported to the processor of the terminal.
  • the communication protocol used may be IIC or other communication protocol such as Serial Peripheral Interface (SPI).
  • SPI Serial Peripheral Interface
  • the terminal obtains a current ambient light brightness value according to the second brightness value of each of the areas.
  • the terminal adjusts the brightness of the display screen according to the determined brightness value of the ambient light.
  • the camera function of the camera and the function of detecting the ambient light by the camera are two independent functions, and do not affect each other.
  • the ambient light detection can be performed through the camera all the time, and it is not affected by whether the camera takes a picture.
  • the camera is capable of performing photographing during ambient light detection.
  • the ambient light intensity can also be detected by the camera.
  • the corresponding functions of the camera's camera function and the ambient light detection function can be set separately, and the IIC corresponding to these two functions can also be set separately, thereby achieving independent implementation of these two functions.
  • the terminal when the terminal performs photographing, all the pixels in the camera are photosensitive, and the generated RGB data may be stored in the first register.
  • the image signal processor 404 configures the photographing parameters of the camera sensor 401 through the IIC1.
  • the image signal processor 404 reads data of RGB in the first register by, for example, a Mobile Industry Processor Interface (MIPI) 1, and performs image processing based on the data.
  • MIPI Mobile Industry Processor Interface
  • the first pixel in the camera is photosensitive, and the acquired brightness data is stored in the second register, wherein the second register is different from the first register, the first register There may be multiple and second registers, and the number of registers is not limited in this application.
  • the sensor hub 403 reads the luminance values in the respective second registers of the camera sensor 401 by, for example, IIC 2 .
  • the process of taking pictures by the terminal and the process of detecting the ambient light by the terminal are two independent processes without mutual interference.
  • the decoupling design of the camera during photographing and ambient light detection is realized, so that when the camera is in the sleep state, the terminal can also perform ambient light detection.
  • the embodiment of the present application may divide the function module by using the above-mentioned method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 7 shows a possible structural diagram of the terminal involved in the above embodiment.
  • the terminal 700 includes a camera 701 and a processor 702.
  • the camera 701 is used to support the terminal to perform step S101 in FIG. 6, and/or other processes for the techniques described herein.
  • the processor 702 is configured to support the terminal in performing steps S102-S104 of FIG. 6, and/or other processes for the techniques described herein.
  • the terminal 700 may further include a communication unit for the terminal to interact with other devices.
  • the terminal 700 may further include a storage unit for storing program codes and data of the terminal.
  • the specific functions that can be implemented by the foregoing functional units include, but are not limited to, the functions corresponding to the method steps described in the foregoing examples.
  • the camera described above may be a camera module of the terminal, and the processor 702 may be a processing module of the terminal.
  • the communication unit described above may be a communication module of the terminal, such as an RF circuit, a WiFi module, or a Bluetooth module.
  • the above storage unit may be a storage module of the terminal.
  • FIG. 8 is a schematic diagram showing a possible structure of a terminal involved in the above embodiment.
  • the terminal 1100 includes a processing module 1101, a storage module 1102, and a communication module 1103.
  • the processing module 1101 is configured to control and manage the actions of the terminal.
  • the storage module 1102 is configured to save program codes and data of the terminal.
  • the communication module 1103 is for communicating with other terminals.
  • the processing module 1101 may be a processor or a controller, and may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (Application-Specific).
  • CPU central processing unit
  • DSP digital signal processor
  • Application-Specific Application-Specific
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 1303 may be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 1102 can be a memory.
  • the processing module 1101 is a processor (such as the processor 101 shown in FIG. 1)
  • the communication module 1103 is an RF transceiver circuit (such as the RF circuit 102 shown in FIG. 1)
  • the storage module 1102 is a memory (as shown in FIG. 1).
  • the terminal provided by the embodiment of the present application may be the terminal 100 shown in FIG. 1.
  • the communication module 1103 may include not only an RF circuit but also a WiFi module and a Bluetooth module. Communication modules such as RF circuits, WiFi modules, and Bluetooth modules can be collectively referred to as communication interfaces. Wherein, the above processor, communication interface and memory can be coupled together by a bus.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Telephone Function (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Studio Devices (AREA)

Abstract

本申请提供的一种环境光检测的方法及终端,涉及通信技术领域,有利于节省手机头部空间,有利于提高手机的屏占比,有利于提升用户体验。该方法应用于包含摄像头和显示屏的终端中,该摄像头包含至少两个区域,每个区域包含至少一个第一像素,该方法包括:终端获取每个第一像素的第一亮度值,其中,每个第一像素对应一个第一亮度值;终端根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值,每个区域对应一个第二亮度值;终端根据所有的第二亮度值获取当前的环境光的亮度值;终端根据环境光的亮度值调节显示屏的亮度。

Description

一种环境光检测的方法及终端
本申请要求于2018年4月4日提交中国专利局、申请号为201810302048.6、发明名称为“一种屏幕亮度调节方法及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种环境光检测方法及终端。
背景技术
用户在使用手机时,周围环境不可避免会存在比如自然光,灯光等等这些光源,这些光源形成了手机的环境光,会影响手机屏幕的显示效果。
通常,手机通过在显示屏下方安装环境光传感器,并由环境光传感器来完成对环境光的检测,再由手机根据检测结果对显示屏的亮度进行调节,以提升用户视觉体验。在这种检测方法中,由于环境光传感器需要透过显示屏接收环境光,所以,显示屏中覆盖环境光传感器的部分不能用于显示画面。因此,环境光传感器一般都是安装在手机头部位置,且显示屏中覆盖环境光传感器的部分不用于显示画面,由此影响了手机的屏占比(屏幕面积与整机面积的比例),影响了用户体验。
发明内容
本申请实施例提供的一种环境光检测方法及终端,可以节省手机头部空间,有利于提高手机的屏占比,有利于提升用户体验。
第一方面,本申请提供的方法,应用于包含摄像头和显示屏的终端中,摄像头包含至少两个区域,每个区域包含至少一个第一像素,该方法具体包括:
终端获取每个第一像素的第一亮度值,其中,每个第一像素对应一个第一亮度值;终端根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值,每个区域对应一个第二亮度值;终端根据所有的第二亮度值获取当前的环境光的亮度值;终端根据环境光的亮度值调节显示屏的亮度。
其中,第一像素为终端预先设置用于进行环境光检测的像素。在终端开启自动调节显示屏的显示亮度的功能时,终端激活第一像素,使得第一像素处于工作状态。这些第一像素用于检测当前光照的亮度值,并将各个像素检测到的第一亮度值存储到寄存器(例如:每个预设像素第一像素可对应一个寄存器)中。
可以理解的是,根据摄像头的光学特性可知,镜头的进光分布是不同的。也就是说,摄像头的不同区域对光线的衰减也是不同的。因此,分区域的对摄像头采集的光进行亮度检测,并对检测得到的各个区域的亮度值进行不同程度的补偿,有利于提升检测得到的亮度值的准确性。
需要说明的是,这里划分的区域不是物理上的将不同区域的像素分离开,而是对多sensor包含的多个像素进行分组,分组的原则是把相邻的一些像素分为一组,这一组内的像素相当于在一个区域内。并且这里的划分区域是预先设置好的。
由此,手机可不再需要安装环境光传感器,为手机头部空间节省了一个器件的位置,有利于提高手机屏占比,提升用户体验。
一种可能的设计中,摄像头还包括至少一个第二像素,方法还包括:
终端接收到用于启动相机的操作;响应该操作,终端激活至少一个第二像素。
需要说明的是,终端中包含第一像素和第二像素。第二像素是未被指定用于环境光检测的像素。终端使用摄像头中所有的像素,包括第一像素和第二像素,用于实现照相功能的。故在终端开启照相功能时,终端控制所有的第一像素和所有的第二像素处于激活状态,可以进行工作。
需要说明的是,本申请实施例中,摄像头的拍照功能和通过摄像头进行环境光检测的功能是两个独立的功能,并不相互影响。在终端开启自动调节环境光的功能后,在终端开机且亮屏的过程中,可以一直通过摄像头进行环境光检测,并且不受摄像头是否进行拍照的影响。在进行环境光检测的过程中,摄像头能够执行拍照。并且,在摄像头拍照的过程中,也能够通过摄像头来进行环境光强度的检测。摄像头的拍照功能和环境光检测功能分别对应的寄存器可以分开设置,并且这两个功能对应的集成电路总线(Inter-Integrated Circuit,IIC)也可以分开设置,由此可以实现这两个功能的独立实现。
一种可能的设计中,若自动调节显示屏的显示亮度的功能被开启,且相机未被启动,则每个第一像素处于激活状态,每个第二像素处于未激活状态;若相机被启动,则每个第一像素和每个第二像素均处于激活状态。
需要说明的是,在终端开启自动调节显示屏的显示亮度的功能,且未开启照相功能,则第一像素是处于激活状态,而第二像素处于未激活状态。在终端开启自动调节显示屏的显示亮度的功能的情况下,再开启相机功能时,则终端激活所有的第二像素(由于第一像素在开启自动调节显示屏的显示亮度的功能时,已经激活了)。
一种可能的设计中,终端根据所有的第二亮度值获取当前的环境光的亮度值包括:终端将所有的第二亮度值中的最大值作为当前的环境光的亮度值。
一种可能的设计中,第一区域内的所有第一像素包括K1个红光像素、K2个绿光像素和K3个蓝光像素;第一区域为至少两个区域中的任意一个;在终端根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值的过程中,终端对每个区域执行以下操作:终端根据第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值,K1个红光像素对应1个红光的第三亮度值;终端根据第一区域中包含的K2个绿光像素的第一亮度值获取绿光的第三亮度值,K2个绿光像素对应1个绿光的第三亮度值;终端根据第一区域中包含的K3个蓝光像素的第一亮度值获取蓝光的第三亮度值,K3个蓝光像素对应1个蓝光的第三亮度值;终端根据红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定第一区域的第二亮度值。
其中,K1、K2和K3可以相同,也可以不同。
一种可能的设计中,终端根据第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值包括:终端将K1个第一亮度值的平均值或K1个第一亮度值中的最大值确定为红光的第三亮度值;终端根据第一区域中包含的K2个绿光像素的K2个第一亮度值获取绿光的第三亮度值包括:终端将K2个第一亮度值的平均值或K2 个第一亮度值中的最大值确定为绿光的第三亮度值;终端根据第一区域中包含的K3个蓝光像素的K3个第一亮度值获取蓝光的第三亮度值包括:终端将K3个第一亮度值的平均值或K3个第一亮度值中的最大值确定为蓝光的第三亮度值。
一种可能的设计中,终端根据红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定第一区域的第二亮度值包括:终端获取红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值的加权平均值;终端将加权平均值作为第一区域的第二亮度值。
示例性的,由于相同的亮度值在不同色温下,给用户带来的视觉体验不同。因此,可以根据色温对R光、G光和B光的亮度值添加不同的权重,然后根据权重将R光、G光和B光的亮度值相加得到该区域的亮度值,最后得到当前的环境光的亮度值。
示例性的,由于不同的光源包含的R光、G光和B光的成分不同,因此,也可以根据不同光源的特性对R光、G光和B光的亮度值添加不同的权重,然后根据权重将R光、G光和B光的亮度值相加得到该区域的亮度值,最后得到当前的环境光的亮度值。
一种可能的设计中,终端根据红光的第三亮度值、绿光的第三亮度值和蓝的第三亮度值确定第一区域的第二亮度值包括:终端获取红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值的加权平均值;终端根据第一区域的位置,对加权平均值进行补偿得到第一区域的第二亮度值。
一种可能的设计中,在终端根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值的过程中,终端对每个区域执行以下操作:
终端将第一平均值作为第一区域的第二亮度值,第一平均值为第一区域中所有第一像素的第一亮度值的平均值;其中,第一区域为至少两个区域中的任意一个。
一种可能的设计中,在终端根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值的过程中,终端对每个区域执行以下操作:终端根据第一区域的位置,对第一平均值进行补偿得到第一区域的第二亮度值,第一平均值为第一区域中所有第一像素的第一亮度值的平均值;其中,第一区域为至少两个区域中的任意一个。
一种可能的设计中,若第一区域距离摄像头的中心位置越近,则对加权平均值或第一平均值的补偿越小;若第一区域距离摄像头的中心位置越远,则对加权平均值或第一平均值的补偿越大。
第二方面,一种终端,包含摄像头、处理器和显示屏,摄像头包含至少两个区域,每个区域包含至少一个第一像素,摄像头,用于获取每个第一像素的第一亮度值,其中,每个第一像素对应一个第一亮度值;处理器,用于根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值,每个区域对应一个第二亮度值;处理器,还用于根据所有的第二亮度值获取当前的环境光的亮度值;处理器,还用于根据环境光的亮度值调节显示屏的亮度。
一种可能的设计中,摄像头还包括至少一个第二像素;处理器,还用于接收到用于启动相机的操作;摄像头,还用于响应操作,激活至少一个第二像素。
一种可能的设计中,在终端获取每个第一像素的第一亮度值之前,摄像头,还用于控制终端中每个第一像素处于激活状态。
一种可能的设计中,在终端获取每个第一像素的第一亮度值之前,处理器,还用于开启自动调节显示屏的显示亮度的功能;响应开启,摄像头,还用于控制终端中每个第一像素处于激活状态。
一种可能的设计中,若自动调节显示屏的显示亮度的功能被开启,且相机未被启动,则每个第一像素处于激活状态,每个第二像素处于未激活状态;若相机被启动,则每个第一像素和每个第二像素均处于激活状态。
一种可能的设计中,在根据所有的第二亮度值获取当前的环境光的亮度值时,处理器具体用于将所有的第二亮度值中的最大值作为当前的环境光的亮度值。
一种可能的设计中,第一区域内的所有第一像素包括K1个红光像素、K2个绿光像素和K3个蓝光像素;第一区域为至少两个区域中的任意一个;在处理器根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值的过程中,处理器对每个区域执行以下操作:
根据第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值,K1个红光像素对应1个红光的第三亮度值;根据第一区域中包含的K2个绿光像素的第一亮度值获取绿光的第三亮度值,K2个绿光像素对应1个绿光的第三亮度值;根据第一区域中包含的K3个蓝光像素的第一亮度值获取蓝光的第三亮度值,K3个蓝光像素对应1个蓝光的第三亮度值;根据红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定第一区域的第二亮度值。
一种可能的设计中,在根据第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值时,处理器具体用于将K1个第一亮度值的平均值或K1个第一亮度值中的最大值确定为红光的第三亮度值;在根据第一区域中包含的K2个绿光像素的第一亮度值获取绿光的第三亮度值时,处理器具体用于将K2个第一亮度值的平均值或K2个第一亮度值中的最大值确定为绿光的第三亮度值;在根据第一区域中包含的K3个蓝光像素的第一亮度值获取蓝光的第三亮度值时,处理器具体用于将K3个第一亮度值的平均值或K3个第一亮度值中的最大值确定为蓝光的第三亮度值。
一种可能的设计中,在根据红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定第一区域的第二亮度值时,处理器具体用于获取红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值的加权平均值;处理器,还用于将加权平均值作为第一区域的第二亮度值。
一种可能的设计中,在根据红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定第一区域的第二亮度值时,处理器具体用于获取红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值的加权平均值;根据第一区域的位置,对加权平均值进行补偿得到第一区域的第二亮度值。
一种可能的设计中,在处理器根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值的过程中,处理器对每个区域执行以下操作:
将第一平均值作为第一区域的第二亮度值,第一平均值为第一区域中所有第一像素的第一亮度值的平均值;其中,第一区域为至少两个区域中的任意一个。
一种可能的设计中,在处理器根据每个区域中包含的所有第一像素的第一亮度值获取每个区域的第二亮度值的过程中,处理器对每个区域执行以下操作:
根据第一区域的位置,对第一平均值进行补偿得到第一区域的第二亮度值,第一平均值为第一区域中所有第一像素的第一亮度值的平均值;其中,第一区域为至少两个区域中的任意一个。
一种可能的设计中,若第一区域距离摄像头的中心位置越近,则对加权平均值或第一平均值的补偿越小;若第一区域距离摄像头的中心位置越远,则对加权平均值或第一平均值的补偿越大。
一种可能的设计中,处理器为传感器集线器sensor hub、应用处理器中的任一项。
第三方面、一种终端,包括:处理器、存储器和触摸屏,存储器、触摸屏与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,以执行如第一方面中任一种可能的设计方法中的所述的方法。
第四方面、一种计算机存储介质,包括计算机指令,当计算机指令在终端上运行时,使得终端执行如第一方面中任一种可能的设计方法中所述的方法。
第五方面、一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面中任一种可能的设计方法中所述的方法。
附图说明
图1为本申请实施例提供的一种终端的结构示意图一;
图2为本申请实施例提供的一种终端的摄像头的结构示意图;
图3a为本申请实施例提供的一种终端的摄像头传感器的划分区域的示意图一;
图3b为本申请实施例提供的一种终端的摄像头传感器的划分区域的示意图二;
图3c为本申请实施例提供的一种终端的摄像头传感器的划分区域的示意图三;
图4为本申请实施例提供的一种终端的结构示意图二;
图5为本申请实施例提供的一种对摄像头中不同区域的补偿方法的示意图;
图6为本申请实施例提供的一种环境光检测的方法流程示意图;
图7为本申请实施例提供的一种终端的结构示意图三;
图8为本申请实施例提供的一种终端的结构示意图四。
具体实施方式
考虑到采用环境光传感器进行环境光检测,环境光传感器在手机头部位置占据空间,进而影响手机屏占比的问题,本申请实施例提出了一种利用摄像头来进行环境光检测的方法。这样,手机可不再需要安装环境光传感器,为手机头部空间节省了一个器件的位置,有利于提高手机屏占比,提升用户体验。
本申请实施例提供的方法可运用于具有显示屏和摄像头的终端中。该终端可以利用摄像头进行环境光检测,并根据环境光检测的结果对显示屏的亮度进行调节。
需要说明的是,可以根据摄像头检测到的环境光的结果,对与该摄像头位于同一侧的显示屏进行亮度调节。例如:用前置摄像头检测的结果,调节手机正面的显示屏的亮度。在某些场景下,例如:手机正面和手机背面的环境光亮度差距不大时,也可以用手机的后置摄像头检测的结果,调节手机正面的显示屏的亮度。或者,如果手机的背面也有显示屏,则可以根据后置摄像头的检测结果,调节手机背面的显示屏的亮度。本申请实施例对此不做限定。
示例性的,本申请中的终端可以为可以安装应用程序并显示应用程序图标的手机(如图1所示的手机100)、平板电脑、个人计算机(Personal Computer,PC)、个人数字助理(personal digital assistant,PDA)、智能手表、上网本、可穿戴电子设备、增强现实技术(Augmented Reality,AR)设备、虚拟现实(Virtual Reality,VR)设备等,本申请对该终端的具体形式不做特殊限制。
如图1所示,以手机100作为上述终端举例,手机100具体可以包括:处理器101、射频(Radio Frequency,RF)电路102、存储器103、触摸屏104、蓝牙装置105、一个或多个传感器106、无线保真(Wireless Fidelity,WI-FI)装置107、定位装置108、音频电路109、外设接口110以及电源装置111等部件。这些部件可通过一根或多根通信总线或信号线(图1中未示出)进行通信。本领域技术人员可以理解,图1中示出的硬件结构并不构成对手机的限定,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对手机100的各个部件进行具体的介绍:
处理器101是手机100的控制中心,利用各种接口和线路连接手机100的各个部分,通过运行或执行存储在存储器103内的应用程序,以及调用存储在存储器103内的数据,执行手机100的各种功能和处理数据。在一些实施例中,处理器101可包括一个或多个处理单元,例如,处理器101可以包括基带处理器和应用处理器。
射频电路102可用于在收发信息或通话过程中,无线信号的接收和发送。特别地,射频电路102可以将基站的下行数据接收后,给处理器101处理;另外,将涉及上行的数据发送给基站。通常,射频电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频电路102还可以通过无线通信和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、电子邮件、短消息服务等。
存储器103用于存储应用程序以及数据,处理器101通过运行存储在存储器103的应用程序以及数据,执行手机100的各种功能以及数据处理。存储器103主要包括存储程序区以及存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等);存储数据区可以存储根据使用手机100时所创建的数据(比如音频数据、电话本等)。此外,存储器103可以包括高速随机存取存储器(Random Access Memory,RAM),还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他易失性固态存储器件等。存储器103可以存储各种操作系统,例如,苹果公司所开发的
Figure PCTCN2018085107-appb-000001
操作系统,谷歌公司所开发的
Figure PCTCN2018085107-appb-000002
操作系统等。上述存储器103可以是独立的,通过上述通信总线与处理器101相连接;存储器103也可以和处理器101集成在一起。在本申请实施例中,存储器103包括存储器件207。
触摸屏104具体可以包括触控板104-1和显示器104-2。
其中,触控板104-1可采集手机100的用户在其上或附近的触摸事件(比如用户使用手指、触控笔等任何适合的物体在触控板104-1上或在触控板104-1附近的操作),并将采集到的触摸信息发送给其他器件(例如处理器101)。其中,用户在触控板104-1 附近的触摸事件可以称之为悬浮触控;悬浮触控可以是指,用户无需为了选择、移动或拖动目标(例如图标等)而直接接触触控板,而只需用户位于设备附近以便执行所想要的功能。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型来实现触控板104-1。
显示器(也称为显示屏)104-2可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。可以采用液晶显示器、有机发光二极管等形式来配置显示器104-2。触控板104-1可以覆盖在显示器104-2之上,当触控板104-1检测到在其上或附近的触摸事件后,传送给处理器101以确定触摸事件的类型,随后处理器101可以根据触摸事件的类型在显示器104-2上提供相应的视觉输出。虽然在图1中,触控板104-1与显示屏104-2是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,可以将触控板104-1与显示屏104-2集成而实现手机100的输入和输出功能。可以理解的是,触摸屏104是由多层的材料堆叠而成,本申请实施例中不再详述。另外,触控板104-1可以以全面板的形式配置在手机100的正面,显示屏104-2也可以以全面板的形式配置在手机100的正面,这样在手机的正面就能够实现无边框的结构,例如全面屏手机。
另外,手机100还可以具有指纹识别功能。例如,可以在手机100的背面(例如后置摄像头的下方)配置指纹识别器112,或者在手机100的正面(例如触摸屏104的下方)配置指纹识别器112。又例如,可以在触摸屏104中配置指纹采集器件112来实现指纹识别功能,即指纹采集器件112可以与触摸屏104集成在一起来实现手机100的指纹识别功能。在这种情况下,该指纹采集器件112配置在触摸屏104中,可以是触摸屏104的一部分,也可以以其他方式配置在触摸屏104中。本申请实施例中的指纹采集器件112的主要部件是指纹传感器,该指纹传感器可以采用任何类型的感测技术,包括但不限于光学式、电容式、压电式或超声波传感技术等。
手机100还可以包括蓝牙装置105,用于实现手机100与其他短距离的设备(例如手机、智能手表等)之间的数据交换。本申请实施例中的蓝牙装置可以是集成电路或者蓝牙芯片等。
手机100还可以包括至少一种传感器106,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括接近传感器,其中,接近传感器可在手机100移动到耳边时,关闭显示器的电源。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
WI-FI装置107,用于为手机100提供遵循WI-FI相关标准协议的网络接入,手机100可以通过WI-FI装置107接入到WI-FI接入点,进而帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。在其他一些实施例中,该WI-FI装置107也可以作为WI-FI无线接入点,可以为其他设备提供WI-FI网络接入。
定位装置108,用于为手机100提供地理位置。可以理解的是,该定位装置108 具体可以是全球定位系统(Global Positioning System,GPS)或北斗卫星导航系统、俄罗斯GLONASS等定位系统的接收器。定位装置108在接收到上述定位系统发送的地理位置后,将该信息发送给处理器101进行处理,或者发送给存储器103进行保存。在另外的一些实施例中,该定位装置108还可以是辅助全球卫星定位系统(Assisted Global Positioning System,AGPS)的接收器,AGPS系统通过作为辅助服务器来协助定位装置108完成测距和定位服务,在这种情况下,辅助定位服务器通过无线通信网络与设备例如手机100的定位装置108(即GPS接收器)通信而提供定位协助。在另外的一些实施例中,该定位装置108也可以是基于WI-FI接入点的定位技术。由于每一个WI-FI接入点都有一个全球唯一的(Media Access Control,MAC)地址,设备在开启WI-FI的情况下即可扫描并收集周围的WI-FI接入点的广播信号,因此可以获取到WI-FI接入点广播出来的MAC地址;设备将这些能够标示WI-FI接入点的数据(例如MAC地址)通过无线通信网络发送给位置服务器,由位置服务器检索出每一个WI-FI接入点的地理位置,并结合WI-FI广播信号的强弱程度,计算出该设备的地理位置并发送到该设备的定位装置108中。
音频电路109、扬声器113、麦克风114可提供用户与手机100之间的音频接口。音频电路109可将接收到的音频数据转换后的电信号,传输到扬声器113,由扬声器113转换为声音信号输出;另一方面,麦克风114将收集的声音信号转换为电信号,由音频电路109接收后转换为音频数据,再将音频数据输出至RF电路102以发送给比如另一手机,或者将音频数据输出至存储器103以便进一步处理。
外设接口110,用于为外部的输入/输出设备(例如键盘、鼠标、外接显示器、外部存储器、用户识别模块卡等)提供各种接口。例如通过通用串行总线(Universal Serial Bus,USB)接口与鼠标连接,通过用户识别模块卡卡槽上的金属触点与电信运营商提供的用户识别模块卡(Subscriber Identification Module,SIM)卡进行连接。外设接口110可以被用来将上述外部的输入/输出外围设备耦接到处理器101和存储器103。
手机100还可以包括给各个部件供电的电源装置111(比如电池和电源管理芯片),电池可以通过电源管理芯片与处理器101逻辑相连,从而通过电源装置111实现管理充电、放电、以及功耗管理等功能。
手机100还可以包括一个或多个摄像头115。具体的,手机可以包括一个或多个为前置摄像头,也可以包括一个或多个后置摄像头,还可以包括一个或多个为前置摄像头和一个或多个后置摄像头。摄像头115的具体结构可参考下文对图2的描述,在此不重复赘述。
尽管图1未示出,手机100还可以包括闪光灯、微型投影装置、近场通信(Near Field Communication,NFC)装置等,在此不再赘述。
以下实施例中的方法均可以在具有上述硬件结构的手机100中实现。
为了更清楚的理解本申请实施例提供的环境光检测方法,先对终端中的摄像头的结构和工作原理进行简单介绍。
如图2所示,为手机100中一种摄像头115的结构示意图。通常,摄像头主要包括镜头(lens)201、分色滤光片(infrared cut,IR cut)202、传感器集成电路(Sensor IC)203和数字信号处理(Digital Signal Processing,DSP)芯片204。需要说明的是, 一些实施例中,摄像头的Sensor IC和DSP集成在一块芯片中,本申请实施例不做限定。
其中,镜头201是透镜结构,一般由一片或多片透镜组成,决定着传感器的采光率。一般而言,透镜包括塑料透镜(PLASTIC)或玻璃透镜(GLASS)。常用的镜头结构有:1P、2P、1G1P、1G3P、2G2P、4G等。
分色滤光片202用于对透过镜头201进入的光线进行分色。目前分色滤光片有两种分色方法:RGB(Red Green Blue)原色分色法(即三原色分色法)和CMYK(Cyan Magenta Yellow Key-Plate)补色分色法。由于自然界的任何光色都可以由R、G和B三种光色按不同的比例混合而成,故在本申请实施例中,可以采用分色滤光片202将自然界的光分解为R、G和B三种单色光。
传感器集成电路203,包含传感器(sensor),也可称为图像传感器、摄像头传感器、或感光传感器。sensor是一种半导体芯片,其表面包含有多个感光元件,例如光敏二极管。感光元件接收被滤光片滤光之后的单色光线,然后产生相应的电荷。也就是说,sensor将从镜头201传导过来的光线转换为电信号,再通过内部的模数(Analog to Digital,AD)转换,将电信号转换为数字信号,此时数字信号的数据称为原始数据(raw data)。其中,每个感光元件只能感光单色光,如R光、或者B光、或者G光。
需要说明的是,摄像头包括多个像素(pixel)。其中,每个像素可以包括一个所述的感光元件。或者,所述每个像素包括一个感光元件、以及该感光元件对应的一个滤光片。或者,所述每个像素除了包括一个感光元件以及该感光元件对应的一个滤光片之外,还可以包括其它相关的部件。
数字信号处理芯片204用于将从sensor获取raw data,并经过一系列处理后,将处理后的数据发送给视频输出设备中的处理器,最终通过视频输出设备进行图像显示。数字信号处理芯片204还用于在将数据发送给处理器后刷新sensor,便于sensor获取下一组raw data。
其中,数据信号处理芯片204包括有图像信号处理器(image signal processor,ISP),具体用于将获取到的raw data转化显示支持的格式,例如YUV格式,或RGB格式。数据信号处理芯片204还包括摄像头接口(camera interface,CAMIF),具体用于将ISP处理后的数据发送给手机处理器。
摄像头的工作原理可以为:手机外部的光线穿过透镜201后,经过分色滤光片202的滤波后照射到sensor面上。sensor将接收到的光线转换为电信号,再通过内部的AD转换为数字信号,得到raw data。如果sensor没有集成DSP,则将raw data传输到手机中的处理器,此时的数据格式是RAW DATA。如果sensor集成了DSP,则将得到的raw data经过一系列处理,输出YUV或者RGB格式的数据。最后会由手机中的处理器送到视频输出设备(例如:framebuffer)中进行图像显示。
在本申请实施例中,以根据前置摄像头检测的环境光的亮度值来调节显示屏的亮度为例进行说明。
将终端中的前置摄像头的sensor包含的多个像素划分为N个区域,N为大于1的整数。分别获取各个区域的亮度值,根据各个区域的亮度值确定环境光的亮度值。再 根据确定的环境光的亮度值来调节显示屏的亮度。
其中,N个区域的划分方法可以是均分,即各个区域的面积大小相同,也可以是根据透镜的光学特性进行划分,本申请实施例对划分的原则和以及划分后各个区域中的像素的数量不做限定。例如:如图3a所示,sensor中的像素被均分为9个区域,这9个区域的大小相同,其中各个区域包含的像素数量相等。如图3b所示,sensor中的像素被分为12个区域,这12个区域的大小不同,其中各个区域包含的像素的数量不等。
需要说明的是,这里的划分区域不是物理上将不同区域的像素分离开,而是相当于对多个像素进行分组,分组的原则是把相邻的一些像素分为一组,这一组内的像素相当于在一个区域内。并且这里的划分区域或分组是预先设置好的。
可以理解的是,根据摄像头的光学特性可知,镜头的进光分布是不同的。也就是说,摄像头的不同区域对光线的衰减也是不同的。因此,分区域的对摄像头采集的光进行亮度检测,并对检测得到的各个区域的亮度值进行不同程度的补偿,有利于提升检测得到的亮度值的准确性。
示例性的,可以按照预设的补偿规则对各个区域的亮度值进行补偿,从补偿后的各个区域的亮度值中确定数值最大的为当前的环境光的亮度值。
其中,预设的补偿规则可以是:对位于摄像头的中心位置的区域检测得到的亮度值补偿为零或补偿很小,对于距离中心位置越远的区域检测得到亮度值补偿越高。其中,某个区域距离中心位置的距离可以采用该区域中心距离中心位置的距离。如图5所示,假设A点为中心位置,以A点为中心且半径为r1的圆形区域(区域1)可以认为是中心区域,可以不进行补偿,或补偿数值很小(小于后面的P1)。在距离A点半径大于r1且小于r2的区域(区域2)的补偿的数值为P1,在距离A点半径大于r2且小于r3的区域(区域3)的补偿的数值为P2。其中,r1<r2<r3,P1<P2。
可选的,可以预先测试摄像头中心位置和视场角(field of view,FOV)边缘位置的亮度值,得到两个亮度值的差值或比例,将这两个亮度值的差值或比例作为补偿的依据。例如:在固定位置固定亮度的光源照射下,读取摄像头的中心位置的亮度值为Q1 lux(照明单位),读取摄像头FOV边缘位置的亮度值为Q2 lux。可以根据摄像头的光学特性或光源的特征等因素,确定Q1和Q2的差值(△Q),或者Q1和Q2的比值作为补偿的依据。假设以Q1和Q2的差值(△Q)作为补偿的依据。那么,在终端进行环境光检测时,实际测得的中心位置的亮度值为Q3 lux,实际测得FOV边缘位置的亮度值为Q4 lux。那么,对实际测得的Q3可不进行补偿,即确定该摄像头中心位置当前的亮度值为Q3 lux。对实际测得的Q4进行补偿,例如可以是(Q4+△Q)lux,即确定该摄像头FOV边缘位置当前的亮度值为(Q4+△Q)lux。
可选的,在对sensor进行分区后,也可以根据各个区域接收到光信号的情况,对光源进行辨识,进而采用不同的补偿规则或者显示屏亮度的调节策略。例如:若在sensor的所有区域中只有一个或者相邻几个区域的亮度值较大,那么可以确定该光源为点光源。可以对在摄像头FOV范围的边缘处测到的亮度值进行较高的补偿。若在sensor的所有区域中有几个不相邻的区域的亮度值较大,那么可以确定该光源为多点光源。在对sensor测到的亮度值可以根据多个光源的分布进行梯度的补偿,具体补偿 方法不做限定。若在sensor的所有区域中各个区域的亮度值变化较大,而具有一定规律,那么可以确定为终端处于运动状态中,可以不调节显示屏的亮度。
可选的,根据摄像头的光学特性可知,当光源位于摄像头的FOV范围内,摄像头检测得到的环境光的亮度值为一个相对稳定的数值。而当光源位于摄像头的FOV范围外,摄像头检测得到的环境光的亮度值将出现断崖式下降。为此,可以增大摄像头的FOV范围,以提升终端确定的环境光亮度值的准确性。
可选的,针对这N个区域中的任一区域,可以通过该区域内的M个像素的亮度值来获取该区域的亮度值,例如:读取该区域中M个像素的亮度值,再根据这M个像素的亮度值确定该区域的亮度值。示例的,可以对这M个像素的亮度值进行加权计算,得到该区域的亮度值。其中,该区域包括的像素的数量大于或等于M。
其中,M可以为大于或等于3的整数,在一个区域中,读取的M个像素的亮度值可以包含至少一个R光的值、至少一个G光的值、以及至少一个B光的值。这样,在计算该区域的亮度值时,可以根据情况对R光、G光和B光的亮度值添加不同的权重并相加,进而得到该区域的亮度值。
需要说明的是,终端中每个区域内都包含多个第一像素和多个第二像素。其中,第一像素为终端指定用于检测环境光的像素,这里的读取每个区域内的M个像素就是M个第一像素。第二像素则是未被指定用于环境光检测的像素。终端使用所有的像素,包括第一像素和第二像素用于照相功能。
在终端开启自动调节显示屏的显示亮度的功能时,终端需要进行环境光检测。那么,终端中所有的第一像素都是处于激活状态的,即能够工作的状态。在终端开启照相功能时,所有的第一像素和所有的第二像素都处于激活状态。在终端开启自动调节显示屏的显示亮度的功能,且未开启照相功能,则第一像素是处于激活状态,而第二像素处于未激活状态。在终端开启自动调节显示屏的显示亮度的功能的情况下,再开启相机功能时,终端激活所有的第二像素(由于第一像素在开启自动调节显示屏的显示亮度的功能时,已经激活了)。
如图3a所示,每个区域中都预先设定了一些第一像素,例如:每个区域都预先指定了两个R光像素、一个G光像素和一个B光像素。本申请实施例并不限定每个区域中第一像素的数量,也不限定具体的R光像素、G光像素和B光像素的数量。任意两个区域中的第一像素的数量也可以不相同。
需要说明的是,在不同的区域中,M的值可以不同。例如:在第一区域中可以取M1个像素的亮度值来进行计算,在第二区域中则可以取M2个像素的亮度值来进行计算;其中,M1和M2可以相等,也可以不等。并且,同一个区域内,读取的R光像素的亮度值的数量、G光像素的亮度值的数量和B光像素的亮度值的数量可以相同,也可以不同。例如:在某个区域内,读取了K1个R光像素的亮度值,K2个G光像素的亮度值,以及K3个B光像素的亮度值,其中,K1、K2和K3可以相同,也可以不同。
如图3c所示,在第一行的第一个区域11内,预先指定的第一像素一共有3个像素,分别为:一个R光像素,一个G光像素和一个B光像素。在第一行的第二区域 12内,预先指定的第一像素一共有4个,分别为:两个R光像素,一个G光像素和一个B光像素。在第一行的第三区域13内,预先指定的第一像素一共有5个,分别为:两个R光像素,两个G光像素和一个B光像素。其他区域指定的第一像素请参见附图,不再赘述。
示例性的,由于相同的亮度值在不同色温下,给用户带来的视觉体验不同。因此,可以根据色温对R光、G光和B光的亮度值添加不同的权重,然后根据权重将R光、G光和B光的亮度值相加得到该区域的亮度值,最后得到当前的环境光的亮度值。例如:在色温较高的情况下,例如在日照强烈的室外,显示屏上的图像看起来颜色会偏红。因此,在计算亮度值时,可以将R光的亮度值的权重加大一些。这样,计算得到的亮度值会大一些,那么,终端根据计算后的亮度值调节显示屏的亮度时,可以将亮度调暗一些,有利于提升用户体验。在色温较低的情况下,例如阴冷的天气下,显示屏上的图像看起来颜色会偏蓝。因此,在计算亮度值时,可以将B光的亮度值的权重加大一些。这样,计算得到的亮度值会大一些,那么,终端根据计算后的亮度值调节显示屏的亮度时,可以将亮度调暗一些,有利于提升用户体验。
例如,假设在色温1的条件下,R光对应的权重为H1,G光对应的权重为J1,B光对应的权重为K1。其中,H1+J1+K1=1。那么,某个区域当前的亮度值=R光的亮度值*H1+G光的亮度值*J1+B光的亮度值*K1。其中,R光的亮度值可以是该区域内预设的全部R光的亮度值的最大值(或平均值)。G光的亮度值可以是该区域内预设的全部G光的亮度值的最大值(或平均值)。B光的亮度值可以是该区域内预设的全部B光的亮度值的最大值(或平均值)。
又例如:假设在色温2的条件下,R光对应的权重为H2,G光对应的权重为J2,B光对应的权重为K2。其中,H2+J2+K2=1。H1和H2不同,J1和J2不同,K1和K2不同。那么,某个区域当前的亮度值=R光的亮度值*H2+G光的亮度值*J2+B光的亮度值*K2。其中,R光的亮度值可以是该区域内预设的全部R光的亮度值的最大值(或平均值)。G光的亮度值可以是该区域内预设的全部G光的亮度值的最大值(或平均值)。B光的亮度值可以是该区域内预设的全部B光的亮度值的最大值(或平均值)。
示例性的,由于不同的光源包含的R光、G光和B光的成分不同,因此,也可以根据不同光源的特性对R光、G光和B光的亮度值添加不同的权重,然后根据权重将R光、G光和B光的亮度值相加得到该区域的亮度值,最后得到当前的环境光的亮度值。例如:对于包含R光较多的光源,可以在计算区域的亮度值时,将R光的权重加大一些,这样,计算得到的亮度值会大一些。这样,有利于避免该光源中的R光被过滤掉后,造成计算得到的亮度值小于实际的亮度值,进而根据该计算的亮度值调节显示屏的亮度效果较差。因此,终端将R光的权重加大一些,计算得到的亮度值会大一些,再根据计算后的亮度值调节显示屏的亮度时,可以将亮度调暗一些,有利于提升用户体验。同理,对于包含G光较多的光源,可以在计算区域的亮度值时,将R光的权重加大一些。对于包含B光较多的光源,可以在计算区域的亮度值时,将R光的权重加大一些。
下面对摄像头分区域进行环境光检测的具体实现过程进行说明,如下:
在现有技术中,在终端开启照相功能时,sensor控制所有像素(包括第一像素和第二像素)处于激活状态,由所有像素将整幅图像的亮度值输出到寄存器,由终端读取该寄存器,获取该图像的亮度值,并根据该亮度值显示该图像。而在终端关闭照相功能时,sensor控制所有像素处于非激活状态,不需要对照射到sensor上的光照进行感光和相应的处理。
如图6所示,为本申请实施例提供的环境光检测的方法流程图,具体包括:
S101、终端控制摄像头中各个第一像素处于激活状态,获取每个所述第一像素检测到的第一亮度值。
其中,该摄像头的各个像素被划分为至少两个区域,每个区域中包括多个像素,将每个区域的多个像素中的至少三个像素作为第一像素。在需要检测环境光亮度的场景中,每个第一像素都是处于激活状态的。处于激活状态的第一像素检测到的光照的亮度值即为第一亮度值。
其中,在一个时刻下,每个第一像素对应一个第一亮度值。
可以理解的是,由于sensor可以控制sensor中包含的每一个像素的状态处于激活状态或非激活状态。处于激活状态的像素,可以接收光照,并进行光电转换,将光信号转换为电信号;再将电信号进行模数转换,转换为数字信号;该数字信号中包括了该像素的亮度值。而后,该像素的亮度值被存放到寄存器中,传感器集线器(sensor hub)可以通过例如集成电路总线(Inter-Integrated Circuit,IIC)读取寄存器中的数值来获取亮度值。
因此,终端可以在每一个区域中预设一些像素(即第一像素),用于检测环境光。在终端开启环境光检测的功能,且手机处于亮屏时,sensor控制这些预设的像素处于激活状态,用于检测当前光照的亮度值,并将各个像素检测到的第一亮度值存储到寄存器(例如:每个第一像素可对应一个寄存器)中。
S102、终端根据每个所述第一像素检测到的第一亮度值,得到每个区域的第二亮度值。
其中,每个区域包括多个第一像素。根据一个区域中的所有第一像素检测到的第一亮度值,可以得到该区域的亮度值,即第二亮度值。可见,一个区域对应一个第二亮度值。换言之,用某个区域的多个第一亮度值得到的第二亮度值,来表示该区域的亮度值。需要说明的是,在具体实现过程中,终端可以不执行具体的划分区域的动作。而是可以在终端中预先对所有的第一像素进行分组,每组包括多个第一像素,每组对应一个区域;然后根据每组的所有第一像素对应的第一亮度值得到该组对应的一个第二亮度值,即相当于该组对应的区域的第二亮度值。
以其中一个区域为例进行说明。
一些示例中,终端的sensor hub可以读取各个寄存器中的第一亮度值,并将这些第一亮度值上报给终端的处理器(例如应用处理器),由终端的处理器进行加权计算得到该区域的亮度值(即第二亮度值)。
一些示例中,终端摄像头中的sensor可以读取各个寄存器中的第一亮度值后,将这些第一亮度值进行加权计算得到该区域的亮度值(即第二亮度值)。然后,再由sensor hub读取该第二亮度值,并上报给终端的处理器。
需要说明的是,本申请实施例对本步骤中执行加权计算的主体不做限定。
需要说明的是,sensor hub读取各个寄存器中的亮度值时,采用的通信协议可以是IIC,也可以是串行外设接口(Serial Peripheral Interface,SPI)等其他通信协议。
S103、终端根据每个所述区域的第二亮度值得到当前的环境光亮度值。
每个区域对应一个第二亮度值,由此,终端从所有的区域对应的第二亮度值中选最大值作为当前的环境光亮度值。可选的,由于摄像头的不同区域对光线的衰减不同,所以可以对一些区域的亮度值进行补偿,并从补偿之后的各个第二亮度值中选取最大值作为当前的环境光亮度值。示例的,终端的处理器按照一定的补偿规则,对各个区域的亮度值进行补偿计算,得到各个区域补偿后的亮度值。最后,从各个区域补偿后的亮度值中选取最大的亮度值作为当前的环境光的亮度值。
S104、终端根据确定的环境光的亮度值对显示屏的亮度进行调节。
这样,有利于提升显示屏显示效果,提升用户体验。
需要说明的是,本申请实施例中,摄像头的拍照功能和通过摄像头进行环境光检测的功能是两个独立的功能,并不相互影响。在终端开启自动调节环境光的功能后,在终端开机且亮屏的过程中,可以一直通过摄像头进行环境光检测,并且不受摄像头是否进行拍照的影响。在进行环境光检测的过程中,摄像头能够执行拍照。并且,在摄像头拍照的过程中,也能够通过摄像头来进行环境光强度的检测。摄像头的拍照功能和环境光检测功能分别对应的寄存器可以分开设置,并且这两个功能对应的IIC也可以分开设置,由此可以实现这两个功能的独立实现。
例如:如图4所示,在本申请实施例中,终端在进行拍照时,摄像头中的所有像素在感光后,生成的RGB的数据可以存储在第一寄存器中。图像信号处理器404通过IIC1配置摄像头传感器401的拍照参数。图像信号处理器404通过例如移动行业处理器接口(Mobile Industry Processor Interface,MIPI)1读取第一寄存器中的RGB的数据,并根据这些数据进行图像处理。
还如图4所示,终端在进行环境光检测时,摄像头中的第一像素在感光后,获取的亮度数据存储在第二寄存器中,其中,第二寄存器与第一寄存器不同,第一寄存器和第二寄存器都可以为多个,本申请并不限定寄存器的数量。传感器集线器403通过例如IIC 2读取在摄像头传感器401的各个第二寄存器中的亮度值。
由此可见,终端在进行拍照的过程和终端进行环境光检测的过程是两个独立的过程,互不干扰。从而,实现了摄像头在拍照和环境光检测时的解耦设计,这样,当摄像头处于休眠状态时,终端也是可以进行环境光检测。
可以理解的是,上述终端等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明实施例的范围。
本申请实施例可以根据上述方法示例对上述终端等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处 理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图7示出了上述实施例中所涉及的终端的一种可能的结构示意图。如图7所示,终端700包括:摄像头701、和处理器702。
其中,摄像头701用于支持终端执行图6中步骤S101,和/或用于本文所描述的技术的其它过程。处理器702用于支持终端执行图6中步骤S102-S104,和/或用于本文所描述的技术的其它过程。
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
当然,终端700还可以包括通信单元,用于终端与其他设备进行交互。终端700还可以包括存储单元,用于存储终端的程序代码和数据。并且,上述功能单元的具体所能够实现的功能也包括但不限于上述实例所述的方法步骤对应的功能,终端700的其他单元的详细描述可以参考其所对应方法步骤的详细描述,本申请实施例这里不再赘述。
在采用集成的单元的情况下,上述的摄像头可以是终端的摄像头模块,上述处理器702可以是终端的处理模块。上述的通信单元可以是终端的通信模块,如RF电路、WiFi模块或者蓝牙模块。上述存储单元可以是终端的存储模块。
图8示出了上述实施例中所涉及的终端的一种可能的结构示意图。该终端1100包括:处理模块1101、存储模块1102和通信模块1103。处理模块1101用于对终端的动作进行控制管理。存储模块1102,用于保存终端的程序代码和数据。通信模块1103用于与其他终端通信。其中,处理模块1101可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块1303可以是收发器、收发电路或通信接口等。存储模块1102可以是存储器。
当处理模块1101为处理器(如图1所示的处理器101),通信模块1103为RF收发电路(如图1所示的射频电路102),存储模块1102为存储器(如图1所示的存储器103)时,本申请实施例所提供的终端可以为图1所示的终端100。其中,上述通信模块1103不仅可以包括RF电路,还可以包括WiFi模块和蓝牙模块。RF电路、WiFi模块和蓝牙模块等通信模块可以统称为通信接口。其中,上述处理器、通信接口和存储器可以通过总线耦合在一起。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模 块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (30)

  1. 一种环境光检测的方法,应用于包含摄像头和显示屏的终端中,其特征在于,所述摄像头包含至少两个区域,每个区域包含至少一个第一像素,所述方法包括:
    所述终端获取每个第一像素的第一亮度值,其中,每个所述第一像素对应一个第一亮度值;
    所述终端根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值,每个所述区域对应一个第二亮度值;
    所述终端根据所有的所述第二亮度值获取当前的环境光的亮度值;
    所述终端根据所述环境光的亮度值调节所述显示屏的亮度。
  2. 根据权利要求1所述的方法,其特征在于,所述摄像头还包括至少一个第二像素;所述方法还包括:
    所述终端接收到用于启动相机的操作;
    响应所述操作,所述终端激活所述至少一个第二像素。
  3. 根据权利要求1或2所述的方法,其特征在于,在所述终端获取每个第一像素的第一亮度值之前,所述方法还包括:
    所述终端控制所述终端中每个第一像素处于激活状态。
  4. 根据权利要求1或2所述的方法,其特征在于,在所述终端获取每个第一像素的第一亮度值之前,所述方法还包括:
    所述终端开启自动调节所述显示屏的显示亮度的功能;
    响应所述开启,所述终端控制所述终端中每个第一像素处于激活状态。
  5. 根据权利要求2-4任一项所述的方法,其特征在于:
    若所述自动调节所述显示屏的显示亮度的功能被开启,且所述相机未被启动,则每个所述第一像素处于激活状态,每个所述第二像素处于未激活状态;
    若所述相机被启动,则每个所述第一像素和每个所述第二像素均处于激活状态。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述终端根据所有的所述第二亮度值获取当前的环境光的亮度值包括:
    所述终端将所有的所述第二亮度值中的最大值作为所述当前的环境光的亮度值。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,第一区域内的所有第一像素包括K1个红光像素、K2个绿光像素和K3个蓝光像素;所述第一区域为所述至少两个区域中的任意一个;
    在所述终端根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值的过程中,所述终端对每个所述区域执行以下操作:
    所述终端根据所述第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值,所述K1个红光像素对应1个所述红光的第三亮度值;
    所述终端根据所述第一区域中包含的K2个绿光像素的第一亮度值获取绿光的第三亮度值,所述K2个绿光像素对应1个所述绿光的第三亮度值;
    所述终端根据所述第一区域中包含的K3个蓝光像素的第一亮度值获取蓝光的第三亮度值,所述K3个蓝光像素对应1个所述蓝光的第三亮度值;
    所述终端根据所述红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确 定所述第一区域的第二亮度值。
  8. 根据权利要求7所述的方法,其特征在于:
    所述终端根据所述第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值包括:所述终端将所述K1个第一亮度值的平均值或所述K1个第一亮度值中的最大值确定为所述红光的第三亮度值;
    所述终端根据所述第一区域中包含的K2个绿光像素的K2个第一亮度值获取绿光的第三亮度值包括:所述终端将所述K2个第一亮度值的平均值或所述K2个第一亮度值中的最大值确定为所述绿光的第三亮度值;
    所述终端根据所述第一区域中包含的K3个蓝光像素的K3个第一亮度值获取蓝光的第三亮度值包括:所述终端将所述K3个第一亮度值的平均值或所述K3个第一亮度值中的最大值确定为所述蓝光的第三亮度值。
  9. 根据权利要求7或8所述的方法,其特征在于,所述终端根据所述红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定所述第一区域的第二亮度值包括:
    所述终端获取所述红光的第三亮度值、所述绿光的第三亮度值和所述蓝光的第三亮度值的加权平均值;
    所述终端将所述加权平均值作为所述第一区域的第二亮度值。
  10. 根据权利要求7或8所述的方法,其特征在于,所述终端根据所述红光的第三亮度值、绿光的第三亮度值和蓝的第三亮度值确定所述第一区域的第二亮度值包括:
    所述终端获取所述红光的第三亮度值、所述绿光的第三亮度值和所述蓝光的第三亮度值的加权平均值;
    所述终端根据所述第一区域的位置,对所述加权平均值进行补偿得到所述第一区域的第二亮度值。
  11. 根据权利要求1-6任一项所述的方法,其特征在于,在所述终端根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值的过程中,所述终端对每个所述区域执行以下操作:
    所述终端将第一平均值作为所述第一区域的第二亮度值,所述第一平均值为所述第一区域中所有第一像素的第一亮度值的平均值;
    其中,所述第一区域为所述至少两个区域中的任意一个。
  12. 根据权利要求1-6任一项所述的方法,其特征在于,在所述终端根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值的过程中,所述终端对每个所述区域执行以下操作:
    所述终端根据第一区域的位置,对第一平均值进行补偿得到所述第一区域的第二亮度值,所述第一平均值为所述第一区域中所有第一像素的第一亮度值的平均值;
    其中,所述第一区域为所述至少两个区域中的任意一个。
  13. 根据权利要求10或12所述的方法,其特征在于:
    若所述第一区域距离所述摄像头的中心位置越近,则对所述加权平均值或所述第一平均值的补偿越小;
    若所述第一区域距离所述摄像头的中心位置越远,则对所述加权平均值或所述第一平均值的补偿越大。
  14. 一种终端,包含摄像头、处理器和显示屏,其特征在于,所述摄像头包含至少两个区域,每个区域包含至少一个第一像素,
    所述摄像头,用于获取每个第一像素的第一亮度值,其中,每个所述第一像素对应一个第一亮度值;
    所述处理器,用于根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值,每个所述区域对应一个第二亮度值;
    所述处理器,还用于根据所有的所述第二亮度值获取当前的环境光的亮度值;
    所述处理器,还用于根据所述环境光的亮度值调节所述显示屏的亮度。
  15. 根据权利要求14所述的终端,其特征在于,所述摄像头还包括至少一个第二像素;
    所述处理器,还用于接收到用于启动相机的操作;
    所述摄像头,还用于响应所述操作激活所述至少一个第二像素。
  16. 根据权利要求14或15所述的终端,其特征在于,
    所述摄像头,还用于在所述终端获取每个第一像素的第一亮度值之前,控制所述终端中每个第一像素处于激活状态。
  17. 根据权利要求14或15所述的终端,其特征在于,
    所述处理器,还用于在所述终端获取每个第一像素的第一亮度值之前,开启自动调节所述显示屏的显示亮度的功能;
    所述摄像头,还用于响应所述开启,控制所述终端中每个第一像素处于激活状态。
  18. 根据权利要求15-17任一项所述的终端,其特征在于:
    若所述自动调节所述显示屏的显示亮度的功能被开启,且所述相机未被启动,则每个所述第一像素处于激活状态,每个所述第二像素处于未激活状态;
    若所述相机被启动,则每个所述第一像素和每个所述第二像素均处于激活状态。
  19. 根据权利要求14-18任一项所述的终端,其特征在于,在根据所有的所述第二亮度值获取当前的环境光的亮度值时,所述处理器具体用于将所有的所述第二亮度值中的最大值作为所述当前的环境光的亮度值。
  20. 根据权利要求14-19任一项所述的终端,其特征在于,第一区域内的所有第一像素包括K1个红光像素、K2个绿光像素和K3个蓝光像素;所述第一区域为所述至少两个区域中的任意一个;
    在所述处理器根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值的过程中,所述处理器对每个所述区域执行以下操作:
    根据所述第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值,所述K1个红光像素对应1个所述红光的第三亮度值;
    根据所述第一区域中包含的K2个绿光像素的第一亮度值获取绿光的第三亮度值,所述K2个绿光像素对应1个所述绿光的第三亮度值;
    根据所述第一区域中包含的K3个蓝光像素的第一亮度值获取蓝光的第三亮度值,所述K3个蓝光像素对应1个所述蓝光的第三亮度值;
    根据所述红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定所述第一区域的第二亮度值。
  21. 根据权利要求20所述的终端,其特征在于:
    在根据所述第一区域中包含的K1个红光像素的K1个第一亮度值获取红光的第三亮度值时,所述处理器具体用于将所述K1个第一亮度值的平均值或所述K1个第一亮度值中的最大值确定为所述红光的第三亮度值;
    在根据所述第一区域中包含的K2个绿光像素的第一亮度值获取绿光的第三亮度值时,所述处理器具体用于将所述K2个第一亮度值的平均值或所述K2个第一亮度值中的最大值确定为所述绿光的第三亮度值;
    在根据所述第一区域中包含的K3个蓝光像素的第一亮度值获取蓝光的第三亮度值时,所述处理器具体用于将所述K3个第一亮度值的平均值或所述K3个第一亮度值中的最大值确定为所述蓝光的第三亮度值。
  22. 根据权利要求20或21所述的终端,其特征在于,在根据所述红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定所述第一区域的第二亮度值时,所述处理器具体用于获取所述红光的第三亮度值、所述绿光的第三亮度值和所述蓝光的第三亮度值的加权平均值;将所述加权平均值作为所述第一区域的第二亮度值。
  23. 根据权利要求20或21所述的终端,其特征在于,在根据所述红光的第三亮度值、绿光的第三亮度值和蓝光的第三亮度值确定所述第一区域的第二亮度值时,
    所述处理器具体用于获取所述红光的第三亮度值、所述绿光的第三亮度值和所述蓝光的第三亮度值的加权平均值;根据所述第一区域的位置,对所述加权平均值进行补偿得到所述第一区域的第二亮度值。
  24. 根据权利要求14-19任一项所述的终端,其特征在于,在所述处理器根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值的过程中,所述处理器对每个所述区域执行以下操作:
    将第一平均值作为所述第一区域的第二亮度值,所述第一平均值为所述第一区域中所有第一像素的第一亮度值的平均值;
    其中,所述第一区域为所述至少两个区域中的任意一个。
  25. 根据权利要求14-19任一项所述的终端,其特征在于,在所述处理器根据每个所述区域中包含的所有第一像素的第一亮度值获取每个所述区域的第二亮度值的过程中,所述处理器对每个所述区域执行以下操作:
    根据第一区域的位置,对第一平均值进行补偿得到所述第一区域的第二亮度值,所述第一平均值为所述第一区域中所有第一像素的第一亮度值的平均值;
    其中,所述第一区域为所述至少两个区域中的任意一个。
  26. 根据权利要求23或25所述的终端,其特征在于:
    若所述第一区域距离所述摄像头的中心位置越近,则对所述加权平均值或所述第一平均值的补偿越小;
    若所述第一区域距离所述摄像头的中心位置越远,则对所述加权平均值或所述第一平均值的补偿越大。
  27. 根据权利要求14-26任一项所述的终端,其特征在于,所述处理器为传感器集线器sensor hub、应用处理器中的任一项。
  28. 一种终端,其特征在于,包括:处理器、存储器和触摸屏,所述存储器、所 述触摸屏与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,以执行如权利要求1-13中任一项所述的方法。
  29. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在终端上运行时,使得所述终端执行如权利要求1-13中任一项所述的方法。
  30. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-13中任一项所述的方法。
PCT/CN2018/085107 2018-04-04 2018-04-28 一种环境光检测的方法及终端 WO2019192044A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201880072800.0A CN111345019B (zh) 2018-04-04 2018-04-28 一种环境光检测的方法及终端
US17/043,201 US11250813B2 (en) 2018-04-04 2018-04-28 Ambient light detection method and terminal
JP2020554133A JP7142715B2 (ja) 2018-04-04 2018-04-28 周囲光検出方法および端末
KR1020207030583A KR102434930B1 (ko) 2018-04-04 2018-04-28 주변 광 검출 방법 및 단말
CN202110991142.9A CN113923422B (zh) 2018-04-04 2018-04-28 一种环境光检测的方法及终端

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810302048 2018-04-04
CN201810302048.6 2018-04-04

Publications (1)

Publication Number Publication Date
WO2019192044A1 true WO2019192044A1 (zh) 2019-10-10

Family

ID=68100026

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/085107 WO2019192044A1 (zh) 2018-04-04 2018-04-28 一种环境光检测的方法及终端

Country Status (5)

Country Link
US (1) US11250813B2 (zh)
JP (1) JP7142715B2 (zh)
KR (1) KR102434930B1 (zh)
CN (2) CN111345019B (zh)
WO (1) WO2019192044A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240757A (zh) * 2021-05-12 2021-08-10 深圳市光科全息技术有限公司 蓝光参数检测方法、装置、设备和介质
WO2024045829A1 (zh) * 2022-08-29 2024-03-07 深圳市Tcl云创科技有限公司 屏幕亮度调整方法、装置、存储介质及电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114485934B (zh) * 2020-11-13 2024-01-30 北京小米移动软件有限公司 一种光线检测组件、屏幕组件及电子终端
CN117938996A (zh) * 2023-12-28 2024-04-26 荣耀终端有限公司 检测环境光的方法和电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120098976A1 (en) * 2008-06-06 2012-04-26 Microsoft Corporation Radiometric calibration using temporal irradiance mixtures
CN102693698A (zh) * 2012-06-25 2012-09-26 济南大学 一种基于环境光变化的户外led显示屏亮度自动调节方法及系统
CN107645606A (zh) * 2017-09-29 2018-01-30 努比亚技术有限公司 屏幕亮度调节方法、移动终端及可读存储介质

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001223792A (ja) * 2000-02-09 2001-08-17 Mitsubishi Electric Corp 携帯電話機
KR101148791B1 (ko) * 2004-06-30 2012-05-24 엘지디스플레이 주식회사 타일형 표시장치
IL165852A (en) * 2004-12-19 2010-12-30 Rafael Advanced Defense Sys System and method for image display enhancement
KR100792986B1 (ko) * 2005-09-28 2008-01-08 엘지전자 주식회사 휴대 단말기에서의 렌즈 왜곡 보상 장치 및 방법
JP4682181B2 (ja) * 2007-11-19 2011-05-11 シャープ株式会社 撮像装置および電子情報機器
JP2010020072A (ja) * 2008-07-10 2010-01-28 Canon Inc 表示装置
KR101564076B1 (ko) * 2011-04-29 2015-10-27 후아웨이 디바이스 컴퍼니 리미티드 단말 기기 내의 발광 소자를 제어하는 방법 및 장치, 및 단말 기기
CN103152523A (zh) * 2013-02-27 2013-06-12 华为终端有限公司 电子设备拍摄方法及装置和电子设备
CN104113617A (zh) 2013-04-16 2014-10-22 深圳富泰宏精密工业有限公司 背光亮度调节系统及方法
TWI482145B (zh) * 2013-06-20 2015-04-21 Novatek Microelectronics Corp 影像顯示裝置及其背光調整方法
US9570002B2 (en) 2014-06-17 2017-02-14 Apple Inc. Interactive display panel with IR diodes
CN105592270B (zh) * 2015-12-18 2018-02-06 广东欧珀移动通信有限公司 图像亮度补偿方法、装置及终端设备
CN106488203B (zh) 2016-11-29 2018-03-30 广东欧珀移动通信有限公司 图像处理方法、图像处理装置、成像装置及电子装置
CN107222664B (zh) 2017-05-03 2020-03-06 Oppo广东移动通信有限公司 相机模组及电子装置
CN107566695B (zh) * 2017-08-14 2019-07-02 厦门美图之家科技有限公司 一种补光方法及移动终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120098976A1 (en) * 2008-06-06 2012-04-26 Microsoft Corporation Radiometric calibration using temporal irradiance mixtures
CN102693698A (zh) * 2012-06-25 2012-09-26 济南大学 一种基于环境光变化的户外led显示屏亮度自动调节方法及系统
CN107645606A (zh) * 2017-09-29 2018-01-30 努比亚技术有限公司 屏幕亮度调节方法、移动终端及可读存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113240757A (zh) * 2021-05-12 2021-08-10 深圳市光科全息技术有限公司 蓝光参数检测方法、装置、设备和介质
CN113240757B (zh) * 2021-05-12 2023-07-14 深圳市光科全息技术有限公司 蓝光参数检测方法、装置、设备和介质
WO2024045829A1 (zh) * 2022-08-29 2024-03-07 深圳市Tcl云创科技有限公司 屏幕亮度调整方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN111345019A (zh) 2020-06-26
CN111345019B (zh) 2021-08-31
JP7142715B2 (ja) 2022-09-27
US11250813B2 (en) 2022-02-15
KR20200133383A (ko) 2020-11-27
CN113923422B (zh) 2023-06-30
CN113923422A (zh) 2022-01-11
US20210027746A1 (en) 2021-01-28
JP2021518722A (ja) 2021-08-02
KR102434930B1 (ko) 2022-08-19

Similar Documents

Publication Publication Date Title
CN109891874B (zh) 一种全景拍摄方法及装置
US10510136B2 (en) Image blurring method, electronic device and computer device
WO2021052279A1 (zh) 一种折叠屏显示方法及电子设备
US20220005439A1 (en) Method for display-brightness adjustment and related products
WO2019192044A1 (zh) 一种环境光检测的方法及终端
US20180013955A1 (en) Electronic device including dual camera and method for controlling dual camera
US11546531B2 (en) Camera assembly, image acquisition method, and mobile terminal
KR20150100394A (ko) 이미지 표시 방법 및 장치
US20210168279A1 (en) Document image correction method and apparatus
US20220367550A1 (en) Mobile terminal and image photographing method
CN107705247B (zh) 一种图像饱和度的调整方法、终端及存储介质
JP6862564B2 (ja) 画像合成のための方法、装置および不揮発性コンピュータ可読媒体
US20170048458A1 (en) Method for providing images and electronic device supporting the same
US10694130B2 (en) Imaging element and imaging device
CN109462732B (zh) 一种图像处理方法、设备及计算机可读存储介质
CN108848321B (zh) 曝光优化方法、装置及计算机可读存储介质
EP3249999B1 (en) Intelligent matching method for filter and terminal
WO2023207445A1 (zh) 图像去噪方法、装置、系统及电子设备
CN109729280A (zh) 一种图像处理方法及移动终端
CN109729264B (zh) 一种图像获取方法及移动终端
CN114143588B (zh) 一种播放控制方法以及电子设备
US11153018B2 (en) Electronic device and method for controlling electronic device
WO2023108442A1 (zh) 图像处理方法、智能终端及存储介质
CN115225789A (zh) 感光模组、图像获取设备、图像获取方法及智能终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18913443

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020554133

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20207030583

Country of ref document: KR

Kind code of ref document: A

122 Ep: pct application non-entry in european phase

Ref document number: 18913443

Country of ref document: EP

Kind code of ref document: A1