Method, apparatus, and electronic device for controlling an enabled state of a camera algorithm
By detecting the status information of electronic devices and the usage scenarios of applications, the enabling state of camera algorithms is dynamically adjusted, which solves the problems of resource waste and lag when electronic devices use camera algorithms. It achieves adaptive adjustment under different environments and scenarios, and optimizes image quality and device performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2025-01-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing electronic devices cannot balance image quality and device performance when using camera algorithms, resulting in resource waste and lag issues, and they cannot adaptively adjust the algorithm state under different environments and scenarios.
By detecting the status information of electronic devices and the usage scenarios of applications, the enabling state of camera algorithms is dynamically adjusted to balance image quality and device performance.
It enables dynamic adjustment of camera algorithms under different environments and scenarios, optimizes resource utilization, reduces device load and lag, and improves user experience.
Smart Images

Figure CN122372833A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device technology, and more specifically, to a method, apparatus, and electronic device for controlling the enable state of a camera algorithm. Background Technology
[0002] With the development of science and technology, electronic devices are becoming increasingly widespread and multifunctional, becoming an essential part of people's daily lives. Among them, electronic devices can be used for photography, and to improve the shooting effect, electronic devices are generally equipped with camera algorithms. However, currently, the way electronic devices use camera algorithms is fixed, making it impossible to balance the image quality and the performance of the electronic device. Summary of the Invention
[0003] In view of the above problems, this application proposes a method, apparatus and electronic device for controlling the enable state of a camera algorithm to solve the above problems.
[0004] In a first aspect, embodiments of this application provide a method for controlling the enabled state of a camera algorithm, applied to an electronic device, the electronic device including a camera, the method comprising: when a specified application is running through the electronic device and the camera is in an activated state, detecting state information of the electronic device and the usage scenario of the specified application; determining a camera algorithm control strategy corresponding to the state information and the usage scenario; controlling the enabled state of the camera algorithm corresponding to the camera based on the camera algorithm control strategy, and controlling the camera to take a picture.
[0005] Secondly, embodiments of this application provide a device for controlling the enabled state of a camera algorithm, applied to an electronic device, the electronic device including a camera, the device comprising: a detection module, configured to detect the state information of the electronic device and the usage scenario of the specified application when a specified application is running through the electronic device and the camera is in a startup state; a determination module, configured to determine a camera algorithm control strategy corresponding to the state information and the usage scenario; and a control module, configured to control the enabled state of the camera algorithm corresponding to the camera and control the camera to take pictures based on the camera algorithm control strategy.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs the above-described method.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the above-described method.
[0008] The method, apparatus, and electronic device for controlling the enabled state of a camera algorithm provided in this application embodiment detect the state information of the electronic device and the usage scenario of the specified application when the camera of the electronic device is running a specified application and the camera of the electronic device is in the activated state. They determine the camera algorithm control strategy corresponding to the state information and the usage scenario, and control the enabled state of the camera algorithm corresponding to the camera based on the camera algorithm control strategy, and control the camera to take pictures. In this way, by detecting the state information of the electronic device and the usage scenario of the application, and dynamically adjusting the enabled state of the camera algorithm accordingly, the camera image effect and device performance can be balanced. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A flowchart illustrating a method for controlling the enable state of a camera algorithm according to an embodiment of this application is shown.
[0011] Figure 2 A flowchart illustrating a method for controlling the enable state of a camera algorithm according to an embodiment of this application is shown.
[0012] Figure 3 A flowchart illustrating a method for controlling the enable state of a camera algorithm according to an embodiment of this application is shown.
[0013] Figure 4 A flowchart illustrating a method for controlling the enable state of a camera algorithm according to an embodiment of this application is shown.
[0014] Figure 5 A flowchart illustrating a method for controlling the enable state of a camera algorithm according to an embodiment of this application is shown.
[0015] Figure 6 This paper shows a block diagram of a device for controlling the enabled state of a camera algorithm according to an embodiment of the present application.
[0016] Figure 7 A block diagram of an electronic device is shown, according to an embodiment of the present application, for performing a method for controlling the enable state of a camera algorithm according to an embodiment of the present application;
[0017] Figure 8A storage unit is shown in an embodiment of this application for storing or carrying program code that implements the enable state of a camera control algorithm according to an embodiment of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0019] When an application is run on an electronic device and the device's camera is used to take pictures, the system side of the electronic device will activate various camera algorithms based on the device's hardware and software capabilities, such as pin insertion algorithms, face detection algorithms, face recognition algorithms, face tracking algorithms, noise reduction algorithms, and autofocus algorithms. The application side will also perform secondary beautification algorithms, face detection algorithms, face recognition algorithms, face tracking algorithms, and special effects overlay algorithms on the acquired camera footage based on the current application scenario and user-defined beautification and special effects parameters. Under the simultaneous action of both, the final image effect captured by the electronic device is generated.
[0020] However, the above solution has at least the following problems:
[0021] First, when a streamer uses an electronic device to start a live broadcast, various camera algorithms tested by the system and various camera algorithms on the application side are enabled and superimposed at the same time. In some user scenarios, the superposition of these camera algorithms does not significantly improve the picture quality, or even has almost no effect, ultimately resulting in a waste of the power consumption and performance resources of the electronic device.
[0022] Secondly, when a streamer uses an electronic device to start a live broadcast, the processing, encoding, and transmission of camera data and audio data, along with the frequent rendering operations of the application itself, make this a typical heavy-load scenario. Current camera algorithm mechanisms, due to the superposition of system and application sides, result in a heavier scene load, which can easily lead to severe stuttering in some or extreme scenarios, affecting the user experience of electronic devices.
[0023] Third, current camera algorithm mechanisms enable the same algorithms in fixed scenarios, and cannot adaptively and imperceptibly adjust the enabling status of each algorithm in real time when the user of the electronic device is in different environments, scenarios, and needs.
[0024] To address the aforementioned problems, the inventors, through extensive research, discovered and proposed a method, apparatus, and electronic device for controlling the enabled state of a camera algorithm, as provided in the embodiments of this application. This method dynamically adjusts the enabled state of the camera algorithm by detecting the status information of the electronic device and the usage scenario of the application, thereby balancing camera image quality and device performance. The specific method for controlling the enabled state of the camera algorithm will be described in detail in subsequent embodiments.
[0025] Please see Figure 1 , Figure 1 This illustration shows a flowchart of a method for controlling the enable state of a camera algorithm according to an embodiment of this application. The method dynamically adjusts the enable state of the camera algorithm by detecting the state information of the electronic device and the usage scenario of the application, thereby balancing camera image quality and device performance. In a specific embodiment, this method for controlling the enable state of the camera algorithm is applied to applications such as... Figure 6 The device 200 for controlling the enabled state of the camera algorithm and the electronic device 100 configured with the device 200 for controlling the enabled state of the camera algorithm are shown. Figure 7 The following will use an electronic device as an example to illustrate the specific process of this embodiment. It is understood that the electronic device used in this embodiment may include smartphones, tablets, wearable electronic devices, etc. In this embodiment, the electronic device includes a camera. The following will focus on... Figure 1 The process shown will be described in detail. The method for controlling the enable state of the camera algorithm may specifically include the following steps:
[0026] Step S110: When the specified application is running through the electronic device and the camera is in the activated state, detect the status information of the electronic device and the usage scenario of the specified application.
[0027] Optionally, the specified application refers to an application that uses the camera of an electronic device during runtime. For example, the specified application can be a live streaming application, a shooting application, a video calling application, a scanning application, etc., without limitation.
[0028] Optionally, the electronic device running a specified application and having its camera activated may include: a user running a live streaming application on the electronic device and capturing images through the camera to display the live stream; a user running a photography application on the electronic device and capturing images through the camera to display the captured photos or videos; a user running a video call application on the electronic device and capturing images through the camera to display the user's own image during the video call; or a user running a scanning application on the electronic device and capturing images through the camera to identify image codes.
[0029] In this embodiment, when a specified application is running on an electronic device and the camera of the electronic device is activated, the status information of the electronic device and the usage scenario of the specified application being run can be detected.
[0030] In some implementations, it can be detected whether the electronic device is running a specified application. If the specified application is detected, it can be detected whether the camera of the electronic device is activated. If the camera of the electronic device is activated, it can be detected the status information of the electronic device and the usage scenario of the specified application. As an example, assuming the specified application is a live streaming application, it can first be detected whether the electronic device is running a live streaming application. If the live streaming application is detected, it can be detected whether the camera of the electronic device is activated. If the camera of the electronic device is activated, it can be assumed that the electronic device is conducting live video streaming, and the status information of the electronic device and the usage scenario of the specified application can be detected.
[0031] As an feasible approach, taking the Android system as an example, ActivityManager is a service in the Android system used to manage Activities, Tasks, and background services within an application. You can use the `getRunningAppProcesses()` or `getRunningTasks()` methods of ActivityManager to obtain a list of currently running processes or tasks, then iterate through the list to determine if a specific application exists, thus confirming whether the electronic device is running that application. Alternatively, you can use PackageManager to obtain information about all installed applications and determine whether a specific application is running by its package name.
[0032] As one feasible approach, it is possible to determine whether the camera of an electronic device is activated through the device's settings.
[0033] In some implementations, when a specified application starts, the MediaTurbo (MTS) module can be launched via the Common Optimization Service for Applications (GOSA), and the camera algorithm controller client can be registered. The camera algorithm controller registered by the specified application is launched in MediaTurbo. The camera algorithm controller is initialized, reads and saves the list of camera algorithms supported by the hardware capabilities and software capabilities of the electronic device, thereby completing the initialization, and then listens for the status information of the electronic device and the usage scenario of the specified application.
[0034] In some implementations, the status information of the electronic device can be detected in real time, at preset time intervals, at preset time points, or according to other preset conditions, etc., without limitation.
[0035] Optionally, the status information of the electronic device may include the electronic device's battery level, temperature, charging status, network status, CPU utilization, GPU utilization, memory utilization, whether the electronic device is in power saving mode (normal power saving mode, super power saving mode) or other low-power mode, and whether the electronic device is in long battery life mode, etc., without limitation.
[0036] In some implementations, the usage scenarios of a specified application can be detected in real time, at preset time intervals, at preset time points, or according to other preset conditions, etc., without limitation.
[0037] Optionally, the specified application usage scenario can include the application's usage environment and / or the application scenario. The application's usage environment can be detected by systems such as ambient light detection, gyroscope detection, and locator detection on the electronic device, for example, detecting ambient light and geographic location information related to the usage scenario when the electronic device is running the specified application. The application scenario can be detected through device-side window detection, foreground / background detection, etc., such as detecting the application's running end (foreground or background), running mode (full-screen, floating window, etc.), and the application's daily usage duration (reset to 6 AM the next day), without any limitations.
[0038] Step S120: Determine the camera algorithm control strategy corresponding to the state information and the usage scenario.
[0039] In this embodiment, upon detecting the status information of the electronic device and the usage scenario of the specified application, a camera algorithm control strategy corresponding to the status information and the usage scenario can be determined.
[0040] In some implementations, the electronic device may pre-set and store mapping relationships. These mapping relationships may include multiple state information items, multiple usage scenarios, multiple camera algorithm control strategies, and the correspondence between these items. Optionally, the correspondence between these items may include: one state information item and one usage scenario corresponding to one camera algorithm control strategy, multiple state information items and multiple usage scenarios corresponding to one camera algorithm control strategy, etc., without limitation. In this embodiment, upon detecting the state information of the electronic device and the usage scenario of a specified application, a camera algorithm control strategy corresponding to the state information of the electronic device and the usage scenario of the specified application can be determined based on this mapping relationship.
[0041] As one feasible approach, upon detecting the status information of the electronic device and the usage scenario of a specified application, corresponding camera algorithm configuration information can be obtained. Based on this camera algorithm configuration information, a camera algorithm configuration strategy corresponding to the status information and usage scenario can be determined. Optionally, this camera algorithm configuration information can be stored locally on the electronic device, or it can be obtained from the cloud via a communication connection; this is not limited here.
[0042] As an example, if the electronic device's temperature is determined to be high based on its state information and the application is running in a floating window mode based on its usage scenario, then the camera algorithm control strategy determined based on the state information and usage scenario can disable camera algorithms with higher power consumption or more camera algorithms. If the electronic device's temperature is determined to be low based on its state information and the application is running in full-screen mode based on its usage scenario, then the camera algorithm control strategy determined based on the state information and usage scenario can disable fewer camera algorithms, without limitation.
[0043] As another example, if the electronic device's battery level is low based on its status information and the application is running in the background based on its usage scenario, then the camera algorithm control strategy determined based on the status information and usage scenario can disable camera algorithms with higher power consumption or more camera algorithms. If the electronic device's battery level is high based on its status information and the application is running in the foreground based on its usage scenario, then the camera algorithm control strategy determined based on the status information and usage scenario can disable fewer camera algorithms, without limitation.
[0044] Step S130: Based on the camera algorithm control strategy, control the enabling state of the camera algorithm corresponding to the camera, and control the camera to take pictures.
[0045] In this embodiment, given a determined camera algorithm control strategy, the enabling state of the corresponding camera algorithm can be controlled based on this strategy, and the camera can be controlled to take pictures according to the parameters after the camera algorithm is controlled in its enabling state. That is, some algorithms in the camera algorithm can be enabled to ensure the quality of the images captured by the camera, while other algorithms can be disabled to reduce the power consumption of the electronic device and ensure its performance.
[0046] Optionally, the camera's camera algorithm may include a pin insertion algorithm, a face detection algorithm, a face recognition algorithm, a face tracking algorithm, a noise reduction algorithm, an autofocus algorithm, etc. Correspondingly, based on the camera algorithm control strategy, the enabling state of the pin insertion algorithm, face detection algorithm, face recognition algorithm, face tracking algorithm, noise reduction algorithm, autofocus algorithm, etc., can be controlled. For example, the face detection algorithm, face recognition algorithm, and face tracking algorithm can be activated, while the pin insertion algorithm, noise reduction algorithm, and autofocus algorithm can be disabled.
[0047] In some implementations, when controlling the enabled state of the camera algorithm corresponding to the camera and controlling the camera to take pictures, a feedback control mechanism can be used to adjust the various camera algorithm parameters in real time to ensure the optimization of monitoring effect and system performance.
[0048] In some implementations, when controlling the enable state of the camera algorithm corresponding to the camera based on the camera algorithm control strategy, the relevant data points of the control of the enable state of the corresponding camera algorithm can be uploaded for big data monitoring and analysis.
[0049] An embodiment of this application provides a method for controlling the enabled state of a camera algorithm. When a specified application is running on an electronic device and the camera of the electronic device is in the activated state, the method detects the state information of the electronic device and the usage scenario of the specified application, determines a camera algorithm control strategy corresponding to the state information and the usage scenario, controls the enabled state of the camera algorithm corresponding to the camera based on the camera algorithm control strategy, and controls the camera to take pictures. In this way, by detecting the state information of the electronic device and the usage scenario of the application, and dynamically adjusting the enabled state of the camera algorithm accordingly, the method balances the camera image quality and device performance.
[0050] Please see Figure 2 , Figure 2 A flowchart illustrating a method for controlling the enabled state of a camera algorithm according to an embodiment of this application is shown. This method is applied to an electronic device, which includes a camera. The following will focus on... Figure 2 The process shown will be described in detail. The method for controlling the enable state of the camera algorithm may specifically include the following steps:
[0051] Step S210: When the specified application is running through the electronic device and the camera is in the activated state, detect the status information of the electronic device and the usage scenario of the specified application.
[0052] For a detailed description of step S210, please refer to step S110, which will not be repeated here.
[0053] Step S220: If the triggering conditions for camera algorithm control are determined based on the state information and / or the usage scenario, then the camera algorithm control strategy corresponding to the state information and the usage scenario is determined.
[0054] In some implementations, the electronic device may pre-set and store trigger conditions for camera algorithm control. These trigger conditions serve as the basis for determining the electronic device's state information and / or the usage scenario of a specified application. Therefore, in this embodiment, when the electronic device's state information and the specified application's usage scenario are determined, the state information and / or usage scenario can be compared with the trigger conditions for camera algorithm control to determine whether the state information and / or usage scenario meets the trigger conditions. If the trigger conditions are met, the enabling state of the camera algorithms can be controlled, i.e., some camera algorithms can be activated and some can be disabled; if the trigger conditions are not met, the enabling state of the camera algorithms can be left uncontrolled, i.e., all camera algorithms can be activated.
[0055] As an implementable approach, given the state information of the electronic device and the usage scenario of a specified application, it is possible to detect whether the state information meets the triggering conditions for camera algorithm control. If the conditions are met, the enabling state of the camera algorithm can be controlled, i.e., a camera algorithm control strategy corresponding to the state information and usage scenario can be determined. If the conditions are not met, the enabling state of the camera algorithm can be left uncontrolled, i.e., all camera algorithms can be activated directly. Similarly, given the state information of the electronic device and the usage scenario of a specified application, it is possible to detect whether the usage scenario meets the triggering conditions for camera algorithm control. If the conditions are met, the enabling state of the camera algorithm can be controlled, i.e., a camera algorithm control strategy corresponding to the state information and usage scenario can be determined. If the conditions are not met, the enabling state of the camera algorithm can be left uncontrolled, i.e., all camera algorithms can be activated directly.
[0056] Optionally, the triggering condition for camera algorithm control may include: the electronic device is in an uncharged state and the remaining battery power drops to a battery threshold. As an implementable approach, by detecting the state information of the electronic device described above, the charging state of the electronic device and the change in the remaining battery power can be detected. Based on this, if the detected charging state indicates that the electronic device is in an uncharged state, and the detected change in the remaining battery power indicates that the remaining battery power has dropped to a battery threshold, it can be determined that the battery life of the electronic device is short. Therefore, the battery life of the electronic device can be extended by controlling the enabling state of the camera algorithm; that is, the triggering condition for camera algorithm control can be determined.
[0057] Optionally, the triggering condition for camera algorithm control may include: the electronic device being in an uncharged state and in power-saving mode. As an implementable approach, by detecting the state information of the electronic device as described above, the charging state and the mode of the electronic device can be detected. Based on this, if the detected charging state indicates that the electronic device is not charging, and the detected mode indicates that the electronic device is in power-saving mode (including normal power-saving mode, super power-saving mode, etc.), then it can be determined that the user expects to extend the battery life of the electronic device. Therefore, the battery life of the electronic device can be extended by controlling the enabling state of the camera algorithm; that is, the triggering condition for camera algorithm control can be determined.
[0058] Optionally, the triggering condition for camera algorithm control may include: the temperature of the electronic device rising to a temperature threshold. As an implementable approach, by detecting the state information of the electronic device as described above, the temperature change of the electronic device can be detected. Based on this, if the detected temperature change indicates that the temperature of the electronic device has risen to a temperature threshold, it can be determined that the load on the electronic device is high. Therefore, by controlling the enable state of the camera algorithm, the load on the electronic device can be reduced, i.e., the triggering condition for camera algorithm control can be determined.
[0059] Optionally, the triggering condition for camera algorithm control may include: the usage duration of a specified application reaching a duration threshold within a specified time period. As an implementable approach, by detecting the usage scenario of the specified application as described above, changes in the usage duration of the specified application can be detected. Based on this, if the detected change in the usage duration of the electronic device indicates that the usage duration of the electronic device has reached a duration threshold, it can be determined that the power consumption of the electronic device is high. Therefore, by controlling the enabling state of the camera algorithm, the power consumption of the electronic device can be reduced, i.e., the triggering condition for camera algorithm control can be determined.
[0060] Of course, the triggering conditions for camera algorithm control can also include at least two of the above-mentioned combinations (electronic device is not charging and the remaining power drops to the power threshold, electronic device is not charging and power saving mode is enabled, the temperature of electronic device rises to the temperature threshold, and the usage time of a specified application reaches the duration threshold within a specified time period), which will not be elaborated here.
[0061] Of course, the triggering conditions for camera algorithm control can include many other situations, which will not be elaborated here.
[0062] Step S230: Based on the camera algorithm control strategy, control the enabling state of the camera algorithm corresponding to the camera, and control the camera to take pictures.
[0063] For a detailed description of step S230, please refer to step S130, which will not be repeated here.
[0064] An embodiment of this application provides a method for controlling the enabled state of a camera algorithm. When a specified application is running on an electronic device and the camera of the electronic device is in an activated state, the method detects the state information of the electronic device and the usage scenario of the specified application. If, based on the state information and / or the usage scenario, it is determined that the triggering conditions for camera algorithm control are met, a camera algorithm control strategy corresponding to the state information and the usage scenario is determined. Based on the camera algorithm control strategy, the enabled state of the camera algorithm corresponding to the camera is controlled, and the camera is controlled to take a picture. Compared to... Figure 1 The method for controlling the enabled state of the camera algorithm shown in this embodiment further includes setting up a method to determine whether the triggering conditions for camera algorithm control are met based on state information and / or usage scenario, so as to improve the rationality and effectiveness of camera algorithm control.
[0065] Please see Figure 3 , Figure 3 A flowchart illustrating a method for controlling the enabled state of a camera algorithm according to an embodiment of this application is shown. This method is applied to an electronic device, which includes a camera. The following will focus on... Figure 3 The process shown will be described in detail. The method for controlling the enable state of the camera algorithm may specifically include the following steps:
[0066] Step S310: When the specified application is running through the electronic device and the camera is in the activated state, detect the status information of the electronic device and the usage scenario of the specified application.
[0067] Step S320: Determine the camera algorithm control strategy corresponding to the state information and the usage scenario.
[0068] For a detailed description of steps S310-S320, please refer to steps S110-S120, which will not be repeated here.
[0069] Step S330: Based on the camera algorithm control strategy, control the enabling state of the first camera algorithm on the system side of the electronic device and / or the second camera algorithm on the application side of the specified application, and control the camera to take pictures.
[0070] Optionally, the camera algorithm includes a first camera algorithm on the system side of the electronic device and a second camera algorithm on the application side of the specified application. For example, the first camera algorithm on the system side may include pin insertion algorithm, face detection algorithm, face recognition algorithm, face tracking algorithm, noise reduction algorithm, autofocus algorithm, etc.; the second camera algorithm on the application side may include secondary beautification algorithm, face detection algorithm, face recognition algorithm, face tracking algorithm, special effects overlay algorithm, etc., without limitation.
[0071] In this embodiment, when a camera algorithm control strategy is determined, the enabling state of the first camera algorithm on the system side of the electronic device and / or the enabling state of the second camera algorithm on the application side of the specified application can be controlled.
[0072] In some implementations, if a designated application allows and provides an interface for the electronic device to control the enabling state of the second camera algorithm on its application side, then, given a determined camera algorithm control strategy, the electronic device can control the enabling state of the first camera algorithm on the system side and control the enabling state of the second camera algorithm on the application side through the interface provided by the designated application, thereby saving redundant algorithm consumption within the application process.
[0073] In some implementations, if a specified application does not allow the electronic device to control the enabling state of the second camera algorithm on its application side, then, given a determined camera algorithm control strategy, the electronic device can control the enabling state of the first camera algorithm on the system side. Subsequently, Cosa and Hyperboost can be used to link with the specified application in a low-power mode, notifying the specified application to synchronously enable the adaptive algorithm control mode, thereby saving redundant algorithm consumption within the application process.
[0074] An embodiment of this application provides a method for controlling the enabled state of a camera algorithm. When a specified application is running on an electronic device and the camera of the electronic device is in an active state, the method detects the state information of the electronic device and the usage scenario of the specified application, determines a camera algorithm control strategy corresponding to the state information and usage scenario, and, based on the camera algorithm control strategy, controls the enabled state of a first camera algorithm on the system side of the electronic device and / or a second camera algorithm on the application side of the specified application, and controls the camera to take pictures. Compared to... Figure 1 The method for controlling the enabled state of the camera algorithm shown in this embodiment also controls the enabled state of the camera algorithm on the system side and / or the camera algorithm of the application, so as to save algorithm redundancy consumption and improve device performance.
[0075] Please see Figure 4 , Figure 4A flowchart illustrating a method for controlling the enabled state of a camera algorithm according to an embodiment of this application is shown. This method is applied to an electronic device, which includes a camera. The following will focus on... Figure 4 The process shown will be described in detail. The method for controlling the enable state of the camera algorithm may specifically include the following steps:
[0076] Step S410: When the specified application is running through the electronic device and the camera is in the activated state, detect the status information of the electronic device and the usage scenario of the specified application.
[0077] For a detailed description of step S410, please refer to step S110, which will not be repeated here.
[0078] Step S420: Based on the hardware and software capabilities of the electronic device, determine the camera algorithms supported by the camera.
[0079] In this embodiment, the camera algorithms supported by the camera can be determined based on the hardware and software capabilities of the electronic device; that is, the camera algorithms supported by the system side of the electronic device can be determined. Optionally, during the initialization process of the camera algorithm controller, the list of algorithms supported by the hardware capabilities and the list of algorithms supported by the software capabilities of the electronic device can be read. Then, based on the hardware and software capabilities of the electronic device, the camera algorithms supported by the hardware capabilities and the camera algorithms supported by the software capabilities can be determined as the camera algorithms supported by the electronic device.
[0080] In some implementations, the electronic device can be identified by including sensors, lenses, image processing chips, and other hardware, thereby determining the hardware capabilities of the electronic device. Specifically, sensors determine image sharpness and detail rendering capabilities; higher resolution results in more detailed images. The focal length of the lens affects the angle of view and working distance, while the lens aperture controls the amount of light entering the camera, influencing exposure time and image brightness. The image processing chip is responsible for post-processing of the image, such as white balance, exposure time, and color correction. Other hardware, such as motors (for focusing), flexible printed circuit boards (FPCs), and I / O interfaces, supports camera focusing, data transmission, and other functions.
[0081] In some implementations, the operating system and platform, drivers and SDKs, and algorithm libraries and frameworks of the electronic device can be determined to ascertain the software capabilities of the electronic device. Different operating systems and platforms may support different camera algorithms and API interfaces; the drivers and SDKs provided by the manufacturer determine the camera functions and algorithms that developers can access and utilize; and the existence of algorithm libraries or frameworks to support specific camera algorithms, such as autofocus algorithms and image enhancement algorithms, is also considered.
[0082] In some implementations, given the hardware and software capabilities of the electronic device, the camera algorithm supported by the camera of the electronic device based on its hardware capabilities can be determined, and the camera algorithm supported by the camera of the electronic device based on its software capabilities can also be determined. By combining the algorithms supported by the camera of the electronic device based on its hardware capabilities and the camera algorithms supported by its software capabilities, the camera algorithm supported by the camera of the electronic device can be obtained.
[0083] Step S430: Based on the camera algorithm supported by the camera, obtain the corresponding camera algorithm configuration information from the cloud that is connected to the electronic device, and determine the camera algorithm control strategy corresponding to the status information and the usage scenario based on the camera algorithm configuration information.
[0084] Optionally, the electronic device communicates with the cloud. The cloud can be used to store and update configuration information for multiple camera algorithms, with each configuration adapting to electronic devices with different hardware and software capabilities. It is understood that by setting the camera algorithm configuration information in the cloud, timely updates to the configuration information and synchronization and applicability across multiple electronic devices can be achieved.
[0085] In this embodiment, when the camera algorithm supported by the camera of the electronic device is determined, the corresponding camera algorithm configuration information can be obtained from the cloud, and a camera algorithm control strategy corresponding to the status information of the electronic device and the usage scenario of the specified application can be determined based on the obtained camera algorithm configuration information.
[0086] In some implementations, once the algorithms supported by the electronic device's camera are determined, these algorithms can be uploaded to the cloud to instruct the cloud to locate the corresponding camera algorithm configuration information. This configuration information should include at least all algorithms supported by the electronic device's camera. Accordingly, once the cloud finds the corresponding camera algorithm configuration information, it can send this information back to the electronic device, allowing the device to retrieve the configuration information from the cloud.
[0087] In some implementations, camera algorithm configuration information can be used to indicate the camera algorithm control strategies that an electronic device can use under different state information and running specified applications in different usage scenarios. Therefore, given the state information of the electronic device and the usage scenario of the specified application, a camera algorithm control strategy corresponding to the state information of the electronic device and the usage scenario of the running specified application can be determined based on this camera algorithm configuration information.
[0088] Step S440: Based on the camera algorithm control strategy, control the enabling state of the camera algorithm corresponding to the camera, and control the camera to take pictures.
[0089] For a detailed description of step S440, please refer to step S130, which will not be repeated here.
[0090] An embodiment of this application provides a method for controlling the enabled state of a camera algorithm. When a specified application is running on an electronic device and the camera of the electronic device is in an active state, the method detects the state information of the electronic device and the usage scenario of the specified application. Based on the hardware capabilities of the electronic device and / or the software capabilities of the specified application, it determines the camera algorithms supported by the camera. Based on the supported camera algorithms, it obtains corresponding camera algorithm configuration information from a cloud connected to the electronic device. Based on the camera algorithm configuration information, it determines a camera algorithm control strategy corresponding to the state information and usage scenario. Based on the camera algorithm control strategy, it controls the enabled state of the corresponding camera algorithm and controls the camera to take pictures. Compared to... Figure 1 The method for controlling the enabled state of the camera algorithm shown in this embodiment also pulls the camera algorithm configuration information supported by the camera from the cloud, which can ensure the adaptability of the obtained camera algorithm configuration information and the timely update of the camera algorithm configuration information.
[0091] Please see Figure 5 , Figure 5 A flowchart illustrating a method for controlling the enabled state of a camera algorithm according to an embodiment of this application is shown. This method is applied to an electronic device, which includes a camera. The following will focus on... Figure 5 The process shown will be described in detail. The method for controlling the enable state of the camera algorithm may specifically include the following steps:
[0092] Step S510: When the specified application is running through the electronic device and the camera is in the startup state, determine the switch state of the target switch of the electronic device, wherein the target switch is used to turn on or off the function of controlling the enable state of the camera algorithm corresponding to the camera.
[0093] Optionally, the electronic device's system settings may include a target switch, which is used to enable or disable the function of controlling the camera algorithm corresponding to the camera. Through the target switch, the user can be informed that this function aims to dynamically adjust the camera algorithm to improve system performance and save power consumption, completing all adjustment actions without the user's awareness.
[0094] In this embodiment, when a specified application is running on an electronic device and the camera of the electronic device is activated, the on / off state of a target switch on the electronic device can be determined. The target switch can be in an on or off state.
[0095] When the target switch's on / off state indicates that the target switch is in the on state, it can be assumed that the user has enabled the function of controlling the camera algorithm corresponding to the camera through the target switch, hoping to control the enable state of the camera algorithm in order to improve system performance and save power consumption.
[0096] When the target switch's on / off state indicates that the target switch is in the off state, it can be assumed that the user has disabled the function of controlling the enable state of the camera algorithm corresponding to the camera through the target switch and does not want to control the enable state of the camera algorithm. In this case, all camera algorithms can be controlled to be activated.
[0097] In some implementations, the electronic device can be pre-set to have a first state value corresponding to the target switch being in a closed state and a second state value corresponding to it being in an open state. Based on this, the state value corresponding to the target switch can be detected. If the first state value is detected, the target switch can be determined to be in a closed state; if the second state value is detected, the target switch can be determined to be in an open state.
[0098] Step S520: If the switch status indicates that the target switch is in the on state, then detect the status information of the electronic device and the usage scenario of the specified application.
[0099] In this embodiment, if the switch state indicates that the target switch is in the on state, it can be assumed that the user has enabled the function of controlling the camera algorithm corresponding to the camera through the target switch and wants to control the enabled state of the camera algorithm. Therefore, the status information of the electronic device and the usage scenario of the specified application can be detected to determine the camera algorithm control strategy to control the enabled state of the camera algorithm.
[0100] In some implementations, if the switch status indicates that the target switch is in the ON state, a pop-up window displays a first message. This first message indicates that the function controlling the camera algorithm corresponding to the camera has been enabled. If the display duration of the first message reaches a specified time, the first message is then canceled. For example, if the ON state indicates that the target switch is in the ON state, the system's toast function can be invoked to display a floating window for 5 seconds, prompting the user that the camera adaptive algorithm mode (the function controlling the camera algorithm corresponding to the camera) has been triggered.
[0101] As one feasible approach, if the switch status indicates that the target switch is in the "on" state, a pop-up window can be displayed with the first information. During the display of the first information, its display duration can be statistically analyzed. Furthermore, the display position and size of the first information can be automatically or based on user interaction during its display, without limitation. Specifically, when the display duration of the first information is statistically analyzed, it can be compared with a duration threshold to determine if the threshold has been reached. If it has, the first information can be canceled to reduce interference with the display of other information; if not, the first information can remain displayed to ensure the effective notification to the user.
[0102] In some implementations, if the switch status indicates that the target switch is in the on state, a second message is displayed in the notification bar. This second message indicates that the function controlling the camera algorithm's enabled state is active. When the switch status indicates that the target switch has switched from the on state to the off state, the display of the second message is canceled. For example, if the switch status indicates that the target switch is in the on state, the notification bar can be linked, continuously displaying the second message in the pull-down notification, prompting the user that the current system's camera adaptive algorithm mode (the function controlling the camera algorithm's enabled state) is active, and camera experience optimization is underway, until the target switch is turned off.
[0103] As an implementable approach, if the switch status indicates that the target switch is in the on state, a second message can be displayed in the notification bar. During the display of the second message, the switch status of the target switch can be continuously monitored. Specifically, when the switch status of the target switch changes from the on state to the off state, the display of the second message can be canceled; when the switch status of the target switch remains on, the display of the second message can continue.
[0104] In some implementations, if the switch status indicates that the target switch is in the on state, the first information and the second information can be displayed simultaneously, which is not limited here.
[0105] Step S530: Determine the camera algorithm control strategy corresponding to the state information and the usage scenario.
[0106] Step S540: Based on the camera algorithm control strategy, control the enabling state of the camera algorithm corresponding to the camera, and control the camera to take pictures.
[0107] For a detailed description of steps S530-S540, please refer to steps S120-S130, which will not be repeated here.
[0108] An embodiment of this application provides a method for controlling the enabled state of a camera algorithm. When a specified application is running on an electronic device and the camera of the electronic device is in an active state, the method determines the on / off state of a target switch on the electronic device. This target switch is used to turn the function of controlling the enabled state of the camera algorithm corresponding to the camera on or off. If the switch state indicates that the target switch is in an active state, the method detects the state information of the electronic device and the usage scenario of the specified application, determines a camera algorithm control strategy corresponding to the state information and usage scenario, and controls the enabled state of the camera algorithm corresponding to the camera and controls the camera to take pictures based on the camera algorithm control strategy. Compared to... Figure 1 The method for controlling the enabled state of the camera algorithm shown in this embodiment also includes a switch function to control the enabling state of the camera algorithm corresponding to the camera, so as to meet different usage needs and improve the user experience.
[0109] In summary, this application provides a method for controlling the enable state of camera algorithms in electronic devices, which is imperceptible and allows for fine-tuning of system functions through real-time configuration for specific applications or scenarios. This includes methods for judging the system state of the electronic device, judging the usage scenario of a specified application, and controlling various camera algorithms. Furthermore, it can adjust and control the camera algorithm enable strategy in real time through cloud configuration.
[0110] The method for controlling the enable state of the camera algorithm can be implemented through the following steps:
[0111] 1. Usage Scenario Detection: Ambient light detection, gyroscope detection, and other system detection methods are used to determine the user's usage environment; device-side window detection, foreground / background detection, and other methods are used to determine the user's application scenario.
[0112] 2. System status monitoring: Monitoring of battery level, temperature, charging status, network status, CPU usage, GPU usage, memory usage, etc.
[0113] 3. Obtain the algorithms supported by the electronic device's hardware and software capabilities: Obtain all camera algorithms supported by the electronic device;
[0114] 4. Obtain cloud-based control strategy: Obtain the desired control strategy currently configured in the cloud for this electronic device;
[0115] 5. Dynamically control the camera algorithm enable state based on the decision: Based on the information obtained in 1-3, obtain the real-time algorithm enable strategy and actually control the camera algorithm enable;
[0116] 6. Feedback control: Through the feedback control mechanism, camera parameters are adjusted in real time to ensure that performance, effect, and power consumption reach the optimal state;
[0117] 7. Third-party application algorithm collaboration: Notify the third-party application system of the algorithm enable status, request collaboration in algorithm optimization, avoid redundancy of the three-party algorithms, and achieve perfect collaboration between the device-side and application-side algorithms.
[0118] The above methods can improve device battery life, and even more so in certain user scenarios; improve the performance of device camera usage scenarios, optimize lag in heavy-load scenarios, and ensure smoothness in ordinary scenarios; improve the effect of device camera usage scenarios, reduce redundant algorithms, and allocate more resources to the most suitable algorithm for the current scenario, reducing the loss of effect caused by algorithm resource shortage.
[0119] Please see Figure 6 , Figure 6 A block diagram of a device for controlling the enabled state of a camera algorithm according to an embodiment of this application is shown. This device 200 for controlling the enabled state of the camera algorithm is applied to the aforementioned electronic device, which includes a camera. The following will focus on... Figure 6 The block diagram shown illustrates that the device 200 for controlling the enabled state of the camera algorithm includes: a detection module 210, a determination module 220, and a control module 230, wherein:
[0120] The detection module 210 is used to detect the status information of the electronic device and the usage scenario of the specified application when the specified application is running on the electronic device and the camera is in the startup state.
[0121] Further, the detection module 210 includes: a switch state determination submodule and a detection submodule, wherein:
[0122] The switch state determination submodule is used to determine the switch state of the target switch of the electronic device, wherein the target switch is used to turn on or off the function of controlling the enable state of the camera algorithm corresponding to the camera.
[0123] The detection submodule is used to detect the status information of the electronic device and the usage scenario of the specified application if the switch status indicates that the target switch is in the on state.
[0124] Further, the detection module 210 includes: a first information display module and a first information cancellation display module, wherein:
[0125] The first information display module is used to display first information in a pop-up window if the switch state indicates that the target switch is in the on state. The first information is used to indicate that the function of enabling the camera algorithm corresponding to the camera has been enabled.
[0126] The first information cancellation display module is used to cancel the display of the first information when the display duration of the first information reaches a specified duration.
[0127] Further, the detection module 210 includes: a second information display module and a second information cancellation display module, wherein:
[0128] The second information display module is used to display second information in the notification bar if the switch status indicates that the target switch is in the on state. The second information is used to indicate that the function of enabling the camera algorithm corresponding to the camera has been enabled.
[0129] The second information cancellation display module is used to cancel the display of the second information when the switch state indicates that the target switch has switched from the on state to the off state.
[0130] The determination module 220 is used to determine the camera algorithm control strategy corresponding to the state information and the usage scenario.
[0131] Further, the determining module 220 includes: a first determining submodule, wherein:
[0132] The first determining submodule is used to determine the camera algorithm control strategy corresponding to the state information and the usage scenario if the triggering conditions for camera algorithm control are determined based on the state information and / or the usage scenario.
[0133] Furthermore, the electronic device is connected to the cloud for communication, and the determining module 220 includes: a camera algorithm determining submodule and a second determining submodule, wherein:
[0134] The camera algorithm determination submodule is used to determine the camera algorithms supported by the camera based on the hardware and software capabilities of the electronic device.
[0135] The second determining submodule obtains the corresponding camera algorithm configuration information from the cloud based on the camera algorithm supported by the camera, and determines the camera algorithm control strategy corresponding to the status information and the usage scenario based on the camera algorithm configuration information.
[0136] The control module 230 is used to control the enable state of the camera algorithm corresponding to the camera and to control the camera to take pictures based on the camera algorithm control strategy.
[0137] Furthermore, the camera algorithm includes a first camera algorithm on the system side of the electronic device and a second camera algorithm on the application side of the specified application. The control module 230 includes a control submodule, wherein:
[0138] The control submodule is used to control the enabling state of the first camera algorithm and / or the second camera algorithm based on the camera algorithm control strategy, and to control the camera to take pictures.
[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0140] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0141] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0142] Please see Figure 7 This document illustrates a structural block diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications can be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0143] The processor 110 may include one or more processing cores. The processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120. Optionally, the processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 110 and may be implemented separately using a communication chip.
[0144] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0145] In some embodiments, the electronic device 100 may further include a touch screen, which is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic device 100. These graphical user interfaces may be composed of graphics, text, icons, numbers, video, and any combination thereof. In one example, the touch screen may be a liquid crystal display (LCD) or an organic light-emitting diode (OLED), without limitation.
[0146] In some embodiments, the electronic device 100 may further include a camera for collecting user motion data. Optionally, the camera may include a front-facing camera, a rear-facing camera, a telescopic camera, a rotating camera, etc., and is not limited thereto.
[0147] In some embodiments, the electronic device 100 may further include sensors, including a light sensor that can be used to turn off the touchscreen display when an object approaches the touchscreen, such as when the body of the electronic device is moved to the ear. The sensor may also include a pressure sensor that can detect pressure generated by pressing on the electronic device; that is, the pressure sensor can detect pressure generated by contact or pressing between the user and the electronic device, such as pressure generated by contact or pressing between the user's ear or finger and the electronic device. The sensor may also include a gravity sensor that can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. This can be used for applications that identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, taps), etc. Additionally, the electronic device may also be equipped with other sensors such as gyroscopes, barometers, and hygrometers, which are not limited here.
[0148] In some embodiments, the electronic device 100 may also include an artificial intelligence module, which may be integrated into the processor 110 of the electronic device 100 to improve the intelligence level and performance of the electronic device.
[0149] Of course, electronic devices may include many other components, which will not be elaborated here.
[0150] Please see Figure 8 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 300 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0151] The computer-readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
[0152] In summary, the method, apparatus, and electronic device for controlling the enabled state of a camera algorithm provided in this application, when a specified application is running on the electronic device and the camera of the electronic device is in the activated state, detects the state information of the electronic device and the usage scenario of the specified application, determines the camera algorithm control strategy corresponding to the state information and usage scenario, controls the enabled state of the camera algorithm corresponding to the camera based on the camera algorithm control strategy, and controls the camera to take pictures. In this way, by detecting the state information of the electronic device and the usage scenario of the application, and dynamically adjusting the enabled state of the camera algorithm accordingly, the camera image effect and device performance can be balanced.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for controlling the enable state of a camera algorithm, characterized in that, Applied to an electronic device, the electronic device including a camera, the method includes: When a specified application is running on the electronic device and the camera is in the activated state, the status information of the electronic device and the usage scenario of the specified application are detected. Determine the camera algorithm control strategy corresponding to the state information and the usage scenario; Based on the camera algorithm control strategy, the enabling state of the camera algorithm corresponding to the camera is controlled, and the camera is controlled to take pictures.
2. The method according to claim 1, characterized in that, The determination of the camera algorithm control strategy corresponding to the state information and the usage scenario includes: If the triggering conditions for camera algorithm control are determined based on the state information and / or the usage scenario, then the camera algorithm control strategy corresponding to the state information and the usage scenario is determined.
3. The method according to claim 2, characterized in that, The triggering conditions controlled by the camera algorithm include: The electronic device is not being charged and its remaining battery power has dropped to a power threshold; and / or The electronic device is not charging and is in power-saving mode; and / or The temperature of the electronic device rises to a temperature threshold; and / or The specified application's usage time within a specified time period reaches a duration threshold.
4. The method according to claim 1, characterized in that, The camera algorithm includes a first camera algorithm on the system side of the electronic device and a second camera algorithm on the application side of the specified application. The step of controlling the enable state of the camera algorithm corresponding to the camera, and controlling the camera to take pictures, based on the camera algorithm control strategy, includes: Based on the camera algorithm control strategy, the enabling state of the first camera algorithm and / or the second camera algorithm is controlled, and the camera is controlled to take pictures.
5. The method according to claim 1, characterized in that, The electronic device is connected to the cloud for communication. Determining the camera algorithm control strategy corresponding to the state information and the usage scenario includes: Based on the hardware and software capabilities of the electronic device, determine the camera algorithms supported by the camera. Based on the camera algorithms supported by the camera, the corresponding camera algorithm configuration information is obtained from the cloud, and a camera algorithm control strategy corresponding to the status information and the usage scenario is determined based on the camera algorithm configuration information.
6. The method according to any one of claims 1-5, characterized in that, The detection of the electronic device's status information and the usage scenario of the specified application includes: Determine the switching state of the target switch of the electronic device, wherein the target switch is used to turn on or off the function of controlling the enable state of the camera algorithm corresponding to the camera; If the switch status indicates that the target switch is in the on state, then the status information of the electronic device and the usage scenario of the specified application are detected.
7. The method according to claim 6, characterized in that, The method further includes: If the switch status indicates that the target switch is in the on state, a pop-up window displays the first information, wherein the first information is used to indicate that the function of enabling the camera algorithm corresponding to the camera has been enabled. If the display duration of the first information reaches the specified duration, the display of the first information will be canceled.
8. The method according to claim 6, characterized in that, The method further includes: If the switch status indicates that the target switch is in the on state, then the second information is displayed in the notification bar, wherein the second information is used to indicate that the function of controlling the camera algorithm corresponding to the camera has been enabled. If the switch state indicates that the target switch has switched from the on state to the off state, the second information is canceled from being displayed.
9. A device for controlling the enable state of a camera algorithm, characterized in that, Applied to an electronic device, the electronic device including a camera, the device includes: The detection module is used to detect the status information of the electronic device and the usage scenario of the specified application when the electronic device is running a specified application and the camera is in the activated state. The determination module is used to determine the camera algorithm control strategy corresponding to the state information and the usage scenario; The control module is used to control the enable state of the camera algorithm corresponding to the camera and to control the camera to take pictures based on the camera algorithm control strategy.
10. An electronic device, characterized in that, The method includes a memory and a processor, the memory being coupled to the processor, the memory storing instructions, and the processor performing the method as described in any one of claims 1-8 when the instructions are executed by the processor.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1-8.