Photographing processing method and electronic equipment

By obtaining the available running memory size in the electronic device and controlling the photo mode and number of times, the problem of the camera application being forced to close due to insufficient memory during continuous photo taking is solved and the user experience is improved.

CN118555482APending Publication Date: 2024-08-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410789847.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In a continuous photo-taking scenario, due to insufficient running memory of the electronic device, the camera application is forcibly closed, affecting the user's photo-taking experience.

Method used

By obtaining the available running memory size of the electronic device, the appropriate photo-taking mode and number of photos are determined, and the status of the shutter button is controlled to avoid photo-taking interruptions caused by insufficient memory.

Benefits of technology

It effectively avoids the problem of photo interruption and forced shutdown caused by insufficient running memory, and improves the user's photo experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555482A
    Figure CN118555482A
Patent Text Reader

Abstract

The invention relates to the field of photographing, and provides a photographing processing method and electronic equipment, and the photographing processing method is applied to the electronic equipment, and comprises the steps: starting a camera application program; displaying a first interface, wherein the first interface comprises a shutter key; when the first preset condition is met, obtaining the size of a first running memory; based on the size of the first running memory, determining a first number of photographing in the first mode, the first number being the number of times of photographing in the first mode that can be supported by the first running memory; if the first number is greater than or equal to the first threshold, displaying the shutter key in a first state; if the first number is smaller than the first threshold value, the shutter key is displayed in a second state. Based on the scheme of the invention, the problem that a camera application program is forcibly closed in a photographing process due to insufficient running memory of the electronic equipment can be avoided, and the photographing experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on January 31, 2023, with application number 202310120990.1 and application name "Photo processing method and electronic device". Technical Field

[0002] The present application relates to the field of photography, and in particular, to a photography processing method and electronic device. Background Art

[0003] With the development of the camera function in electronic devices, the application of camera applications in electronic devices is becoming more and more widespread. The performance of camera applications in electronic devices is closely related to the running memory of the electronic devices; for example, all the services of camera applications depend on the allocation, use or recycling of running memory in electronic devices; currently, for the scene of continuous photography, because the electronic device detects multiple continuous photography operations, the running memory occupied by the camera application increases instantly, so that the electronic device may be forced to close the camera during the photography process.

[0004] Therefore, for the scenario of continuous photography, how to avoid the camera application being forced to close due to insufficient running memory of the electronic device during the photography process becomes an urgent problem to be solved. Summary of the invention

[0005] The present application provides a photo processing method and an electronic device, which can avoid problems such as the camera application being forced to close during the photo shooting process due to insufficient running memory of the electronic device in a continuous photo shooting scenario, thereby improving the user's photo shooting experience.

[0006] In a first aspect, a photo processing method is provided, which is applied to an electronic device, comprising:

[0007] Open the Camera app;

[0008] Displaying a first interface, wherein the first interface includes a shutter button;

[0009] When a first preset condition is met, obtaining a size of a first running memory, where the first running memory is a running memory in an available state;

[0010] Determine, based on the size of the first running memory, a first number of photos taken in a first mode, where the first mode is a photo taking mode used by the electronic device in real time, and the first number is the number of photos taken in the first mode that can be supported by the first running memory;

[0011] If the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state;

[0012] If the first number is less than a first threshold, the shutter key is displayed in a second state;

[0013] Among them, when the shutter key is in the first state, the electronic device takes a photo in response to a first operation on the shutter key; when the shutter key is in the second state, the electronic device does not take a photo in response to the first operation on the shutter key.

[0014] It should be understood that the running memory in an available state can also be called available physical memory; available physical memory refers to memory that can be immediately allocated to the program for use; for example, available physical memory includes free physical memory; free physical memory refers to memory that is completely unused and has all zeros in its content; all running memory in an electronic device (for example, the overall running memory of the electronic device) includes running memory in an available state and running memory in a used state (or, occupied running memory); the running memory in a used state can also be called used physical memory; used physical memory refers to memory that has been used by the program.

[0015] In an embodiment of the present application, after a camera application is turned on, when the electronic device meets a first preset condition, the size of a first running memory (for example, a running memory in an available state) in the electronic device can be obtained; based on the size of the first running memory, a first number of photos taken using the first mode (for example, the number of photos taken using the first mode that can be supported by the running memory in an available state) is determined; if the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; when the shutter key is in the second state, in response to the first operation on the shutter key, the electronic device does not take a photo. Based on the photo processing method of the embodiment of the present application, the number of times (for example, the first number) that the running memory in the available state can support the photo mode adopted by the electronic device in real time can be determined based on the size of the running memory in the available state in the electronic device; thereby, the shutter key is controlled to be displayed in the first state or the second state according to the number of photos; if the number of photos is small, the shutter key is displayed as a state when photo taking is allowed; if the first number is less than the first threshold (for example, the size of the running memory in the available state is small), in response to the first operation on the shutter key, the electronic device does not take a photo; thereby, in continuous photo taking scenarios, it is possible to avoid problems such as the electronic device being stuck during the photo taking process, or the photo taking being forced to be closed; improve the user's photo taking experience, thereby avoiding the situation in which, in multiple continuous photo taking scenarios, the size of the running memory occupied by the camera application increases instantly, resulting in insufficient size of the running memory in the available state in the electronic device, so that the electronic device may experience problems such as photo taking being stuck during the photo taking process, or the photo taking being forced to be closed; improve the user's photo taking experience.

[0016] In conjunction with the first aspect, in some implementations of the first aspect, satisfying the first preset condition includes:

[0017] detecting a second operation on the shutter key, wherein the second operation includes an operation of popping up the shutter key;

[0018] Alternatively, it is detected that the image is saved in the gallery application;

[0019] Alternatively, it is detected that at least part of the memory of the second running memory is released;

[0020] Alternatively, a preset time after detecting that at least part of the memory of the second operating memory is released;

[0021] The second running memory is the running memory occupied by the camera application.

[0022] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:

[0023] The determining, based on the size of the first operating memory, a first number of photos taken in the first mode includes:

[0024] The first number of photos taken using the first mode is determined based on the size of the first running memory and the size of the third running memory, where the third running memory is the running memory occupied when taking a photo once using the first mode.

[0025] It should be noted that the camera application uses different shooting modes, and the size of the running memory occupied by taking a picture is different; therefore, the first number can be determined based on the size of the running memory required to take a picture in the shooting mode adopted by the electronic device in real time. In an embodiment of the present application, the first number of pictures taken using the first mode can be determined based on the size of the running memory occupied by taking a picture in the shooting mode collected in real time by the electronic device; thereby improving the accuracy of the first number. In combination with the first aspect, in some implementations of the first aspect, the third running memory includes:

[0026] The running memory occupied by collecting the original image data when taking a photo using the first mode, the running memory occupied by image processing when taking a photo using the first mode, and the running memory occupied by each image processing algorithm in the image processing when taking a photo using the first mode.

[0027] In certain implementations of the first aspect, when a photo is taken using the first mode, the running memory occupied by collecting the original image data may refer to the running memory occupied by collecting the Raw image when a photo is taken using the first mode; when a photo is taken using the first mode, the running memory occupied by image processing may refer to the running memory occupied by the entire image processing framework process when a photo is taken using the first mode; the image processing framework process may include multiple algorithm processing steps, wherein the running memory occupied by each algorithm processing step may refer to the running memory occupied by each image processing algorithm in the image processing.

[0028] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:

[0029] Determine whether the size of the first running memory is greater than the size of the running memory occupied by M photos, where the M photos all adopt the first mode, and M is an integer greater than 1;

[0030] The determining, based on the size of the first operating memory, the first number of photos taken using the first mode includes:

[0031] If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is greater than the size of the running memory occupied by one photo taken using the first mode, the first number of photos taken using the first mode is determined based on the size of the first running memory.

[0032] In an embodiment of the present application, after the camera application is turned on, when the electronic device meets the first preset condition, the size of the running memory occupied by M photos can be compared with the size of the first running memory of the electronic device (for example, the running memory in an available state). If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is larger than the size of the running memory occupied by taking a photo once using the first mode, it means that the size of the running memory in the available state in the electronic device is insufficient to support M photos using the first mode. At this time, based on the size of the first running memory, a first number of photos taken using the first mode can be determined. Based on the first number, the camera application or a third-party camera application controls the display state of the shutter key. Therefore, in continuous photo shooting scenarios, the electronic device can avoid problems such as freezing during photo shooting or forced closure of the photo shooting process. The user's photo shooting experience is improved.

[0033] In combination with the first aspect, in some implementations of the first aspect, determining the first number of photos taken using the first mode based on the size of the first running memory includes:

[0034] If the size of the first operating memory is smaller than the size of the preset operating memory, the first number of photos taken using the first mode is determined based on the size of the first operating memory.

[0035] In an embodiment of the present application, after the camera application is turned on, when the electronic device meets the first preset condition, the size of the preset running memory can be compared with the size of the first running memory in the electronic device (for example, the running memory in an available state). If the size of the first running memory is less than or equal to the size of the preset running memory, it means that the size of the running memory in the electronic device in an available state is insufficient. At this time, based on the size of the first running memory, a first number of photos taken in the first mode can be determined. Based on the first number, the camera application or a third-party camera application controls the display status of the shutter key. Therefore, in continuous photo shooting scenarios, the electronic device can avoid freezing during photo shooting, or the photo shooting is forced to be closed, and other problems. The user's photo shooting experience is improved.

[0036] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:

[0037] The first amount is sent.

[0038] In certain implementations of the first aspect, a first number is sent to a camera application or a third-party camera application; the camera application or the third-party camera application can switch the state of a shutter key based on the first number, thereby controlling the electronic device to take a picture, or failing to take a picture; thereby avoiding problems such as the camera application being forced to close during the photo-taking process due to insufficient running memory of the electronic device, and improving the user's photo-taking experience.

[0039] In combination with the first aspect, in some implementations of the first aspect, sending the first amount includes:

[0040] When the first number is greater than a second threshold, sending the first number;

[0041] When the first number is less than or equal to a second threshold, the first number and prompt information of the first number are sent.

[0042] In an embodiment of the present application, when the first number is less than or equal to the second threshold, the electronic device can display the prompt information of the first number; thereby, in a continuous shooting scenario, it can avoid problems such as the electronic device being stuck during the shooting process, or the shooting being forced to close, thereby improving the user's shooting experience.

[0043] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:

[0044] A second interface is displayed, wherein the second interface includes a first prompt box, and the first prompt box includes the first amount of prompt information.

[0045] In a second aspect, an electronic device is provided, the electronic device comprising one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute:

[0046] Open the Camera app;

[0047] Displaying a first interface, wherein the first interface includes a shutter button;

[0048] When a first preset condition is met, obtaining a size of a first running memory, where the first running memory is a running memory in an available state;

[0049] Determine, based on the size of the first running memory, a first number of photos taken in a first mode, where the first mode is a photo taking mode used by the electronic device in real time, and the first number is the number of photos taken in the first mode that can be supported by the first running memory;

[0050] If the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state;

[0051] If the first number is less than a first threshold, the shutter key is displayed in a second state;

[0052] Among them, when the shutter key is in the first state, the electronic device takes a photo in response to a first operation on the shutter key; when the shutter key is in the second state, the electronic device does not take a photo in response to the first operation on the shutter key.

[0053] In conjunction with the second aspect, in some implementations of the second aspect, satisfying the first preset condition includes:

[0054] detecting a second operation on the shutter key, wherein the second operation includes an operation of popping up the shutter key;

[0055] Alternatively, it is detected that the image is saved in the gallery application;

[0056] Alternatively, it is detected that at least part of the memory of the second running memory is released;

[0057] Alternatively, a preset time after detecting that at least part of the memory of the second operating memory is released;

[0058] The second running memory is the running memory occupied by the camera application.

[0059] In conjunction with the second aspect, in some implementations of the second aspect, the one or more processors call the computer instructions to cause the electronic device to execute:

[0060] The first number of photos taken using the first mode is determined based on the size of the first running memory and the size of the third running memory, where the third running memory is the running memory occupied when taking a photo once using the first mode.

[0061] In conjunction with the second aspect, in some implementations of the second aspect, the third running memory includes:

[0062] The running memory occupied by collecting the original image data when taking a photo using the first mode, the running memory occupied by image processing when taking a photo using the first mode, and the running memory occupied by each image processing algorithm in the image processing when taking a photo using the first mode.

[0063] In conjunction with the second aspect, in some implementations of the second aspect, the one or more processors call the computer instructions to cause the electronic device to execute:

[0064] Determine whether the size of the first running memory is greater than the size of the running memory occupied by M photos, where the M photos all adopt the first mode, and M is an integer greater than 1;

[0065] The determining, based on the size of the first operating memory, the first number of photos taken using the first mode includes:

[0066] If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is greater than the size of the running memory occupied by one photo taken using the first mode, the first number of photos taken using the first mode is determined based on the size of the first running memory.

[0067] In conjunction with the second aspect, in some implementations of the second aspect, the one or more processors call the computer instructions to cause the electronic device to execute:

[0068] If the size of the first operating memory is smaller than the size of the preset operating memory, the first number of photos taken using the first mode is determined based on the size of the first operating memory.

[0069] In conjunction with the second aspect, in some implementations of the second aspect, the one or more processors call the computer instructions to cause the electronic device to execute:

[0070] The first amount is sent.

[0071] In conjunction with the second aspect, in some implementations of the second aspect, the one or more processors call the computer instructions to cause the electronic device to execute:

[0072] If the first amount is greater than a second threshold, sending the first amount;

[0073] If the first number is less than or equal to a second threshold, the first number and prompt information of the first number are sent.

[0074] In conjunction with the second aspect, in some implementations of the second aspect, the one or more processors call the computer instructions to cause the electronic device to execute:

[0075] A second interface is displayed, wherein the second interface includes a first prompt box, and the first prompt box includes the first amount of prompt information.

[0076] In a third aspect, an electronic device is provided, comprising a module / unit for executing the photo processing method in the first aspect or any one of the implementations of the first aspect.

[0077] In a fourth aspect, an electronic device is provided, comprising one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the photo processing method in the first aspect or any one of the implementations of the first aspect.

[0078] In a fifth aspect, a chip system is provided, which is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes the first aspect or any one of the photo processing methods in the first aspect.

[0079] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by an electronic device, the electronic device executes the photo processing method in the first aspect or any one of the implementations of the first aspect.

[0080] In the seventh aspect, a computer program product is provided, comprising: a computer program code, which, when executed by an electronic device, enables the electronic device to execute the photo processing method in the first aspect or any one of the implementations of the first aspect.

[0081] In an embodiment of the present application, after opening a camera application, if the electronic device meets a first preset condition, the size of a first running memory (for example, a running memory in an available state) in the electronic device can be obtained; based on the size of the first running memory, a first number of photos taken using the first mode (for example, the number of photos taken using the first mode that can be supported by the running memory in an available state) is determined; if the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; when the shutter key is in the second state, in response to the first operation on the shutter key, the electronic device does not take a photo. Based on the photo processing method of the embodiment of the present application, the number of times (for example, a first number) that the available running memory can support the photo mode adopted by the electronic device in real time can be determined based on the size of the available running memory in the electronic device; thereby controlling the shutter key to be displayed in the first state or the second state according to the number of photos; if the first number is less than the first threshold (for example, the size of the available running memory is small), in response to the first operation on the shutter key, the electronic device does not take a photo; thereby, in continuous photo shooting scenarios, the electronic device can avoid problems such as freezing during the photo shooting process or forced shutdown of the photo shooting process, thereby improving the user's photo shooting experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 is a schematic diagram of a hardware system of an electronic device applicable to the present application;

[0083] Figure 2 is a schematic diagram of an application scenario applicable to an embodiment of the present application;

[0084] Figure 3 is a schematic diagram of a software system for an electronic device applicable to the present application;

[0085] Figure 4 is a schematic diagram of another software system of an electronic device applicable to the present application;

[0086] Figure 5 is a schematic flow chart of a photo processing method provided in an embodiment of the present application;

[0087] Figure 6 is a schematic flow chart of another photo processing method provided in an embodiment of the present application;

[0088] Figure 7 is a schematic flow chart of another photo processing method provided in an embodiment of the present application;

[0089] Figure 8is a schematic diagram of a graphical user interface provided in an embodiment of the present application;

[0090] Fig. 9 is a schematic diagram of another graphical user interface provided in an embodiment of the present application;

[0091] Fig.10 is a schematic diagram of another graphical user interface provided in an embodiment of the present application;

[0092] Fig.11 is a schematic diagram of another graphical user interface provided in an embodiment of the present application;

[0093] Fig.12 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0094] Fig.13 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0095] In the embodiments of the present application, the following terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, "plurality" means two or more.

[0096] In order to facilitate the understanding of the embodiments of the present application, the relevant concepts involved in the embodiments of the present application are first briefly described.

[0097] 1. Running memory

[0098] Exemplarily, all running memory in an electronic device (for example, the overall running memory of the electronic device) includes running memory in an available state and running memory in a used state (or, running memory that has been occupied); wherein, the running memory in an available state can also be referred to as available physical memory; available physical memory refers to memory that can be immediately allocated to a program for use; for example, available physical memory includes free physical memory; free physical memory refers to memory that is completely unused and has all zeros in its content; the running memory in a used state can also be referred to as used physical memory; used physical memory refers to memory that has been used by a program.

[0099] For ease of understanding, in an embodiment of the present application, the above-mentioned "free physical memory" may be referred to as "current free running memory"; the above-mentioned "running memory in use" may also be referred to as "occupied running memory".

[0100] 2. Continuous photography

[0101] In an embodiment of the present application, continuous photographing may refer to the electronic device detecting multiple quick photographing operations; for example, detecting a click operation on a photographing control and a pop-up operation on the photographing control may refer to one photographing operation, and continuous photographing may refer to the electronic device detecting multiple quick click operations on a photographing control and a pop-up operation on the photographing control.

[0102] It should be understood that when the electronic device detects a pop-up operation on the photo control, the electronic device can apply for running memory for image processing; for continuous photo shooting scenarios, if the electronic device detects multiple pop-up operations on the photo control, the electronic device can apply for running memory for image processing multiple times; after the electronic device generates a captured image corresponding to a photo operation and saves the captured image to the gallery application, the corresponding running memory can be released.

[0103] For ease of understanding, in the embodiments of the present application, the above-mentioned “photographing control” may be referred to as a “shutter key”.

[0104] The following will describe the photo processing method and electronic device provided in the embodiments of the present application in conjunction with the accompanying drawings.

[0105] Figure 1 A hardware system of an electronic device suitable for the present application is shown.

[0106] The electronic device 100 can be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, an in-vehicle electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, etc. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device 100.

[0107] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0108] It should be noted that Figure 1 The structure shown does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include Figure 1 More or fewer components than those shown, or the electronic device 100 may include Figure 1 Combinations of some of the components shown, or the electronic device 100 may include Figure 1 Subassemblies of some of the components shown. Figure 1 The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0109] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated devices. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0110] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0111] In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and a USB interface.

[0112] Exemplarily, in an embodiment of the present application, the processor 110 can be used to execute the photo processing method provided in the embodiment of the present application; for example, start a camera application; display a first interface, the first interface including a shutter key; when a first preset condition is met, obtain the size of a first running memory, the first running memory is a running memory in an available state; based on the size of the first running memory, determine a first number of photos taken in a first mode, the first mode is a photo mode adopted by the electronic device in real time, and the first number is the number of photos taken in the first mode that can be supported by the first running memory; if the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is displayed in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; when the shutter key is displayed in the second state, in response to the first operation on the shutter key, the electronic device cannot take a photo; the first state is different from the second state in color, shape and / or pattern.

[0113] Figure 1The connection relationship between the modules shown is only a schematic illustration and does not constitute a limitation on the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of multiple connection modes in the above embodiments.

[0114] The wireless communication function of the electronic device 100 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.

[0115] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0116] The electronic device 100 can realize the display function through the GPU, the display screen 194 and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0117] For example, the display screen 194 may be used to display images or videos.

[0118] Optionally, the display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED (Micro OLED) or a quantum dot light emitting diode (QLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0119] Exemplarily, the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0120] Exemplarily, the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted to the camera photosensitive element through the camera, and the light signal is converted into an electrical signal. The camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can perform algorithmic optimization on the noise, brightness and color of the image, and the ISP can also optimize the exposure and color temperature of the shooting scene and other parameters. In some embodiments, the ISP can be set in the camera 193.

[0121] Exemplarily, the camera 193 (also referred to as a lens) is used to capture static images or videos. It can be triggered to start by an application instruction to realize the photo function, such as taking an image of any scene. The camera may include components such as an imaging lens, a filter, and an image sensor. The light emitted or reflected by the object enters the imaging lens, passes through the filter, and finally converges on the image sensor. The imaging lens is mainly used to converge the light emitted or reflected by all objects in the photographing angle (also referred to as the scene to be photographed, the target scene, or the scene image that the user expects to shoot) to form an image; the filter is mainly used to filter out excess light waves in the light (for example, light waves other than visible light, such as infrared); the image sensor can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The image sensor is mainly used to perform photoelectric conversion on the received light signal, convert it into an electrical signal, and then transmit the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, etc. format.

[0122] Exemplarily, the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0123] Exemplarily, a video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0124] Exemplarily, the gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used in scenes such as navigation and somatosensory games.

[0125] For example, the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally the x-axis, y-axis, and z-axis). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device 100 as an input parameter for applications such as horizontal and vertical screen switching and pedometers.

[0126] Exemplarily, the distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, for example, in a shooting scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0127] Exemplarily, the ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0128] For example, the fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing application locks, taking photos, and answering calls.

[0129] Exemplarily, the touch sensor 180K is also referred to as a touch control device. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also referred to as a touch control screen. The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor 180K may pass the detected touch operation to the application processor to determine the type of touch event. A visual output related to the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, and may be disposed at a different position from the display screen 194.

[0130] Figure 2 The present invention is a schematic diagram of an application scenario of the photo processing method according to an embodiment of the present application.

[0131] For example, the photographing processing method provided in the embodiment of the present application is applicable to the scene of continuous photographing, such as Figure 2 For example, after opening the camera application of the electronic device, the preview interface 201 is displayed, such as Figure 2 As shown in (a); the preview interface 201 includes a preview image and a photo control 202, wherein, at a first moment, the electronic device detects the first click operation on the photo control 202, such as Figure 2 As shown in (b); at the second moment, the electronic device detects the first pop-up operation on the photo control 202, and displays the display interface 204, Figure 2 As shown in (c); at the third moment, the electronic device detects a second click operation on the photo control 202, such as Figure 2 At the fourth moment, the electronic device detects the second pop-up operation of the camera control 202 and displays the display interface 205, such as Figure 2 As shown in (e) in .

[0132] It should be understood that the above is an example of an application scenario and does not limit the application scenario of the present application.

[0133] For example, Figure 2 As shown in (c) in FIG. 1 , after the electronic device detects the first pop-up operation on the photo control 202, the camera application in the electronic device may apply for a running memory for image processing; for example, Figure 3 As shown in (a), S221, the application layer (for example, a camera application in the application layer or a third-party camera application) sends a photo request instruction (for example, a request instruction) to the application framework layer; S222, the application framework layer sends a photo request instruction to the hardware abstraction layer; optionally, the hardware abstraction layer may send a photo request instruction to the hardware layer through the driver layer, so that the camera module of the hardware layer can capture an image; and return the captured image to the hardware abstraction layer; S223, the hardware abstraction layer may send the captured image to the application framework layer; S224, the application framework layer sends the captured image to the application layer; the camera application or gallery application in the application layer may display the image.

[0134] It should be understood that when the electronic device detects a pop-up operation on the photo control, the process from S221 to S224 will be executed once; for continuous photo shooting scenes, if the electronic device detects multiple pop-up operations on the photo control, the process from S221 to S224 will be repeated multiple times; because the application layer (for example, the camera application) and the hardware abstraction layer work in a client-server manner; for example, when the camera application sends a request instruction (for example, a photo request instruction), the hardware abstraction layer will return the generated thumbnail image and the captured image to the camera application within a certain period of time; and in the process of generating thumbnail images and photo images, the running memory of the electronic device needs to be occupied; it can be understood that for a photo request instruction of the camera application, a part of the running memory of the electronic device needs to be occupied; for multiple photo request instructions of the electronic device in a short period of time, more running memory of the electronic device needs to be occupied, resulting in an instantaneous increase in the running memory occupied by the camera application.

[0135] Currently, if Figure 2 and Figure 3 As shown in (a), for the continuous photo shooting scenario, since the electronic device detects multiple consecutive photo shooting operations, for once a photo shooting operation is detected, the camera application needs to collect raw image data and run related image processing algorithms, etc., and therefore needs to request a running memory for one photo shooting; for the continuous photo shooting scenario, the electronic device detects multiple photo shooting operations, resulting in an instantaneous increase in the running memory occupied by the camera application, which may cause the electronic device to experience freezes, forced closure of the photo shooting, and other abnormal photo shooting problems during the photo shooting process, resulting in a poor photo shooting experience for the user.

[0136] In view of this, an embodiment of the present application provides a photo processing method and an electronic device; after a camera application is turned on, when the electronic device meets a first preset condition, the size of a first running memory in the electronic device (for example, a running memory in an available state) can be obtained; based on the size of the first running memory, a first number of photos taken using a first mode (for example, the number of photos taken using the first mode that can be supported by the running memory in an available state) is determined; if the first number is greater than or equal to a first threshold, a shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; when the shutter key is in the second state, in response to the first operation on the shutter key, the electronic device does not take a photo. Based on the photo processing method of the embodiment of the present application, the number of photos that can be taken by the photo mode adopted in real time by the electronic device can be determined by the available running memory based on the size of the available running memory in the electronic device (for example, the first number); thereby controlling the shutter key to be displayed as the first state or the second state according to the number of photos; if the number of photos is less than the first threshold, the shutter key is displayed as the state of the shutter key when photo taking is allowed; if the first number is less than the first threshold (for example, the size of the available running memory can support a small number of photos), in response to the first operation on the shutter key, the electronic device does not take a photo; thereby, in continuous photo taking scenarios, problems such as the electronic device being stuck during the photo taking process or the photo taking being forced to close can be avoided; thereby improving the user's photo taking experience.

[0137] Exemplarily, in an embodiment of the present application, a photo-taking watermark module may be included in the hardware abstraction layer; when the electronic device meets a first preset condition, the photo-taking watermark module may be awakened; the photo-taking watermark module may determine the current number of photos that the electronic device can take (for example, the number of photos that can be taken) based on the size of the current idle running memory of the electronic device and the size of the running memory occupied by one photo-taking; and send the number of photos that can be taken to a camera application or a third-party camera application; when the camera application or the third-party camera application detects an operation on a photo-taking control, the photo-taking is controlled based on the number of photos that can be taken (for example, the state of the photo-taking control is switched to a photo-taking state, or the state of the photo-taking control is switched to a non-photo-taking state); for example, Figure 3As shown in (b), S230, the application layer (for example, the camera application) sends a photo request instruction to the application framework layer; S240, the application framework layer sends a photo request instruction to the hardware abstraction layer; optionally, the hardware abstraction layer can send a photo request instruction to the hardware layer through the driver layer, so that the camera module of the hardware layer can capture an image; and return the captured image to the hardware abstraction layer; S251, the hardware abstraction layer can send the captured image to the application framework layer; S252, the application framework layer sends the captured image to the application layer; the camera application or the gallery application in the application layer can display the image; in addition, when the running memory used by the camera application changes, the execution of S261 and S2 62; S261, the photo waterline module determines the current number of photos that the electronic device can take based on the size of the current free running memory of the electronic device and the size of the running memory occupied by one photo, and sends the number of photos that can be taken to the application framework layer; S262, the application framework layer sends the number of photos that can be taken to the application layer; after the camera application in the application layer receives the number of photos that can be taken, it can control the issuance of photo request instructions based on the photo data; for example, when the number of photos that can be taken is zero, if an operation indicating taking a photo is detected, the camera application may not issue a photo request instruction; thereby, in continuous photo shooting scenarios, it can avoid problems such as the electronic device being stuck during the photo shooting process, or the photo shooting being forced to close, thereby improving the user's photo shooting experience.

[0138] Figure 4 It is a schematic diagram of the software system architecture of the electronic device provided in the embodiment of the present application.

[0139] like Figure 4 As shown, the software system architecture may include an application layer 310 , an application framework layer 320 , a hardware abstraction layer 330 , a driver layer 340 and a hardware layer 350 .

[0140] By way of example, the application layer 310 may include a camera application.

[0141] Optionally, the application layer 310 may also include applications such as gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0142] Exemplarily, the application framework layer 320 provides an application programming interface (API) and a programming framework for the application programs of the application layer; the application framework layer may include some predefined functions.

[0143] For example, the application framework layer 320 includes a window manager, a content provider, a resource manager, a notification manager, and a view system.

[0144] Among them, the window manager is used to manage window programs; the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and capture the screen.

[0145] Content providers are used to store and retrieve data and make it accessible to applications. Data can include video, images, audio, calls made and received, browsing history and bookmarks, and phone books.

[0146] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, and video files.

[0147] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used for download completion notifications and message reminders. The notification manager can also manage notifications that appear in the system's top status bar in the form of icons or scrolling text, such as notifications from applications running in the background. The notification manager can also manage notifications that appear on the screen in the form of dialog windows, such as prompting text messages in the status bar, emitting reminder sounds, vibrating electronic devices, and flashing indicator lights.

[0148] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0149] Exemplarily, the hardware abstraction layer 330 is used to abstract the hardware.

[0150] For example, the hardware abstraction layer includes a camera hardware abstraction layer 331 and a camera algorithm library 332; wherein the camera hardware abstraction layer 331 includes a photo watermark module 3310, and the photo watermark module 3310 is used to determine the current number of photos that can be taken by the electronic device based on the size of the current idle running memory of the electronic device and the size of the running memory occupied by one photo; the camera algorithm library 332 includes software algorithms for image processing.

[0151] Exemplarily, the driver layer 340 is used to provide drivers for different hardware devices.

[0152] For example, the driver layer may include a camera driver.

[0153] Exemplarily, the hardware layer 350 is located at the bottom layer of the software system.

[0154] For example, the hardware layer 350 may include a camera module; the camera module may be used to capture images.

[0155] Combine the following Figures 5 to 11 The photo processing method provided in the embodiment of the present application is described in detail.

[0156] Implementation method 1

[0157] Exemplarily, in an embodiment of the present application, after obtaining the wake-up information of the photo-taking waterline module, the electronic device can trigger the electronic device to obtain the current size of idle running memory; compare the current size of the idle running memory of the electronic device with the size of the running memory occupied by M photos and / or the size of the running memory occupied by one photo; if the current size of the idle running memory of the electronic device is larger than the size of the running memory occupied by M photos, it can indicate a photo-taking state; after the camera application or a third-party camera application obtains the photo-taking indication, the state of the shutter key can be switched to the photo-taking state; for example, the state of the shutter key can be set to "standby", or the state of the shutter key can be set to other fields indicating that photo-taking can be performed; if the current size of the idle running memory of the electronic device is smaller than the size of the running memory occupied by one photo, it can indicate a non-photographic state; after the camera application or a third-party camera application obtains the non-photographic indication, it can To switch the state of the shutter key to a non-photographing state; if the size of the current idle running memory of the electronic device is less than or equal to the size of the running memory occupied by M photos, and greater than or equal to the size of the running memory occupied by one photo, the number of photos that can be taken that can be supported by the current idle running memory can be calculated (for example, the number of photos that can be taken by the electronic device in real-time photo mode); send the number of photos that can be taken; optionally, if the number of photos that can be taken N is greater than a first preset threshold, send the number of photos that can be taken N to a camera application or a third-party camera application; if the number of photos that can be taken N is less than or equal to the first preset threshold, send the number of photos that can be taken N and prompt information to the camera application or the third-party camera application; after the camera application or the third-party camera application receives the number of photos that can be taken N (or, the number of photos that can be taken N and the prompt information), the camera application or the third-party camera application can switch the state of the shutter key based on the number of photos that can be taken N.

[0158] Figure 5 is a schematic flow chart of a photographing processing method provided in an embodiment of the present application. The method 400 may be Figure 1 The electronic device shown is executed; the method 400 includes S401 to S412, and S401 to S412 are described in detail below.

[0159] S401. Open the camera application.

[0160] Optionally, the electronic device detects a click operation on the icon of the "camera" application, and the electronic device starts the camera application; or, when the electronic device is in a lock screen state, the electronic device detects a sliding operation to the right on the display screen, and the electronic device starts the camera application. Alternatively, the electronic device is in a lock screen state, and the lock screen interface includes an icon of a camera application. The electronic device detects a click on the icon of the camera application, and the electronic device starts the camera application. Alternatively, when the electronic device is running other applications, the application has the permission to call the camera application; the electronic device detects a click operation on the corresponding control, and the electronic device starts the camera application. For example, when the electronic device is running an instant messaging application, the electronic device detects a click on the control of the camera function, and the electronic device starts the camera application, etc.

[0161] It should be understood that the above is an example of the operation of opening the camera application; the camera application can also be opened by instructing the electronic device through voice instructions or other operations; this application does not impose any limitation on this.

[0162] S402, receiving the wake-up information of the photo-taking waterline module.

[0163] It should be understood that the wake-up information can be used to wake up the photo waterline module, or to trigger the photo waterline module to obtain the current size of the idle running memory, or to trigger the photo waterline module to monitor the size of the running memory in real time according to the size of the current idle running memory, or two or more of the above; after receiving the wake-up information of the photo waterline module, the photo waterline module can determine the current number of photos that can be taken by the electronic device based on the current size of the idle running memory and the size of the running memory occupied by one photo. Optionally, the wake-up information can be a wake-up instruction, a wake-up message, or satisfying a preset trigger condition, etc.

[0164] Optionally, in the following cases, the photo-taking waterline module is triggered to wake up.

[0165] Case 1

[0166] Optionally, receiving the wake-up information of the camera waterline module may refer to detecting a pop-up operation on the camera control, such as Figure 2 As shown in (c) in .

[0167] Exemplarily, the electronic device detects a pop-up operation on the photo control; it can be understood that when the electronic device detects a pop-up operation on the photo control, the photo waterline module can be awakened to determine the size of the current idle running memory of the electronic device; and the number of photos that can be supported is calculated based on the current size of the idle running memory.

[0168] Optionally, the pop-up operation may also refer to other operations; for example, the other operations may include: a smile capture operation or a voice control operation (for example, the user shouts "take a photo" loudly).

[0169] Case 2

[0170] Optionally, receiving the wake-up information of the camera waterline module may refer to detecting that an image is saved in a gallery application (also known as an album application).

[0171] Exemplarily, when the electronic device detects that an image captured corresponding to a photographing operation is saved in a gallery application, it may indicate that the electronic device has generated an image captured corresponding to a photographing operation; at this time, the photographing waterline module may be awakened to determine that the electronic device can calculate the number of photos that the electronic device can support based on the current idle running memory.

[0172] Case 3

[0173] Optionally, receiving wake-up information of the photo-taking waterline module may refer to automatically waking up the photo-taking waterline module when a preset time has passed after detecting that the electronic device releases at least part of the running memory used for taking photos.

[0174] For example, the preset duration may be M milliseconds. M milliseconds after detecting that the electronic device releases at least part of the running memory used for taking pictures, the photo waterline module may be awakened to calculate the number of photos that the electronic device can support based on the current free running memory.

[0175] Case 4

[0176] Optionally, receiving wake-up information of the photo-taking waterline module may refer to detecting that the electronic device releases at least part of the running memory used for taking photos.

[0177] It should be understood that when the electronic device detects the above four situations, the running memory used by the camera application may change; at this time, the photo watermark module can be woken up to enable the photo watermark module to determine the current number of photos that the electronic device can take based on the current idle running memory of the electronic device and the running memory occupied by the electronic device for one photo.

[0178] Optionally, when the above four situations are not detected, the photo-taking waterline module may not be awakened.

[0179] It should also be understood that the above four situations are for illustration only, and the timing for waking up the photo waterline module may also be when the running memory of other electronic devices changes, and this application does not impose any limitation on this.

[0180] S403: Obtain the size of the current idle running memory.

[0181] Optionally, the size of the current idle running memory of the electronic device=the size of the overall running memory of the electronic device-the size of the running memory currently occupied by the electronic device.

[0182] The running memory occupied by the electronic device includes, but is not limited to: the running memory occupied by the currently running application and the running memory occupied by a photo.

[0183] Optionally, the running memory occupied by a photo may include the following parts:

[0184] The running memory occupied by the Raw image captured by the camera, the running memory occupied by the camera algorithm, and the running memory occupied by the camera processing process.

[0185] It should be understood that the running memory occupied by the photo processing process may refer to the running memory required for the entire image processing framework process; the image processing framework process may include multiple algorithm processing steps, and the running memory occupied by one algorithm processing step may refer to the running memory occupied by the photo algorithm.

[0186] Exemplarily, the size of the running memory occupied by the photo processing process may refer to the size of the running memory occupied by the ISP processing flow; the size of the running memory occupied by the photo algorithm may refer to the size of the running memory occupied by each algorithm in the ISP processing flow.

[0187] It should also be understood that the current idle running memory may refer to the available physical memory in the electronic device; that is, the memory in the electronic device that can be immediately allocated to the program for use; wherein the available physical memory may include idle physical memory; or, the available physical memory may be idle physical memory; idle physical memory refers to memory that is completely unused and has all zeros in its content.

[0188] S404, determining whether the size of the current idle running memory is greater than the size of the running memory occupied by M photos; if so, executing S405; if not, executing S406.

[0189] Optionally, M can be 100; it can be determined whether the size of the current idle running memory is larger than the size of the running memory occupied by taking pictures 100 times in the real-time photo mode; if the size of the current idle running memory is larger than the size of the running memory occupied by taking pictures 100 times in the real-time photo mode, execute S405; if the size of the current idle running memory is smaller than or equal to the size of the running memory occupied by taking pictures 100 times in the real-time photo mode, execute S406.

[0190] Optionally, M may be a natural number less than or equal to 80; or, M may be a natural number less than or equal to 60; or, M may be a natural number less than or equal to 20, etc.

[0191] Optionally, the value of M can be determined based on different scenarios in which the electronic device is located; for example, if the electronic device is in a call scenario, M can be a natural number less than or equal to 50; if the electronic device is in a video playing scenario, M can be a natural number less than or equal to 30; if the electronic device is in a low-power scenario, M can be a natural number less than or equal to 20, etc.

[0192] It should be understood that the above is an example of the numerical value of M; this application does not impose any limitation on this.

[0193] In an embodiment of the present application, the numerical value of M can be dynamically configured according to the different scenarios in which the electronic device is located. Due to the different scenarios in which the electronic device is located, there are certain differences in the size of the current idle running memory in the electronic device. By dynamically configuring the numerical value of M, the camera-enabled state or non-camera-enabled state of the electronic device can be accurately indicated based on the different scenarios in which the electronic device is located.

[0194] Optionally, the size of the running memory occupied by taking pictures 100 times in the real-time photo mode can refer to the size of the running memory occupied by the camera application for taking a picture once in the real-time photo mode multiplied by the value of M; wherein the photo mode includes but is not limited to: large aperture photo mode, night scene photo mode, portrait photo mode, normal photo mode, etc.

[0195] For example, if the camera application is in night scene photography mode in the preview state, the size of the running memory occupied by one photo in the night scene photography mode is K (MB), and the size of the running memory occupied by M photos is M*K (MB).

[0196] S405: Indicate the camera-ready state.

[0197] Among them, indicating the camera-capable state may indicate that the electronic device is capable of taking photos.

[0198] Optionally, the state of the shutter key may indicate that the electronic device is capable of taking photos.

[0199] For example, the state of the shutter key can be indicated by standby and disable; if standby indicates that photos can be taken, disable indicates that photos cannot be taken; if the current idle running memory size is larger than the running memory size occupied by M photos, the state of the shutter key is set to "standby", thereby indicating that the electronic device can take photos.

[0200] Optionally, an instruction may be sent to a camera application or a third-party camera application; based on the instruction, the camera application may take a photo.

[0201] For example, an instruction may be sent to a camera application or a third-party camera application; the instruction is sent to indicate that the state of the shutter key is "standby".

[0202] It should be understood that indicating a photo-taking state may mean that the current free running memory can support the camera application to take photos; for example, the currently available physical memory is greater than the memory occupied by the camera application to take photos.

[0203] Optionally, after the camera application or the third-party camera application obtains the indication that the camera can be taken, the state of the shutter key can be switched to the state that the camera can be taken; for example, the state of the shutter key is set to "standby" or the state of the shutter key is set to other fields indicating that the camera can be taken.

[0204] S406, determining whether the size of the current idle running memory is smaller than the size of the running memory occupied by a photo taking operation; if so, executing S407; if not, executing S405.

[0205] Optionally, the size of the running memory occupied by a photo taking operation is related to the photo mode adopted in real time; for example, if the photo mode adopted in real time by the camera application is the portrait mode, and the size of the running memory occupied by the image generated by the image processing algorithm in the portrait mode is S, then it is determined whether the size of the current idle running memory is less than S.

[0206] It should be understood that since different shooting modes are used for taking photos, the image processing algorithms corresponding to the camera application may be different; therefore, the size of the running memory occupied by taking a photo is different depending on the shooting mode used in real time.

[0207] S407: The number N of photos that can be taken is zero.

[0208] Exemplarily, if the size of the current free running memory is smaller than the size of the running memory occupied by one photo, the number N of photos that can be taken is zero.

[0209] S408: Indicate that the camera is not allowed.

[0210] Among them, indicating the non-photographic state may indicate that the electronic device cannot take a photo.

[0211] Optionally, the state of the shutter key may indicate that the electronic device cannot take a photo.

[0212] For example, the state of the shutter key can be indicated by standby and disable; if standby indicates that photos can be taken, and disable indicates that photos cannot be taken; then when the number of photos that can be taken is zero, the state of the shutter key is set to "disable", thereby indicating that the electronic device can not take photos.

[0213] Optionally, an instruction may be sent to the camera application; based on the instruction, the camera application may be unable to take a picture.

[0214] For example, a command may be sent to a camera application to indicate that the state of the shutter button is "disabled".

[0215] It should be understood that indicating a non-photographic state may mean that the camera application cannot support taking photos based on the current idle running memory; for example, the currently available physical memory is less than the memory occupied by the camera application for taking photos at one time.

[0216] Optionally, the non-photographic state may mean that the electronic device is unable to take photos; wherein the non-photographic state includes: instructing the camera application not to capture original image data (for example, Raw images), or instructing the camera application to capture original image data and not execute related image processing algorithms; or instructing the camera application to capture original images, save the original images and not execute related image processing algorithms, or two or more of the above.

[0217] Optionally, after the camera application or the third-party camera application obtains the non-photographing indication, the state of the shutter key can be switched to the non-photographing state. Exemplarily, when the state of the shutter key is the non-photographing state, its display mode can be the same as or different from the display mode of the shutter key when the state is the photographing state.

[0218] For example, the state of the shutter key is set to a field indicating that photography is not allowed (for example, "disable"); or, the color of the shutter key is changed; for example, the shutter key is set to gray; or, the shape of the shutter key is changed; for example, the circle of the shutter key is changed to a square; or, the pattern of the shutter key is changed; or two or more of the above.

[0219] S409: Calculate the number N of photos that can be taken in the current idle running memory.

[0220] It should be understood that the number N of photos that can be taken in the current idle running memory may refer to the maximum number of photos allowed by the size of the idle running memory; the number N of photos that can be taken may indicate the number of photos that the electronic device can take.

[0221] Optionally, if the size of the current idle running memory of the electronic device is less than or equal to the size of the running memory occupied by M photos, and greater than or equal to the size of the running memory occupied by one photo, the number of photos that can be taken N can be calculated based on the current size of the idle running memory and the size of the running memory occupied by one photo; for example, the size of the running memory occupied by one photo is K, and the current size of the idle running memory of the electronic device is Q; the number of photos that can be taken N = Q / K; wherein the size K of the running memory occupied by one photo is related to the photo mode, image processing algorithm, etc.

[0222] Optionally, for the description of the running memory occupied by a photo-taking operation, reference may be made to the description in S403, which will not be repeated here.

[0223] S410, determining whether the number N of photos that can be taken is less than a first preset threshold; if so, executing S411; if not, executing S412.

[0224] Optionally, the first preset threshold may be 10, 11, 12, 13 or other natural numbers.

[0225] Exemplarily, the first preset threshold may be 10, and then it may be determined whether the number of photos that can be taken is less than 10; if the number of photos that can be taken is less than 10, S411 may be executed; if the number of photos that can be taken is greater than or equal to 10, S412 may be executed.

[0226] It should be understood that the above is an example of the first preset threshold; the embodiment of the present application does not impose any limitation on the size of the first preset threshold.

[0227] S411, sending the number of photos that can be taken N and prompt information.

[0228] Optionally, if the number of photos that can be taken is less than a first preset threshold, the number of photos that can be taken N and prompt information of the number of photos that can be taken N may be sent to a camera application or a third-party camera application.

[0229] For example, if the number of photos that can be taken N is less than 10, it means that the electronic device can currently take fewer photos; at this time, the number of photos that can be taken and prompt information can be sent to the camera application or a third-party camera application, and the camera application or the third-party camera application can switch the state of the shutter key based on the number of photos that can be taken N.

[0230] In an embodiment of the present application, when the number of photos that can be taken N is small, the electronic device can display a prompt message of the number of photos that can be taken N; thereby, in a continuous photo shooting scenario, it can avoid problems such as the electronic device being stuck during the photo shooting process, or the photo shooting being forced to close, thereby improving the user's photo shooting experience.

[0231] Optionally, if the number of photos that can be taken N is less than a first preset threshold, the electronic device may display a prompt message “The number of photos that can be taken is N”. Fig. 9 The prompt box 741 shown in (a) in FIG.

[0232] Optionally, if the number of photos that can be taken N is less than a first preset threshold, the electronic device may display a prompt message “operation is too frequent”, such as Fig. 9 The prompt box 751 shown in (b) in FIG.

[0233] Optionally, if the number of photos that can be taken N is less than a first preset threshold, the electronic device may adjust the state of the photo control to a waiting state; for example, gray out the photo control, such as Fig.10 The photo control 761 shown can be understood as follows: when the electronic device grays out the photo control, the electronic device cannot take photos; the electronic device grays out the photo control to prompt the user that photos cannot be taken at the moment.

[0234] Optionally, if the number of photos that can be taken N is less than a first preset threshold, the electronic device may adjust the pattern of the photo control; for example, Fig.11 The photo control 771 shown; it can be understood that when the electronic device adjusts the pattern of the photo control, the electronic device cannot take photos; by adjusting the pattern of the photo control, it can be used to prompt the user that it is currently unable to take photos.

[0235] Optionally, if the number of photos that can be taken N is less than a first preset threshold, the electronic device may adjust the shape of the photo control; for example, Figure 8 The shape of the photo taking control 732 shown in (c) is adjusted to a rectangle.

[0236] Optionally, if the number of photos that can be taken is less than a first preset threshold, the photo-taking state can be indicated, and the number of photos that can be taken N and prompt information can be sent to the camera application or a third-party camera application.

[0237] Optionally, after the camera application or the third-party camera application receives the number of photos that can be taken N and the prompt information, the camera application or the third-party camera application can switch the state of the shutter key based on the number of photos that can be taken N; for example, if it is detected that the number of click operations on the photo control is less than the number of photos that can be taken N, the state of the shutter key can be switched to the photo-taking state; for example, the state of the shutter key is set to "standby", or the state of the shutter key is set to other fields indicating that photos can be taken; if it is detected that the number of click operations on the photo control is equal to N times, when N click operations are detected, the state of the shutter key can be switched to the non-photographing state; for example, the state of the shutter key is set to "disable"; or, the color of the shutter key is changed; for example, the shutter key is set to gray; or, the shape of the shutter key is adjusted; for example, the shape of the shutter key is adjusted from a circle to a rectangle; or, the image of the shutter key is adjusted, or two or more of the above.

[0238] S412, sending the number N of photos that can be taken.

[0239] Optionally, if the number of photos that can be taken N is greater than or equal to a first preset threshold, the number of photos that can be taken N may be sent to a camera application or a third-party camera application.

[0240] Exemplarily, if the number of photos that can be taken N is greater than or equal to the first preset threshold, it means that the electronic device can support a large number of photos; at this time, the number of photos that can be taken N can be sent to the camera application.

[0241] Optionally, the above S410 to S412 are optional steps; for example, in a possible implementation, S412 can be directly executed after S409; that is, after calculating the number N of photos that can be taken in the current idle running memory, the number N of photos that can be taken can be sent.

[0242] Optionally, after the camera application or the third-party camera application receives the number of photos that can be taken N, the camera application or the third-party camera application can switch the state of the shutter key based on the number of photos that can be taken N; for example, if it is detected that the number of click operations on the photo control is less than the number of photos that can be taken N, the state of the shutter key can be switched to the photo-taking state; for example, the state of the shutter key is set to "standby", or the state of the shutter key is set to other fields indicating that photos can be taken; if it is detected that the number of click operations on the photo control is equal to N times, when N click operations are detected, the state of the shutter key can be switched to the non-photographing state; for example, the state of the shutter key is set to "disable"; or, the color of the shutter key is changed; for example, the shutter key is set to gray; or, the shape of the shutter key is adjusted; for example, the shape of the shutter key is adjusted from a circle to a rectangle; or, the image of the shutter key is adjusted, or two or more of the above.

[0243] In an embodiment of the present application, after receiving the wake-up information of the photo-taking waterline module, the size of the current idle running memory in the electronic device can be triggered to obtain; if the size of the current idle running memory of the electronic device is larger than the size of the running memory occupied by M shots, it can indicate a photo-taking state; after the camera application or a third-party camera application obtains the photo-taking indication, the state of the shutter key can be switched to a photo-taking state; for example, the state of the shutter key is set to "standby", or the state of the shutter key is set to other fields indicating that a photo can be taken; if the size of the current idle running memory of the electronic device is smaller than the size of the running memory occupied by one shot, it can indicate a non-photographing state, and when the camera application or a third-party camera application obtains the non-photographing indication, the state of the shutter key can be switched to a photo-taking state. After the photo-taking indication is given, the state of the shutter key can be switched to a non-photographing state; if the size of the current idle running memory in the electronic device is less than or equal to the size of the running memory occupied by M photos, and greater than or equal to the size of the running memory occupied by one photo, the number of photos that can be taken that can be supported by the current idle running memory can be calculated (for example, the number of times the electronic device can support taking photos in real-time photo mode); the number of photos that can be taken that can be taken N is sent to the camera application or a third-party camera application, and the camera application or the third-party camera application controls the display state of the shutter key; thereby, in continuous photo-taking scenarios, the electronic device can avoid freezing during the photo-taking process, or the photo-taking being forced to close, and other problems; thereby improving the user's photo-taking experience.

[0244] Implementation method 2

[0245] Exemplarily, the electronic device can obtain the current idle running memory after detecting the wake-up information of the photo waterline module; by comparing the current idle running memory of the electronic device with the size of the preset running memory, if the current idle running memory of the electronic device is greater than or equal to the size of the preset running memory, a photo-taking instruction can be sent; if the current idle running memory of the electronic device is less than the size of the preset running memory, the number of photos that can be taken that can be supported by the current idle running memory can be calculated (for example, the number of photos that can be taken by the electronic device in real-time photo mode); optionally, if the number of photos that can be taken N is greater than a first preset threshold, the number of photos that can be taken N is sent to the camera application; if the number of photos that can be taken N is less than or equal to the first preset threshold, the number of photos that can be taken N and prompt information can be sent; after the camera application or the third-party camera application receives the number of photos that can be taken N (or, the number of photos that can be taken N and the prompt information), the camera application or the third-party camera application can switch the state of the shutter key based on the number of photos that can be taken N.

[0246] Figure 6is a schematic flow chart of a photograph processing method provided in an embodiment of the present application. The method 500 may be Figure 1 The electronic device shown is executed; the method 500 includes S501 to S509, and S501 to S509 are described in detail below.

[0247] S501. Open the camera application.

[0248] Optionally, the implementation of S501 can refer to Figure 5 The relevant description of S401 is not repeated here.

[0249] S502: Receive wake-up information of the photo-taking waterline module.

[0250] Optionally, the implementation of S502 can refer to Figure 5 The relevant description of S402 will not be repeated here.

[0251] S503: Obtain the size of the current idle running memory.

[0252] Optionally, the implementation of S503 can refer to Figure 5 The relevant description of S403 is not repeated here.

[0253] S504, determine whether the size of the current idle running memory is smaller than the size of the preset running memory; if so, execute S505; if not, execute S506.

[0254] Optionally, the size of the preset running memory may be 1GB, 2GB, 3GB or 4GB, etc.

[0255] It should be understood that the above is an example of the size of the preset running memory; the embodiments of the present application do not impose any limitation on the size of the preset running memory.

[0256] In an embodiment of the present application, if the current idle running memory size is smaller than the preset running memory size, it indicates that the current idle running memory of the electronic device is small; at this time, the relevant process of calculating the number of photos that can be taken in the idle running memory can be triggered; that is, S505 to S509 are executed; if the current idle running memory size is greater than or equal to the preset running memory size, it indicates that the current idle running memory of the electronic device is large; the photo-taking state can be indicated, and the relevant process of calculating the number N of photos that can be taken in the current idle running memory is not triggered; if the current idle running memory size is smaller than the preset running memory size, it indicates that the current idle running memory of the electronic device is insufficient, and the number N of photos that can be taken in the current idle running memory can be calculated.

[0257] S505: Calculate the number N of photos that can be taken in the current idle running memory.

[0258] Optionally, if the size of the current idle running memory of the electronic device is smaller than the size of the preset running memory, the number N of photos that can be taken in the current idle running memory is calculated.

[0259] Optionally, the implementation of S505 can refer to Figure 5 The relevant description of S409 will not be repeated here.

[0260] S506: Indicate the camera-ready state.

[0261] Optionally, if the size of the current idle running memory of the electronic device is greater than or equal to the size of the preset running memory, it indicates that the camera-ready state is in effect.

[0262] Optionally, the implementation of S506 can refer to Figure 5 The relevant description of S405 will not be repeated here.

[0263] S507, determining whether the number N of photos that can be taken is less than a first preset threshold; if so, executing S508; if not, executing S509.

[0264] Optionally, the implementation of S507 can refer to Figure 5 The relevant description of S410 is not repeated here.

[0265] S508: Send the number of photos that can be taken N and prompt information.

[0266] Optionally, the implementation of S508 can refer to Figure 5 The relevant description of S411 will not be repeated here.

[0267] S509: Send the number N of photos that can be taken.

[0268] Optionally, the implementation of S509 can refer to Figure 5 The relevant description of S412 will not be repeated here.

[0269] In an embodiment of the present application, after receiving the wake-up information of the photo waterline module, the current idle running memory size of the electronic device can be triggered to obtain; if the current idle running memory size is greater than or equal to the preset running memory size, it can indicate a photo-taking state; after the camera application or the third-party camera application obtains the photo-taking indication, the state of the shutter key can be switched to a photo-taking state; for example, the state of the shutter key is set to "standby", or the state of the shutter key is set to other fields indicating that a photo can be taken; if the current idle running memory size of the electronic device is less than the preset running memory size, the number of photos that can be taken that can be supported by the current idle running memory can be calculated (for example, the number of times the electronic device can support taking photos in real-time photo mode); the number of photos that can be taken that can be taken is sent to the camera application or the third-party camera application, and the camera application or the third-party camera application controls the display state of the shutter key; thereby, in continuous photo-taking scenarios, the electronic device can avoid freezing during photo-taking, or the photo-taking is forced to be closed, and other problems; the user's photo-taking experience is improved.

[0270] It should be understood that Figure 5 In the first implementation mode shown, after receiving the wake-up information of the camera waterline module, the electronic device needs to determine whether the size of the current idle running memory of the electronic device is sufficient (for example, Figure 5 S404 shown); when the size of the current idle running memory is insufficient (for example, less than or equal to the size of the running memory occupied by M photos), the calculation of the size of the current idle running memory is triggered to calculate the number of photos that can be taken N; for Figure 6 In the second implementation method shown, after receiving the wake-up information of the camera waterline module, the electronic device needs to determine whether the size of the current idle running memory of the electronic device is less than the size of the preset running memory (for example, Figure 6 If the current idle running memory is smaller than the preset running memory size, the number N of photos that can be taken in the current idle running memory is calculated.

[0271] Figure 7 is a schematic flow chart of a photograph processing method provided in an embodiment of the present application. The method 600 may be Figure 1 The electronic device shown is executed; the method 600 includes S610 to S660, and S610 to S660 are described in detail below.

[0272] S610. Open the camera application.

[0273] Optionally, the implementation method of opening the camera application can refer to the related description of S401 above, which will not be repeated here.

[0274] S620: Display a first interface, where the first interface includes a shutter button.

[0275] It should be understood that the shutter key may refer to Figures 8 to 11 The camera controls shown.

[0276] Optionally, the first interface may refer to a preview interface after the camera application is started, and the preview interface includes a shutter button.

[0277] For example, the first interface may refer to Figure 8 In the display interface 730 shown in (c), the shutter key may refer to Figure 8 The photo taking control 732 shown in (c) .

[0278] S630: When a first preset condition is met, obtain the size of the first running memory.

[0279] Among them, the first running memory is the running memory in an available state.

[0280] It should be noted that the running memory in an available state can also be called available physical memory; available physical memory refers to memory that can be immediately allocated to programs for use; for example, available physical memory includes free physical memory; free physical memory refers to memory that is completely unused and has all zeros in its content; all running memory in an electronic device (for example, the overall running memory of the electronic device) includes running memory in an available state and running memory in a used state (or, occupied running memory), and the running memory in a used state can also be called used physical memory; used physical memory refers to memory that has been used by programs.

[0281] Optionally, in one implementation, the first operating memory may refer to: Figure 5 The current idle running memory shown in S403 in FIG. 1 , or Figure 6 The current idle running memory shown in S503 in FIG. Figure 5 The relevant description will not be repeated here.

[0282] Optionally, satisfying the first preset condition includes:

[0283] detecting a second operation on the shutter key, wherein the second operation includes an operation of popping up the shutter key;

[0284] Alternatively, it is detected that the image is saved in the gallery application;

[0285] Alternatively, it is detected that at least part of the memory of the second running memory is released;

[0286] Alternatively, a preset time after detecting that at least part of the memory of the second operating memory is released;

[0287] The second running memory is the running memory occupied by the camera application.

[0288] It should be noted that after the electronic device generates a captured image, the second running memory (for example, the running memory occupied by generating the captured image) can be released; it can be understood that after the captured image is generated, the running memory occupied by generating the captured image can be cleared, so that part or all of the occupied running memory becomes a usable running memory.

[0289] Optionally, the implementation method of detecting the second operation on the shutter key can refer to Figure 5 For the description of situation 1, see the implementation of saving images in the gallery application. Figure 5 For the description of the second situation; the implementation method of detecting that at least part of the second running memory is released can be seen in Figure 5 The relevant description of situation 4 in; the implementation method of the preset time after detecting that at least part of the memory of the second running memory is released can be referred to Figure 5 The description of situation three in the above will not be repeated here.

[0290] S640: Determine a first number of photos taken in the first mode based on the size of the first operating memory.

[0291] The first mode is a photographing mode used in real time by the electronic device, and the first number is the number of photographing times using the first mode that can be supported by the first running memory.

[0292] Optionally, the photo taking modes include but are not limited to: large aperture photo taking mode, night scene photo taking mode, portrait photo taking mode, normal photo taking mode, etc.

[0293] It should be understood that if different photo modes are used in real time, the size of the running memory occupied by taking a photo will be different; therefore, the first number may refer to the maximum number of times that the size of the running memory in the current electronic device can support the use of the first mode to take photos; if the number of times the first mode is used to take photos is greater than the first number, the running memory in the electronic device that is available cannot support taking photos; it can be understood that if the number of times the first mode is used to take photos is greater than the first number, the size of the running memory occupied by multiple photos is greater than the size of the first running memory.

[0294] For example, if the size of the first running memory is X1, and the size of the running memory occupied by taking pictures in the first mode is X2, the first number can be the value of the integer part of X1 divided by X2; for example, X1 / X2=55.2, or X1 / X2=55.6, then the first number is 55.

[0295] Optionally, the first quantity may refer to Figure 5 or Figure 6 The number of photos that can be taken, N, can be found in Figure 5 The relevant description will not be repeated here.

[0296] S650: If the first number is greater than or equal to the first threshold, the shutter key is displayed in the first state.

[0297] When the shutter key is displayed in the first state, the electronic device takes a photo in response to a first operation on the shutter key.

[0298] Optionally, the first threshold may be 1, 2, 3, 4, 5 or other positive integers.

[0299] Optionally, if the first number is greater than or equal to a first threshold, after the camera application or a third-party camera application detects a first operation on the shutter key, the electronic device takes a photo in response to the first operation; the electronic device taking a photo may mean that the camera application or the third-party camera application may switch the state of the shutter key to a photo-taking state; for example, setting the state of the shutter key to "standby" or setting the state of the shutter key to other fields indicating that photo-taking can be performed.

[0300] Optionally, taking a photo by an electronic device may mean that the electronic device detects a first operation on a shutter key, and the state of the shutter key is a photo-taking state; at this time, the camera application or a third-party camera application may send a photo-taking request instruction (for example, a request instruction) in response to the first operation; wherein the photo-taking request instruction is used to request the camera module to capture raw image data; and the electronic device may perform image processing on the raw image data to generate a captured image.

[0301] S660: If the first number is less than the first threshold, the shutter key is displayed in the second state.

[0302] When the shutter key is displayed in the second state, in response to the first operation on the shutter key, the electronic device does not take a photo. The display modes corresponding to the first state and the second state are the same. Optionally, the first state and the second state may also be different in color, shape and / or pattern.

[0303] Optionally, if the first number is less than a first threshold, the camera application or a third-party camera application detects a first operation on the shutter key; in response to the first operation, the electronic device is unable to take pictures; the electronic device being unable to take pictures may mean that the camera application or the third-party camera application switches the state of the shutter key to a non-photographic state; for example, the state of the shutter key is set to "disable"; or, the color of the shutter key is changed; for example, the shutter key is set to gray; or, the shape of the shutter key is adjusted; for example, the shape of the shutter key is adjusted from a circle to a square; or, the pattern of the shutter key is adjusted, or two or more of the above.

[0304] Optionally, the inability of the electronic device to take pictures may mean that the electronic device can detect a first operation on a shutter key, and the state of the shutter key is a non-photographic state; at this time, the camera application or a third-party camera application may respond to the first operation and not send a photo request instruction (for example, a request instruction); wherein the photo request instruction is used to request the camera module to capture raw image data.

[0305] Optionally, the inability of the electronic device to take pictures may mean that the electronic device can detect a first operation on a shutter key, and the state of the shutter key is a non-photographic state; at this time, the camera application or a third-party camera application can respond to the first operation, send a photo request instruction (for example, a request instruction) and do not perform image processing on the collected raw image data.

[0306] Optionally, the first state and the second state are different in color, shape and / or pattern; for example, when the shutter key is displayed in the first state and the shutter is displayed in the second state, the color of the shutter key, or the shape of the shutter key, or the pattern of the shutter key, or two or more of the above are different.

[0307] For example, the shutter key may be displayed in the first state as follows: Figure 8 The photo control 732 shown in (c) of FIG. 10 ; the shutter button is displayed in the second state as shown in FIG. Fig.10 The photo taking control 761 is shown.

[0308] For example, the shutter key may be displayed in the first state as follows: Figure 8 The photo control 732 shown in (c) of FIG. 10 ; the shutter button is displayed in the second state as shown in FIG. Fig.11 The photo taking control 771 is shown.

[0309] Optionally, the determining, based on the size of the first operating memory, a first number of photos to be taken in the first mode includes:

[0310] Based on the size of the first operating memory and the size of the third operating memory, a first number of photos taken using the first mode is determined, and the third operating memory is the operating memory occupied when taking a photo once using the first mode.

[0311] It should be noted that the size of the running memory occupied by a camera application for taking a photo using different shooting modes is different; therefore, the first quantity can be determined based on the size of the running memory required for taking a photo using the shooting mode adopted by the electronic device in real time.

[0312] For example, the photographing mode adopted in real time may refer to the photographing mode adopted by the preview interface of the camera application before a click operation on the shutter key is detected.

[0313] For example, after the electronic device opens the camera application, it enters the normal photo mode; displays the preview interface of the normal photo mode; detects a click operation on the control of the portrait photo mode, and in response to the click operation, displays the preview interface of the portrait photo mode; detects a click operation on the shutter key, then when the electronic device meets the first preset condition, it can determine the first quantity based on the size of the running memory occupied by taking a photo using the portrait photo mode and the size of the first running memory.

[0314] Optionally, the third operating memory includes:

[0315] The running memory occupied by collecting the original image data when taking a photo using the first mode, the running memory occupied by image processing when taking a photo using the first mode, and the running memory occupied by each image processing algorithm in image processing when taking a photo using the first mode.

[0316] Exemplarily, when a photo is taken using the first mode, the running memory occupied by collecting the original image data may refer to the running memory occupied by collecting the Raw image when the photo is taken using the first mode; when a photo is taken using the first mode, the running memory occupied by image processing may refer to the running memory occupied by the entire image processing framework process when the photo is taken using the first mode; the image processing framework process may include multiple algorithm processing steps, and the running memory occupied by each algorithm processing step may refer to the running memory occupied by each image processing algorithm in the image processing.

[0317] For example, the running memory occupied by image processing may refer to the running memory occupied by the ISP processing flow; the running memory occupied by each image processing algorithm in image processing may refer to the running memory occupied by each algorithm in the ISP processing flow.

[0318] Optionally, the third operating memory may refer to Figure 5 The "operating memory occupied by a photo shoot" described in S403 can be found in Figure 5 The relevant description will not be repeated here.

[0319] Optionally, the photo processing method further includes:

[0320] Determine whether the size of the first running memory is greater than the size of the running memory occupied by M photos, where the M photos all adopt the first mode, and M is an integer greater than 1;

[0321] Determining a first number of photos taken in the first mode based on the size of the first operating memory includes:

[0322] If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is greater than the size of the running memory occupied by one photo taken using the first mode, the first number of photos taken using the first mode is determined based on the size of the first running memory.

[0323] For example, the above implementation can be seen in Figure 5 The relevant description will not be repeated here.

[0324] In an embodiment of the present application, after the camera application is turned on, when the electronic device meets the first preset condition, the size of the running memory occupied by M photos can be compared with the size of the first running memory of the electronic device (for example, the running memory in an available state). If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is larger than the size of the running memory occupied by taking a photo once using the first mode, it means that the size of the running memory in the available state in the electronic device is insufficient to support M photos using the first mode. At this time, based on the size of the first running memory, a first number of photos taken using the first mode can be determined. Based on the first number, the camera application or a third-party camera application controls the display state of the shutter key. Therefore, in continuous photo shooting scenarios, the electronic device can avoid problems such as freezing during photo shooting or forced shutdown of the photo shooting process. The user's photo shooting experience is improved.

[0325] Optionally, the determining, based on the size of the first operating memory, a first number of photos to be taken in the first mode includes:

[0326] If the size of the first operating memory is smaller than the preset size of the operating memory, a first number of photos to be taken in the first mode is determined based on the size of the first operating memory.

[0327] For example, the above implementation can be seen in Figure 6 The relevant description will not be repeated here.

[0328] In an embodiment of the present application, after the camera application is turned on, when the electronic device meets the first preset condition, the size of the preset running memory can be compared with the size of the first running memory in the electronic device (for example, the running memory in an available state). If the size of the first running memory is less than or equal to the size of the preset running memory, it means that the size of the running memory in the electronic device in an available state is insufficient. At this time, based on the size of the first running memory, a first number of photos taken in the first mode can be determined. Based on the first number, the camera application or a third-party camera application controls the display status of the shutter key. Therefore, in continuous photo shooting scenarios, problems such as the electronic device being stuck during the photo shooting process or the photo shooting being forced to be closed can be avoided, thereby improving the user's photo shooting experience.

[0329] Optionally, the above method also includes: sending a first quantity.

[0330] Exemplarily, a first number is sent to a camera application or a third-party camera application; the camera application or the third-party camera application can switch the state of the shutter key based on the first number, thereby controlling the electronic device to take a picture or not to take a picture; thereby avoiding problems such as the camera application being forced to close during the photo-taking process due to insufficient running memory of the electronic device, thereby improving the user's photo-taking experience.

[0331] Optionally, sending the first quantity includes:

[0332] If the first amount is greater than the second threshold, sending the first amount;

[0333] If the first quantity is less than or equal to the second threshold, the first quantity and a prompt message of the first quantity are sent.

[0334] In an embodiment of the present application, if the first number is less than or equal to the second threshold, the electronic device can display a prompt message of the first number; thereby, in a continuous photo shooting scenario, it can avoid problems such as the electronic device freezing during the photo shooting process, or the photo shooting being forced to close, thereby improving the user's photo shooting experience.

[0335] Optionally, the second threshold may refer to Figure 5 The first preset threshold value shown in S410 can be found in Figure 5 The relevant description of S410 is not repeated here.

[0336] Optionally, the above method further includes:

[0337] The second interface is displayed, wherein the second interface includes a first prompt box, and the first prompt box includes a first amount of prompt information.

[0338] For example, the first prompt box can be Fig. 9Alternatively, the first prompt box may be Fig. 9 The prompt box 751 shown in (b) in FIG.

[0339] In an embodiment of the present application, after a camera application is turned on, when the electronic device meets a first preset condition, the size of a first running memory (for example, a running memory in an available state) in the electronic device can be obtained; based on the size of the first running memory, a first number of photos taken using a first mode (for example, the number of photos taken using the first mode that can be supported by the running memory in an available state) is determined; if the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is displayed in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; and when the shutter key is displayed in the second state, in response to the first operation on the shutter key, the electronic device takes a photo. The device is unable to take pictures; the first state and the second state are different in color, shape and / or pattern; based on the photo processing method of the embodiment of the present application, the number of photos (for example, the first number) that the running memory in the available state can support in the real-time photo mode can be determined based on the size of the running memory in the available state in the electronic device; thereby controlling the shutter key to display different states according to the number of photos; if the first number is less than the first threshold value (for example, the size of the running memory in the available state is small), in response to the first operation of the shutter key, the electronic device is unable to take pictures; thereby in continuous photo shooting scenarios, it is possible to avoid problems such as the electronic device being stuck during the photo shooting process, or the photo shooting being forced to be closed, thereby improving the user's photo shooting experience.

[0340] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0341] Combine the following Figures 8 to 11 An example is given to describe an interface schematic diagram in an electronic device.

[0342] For example, Figure 8 As shown, Figure 8 The graphical user interface (GUI) shown in (a) is a desktop 710 of the electronic device; the electronic device detects a click operation on a control 720 of a camera application on the desktop, such as Figure 8 After the electronic device detects a click operation on the control 720 of the camera application on the desktop, the display is as shown in (b); Figure 8 The display interface 730 shown in (c) in FIG. 7 includes a smart control 731, a photo control 732 and other controls; the electronic device detects a click operation on the smart control 731, such as Figure 8 As shown in (d) in the figure; after the electronic device detects a click operation on the smart control 731, it triggers the electronic device to execute the photo processing method provided in the embodiment of the present application; when the electronic device executes the photo processing method provided in the embodiment of the present application, the electronic device can calculate the number of photos that can be taken by the camera application based on the current idle running memory, and control the camera application to send a photo request instruction based on the number of photos that can be taken N.

[0343] Optionally, the electronic device may display a prompt message indicating the number N of photos that can be taken.

[0344] Optionally, when the number of photos that can be taken N is less than a first preset threshold (for example, 10 photos), the electronic device may display a prompt message “the number of photos that can be taken is N”, such as Fig. 9 The prompt box 741 shown in (a) in FIG.

[0345] Optionally, when the number of photos that can be taken N is less than a first preset threshold, the electronic device may display a prompt message “operation is too frequent”, such as Fig. 9 The prompt box 751 shown in (b) in FIG.

[0346] Optionally, when the number N of photos that can be taken is less than a first preset threshold, the electronic device can gray out the photo control, such as Fig.10 The display interface 760 shown includes a grayed-out photo control 761; it can be understood that when the electronic device grays out the photo control, the user cannot click on the photo control to take a photo; the electronic device grays out the photo control to prompt the user that the photo cannot be taken at the moment.

[0347] Optionally, when the number N of photos that can be taken is less than a first preset threshold, the electronic device can adjust the pattern of the photo control, such as Fig.11 The display interface 770 shown in the figure includes a photo control 771 with an adjusted pattern. It can be understood that if the electronic device adjusts the pattern of the photo control, the user cannot click the photo control to take a photo. The electronic device adjusts the pattern of the photo control to prompt the user that the photo cannot be taken at present. Adjusting the pattern of the photo control can refer to adjusting the pattern of the photo control to be different from the pattern of the photo control when the photo can be taken. For example, adjusting the pattern of the photo control to be different from the pattern of the photo control when the photo can be taken. Figure 8 The photo taking control 732 shown in (c) is different.

[0348] Optionally, in an embodiment of the present application, the appearance of a photo control (also referred to as a shutter key) is different when the photo control is displayed in a first state and when the photo control is displayed in a second state; the appearance may refer to the color of the photo control, or the shape of the photo control, or the pattern of the photo control, or two or more of the above.

[0349] It should be understood that the above description uses the example of an electronic device detecting a click operation as an example; the above click operation may also be a voice instruction operation, or other operations that instruct the electronic device to make a selection; the above description is an example and does not impose any limitation on the present application.

[0350] It should be noted that the above is an example description of the display interface in an electronic device, and this application does not impose any limitation on this.

[0351] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0352] Combination of the above Figures 1 to 11 The photo processing method provided by the embodiment of the present application is described in detail; Figure 12 to Figure 13 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

[0353] Fig.12 800 is a schematic diagram of a structure of an electronic device provided in an embodiment of the present application. The electronic device 800 includes a processing module 810 and a display module 820 .

[0354] Among them, the processing module 810 is used to open the camera application; the display module 820 is used to display a first interface, and the first interface includes a shutter key; the processing module 810 is also used to obtain the size of a first running memory when a first preset condition is met, and the first running memory is a running memory in an available state; based on the size of the first running memory, determine a first number of photos taken using a first mode, the first mode is a photo mode used by the electronic device in real time, and the first number is the number of photos taken using the first mode that can be supported by the first running memory; if the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is displayed in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; when the shutter key is displayed in the second state, in response to the first operation on the shutter key, the electronic device cannot take a photo; the first state and the second state are different in color, shape and / or pattern.

[0355] Optionally, as an embodiment, satisfying the first preset condition includes:

[0356] detecting a second operation on the shutter key, wherein the second operation includes an operation of popping up the shutter key;

[0357] Alternatively, it is detected that the image is saved in the gallery application;

[0358] Alternatively, it is detected that at least part of the memory of the second running memory is released;

[0359] Alternatively, a preset time after detecting that at least part of the memory of the second operating memory is released;

[0360] The second running memory is the running memory occupied by the camera application.

[0361] Optionally, as an embodiment, the processing module 810 is specifically configured to:

[0362] The first number of photos taken using the first mode is determined based on the size of the first running memory and the size of the third running memory, where the third running memory is the running memory occupied when taking a photo once using the first mode.

[0363] Optionally, as an embodiment, the third operating memory includes:

[0364] The running memory occupied by collecting the original image data when taking a photo using the first mode, the running memory occupied by image processing when taking a photo using the first mode, and the running memory occupied by each image processing algorithm in the image processing when taking a photo using the first mode.

[0365] Optionally, as an embodiment, the processing module 810 is further configured to:

[0366] Determine whether the size of the first running memory is greater than the size of the running memory occupied by M photos, where the M photos all adopt the first mode, and M is an integer greater than 1;

[0367] If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is greater than the size of the running memory occupied by one photo taken using the first mode, the first number of photos taken using the first mode is determined based on the size of the first running memory.

[0368] Optionally, as an embodiment, the processing module 810 is specifically configured to:

[0369] If the size of the first operating memory is smaller than the size of the preset operating memory, the first number of photos taken using the first mode is determined based on the size of the first operating memory.

[0370] Optionally, as an embodiment, the processing module 810 is further configured to:

[0371] The first amount is sent.

[0372] Optionally, as an embodiment, the processing module 810 is specifically configured to:

[0373] If the first amount is greater than a second threshold, sending the first amount;

[0374] If the first number is less than or equal to a second threshold, the first number and prompt information of the first number are sent.

[0375] Optionally, as an embodiment, the display module 820 is further used for:

[0376] A second interface is displayed, wherein the second interface includes a first prompt box, and the first prompt box includes the first amount of prompt information.

[0377] Optionally, as an embodiment, the shutter key is displayed in the second state, including:

[0378] The shutter key is displayed in a waiting-to-be-activated state, and the waiting-to-be-activated state includes: the shutter key is grayed out.

[0379] It should be noted that the electronic device 800 is implemented in the form of a functional module. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0380] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0381] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0382] Fig.13 A structural schematic diagram of another electronic device provided by the present application is shown. Fig.13 The dotted line in the figure indicates that the unit or the module is optional; the electronic device 900 can be used to implement the photo processing method described in the above method embodiment.

[0383] The electronic device 910 includes one or more processors 901, which can support the electronic device 900 to implement the photo processing method in the method embodiment; the processor 901 can be a general-purpose processor or a special-purpose processor. For example, the processor 901 can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, such as discrete gates, transistor logic devices or discrete hardware components.

[0384] Optionally, the processor 901 may be used to control the electronic device 900, execute software programs, and process data of the software programs. The electronic device 900 may also include a communication unit 905 to implement input (reception) and output (transmission) of signals.

[0385] For example, the electronic device 900 may be a chip, the communication unit 905 may be an input and / or output circuit of the chip, or the communication unit 905 may be a communication interface of the chip, and the chip may be a component of a terminal device or other electronic devices.

[0386] For another example, the electronic device 900 may be a terminal device, and the communication unit 905 may be a transceiver of the terminal device, or the communication unit 905 may include one or more memories 902 on which a program 904 is stored. The program 904 may be executed by the processor 901 to generate instructions 903, so that the processor 901 executes the photo processing method described in the above method embodiment according to the instructions 903.

[0387] Optionally, data may also be stored in the memory 902 .

[0388] Optionally, the processor 901 may also read data stored in the memory 902 . The data may be stored at the same storage address as the program 904 , or may be stored at a different storage address from the program 904 .

[0389] Optionally, the processor 901 and the memory 902 may be provided separately or integrated together, for example, integrated on a system on chip (SOC) of the terminal device.

[0390] Exemplarily, the memory 902 can be used to store the related program 904 of the photographing processing method provided in the embodiment of the present application, and the processor 901 can be used to call the related program 904 of the photographing processing method stored in the memory 902 when executing the photographing processing method, and execute the photographing processing method of the embodiment of the present application; for example, start the camera application; display the first interface, the first interface includes a shutter button; when the first preset condition is met, obtain the size of the first running memory, the first running memory is the running memory in the available state; based on the size of the first running memory, determine the first number of photos taken using the first mode, the first mode is the electronic device The photo mode adopted in real time, the first number is the number of times the first running memory can support taking photos using the first mode; if the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; if the first number is less than the first threshold, the shutter key is displayed in a second state; wherein, when the shutter key is displayed in the first state, in response to a first operation on the shutter key, the electronic device takes a photo; when the shutter key is displayed in the second state, in response to the first operation on the shutter key, the electronic device cannot take a photo; the first state is different from the second state in color, shape and / or pattern.

[0391] Optionally, the present application also provides a computer program product, which, when executed by the processor 901, implements the photo processing method in any method embodiment of the present application.

[0392] For example, the computer program product may be stored in the memory 902 , such as a program 904 , which is finally converted into an executable target file that can be executed by the processor 901 after preprocessing, compiling, assembling, and linking.

[0393] Optionally, the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the photo processing method described in any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.

[0394] For example, the computer-readable storage medium is, for example, a memory 902. The memory 902 may be a volatile memory or a non-volatile memory, or the memory 902 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0395] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0396] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0397] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the embodiments of the electronic device described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0398] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0399] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0400] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0401] In addition, the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0402] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0403] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims. In short, the above is only a preferred embodiment of the technical solution of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A photo processing method, characterized in that: Used in electronic equipment, including: Open the Camera app; Displaying a first interface, wherein the first interface includes a shutter button; When a first preset condition is met, obtaining a size of a first running memory, where the first running memory is a running memory in an available state; Determine, based on the size of the first running memory, a first number of photos taken in a first mode, where the first mode is a photo taking mode used by the electronic device in real time, and the first number is the number of photos taken in the first mode that can be supported by the first running memory; If the first number is greater than or equal to a first threshold, the shutter key is displayed in a first state; If the first number is less than a first threshold, the shutter key is displayed in a second state; Among them, when the shutter key is in the first state, the electronic device takes a photo in response to a first operation on the shutter key; when the shutter key is in the second state, the electronic device does not take a photo in response to the first operation on the shutter key.

2. The photographing processing method according to claim 1, characterized in that: The first preset condition is met, including: detecting a second operation on the shutter key, wherein the second operation includes an operation of popping up the shutter key; Alternatively, it is detected that the image is saved in the gallery application; Alternatively, it is detected that at least part of the memory of the second running memory is released; Alternatively, a preset time after detecting that at least part of the memory of the second operating memory is released; The second running memory is the running memory occupied by the camera application.

3. The photographing processing method according to claim 1 or 2, characterized in that: The determining, based on the size of the first operating memory, a first number of photos taken in the first mode includes: The first number of photos taken using the first mode is determined based on the size of the first running memory and the size of the third running memory, where the third running memory is the running memory occupied when taking a photo once using the first mode.

4. The photographing processing method according to claim 3, characterized in that: The third operating memory includes: The running memory occupied by collecting the original image data when taking a photo using the first mode, the running memory occupied by image processing when taking a photo using the first mode, and the running memory occupied by each image processing algorithm in the image processing when taking a photo using the first mode.

5. The photographing processing method according to any one of claims 1 to 4, characterized in that: Also includes: Determine whether the size of the first running memory is greater than the size of the running memory occupied by M photos, where the M photos all adopt the first mode, and M is an integer greater than 1; The determining, based on the size of the first operating memory, a first number of photos taken in the first mode includes: If the size of the first running memory is less than or equal to the size of the running memory occupied by M photos, and is greater than the size of the running memory occupied by one photo taken using the first mode, the first number of photos taken using the first mode is determined based on the size of the first running memory.

6. The photographing processing method according to any one of claims 1 to 4, characterized in that: The determining, based on the size of the first operating memory, a first number of photos taken in the first mode includes: If the size of the first operating memory is smaller than the size of the preset operating memory, the first number of photos taken using the first mode is determined based on the size of the first operating memory.

7. The photographing processing method according to any one of claims 1 to 6, characterized in that: Also includes: The first number is sent to the camera application or a third-party camera application.

8. The photographing processing method according to claim 7, characterized in that: The sending the first number to the camera application or a third-party camera application includes: If the first number is greater than a second threshold, sending the first number to the camera application or a third-party camera application; If the first number is less than or equal to a second threshold, the first number and prompt information of the first number are sent to the camera application or a third-party camera application.

9. The photograph processing method according to claim 8, characterized in that: Also includes: A second interface is displayed, wherein the second interface includes a first prompt box, and the first prompt box includes the first amount of prompt information.

10. An electronic device, characterized in that: include: one or more processors and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the photo processing method as described in any one of claims 1 to 9.

11. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes the photo processing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the photographing processing method according to any one of claims 1 to 9.