Image processing method and electronic device
By implementing intelligent image encoding and cloud enhancement processing control in terminal devices, the problem of cloud transmission when the device is high load or poor network is solved, the load balancing and cloud transmission success rate of the device are improved, and the power consumption of the device is saved.
Patent Information
- Application Number
- CN202311165317.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-29
- Filing Date
- 2023-09-08
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2043-09-08
AI Technical Summary
The cloud transmission of existing equipment during high load, overheating or poor network leads to excessive load and heat up the equipment, and poor network leads to failure of cloud transmission, affecting the image processing effect.
By implementing intelligent control of image encoding and cloud enhancement processing in terminal devices, cloud transmission is only started when the user confirms that the device meets certain conditions (such as load, temperature, and network conditions), and pre-processing of the gallery preview image on the device side to save power consumption.
It effectively avoids the cloud transmission of devices when they are high load or poor network, reduces the power consumption and thermal problems of devices, and improves the load balancing of terminal devices and the success rate of cloud transmission.
Smart Images

Figure CN118264889B_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office of China on August 29, 2023, with application number 202311103023.0 and application name “Image Processing Method and Electronic Device”, all contents of which are incorporated by reference in this application. Technical Field
[0002] 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
[0003] In existing device camera systems, after the sensor captures the RAW image, it will go through a series of processing by the image signal processor (ISP) in the device to obtain a YUV image or RGB image. After that, different post-processing algorithms are used according to the scene to finally obtain a processed color image for the user to view.
[0004] 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 effect of image processing. Summary of the invention
[0005] 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, overheated 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 situations where cloud transmission failures due to poor network can be avoided, thereby improving the load balance and the success rate of cloud transmission during the use of the terminal device.
[0006] In a first aspect, a method for image processing is provided, the method comprising: 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 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.
[0007] 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.
[0008] In some embodiments, the first image comprises a RAW image.
[0009] Among them, encoding the first image can save storage space and facilitate transmission.
[0010] 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.
[0011] 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.
[0012] 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.
[0013] In some embodiments, the first encoded file also includes first information related to the encoded first image. The first information may be metadata of the first image, for example. The first information is used by the server to perform cloud enhancement processing on the first image according to the first information.
[0014] In an embodiment of the present application, when the first image captured by the terminal device needs to be cloud enhanced, cloud transmission is not 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 status 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 the network condition is poor, 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 balancing and cloud transmission success rate during the use of the terminal device.
[0015] 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 an operation of the user clicking the first icon.
[0016] 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.
[0017] The first preview image is a gallery preview image obtained after preprocessing by the first terminal device, and this operation is performed before encoding the first image.
[0018] 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.
[0019] 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.
[0020] 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 portrait enhancement processing based on the first cloud enhancement processing.
[0021] In some embodiments, the degree of the second cloud enhancement processing is divided into 0 to 10 levels 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.
[0022] 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 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.
[0023] In some embodiments, after the user obtains the second image, he 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 own wishes.
[0024] In an embodiment of the present application, a 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.
[0025] 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 shooting 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.
[0026] In the 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 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 according to the current scene, and can avoid unnecessary enhancement processing of the image, thereby saving power consumption overhead of the terminal device.
[0027] In combination with the first aspect, in a possible implementation method, 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 shooting 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.
[0028] 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 a first load threshold and / or the current temperature of the first terminal device is higher than a first temperature threshold, it is further determined whether to enter the cloud enhancement mode according to the current photo-taking scene.
[0029] 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 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 itself. In this way, the load balancing during the use of the terminal device can be further improved.
[0030] In combination with the first aspect, in a 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 satisfies a second condition, determining to enter the cloud enhancement mode.
[0031] Among them, the second condition may 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 may 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.
[0032] The confidence level of the first portrait refers to the confidence level that the first portrait is a portrait of a real person.
[0033] Among them, the preview image corresponding to the current photo scene may refer to the image in the viewfinder in the photo interface of the first terminal device under the current photo scene, or may refer to the image in the viewfinder in the photo interface corresponding to when the user presses the photo button.
[0034] 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 by the photo scene can be improved through cloud enhancement processing.
[0035] 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.
[0036] In an embodiment of the present application, when a portrait is detected in the preview image and the display effect of the portrait can be improved through cloud enhancement processing, it is determined to enter the cloud enhancement mode. In this way, unnecessary enhancement processing of the image can be further avoided, thereby further saving the power consumption overhead of the terminal device.
[0037] 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 less than the second area ratio.
[0038] 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 by the photo scene can be improved through cloud enhancement processing.
[0039] 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 by the photo scene can be improved through cloud enhancement processing.
[0040] In an embodiment of the present application, when a portrait is detected in the preview image and the display effect of the portrait can be improved through cloud enhancement processing, it is determined to enter the cloud enhancement mode. In this way, unnecessary enhancement processing of the image can be further avoided, thereby further saving the power consumption overhead of the terminal device.
[0041] 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: obtaining a preview image corresponding to the current photographing 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, determining to enter the cloud enhancement mode.
[0042] In combination with the first aspect, in a possible implementation method, in response to an operation of a user 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 a cloud camera mode, a portrait mode or a large aperture mode, in response to an operation of a user capturing a first image through a first terminal device, the first encoded file is obtained by encoding the first image.
[0043] In combination with the first aspect, in a possible implementation, the method also 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 process 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 process includes image signal processor ISP processing and post-processing.
[0044] Before sending the first encoded file to the server, the first encoded file is saved.
[0045] In one example, the third processing may include noise reduction processing, high dynamic processing, or large aperture blur processing.
[0046] In an embodiment of the present application, during the process of cloud enhancement processing performed by the terminal device, the terminal device backs up and saves the encoded file on its own 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 flow on its own side and further process the image on its own 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.
[0047] 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.
[0048] 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.
[0049] 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 acquisition of a target image stored on the server; and receiving an image sent by the server that is adjusted for the target image based on device information of the first terminal device.
[0050] 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.
[0051] 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 comprising 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.
[0052] 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 by the terminal device can be better.
[0053] In combination with the second aspect, in a possible implementation, before sending the second image to the first terminal device, the method also includes: obtaining a first enhancement level selected by a user; and performing portrait enhancement processing on the second image according to the first enhancement level.
[0054] 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 better meets the expected effect.
[0055] 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.
[0056] 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.
[0057] 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 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.
[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 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 above-mentioned second aspect or any possible implementation of the second aspect.
[0060] In a fourth aspect, a system is provided, comprising: a first electronic device, used to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect; and a second electronic device, used to execute the method in the above-mentioned second aspect or any possible implementation of the second aspect.
[0061] 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 first aspect or any possible implementation of the first aspect, or implements the method in the second aspect or any possible implementation of the second aspect.
[0062] In a sixth aspect, a chip is provided, in which instructions are stored, which, when executed on a device, enable the chip to execute the method in the first aspect or any possible implementation of the first aspect, or enable the chip to execute the method in the second aspect or any possible implementation of the second aspect, or execute the second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0064] Figure 2 is a software structure block diagram of the electronic device provided in the embodiment of the present application;
[0065] Figure 3 It is a structural diagram of a terminal-cloud collaboration system provided by an embodiment of the present application;
[0066] Figure 4 This is a schematic diagram of interaction between a mobile phone and the cloud corresponding to an existing image processing method provided in an embodiment of the present application;
[0067] Figure 5 is a schematic flow chart of an existing image processing method provided in an embodiment of the present application;
[0068] Figure 6 is a schematic flow chart of an image processing method provided in an embodiment of the present application;
[0069] Figure 7 is a schematic flow chart of another image processing method provided in an embodiment of the present application;
[0070] Figure 8 is a schematic flow chart of another image processing method provided in an embodiment of the present application;
[0071] Fig. 9 is a schematic flow chart of another image processing method provided in an embodiment of the present application;
[0072] Fig.10 is a schematic flow chart of another image processing method provided in an embodiment of the present application;
[0073] Fig.11 It is a flowchart of determining whether to enter a cloud enhancement scenario provided by an embodiment of the present application;
[0074] Fig.12 It is a schematic diagram of a photo taking interface and a schematic diagram of a display interface of a gallery preview image provided in an embodiment of the present application;
[0075] Fig.13 It is a schematic diagram of another photo taking interface and a schematic diagram of a display interface of a gallery preview image provided in an embodiment of the present application;
[0076] Fig.14 It is a schematic diagram of the functional modules of an image processing system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] The technical solution in the present application will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0078] The technical solutions in the embodiments of the present application will be described below in conjunction with the 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.
[0079] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0080] The method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0081] For example, Figure 1 1 shows a schematic diagram of the structure of the 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 screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0082] It is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0083] 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 processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0084] 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.
[0085] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0086] In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.
[0087] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0088] 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 achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0089] 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 to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0090] The UART interface is a universal serial data bus for asynchronous communication. The 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 generally 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 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0091] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0092] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0093] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0094] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0095] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
[0096] 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 supplies power to the processor 110, the internal memory 121, the external memory, the display screen 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 number, battery health status (leakage, impedance), etc. 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.
[0097] 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.
[0098] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0099] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.
[0100] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a 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.
[0101] 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 integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0102] 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 the network and other devices through wireless communication technology. The wireless communication technology 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).
[0103] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0104] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0105] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0106] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0107] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.
[0108] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0109] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0110] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0111] 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 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0112] 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 may store an operating system, at least one App required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may 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.
[0113] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0114] 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 arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0115] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0116] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0117] Microphone 170C, also called "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 microphone 170C to input the sound signal into 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 sound source, realize directional recording function, etc.
[0118] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0119] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0120] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0121] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0122] 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 leather 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 according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0123] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0124] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0125] 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 holds 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.
[0126] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0127] 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.
[0128] 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 a 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 avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0129] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and 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 acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0130] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.
[0131] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0132] 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.
[0133] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0134] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out 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, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0135] 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.
[0136] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0137] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.
[0138] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0139] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0140] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0141] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0142] 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.
[0143] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0144] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0145] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0146] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0147] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0148] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0149] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0150] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0151] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0152] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0153] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0154] A 2D graphics engine is a drawing engine for 2D drawings.
[0155] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0156] 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.
[0157] The technical solution of the embodiment of the present application can be applied to electronic devices. For example, it can be applied to electronic devices such as mobile phones, folding screens, and tablets. The main application scenario can be the scene of taking pictures through electronic devices, specifically, it can be applied to the image processing scene of electronic devices.
[0158] More specifically, the technical solution in the embodiment of the present application can be applied to a terminal-cloud collaboration system consisting of a terminal device and a cloud. The "terminal" in the terminal-cloud collaboration refers to the terminal device, and the "cloud" refers to the cloud, which can also be called a cloud server or a cloud platform. For example, Figure 3 A schematic diagram of the structure of a terminal-cloud collaboration system provided in an embodiment of the present application is shown. Figure 3 As shown, the terminal-cloud collaborative system may include: a terminal device 310 and a cloud 320 , and the terminal device 310 may be connected to the cloud 320 via a wireless network.
[0159] In one embodiment, the cloud 320 may be a computer server or a server cluster composed of multiple servers. The present application does not limit the implementation architecture of the cloud 320. The specific form of the terminal device 310 can refer to the aforementioned Figure 1 or Figure 2 It is described in the illustrated embodiment and will not be described in detail.
[0160] Optionally, Figure 3 A terminal device 310 is given as an example. 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 multiple terminal devices 310 may be the same or different, which is not limited here. The image processing method provided in the embodiment of the present application is a process for implementing image processing by interaction between each terminal device 310 and the cloud 320.
[0161] 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 camcorder, a video recorder, or other electronic devices with a camera function, an electronic device in a 5G network, or an electronic device in a public land mobile communication network (public land mobile network, PLMN) that will evolve in the future, etc., and the present application does not limit this.
[0162] In existing device camera systems, after the sensor captures the RAW image, it will go through a series of processing by the image signal processor (ISP) in the device to obtain a YUV image or RGB image, and then use different post-processing algorithms according to the scene to finally obtain a processed color image for the user to watch. Among them, YUV is the type of true-color color space (color space) compiled, "Y" represents brightness (Luminance or Luma), that is, the grayscale value, "U" and "V" represent chrominance (Chrominance or Chroma), which is used to describe the color and saturation of the image and is used to specify the color of the pixel; RGB represents the colors of the three channels of red, green, and blue. This standard covers almost all colors that can be perceived by human vision and is one of the most widely used color systems.
[0163] 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.
[0164] For example, Figure 4The following is a schematic diagram of the interaction between a mobile phone and a cloud corresponding to an existing image processing method provided in 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.
[0165] like Figure 4 As shown, the mobile phone includes a camera module, an encoding module and a scene detection module, and 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 is used to detect the current photo scene. When the user uses the mobile phone to take a photo, the mobile phone can collect the RAW image corresponding to the current photo scene through the camera module. Then, the mobile phone can encode the RAW image collected 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, the ISP module, and the YUV 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: 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 user high-quality image to the server.
[0166] 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 battery life of the mobile phone 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 easily causes 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, image processing will fail.
[0167] For example, Figure 5 FIG. 5 is a schematic flow chart of an existing image processing method 500 provided in an embodiment of the present application. Figure 5 As shown, the method 500 includes:
[0168] S501: Determine encoding related information corresponding to the nude image to be processed according to feature information of the nude image to be processed.
[0169] 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.
[0170] 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.
[0171] S502: Encoding the naked image to be processed according to the encoding related information.
[0172] In this method, the encoded naked image is transmitted to the cloud server through the network, and the decoded and reconstructed naked image is optimized by the image optimization module of the cloud server, so as to further achieve more optimized image processing performance and significantly improve the subjective quality of the final image. 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 battery life of the mobile phone 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 requires too high a power consumption load capacity of the terminal device, which may easily cause the terminal device to heat up, freeze and other problems; and when there is a problem with the network, it will cause image processing to fail.
[0173] Therefore, existing image processing methods have problems such as poor image processing effect or high power consumption during the image processing process, and poor end-cloud coordination when the network is abnormal.
[0174] In view of this, the present application provides an image processing method and electronic device. In this method, not all images output in all scenes will be subjected to cloud enhancement processing. When it is determined that the image output in the current scene does not need cloud enhancement processing, it will not be processed on the cloud, and it 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 processed by cloud enhancement, the cloud transmission will not be directly turned on, but the cloud transmission will be turned on 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 having excessive power consumption, that is, it can avoid the electronic device from having heating and freezing, etc.; in addition, when the network is abnormal, the cloud transmission will not be turned on until the network returns to normal, which can avoid the cloud failure caused by the cloud transmission during the network abnormality.
[0175] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "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 may exist; for example, A and / or B can represent: 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 objects associated before and after are in an "or" relationship.
[0176] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "one embodiment", "some embodiments", "another embodiment", "some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0177] For example, Figure 6 FIG. 6 is a schematic flow chart of an image processing method 600 provided in an embodiment of the present application. Figure 6 As shown, the current shooting mode is the cloud enhancement mode, and the method 600 includes:
[0178] Among them, the cloud enhancement mode refers to a mode in which the currently captured image needs to be processed by the cloud.
[0179] 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.
[0180] In some embodiments, the first image comprises a RAW image.
[0181] Among them, encoding the first image can save storage space and facilitate transmission.
[0182] 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.
[0183] It should be understood that the number of first images collected and encoded by the first terminal device 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 in different scenarios may also be different.
[0184] In one example, compared with a well-lit scene, the signal-to-noise ratio of an image in an insufficiently lit scene (i.e., a low-light scene) is lower, and in the cloud enhancement process, the more images there are, the more conducive it is to improving the signal-to-noise ratio of the image, so the number of first images captured and encoded in the insufficiently lit scene (which can also be understood as the number of frames of the first image captured and encoded) is greater.
[0185] In yet another example, a plurality of first images of different exposure types may be acquired and encoded in a high dynamic scene.
[0186] 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.
[0187] S602: The first terminal device saves the first encoded file.
[0188] The first terminal device stores the first encoded file temporarily.
[0189] S603: The first terminal device performs a first process on the first image to obtain a gallery preview image corresponding to the first image.
[0190] Among them, the first processing can be that the first terminal device preprocesses 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.
[0191] 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 perform an operation of starting cloud transmission.
[0192] In some embodiments, the gallery preview image is also associated with a second control, and the second control is used for the user to select the degree of second cloud enhancement, and the second cloud enhancement is a portrait enhancement based on the first cloud enhancement.
[0193] In one implementation, the first control may be a cloud transmission icon. When the user clicks on the first control, the cloud transmission is started. The user may also pause the cloud transmission by clicking on the first control again.
[0194] 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 a level from 0 to 10, and the larger the number, the greater the degree of the second cloud enhancement.
[0195] 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 a preview screen in RGB format and display it in the gallery preview interface.
[0196] S604: In response to the user confirming the cloud operation and / or the first terminal device meeting the cloud conditions, sending the first encoded file to the server.
[0197] In some embodiments, the first terminal device also sends 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.
[0198] The first encoded file and the second encoded file may be sent separately or in a package.
[0199] 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.
[0200] 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, sending the first encoded file to the server (or sending the first encoded file and the second encoded file); if the first terminal device does not meet the condition 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", wait until the first terminal device meets the condition, and then start the cloud transmission. 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 condition, the background starts the cloud transmission.
[0201] 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 directly started with the user's needs as the priority; or, if the user clicks on the gallery preview image 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, or the current network signal is normal" is met. If so, cloud transmission is initiated. If not, cloud transmission is initiated 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 initiated when the condition is not met.
[0202] 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; normal network signal 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.
[0203] It should be understood that the occurrence order of S603 and S604 is not limited, and they may occur simultaneously or not simultaneously.
[0204] S605: The server decodes the first encoded file to obtain a first image and first information related to the first image.
[0205] In some embodiments, the server can also decode the second encoded file to obtain 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, such as: a preview YUV image before and after taking the photo or a JPG image obtained by algorithm processing of the first image.
[0206] 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.
[0207] 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.
[0208] In some embodiments, the server performs second processing on the first image based on first information related to the first image and information indicating a second cloud enhancement degree selected by the user and / or an intermediate result of algorithm processing corresponding to the first image to obtain a second image.
[0209] In one example, the server performs second processing on the first image based on scene information related to the first image, shooting mode information, and a second cloud enhancement degree selected by the user.
[0210] 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 better matches the first terminal device.
[0211] 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.
[0212] 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.
[0213] 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 according to 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, and 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 capability of the requested terminal device.
[0214] In some embodiments, in response to an image processing request from a first terminal device, a 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, a user can browse the images after the first cloud enhancement processing and the second cloud enhancement processing, as well as the image after only the first cloud enhancement processing, respectively on the first terminal device, and select the image he wants to save to save.
[0215] 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.
[0216] S607: The server sends the encoded second image to the first terminal device.
[0217] S608: The first terminal device saves the second image in a gallery.
[0218] Specifically, after the first terminal device decodes the encoded second image, it 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.
[0219] In some embodiments, the user can browse the second image that has undergone 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 that has only undergone the first enhancement process.
[0220] S609: The first terminal device deletes the saved first encoded file.
[0221] In the embodiment of the present application, when the image collected by the terminal device needs to be cloud enhanced, the cloud transmission will not be started immediately after the image is collected, but 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 status 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 status is poor, thereby avoiding the terminal device from being overloaded and overheated due to cloud transmission, and avoiding the cloud transmission failure caused by poor network, thereby improving the load balance and cloud transmission success rate during the use of the terminal device;
[0222] 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, but will generate gallery preview images through simple preprocessing for users to browse, which can also save the power consumption of the terminal device to a certain extent.
[0223] For example, in Figure 6 Based on the embodiment shown, Figure 7 FIG. 7 is a schematic flow chart of another image processing method 700 provided in an embodiment of the present application. Figure 7 As shown, the method 700 includes:
[0224] S701: In response to a second operation of the user, determine to enter the cloud enhanced mode according to the current scenario.
[0225] The second operation of the user may be an operation of the user opening the camera of the first terminal device to enter a photographing interface; or it may be a photographing operation of the user, such as the user pressing a photographing key.
[0226] Exemplarily, the user opens the camera of the first terminal device to enter the photo interface, for example, the user enters the photo interface by clicking or touching the camera icon on the desktop of the first terminal device, and 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.
[0227] Optionally, in response to the user's second operation, a current preview image is first 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 an image displayed in a viewfinder on the photographing interface before the user performs a photographing operation, or may refer to an image displayed in a viewfinder on the photographing interface when the user performs a photographing operation.
[0228] 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.
[0229] In some embodiments, if the current scene is detected as a high dynamic scene (i.e., HDR scene) through the preview image, it is determined to enter the cloud enhancement mode. In one example, based on the proportion of overexposed areas and / or underexposed areas in the preview image, it is determined whether the current photo scene is a high dynamic scene. For example, if the proportion of overexposed areas is greater than a certain threshold, the current photo scene is determined to be a high dynamic scene. For example, the threshold can be 60%, 70%, etc., which is not limited here.
[0230] In some embodiments, if the user selects the large aperture shooting mode, it is determined to enter the cloud enhancement mode.
[0231] In some embodiments, if the user manually selects the cloud enhancement mode, it is determined to enter the cloud enhancement mode.
[0232] 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.
[0233] 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.
[0234] 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.
[0235] S702 to S710 and Figure 6 S601 to S609 in the illustrated embodiment are the same and will not be described again for brevity.
[0236] 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.
[0237] S711: In response to the user's operation of acquiring the second image through the second terminal device, the second terminal device sends a first request message to the server.
[0238] 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 saved in the cloud through a shared cloud account and clicks on the second image in the images saved in the cloud.
[0239] 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, and dynamic range of the second terminal device.
[0240] S712: The server adjusts the second image based on the first request message to obtain a third image, and encodes the third image.
[0241] 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.
[0242] 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 in the server to obtain the third image.
[0243] S713: The server sends the encoded third image to the second terminal device.
[0244] S714: The second terminal device saves the third image in the gallery.
[0245] In the embodiments of the present application, since not all images captured by the scene need to be cloud enhanced, for example, if there is no portrait in the preview image, or the current scene is sufficiently lit, cloud enhancement processing is not required. The terminal device can determine whether to enter the cloud enhancement mode according to the current scene, and can avoid unnecessary enhancement processing of the image, thereby saving power consumption overhead of the terminal device.
[0246] Furthermore, when the images captured by the terminal device need 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 status 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 status is 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, thereby improving the load balance and cloud transmission success rate during the use of the terminal device.
[0247] In addition, when the collected images are cloud-enhanced, the terminal device will not perform a series of complex processing on the collected images, but will generate gallery preview images through simple pre-processing for users to browse, which can also save the power consumption of the terminal device to a certain extent;
[0248] 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.
[0249] For example, in Figure 6 or Figure 7 Based on the embodiment shown, Figure 8 FIG. 8 is a schematic flow chart of another image processing method 800 provided in an embodiment of the present application. Figure 8 As shown, the method 800 includes:
[0250] S801 to S808 and Figure 7 S701 to S708 in the illustrated embodiment are the same and will not be described again for the sake of brevity.
[0251] 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.
[0252] 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.
[0253] The first time threshold may be, for example, any time between 12 and 48 hours, such as 24 hours.
[0254] S810: The first terminal device deletes the saved first encoded file.
[0255] 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 the image in the cloud. Figure 7 S711 to S714 in the illustrated embodiment are the same and will not be described again for the sake of brevity.
[0256] 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.
[0257] In an embodiment of the present application, during the process of cloud enhancement processing performed by the terminal device, the terminal device backs up and saves the encoded file on its own 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 flow on its own side and further process the image on its own 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.
[0258] For example, in Figure 6 or Figure 7 Based on the embodiment shown, Fig. 9 FIG. 9 is a schematic flow chart of another image processing method 900 provided in an embodiment of the present application. Fig. 9 As shown, the method 900 includes:
[0259] S901: The first terminal device receives the encoded second image sent by the server.
[0260] S902: The first terminal device saves the second image in a gallery.
[0261] Among them, the steps S901-S902 and Figure 6 S607-S608 in the illustrated embodiment and Figure 7 S708-S709 in the illustrated embodiment are the same and will not be described again for the sake of brevity.
[0262] S903: The first terminal device sends the second image to the third terminal device.
[0263] 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 in to the same server (cloud account).
[0264] In some embodiments, the first terminal device sends the second image to the third terminal device via a chat application, Bluetooth, or the like.
[0265] The second image carries a cloud enhancement identifier, and the cloud enhancement identifier is used to indicate that the second image is an image that has been subjected to cloud enhancement processing on a shared cloud.
[0266] 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.
[0267] 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.
[0268] 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.
[0269] 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.
[0270] 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.
[0271] 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 in the server to obtain the fifth image.
[0272] S906: The server sends the encoded fifth image to the third terminal device.
[0273] S907: The third terminal device saves the fifth image in a gallery, or the third terminal device displays the fifth image to the user.
[0274] 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.
[0275] In an embodiment of the present application, when 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.
[0276] and Figures 6 to 9 Any of the embodiments shown in the examples are exemplarily and in parallel. Fig.10 FIG. 1 is a schematic flow chart of another image processing method 1000 provided in an embodiment of the present application. Fig.10 As shown, the method 1000 includes:
[0277] S1001: In response to a second operation of the user, determine not to enter the cloud enhancement mode according to the current scenario.
[0278] 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.
[0279] In some embodiments, in addition to the above Figures 6 to 8 The scenarios for determining to enter the cloud enhancement mode described in the illustrated embodiments, other scenarios may be regarded as scenarios for determining not to enter the cloud enhancement mode.
[0280] 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.
[0281] Among them, the explanation and Figure 8 The explanation of S809 in the illustrated embodiments is the same and will not be repeated here for the sake of brevity.
[0282] 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 side. 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.
[0283] In order to more clearly understand the operations described in S701, S801 and S901 above, illustratively, Fig.11 A schematic diagram of a process for determining whether to enter a cloud enhancement scenario provided in an embodiment of the present application is shown.
[0284] like Fig.11 As shown, the terminal device can determine whether to enter the cloud enhancement mode by previewing the image and combining the user's related operations or the current shooting mode.
[0285] The preview image is explained in the above Figures 6 to 8 The illustrated embodiment has been described in detail and will not be described again here for the sake of brevity.
[0286] Depend on Fig.11 It can be seen that when the current scene meets any one or more of the following scenarios, it is determined to enter the cloud enhancement mode:
[0287] (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);
[0288] (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;
[0289] (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);
[0290] (4) The terminal device detects that the user has selected the cloud enhancement scenario;
[0291] In one example, the user may select cloud enhancement through a display interface of a gallery preview image.
[0292] 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.
[0293] For example, Fig.12A 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 are shown.
[0294] Fig.12 (a) shows a schematic diagram of a photographing interface provided in an embodiment of the present application, such as Fig.12 As shown in (a), the electronic device 1200 is in a photo taking interface, which includes at least a preview image 1201, a photo taking 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 enhanced mode, which corresponds to the above S701, S801, and S1001; the photo taking control 1202 is used by the user to perform a photo taking operation; 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.: Fig.12 The interface shown in (b)).
[0295] In some embodiments, when the electronic device 1200 determines to enter the cloud enhancement mode, after the user performs a photo operation by clicking the photo control 1202, the electronic device 1200 obtains the gallery preview image 1204 through the first processing at the local end and stores it in the gallery. When the user further clicks the gallery preview control 1203, the display interface of the electronic device 1200 is switched to the following: Fig.12 The display interface of the gallery preview image 1204 shown in (b) of FIG. 1 includes at least the gallery preview image 1204, the cloud enhancement icon 1205, and the second cloud enhancement degree selection control 1206. The user can trigger the cloud transmission of the first image corresponding to the gallery preview image 1204 (i.e., trigger the operation of S604, S705, or S805) by clicking the cloud enhancement icon 1205; the user can also select the second cloud enhancement degree by clicking the second cloud enhancement degree selection control 1206, wherein the second cloud enhancement degree can be measured by a level. For example, it can be level 0 to level 10, and the larger the number, the higher the second cloud enhancement degree.
[0296] It should be understood that: when the electronic device 1200 determines not to enter the cloud enhancement mode, after the user performs a photo taking operation by clicking the photo control 1202, the electronic device 1200 obtains a high-quality image through the third processing on the local side 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 the 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.
[0297] For example, Fig.13 A schematic diagram of another photo taking interface and a schematic diagram of a display interface for gallery preview images provided in an embodiment of the present application are shown.
[0298] Fig.13 (a) in FIG. 1 shows a schematic diagram of another photo taking interface provided in an embodiment of the present application, such as Fig.13 As shown in (a), the electronic device 1300 is in a photo taking interface, and the current photo taking mode is a cloud photo taking mode. The photo taking interface includes at least a preview image 1301, a photo taking control 1302, a gallery preview control 1303, and a second cloud enhancement level selection control 1304. Among them, the preview image 1301 can be used by the first terminal device to determine whether to enter the cloud enhancement mode, that is, corresponding to the above S701, S801, and S1001; the photo taking control 1302 is used by the user to perform a photo taking 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 (that is: Fig.13 The second cloud enhancement level selection control 1304 is used by the user to select the second cloud enhancement level.
[0299] In some embodiments, when the electronic device 1300 determines to enter the cloud enhancement mode, after the user performs a photo operation by clicking the photo control 1302, the electronic device 1300 obtains the gallery preview image 1305 through the first processing at 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 is switched to the following: Fig.13 The display interface of the gallery preview image 1305 shown in (b) of FIG. 1 includes at least the gallery preview image 1305 and may also include an icon 1306. The icon 1306 is Fig.12 Unlike the control 1205 shown, the icon 1306 is only used to prompt the user that the gallery preview image 1305 corresponds to the cloud enhanced mode.
[0300] It should be understood that the embodiments of the present application Fig.12 The difference between the illustrated embodiments is that in the embodiments 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.
[0301] In some embodiments, when the load of the electronic device 1300 is higher than the first load threshold, cloud transmission will not be enabled.
[0302] In some embodiments, if the temperature of the electronic device 1300 is higher than the first temperature threshold, the cloud transmission will not be enabled.
[0303] For example, Fig.14 FIG. 1 is a schematic diagram showing the functional modules of an image processing system 1400 provided in an embodiment of the present application. Fig.14As shown, 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:
[0304] The scene detection module 1401 is used to detect the current photo-taking scene of the device.
[0305] 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 scene.
[0306] The second operation of the user may be an operation of the user opening the camera of the first terminal device to enter a photographing interface; or it may be a photographing operation of the user, such as the user pressing a photographing key.
[0307] The specific explanation of "determining whether to enter cloud enhanced mode based on the current scenario" is in Figure 7 The illustrated embodiment has been described in detail and will not be described again for the sake of brevity.
[0308] The judgment module 1402 is also used to respond to the user's second operation and determine whether to enter the cloud enhanced mode according to 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.
[0309] The judgment module 1402 is also used to respond to the user's second operation and determine whether to enter the cloud enhanced mode according to 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 according to the current scene.
[0310] 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 gallery.
[0311] 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.
[0312] The third processing module 1403 is also used to perform a third process on the first image to obtain a fourth image and save the fourth image in the gallery when the encoded second image sent by the server is not received within the first time threshold, wherein the start timing of the first time threshold is the moment when the device side sends the first encoded file to the server.
[0313] The first time threshold may be, for example, any time between 12 and 48 hours, such as 24 hours.
[0314] The first encoding module 1404 is used to encode the first image captured by the camera and the first information related to the first image in response to the user's photo-taking operation after the judgment module 1402 determines to enter the cloud enhancement mode, so as to obtain a first encoded file.
[0315] Among them, the cloud enhancement mode refers to a mode in which the currently captured image needs to be processed by the cloud.
[0316] 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 exposure parameters for describing the first image, one or more of 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 for describing the first image, which is not limited in this application.
[0317] 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 scene. The number of first images collected and encoded may also be different in different scenes.
[0318] In an 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 images captured and encoded) is greater.
[0319] In yet another example, a plurality of first images of different exposure types may be acquired and encoded in a high dynamic scene.
[0320] 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.
[0321] The system 1400 may further include a storage module for storing the first encoded file.
[0322] The first processing module 1405 is used to perform a first processing on the first image to obtain a gallery preview image corresponding to the first image.
[0323] The first processing may be preprocessing 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.
[0324] 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 perform an operation of starting cloud transmission.
[0325] In some embodiments, the gallery preview image is also associated with a second control, and the second control is used for the user to select the degree of second cloud enhancement, and the second cloud enhancement is a portrait enhancement based on the first cloud enhancement.
[0326] In one implementation, the first control may be a cloud transmission icon. When the user clicks on the first control, the cloud transmission is started. The user may also pause the cloud transmission by clicking on the first control again.
[0327] 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 a level from 0 to 10, and the larger the number, the greater the degree of cloud enhancement.
[0328] Among them, the first processing module 1405 performs the first processing on the first image, which may be to perform some simple ISP processing on the first image to obtain the corresponding YUV image, and then directly convert the YUV image into a preview picture in RGB format and display it in the gallery preview interface.
[0329] The first transmission module 1406 is used to send a first encoded file to the server in response to the user confirming the cloud operation and / or when the device meets the cloud conditions.
[0330] 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 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.
[0331] The first encoded file and the second encoded file may be sent separately or in a package.
[0332] The explanation of “user confirmation of cloud migration” and “cloud migration conditions” are explained in Figure 6The illustrated embodiment has been described in detail and will not be described again for the sake of brevity.
[0333] The second transmission module 1407 is used to receive the first encoded file sent by the device end.
[0334] In some embodiments, the second transmission module 1407 is further used to receive a second encoded file sent by the device.
[0335] The second decoding module 1408 is used to decode the first encoded file to obtain the first image and first information related to the first image.
[0336] 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 degree selected by the user and / or the intermediate result of the algorithm processing corresponding to the first image, for example: a preview YUV image before and after taking the photo or a JPG image obtained by algorithm processing of the first image, etc.
[0337] 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.
[0338] The explanation of “performing a second process on the first image” is given in Figure 6 The illustrated embodiment has been described in detail and will not be described again for the sake of brevity.
[0339] The second encoding module 1410 is configured to encode the second image.
[0340] 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.
[0341] The second transmission module 1407 is further configured to send the encoded second image to the device end.
[0342] The first transmission module 1406 is further configured to receive the encoded second image sent by the server.
[0343] The first decoding module 1411 is configured to decode the encoded second image to obtain the second image.
[0344] The display module 1412 is used to display the second image to the user on the device side.
[0345] In the embodiment of the present application, when the image collected by the terminal device needs to be cloud enhanced, the cloud transmission will not be started immediately after the image is collected, but 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 status 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 status is poor, thereby avoiding the terminal device from being overloaded and overheated due to cloud transmission, and avoiding the cloud transmission failure caused by poor network, thereby improving the load balance and cloud transmission success rate during the use of the terminal device;
[0346] 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, but will generate gallery preview images through simple preprocessing for users to browse, which can also save the power consumption of the terminal device to a certain extent.
[0347] One or more of the modules or units described herein can be implemented by software, hardware or a combination of the two. When any of the above modules or units are 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 and other types of computing devices that run 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 used to execute software instructions for operations or processing in the processor, necessary hardware accelerators may be further included, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements a dedicated logic operation.
[0348] 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 be independent of the software to execute the above method flow.
[0349] 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may 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 may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may 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)), etc.
[0350] Those of ordinary skill 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 to be beyond the scope of this application.
[0351] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0352] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0353] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0354] 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.
[0355] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0356] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
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; receiving a second image sent by the server, where the second image is obtained by the server performing cloud enhancement processing on the first image in the first encoded file; 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; 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 an operation of a user capturing a first image through a first terminal device, encoding the first image to obtain a first encoded file; 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.
2. The method according to claim 1, 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.
3. The method according to claim 2, 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 the first enhancement level, and the cloud enhancement processing includes the portrait enhancement.
4. The method according to any one of claims 1 to 3, 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.
5. The method according to claim 4, 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.
6. The method according to any one of claims 1 to 3, 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.
7. The method according to any one of claims 1 to 3, 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's operation of capturing the first image through the first terminal device, the first encoded file is obtained by encoding the first image.
8. The method according to any one of claims 1 to 3, 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.
9. The method according to any one of claims 1 to 3, 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.
10. The method according to any one of claims 1 to 3, 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.
11. The method according to any one of claims 1 to 3, 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.
12. The method according to any one of claims 1 to 3, characterized in that The first image includes a RAW image.
13. 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 that, 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 12.
14. 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 12 is implemented.
15. 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 12 is implemented.
Citation Information
Patent Citations
Image processing method and related device
CN112989092A
Image beautification processing method and device, storage medium and electronic equipment
CN113902611A