Image processing method and electronic device

WO2025044086A1PCT designated stage expired Publication Date: 2025-03-06HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/078284
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-08
Filing Date
2024-02-23
Publication Date
2025-03-06

Smart Images

  • Figure CN2024078284_06032025_PF_FP_ABST
    Figure CN2024078284_06032025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method and an electronic device. The method comprises: in response to an operation of a user collecting a first image by means of a first terminal device, encoding the first image to obtain a first encoded file; when a first operation of the user is detected and / or the first terminal device meets a first condition, sending the first encoded file to a server; and receiving a second image sent by the server, wherein the second image is obtained by performing cloud enhancement processing on the first image in the first encoded file by the server. According to the method and the electronic device, transmission to a cloud when a terminal device is in a high load, overheating or a poor network condition can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 8, 2023, with application number 202311165317.6 and application name “Image Processing Method and Electronic Device”, the entire contents of which are incorporated by reference into this application.

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on August 29, 2023, with application number 202311103023.0 and application name “Image Processing Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of image processing, and more specifically, to an image processing method and electronic device. Background Art

[0004] In existing device camera systems, after the sensor captures a RAW image, it will undergo a series of processing by the image signal processor (ISP) within the device to obtain a YUV image or RGB image. Different post-processing algorithms are then used according to the scene to finally obtain a processed color image for the user to view.

[0005] However, for some highly integrated devices, such as mobile phones, tablets and other mobile devices, the performance of the processor is limited by size and power consumption, which affects the image processing effect.

[0006] Summary of the Invention

[0007] The present application provides an image processing method and electronic device, through which cloud transmission can be avoided when the terminal device is under high load, overheating or the network condition is poor, thereby avoiding situations such as excessive load and heating of the terminal device due to cloud transmission, and avoiding cloud transmission failure due to poor network, thereby improving the load balancing and cloud transmission success rate during the use of the terminal device.

[0008] In a first aspect, a method for image processing is provided, the method comprising: in response to a user's operation of capturing a first image through a first terminal device, encoding the first image to obtain a first encoded file; when the user's first operation is detected and / or the first terminal device satisfies a first condition, sending the first encoded file to a server; and receiving a second image sent by the server, the second image being obtained by the server by performing cloud enhancement processing on the first image in the first encoded file.

[0009] Optionally, the first condition includes any one or more of the following conditions: the current load of the first terminal device is lower than a first load threshold, the current temperature of the first terminal device is lower than a first temperature threshold, and the current network signal of the first terminal device is higher than a first signal threshold.

[0010] In some embodiments, the first image comprises a RAW image.

[0011] Encoding the first image can save storage space and facilitate transmission.

[0012] The operation of the user capturing the first image through the first terminal device may be, for example, a photo taking operation or a video recording operation.

[0013] In some embodiments, the first load threshold can be, for example, any load value between 50% and 100%, such as 60%; the first temperature threshold can be, for example, any temperature between 37°C and 70°C, such as 45°C; the first signal threshold can be, for example, any signal value between -85DB and 105DB, such as a 95DB network signal above -100DB.

[0014] The cloud enhancement processing may include, for example, overall cloud enhancement performed by the server on the first image, such as noise reduction processing, high dynamic processing, or large aperture blur processing performed on the first image by the cloud.

[0015] In some embodiments, the first encoded file also includes first information related to the encoded first image. The first information may be, for example, metadata of the first image. The first information is used by the server to perform cloud enhancement processing on the first image based on the first information.

[0016] In an embodiment of the present application, when the first image captured by the terminal device needs to be cloud-enhanced, cloud transmission will not be started immediately after the first image is captured. Instead, cloud transmission is started in response to the user's confirmation of the cloud transmission operation, or cloud transmission is automatically started when the current load, temperature and network conditions of the terminal device meet the cloud transmission conditions. In this way, cloud transmission can be avoided when the terminal device is under high load, overheating or poor network conditions, thereby avoiding situations such as excessive load and heating of the terminal device due to cloud transmission, and avoiding situations where cloud transmission fails due to poor network, thereby improving the load balance and the success rate of cloud transmission during the use of the terminal device.

[0017] In combination with the first aspect, in a possible implementation, before sending the first encoded file to the server, the method also includes: in response to the user's second operation, displaying a first interface on the display screen of the first terminal device, the first interface including a first preview image and a first icon, the first preview image being a gallery preview image corresponding to the first image; the user's first operation includes the user clicking the first icon.

[0018] Among them, the first interface refers to the display interface of the first preview image. After completing the photo shooting, the user can enter the display interface of the first preview image by clicking the gallery preview control on the photo shooting interface; the user can also enter the gallery of the first terminal device by clicking the gallery application on the desktop, and further enter the display interface of the first preview image by clicking the target preview image.

[0019] The first preview image is a gallery preview image obtained after pre-processing by the first terminal device, and this operation is performed before encoding the first image.

[0020] In an embodiment of the present application, a method is provided for the user to manually determine cloud transmission. After the user completes taking a photo, if the image is an image that requires cloud enhancement processing, a gallery preview image corresponding to the image will be saved in the gallery of the electronic device. The user can trigger the cloud transmission operation by clicking the cloud enhancement icon on the gallery preview image interface.

[0021] In combination with the first aspect, in a possible implementation, the first interface also includes a first selection control, and the method also includes: when the user selects a first enhancement level through the first selection control, the first encoded file carries first information, and the first information is used to indicate to the server that the degree of portrait enhancement performed on the first image is the first enhancement level, and the cloud enhancement processing includes the portrait enhancement.

[0022] In some examples, the server's cloud enhancement processing of the first image includes first cloud enhancement processing and second cloud enhancement processing, wherein the first cloud enhancement processing is basic cloud enhancement processing, which may include, for example, noise reduction processing, high dynamic processing, or large aperture blur processing, etc.; the second cloud enhancement processing is portrait enhancement processing, which is a portrait enhancement processing based on the first cloud enhancement processing.

[0023] In some embodiments, the degree of the second cloud enhancement processing is divided into levels 0 to 10 according to the enhancement level. The higher the level, the higher the degree of the second cloud enhancement processing. For example, when the level corresponding to the second cloud enhancement processing is 0, it means that the second cloud enhancement processing is not performed.

[0024] In some embodiments, a second encoded file is also sent to the server. The second encoded file may include information indicating the second cloud enhancement level selected by the user, and may also include the intermediate results of the algorithm processing corresponding to the first image, such as: preview YUV images before and after taking pictures, or a JPG image obtained by algorithm processing of the first image, etc.

[0025] In some embodiments, after the user obtains the second image, he or she can view the image that has only been processed by the first cloud enhancement and the image that has been processed by the first cloud enhancement and the second cloud enhancement respectively through the first terminal device, and the user can select the saved image according to his or her own wishes.

[0026] In an embodiment of the present application, the user can select the degree of the second cloud enhancement processing of the image before the image is subjected to cloud enhancement processing, so that the user can obtain an image effect that is more in line with expectations.

[0027] In combination with the first aspect, in a possible implementation, in response to the user's operation of capturing the first image through the first terminal device, encoding the first image to obtain a first encoded file includes: determining whether to enter the cloud enhancement mode according to the current photo-taking scene, wherein in the cloud enhancement mode, the first image needs to be cloud-enhanced by the server; when it is determined to enter the cloud enhancement mode, in response to the user's operation of capturing the first image through the first terminal device, encoding the first image to obtain the first encoded file.

[0028] In an embodiment of the present application, since it is not necessary to perform cloud enhancement processing on the first image captured for all scenes, for example, if there is no portrait in the preview image, or if the current scene is well-lit, cloud enhancement processing is not required, in this embodiment, the terminal device can determine whether to enter the cloud enhancement mode based on the current scene, thereby avoiding unnecessary enhancement processing of the image, thereby saving the power consumption overhead of the terminal device.

[0029] In combination with the first aspect, in a possible implementation method, determining whether to enter the cloud enhancement mode according to the current photographing scene includes: determining whether to enter the cloud enhancement mode according to the current photographing scene, and the current load of the first terminal device and / or the current temperature of the first terminal device; when the current load of the first terminal device is higher than the first load threshold and / or the current temperature of the first terminal device is higher than the first temperature threshold, determining not to enter the cloud enhancement mode.

[0030] In other words, in response to the user's photo-taking operation, the current load of the first terminal device and / or the current temperature of the first terminal device are determined. When the current load of the first terminal device is higher than the first load threshold and / or the current temperature of the first terminal device is higher than the first temperature threshold, it is further determined whether to enter the cloud enhancement mode based on the current photo-taking scene.

[0031] In an embodiment of the present application, when the user takes a photo, if the load or temperature of the terminal device is too high, the cloud enhancement mode will not be entered regardless of whether the current photo-taking scene meets the conditions for entering the cloud enhancement mode, and the first image collected will not be processed on the cloud. Instead, ISP processing and post-processing will be performed on the terminal device side. In this way, the load balancing of the terminal device during use can be further improved.

[0032] In combination with the first aspect, in one possible implementation method, determining whether to enter the cloud enhancement mode is based on the current photo shooting scene, including: obtaining a preview image corresponding to the current photo shooting scene; when a first portrait is detected in the preview image and the first portrait meets the second condition, determining to enter the cloud enhancement mode.

[0033] Among them, the second condition can be: the confidence of the first portrait is higher than the first confidence, and / or the quality score of the first portrait is lower than the first score; the second condition can also be: when the confidence of the first portrait is higher than the first confidence, and / or the quality score of the first portrait is lower than the first score and higher than the second score, it is determined to enter the cloud enhancement mode, and the second score is less than the first score.

[0034] The confidence level of the first person portrait refers to the confidence level that the first person portrait is a real person portrait.

[0035] Among them, the preview image corresponding to the current photo scene can refer to the image in the viewfinder in the photo interface of the first terminal device under the current photo scene, or it can refer to the image in the viewfinder in the photo interface corresponding to when the user presses the photo button.

[0036] It can be understood that: in one example, if the confidence of the first portrait is higher than the first confidence, and / or the quality score of the first portrait is lower than the first score, it means that the display effect of the first image obtained in the photo scene can be improved through cloud enhancement processing.

[0037] It can also be understood that: in one example, if the confidence of the first portrait is higher than the first confidence, and / or the quality score of the first portrait is lower than the first score and higher than the second score, it means that the display effect of the first image obtained by the photo scene can be improved through cloud enhancement processing.

[0038] In an embodiment of the present application, the cloud enhancement mode will be entered only when a portrait is detected in the preview image and the display effect of the portrait can be improved through cloud enhancement processing. In this way, unnecessary enhancement processing of the image can be further avoided, thereby further saving the power consumption overhead of the terminal device.

[0039] In combination with the first aspect, in a possible implementation manner, an area ratio of the first portrait in the preview image is greater than the first area ratio and smaller than the second area ratio.

[0040] It can be understood that: in one example, if the confidence of the first portrait is higher than the first confidence, and / or the quality score of the first portrait is lower than the first score, and the size of the first portrait is moderate, it means that the display effect of the first image obtained in the photo scene can be improved through cloud enhancement processing.

[0041] It can be understood that: in one example, if the confidence of the first portrait is higher than the first confidence, and / or the quality score of the first portrait is lower than the first score and higher than the second score, and the size of the first portrait is moderate, it means that the display effect of the first image obtained in the photo scene can be improved through cloud enhancement processing.

[0042] In an embodiment of the present application, the cloud enhancement mode will be entered only when a portrait is detected in the preview image and the display effect of the portrait can be improved through cloud enhancement processing. In this way, unnecessary enhancement processing of the image can be further avoided, thereby further saving the power consumption overhead of the terminal device.

[0043] In combination with the first aspect, in one possible implementation, determining whether to enter the cloud enhancement mode is based on the current photo scene, including: obtaining a preview image corresponding to the current photo scene; when the current scene is determined to be a high-dynamic scene based on the preview image, determining to enter the cloud enhancement mode; or when the brightness of the current scene is determined to be lower than a first brightness based on the preview image, determining to enter the cloud enhancement mode.

[0044] In combination with the first aspect, in a possible implementation method, in response to the user's operation of capturing a first image through a first terminal device, a first encoded file is obtained by encoding the first image, including: when it is detected that the current shooting mode is cloud camera mode, portrait mode or large aperture mode, in response to the user's operation of capturing a first image through a first terminal device, the first encoded file is obtained by encoding the first image.

[0045] In combination with the first aspect, in a possible implementation, the method further includes: if the second image sent by the server is not received within the first time threshold, obtaining the first image by decoding the first encoded file; obtaining the fourth image by performing a third processing on the first image, the moment when the first time threshold starts timing is the moment when the first encoded file is sent to the server, and the third processing includes image signal processor ISP processing and post-processing.

[0046] Before sending the first encoded file to the server, the first encoded file is saved.

[0047] In one example, the third processing may include noise reduction processing, high dynamic processing, or large aperture blur processing.

[0048] In an embodiment of the present application, during the cloud enhancement processing performed by the terminal device, the terminal device backs up and saves the encoded file on the local end before sending the encoded file to the server. When the terminal device times out and fails to receive the processed image sent by the server, the terminal device can restart the image processing process on this side and further process the image on the local end according to the backed-up encoded file. In this way, high-quality images can be obtained in a timely manner even when the network conditions are poor, which can improve the user experience.

[0049] In combination with the first aspect, in a possible implementation, the method also includes: when it is determined not to enter the cloud enhancement mode, in response to the user's operation of capturing the first image through the first terminal device, performing a third processing on the first image to obtain a fourth image, and the third processing includes image signal processor ISP processing and post-processing.

[0050] In an embodiment of the present application, when it is determined that the current scene is a scene that does not enter the cloud enhancement mode, the captured first image is not processed on the cloud, but the terminal device performs a series of processing on the captured first image on the local end. In this way, there is no need to encode and compress the RAW and transmit it to the cloud, etc., which can avoid some unnecessary power consumption overhead of the terminal device, thereby improving the operating performance and battery life of the terminal device.

[0051] In combination with the first aspect, in a possible implementation, the method also includes: sending a request message to the server, the request message being used to request obtaining the target image stored on the server; and receiving the image sent by the server after adjusting the target image according to the device information of the first terminal device.

[0052] In an embodiment of the present application, the server can adjust the cloud-enhanced image according to the device information of the requested terminal device, so that the image finally obtained by the terminal device is an image that matches its own device information, which can improve the display effect of the image on the terminal device side.

[0053] In a second aspect, a method for image processing is provided, the method comprising: receiving a first encoded file sent by a first terminal device, the first encoded file including an encoded first image; obtaining the first image by decoding the first encoded file; obtaining a second image by performing cloud enhancement processing on the first image; and sending the second image to the first terminal device.

[0054] In an embodiment of the present application, after receiving the first image sent by the terminal device, the server can perform cloud enhancement processing on it and return it to the terminal device after the processing is completed. Due to the high processing performance of the server, the display effect of the processed image obtained on the terminal device can be better.

[0055] In combination with the second aspect, in a possible implementation, before sending the second image to the first terminal device, the method further includes: obtaining a first enhancement level selected by the user; and performing portrait enhancement processing on the second image according to the first enhancement level.

[0056] In an embodiment of the present application, the server may perform basic cloud enhancement processing on the first image and then further perform portrait cloud enhancement processing on it, so that the user can obtain an image that is more in line with the expected effect.

[0057] In combination with the second aspect, in a possible implementation, before sending the second image to the first terminal device, the method also includes: adjusting the second image according to device information of the first terminal device, the device information including screen resolution, screen size or dynamic range information.

[0058] In an embodiment of the present application, the server can adjust the cloud-enhanced image according to the device information of the requested terminal device, so that the image finally obtained by the terminal device is an image that matches its own device information, which can improve the display effect of the image on the terminal device side.

[0059] In combination with the second aspect, in a possible implementation, the method also includes: in response to receiving a first request message sent by a second terminal device, adjusting the second image according to the device information of the second terminal device, the first request message being used to request acquisition of the second image; and sending the adjusted second image to the second terminal device.

[0060] In an embodiment of the present application, the server can adjust the cloud-enhanced image according to the device information of the requested terminal device, so that the image finally obtained by the terminal device is an image that matches its own device information, which can improve the display effect of the image on the terminal device side.

[0061] In a third aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect, or to implement the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0062] In a fourth aspect, a system is provided, comprising: a first electronic device for executing the method in the above-mentioned first aspect or any possible implementation of the first aspect; and a second electronic device for executing the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0063] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program or instruction. When the computer program or instruction is executed, it implements the method in the above-mentioned first aspect or any possible implementation of the first aspect, or implements the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0064] In a sixth aspect, a chip is provided, in which instructions are stored. When the chip is run on a device, the chip executes the method in the above-mentioned first aspect or any possible implementation of the first aspect, or the chip executes the method in the above-mentioned second aspect or any possible implementation of the second aspect, or executes the method in the above-mentioned second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0066] FIG2 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application;

[0067] FIG3 is a schematic diagram of the structure of a device-cloud collaboration system provided in an embodiment of the present application;

[0068] FIG4 is a schematic diagram of the interaction between a mobile phone and the cloud corresponding to an existing image processing method provided in an embodiment of the present application;

[0069] FIG5 is a schematic flow chart of an existing image processing method provided in an embodiment of the present application;

[0070] FIG6 is a schematic flow chart of an image processing method provided in an embodiment of the present application;

[0071] FIG7 is a schematic flow chart of another image processing method provided in an embodiment of the present application;

[0072] FIG8 is a schematic flow chart of another image processing method provided in an embodiment of the present application;

[0073] FIG9 is a schematic flow chart of another image processing method provided in an embodiment of the present application;

[0074] FIG10 is a schematic flow chart of another image processing method provided in an embodiment of the present application;

[0075] FIG11 is a schematic diagram of a process for determining whether to enter a cloud enhancement scenario according to an embodiment of the present application;

[0076] FIG12 is a schematic diagram of a photographing interface and a schematic diagram of a display interface for previewing images in a gallery provided in an embodiment of the present application;

[0077] FIG13 is a schematic diagram of another photographing interface and a schematic diagram of a display interface for gallery preview images provided in an embodiment of the present application;

[0078] FIG14 is a schematic diagram of functional modules of an image processing system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] The technical solutions of this application will be described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, rather than all the embodiments.

[0080] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" or "multiple" refers to two or more than two.

[0081] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0082] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0083] 1 shows a schematic structural diagram of an electronic device 100. 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 194, and a subscriber identification module (SIM) card interface 195. 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.

[0084] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0085] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0086] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0087] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0088] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include 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 subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0089] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0090] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0091] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0092] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0093] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0094] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0095] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0096] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0097] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0098] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

[0100] 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 antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0101] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0102] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0103] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0104] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0105] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0106] Display screen 194 is used to display images, videos, and the like. 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 MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0107] 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.

[0108] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0109] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion 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 or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0110] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0111] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0112] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0113] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0114] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an App required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0115] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0116] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0117] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0118] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0119] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0120] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0121] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0122] The gyroscope 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., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope 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 gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0123] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0124] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0125] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

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

[0127] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0128] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0129] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0130] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0131] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.

[0132] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

[0133] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0134] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0135] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0136] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an embedded SIM (eSIM) card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0137] It should be understood that the phone card in the embodiments of the present application includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.

[0138] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0139] Figure 2 is a software structure diagram of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer, from top to bottom. The application layer can include a series of application packages.

[0140] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0141] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0142] As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0143] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0144] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0145] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0146] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

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

[0148] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0149] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0150] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0151] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0152] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0153] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0154] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0155] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0156] A 2D graphics engine is a drawing engine for 2D drawings.

[0157] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0158] It should be understood that the technical solutions in the embodiments of the present application can be used in Android, IOS, Hongmeng and other systems.

[0159] The technical solutions of the embodiments of the present application can be applied to electronic devices. For example, they can be applied to electronic devices such as mobile phones, foldable screens, and tablets. The main application scenario can be the scene of taking pictures through electronic devices, specifically, the image processing scenario of electronic devices.

[0160] More specifically, the technical solutions in the embodiments of the present application can be applied to an end-cloud collaboration system consisting of a terminal device and a cloud. The "end" in end-cloud collaboration refers to the terminal device, and the "cloud" refers to the cloud, which can also be called a cloud server or cloud platform. For example, FIG3 shows a structural diagram of an end-cloud collaboration system provided in an embodiment of the present application. As shown in FIG3, the end-cloud collaboration system may include: a terminal device 310 and a cloud 320. The terminal device 310 can be connected to the cloud 320 via a wireless network.

[0161] In one embodiment, the cloud 320 may be a computer server or a server cluster consisting of multiple servers. This application does not limit the implementation architecture of the cloud 320. The specific form of the terminal device 310 can refer to the embodiment shown in Figure 1 or Figure 2 above and will not be repeated here.

[0162] Optionally, FIG3 shows an exemplary terminal device 310. However, it should be understood that the terminal device 310 in the end-cloud collaborative system may include one or more terminal devices 310, and the multiple terminal devices 310 may be the same or different, without limitation. The image processing method provided in the embodiment of the present application is a process for implementing image processing by interacting between each terminal device 310 and the cloud 320.

[0163] The electronic device in the embodiment of the present application (i.e., the above-mentioned terminal device) can be a television, a desktop computer, a laptop computer, or a portable electronic device such as a mobile phone, a tablet computer, a camera, a video camera, a video recorder, or other electronic devices with a camera function, an electronic device in a 5G network, or an electronic device in a future evolved public land mobile communication network (public land mobile network, PLMN), etc. This application does not limit this.

[0164] In existing device camera systems, after the sensor captures a RAW image, it undergoes a series of processing by the device's image signal processor (ISP) to produce a YUV or RGB image. Different post-processing algorithms are then applied based on the scene, ultimately resulting in a processed color image for the user to view. YUV is a type of true-color color space, "Y" represents luminance (Luminance or Luma), or the grayscale value, while "U" and "V" represent chrominance (Chrominance or Chroma), which describes the image's color and saturation and is used to specify the color of a pixel. RGB represents the colors of the three channels: red, green, and blue. This standard encompasses almost all colors that human vision can perceive, making it one of the most widely used color systems.

[0165] However, for some highly integrated devices, such as mobile phones, tablets and other mobile devices, the performance of the processor is limited by size and power consumption, which will affect the image processing effect. In order to improve the image processing effect, the industry has proposed a method of image processing with the help of the image processing capabilities of cloud servers.

[0166] For example, Figure 4 shows a schematic diagram of the interaction between a mobile phone and a cloud corresponding to an existing image processing method provided by an embodiment of the present application, wherein the terminal side refers to the mobile phone side, and the cloud side refers to the cloud side.

[0167] As shown in Figure 4, the mobile phone includes a camera module, an encoding module, and a scene detection module, while the cloud includes a decoding module, a RAW domain post-processing module, an ISP module, a YUV domain post-processing module, and a first format encoder. The scene detection module detects the current photo scene. When a user takes a photo with their phone, the phone uses the camera module to capture the RAW image corresponding to the current photo scene. Then, the mobile phone can encode the RAW image captured by the camera module through the encoding module to obtain the encoded code stream corresponding to the RAW image, and upload the encoded code stream corresponding to the RAW image to the cloud; the cloud can decode the encoded code stream corresponding to the RAW image from the mobile phone through the decoding module to obtain a reconstructed RAW image, and the reconstructed RAW image can be sequentially subjected to RAW domain image processing, ISP processing, and YUV domain image processing through the RAW domain post-processing module, and the YUV domain post-processing module will output a frame of YUV image; the YUV image output by the YUV domain post-processing module can be encoded in the first format through the first format encoder, and finally an image in the first format (such as a JPEG image) is obtained; then, the cloud can transmit the image in the first format back to the mobile phone; thereby, the mobile phone can save the image in the first format in the gallery or present it to the user, and can also save the processed high-quality user image to the server.

[0168] In this method, the big data resources and computing resources of the cloud can be used for image processing to achieve better image processing effects; however, in order to enhance the image with the help of the cloud's capabilities, it is necessary to add additional modules such as RAW image encoding, compression, storage and network transmission. These processes will greatly increase the power consumption of the mobile phone, causing the mobile phone's battery life to decrease or heat up; in this method, as long as the photo is triggered, the RAW will be encoded and uploaded to the cloud for processing, which places too high requirements on the power consumption load capacity of the terminal device, and may easily cause the terminal device to have problems such as heating and freezing; in addition, when there is a problem with the network connecting the terminal device and the cloud, the image processing will fail.

[0169] For example, FIG5 shows a schematic flow chart of an existing image processing method 500 provided in an embodiment of the present application. As shown in FIG5 , the method 500 includes:

[0170] S501: Determine encoding-related information corresponding to the nude image to be processed according to feature information of the nude image to be processed.

[0171] The feature information of the naked image refers to the feature value of each coding unit in the naked image, and the feature value includes at least one of brightness, smoothness, edge strength, edge direction consistency, and texture complexity.

[0172] The coding related information includes subjective distortion related information of each coding unit, and may also include coding parameters of each coding unit. The subjective distortion related information is used to optimize the subjective quality of the image, and the coding parameters include quantization parameters.

[0173] S502: Encoding the naked image to be processed according to the encoding related information.

[0174] In this method, the encoded raw image is transmitted to a cloud server via the network, whereupon the cloud server's image optimization module optimizes the decoded and reconstructed raw image, further achieving more optimized image processing performance and significantly improving the subjective quality of the final image. However, in order to leverage cloud capabilities to enhance images, additional modules are required for encoding, compressing, saving, and transmitting the RAW image over the network. These processes significantly increase the phone's power consumption, resulting in reduced battery life or overheating. In this method, as soon as a photo is triggered, the RAW image is encoded and uploaded to the cloud for processing. This places excessive demands on the terminal device's power consumption capacity, easily leading to overheating, lags, and other issues. Furthermore, network problems can cause image processing to fail.

[0175] Therefore, existing image processing methods have the problems of poor image processing effect or high power consumption during the image processing process, and also have the problem of poor end-cloud coordination when the network is abnormal.

[0176] In view of this, the present application provides an image processing method and electronic device. In this method, not all images output in all scenarios will be subjected to cloud enhancement processing. When it is determined that the image output in the current scene does not require cloud enhancement processing, it will not be processed on the cloud, and will not be encoded and compressed, etc., which can save the power consumption of the electronic device; and when it is determined that the output image needs to be cloud enhanced, the cloud transmission will not be directly started, but the cloud transmission will be started only when the user confirms that the cloud transmission and / or the power, temperature of the electronic device and the current network meet the cloud requirements, which can avoid the electronic device from consuming too much power, that is, it can avoid the electronic device from heating and freezing, etc.; in addition, when the network is abnormal, the cloud transmission will not be started until the network returns to normal, which can avoid the cloud failure caused by cloud transmission during network abnormality.

[0177] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of this application and the appended claims, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.

[0178] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "one embodiment," "some embodiments," "another embodiment," and "other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically stated. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically stated.

[0179] For example, FIG6 shows a schematic flow chart of an image processing method 600 provided in an embodiment of the present application. As shown in FIG6 , the current shooting mode is the cloud enhancement mode, and the method 600 includes:

[0180] Among them, the cloud enhancement mode refers to a mode in which the currently captured image needs to be processed by the cloud.

[0181] S601: In response to a user's operation of capturing a first image through a first terminal device, the first terminal device encodes the captured first image and first information related to the first image to obtain a first encoded file.

[0182] In some embodiments, the first image comprises a RAW image.

[0183] Encoding the first image can save storage space and facilitate transmission.

[0184] The operation of the user capturing the first image through the first terminal device may be, for example, a photo-taking operation or a video-recording operation. The first information related to the first image refers to metadata corresponding to the first image. The first information related to the first image may include one or more of exposure parameters for describing the first image, image size, acquisition device information (i.e., device information of the first terminal device), scene information, and shooting mode information. In addition, the first information related to the first image may also include other information for describing the first image, which is not limited in this application.

[0185] It should be understood that the number of first images collected and encoded by the first terminal device can be one or more, and the specific number can be determined according to the current scenario. The number of first images collected and encoded in different scenarios may also be different.

[0186] In one example, compared with a well-lit scene, the signal-to-noise ratio of the image in a low-light scene (i.e., a low-brightness scene) is lower. During the cloud enhancement processing, the more images there are, the more conducive to improving the signal-to-noise ratio of the image. Therefore, the number of first images captured and encoded in the low-light scene (which can also be understood as the number of frames of the first image captured and encoded) is greater.

[0187] In yet another example, a plurality of first images of different exposure types may be acquired and encoded in a high dynamic scene.

[0188] In another example, in a large aperture photography mode or other scenarios requiring data from multiple cameras, multiple first images are captured and encoded through multiple cameras.

[0189] S602: The first terminal device saves the first encoded file.

[0190] The first terminal device stores the first encoded file temporarily.

[0191] S603: The first terminal device performs a first process on the first image to obtain a gallery preview image corresponding to the first image.

[0192] Among them, the first processing can be that the first terminal device pre-processes the first image through the ISP of the first terminal device, and the obtained gallery preview image corresponding to the first image is saved in the gallery application of the first terminal device for presentation to the user when the user enters the gallery to browse images.

[0193] In some embodiments, in the interface where the user browses the gallery preview image, the gallery preview image is associated with a first control, and the first control is used for the user to execute an operation of starting cloud transmission.

[0194] In some embodiments, the gallery preview image is further associated with a second control, which is used for the user to select the degree of second cloud enhancement, where the second cloud enhancement is a portrait enhancement based on the first cloud enhancement.

[0195] In one implementation, the first control may be a cloud transmission icon. When the user clicks the first control, the cloud transmission is started. The user may also pause the cloud transmission by clicking the first control again.

[0196] In one implementation, the first cloud enhancement refers to the overall cloud enhancement of the first image, for example, the cloud may perform noise reduction processing, high dynamic processing, or large aperture blur processing on the first image; the degree of the second cloud enhancement may, for example, refer to the degree of further portrait enhancement based on the image after the first cloud enhancement processing. The degree of the second cloud enhancement can be represented by a level, for example, it can be represented by level 0 to level 10. The larger the number, the greater the degree of the second cloud enhancement.

[0197] Among them, the first terminal device performs a first processing on the first image, which may be to only perform some simple ISP processing on the first image to obtain a corresponding YUV image, and then directly convert the YUV image into an RGB format preview screen to be displayed in the gallery preview interface.

[0198] S604: In response to the user confirming the cloud migration operation, and / or when the first terminal device meets the cloud migration conditions, the first encoded file is sent to the server.

[0199] In some embodiments, the first terminal device will also send a second encoded file to the server, wherein the second encoded file may include information for indicating the second cloud enhancement degree selected by the user, and may also include the intermediate results of the algorithm processing corresponding to the first image, such as: preview YUV images before and after taking pictures, or a JPG image obtained by algorithm processing of the first image, etc.

[0200] The first encoded file and the second encoded file may be sent separately or in a package.

[0201] Among them, the cloud conditions include that the current load of the first terminal device is lower than the first load threshold, the current temperature is lower than the first temperature threshold and / or the current network signal is normal.

[0202] In one embodiment, after the user completes shooting, if the current load of the first terminal device is lower than the first load threshold, the current temperature is lower than the first temperature threshold, and the current network signal is normal, the background automatically starts the cloud transmission, that is, the first encoded file is sent to the server (or the first encoded file and the second encoded file are sent); if the first terminal device does not meet the conditions of "the current load is lower than the first load threshold, the current temperature is lower than the first temperature threshold, and the current network signal is normal", the cloud transmission is started when the first terminal device meets the conditions. After the user completes shooting, he can exit the camera application, and the camera switches to background operation. When the first terminal device meets the conditions, the cloud transmission is started in the background.

[0203] In another embodiment, after the user completes shooting, he clicks on the gallery icon in the photo taking interface of the first terminal device to enter the display interface of the gallery preview image, or clicks on the gallery icon on the desktop of the first terminal device to enter the display interface of the gallery preview image. At this time, if the user does not click on the first control in the display interface of the gallery preview image, the cloud transmission is started when the current load of the first terminal device is lower than the first load threshold, the current temperature is lower than the first temperature threshold, and the current network signal is normal; if the user clicks on the first control in the display interface of the gallery preview image, the cloud transmission is started directly with the user's needs as the priority; or, if the user clicks on the gallery preview image , it is further determined whether the condition "the current load of the first terminal device is lower than the first load threshold, or the current temperature is lower than the first temperature threshold, or the current network signal is normal" is met. If so, cloud transmission is initiated. If not, cloud transmission is started when the condition is not met; or, if the user clicks on the first control in the display interface of the gallery preview image, it is further determined whether the condition "the current load of the first terminal device is lower than the first load threshold, or the current temperature is lower than the first temperature threshold, and the current network signal is normal" is met. If so, cloud transmission is initiated. If not, cloud transmission is started when the condition is not met.

[0204] Among them, the first load threshold can be, for example, any load value between 50% and 100%, such as 60%; the first temperature threshold can be, for example, any temperature between 37°C and 70°C, such as 45°C; the network signal is normal can mean that the network signal is higher than the first signal threshold, and the first signal threshold can be, for example, any signal value between -85DB and 105DB, such as 95DB.

[0205] It should be understood that the order in which S603 and S604 occur is not limited, and they may occur simultaneously or at different times.

[0206] S605: The server decodes the first encoded file to obtain a first image and first information related to the first image.

[0207] In some embodiments, the server can also decode the second encoded file to obtain information indicating the second cloud enhancement level selected by the user and / or the intermediate result of the algorithm processing corresponding to the first image, such as: a preview YUV image before and after taking the photo or a JPG image obtained by algorithm processing of the first image, etc.

[0208] S606: The server performs a second process on the first image based on the first information related to the first image to obtain a second image, and encodes the second image.

[0209] The second processing includes the first cloud enhancement processing, or the second processing includes the first cloud enhancement processing and the second cloud enhancement processing.

[0210] In some embodiments, the server performs second processing on the first image based on the first information related to the first image and the information indicating the second cloud enhancement degree selected by the user and / or the intermediate result of the algorithm processing corresponding to the first image to obtain the second image.

[0211] In one example, the server performs a second process on the first image based on scene information related to the first image, shooting mode information, and a second cloud enhancement level selected by the user.

[0212] In some embodiments, the server may further adjust the second image according to the device information of the first terminal device, so that the second image returned to the first terminal device is more compatible with the first terminal device.

[0213] The processed first image may be one or more first images captured by a single camera; may be multiple first images captured by multiple cameras; or may be multiple first images captured by multiple terminal devices.

[0214] In some embodiments, when the shooting mode related to the first image is a large aperture shooting mode, the captured first image may be multiple first images captured by multiple cameras, and the above-mentioned second processing may be to calculate the depth information based on the multiple first images captured by the multiple cameras to achieve a blurring effect.

[0215] In some embodiments, when the shooting mode related to the first image is a large aperture shooting mode, the captured first image may be multiple first images captured by multiple terminal devices, and the above-mentioned second processing may be a joint processing of multiple RAW images captured by multiple terminal devices, and 3D modeling or scene fusion editing thereof; the above-mentioned second processing may also include differentiated processing based on device information of multiple terminal devices. For example, when the requested terminal device is a high-resolution large-screen device, a high-resolution image will be processed and output; when the terminal device requesting the image is a low-resolution device, a low-resolution image will be output; for another example, the dynamic range and contrast of the output image may also be adjusted according to the display dynamic range of the requested terminal device to adapt to the display capabilities of the requested terminal device.

[0216] In some embodiments, in response to the image processing request of the first terminal device, the second image output by the server can be displayed in a hierarchical manner on the first terminal device, that is, the image after the first cloud enhancement processing and the second cloud enhancement processing can be displayed on the terminal device, and the image after only the first cloud enhancement processing can also be displayed. Specifically, the user can browse the images after the first cloud enhancement processing and the second cloud enhancement processing and the image after only the first cloud enhancement processing on the first terminal device, and select the image he wants to save from them.

[0217] It should be understood that the format of the encoded second image depends on the format supported by the first terminal device. Usually, the format of the encoded second image is JPEG format.

[0218] S607: The server sends the encoded second image to the first terminal device.

[0219] S608: The first terminal device saves the second image in the gallery.

[0220] Specifically, after decoding the encoded second image, the first terminal device saves it in the gallery of the first terminal device. The second image can replace the corresponding gallery preview image in the first terminal device.

[0221] In some embodiments, the user can browse the second image after the first enhancement process and the second enhancement process in the gallery. If the user is satisfied with the second image, the user can save it directly. If the user is not satisfied with the portrait enhancement of the second image, the user can browse and save the image after only the first enhancement process.

[0222] S609: The first terminal device deletes the saved first encoded file.

[0223] In the embodiment of the present application, when the image captured by the terminal device needs to be cloud-enhanced, the cloud transmission is not started immediately after the image is captured. Instead, the cloud transmission is started in response to the user's confirmation of the cloud transmission operation, or the cloud transmission is automatically started when the current load, temperature and network conditions of the terminal device meet the cloud transmission conditions. In this way, cloud transmission can be avoided when the terminal device is under high load, overheated or the network conditions are poor, thereby avoiding situations such as excessive load and heating of the terminal device due to cloud transmission, and avoiding situations such as cloud transmission failure due to poor network conditions, thereby improving the load balance and cloud transmission success rate during the use of the terminal device.

[0224] Moreover, in the scenario where the collected images are cloud-enhanced, the terminal device itself will not perform a series of complex processing on the collected images. Instead, it will generate a gallery preview image through simple pre-processing for users to browse, which can also save the power consumption of the terminal device to a certain extent.

[0225] For example, based on the embodiment shown in FIG6 , FIG7 shows a schematic flow chart of another image processing method 700 provided in an embodiment of the present application. As shown in FIG7 , the method 700 includes:

[0226] S701: In response to a second operation of the user, determine to enter the cloud enhancement mode according to the current scenario.

[0227] The second operation of the user may be an operation of the user opening the camera of the first terminal device to enter the photo taking interface; or it may be a photo taking operation of the user, such as the user pressing a photo taking button.

[0228] Exemplarily, the user opens the camera of the first terminal device to enter the photo interface, for example, the user can enter the photo interface by clicking or touching the camera icon on the desktop of the first terminal device. The first terminal device can start the camera in response to the user's click or touch operation on the camera icon (or the user can also start the camera through a voice assistant, without limitation). After starting the photo application, the first terminal device will present the photo interface to the user. At the same time, the first terminal device will also obtain a preview image corresponding to the current photo scene and display it in the photo interface, and the image will be displayed in the viewfinder of the photo interface. When the photo application of the first terminal device is started, the photo interface presented to the user by the first terminal device may include at least: a preview image and a photo button.

[0229] Optionally, in response to the user's second operation, the current preview image is obtained, the current scene is determined based on the preview image, and whether to enter the cloud enhancement mode is further determined based on the current scene, wherein the preview image may refer to the image displayed in the viewfinder on the photo interface before the user performs the photo operation, or may refer to the image displayed in the viewfinder on the photo interface when the user performs the photo operation.

[0230] In some embodiments, if a portrait or a night scene (or described as a low-light scene) is detected in the preview image, it is determined to enter the cloud enhancement mode.

[0231] In some embodiments, if the preview image detects that the current scene is a high-dynamic-range scene (i.e., an HDR scene), then a decision is made to enter cloud enhancement mode. In one example, whether the current photo scene is a high-dynamic-range scene is determined based on the proportion of overexposed and / or underexposed areas in the preview image. For example, if the proportion of overexposed areas is greater than a certain threshold, then the current photo scene is determined to be a high-dynamic-range scene. Exemplarily, the threshold may be 60%, 70%, etc., which is not limited here.

[0232] In some embodiments, if the user selects the large aperture shooting mode, it is determined to enter the cloud enhancement mode.

[0233] In some embodiments, if the user manually selects the cloud enhancement mode, it is determined to enter the cloud enhancement mode.

[0234] In some embodiments, a deep learning network is used to determine whether to enter the cloud enhancement mode. The deep learning network can determine whether the scene corresponding to the current preview image belongs to a scene with high computing power requirements (i.e., the above-mentioned portrait, night scene, high dynamic scene, etc.). At the same time, the deep learning network can also perform image quality assessment (IQA) on the preview image to determine the imaging quality of the current scene, and then determine whether the first image captured by the current scene can be improved in image quality through cloud enhancement. If the result output by the deep learning network is that the first image captured by the current scene can be improved in image quality through cloud enhancement (for example: the deep learning network determines that the scene corresponding to the current preview image belongs to any of the portrait, night scene, and high dynamic scene, and the quality score of the first image captured by the current scene is lower than the first score; for another example: the deep learning network determines that the scene corresponding to the current preview image belongs to a portrait scene, and the confidence level of the detected portrait is lower than the first confidence level), then it is determined to enter the cloud enhancement mode.

[0235] In some embodiments, in response to the user's second operation, whether to enter the cloud enhanced mode is determined based on the current scenario, the current load of the first terminal device and / or the current temperature of the first terminal device. When the current load of the first terminal device is higher than the first load threshold and / or the current temperature of the first terminal device is higher than the first temperature threshold, it is determined not to enter the cloud enhanced mode.

[0236] In some embodiments, in response to the user's second operation, whether to enter the cloud enhanced mode is determined based on the current scene, the current load of the first terminal device and / or the current temperature of the first terminal device. When the current load of the first terminal device is lower than the first load threshold and / or the current temperature of the first terminal device is lower than the first temperature threshold, whether to enter the cloud enhanced mode is further determined based on the current scene.

[0237] S702 to S710 are the same as S601 to S609 in the embodiment shown in FIG6 , and are not described again for the sake of brevity.

[0238] The following S711 to S714 are schematic illustrations of a process in which a second terminal device sharing a cloud with a first terminal device requests the cloud to obtain an image in the cloud.

[0239] S711: In response to the user's operation of acquiring a second image through the second terminal device, the second terminal device sends a first request message to the server.

[0240] The operation of the user obtaining the second image through the second terminal device may be, for example, an operation in which the user views images stored in the cloud through a shared cloud account and clicks on the second image in the images stored in the cloud.

[0241] In some embodiments, the first request message includes device information of the second terminal device, wherein the device information of the second terminal device includes information such as screen size, screen resolution, dynamic range, etc. of the second terminal device.

[0242] S712: The server adjusts the second image based on the first request message to obtain a third image, and encodes the third image.

[0243] In some embodiments, the server adjusts the second image according to the device information of the second terminal device carried in the first request message to obtain a third image.

[0244] In some embodiments, the server stores device information of the second terminal device. After receiving the first request message, the server directly adjusts the second image according to the device information of the second terminal device stored locally to obtain the third image.

[0245] S713: The server sends the encoded third image to the second terminal device.

[0246] S714: The second terminal device saves the third image in the gallery.

[0247] In the embodiment of the present application, since not all images captured in all scenes need to be cloud enhanced, for example, if there is no portrait in the preview image, or the current scene is well lit, cloud enhancement processing is not required. The terminal device can determine whether to enter the cloud enhancement mode according to the current scene, avoid unnecessary enhancement processing of the image, and thus save the power consumption overhead of the terminal device.

[0248] Furthermore, when the image captured by the terminal device needs to be cloud-enhanced, the cloud transmission will not be started immediately after the image is captured. Instead, the cloud transmission will be started in response to the user's confirmation of the cloud transmission operation, or the cloud transmission will be automatically started when the current load, temperature and network conditions of the terminal device meet the cloud transmission conditions. In this way, cloud transmission can be avoided when the terminal device is under high load, overheated or the network conditions are poor, thereby avoiding situations such as excessive load and heating of the terminal device due to cloud transmission, and avoiding situations such as cloud transmission failure due to poor network conditions, thereby improving the load balance and cloud transmission success rate during the use of the terminal device.

[0249] In addition, when cloud-enhanced images are collected, the terminal device does not perform a series of complex processing on the collected images. Instead, it generates a gallery preview image through simple pre-processing for users to browse, which can also save power consumption of the terminal device to a certain extent.

[0250] In addition, the embodiment of the present application can also realize the sharing of images among multiple terminal devices, and the images obtained by different terminal devices can be matched with the device information of the local device.

[0251] For example, based on the embodiment shown in FIG6 or FIG7, FIG8 shows a schematic flow chart of another image processing method 800 provided in an embodiment of the present application. As shown in FIG8, the method 800 includes:

[0252] S801 to S808 are the same as S701 to S708 in the embodiment shown in FIG7 , and are not described again for the sake of brevity.

[0253] S809: If the first terminal device does not receive the encoded second image within the first time threshold, the first terminal device performs a third process on the first image based on the first encoded file saved on the local end to obtain a fourth image, and saves the fourth image in the gallery, wherein the start timing of the first time threshold is the moment when the first terminal device sends the first encoded file to the server.

[0254] Among them, the third processing refers to the processing of the first image by the ISP module and other post-processing modules of the first terminal device, for example, it may include multi-frame noise reduction, multi-frame HDR, large aperture blur, etc. on the first image.

[0255] The first time threshold may be, for example, any time between 12 and 48 hours, such as 24 hours.

[0256] S810: The first terminal device deletes the saved first encoded file.

[0257] The following S811 to S814 are schematic illustrations of the process of the second terminal device sharing the cloud with the first terminal device requesting the cloud to obtain images in the cloud. S811 to S814 are the same as S711 to S714 in the embodiment shown in Figure 7. For the sake of brevity, they will not be repeated here.

[0258] That is to say, when the first terminal device fails to successfully receive the encoded second image, other terminal devices sharing the cloud with the first terminal device can also request the server to obtain the second image.

[0259] In an embodiment of the present application, during the cloud enhancement processing performed by the terminal device, the terminal device backs up and saves the encoded file on the local end before sending the encoded file to the server. When the terminal device times out and fails to receive the processed image sent by the server, the terminal device can restart the image processing process on this side and further process the image on the local end according to the backed-up encoded file. In this way, high-quality images can be obtained in a timely manner even when the network conditions are poor, which can improve the user experience.

[0260] For example, based on the embodiment shown in FIG6 or FIG7, FIG9 shows a schematic flow chart of another image processing method 900 provided in an embodiment of the present application. As shown in FIG9, the method 900 includes:

[0261] S901: The first terminal device receives the encoded second image sent by the server.

[0262] S902: The first terminal device saves the second image in a gallery.

[0263] Among them, steps S901-S902 are the same as S607-S608 in the embodiment shown in Figure 6 and S708-S709 in the embodiment shown in Figure 7, and are not repeated here for the sake of brevity.

[0264] S903: The first terminal device sends the second image to the third terminal device.

[0265] Among them, the first terminal device and the third terminal device share the cloud, that is, the first terminal device and the third terminal device are logged into the same server (cloud account).

[0266] In some embodiments, the first terminal device sends the second image to the third terminal device via a chat application, Bluetooth, or the like.

[0267] The second image carries a cloud enhancement identifier, which is used to indicate that the second image is an image that has been cloud-enhanced on a shared cloud.

[0268] S904: After receiving the second image, the third terminal device sends a second request message to the server. The second request message is used to request a fifth image matching the third terminal device. The fifth image is obtained by the server adjusting the second image according to the device information of the third terminal device.

[0269] In some embodiments, after the third terminal device receives the second image, if the second image carries a cloud enhancement identifier, the third terminal device sends a second request message to the server.

[0270] In some embodiments, the second request message includes device information of the third terminal device, and the device information of the third terminal device includes information such as screen size, screen resolution, and dynamic range of the third terminal device.

[0271] S905: After receiving the second request message, the server adjusts the second image according to the device information of the third terminal device to obtain a fifth image, and encodes the fifth image.

[0272] In some embodiments, the server adjusts the second image according to the device information of the third terminal device carried in the second request message to obtain the fifth image.

[0273] In some embodiments, the server stores device information of the third terminal device. After receiving the second request message, the server directly adjusts the second image according to the device information of the third terminal device stored locally to obtain the fifth image.

[0274] S906: The server sends the encoded fifth image to the third terminal device.

[0275] S907: The third terminal device saves the fifth image in a gallery, or the third terminal device displays the fifth image to the user.

[0276] Specifically, the third terminal device decodes the encoded fifth image to obtain the fifth image, and then saves the fifth image in a gallery, or displays the fifth image to the user.

[0277] In an embodiment of the present application, after a terminal device receives a processed image sent by a server, it can share the processed image with other terminal devices on a shared cloud. After receiving the processed image, other terminal devices can request the server to obtain a corresponding image that better matches the information of the local device. In this way, the cloud-enhanced processed image can be shared among multiple terminal devices, and the image displayed to the user on each terminal device matches the local device, which can further enhance the user experience.

[0278] In parallel with any of the embodiments shown in Figures 6 to 9, Figure 10 shows, for example, a schematic flow chart of another image processing method 1000 provided in an embodiment of the present application. As shown in Figure 10, the method 1000 includes:

[0279] S1001: In response to a second operation of the user, determine not to enter the cloud enhancement mode according to the current scenario.

[0280] In some embodiments, if the current load of the first terminal device is higher than the first load threshold and / or the current temperature of the first terminal device is higher than the first temperature threshold when the user performs a photo-taking operation, it is determined not to enter the cloud-enhanced mode regardless of whether the current scene meets the conditions for entering the cloud-enhanced mode.

[0281] In some embodiments, in addition to the scenarios for determining to enter the cloud enhancement mode described in the embodiments shown in Figures 6 to 8 above, other scenarios can be regarded as scenarios for determining not to enter the cloud enhancement mode.

[0282] S1002: The first terminal device performs a third process on the collected first image to obtain a fourth image, and saves the fourth image in a gallery.

[0283] The explanation of S1002 is the same as that of S809 in the embodiment shown in FIG8 , and will not be repeated here for the sake of brevity.

[0284] In an embodiment of the present application, when it is determined that the current scene is a scene that does not enter the cloud enhancement mode, the collected images are not processed on the cloud, but the terminal device performs a series of processing on the collected images on the local end. In this way, there is no need to encode and compress the collected images and transmit them to the cloud, etc., which can avoid some unnecessary power consumption overhead of the terminal device, thereby improving the operating performance and battery life of the terminal device.

[0285] In order to more clearly understand the operations described in S701, S801 and S901 above, illustratively, FIG11 shows a flowchart of determining whether to enter a cloud enhancement scenario provided by an embodiment of the present application.

[0286] As shown in FIG11 , the terminal device can determine whether to enter the cloud enhancement mode by previewing the image and combining relevant user operations or the current photo shooting mode.

[0287] The explanation of the preview image has been explained in detail in the embodiments shown in FIG. 6 to FIG. 8 , and will not be repeated here for the sake of brevity.

[0288] As shown in Figure 11, when the current scene satisfies any one or more of the following scenarios, it is determined to enter the cloud enhancement mode:

[0289] (1) The terminal device detects that there is a portrait in the preview image, and the size of the portrait is moderate relative to the entire preview image (for example, the ratio of the area occupied by the portrait to the entire preview image is between the first ratio and the second ratio), and / or the quality evaluation of the portrait is medium-low (for example, the portrait quality score is lower than the first score, or the portrait quality score is lower than the first score and higher than the second score);

[0290] (2) The terminal device determines that the current scene is a low-brightness scene (i.e., a dark light scene) based on the preview image and the environment in which the terminal device is located;

[0291] (3) The terminal device detects that the current camera mode is a large aperture mode (or a mode that requires cloud enhancement, such as a portrait mode);

[0292] (4) The terminal device detects that the user has selected the cloud enhancement scenario;

[0293] In one example, the user may select cloud enhancement through a display interface of a gallery preview image.

[0294] When the terminal device determines that the current scene does not belong to any of the above scenes, it determines not to enter the cloud enhancement mode.

[0295] For example, FIG12 shows a schematic diagram of a photographing interface and a schematic diagram of a display interface for gallery preview images provided in an embodiment of the present application.

[0296] FIG12(a) shows a schematic diagram of a photographing interface provided by an embodiment of the present application. As shown in FIG12(a), the electronic device 1200 is in the photographing interface, which includes at least a preview image 1201, a photographing control 1202, and a gallery preview control 1203. The preview image 1201 can be used by the first terminal device to determine whether to enter the cloud enhancement mode, which corresponds to S701, S801, and S1001 described above; the photographing control 1202 is used by the user to perform a photographing operation; and the gallery preview control 1203 is used by the user to switch the display interface of the electronic device 1200 to the display interface of the gallery preview image (i.e., the interface shown in FIG12(b)).

[0297] In some embodiments, when electronic device 1200 enters cloud enhancement mode, the user performs a photo capture operation by clicking on photo control 1202. The electronic device 1200 then performs a first process on the electronic device to obtain a gallery preview image 1204 and stores it in the gallery. When the user further clicks on gallery preview control 1203, the display interface of electronic device 1200 switches to the display interface of gallery preview image 1204, as shown in FIG12(b). This interface includes at least gallery preview image 1204, a cloud enhancement icon 1205, and a second cloud enhancement level selection control 1206. The user can trigger cloud transmission of the first image corresponding to gallery preview image 1204 (i.e., triggering operation S604, S705, or S805) by clicking on cloud enhancement icon 1205. The user can also select a second cloud enhancement level by clicking on second cloud enhancement level selection control 1206. The second cloud enhancement level can be measured on a scale, for example, from 0 to 10, with a higher number indicating a higher second cloud enhancement level.

[0298] It should be understood that: when the electronic device 1200 determines not to enter the cloud enhancement mode, after the user performs the photo-taking operation by clicking the photo-taking control 1202, the electronic device 1200 obtains a high-quality image through the third processing on the local end and stores it in the gallery. When the user further clicks the gallery preview control 1203, the high-quality image processed by the local ISP module and post-processing module is displayed on the display interface of the electronic device 1200, and the cloud enhancement icon and the second cloud enhancement degree selection control will not be displayed.

[0299] For example, FIG13 shows a schematic diagram of another photographing interface and a schematic diagram of a display interface for gallery preview images provided in an embodiment of the present application.

[0300] FIG13(a) shows a schematic diagram of another photographing interface provided by an embodiment of the present application. As shown in FIG13(a), electronic device 1300 is in a photographing interface, and the current photographing mode is cloud photographing mode. The photographing interface includes at least a preview image 1301, a photographing control 1302, a gallery preview control 1303, and a second cloud enhancement level selection control 1304. The preview image 1301 can be used by the first terminal device to determine whether to enter the cloud enhancement mode, corresponding to S701, S801, and S1001 above; the photographing control 1302 is used by the user to perform a photographing operation; the gallery preview control 1303 is used by the user to switch the display interface of the electronic device 1300 to the display interface of the gallery preview image 1305 (i.e., the interface shown in FIG13(b)); and the second cloud enhancement level selection control 1304 is used by the user to select a second cloud enhancement level.

[0301] In some embodiments, when the electronic device 1300 determines to enter the cloud enhancement mode, the user performs a photo taking operation by clicking the photo control 1302. The electronic device 1300 obtains a gallery preview image 1305 through a first processing on the local end and stores it in the gallery. When the user further clicks the gallery preview control 1303, the display interface of the electronic device 1300 switches to the display interface of the gallery preview image 1305 as shown in (b) of Figure 13. In this interface, at least the gallery preview image 1305 is included, and an icon 1306 may also be included. The icon 1306 is different from the control 1205 shown in Figure 12. The icon 1306 is only used to prompt the user that the gallery preview image 1305 corresponds to the cloud enhancement mode.

[0302] It should be understood that the difference between the embodiment of the present application and the embodiment shown in Figure 12 is that: in the embodiment of the present application, the photo taking mode is a cloud photo taking mode. In this photo taking mode, the user does not need to click the cloud enhancement icon in the display interface of the gallery preview image to give priority to cloud transmission.

[0303] In some embodiments, when the load of the electronic device 1300 is higher than the first load threshold, cloud transmission will not be enabled.

[0304] In some embodiments, if the temperature of the electronic device 1300 is higher than the first temperature threshold, cloud transmission will not be enabled.

[0305] For example, FIG14 shows a functional module diagram of an image processing system 1400 provided in an embodiment of the present application. As shown in FIG14 , the system 1400 includes a device side and a cloud side (server side), wherein the device side includes a scene detection module 1401, a judgment module 1402, a third processing module 1403, a first encoding module 1405, a first processing module 1406, a first transmission module 1407, a first decoding module 1412, and a display module 1413, and the cloud side includes a second transmission module 1408, a second decoding module 1409, a second processing module 1410, and a second encoding module 1411. Specifically:

[0306] The scene detection module 1401 is used to detect the current photo-taking scene of the device.

[0307] The judgment module 1402 is used to respond to the user's second operation and determine whether to enter the cloud enhancement mode according to the current scenario.

[0308] The second operation of the user may be an operation of the user opening the camera of the first terminal device to enter the photo taking interface; or it may be a photo taking operation of the user, such as the user pressing a photo taking button.

[0309] Among them, the specific explanation of "determining whether to enter the cloud enhancement mode according to the current scenario" has been explained in detail in the embodiment shown in Figure 7. For the sake of brevity, it will not be repeated here.

[0310] The judgment module 1402 is also used to determine whether to enter the cloud enhanced mode in response to the user's second operation based on the current scenario, the current load of the first terminal device and / or the current temperature of the first terminal device. When the current load of the first terminal device is higher than the first load threshold and / or the current temperature of the first terminal device is higher than the first temperature threshold, the judgment module 1402 determines not to enter the cloud enhanced mode.

[0311] The judgment module 1402 is also used to determine whether to enter the cloud enhanced mode in response to the user's second operation based on the current scene, the current load of the first terminal device and / or the current temperature of the first terminal device. When the current load of the first terminal device is lower than the first load threshold and / or the current temperature of the first terminal device is lower than the first temperature threshold, the judgment module 1402 further determines whether to enter the cloud enhanced mode based on the current scene.

[0312] The third processing module 1403 is used to perform a third processing on the first image to obtain a fourth image when it is determined not to enter the cloud enhancement mode, and save the fourth image in the image library.

[0313] Among them, the third processing refers to the processing of the first image by the ISP module and other post-processing modules of the first terminal device, for example, it may include multi-frame noise reduction, multi-frame HDR, large aperture blur, etc. on the first image.

[0314] The third processing module 1403 is also used to perform a third process on the first image to obtain a fourth image when the encoded second image sent by the server is not received within the first time threshold, and save the fourth image in the gallery, wherein the start timing of the first time threshold is the moment when the device side sends the first encoded file to the server.

[0315] The first time threshold may be, for example, any time between 12 and 48 hours, such as 24 hours.

[0316] The first encoding module 1404 is used to encode the first image and first information related to the first image captured by the camera in response to the user's photo-taking operation after the judgment module 1402 determines that the cloud enhancement mode has been entered, to obtain a first encoded file.

[0317] Among them, the cloud enhancement mode refers to a mode in which the currently captured image needs to be processed by the cloud.

[0318] Among them, the first information related to the first image refers to the metadata corresponding to the first image. The first information related to the first image may include one or more of the exposure parameters used to describe the first image, image size, acquisition device information, scene information, and shooting mode information. In addition, the first information related to the first image may also include other information used to describe the first image, which is not limited in this application.

[0319] It should be understood that the number of first images collected and encoded may be one or more, and the specific number may be determined according to the current scenario. The number of first images collected and encoded may also be different in different scenarios.

[0320] In one example, compared with a scene with sufficient light, the number of first images captured and encoded in a scene with insufficient light (ie, a low-light scene) (which can also be understood as the number of frames of the first image captured and encoded) is greater.

[0321] In yet another example, a plurality of first images of different exposure types may be acquired and encoded in a high dynamic scene.

[0322] In another example, in a large aperture photography mode or other scenarios requiring data from multiple cameras, multiple first images are captured and encoded through multiple cameras.

[0323] The system 1400 may further include a storage module for storing the first encoded file.

[0324] The first processing module 1405 is configured to perform a first processing on the first image to obtain a gallery preview image corresponding to the first image.

[0325] The first processing may be pre-processing the first image, and obtaining a gallery preview image corresponding to the first image, which is stored in the gallery of the device and presented to the user when the user enters the gallery to browse images.

[0326] In some embodiments, in the interface where the user browses the gallery preview image, the gallery preview image is associated with a first control, and the first control is used for the user to execute an operation of starting cloud transmission.

[0327] In some embodiments, the gallery preview image is further associated with a second control, which is used for the user to select the degree of second cloud enhancement, where the second cloud enhancement is a portrait enhancement based on the first cloud enhancement.

[0328] In one implementation, the first control may be a cloud transmission icon. When the user clicks the first control, the cloud transmission is started. The user may also pause the cloud transmission by clicking the first control again.

[0329] In one implementation, the first cloud enhancement refers to the overall cloud enhancement of the first image, for example, the cloud may perform noise reduction processing, high dynamic processing, or large aperture blur processing on the first image; the degree of the second cloud enhancement may, for example, refer to the degree of further portrait enhancement based on the image after the first cloud enhancement processing. The degree of the second cloud enhancement can be represented by a level, for example, it can be represented by level 0 to level 10, and the larger the number, the greater the degree of cloud enhancement.

[0330] Among them, the first processing module 1405 performs a first processing on the first image, which may be to perform some simple ISP processing on the first image to obtain a corresponding YUV image, and then directly convert the YUV image into an RGB format preview image to be displayed in the gallery preview interface.

[0331] The first transmission module 1406 is configured to send a first encoded file to the server in response to the user confirming the cloud migration operation and / or when the device meets the cloud migration conditions.

[0332] In some embodiments, the first transmission module 1406 is also used to send a second encoded file to the server, wherein the second encoded file may include information for indicating the second cloud enhancement degree selected by the user, and may also include the intermediate results of the algorithm processing corresponding to the first image, such as: preview YUV images before and after taking pictures, or a JPG image obtained by algorithm processing of the first image, etc.

[0333] The first encoded file and the second encoded file may be sent separately or in a package.

[0334] Among them, the explanation of "user confirmation of cloud migration operation" and the explanation of "cloud migration conditions" have been explained in detail in the embodiment shown in Figure 6. For the sake of brevity, they will not be repeated here.

[0335] The second transmission module 1407 is configured to receive a first encoded file sent by a device.

[0336] In some embodiments, the second transmission module 1407 is further configured to receive a second encoded file sent by the device.

[0337] The second decoding module 1408 is configured to decode the first encoded file to obtain a first image and first information related to the first image.

[0338] In some embodiments, the second decoding module 1408 is also used to decode the second encoded file to obtain information indicating the second cloud enhancement level selected by the user and / or the intermediate result of the algorithm processing corresponding to the first image, such as: preview YUV images before and after taking pictures or a JPG image obtained by algorithm processing of the first image, etc.

[0339] The second processing module 1409 is configured to perform a second processing on the first image based on the first information related to the first image to obtain a second image.

[0340] The explanation of “performing the second processing on the first image” has been explained in detail in the embodiment shown in FIG6 , and will not be repeated here for the sake of brevity.

[0341] The second encoding module 1410 is configured to encode the second image.

[0342] The format of the encoded second image depends on the format supported by the device. Usually, the format of the encoded second image is JPEG format.

[0343] The second transmission module 1407 is further configured to send the encoded second image to the device end.

[0344] The first transmission module 1406 is further configured to receive the encoded second image sent by the server.

[0345] The first decoding module 1411 is configured to decode the encoded second image to obtain the second image.

[0346] The display module 1412 is configured to display the second image to the user on the device side.

[0347] In the embodiment of the present application, when the image captured by the terminal device needs to be cloud-enhanced, the cloud transmission is not started immediately after the image is captured. Instead, the cloud transmission is started in response to the user's confirmation of the cloud transmission operation, or the cloud transmission is automatically started when the current load, temperature and network conditions of the terminal device meet the cloud transmission conditions. In this way, cloud transmission can be avoided when the terminal device is under high load, overheated or the network conditions are poor, thereby avoiding situations such as excessive load and heating of the terminal device due to cloud transmission, and avoiding situations such as cloud transmission failure due to poor network conditions, thereby improving the load balance and cloud transmission success rate during the use of the terminal device.

[0348] Moreover, in the scenario where the collected images are cloud-enhanced, the terminal device itself will not perform a series of complex processing on the collected images. Instead, it will generate a gallery preview image through simple pre-processing for users to browse, which can also save the power consumption of the terminal device to a certain extent.

[0349] One or more of the modules or units described herein can be implemented in software, hardware, or a combination of the two. When any of the above modules or units is implemented in software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor may include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller (MCU), or an artificial intelligence processor, etc., a computing device that runs software, each computing device may include one or more cores for executing software instructions to perform operations or processing. The processor may be built into an SoC (system on chip) or an application specific integrated circuit (ASIC), or it may be an independent semiconductor chip. In addition to the core for executing software instructions to perform operations or processing within the processor, it may further include necessary hardware accelerators, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements dedicated logic operations.

[0350] When the modules or units described in this document are implemented in hardware, the hardware can be any one or any combination of a CPU, a microprocessor, a DSP, an MCU, an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator, or a non-integrated discrete device, which can run the necessary software or not rely on the software to execute the above method flow.

[0351] When the modules or units described herein are implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0352] Those skilled in the art will appreciate that the units and method 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 beyond the scope of this application.

[0353] Those skilled in the art will 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.

[0354] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0356] 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.

[0357] 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, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0358] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for image processing, characterized in that: The method comprises: In response to an operation of a user capturing a first image through a first terminal device, encoding the first image to obtain a first encoded file; When a first operation of the user is detected and / or the first terminal device meets a first condition, sending the first encoded file to the server; A second image sent by the server is received, where the second image is obtained by the server by performing cloud enhancement processing on the first image in the first encoded file.

2. The method according to claim 1, characterized in that The first condition includes any one or more of the following conditions: The current load of the first terminal device is lower than a first load threshold, the current temperature of the first terminal device is lower than a first temperature threshold, and the current network signal of the first terminal device is higher than a first signal threshold.

3. The method according to claim 1 or 2, characterized in that: Before sending the first encoded file to the server, the method further includes: In response to a second operation of the user, displaying a first interface on a display screen of the first terminal device, wherein the first interface includes a first preview image and a first icon, and the first preview image is a gallery preview image corresponding to the first image; The first operation of the user includes an operation of the user clicking the first icon.

4. The method according to claim 3, characterized in that The first interface further includes a first selection control, and the method further includes: When the user selects a first enhancement level through the first selection control, the first encoded file carries first information, and the first information is used to indicate that the server performs portrait enhancement on the first image to a first enhancement level, and the cloud enhancement processing includes the portrait enhancement.

5. The method according to any one of claims 1 to 4, characterized in that In response to the user's operation of capturing the first image through the first terminal device, encoding the first image to obtain a first encoded file includes: Determine whether to enter a cloud enhancement mode according to a current photographing scene, wherein in the cloud enhancement mode, the first image needs to be cloud enhanced by a server; When it is determined to enter the cloud enhancement mode, in response to the user's operation of capturing the first image through the first terminal device, the first encoded file is obtained by encoding the first image.

6. The method according to claim 5, characterized in that The determining whether to enter the cloud enhancement mode according to the current shooting scene includes: Determining whether to enter the cloud enhancement mode according to the current photo shooting scene, the current load of the first terminal device and / or the current temperature of the first terminal device; When the current load of the first terminal device is higher than a first load threshold and / or the current temperature of the first terminal device is higher than a first temperature threshold, it is determined not to enter the cloud enhancement mode.

7. The method according to claim 5 or 6, characterized in that: The determining whether to enter the cloud enhancement mode according to the current shooting scene includes: Get the preview image corresponding to the current photo scene; When it is detected that there is a first portrait in the preview image and the first portrait satisfies a second condition, it is determined to enter the cloud enhancement mode.

8. The method according to claim 7, characterized in that The area ratio of the first portrait in the preview image is greater than the first area ratio and smaller than the second area ratio.

9. The method according to claim 5 or 6, characterized in that: The determining whether to enter the cloud enhancement mode according to the current shooting scene includes: Get the preview image corresponding to the current photo scene; When it is determined according to the preview image that the current scene is a high-dynamic scene, determining to enter the cloud enhancement mode; or When it is determined according to the preview image that the brightness of the current scene is lower than the first brightness, it is determined to enter the cloud enhancement mode.

10. The method according to any one of claims 1 to 4, characterized in that In response to the user capturing the first image through the first terminal device, encoding the first image to obtain a first encoded file also includes: When it is detected that the current shooting mode is the cloud camera mode, the portrait mode or the large aperture mode, in response to the user taking a picture through the first terminal device The first encoding file is obtained by encoding the first image.

11. The method according to any one of claims 1 to 4, characterized in that In response to the user capturing the first image through the first terminal device, encoding the first image to obtain a first encoded file also includes: When it is detected that the current shooting mode is cloud camera mode, portrait mode or large aperture mode, and the current load of the first terminal device is lower than the first load threshold, and the current temperature of the first terminal device is lower than the first temperature threshold, in response to the user's operation of capturing the first image through the first terminal device, the first encoded file is obtained by encoding the first image.

12. The method according to any one of claims 1 to 11, characterized in that The method further comprises: If the second image sent by the server is not received within the first time threshold, decoding the first encoded file to obtain the first image; The fourth image is obtained by performing a third processing on the first image, the time when the first time threshold starts timing is the time when the first encoded file is sent to the server, and the third processing includes image signal processor ISP processing and post-processing.

13. The method according to claim 5 or 6, characterized in that: The method further comprises: When it is determined not to enter the cloud enhancement mode, in response to the user's operation of capturing the first image through the first terminal device, the first image is subjected to a third processing to obtain a fourth image, and the third processing includes image signal processor ISP processing and post-processing.

14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: Sending a request message to a server, wherein the request message is used to request to obtain a target image stored in the server; An image sent by the server and obtained by adjusting the target image according to the device information of the first terminal device is received.

15. The method according to any one of claims 1 to 14, characterized in that The first image includes a RAW image.

16. An electronic device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 15.

17. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 15 is implemented.

18. A chip, characterized in that: Instructions are stored in the chip, and when the instructions are executed, the method according to any one of claims 1 to 15 is implemented.

Citation Information

Patent Citations

  • Shooting optimization method, system and device of mobile terminal

    CN103024266A

  • Image processing system and method

    CN105827957A

  • Image processing method and device

    CN111328448A

  • Image display method, image processing device and computer readable storage medium

    CN111833234A

  • Image processing method and device, equipment and storage medium

    CN114760480A