A camera control method, electronic device and computer storage medium

CN122934050APending Publication Date: 2026-10-16SHENZHEN TECNO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510406366.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]针对上述技术问题,本申请提供一种相机控制方法、电子设备及计算机存储介质,解决了第三方相机应用中拍摄场景逆光且存在人像时,画面中人像偏暗,看不清人脸的问题,平衡了人脸检测的帧率与自动曝光参数调整的速率,降低了人脸自动曝光算法的耗电量,提升了设备续航时长,进而提升了用户使用体验

Benefits of technology

[0028] As described above, the camera control method of this application includes: acquiring face data based on a low frame rate face detection strategy in response to meeting low power processing conditions; and adjusting automatic face exposure parameters based on the face data. This technical solution, when meeting low power processing conditions, acquires face data based on a low frame rate face detection strategy, and then adjusts the automatic face exposure parameters based on the face data. This facilitates automatic face exposure processing based on the face data of the current data frame, solving the problem in third-party camera applications where the image is dark and faces are unclear in backlit scenes with people present. It balances the frame rate of face detection with the rate of automatic exposure parameter adjustment, reduces the power consumption of the automatic face exposure algorithm, improves device battery life, and thus enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122934050A_ABST
    Figure CN122934050A_ABST
Patent Text Reader

Abstract

The application provides a camera control method, an electronic device and a computer storage medium. The method comprises the following steps: in response to meeting a low-power processing condition, obtaining face data based on a low-frame-rate face detection strategy; and adjusting a face automatic exposure parameter according to the face data. According to the technical scheme, when the low-power processing condition is met, the face data is obtained based on the low-frame-rate face detection strategy, and then the face automatic exposure parameter is adjusted according to the face data, so that the face is automatically exposed according to the face data of the current data frame, the problem that the portrait is dark and the face cannot be seen in the picture when the shooting scene is backlight and there is a portrait in the third-party camera application is solved, the frame rate of face detection and the rate of automatic exposure parameter adjustment are balanced, the power consumption of the face automatic exposure algorithm is reduced, the device endurance time is prolonged, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of camera control technology, specifically to a camera control method, electronic device, and computer storage medium. Background Technology

[0002] Facial recognition is a biometric technology that identifies individuals based on their facial features. It involves using cameras or webcams to capture images or video streams containing faces, automatically detecting and tracking faces within the images, and then performing facial recognition. With the widespread application of facial recognition technology, cameras with facial recognition capabilities have emerged. Automatic face exposure algorithms are one of the most basic image processing algorithms for cameras. In related technologies, the application layer needs to actively call the relevant APIs for face detection and manually enable the face detection node of the face detection module. When third-party camera developers do not actively enable the system's face detection module (commonly seen when third-party cameras use self-developed customized face detection algorithms and do not call the system's face detection function), the corresponding automatic face exposure capability in the system cannot be enabled. This results in darker images in backlit scenes, leading to poor display quality and significantly reducing the user's imaging experience with third-party cameras other than the system camera, especially for users with darker skin tones. Furthermore, excessively high frame rates for face detection increase device power consumption and reduce battery life, thus affecting the user experience. Summary of the Invention

[0003] To address the aforementioned technical issues, this application provides a camera control method, electronic device, and computer storage medium. These methods solve the problem in third-party camera applications where, in backlit scenes with human figures, the human figures in the image are too dark to be clearly seen. The method balances the frame rate of face detection with the rate of automatic exposure parameter adjustment, reduces the power consumption of the automatic face exposure algorithm, improves the device's battery life, and thus enhances the user experience.

[0004] To address the aforementioned technical problems, this application provides a camera control method, comprising:

[0005] In response to meeting low-power processing requirements, face data is acquired based on a low-frame-rate face detection strategy;

[0006] Adjust the automatic face exposure parameters based on facial data.

[0007] Optionally, the method further includes:

[0008] If the low-power processing conditions are not met, acquire face data based on a high frame rate face detection strategy, or disable the face detection function.

[0009] Optionally, the low-power processing conditions include at least one of the following:

[0010] Received a manual setting message to set the camera's face detection value to the first preset value;

[0011] Manual settings information for not receiving face detection values ​​from the camera;

[0012] Received manual setting information that the camera's face detection value is not the second preset value and / or not the third preset value.

[0013] Optionally, the low frame rate face detection strategy includes at least one of the following:

[0014] In response to receiving the current data frame, if the current average ambient light brightness value is within the preset brightness range, face detection is performed on the current data frame to obtain face data;

[0015] Based on the current data frame and the average time interval between two adjacent data frames, obtain the next data frame to be processed.

[0016] Based on the difference in average ambient light brightness between the current data frame and the next data frame to be processed, and / or the change value of the face region, adjust the time interval between the next data frame to be processed and the subsequent data frames to be processed.

[0017] Optionally, based on the current data frame and the average time interval between two adjacent data frames, the next data frame to be processed is obtained, including:

[0018] The time value of the next data frame to be processed must be no less than the sum of the time value of the current data frame and the dynamic time interval, where the dynamic time interval is the product of the average time interval and the weight coefficient.

[0019] Optionally, in response to receiving the current data frame, if the current average ambient light brightness value is within a preset brightness range, face detection is performed on the current data frame to obtain face data, including:

[0020] If no face data is detected in the current data frame, the weight coefficient is reset to the initial level.

[0021] Optionally, based on the difference in average ambient light brightness between the current data frame and the next data frame to be processed, and / or the change value of the face region, the time interval between the next data frame to be processed and subsequent data frames to be processed is adjusted, including:

[0022] If the average brightness difference of ambient light is less than the preset brightness change threshold, and / or the change value of the face region is less than the preset coordinate change threshold, then the index of the weight coefficient is updated in a cyclical order, and the next weight coefficient is selected.

[0023] Otherwise, reset the weighting coefficients to the initial level.

[0024] Optionally, the method further includes:

[0025] Set the automatic face exposure parameters of the data frames between the current data frame and the next data frame to be processed to the automatic face exposure parameters of the current data frame.

[0026] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the camera control method as described in any of the preceding claims.

[0027] This application also provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of the camera control method as described in any of the preceding claims.

[0028] As described above, the camera control method of this application includes: acquiring face data based on a low frame rate face detection strategy in response to meeting low power processing conditions; and adjusting automatic face exposure parameters based on the face data. This technical solution, when meeting low power processing conditions, acquires face data based on a low frame rate face detection strategy, and then adjusts the automatic face exposure parameters based on the face data. This facilitates automatic face exposure processing based on the face data of the current data frame, solving the problem in third-party camera applications where the image is dark and faces are unclear in backlit scenes with people present. It balances the frame rate of face detection with the rate of automatic exposure parameter adjustment, reduces the power consumption of the automatic face exposure algorithm, improves device battery life, and thus enhances the user experience. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0030] Figure 1 A schematic diagram of the hardware structure of a mobile terminal to implement the various embodiments of this application.

[0031] Figure 2 This is a communication network system architecture diagram provided for an embodiment of this application.

[0032] Figure 3 This is a schematic flowchart illustrating the camera control method in an embodiment of this application.

[0033] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0034] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0035] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0036] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if," as used herein, may be interpreted as "when," "when," or "in response to determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms "comprising," "including," indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or," "and / or," "including at least one of the following," etc., as used in this application, may be interpreted as inclusive, or mean any one or any combination thereof. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Similarly, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Exceptions to this definition only occur when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0037] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0038] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0039] It should be noted that step designations such as S101 and S102 are used in this document for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order. In specific implementation, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the protection scope of this application.

[0040] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0041] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0042] Electronic devices can be implemented in various forms. For example, the electronic devices described in this application may include electronic devices such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs and desktop computers.

[0043] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to the embodiments of this application can also be applied to fixed-type terminals.

[0044] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of this application. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0045] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:

[0046] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G, and 6G.

[0047] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.

[0048] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0049] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other computer storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0050] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0051] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0052] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Optionally, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands sent by processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Optionally, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being specifically limited here.

[0053] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.

[0054] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.

[0055] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. Optionally, the program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0056] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. Optionally, the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0057] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0058] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

[0059] To facilitate understanding of the embodiments of this application, the communication network system on which the mobile terminal of this application is based is described below.

[0060] Please see Figure 2 , Figure 2 This application provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.

[0061] Optionally, UE201 can be the aforementioned terminal 100, which will not be described in detail here.

[0062] E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. Optionally, eNodeB2021 can connect to other eNodeB2022 via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203, providing access from UE201 to EPC203.

[0063] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Optionally, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as the Home Location Register (not shown in the figure) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).

[0064] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.

[0065] Although the above description uses the LTE system as an example, those skilled in the art should know that this application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G and future new network systems (such as 6G), etc., without limitation.

[0066] Based on the above-described mobile terminal hardware structure and communication network system, various embodiments of this application are proposed.

[0067] Reference Figure 3 , Figure 3 This is a flowchart illustrating a camera control method according to an embodiment of this application. The camera control method of this application embodiment can be applied to electronic devices (such as mobile phones) and includes the following steps S101 and S102:

[0068] Step S101: In response to meeting the low-power processing conditions, acquire face data based on the low frame rate face detection strategy;

[0069] Step S102: Adjust the automatic face exposure parameters based on the face data.

[0070] Specifically, if facial information is detected, the facial data is sent to the automatic facial exposure algorithm, which adjusts the automatic facial exposure parameters based on information such as facial pixels, color, and brightness.

[0071] Optionally, the method further includes:

[0072] If the low-power processing conditions are not met, acquire face data based on a high frame rate face detection strategy, or disable the face detection function.

[0073] Optionally, the low-power processing conditions include at least one of the following:

[0074] Received a manual setting message to set the camera's face detection value to the first preset value;

[0075] Manual settings information for not receiving face detection values ​​from the camera;

[0076] Received manual setting information that the camera's face detection value is not the second preset value and / or not the third preset value.

[0077] Optionally, the face detection value of the camera can refer to the value of the CaptureRequest.STATISTICS_FACE_DETECT_MODE key for face detection in the camera's application interface layer. In this embodiment, based on the original values ​​OFF=0 / SIMPLE=1 / FULL=2, a new value OFF_FORCE=-1 (indicating forced shutdown) is added. By default, when not set, the face detection value is still OFF. The original logic of the original value OFF is replaced with the new value OFF_FORCE. The underlying logic of the original value OFF is changed to: enable low frame rate face detection mode and enable low power automatic face exposure method, that is, obtain face data based on low frame rate face detection strategy.

[0078] Specifically, when a third-party application opens the camera device, a Capture session and a Capture request are created. Then, it checks whether the face detection value is manually set to OFF or not (the default setting is OFF). If a manual setting of the face detection value to OFF is received, or if no manual setting information for the face detection value is received (i.e., the default setting is OFF), or if the manually set face detection value is not SIMPLE and / or FULL, a low frame rate face detection mode is enabled, and face data is acquired based on the low frame rate face detection strategy. If not, it continues to check whether the face detection value is manually set to OFF_FORCE. If yes, the face detection function is turned off, and automatic face exposure is turned off. If no, the default automatic face exposure algorithm is enabled, and face data is acquired based on the high frame rate face detection strategy.

[0079] This eliminates the need to manually set FACE_DETECT_MODE (face detection value) when calling the camera in any application. Face detection and automatic face exposure remain active, even when FACE_DETECT_MODE is manually set to OFF. Only when FACE_DETECT_MODE is manually set to OFF_FORCE (i.e., -1) are face detection and automatic face exposure completely disabled. By globally enabling automatic face exposure, the corresponding automatic face exposure algorithm can execute correctly even when third-party camera applications do not manually invoke the system's face detection scheme. This solves the problem in all third-party camera applications where, in backlit scenes with people present, the image is dark and faces are unclear, significantly improving the user experience for those with darker skin tones.

[0080] Optionally, the low frame rate face detection strategy includes at least one of the following:

[0081] In response to receiving the current data frame, if the current average ambient light brightness value is within the preset brightness range, face detection is performed on the current data frame to obtain face data;

[0082] Based on the current data frame and the average time interval between two adjacent data frames, obtain the next data frame to be processed.

[0083] Based on the difference in average ambient light brightness between the current data frame and the next data frame to be processed, and / or the change value of the face region, adjust the time interval between the next data frame to be processed and the subsequent data frames to be processed.

[0084] Optionally, when a new data frame is received, the new data frame is used as the current data frame. The average ambient light brightness value Bv in the current data frame is checked to see if it is within the threshold brightness range. If it is, face detection is performed on the current data frame. If not, face detection is not performed and the automatic face exposure function is not executed.

[0085] Optionally, based on the current data frame and the average time interval between two adjacent data frames, the next data frame to be processed is obtained, including:

[0086] The time value of the next data frame to be processed must be no less than the sum of the time value of the current data frame and the dynamic time interval, where the dynamic time interval is the product of the average time interval and the weight coefficient.

[0087] Optionally, multiple frames of data are taken, and the average time interval Δt between two adjacent frames is calculated. Assuming that a face detection is performed at time T(k) (i.e., the current data frame), the time T(k+1) of the next data frame to be processed is calculated: T(k+1)>=T(k)+ΔT, ΔT=min(w*Δt,200ms), where w∈W={2,4,8}. Here, firstly, w*Δt is calculated according to the given weight coefficient w value (2, 4 or 8), then the smaller value between w*Δt and 200ms (which can be set according to actual application requirements) is taken as the dynamic time interval ΔT, and finally ΔT is added to the current time T(k) to obtain the minimum value of T(k+1).

[0088] Optionally, in response to receiving the current data frame, if the current average ambient light brightness value is within a preset brightness range, face detection is performed on the current data frame to obtain face data, including:

[0089] If no face data is detected in the current data frame, the weight coefficient is reset to the initial level.

[0090] Optionally, if no face data is actually detected when performing face detection on the current data frame, then the weight coefficient w = W[0] (i.e., w = 2), that is, T(k+1) >= T(k) + min(2*Δt, 200ms).

[0091] Optionally, based on the difference in average ambient light brightness between the current data frame and the next data frame to be processed, and / or the change value of the face region, the time interval between the next data frame to be processed and subsequent data frames to be processed is adjusted, including:

[0092] If the average brightness difference of ambient light is less than the preset brightness change threshold, and / or the change value of the face region is less than the preset coordinate change threshold, then the index of the weight coefficient is updated in a cyclical order, and the next weight coefficient is selected.

[0093] Otherwise, reset the weighting coefficients to the initial level.

[0094] Optionally, it can be detected whether the change in the average ambient light brightness between the current data frame and the next data frame to be processed is within the threshold ΔB range, and / or whether the change in the center coordinates of the face region rectangle between the current data frame and the next data frame to be processed is within the threshold ΔS pixel distance range. If so, the index i is updated: i = (i+1)%W.length(looping through W), w = W[i]; otherwise, w = W[0]. In this way, when the brightness change of the screen is small and the face position is stable, the weight coefficient w is gradually increased to extend the frame interval ΔT of face detection, automatically balance the frame rate of face detection and the rate of automatic exposure parameter adjustment, reduce the power consumption of the automatic face exposure algorithm, improve the device's battery life, and enhance the user experience.

[0095] Optionally, the method further includes:

[0096] Set the automatic face exposure parameters of the data frames between the current data frame and the next data frame to be processed to the automatic face exposure parameters of the current data frame.

[0097] Optionally, face detection is not performed on data frames between the current data frame and the next data frame to be processed; however, if the average ambient light brightness change exceeds the threshold range, or the average grayscale value change in the face area of ​​the current data frame exceeds the threshold range, then face detection is performed on data frames between the current data frame and the next data frame to be processed.

[0098] The camera control method provided in this embodiment includes: Step S101: In response to meeting low-power processing conditions, acquiring face data based on a low frame rate face detection strategy; Step S102: Adjusting the automatic face exposure parameters according to the face data. The technical solution of this embodiment can acquire face data based on a low frame rate face detection strategy when low-power processing conditions are met, and then adjust the automatic face exposure parameters according to the face data, thereby facilitating automatic face exposure processing based on the face data of the current data frame. Through the technical solution of this embodiment, a global low frame rate automatic face exposure function can be realized, enabling the corresponding automatic face exposure algorithm to execute normally even when the third-party application camera does not manually call the system's face detection scheme. This solves the problem in all third-party camera applications where, in backlit scenes with portraits, the portraits in the image are too dark to see clearly, resulting in unclear faces. The improvement in user experience is particularly significant for users with dark skin tones. It automatically balances the frame rate of face detection with the rate of automatic exposure parameter adjustment, reducing the power consumption of the automatic face exposure algorithm, increasing device battery life, and thus improving the user experience.

[0099] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, it implements the steps of the camera control method in any of the above embodiments.

[0100] This application also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the steps of the camera control method in any of the above embodiments.

[0101] In the embodiments of the electronic device and computer storage medium provided in this application, all the technical features of any of the above-described camera control method embodiments may be included. The extended and explanatory content of the specification is basically the same as that of the embodiments of the above methods, and will not be repeated here.

[0102] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.

[0103] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.

[0104] It is understood that the above scenarios are merely examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, as those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0105] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0106] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0107] The units in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0108] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.

[0109] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0110] The technical features of the present application can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.

[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.

[0112] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer storage medium or transmitted from one computer storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, storage disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0113] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A camera control method, characterized in that, The method includes: In response to meeting low-power processing requirements, face data is acquired based on a low-frame-rate face detection strategy; Adjust the automatic face exposure parameters based on the facial data.

2. The method as described in claim 1, characterized in that, The method further includes: In response to the failure to meet the low-power processing conditions, the face data is acquired based on a high frame rate face detection strategy, or the face detection function is turned off.

3. The camera control method as described in claim 1, characterized in that, The low-power processing conditions include at least one of the following: Receives manual setting information to set the face detection value of the camera to a first preset value; No manual setting information for the face detection values ​​of the camera was received; Received manual setting information to set the face detection value of the camera to be neither a second preset value nor a third preset value.

4. The camera control method as described in claim 1, characterized in that, The low frame rate face detection strategy includes at least one of the following: In response to receiving the current data frame, if the current average ambient light brightness value is within the preset brightness range, face detection is performed on the current data frame to obtain the face data; Based on the current data frame and the average time interval between two adjacent data frames, obtain the next data frame to be processed. Based on the difference in average ambient light brightness between the current data frame and the next data frame to be processed, and / or the change value of the face region, the time interval between the next data frame to be processed and subsequent data frames to be processed is adjusted.

5. The camera control method according to claim 4, characterized in that, The step of obtaining the next data frame to be processed based on the current data frame and the average time interval between two adjacent data frames includes: The time value of the next data frame to be processed is not less than the sum of the time value of the current data frame and the dynamic time interval, wherein the dynamic time interval is the product of the average time interval and the weight coefficient.

6. The camera control method according to claim 5, characterized in that, In response to receiving a current data frame, if the current average ambient light brightness value is within the preset brightness range, face detection is performed on the current data frame to obtain the face data, including: If no face data is detected in the current data frame, the weight coefficient is reset to the initial level.

7. The camera control method according to claim 5, characterized in that, The step of adjusting the time interval between the next data frame to be processed and subsequent data frames to be processed based on the difference in average ambient light brightness between the current data frame and the next data frame to be processed, and / or the change value of the face region, includes: If the average brightness difference of the ambient light is less than a preset brightness change threshold, and / or the change value of the face region is less than a preset coordinate change threshold, then the index of the weight coefficient is updated in a cyclical order, and the next weight coefficient is selected. Otherwise, reset the weighting coefficient to the initial level.

8. The camera control method according to claim 4, characterized in that, The method further includes: The automatic face exposure parameter of the data frame between the current data frame and the next data frame to be processed is set to the automatic face exposure parameter of the current data frame.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the camera control method as described in any one of claims 1 to 8.

10. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the camera control method as described in any one of claims 1 to 8.