CN113891009B - Exposure adjusting method and related equipment - Google Patents

Exposure adjusting method and related equipment Download PDF

Info

Publication number
CN113891009B
CN113891009B CN202110716784.8A CN202110716784A CN113891009B CN 113891009 B CN113891009 B CN 113891009B CN 202110716784 A CN202110716784 A CN 202110716784A CN 113891009 B CN113891009 B CN 113891009B
Authority
CN
China
Prior art keywords
image
electronic device
face
human body
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110716784.8A
Other languages
Chinese (zh)
Other versions
CN113891009A (en
Inventor
冯寒予
林梦然
朱聪超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110716784.8A priority Critical patent/CN113891009B/en
Publication of CN113891009A publication Critical patent/CN113891009A/en
Application granted granted Critical
Publication of CN113891009B publication Critical patent/CN113891009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses an exposure adjusting method and related equipment, wherein electronic equipment can comprehensively judge whether a shot object only turns (for example, faces away from a camera of the electronic equipment) or leaves a shooting area of the electronic equipment by using a Face recognition frame and a human body recognition frame, and under the condition that the electronic equipment determines that the shot object only turns, the electronic equipment can increase a frame number threshold value for exiting a Face AE mode and gradually change an exposure compensation value of a current Face image to 0 in the process before exiting the Face AE mode; in the case where the electronic device determines that the subject leaves the photographing area of the electronic device, the electronic device may decrease the frame number threshold for exiting the Face AE mode and gradually change the exposure compensation value of the current Face image toward 0 in the process before exiting the Face AE mode. Therefore, the stability of the brightness change of the image in the shooting process can be improved, and the user experience is improved.

Description

Exposure adjusting method and related equipment
Technical Field
The present application relates to the field of terminal technologies, and in particular, to an exposure adjustment method and a related device.
Background
At present, in a scene that needs to use an electronic device such as a mobile phone to shoot a face, such as photographing, video recording, video call, etc., when a shot object turns around, for example, when the shot object starts to face a camera of the electronic device (a face image appears), then the shot object faces away from the camera of the electronic device for a short time (the face image disappears), and then the shot object returns to face the camera of the electronic device (the face image appears again), generally, because the brightness of the face image is not consistent with the brightness of a background image, an image in a preview frame of the electronic device frequently has a large brightness change in the process of appearance of the face image, disappearance of the face image, and reappearance of the face image, and user experience is poor.
Disclosure of Invention
The embodiment of the application provides an exposure adjustment method and related equipment, which can comprehensively judge the state of a shot object through a face image and a human body image and optimize the stability of the brightness change of the face image.
In a first aspect, an embodiment of the present application provides an exposure adjustment method, which is applied to an electronic device including a display screen and a camera, and is characterized in that the method includes: the method comprises the steps that electronic equipment displays a preview interface in a display screen, the preview interface displays a first image collected by a camera, the first image has first brightness, the first image comprises a face image and a human body image of a user, and the first brightness is determined based on the brightness of the face image; the electronic equipment displays a second image on a preview interface, and detects that the face image disappears in the second image; the electronic equipment successively displays T third images acquired by the camera on a preview interface, wherein the brightness of the T third images is gradually reduced, T is a positive integer larger than 1, and the size of T is determined by the electronic equipment based on the change trend of the human body image from the first image to the second image.
By providing an exposure adjustment method, the electronic device can comprehensively judge whether a shot object is just turned around (for example, facing away from a camera of the electronic device) or leaves a shooting area of the electronic device by using a Face recognition frame and a human body recognition frame, so as to adjust a frame number threshold for exiting a Face AE mode. Therefore, the stability of the brightness change of the image in the shooting process can be improved, and the user experience is improved.
In one possible implementation, a display screen of an electronic device includes a first display area and a second display area, and the first display area is not overlapped with the second display area. Thus, the specific areas of the human face image and the human body image in the display screen can be determined.
In a possible implementation manner, the electronic device detects that the face image disappears in the second image, and specifically includes:
the electronic equipment detects that the face image is smaller than or equal to a first preset threshold value in a first display area; or the electronic equipment detects that the number of the face characteristic points in the first display area is less than or equal to a second preset threshold. Thus, it can be determined whether or not the face of the subject disappears in the first display area.
In one possible implementation, before the electronic device detects that the face image disappears in the second image, the method further includes: the electronic equipment detects that the face image and the human body image are located in the first display area, and the human body image is larger than a third preset threshold value. Thus, the initial state of the subject can be determined from the face image and the body image.
In a possible implementation manner, the electronic device determines T based on a trend of change of the human body image from the first image to the second image, and specifically includes: the electronic equipment detects that the human body image in the second image is located in the first display area and is larger than a third preset threshold; the electronic device increases the value of T. In this way, it can be further determined from the human body image that the subject turns around only, thereby increasing the threshold of the number of frames exiting the Face AE mode.
In a possible implementation manner, the electronic device determines T based on a variation trend of the human body image from the first image to the second image, and specifically includes: the electronic equipment detects that the human body image in the second image is located in the first display area and is smaller than a third preset threshold value; the electronic device decreases the value of T. In this way, the person can be determined to turn around from the human body image and be far away from the electronic device, thereby reducing the frame number threshold for exiting the Face AE mode.
In a possible implementation manner, the electronic device detects that the face image disappears in the second image, and specifically includes: the electronic equipment detects that the face image is smaller than or equal to a first preset threshold value in a second display area; or the electronic equipment detects that the number of the face characteristic points in the second display area is less than or equal to a second preset threshold value. Thus, it can be determined whether the subject disappears in the second display area.
In one possible implementation manner, before the electronic device detects that the face image disappears in the second image, the method further includes: the electronic equipment detects that the face image and the human body image are located in the second display area. Thus, it can be determined that both the face image and the body image of the subject are in the second display region.
In a possible implementation manner, the electronic device determines T based on a trend of change of the human body image from the first image to the second image, and specifically includes: the electronic equipment detects that the human body image in the second image is located in the second display area; the electronic device decreases the value of T. In this way, it can be determined from the human body image that the subject leaves the shooting area, thereby reducing the threshold for the number of frames to exit the Face AE mode.
In a possible implementation manner, the T third images have gradually decreasing brightness, and specifically include: the brightness of the third image which is smaller than or equal to the tth image in the T third images is first brightness, the brightness of the third image which is larger than the tth image is gradually reduced, and T is a positive integer smaller than T. In this way, the brightness of the T third images may be directly decreased gradually, or may be maintained at the first brightness and then decreased gradually.
In a second aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a display screen and a camera, and the electronic device is configured to: displaying a preview interface in a display screen, wherein the preview interface displays a first image acquired by a camera, the first image has first brightness, the first image comprises a face image and a human body image of a user, and the first brightness is determined based on the brightness of the face image; displaying a second image on a preview interface, and detecting that the face image disappears in the second image; and sequentially displaying T third images acquired by the camera on the preview interface, wherein the brightness of the T third images is gradually reduced, T is a positive integer larger than 1, and the size of T is determined by the electronic equipment based on the change trend of the human body image from the first image to the second image.
In one possible implementation, a display screen of an electronic device includes a first display area and a second display area, and the first display area is not overlapped with the second display area.
In a possible implementation manner, the electronic device is configured to detect that the face image disappears in the second image, and specifically includes: the electronic equipment detects that the face image is smaller than or equal to a first preset threshold value in a first display area; or the electronic equipment detects that the number of the human face characteristic points in the first display area is less than or equal to a second preset threshold value.
In one possible implementation manner, before the electronic device detects that the face image disappears in the second image, the electronic device is further configured to: and detecting that the human face image and the human body image are positioned in the first display area, and the human body image is larger than a third preset threshold value.
In a possible implementation manner, the electronic device is configured to determine T based on a trend of change of the human body image from the first image to the second image, and specifically includes: the electronic equipment is used for detecting that the human body image in the second image is located in the first display area and is larger than a third preset threshold; the electronic device is configured to increase a value of T.
In a possible implementation manner, the electronic device is configured to determine T based on a trend of change of the human body image from the first image to the second image, and specifically includes: the electronic equipment is used for detecting that the human body image in the second image is located in the first display area and is smaller than a third preset threshold value; the electronic device is configured to reduce the value of T.
In a possible implementation manner, the electronic device is configured to detect that the face image disappears in the second image, and specifically includes: the electronic equipment detects that the face image is smaller than or equal to a first preset threshold value in a second display area; or the electronic equipment detects that the number of the face characteristic points in the second display area is less than or equal to a second preset threshold value.
In a possible implementation manner, before the electronic device detects that the face image disappears in the second image, the electronic device is further configured to: and detecting that the face image and the human body image are positioned in the second display area.
In a possible implementation manner, the electronic device is configured to determine T based on a trend of change of the human body image from the first image to the second image, and specifically includes: the electronic equipment is used for detecting that the human body image in the second image is positioned in the second display area; the electronics are configured to reduce the value of T.
In a possible implementation manner, the T third images have gradually decreasing brightness, and specifically include: the brightness of the third image which is smaller than or equal to the tth image in the T third images is the first brightness, the brightness of the third image which is larger than the tth image is gradually reduced, and T is a positive integer smaller than T.
In a third aspect, an embodiment of the present application provides an electronic device, including: a camera, one or more processors, one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories being configured to store computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any one of the possible implementations of the first aspect.
In a fourth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to execute the method in any one of the possible implementation manners of the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer storage medium, where a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed on an electronic device, the electronic device is caused to execute the method in any possible implementation manner of the first aspect.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application;
3A-3B are a set of schematic user interfaces provided by embodiments of the present application;
fig. 3C to fig. 3I are schematic diagrams illustrating region division of a preview frame of an electronic device and possible regions of the preview frame where an image is located according to an embodiment of the present application;
4A-4E are schematic diagrams of another set of user interfaces provided by embodiments of the present application;
fig. 5 is a schematic diagram illustrating cooperation between hardware and software of a part of an electronic device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another electronic device provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; the "and/or" in the text is only an association relation describing the association object, and indicates that three relations may exist, for example, a and/or B may indicate: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
It should be understood that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Currently, in scenes such as taking a picture, recording a video, and making a video call using an electronic device such as a mobile phone, the electronic device generally adjusts the brightness of an image in a preview frame using an Automatic Exposure (AE) algorithm. The AE algorithm can adjust corresponding exposure parameters based on the acquired brightness statistic value of the image in the preview frame by the electronic equipment to obtain proper exposure, so that the brightness of the image in the preview frame reaches a proper value. When a human Face image appears in a preview frame of the electronic device, the electronic device enables an AE algorithm to enter a Face automatic Exposure (Face AE) mode, and the Face AE mode can adjust corresponding Exposure parameters based on a luminance statistic value of the human Face image in the preview frame acquired by the electronic device to obtain a proper Exposure value, so that the luminance of the human Face image in the preview frame reaches a proper value. In the case of backlight, the brightness of the face image is often much lower than that of the background image, and in order to achieve a better image effect, the electronic device generally improves the brightness of the whole image (including the face image, the background image, and the like) in the preview frame, and can allow the background image to be overexposed under the condition that the brightness of the face image is appropriate. After the Face image in the preview frame of the electronic device disappears for a plurality of frames, the electronic device may cause the AE algorithm to exit the Face AE mode and enter the normal AE mode, and in order to adjust the brightness of the over-exposure area in the preview frame, the electronic device may generally reduce the exposure (e.g., reduce the exposure time, reduce the exposure amount, etc.), and recover more image details.
However, in the case that the object to be photographed is quickly turned back again after being quickly turned around, for example, in the case that the object to be photographed starts to face the camera of the electronic device (the face image appears), then quickly faces away from the camera of the electronic device (the face image disappears), and then quickly returns to face the camera of the electronic device (the face image reappears), generally, because the brightness of the face image is not consistent with that of the background image, the electronic device may sequentially perform three switching actions during the process of face image appearance-face image disappearance-face image reappearance: entering the Face AE mode, exiting the Face AE mode, and entering the Face AE mode again, therefore, the image in the preview frame of the electronic device frequently has a large change in brightness, and the user experience is poor. In addition, when the Face image in the preview frame of the electronic device disappears, the electronic device usually adopts a fixed frame number as a frame number threshold for exiting the Face AE mode, for example, the frame number threshold is 10 frames, the electronic device exits the Face AE mode when the 10 th frame image after the frame image where the Face image disappears appears, which may cause that the brightness stability of the image in the preview frame of the electronic device cannot be ensured in the switching process of entering-exiting-entering of the Face AE mode, that is, if the frame number threshold exiting the Face AE mode is relatively large, when the electronic device detects that the image of the object to be photographed disappears in the preview frame, the electronic device cannot make a quick response to realize a quick adjustment of the image brightness in the preview frame; if the frame number threshold of exiting the Face AE mode is smaller, when the electronic equipment detects that the shot object is only rapidly turned and rapidly turned back, the image in the preview frame of the electronic equipment has unnecessary large brightness change, and the user experience is poor.
The embodiment of the application provides an exposure adjustment method, wherein electronic equipment can comprehensively judge whether a shot object only turns around (for example, faces away from a camera of the electronic equipment) or leaves a shooting area of the electronic equipment by using a Face recognition frame and a human body recognition frame, and under the condition that the electronic equipment determines that the shot object only turns around, the electronic equipment can increase a frame number threshold value for exiting a Face AE mode and gradually change an exposure compensation value of a current Face image to 0 in the process before exiting the Face AE mode; in the case where the electronic device determines that the subject leaves the shooting area of the electronic device, the electronic device may decrease the frame number threshold for exiting the Face AE mode, and gradually change the exposure compensation value of the current Face image toward 0 in the process before exiting the Face AE mode. Therefore, the stability of the brightness change of the image in the shooting process can be improved, and the user experience is improved.
The method provided by the embodiment of the application is suitable for various scenes, such as photo preview, video recording, online live broadcast, video call and the like, and is not limited herein.
The following explains the Exposure Compensation (Exposure Compensation) involved in the embodiments of the present application:
exposure compensation is an Exposure control method, which is a process of changing the brightness of a captured image by adjusting (increasing or decreasing) an Exposure Value (EV) when an electronic apparatus captures an image using a camera. Every time the exposure value is increased by 1.0, the amount of the absorbed light is doubled; every 1.0 reduction in exposure corresponds to a doubling of the amount of light taken in. The increased or decreased exposure value is the exposure compensation value. Assuming that the reference exposure value is 0, the exposure value is increased with respect to the reference exposure value, and the exposure compensation value is a positive value; the exposure value decreases, and the exposure compensation value is negative. For example, in a scene of shooting a human face, especially in a backlight situation, the brightness of the human face image is often lower than that of the background image, and in order to increase the brightness of the human face image, the exposure value needs to be increased, and at this time, the exposure compensation value is a positive value. For example, in a scene in which a black object such as a coalball is shot, the exposure value needs to be decreased to obtain a pure black effect, and the exposure compensation value is a negative value.
The electronic device in the embodiment of the present application may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or a special camera (e.g., a single lens reflex camera, a card camera), and the like.
First, a structure of an electronic device 100 provided in an embodiment of the present application is described.
Fig. 1 schematically illustrates a structure of an electronic device 100 provided in an embodiment of the present application.
As shown in fig. 1, the electronic device 100 may include: the mobile terminal includes a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
Wherein the controller may be a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, audio module 170 and wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the method can also be used for connecting a headset and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves via the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, among others. GNSS may include Global Positioning System (GPS), global navigation satellite system (GLONASS), beidou satellite navigation system (BDS), quasi-zenith satellite system (QZSS), and/or Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into a sound signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment 100, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocking and locking the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human body pulse to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor 180M, and the heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
It should be understood that the electronic device 100 shown in fig. 1 is merely an example, and that the electronic device 100 may have more or fewer components than shown in fig. 1, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
A software architecture of an electronic device 100 provided in an embodiment of the present application is described below.
Fig. 2 illustrates a software architecture of an electronic device 100 provided in an embodiment of the present application.
As shown in fig. 2, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 100.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include camera, gallery, setup, call, map, navigation, WLAN, bluetooth, music, video, short message, etc. applications.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including connection, hangup, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can automatically disappear after fast stopping, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary workflow of the software and hardware of the electronic device 100 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, timestamp of the touch operation, and the like). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of the application framework layer, starts the camera application, further starts the camera drive by calling the kernel layer, and captures a still image or a video through the camera 193.
Some exemplary User Interfaces (UIs) provided by the electronic device 100 are described below.
The term "user interface" in the description and claims and drawings of the present application is a media interface for interaction and information exchange between an application or operating system and a user that enables conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in the display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
FIG. 3A illustrates an exemplary user interface 300 on electronic device 100 for exposing applications installed by electronic device 100.
The user interface 300 may include: status bar 301, calendar indicator 302, weather indicator 303, tray 304 with common application icons, navigation bar 305, and other application icons, etc. Wherein:
status bar 301 may include: one or more signal strength indicators 301A for mobile communication signals (which may also be referred to as cellular signals), an operator name (e.g., "china mobile") 301B, one or more signal strength indicators 301C for wireless fidelity (Wi-Fi) signals, a battery status indicator 301D, and a time indicator 301E.
Calendar indicator 302 may be used to indicate the current time, such as the date, day of the week, time division information, and the like.
The weather indicator 303 may be used to indicate a weather type, such as cloudy sunny, light rain, etc., and may also be used to indicate information such as temperature, etc.
The tray 304 with the common application icons may show: phone icon 304A, contact icon 304B, text message icon 304C, camera icon 304D.
Navigation bar 305 may include: a system navigation key such as a back key 305A, a home screen key 305B, a multitasking key 305C, etc. When it is detected that the user clicks the return key 305A, the electronic apparatus 100 may display a page previous to the current page. When the user is detected to click the home screen key 305B, the electronic device 100 may display a home interface. When the user's click on the multi-task key 305C is detected, the electronic device 100 may display the task that was recently opened by the user. The names of the navigation keys can be other keys, and the application does not limit the names. Not limited to virtual keys, each navigation key in the navigation bar 305 may also be implemented as a physical key.
Other application icons may be, for example: an icon 306 for a mailbox, an icon 307 for a memo, an icon 308 for a gallery, and an icon 309 for settings. The user interface 300 may also include a page indicator 310. Other application icons may be distributed across multiple pages and page indicator 310 may be used to indicate which page the user is currently browsing for applications in. The user may slide the area of the other application icons from side to browse the application icons in the other pages.
In some embodiments, the user interface 300 exemplarily shown in fig. 3A may be a Home screen (hoscreen).
In other embodiments, electronic device 100 may also include a home screen key for the entity. The home screen key may be used to receive a user's instruction to return the currently displayed UI to the home interface, which may facilitate the user to view the home screen at any time. The command may be an operation command for the user to press the home screen key once, an operation command for the user to press the home screen key twice in a short time, or an operation command for the user to press the home screen key for a long time. In other embodiments of the present application, the home screen key may also incorporate a fingerprint recognizer for fingerprint acquisition and recognition therewith when the home screen key is pressed.
It is understood that fig. 3A merely illustrates a user interface on the electronic device 100, and should not be construed as a limitation to the embodiments of the present application.
A typical shooting scenario to which the embodiments of the present application relate is described below.
As shown in fig. 3A, the electronic device 100 may detect a touch operation (e.g., a click operation on the camera icon 304D) by the user on the camera icon 304D, and in response to the operation, the electronic device 100 may display the user interface 400 exemplarily shown in fig. 3B. The user interface 400 may be a user interface for a default photography mode of the camera application, and may be used for a user to photograph via a default rear-facing camera. The camera application is an application for image shooting on electronic equipment such as a smart phone and a tablet computer, and the name of the application is not limited in the application. That is, the user may click on the camera icon 304D to open the user interface 400 of the camera application. The default camera is not limited to be a rear camera, and the electronic device 100 may set a front camera as the default camera. That is, after the camera application is opened, the electronic device 100 may display the image captured by the front camera in the preview box 401, which is available for the user to take a picture through the default front camera.
Fig. 3B illustrates one user interface 400 of a camera application on an electronic device such as a smartphone. As shown in fig. 3B, user interface 400 may include: a preview box 401, a setting control 404, a camera mode option 405, a gallery shortcut control 406, a shutter control 407, a camera flip control 408, and a flash control 409. Wherein:
the preview pane 401 may be used to display images captured by the camera in real time. The electronic device 100 may refresh the display content therein in real time to facilitate the user to preview the currently captured image of the camera.
The setting control 404 can be used to adjust parameters for taking pictures (such as resolution, filter, etc.) and turn on or off some modes for taking pictures (such as timed taking, smiling taking, voice-controlled taking, etc.), etc. The setting control 404 may be used to set more other shooting functions, which is not limited in the embodiment of the present application.
One or more shooting mode options may be displayed in the camera mode option 405. The one or more shooting mode options may include: a large aperture mode option 405A, a record mode option 405B, a photograph mode option 405C, a portrait mode option 405D, and a more options 405E. The one or more shooting mode options may appear as textual information on the interface, such as "big aperture", "record", "take", "portrait", "more". Without limitation, the one or more camera options may also appear as icons or other forms of Interactive Elements (IEs) on the interface. When a user operation acting on the photographing mode option is detected, the electronic apparatus 100 may turn on the photographing mode selected by the user. In particular, when a user operation on the more option 405E is detected, the electronic device 100 may further display more other shooting mode options, such as a slow motion shooting mode option, and the like, and may present a richer camera function to the user. Not limited to that shown in fig. 3B, no more options 405E may be displayed in the camera mode options 405, and the user may browse other shooting mode options by sliding left/right in the camera mode options 405.
The gallery shortcut 406 may be used to open a gallery application. In response to a user operation, such as a clicking operation, on the gallery shortcut key 406, the electronic device 100 may open the gallery application. Thus, the user can conveniently view the shot pictures and videos without exiting the camera application program and then starting the gallery application program. The gallery application is an application for managing pictures on electronic devices such as smart phones and tablet computers, and may also be referred to as "albums," and this embodiment does not limit the name of the application. The gallery application may support various operations, such as browsing, editing, deleting, selecting, etc., by the user on the pictures stored on the electronic device 100.
The shutter control 407 may be used to listen for user operations that trigger a photograph. The electronic device 100 may detect a user operation on the shutter control 407, in response to which the electronic device 100 may save the image in the preview box 401 as a picture in the gallery application. In addition, the electronic device 100 may also display thumbnails of the saved images in the gallery shortcut 406. That is, the user may click the shutter control 407 to trigger the taking of a picture. The shutter control 407 may be a button or other form of control.
The camera flip control 408 can be used to listen for user actions that trigger flipping the camera. Electronic device 100 may detect a user operation, such as a click operation, acting on camera flip control 408, in response to which electronic device 100 may flip the camera, such as switching the rear camera to the front camera. At this time, the image captured by the front camera may be displayed in the preview frame 401.
The flash control 409 may be used to turn the flash on or off.
In scenes such as photo preview, video preview or video recording, the electronic device 100 may identify whether the image in the preview frame 401 includes a human face image or a human body image. As shown in fig. 3B, if the electronic device 100 recognizes that the image in the preview frame 401 includes a face image, the electronic device 100 may display a face recognition frame 402 in the preview frame 401, where the face recognition frame 402 may be used to display and recognize the face image acquired by the camera in real time; if the electronic device 100 recognizes that the image in the preview frame 401 includes a human body image, the electronic device 100 may display a human body recognition frame 403 in the preview frame 401, where the human body recognition frame 403 may be used to display and recognize the human body image captured by the camera in real time. Here, the "human body" referred to as the "human body image" may be the entire human body, for example, the upper body and the lower body, or may be a part of the human body, for example, the upper body.
The electronic device 100 may recognize whether the image in the preview box 401 includes a human face image or a human body image in various ways (e.g., feature point matching, etc.). The embodiment of the application does not limit the way of recognizing the face image and the human body image.
For example, for face image recognition, the electronic device 100 may recognize a face image by means of face feature point matching, that is, the electronic device 100 may match some face feature points (e.g., feature points on eyes, nose, lips) of a pre-stored face with feature points of an image in the preview box 401, and if matching is successful, determine that the image in the preview box 401 includes the face image. After the face image is detected, the electronic device 100 may record the position and size of the face image (i.e., the position and size of the face recognition frame 402), and then generate and display the face recognition frame 402.
For another example, for human body image recognition, similar to the recognition of a human face image, the electronic device 100 may also recognize the human body image by means of feature point matching, the human body image recognition is simpler than the human face image recognition, the human body feature point is a basic image contour including contours of a front body, a back body, a side body, and the like, and since the human body feature point is simpler, the sensitivity of recognizing the human body image is higher than that of recognizing the human face image, and especially, the electronic device has obvious advantages in a backlight condition. After detecting the human body image, the electronic device 100 may record the position and size of the human body image (i.e., the position and size of the human body recognition frame 403), and then generate and display the human body recognition frame 403.
Fig. 3C exemplarily shows a center area and an edge area of the preview box 401.
As shown in fig. 3C, the center area (which may also be referred to as a first display area) of preview frame 401 is blank area 401A of fig. 3C, and the edge area (which may also be referred to as a second display area) of preview frame 401 is shaded area 401B of fig. 3C. Wherein, the size of the central region and the size of the edge region may be preset.
In one possible implementation, the electronic device 100 may determine whether the face recognition box 402 (or the human body recognition box 403) is in the center region of the preview box 401 or in the edge region of the preview box 401 by determining the geometric center position of the face recognition box 402 (or the human body recognition box 403). For example, if the geometric center of the face recognition frame 402 is in the center region of the preview frame 401, it indicates that the face recognition frame 402 is in the center region of the preview frame 401, so that the electronic device 100 can determine that the face image is in the center region of the preview frame 401. For another example, if the geometric center of the face recognition frame 402 is in the edge area of the preview frame 401, it indicates that the face recognition frame 402 is in the edge area of the preview frame 401, so that the electronic device 100 can determine that the face image is in the edge area of the preview frame 401.
As shown in fig. 3D, the face image and the body image in the preview frame 401 are the face image and the body image displayed in the user interface shown in fig. 3B, and the face image and the body image can be used as images of the initial state of the photographed object, and it is easy to see that both the face image and the body image are located in the center area of the preview frame 401, but not in the edge area of the preview frame 401. And the electronic device 100 may determine that the human body image is greater than a preset threshold (e.g., pixel area 30 × 40). The central area of the human face image in the preview frame 401 is determined by the electronic device 100 based on the position of the human face recognition frame 402, the central area of the human body image in the preview frame 401 is determined by the electronic device 100 based on the position of the human body recognition frame 403 in the preview frame 401, and the human body image larger than the preset threshold is determined by the electronic device 100 comparing the size of the human body recognition frame 403 with the preset threshold.
The following exemplifies 4 possible situations that the face image and the human body image disappear or appear in the preview box 401:
in case 1, the face image disappears in the center area of the preview frame 401, and the human body image is in the center area of the preview frame 401 and is larger than the preset threshold.
As shown in fig. 3E, as compared to fig. 3D, it is easy to see that the face image disappears in the center area of the preview frame 401, and the human body image remains in the center area of the preview frame 401. And the electronic apparatus 100 still determines that the human body image is greater than the preset threshold.
In case 2, the face image disappears in the center area of the preview frame 401, and the human body image is in the center area of the preview frame 401 and is smaller than the preset threshold.
As shown in fig. 3F, as compared to fig. 3D, it is easy to see that the face image disappears in the center area of the preview frame 401, and the human body image remains in the center area of the preview frame 401. But the electronic apparatus 100 determines that the human body image is smaller than the preset threshold value.
In case 3, the face image disappears in the center area of the preview frame 401, and the human body image is in the edge area of the preview frame 401.
As shown in fig. 3G, as compared to fig. 3D, it is easy to see that the human face image disappears in the center area of the preview frame 401, and the human body image moves from the center area of the preview frame 401 to the edge area of the preview frame 401 because the geometric center of the human body recognition frame 403 is located in the edge area of the preview frame 401.
In case 4, the face image disappears in the edge area of the preview frame 401, and the human body image is in the edge area of the preview frame 401.
As shown in fig. 3H, it is easy to see that the geometric center of the face recognition box 402 and the geometric center of the human body recognition box 403 are both located in the edge region of the preview box 401, so that both the face image and the human body image are located in the edge region of the preview box 401.
As shown in fig. 3I, as compared with fig. 3H, it is easy to see that the face image disappears in the edge area of the preview frame 401, and the human body image remains in the edge area of the preview frame 401.
Table 1 summarizes how the electronic device 100 adjusts the threshold of the frame number exiting from the Face AE mode in the above 4 cases, that is, the electronic device 100 comprehensively determines the state change of the object to be photographed based on the Face recognition frame and the human body recognition frame, and further determines whether to increase or decrease the threshold of the frame number exiting from the Face AE mode, so as to reasonably adjust the brightness of the image.
Figure BDA0003133861930000171
TABLE 1
After the subject is in the initial state (the N-1 th frame image, which may also be referred to as a first image) as shown in fig. 3B, the electronic apparatus 100 may comprehensively determine a state change (the N-th frame image, which may also be referred to as a second image) of the subject using the Face recognition frame and the body recognition frame, for example, determine whether the subject turns around or leaves the shooting area of the electronic apparatus, and further determine whether to increase or decrease the threshold of the number of frames exiting from the Face AE mode, thereby reasonably adjusting the brightness of the image. The following is a detailed description:
fig. 4A to 4E exemplarily show user interfaces for the electronic apparatus 100 to comprehensively determine whether a photographic subject turns around or leaves a photographing area of the electronic apparatus using a face recognition box and a body recognition box in a photographing preview scene.
(1) The electronic device 100 determines that the face image disappears in the center area of the preview frame 401, and the human body image is in the center area of the preview frame 401 and is larger than the preset threshold (i.e. the electronic device 100 determines that the photographed object turns around through the face recognition frame and the human body recognition frame)
Fig. 4A is a schematic view of a user interface corresponding to case 1 shown in fig. 3E.
As shown in fig. 4A, when the electronic device 100 does not recognize the face image shown in fig. 3B in the central area of the preview frame 401 and can also recognize the body image shown in fig. 3B, the electronic device 100 may not display the face recognition frame 402 but only display the body recognition frame 403, and at the same time, the electronic device 100 may compare the size and the position of the body recognition frame 403 shown in fig. 3B with the body recognition frame 403 shown in fig. 4A, and then the electronic device 100 may determine that the size of the body recognition frame 403 shown in fig. 4A is still larger than the preset threshold and still located in the central area of the preview frame 401, so that the electronic device 100 determines that the face image disappears in the central area of the preview frame 401, and the size of the body image is still larger than the preset threshold and still located in the central area of the preview frame 401, in which case the electronic device 100 may determine that the photographed object has turned around by the disappearance in the central area of the face image in the preview frame 401 In addition, the electronic device 100 may also determine that the photographed object is only turning around and is not far away from the electronic device 100 according to that the size of the human body image is still larger than the preset threshold and still located in the central area of the preview frame 401, and then a quick turn-back action may occur. In this way, the electronic apparatus 100 comprehensively determines, based on the face recognition box 402 and the body recognition box 403, that the action of the subject is: only turn around (i.e. the face image disappears in the center area of the preview frame 401, and the human body image is in the center area of the preview frame 401 and is greater than the preset threshold).
Thereafter, the electronic apparatus 100 may save the exposure compensation value of the Face image shown in fig. 3B and increase the frame number threshold for exiting the Face AE mode, while the electronic apparatus 100 may gradually change the saved exposure compensation value of the Face image shown in fig. 3B toward 0 in the process before exiting the Face AE mode. In this way, when the electronic device 100 determines that the object is merely a turn, the electronic device 100 can realize smooth and stable change of the image brightness, and avoid occurrence of an unnecessarily large change of the image brightness.
Assuming that the image frame shown in fig. 4A is the nth frame and the frame number threshold for exiting the Face AE mode is increased to be a (a is a positive integer greater than 1), the electronic apparatus 100 exits the Face AE mode after the N + a frame. The electronic device 100 may gradually change the stored exposure compensation value of the face image shown in fig. 3B to 0 starting at the N + a-th frame, where a is a natural number, and a is greater than or equal to 0 and less than a. It is easy to understand that, in the case where a is 0, the electronic device 100 starts to gradually change the stored exposure compensation value of the face image shown in fig. 3B toward 0 in the nth frame; if a >0, for example, a is 2, the electronic device 100 keeps the exposure compensation value of the stored face image shown in fig. 3B unchanged at the nth frame and the N +1 th frame, and starts gradually changing the exposure compensation value of the stored face image shown in fig. 3B to 0 at the N +2 th frame.
The gradual change of the exposure compensation value of the face image to 0 may be a linear change or a non-linear change, which is not limited in the embodiment of the present application.
(2) The electronic device 100 determines that the face image disappears in the center area of the preview frame 401 and the human body image is in the center area of the preview frame 401 and is smaller than the preset threshold (i.e. the electronic device 100 determines that the photographed object turns around and is far away from the electronic device 100 through the face recognition frame and the human body recognition frame)
Fig. 4B is a schematic view of a user interface corresponding to case 2 shown in fig. 3F.
As shown in fig. 4B, when the electronic device 100 does not recognize the face image shown in fig. 3B in the center area of the preview frame 401, and may also recognize the body image shown in fig. 3B in the center area of the preview frame 401, the electronic device 100 may not display the face recognition frame 402 any more, but only display the body recognition frame 403, and at the same time, the electronic device 100 may compare the size and the position of the body recognition frame 403 shown in fig. 3B with the body recognition frame 403 shown in fig. 4B, and thereafter, the electronic device 100 may determine that the size of the body recognition frame 403 shown in fig. 4B is smaller than the preset threshold value compared to fig. 3B and still located in the center area of the preview frame 401, so that the electronic device 100 determines that the face image disappears in the center area of the preview frame 401, the size of the body image is smaller than the preset threshold value and still located in the center area of the preview frame 401, in this case, the electronic device 100 may determine that the subject has turned around by the face image disappearing in the center area of the preview frame 401, and the electronic device 100 may also determine that the subject has turned away from the electronic device 100 by the human body image having a size smaller than the preset threshold and still being located in the center area of the preview frame 401. In this way, the electronic apparatus 100 comprehensively determines, based on the face recognition box 402 and the body recognition box 403, that the action of the subject is: after turning, the user is far away from the electronic device 100 (i.e., the face image disappears in the center area of the preview frame 401, and the human body image is in the center area of the preview frame 401 and is smaller than the preset threshold).
After the electronic apparatus 100 determines that the subject turns around and moves away from the electronic apparatus 100, the electronic apparatus 100 may save the exposure compensation value of the Face image shown in fig. 3B and decrease the frame number threshold for exiting the Face AE mode, and at the same time, the electronic apparatus 100 may gradually change the saved exposure compensation value of the Face image shown in fig. 3B toward 0 in the process before exiting the Face AE mode. In this way, when the electronic device 100 determines that the photographed object is far away from the electronic device 100 after turning around, the electronic device 100 can realize smooth and stable change of the image brightness, and avoid occurrence of unnecessary and large-scale change of the image brightness.
Assuming that the image frame shown in fig. 4B is the nth frame and the frame number threshold for exiting the Face AE mode is reduced to B (B is a positive integer greater than 1), the electronic apparatus 100 exits the Face AE mode after the N + B frame. The electronic device 100 may gradually change the stored exposure compensation value of the face image shown in fig. 3B to 0 at the N + B th frame, where B is a natural number, and B is greater than or equal to 0 and less than B. It is easy to understand that, in the case where B is 0, the electronic apparatus 100 starts to gradually change the stored exposure compensation value of the face image shown in fig. 3B toward 0 immediately after the nth frame; if B >0, for example, if B is 2, the electronic device 100 keeps the exposure compensation value of the stored face image shown in fig. 3B unchanged at the nth frame and the N +1 th frame, and starts gradually changing the exposure compensation value of the stored face image shown in fig. 3B to 0 at the N +2 th frame.
The gradual change of the exposure compensation value of the face image to 0 may be a linear change or a non-linear change, which is not limited in the embodiment of the present application.
(3) The electronic device 100 judges that the object leaves the shooting area of the electronic device 100 through the face recognition frame and the human body recognition frame
The electronic device 100 determines that the object leaves the shooting area of the electronic device 100 through the face recognition frame and the body recognition frame, and the following two cases are considered, which are described in detail below:
the first condition is as follows: the face image disappears in the center area of the preview frame 401, and the body image disappears in the edge area of the preview frame 401 fig. 4C is a schematic view of the user interface corresponding to case 3 shown in fig. 3G.
As shown in fig. 4C, when the electronic device 100 does not recognize the face image shown in fig. 3B in the center area of the preview frame 401 and can recognize the body image shown in fig. 3B in the edge area of the preview frame 401, the electronic device 100 may not display the face recognition frame 402 any more but display only the body recognition frame 403, and thus, the electronic device 100 determines that the face image disappears in the center area of the preview frame 401 and the body image moves from the center area of the preview frame 401 to the edge area of the preview frame 401. In this case, the electronic apparatus 100 may determine that the subject has turned around by the face image disappearing in the center area of the preview frame 401, and the electronic apparatus 100 may also determine that the subject may leave the photographing area of the electronic apparatus 100 by the human body image moving from the center area of the preview frame 401 to the edge area of the preview frame 401. In this way, the electronic apparatus 100 comprehensively determines, based on the face recognition box 402 and the body recognition box 403, that the action of the subject is: after turning, the user may leave the shooting area of the electronic device 100 (i.e., the face image disappears in the center area of the preview frame 401, and the body image is in the edge area of the preview frame 401).
After the electronic device 100 determines that the subject may leave the shooting area of the electronic device 100 after turning around, the electronic device 100 may save the exposure compensation value of the Face image shown in fig. 3B and decrease the frame number threshold for exiting the Face AE mode, and meanwhile, during the process before exiting the Face AE mode, the electronic device 100 may gradually change the saved exposure compensation value of the Face image shown in fig. 3B toward 0. In this way, when the electronic device 100 determines that the photographed object may leave the photographing area of the electronic device 100 after turning around, the electronic device 100 may implement smooth and stable change of the image brightness, and avoid an unnecessary and large change of the image brightness.
Assuming that the image frame shown in fig. 4C is the nth frame and the frame number threshold for exiting the Face AE mode is reduced to C (C is a positive integer greater than 1), the electronic apparatus 100 exits the Face AE mode after the N + C frame. The electronic device 100 may gradually change the saved exposure compensation value of the face image shown in fig. 3B to 0 starting at the N + C-th frame, where C is a natural number, and C is greater than or equal to 0 and less than C. It is easy to understand that, in the case where c is 0, the electronic apparatus 100 starts to gradually change the stored exposure compensation value of the face image shown in fig. 3B toward 0 immediately after the nth frame; if c >0, for example, c is 2, the electronic device 100 keeps the exposure compensation value of the stored face image shown in fig. 3B unchanged at the nth frame and the N +1 th frame, and starts gradually changing the exposure compensation value of the stored face image shown in fig. 3B to 0 at the N +2 th frame.
The gradual change of the exposure compensation value of the face image to 0 may be a linear change or a non-linear change, which is not limited in the embodiment of the present application.
And a second condition: the human face image disappears in the edge area of the preview frame 401, and the human body image disappears in the edge area of the preview frame 401
Fig. 4D is a schematic diagram of the user interface of the edge area of the preview frame 401 where the face image and the body image corresponding to fig. 3H are located.
As shown in fig. 4D, the electronic device 100 may recognize a face image and a body image in an edge region of the preview frame 401 and display a face recognition frame 402 and a body recognition frame 403 in the edge region of the preview frame 401, so that the electronic device 100 determines that both the face image and the body image are located in the edge region of the preview frame 401.
FIG. 4E is a schematic view of a user interface corresponding to scenario 4 shown in FIG. 3I.
Assume that the image frame shown in fig. 4D is the M-1 th frame and the image frame shown in fig. 4E is the M-th frame. As shown in fig. 4E, when the electronic device 100 does not recognize the face image shown in fig. 4D in the edge area of the preview frame 401 and can recognize the human body image shown in fig. 4D in the edge area of the preview frame 401, the electronic device 100 may not display the face recognition frame 402 any more but only display the human body recognition frame 403, so that the electronic device 100 determines that the face image disappears in the edge area of the preview frame 401 and the human body image is still located in the edge area of the preview frame 401. In this case, the electronic apparatus 100 may determine that the subject has turned around by the face image disappearing in the edge area of the preview frame 401, and the electronic apparatus 100 may also determine that the subject has moved away from the photographing area of the electronic apparatus 100 by the human body image remaining in the edge area of the preview frame 401. In this way, the electronic apparatus 100 comprehensively determines, based on the face recognition box 402 and the body recognition box 403, that the action of the subject is: after turning, the person may leave the shooting area of the electronic device 100 (i.e., the face image disappears in the edge area of the preview frame 401, and the body image disappears in the edge area of the preview frame 401).
After the electronic device 100 determines that the photographed object may leave the photographing area of the electronic device 100 after turning around, the electronic device 100 may save the exposure compensation value of the Face image shown in fig. 4D and decrease the frame number threshold for exiting the Face AE mode, and meanwhile, in the process before exiting the Face AE mode, the electronic device 100 may gradually change the saved exposure compensation value of the Face image shown in fig. 4D toward 0. In this way, when the electronic device 100 determines that the photographed object may leave the photographing area of the electronic device 100 after turning around, the electronic device 100 may implement smooth and stable change of the image brightness, and avoid an unnecessary and large change of the image brightness.
Assuming that the image frame shown in fig. 4E is the mth frame and the frame number threshold for exiting the Face AE mode is reduced to E (E is a positive integer greater than 1), the electronic apparatus 100 exits the Face AE mode after the M + E frame. The electronic device 100 may gradually change the stored exposure compensation value of the face image shown in fig. 4D to 0 at the M + E-th frame, where E is a natural number, and E is greater than or equal to 0 and less than E. It is easy to understand that, in the case where e is equal to 0, the electronic device 100 starts to gradually change the stored exposure compensation value of the face image shown in fig. 4D toward 0 immediately after the mth frame; if e >0, for example, if e is 2, the electronic device 100 keeps the exposure compensation value of the stored face image shown in fig. 4D unchanged at the mth frame and the M +1 frame, and starts to gradually change the exposure compensation value of the stored face image shown in fig. 4D to 0 at the M +2 frame.
The gradual change of the exposure compensation value of the face image to 0 may be a linear change or a non-linear change, which is not limited in the embodiment of the present application.
In the embodiment of the present application, the exposure adjustment method is described by taking only one face as an example, and is not limited thereto, and the method provided in the embodiment of the present application is also applicable to scenes with a plurality of faces. For example, the electronic device 100 may perform the above method based on the largest one of the faces in the preview frame, so as to achieve smooth and stable change of the image brightness and avoid occurrence of unnecessarily large change of the image brightness.
In the embodiment of the present application, the third image may refer to an image captured by the camera after the second image is displayed and before the Face AE mode exits, and T may refer to a frame number threshold of the exit Face AE mode after increasing or decreasing.
In this embodiment of the application, "disappear" may mean that the electronic device 100 detects that the number of the human face feature points in the center area or the edge area of the preview frame is less than or equal to a first preset threshold, or that the electronic device 100 detects that the number of the human face feature points in the center area or the edge area of the preview frame is less than or equal to a second preset threshold. For example, in the foregoing embodiment, when the subject is in a turning state, the electronic device 100 may detect that the size of the face image (or the size of the face recognition frame) is 0 or the number of the face feature points is 0.
In the embodiment of the present application, the fact that the human body image is greater than or less than the preset threshold means that the human body image is greater than or less than the preset threshold (also referred to as a third preset threshold).
From the perspective of software and hardware cooperation of the electronic device, a specific implementation of the embodiments in fig. 3B and fig. 4A to fig. 4E is described below with reference to fig. 5.
As shown in fig. 5, the camera is used for collecting an image, when the reflected light of the object passes through the lens, is refracted on the lens, and then converges on the image sensor, the image sensor can convert the optical image into an analog electrical signal, and then the analog electrical signal is output through the digital-to-analog converter to output an original digital image collected by the camera.
The image signal processor ISP may include a face detection module, a human body detection module, an AE module, a luminance statistics module, an I/O control interface, and the like. The ISP is used for carrying out relevant processing on the original digital image from the camera to generate an image to be displayed and sending the image to the display screen for displaying.
The display screen is used for receiving the image to be displayed sent by the ISP, and may also monitor various operations of the user on the display screen through the UI (e.g., monitoring a touch operation of the user on the camera icon 304D in fig. 3A, etc.).
Specific implementations of the embodiments of fig. 3B, 4A-4E are described in detail below:
in a shooting preview scene, a display screen displays a preview interface, and a preview frame in the preview interface is used for displaying images acquired by a camera.
(1) The specific implementation of the embodiment of fig. 3B:
the camera can respectively send the original digital image to a face detection module, a human body detection module, an AE module and a brightness statistic module of the ISP. After receiving the original digital image, the face detection module can detect whether a face image exists in the image, and if the face image exists, the face detection module can send face image information (including the position and size of the face image) to the AE module. Meanwhile, after receiving the original digital image, the human body detection module can detect whether a human body image exists in the image, and if the human body image exists, the human body detection module can send human body image information (including the position and the size of the human body image) to the AE module. The AE module can send the received Face image information to the brightness statistics module and enter a Face AE mode, the brightness statistics module can count the brightness of a Face image area based on the Face image information and send the brightness information of the Face image after brightness statistics to the AE module, the AE module can adjust the brightness of the image based on the brightness information of the Face image after brightness statistics and by combining with human body image information, and send the image after brightness adjustment to a display screen through an I/O control interface.
(2) Specific implementations of the embodiments of fig. 4A-4E:
on the basis of the image shown in fig. 3B, if the Face detection module detects that the Face image disappears, the AE module may adjust the frame number threshold for exiting the Face AE mode based on the human body image information and gradually change the exposure compensation value of the Face image shown in fig. 3B to 0 in the process before exiting the Face AE mode.
If the human body image is located in the central area of the preview frame and is larger than the preset threshold, the AE module can increase the threshold of the number of frames exiting the Face AE mode, and if the human body image is located in the edge area of the preview frame or the central area of the preview frame is smaller than the preset threshold, the AE module can reduce the threshold of the number of frames exiting the Face AE mode.
In the process before exiting the Face AE mode, the exposure compensation value of the Face image area shown in fig. 3B gradually changes to 0, that is, the brightness of the Face image area shown in fig. 3B gradually changes, and the AE module may send the image with gradually changing brightness to the display screen through the I/O control interface.
That is to say, the electronic device can judge the change of the position and size of the image of the photographed object in the preview frame by combining the face detection module and the human body detection module, and reasonably adjust the brightness of the image by the AE module, thereby realizing the smooth and stable change of the brightness of the image and avoiding the unnecessary large change of the brightness of the image.
Next, another structure of the electronic device 100 provided in the embodiment of the present application is described.
Fig. 6 exemplarily shows a structure of another electronic apparatus 100 provided in the embodiment of the present application.
As shown in fig. 6, electronic device 100 may include one or more processors 601, memory 602.
The memory 602 is coupled to the one or more processors 601, and the memory 602 may be used to store computer program code, which may include computer instructions.
The one or more processors 601 may be used to invoke the above-described computer instructions to cause the electronic device to perform the exposure adjustment methods in the above-described embodiments.
For example, the processor 601 may use the Face recognition frame and the human body recognition frame to comprehensively determine whether the subject is turning fast (for example, facing away from the camera of the electronic device) or leaving the shooting area of the electronic device, so as to further adjust the frame number threshold for exiting the Face AE mode, and gradually change the exposure compensation value of the current Face image toward 0 in the process before exiting the Face AE mode.
For more details on the functions and working principles of the electronic device 100, reference may be made to the relevant contents in the above embodiments, which are not described herein again.
It should be understood that the electronic device 100 shown in fig. 6 is merely an example, and that the electronic device 100 may have more or fewer components than shown in fig. 6, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 6 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The embodiment of the present application further provides a computer storage medium, which includes computer instructions, and when the computer instructions are run on an electronic device, the electronic device is caused to execute the exposure adjustment method in the foregoing embodiment.
Embodiments of the present application further provide a computer program product, which, when run on a computer, causes the computer to execute the exposure adjustment method in the above embodiments.
It is understood that the electronic device includes hardware structures and/or software modules for performing the functions in order to realize the functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed in hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
In the embodiment of the present application, the electronic device and the like may be divided into functional modules according to the method example, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only one logic function division, and another division manner may be available in actual implementation.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a 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 stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. An exposure adjustment method is applied to electronic equipment comprising a display screen and a camera, and is characterized by comprising the following steps of:
the electronic equipment displays a preview interface in the display screen, the preview interface displays a first image collected by the camera, the first image has first brightness, the first image comprises a face image and a human body image of a user, and the first brightness is determined based on the brightness of the face image;
after the electronic equipment displays the first image on the preview interface, the electronic equipment displays a second image on the preview interface, and detects that the face image disappears in the second image, and the second image comprises the human body image;
after the electronic equipment displays the second image on the preview interface, the electronic equipment successively displays T third images acquired by the camera on the preview interface, wherein the brightness of the T third images is gradually reduced, T is a positive integer greater than 1, the value of T is increased or decreased by the electronic equipment based on the change trend of the human body image from the first image to the second image, and the change trend comprises the change trend of the size of the human body image from the first image to the second image; and the size of the human body image is larger than a preset threshold value in the first image and the second image, and the human body image is positioned in the central area of the preview interface in the first image and the second image, so that the value of the T is increased.
2. The method of claim 1, wherein the display screen of the electronic device comprises a first display area and a second display area, wherein the first display area is not coincident with the second display area, wherein the first display area is a center area of the preview interface, and wherein the second display area is an edge area of the preview interface.
3. The method according to claim 2, wherein the electronic device detects that the face image disappears in the second image, and specifically includes:
the electronic equipment detects that the size of the face image in the first display area is smaller than or equal to a first preset threshold;
or the like, or, alternatively,
the electronic equipment detects that the number of the human face characteristic points in the first display area is smaller than or equal to a second preset threshold value.
4. The method of claim 3, wherein before the electronic device detects that the face image disappears in the second image, the method further comprises:
the electronic equipment detects that the face image and the human body image are located in the first display area, and the size of the human body image is larger than a third preset threshold value.
5. The method according to claim 4, wherein the increasing, by the electronic device, the value of T based on the trend of change of the human body image from the first image to the second image specifically includes:
the electronic equipment detects that the human body image in the second image is located in the first display area, and the size of the human body image is larger than the third preset threshold;
and the electronic equipment increases the value of the T.
6. The method according to claim 4, wherein the electronic device decreases the value of T based on a trend of change of the human body image from the first image to the second image, and specifically includes:
the electronic equipment detects that the human body image in the second image is located in the first display area, and the size of the human body image is smaller than the third preset threshold;
and the electronic equipment reduces the value of the T.
7. The method according to claim 2, wherein the electronic device detects that the face image disappears in the second image, and specifically includes:
the electronic equipment detects that the size of the face image in the second display area is smaller than or equal to the first preset threshold;
or the like, or, alternatively,
the electronic equipment detects that the number of the face characteristic points in the second display area is smaller than or equal to a second preset threshold value.
8. The method of claim 7, wherein before the electronic device detects that the face image disappears in the second image, the method further comprises:
the electronic equipment detects that the face image and the human body image are located in the second display area.
9. The method according to claim 8, wherein the electronic device decreases the value of T based on a trend of change of the human body image from the first image to the second image, and specifically includes:
the electronic equipment detects that the human body image in the second image is located in the second display area;
and the electronic equipment reduces the value of the T.
10. The method according to any one of claims 1 to 9, wherein the T third images have a gradually decreasing brightness, in particular comprising:
the brightness of the third image smaller than or equal to the tth image in the T third images is the first brightness, and the brightness of the third image larger than the tth image is gradually reduced, wherein T is a positive integer smaller than T.
11. An electronic device, comprising: a camera, one or more processors, one or more memories; wherein one or more memories are coupled to the one or more processors for storing computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-10.
12. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-10.
CN202110716784.8A 2021-06-25 2021-06-25 Exposure adjusting method and related equipment Active CN113891009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110716784.8A CN113891009B (en) 2021-06-25 2021-06-25 Exposure adjusting method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110716784.8A CN113891009B (en) 2021-06-25 2021-06-25 Exposure adjusting method and related equipment

Publications (2)

Publication Number Publication Date
CN113891009A CN113891009A (en) 2022-01-04
CN113891009B true CN113891009B (en) 2022-09-30

Family

ID=79010525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110716784.8A Active CN113891009B (en) 2021-06-25 2021-06-25 Exposure adjusting method and related equipment

Country Status (1)

Country Link
CN (1) CN113891009B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114052913B (en) * 2022-01-17 2022-05-17 广东欧谱曼迪科技有限公司 AR (augmented reality) fluorescence surgery navigation system and method
CN114120431B (en) * 2022-01-27 2022-06-28 荣耀终端有限公司 Face recognition method, medium and electronic equipment
CN115294676B (en) * 2022-07-08 2024-03-19 重庆甲智甲创科技有限公司 Face recognition unlocking method and face recognition unlocking device
CN117714842A (en) * 2023-07-10 2024-03-15 荣耀终端有限公司 Image exposure control method, device, system, electronic equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327814A (en) * 2018-12-17 2020-06-23 华为技术有限公司 Image processing method and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4639271B2 (en) * 2005-12-27 2011-02-23 三星電子株式会社 camera
JP2012103979A (en) * 2010-11-11 2012-05-31 Sanyo Electric Co Ltd Image processing apparatus
CN105516589B (en) * 2015-12-07 2018-07-03 凌云光技术集团有限责任公司 Intelligent exposure method and system based on recognition of face
CN107241558B (en) * 2017-06-16 2019-07-19 Oppo广东移动通信有限公司 Exposure processing method, device and terminal device
CN110913147B (en) * 2018-09-14 2021-06-22 浙江宇视科技有限公司 Exposure adjusting method and device and electronic equipment
EP3654236A3 (en) * 2018-10-25 2020-08-26 Canon Kabushiki Kaisha Information processing apparatus, control method of information processing apparatus, storage medium, and imaging system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327814A (en) * 2018-12-17 2020-06-23 华为技术有限公司 Image processing method and electronic equipment

Also Published As

Publication number Publication date
CN113891009A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN110401766B (en) Shooting method and terminal
CN110506416B (en) Method for switching camera by terminal and terminal
CN110381282B (en) Video call display method applied to electronic equipment and related device
CN110231905B (en) Screen capturing method and electronic equipment
KR102577396B1 (en) Recording frame rate control method and related devices
CN112887583B (en) Shooting method and electronic equipment
CN113891009B (en) Exposure adjusting method and related equipment
CN114816209A (en) Full screen display method and device of mobile terminal
CN112532892B (en) Image processing method and electronic device
CN109857401B (en) Display method of electronic equipment, graphical user interface and electronic equipment
WO2023273323A1 (en) Focusing method and electronic device
WO2022262475A1 (en) Image capture method, graphical user interface, and electronic device
CN113170037A (en) Method for shooting long exposure image and electronic equipment
WO2023241209A1 (en) Desktop wallpaper configuration method and apparatus, electronic device and readable storage medium
WO2021042878A1 (en) Photography method and electronic device
CN112150499A (en) Image processing method and related device
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN115967851A (en) Quick photographing method, electronic device and computer readable storage medium
CN113746961A (en) Display control method, electronic device, and computer-readable storage medium
WO2021037034A1 (en) Method for switching state of application, and terminal device
CN112532508B (en) Video communication method and video communication device
CN113542574A (en) Shooting preview method under zooming, terminal, storage medium and electronic equipment
CN113438366A (en) Information notification interaction method, electronic device and storage medium
CN113923372B (en) Exposure adjusting method and related equipment
CN113497888A (en) Photo preview method, electronic device and storage medium

Legal Events

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