End-cloud collaborative image processing method and related device
By using an edge-cloud collaborative image processing method, terminal devices upload differential images to the cloud for fine retouching, which solves the problem of limited computing power of terminal devices and achieves efficient image processing and a low-latency user experience.
Patent Information
- Application Number
- CN202310809249.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-21
- Filing Date
- 2023-06-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-06-30
AI Technical Summary
In existing technologies, the computing power of mobile phones and other terminal devices is limited in image processing, resulting in high image transmission data traffic and prolonged processing time, especially in cloud photography mode where the user experience is poor.
Through edge-cloud collaborative image processing, the terminal device uploads a differential image to the cloud for fine retouching. The cloud then restores and processes the image based on the differential image, reducing the computing power requirements and data traffic of the terminal device and improving processing efficiency.
It effectively reduces the data traffic and processing latency of image transmission, allowing users to view the retouched images in the cloud in a timely manner, thus improving the user experience.
Smart Images

Figure CN118695090A
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a method and related apparatus for image processing in collaboration with a terminal and a cloud. Background Art
[0002] As users' demand for taking photos increases, the computing power of the central processing unit (CPU) of mobile phones and other terminal devices in image processing is increasingly required. Due to hardware limitations, the application performance improvement of the CPU in mobile phones and other terminal devices is limited.
[0003] With the development of cloud computing technology, transferring computing power from the client to the cloud has gradually become a direction of technological evolution. At present, for the scene of retouching multiple images, how to achieve efficient image processing in collaboration with the cloud while ensuring low data traffic consumption and low processing latency remains to be studied. Summary of the invention
[0004] The embodiment of the present application provides an end-cloud collaborative image processing method that can effectively reduce the data traffic of image transmission and reduce processing delay, and collaborate with the cloud to achieve efficient image processing, so that users can view the cloud-retouched images in a timely manner on the end side, effectively improving the user experience.
[0005] In a first aspect, an embodiment of the present application provides a cloud camera processing method, the system comprising an electronic device and a server, the method comprising: the electronic device acquires a first image to be processed; the electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a part or all area of the first image; the electronic device acquires a second image to be processed, and the second area map includes images within a part or all area of the second image; the electronic device sends a first differential image to the server through a second request message, the first differential image being a differential image between the second area map of the second image and the first area map of the first image; the server restores the second area map based on the first differential image and the first area map; the server performs image processing on the second area map to obtain a refined image of the second area map; the server sends a second response message to the electronic device, the second response message being used to indicate the refined image of the second area map; the electronic device determines the refined image of the second image based on the refined image of the second area map.
[0006] In implementing the embodiment of the present application, for the second image to be processed, the terminal side can upload the differential image of the image and the first image, and the first image has been uploaded to the cloud before the second image or uploaded to the cloud at the same time as the second image; the cloud (i.e., the server) restores the second image based on the differential image and refines the second image. By collaborating with the cloud to refine the second image, the computing power requirements and load on the terminal side can be reduced; compared with uploading the second image, uploading the differential image can reduce the amount of data transmitted between the terminal side and the cloud, thereby effectively reducing the data flow of image transmission and reducing processing delays, and collaborating with the cloud to achieve efficient image processing, so that users can view the cloud-refined images in a timely manner on the terminal side, effectively improving the user experience.
[0007] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second area image and the second area image; the method further includes: the electronic device restores the refined image of the second area image based on the second differential image and the second area image. In implementing the embodiment of the present application, the cloud sends the differential image of the second area image before and after the refinement to the end side, and the end side can restore the refined image of the second area image based on the differential image. Compared with directly sending the refined image of the second area image, sending the differential image can reduce the amount of data transmitted between the end side and the cloud side, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, so that the user can view the refined image on the cloud side in time on the end side.
[0008] In one implementation, the method further includes: the server performs image processing on the first area image to obtain a refined image of the first area image; the server sends a first response message to the electronic device, the first response message is used to indicate the refined image of the first area image; the electronic device determines the refined image of the first image based on the refined image of the first area image. In implementing the embodiment of the present application, the cloud sends a differential image of the first area image before and after the refinement to the end side, and the end side can restore the refined image of the first area image based on the differential image. Compared with directly sending the refined image of the first area image, sending the differential image can reduce the amount of data transmitted between the end side and the cloud side, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay, so that the user can view the refined image on the cloud side in time on the end side.
[0009] In one implementation, the electronic device is provided with a continuous shooting function, and the first image and the second image are two images taken under the continuous shooting function at one time; the method further includes: the electronic device detects a first input operation to start the continuous shooting function; the above-mentioned electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the first input operation, the electronic device obtains the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is the non-first image of the continuous shooting. In implementing the embodiment of the present application, the similarity of the images continuously shot by the continuous shooting function is generally high; in the scenario where the continuous shooting function is used to shoot images, the terminal side can upload the first image of the continuous shooting to the cloud; for the non-first image of the continuous shooting, such as the second image, the terminal side can upload the differential image of the image and the first image to the cloud. Compared with directly uploading the second image, uploading the differential image can effectively reduce the data traffic of the image transmission and reduce the processing delay.
[0010] In one implementation, the electronic device acquires a first image to be processed, including: in response to a detected first shooting instruction, a camera of the electronic device captures the first image; the electronic device acquires a second image to be processed, including: in response to a detected second shooting instruction, a camera of the electronic device captures the second image; the shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold. In implementing the embodiment of the present application, in a scenario where a single image is captured multiple times in succession, when the shooting time interval between the captured second image and the first image is less than a time threshold, and / or the similarity with the first image is greater than a similarity threshold, the terminal side can upload a differential image of the image and the first image to the cloud. Compared with directly uploading the second image, uploading the differential image can effectively reduce the data traffic of image transmission and reduce processing delays.
[0011] In one implementation, the method further includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image is a differential image between a third area map of the third image and a first area map of the first image; the third area map includes images in part or all of the area of the third image; the server restores the third area map according to the third differential image and the first area map; the server performs image processing on the third area map to obtain a refined image of the third area map; the server sends a third response message to the electronic device, the third response message is used to indicate the refined image of the third area map; the electronic device determines the refined image of the third image based on the refined image of the third area map. In the implementation of the embodiment of the present application, the reference image (i.e., the first image) used for differential of the third image is an image that has been uploaded to the cloud without differential images. In the implementation of the embodiment of the present application, after uploading the first image to the cloud, for other images to be processed, the end side uploads the differential image of the image to be processed and the first image to the cloud. Exemplarily, in a scene shot using a continuous shooting function, for non-first images of continuous shooting, the end side uploads the differential image of the image and the first image of the continuous shooting to the cloud.
[0012] In one implementation, the method further includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image is a differential image between a third area map of the third image and a second area map of the second image; the third area map includes images in part or all of the area of the third image; the server restores the third area map according to the third differential image and the second area map; the server performs image processing on the third area map to obtain a refined image of the third area map; the server sends a third response message to the electronic device, the third response message is used to indicate the refined image of the third area map; the electronic device determines the refined image of the third image based on the refined image of the third area map. In the implementation of the embodiment of the present application, the reference image (i.e., the second image) used for differential of the third image is an image that has uploaded the corresponding differential image to the cloud. In the implementation of the embodiment of the present application, for the third image to be processed, the end side uploads to the cloud the differential image of the third image and the previous image to be processed of the third image. Exemplarily, in a scene shot using a continuous shooting function, for a non-first image of the continuous shooting, the end side uploads to the cloud the differential image of the image and the previous image of the continuous shooting.
[0013] In one implementation, for the third image to be processed, the terminal side may upload to the cloud a differential image between the third image and any image that has been uploaded to the cloud.
[0014] In one implementation, the electronic device sends the first differential image to the server through the second request message, including: when the data volume of the first differential image is less than the data volume of the second area map, the electronic device sends the first differential image and the image identifier of the first area map to the server through the first request message; when the data volume of the second differential image is less than the data volume of the refined image of the second area map, the second response message includes the second differential image and the image identifier of the second area map, and the second differential image is the differential image between the refined image of the second area map and the second area map; when the data volume of the second differential image is less than the data volume of the refined image of the second area map, the second response message includes the refined image of the second area map. In the implementation of the embodiment of the present application, after the end side / cloud side differentiates a specific image, if the data volume of the differential image corresponding to the specific image is smaller than that of the specific image, the differential image is sent; otherwise, the above-mentioned specific image is sent directly. In this way, it can be ensured that the data volume of the image transmitted between the end side and the cloud side is as small as possible, thereby effectively reducing the data traffic of the image transmission and reducing the processing delay.
[0015] In one implementation, when the image refinement mode is the full-image refinement mode, the regional map of the image includes the image content in the entire area of the image; when the second image refinement mode is the full-image refinement mode, the second image and the second regional map are the same, and the refined map of the second regional map is the refined map of the second image. In implementing the embodiment of the present application, the refinement mode of the image to be processed is identified, and for the image to be processed in the subject refinement mode, the target subject map (i.e., the regional map) is cut out from the image to be processed, and only the differential image corresponding to the target subject map / target subject map is sent to the cloud. In this way, for the subject refinement mode, the amount of data uploaded and returned between the end and the cloud is further reduced, thereby reducing the network traffic and processing delay for transmitting images.
[0016] In one implementation, when the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; when the second image refinement mode is the subject refinement mode, before the electronic device sends the first differential image to the server through the second request message, the method also includes: the electronic device obtains the position of the second region map in the second image, and crops the second region map from the second image; the above electronic device determines the refined image of the second image based on the refined image of the second region map, including: based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with the refined image of the second region map, and obtains the refined image of the second image. In implementing the embodiment of the present application, when the image to be processed adopts the subject refinement mode, the refined image of the target subject map (i.e., the region map) is used to replace the target subject map in the image to be processed, so that the refined image of the image to be processed can be obtained.
[0017] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method adopted for the second image; the above-mentioned server performs image processing on the second area image of the second image to obtain a refined image of the second area image, including: the server performs image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.
[0018] In one implementation, the electronic device pre-stores a correspondence between multiple image processing methods and refinement modes, the refinement modes include a full image refinement mode and a subject refinement mode; the multiple image processing methods include multiple shooting modes, the multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is a subject refinement mode; the image processing method used for the image is used to determine the refinement mode of the image. In implementing the embodiment of the present application, the refinement mode of the image can be determined according to the image processing method used for the image to be processed.
[0019] In one implementation, the first request message also includes an image identifier of the first area map; the second request message also includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image and the first area map indicated by the reference image identifier, and determines that the image identifier of the restored second area map is the source image identifier; the second response message includes the image identifier of the second area map. In implementing the embodiment of the present application, when uploading the differential image of the second area map, the reference image identifier of the differential image is uploaded so that the cloud can determine the reference image for restoring the second area map; the source image (i.e., the second area map) identifier of the differential image is uploaded so that the cloud can determine the image identifier of the restored second area map.
[0020] In one implementation, the second request message also includes an algorithm identifier, which indicates a first restoration algorithm; the server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image, the first area map and the first restoration algorithm.
[0021] In one implementation, the image type includes a differential image and a non-differential image; the first request message also includes a first image type, and the first image type is used to indicate that the first area map is a non-differential image; the second request message also includes a second image type, and the second image type is used to indicate that the first differential image is a differential image; the server restores the second area map based on the first differential image and the first area map, including: when determining that the second image type is a differential image, the server restores the second area map based on the first differential image and the first area map. When implementing the embodiment of the present application, when uploading an image, the image type is also uploaded so that the cloud can determine whether differential restoration is required for the image uploaded on the end side.
[0022] In one implementation, the electronic device sends a first area map of the first image to the server via a first request message, including: when the electronic device determines that the first image is not a non-first image in a continuous shooting scenario, the electronic device sends a first area map within the refined image area of the first image to the server via the first request message; the electronic device sends a first differential image to the server via a second request message, including: when the electronic device determines that the second image is a non-first image in a continuous shooting scenario, the electronic device sends the first differential image to the server via the second request message.
[0023] In one implementation, when the second image satisfies any one of the three conditions, the second image is a non-first image in the continuous shooting scenario, and the above three conditions include: the second image is a non-first photo taken by the continuous shooting function; the shooting time interval between the second image and the first image is less than a time threshold; the similarity between the second image and the first image is greater than a similarity threshold.
[0024] In one implementation, when any one of the at least one image processing methods used for the second image corresponds to a subject refinement mode, the refinement mode of the second image is the subject refinement mode.
[0025] In one implementation, the electronic device pre-stores a correspondence between multiple subject types and refinement modes, and a first subject type among the multiple subject types corresponds to a subject refinement mode; determining the refinement mode of the second image as the subject refinement mode includes: identifying that the target subject of the second image is the first subject type, and determining that the refinement mode of the second image is the subject refinement mode corresponding to the first subject type.
[0026] In one implementation, the above-mentioned multiple image processing methods include some or all of the following: multiple shooting modes, multiple filters, multiple character special effects, multiple beauty options, high-definition restoration and high-definition portraits.
[0027] In one implementation, the first image and the second image are preview images captured by a camera of the electronic device; the method further includes: the electronic device displays a refined image of the first image in a preview frame; the electronic device displays a refined image of the second image in the preview frame.
[0028] In one implementation, the method also includes: when multiple images are selected, a second input operation is detected, and the second input operation is used to trigger image processing of the multiple images; the multiple images include a first image and a second image; the above-mentioned electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the second input operation, the electronic device obtains the first image to be processed and obtains the second image to be processed.
[0029] In a second aspect, an embodiment of the present application provides an end-cloud collaborative image processing method, which is applied to an electronic device, and the method includes: the electronic device obtains a first image to be processed; the electronic device sends a first area map of the first image to a server through a first request message; the first area map includes images within a part or all area of the first image; the electronic device obtains a second image to be processed, and the second area map includes images within a part or all area of the second image; the electronic device sends a first differential image to the server through a second request message, and the first differential image is a differential image between the second area map of the second image and the first area map of the first image; the second request message is used to indicate the restoration of the second area map according to the first differential image, and to obtain a refined image of the second area map; the electronic device receives a second response message sent by the server, and the second response message is used to indicate the refined image of the second area map; the electronic device determines the refined image of the second image based on the refined image of the second area map.
[0030] In implementing the embodiment of the present application, for the second image to be processed, the terminal side can upload the differential image of the image and the first image, and the first image has been uploaded to the cloud before the second image or uploaded to the cloud at the same time as the second image; the cloud (i.e., the server) restores the second image based on the differential image and refines the second image. By collaborating with the cloud to refine the second image, the computing power requirements and load on the terminal side can be reduced; compared with uploading the second image, uploading the differential image can reduce the amount of data transmitted between the terminal side and the cloud, thereby effectively reducing the data flow of image transmission and reducing processing delays, and collaborating with the cloud to achieve efficient image processing, so that users can view the cloud-refined images in a timely manner on the terminal side, effectively improving the user experience.
[0031] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second region image and the second region image; the method also includes: the electronic device restoring the refined image of the second region image based on the second differential image and the second region image.
[0032] In one implementation, the first request message is used to instruct the server to obtain a refined image of the first area image; the method also includes: the electronic device receives a first response message sent by the server, the first response message is used to indicate the refined image of the first area image; the electronic device determines the refined image of the first image based on the refined image of the first area image.
[0033] In one implementation, the electronic device is provided with a continuous shooting function, and the first image and the second image are two images taken in one continuous shooting function; the method further includes: the electronic device detects a first input operation for starting the continuous shooting function; the electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the first input operation, the electronic device obtains the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.
[0034] In one implementation, the electronic device acquires a first image to be processed, including: in response to a detected first shooting instruction, a camera of the electronic device captures the first image; the electronic device acquires a second image to be processed, including: in response to a detected second shooting instruction, a camera of the electronic device captures the second image; a shooting time interval between the second image and the first image is less than a time threshold, and / or a similarity between the second image and the first image is greater than a similarity threshold.
[0035] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image being a differential image between a third area image of the third image and a first area image of the first image; the third area image includes an image within a partial or entire area of the third image; the third request message is used to indicate restoration of the third area image based on the third differential image, and to obtain a refined image of the third area image; the electronic device receives a third response message sent by the server, the third response message being used to indicate a refined image of the third area image; the electronic device determines a refined image of the third image based on the refined image of the third area image.
[0036] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image being a differential image between a third area image of the third image and a second area image of the second image; the third area image includes an image within a partial or entire area of the third image; the third request message is used to indicate restoration of the third area image based on the third differential image, and to obtain a refined image of the third area image; the electronic device receives a third response message sent by the server, the third response message being used to indicate a refined image of the third area image; the electronic device determines a refined image of the third image based on the refined image of the third area image.
[0037] In one implementation, the electronic device sends the first differential image to the server via a second request message, including: when the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the first differential image and the image identifier of the first area map to the server via the first request message; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the second differential image and the image identifier of the second area map, and the second differential image is a differential image between the refined image of the second area map and the second area map; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area map, the second response message includes the refined image of the second area map.
[0038] In one implementation, when the image refinement mode is the full image refinement mode, the regional map of the image includes the image content in the entire area of the image; when the refinement mode of the second image is the full image refinement mode, the second image and the second regional map are the same, and the refined map of the second regional map is the refined map of the second image.
[0039] In one implementation, when the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; when the second image refinement mode is the subject refinement mode, before the electronic device sends the first differential image to the server through a second request message, the method also includes: the electronic device obtains the position of the second region map in the second image, and crops the second region map from the second image; the above-mentioned electronic device determines the refined image of the second image based on the refined image of the second region map, including: based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with the refined image of the second region map, and obtains the refined image of the second image.
[0040] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method used for the second image; the first request message is used to request the server to perform image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.
[0041] In one implementation, the electronic device pre-stores a correspondence between multiple image processing methods and refinement modes, the refinement modes including a full-image refinement mode and a subject refinement mode; the above-mentioned multiple image processing methods include multiple shooting modes, the above-mentioned multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is the subject refinement mode; the image processing method adopted by the image is used to determine the refinement mode of the image.
[0042] In one implementation, the first request message also includes an image identifier of the first area map; the second request message also includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the second response message includes the image identifier of the second area map.
[0043] In an implementation manner, the second request message further includes an algorithm identifier, where the algorithm identifier is used to indicate that the restoration algorithm used by the server to restore the second regional map is the first restoration algorithm.
[0044] In a third aspect, an embodiment of the present application provides an end-cloud collaborative image processing method, which is applied to a server, and the method includes: the server receives a first area map of a first image sent by an electronic device through a first request message; the first area map includes images within a partial or entire area of the first image; the server receives a first differential image sent by the electronic device through a second request message, the first differential image is a differential image between the second area map and the first area map; the second area map includes images within a partial or entire area of the second image; the server restores the second area map based on the first differential image and the first area map; the server performs image processing on the second area map to obtain a refined image of the second area map; the server sends a second response message to the electronic device, the second response message is used to indicate the refined image of the second area map; the refined image of the second area map is used to determine the refined image of the second image.
[0045] In implementing the embodiment of the present application, for the second image to be processed, the terminal side can upload the differential image of the image and the first image, and the first image has been uploaded to the cloud before the second image or uploaded to the cloud at the same time as the second image; the cloud (i.e., the server) restores the second image based on the differential image and refines the second image. By collaborating with the cloud to refine the second image, the computing power requirements and load on the terminal side can be reduced; compared with uploading the second image, uploading the differential image can reduce the amount of data transmitted between the terminal side and the cloud, thereby effectively reducing the data flow of image transmission and reducing processing delays, and collaborating with the cloud to achieve efficient image processing, so that users can view the cloud-refined images in a timely manner on the terminal side, effectively improving the user experience.
[0046] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second area image and the second area image; the second response message is used to instruct the electronic device to restore the refined image of the second area image based on the second differential image and the second area image.
[0047] In one implementation, the method also includes: the server performs image processing on the first area image to obtain a refined image of the first area image; the server sends a first response message to the electronic device, the first response message is used to indicate the refined image of the first area image; the refined image of the first area image is used to determine the refined image of the first image.
[0048] In one implementation, the method also includes: the server receives a third differential image sent by the electronic device through a third request message, the third differential image is a differential image between the third area map and the first area map; the third area map includes an image within a part or all of the area of the third image; the server restores the third area map based on the third differential image and the first area map; the server performs image processing on the third area map to obtain a refined image of the third area map; the server sends a third response message to the electronic device, the third response message is used to indicate the refined image of the third area map; the refined image of the third area map is used to determine the refined image of the third image.
[0049] In one implementation, the method also includes: the server receives a third differential image sent by the electronic device through a third request message, the third differential image is a differential image between the third area map and the second area map; the third area map includes an image within a part or all of the area of the third image; the server restores the third area map based on the third differential image and the second area map; the server performs image processing on the third area map to obtain a refined image of the third area map; the server sends a third response message to the electronic device, the third response message is used to indicate the refined image of the third area map; the refined image of the third area map is used to determine the refined image of the third image.
[0050] In one implementation, when the data amount of the second differential image is smaller than the data amount of the refined image of the second area image, the second response message includes the second differential image and the image identifier of the second area image, and the second differential image is a differential image between the refined image of the second area image and the second area image; when the data amount of the second differential image is smaller than the data amount of the refined image of the second area image, the second response message includes the refined image of the second area image.
[0051] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method adopted for the second image; the above-mentioned server performs image processing on the second area image of the second image to obtain a refined image of the second area image, including: the server performs image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.
[0052] In one implementation, the first request message also includes an image identifier of the first area map; the second request message also includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image and the first area map indicated by the reference image identifier, and determines that the image identifier of the restored second area map is the source image identifier; the second response message includes the image identifier of the second area map.
[0053] In one implementation, the second request message also includes an algorithm identifier, which indicates a first restoration algorithm; the server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image, the first area map and the first restoration algorithm.
[0054] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes the end-cloud collaborative image processing method described in the second aspect.
[0055] In the fifth aspect, an embodiment of the present application provides a server, comprising: a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code comprises computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes the end-cloud collaborative image processing method described in the third aspect.
[0056] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising computer instructions. When the computer instructions are executed on a device (e.g., the electronic device of the fourth aspect, the server of the fifth aspect), the device executes the end-cloud collaborative image processing method described in any implementation of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic diagram of a system architecture of a communication system provided in an embodiment of the present application;
[0058] FIG. 2A to FIG. 2C This is a flowchart of image processing in a continuous shooting scenario provided by an embodiment of the present application;
[0059] FIG. 3A to FIG. 3L A user interface related to the continuous shooting scene provided in the embodiment of the present application;
[0060] 4A to 4F A user interface related to the continuous shooting scene provided in the embodiment of the present application;
[0061] FIG. 5A to FIG. 5H A user interface related to the continuous shooting scene provided in the embodiment of the present application;
[0062] FIG. 6A to FIG. 6D A user interface related to the continuous shooting scene provided in the embodiment of the present application;
[0063] Fig. 7A A flowchart of a method for image processing in which the end and the cloud collaborate in an embodiment of the present application are provided;
[0064] Figure 7B A flow chart of a method for determining a non-first image in a continuous shooting scene provided in an embodiment of the present application;
[0065] Figure 8 A diagram of the device architecture provided for an embodiment of the present application;
[0066] Fig.9A A flowchart of a method for image processing in which the end and the cloud collaborate in an embodiment of the present application are provided;
[0067] Fig. 9B A schematic diagram of an image involved in the end-cloud collaborative image processing method provided in an embodiment of the present application;
[0068] Fig. 10A A flowchart of a method for image processing in which the end and the cloud collaborate in an embodiment of the present application are provided;
[0069] Fig. 10B A schematic diagram of an image involved in the end-cloud collaborative image processing method provided in an embodiment of the present application;
[0070] Fig.11 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0071] Fig.12 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. 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 the text 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, "multiple" means two or more than two.
[0073] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting 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, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0074] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0075] The following is an introduction to the communication system 10 involved in the end-cloud collaborative image processing method provided in an embodiment of the present application.
[0076] Figure 1 The system architecture of the communication system 10 provided in the embodiment of the present application is exemplarily shown. Figure 1 As shown, the communication system 10 includes a terminal device 100 and a server 200. The terminal device 100 can communicate with the server 200 through a communication network.
[0077] The communication network may include local area networks (LAN) and / or wide area networks (WAN). The communication network may be implemented using any known network communication protocol, which may be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), FIREWIRE, 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), Bluetooth, wireless fidelity (Wi-Fi), NFC, voice over Internet protocol (VoIP), communication protocols supporting network slicing architecture, or any other suitable communication protocols.
[0078] The terminal device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device (smart bracelet), a vehicle-mounted device, a smart home device (smart TV, smart screen, large screen device, etc.) and / or a smart city device. The embodiment of the present application does not impose any special restrictions on the specific type of the terminal device 100. The terminal device 100 may also be referred to as an electronic device.
[0079] The server 200 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing center. The server 200 involved in the embodiment of the present application may also be referred to as a cloud server or a cloud.
[0080] It should be understood that Figure 1 The system structure diagram of the communication system provided in the embodiment of the present application is only a schematic diagram, and does not constitute a specific limitation on the communication system 10. The communication system 10 may include more or less devices than shown in the figure, for example, it may also include a wireless relay device and a wireless backhaul device ( Figure 1 ), which is not shown in the figure and is not limited here.
[0081] In a terminal-cloud collaborative image processing method provided in an embodiment of the present application, the terminal device 100 can upload image a to the cloud for refinement, and the cloud then transmits the refined image a back to the terminal side.
[0082] In some embodiments of the present application, the above-mentioned image a may be a photo a taken in real time by the terminal device 100. When a user uses the camera of the terminal device 100 to take a photo, the terminal device 100 may automatically upload the taken photo a to the cloud for retouching, and the cloud will then transmit the retouched photo a back to the end side; when the user views the photo a, the terminal device will display the retouched photo a transmitted back from the cloud to the user. In the embodiment of the present application, a camera that supports automatically transmitting photos to the cloud for retouching when taking photos on the end side may be referred to as a cloud camera or a cloud photo mode.
[0083] In the above-mentioned end-cloud collaborative image processing method, the time-consuming steps include: uploading photos, image processing (i.e., retouching) on the cloud, and transmitting back the refined photos. Among them, the time consumption of uploading photos and transmitting back the refined photos is limited by the network speed and the size of the photos. When the image data volume of the photos is large and / or the network speed is average, it takes a long time; in particular, it takes longer to upload photos due to the limitation of uplink bandwidth by mobile networks (such as the fifth generation mobile communication technology (5th Generation Mobile Communication Technology, 5G)). For example, the 5G uplink bandwidth of 90% of users is 21Mbps. It takes 2.28S to transmit a 6MB photo to the cloud, and 0.53s to transmit the refined photo back to the end side.
[0084] The above image processing method has the following problems: the amount of data uploaded to the client and transmitted back to the cloud is high, which will lead to high data traffic consumption on the client and high image processing latency, which in turn causes users to be unable to view the refined images in time. In particular, the real-time cloud photography mode has higher requirements for image processing latency, and the above problems lead to a poor user experience.
[0085] For continuous shooting scenarios, the above problem is more serious. The continuous shooting scenario can be a scenario of taking photos at a high frequency; in this scenario, the terminal device 100 takes multiple photos continuously, such as the first photo to the nth photo of the continuous shooting, and performs fine-tuning on the multiple photos. For example, see Figure 2A The image processing process of end-cloud collaboration in the continuous shooting scenario is shown. In the continuous shooting scenario, the image processing delays of multiple photos are superimposed, the total processing time is extended, and the user experience is poor.
[0086] In another end-cloud collaborative image processing method provided in an embodiment of the present application, the end side uploads multiple images to the cloud; for image a in a non-continuous shooting scene or the first image a in a continuous shooting scene (for example Figure 2B The client sends the complete image of image a to the cloud; the cloud sends the difference image of image a before and after the retouching to the client; the client can restore the retouched image of image a based on the difference image and image a. Figure 2B The nth photo of the continuous shooting shown in the figure, where n is greater than 1), the end side sends image b and image c to the cloud (for example Figure 2B The cloud can restore image b based on the difference image and image c, and transmit the difference image of image b before and after the refinement to the end side; the end side can restore the refined image of image b based on the difference image and image b. Image c is the reference image used for the difference of image b, and image c is an image that has been uploaded to the cloud before image b, or an image uploaded to the cloud at the same time as image b.
[0087] In one implementation, image c can be any image that has been uploaded to the cloud. Exemplarily, the terminal device 100 uploads the complete image of the first photo to the cloud for fine-tuning; the terminal device 100 uploads the differential image of the second photo and the first photo to the cloud, and the cloud can restore the second photo based on the differential image and the first photo, and then retouch the second photo. In this way, the cloud has acquired the first photo and the second photo. After taking the third photo, the terminal device 100 can upload the differential image of the third photo and the first photo to the cloud, and the cloud can restore the third photo based on the differential image and the first photo; or, the terminal device 100 can upload the differential image of the third photo and the second photo to the cloud, and the cloud can restore the third photo based on the differential image and the second photo. Similarly, when uploading the nth photo, the cloud has obtained any photo before the nth photo, such as the ith photo; the terminal device 100 can upload the differential image of the nth photo and the ith photo to the cloud, and the cloud can restore the nth photo based on the differential image and the ith photo, and then refine the nth photo.
[0088] In one implementation, the image c may be the above-mentioned image a, that is, the image uploaded as a complete image to the cloud.
[0089] In one implementation, see Figure 2C In the image processing flow chart shown, image c is the previous image of image b, that is, i is equal to n-1. Specifically, the terminal device 100 uploads the complete image of the first photo to the cloud for fine-tuning; the terminal device 100 uploads the differential image of the second photo and the first photo to the cloud, and the cloud can restore the second photo based on the differential image and the first photo, and then fine-tune the second photo; similarly, the terminal device 100 uploads the differential image of the nth (for example, 3) photo and the n-1th (for example, 2) photo to the cloud, and the cloud can restore the nth photo based on the differential image and the n-1th photo, and then fine-tune the nth photo.
[0090] By implementing the above-mentioned image processing method, the amount of differential image data uploaded on the terminal side is small, which effectively reduces the network traffic and latency for uploading photos; the amount of differential image data uploaded back from the cloud is also small, which effectively reduces the network traffic and latency for uploading photos; in the continuous shooting scenario, users can view the refined images in time, which effectively improves the user experience.
[0091] The uploaded image c involved in the embodiment of the present application refers to uploading the complete image / differential image of image c to the cloud; similarly, according to the aforementioned scheme, when the differential image corresponding to image c is uploaded to the cloud, the cloud can restore the complete image c based on the differential image and the reference image corresponding to image c.
[0092] The “fine-tuning” involved in the embodiments of the present application refers to performing image processing on an image using an image processing algorithm / model corresponding to a specific image processing method. The embodiments of the present application do not specifically limit the above-mentioned specific image processing method, which will be introduced in detail in subsequent embodiments and will not be elaborated here.
[0093] The following introduces the application scenarios involved in the embodiments of the present application, and exemplifies the continuous shooting scenes and the fine-tuning mode in combination with the application scenarios.
[0094] It should be noted that the end-cloud collaborative image processing method provided in the embodiment of the present application can be applied to two types of application scenarios. In the first type of application scenario, the image to be processed is an image captured in real time by the camera in the cloud shooting mode, and the terminal device 100 automatically uploads the image to the cloud for fine-tuning; the first type of application scenario includes the following application scenarios 1 to 3. In the second type of application scenario, the image to be processed is a non-real-time image stored locally, and the user manually triggers the terminal device 100 to upload the image to the cloud for fine-tuning; the second type of application scenario includes the following application scenarios 4 and 5.
[0095] Among them, the above-mentioned locally stored images can be photos taken previously by the terminal device 100, or images obtained by the terminal device 100 through other means, such as images sent by other devices, images obtained by screenshots, images downloaded from the web page, etc., which are not specifically limited here.
[0096] Application scenario 1: Take multiple photos and retouch them using the continuous shooting function in cloud camera mode
[0097] In some embodiments, after the terminal device 100 installs APP1 (such as a camera APP), APP1 can automatically turn on the cloud photo mode. In some embodiments, after the terminal device 100 installs APP1, the user needs to manually turn on the cloud photo mode. FIG. 3A to FIG. 3B An example of manually starting the cloud photo taking mode is shown.
[0098] For example, Figure 3A The main interface 11 is used to display the installed application (application, APP); the terminal device 100 is installed with a camera APP, and the main interface 11 can display the application icon 101 of the camera APP. Figure 3A and Figure 3B As shown, after detecting that the user clicks the application icon 101, the terminal device 100 displays the shooting interface 12 of the camera APP.
[0099] The shooting interface 12 includes a preview box 102 , a shooting mode bar 103 , a camera switching control 104 , a shooting control 105 , an album control 106 and a cloud photo taking control 107 .
[0100] Among them, the preview box 102 is used to display the preview image captured by the camera of the terminal device 100 in a specific shooting mode. The shooting mode bar 103 is used to select the above shooting mode. The camera switching control 104 is used to switch the camera currently capturing the image. The shooting control 105 can receive the user's input operation (such as a touch operation). In response to the above input operation, the camera APP can shoot and save the image based on the current shooting mode. The album control 106 is used to view the photos that have been taken.
[0101] The cloud photo control 107 is used to turn on / off the cloud photo mode. The cloud photo control 107 includes two states: on and off. The user can control the cloud photo control 107 to switch between the two states. Figure 3B The cloud photo control 107 shown is in a closed state; Figure 3B and Figure 3C As shown, an input operation (such as a click operation) acting on the cloud photo control 107 is detected. In response to the input operation, the terminal device 100 turns on the cloud photo mode and switches the cloud photo control 107 to an on state.
[0102] In some embodiments, after the cloud photo mode is turned on, if the terminal device 100 has a network, the taken photos are uploaded to the cloud for refinement; if the terminal device 100 has no network, the taken photos are refined locally.
[0103] The embodiment of the present application does not specifically limit the method of enabling the cloud photo mode. For example, the cloud photo mode can also be enabled through the application settings of the camera APP.
[0104] For example, Figure 3B As shown, the shooting mode column 103 may include: night scene mode, large aperture mode, professional mode, photo mode 103A, video mode, portrait mode 103B, etc. Figure 3B The current shooting mode shown is the photo shooting mode, and the user can switch shooting modes. The shooting mode bar 103 also includes more options 103C. The user clicks on more options to trigger the terminal device 100 to display more optional shooting modes, such as telephoto mode, landscape mode, panoramic mode, face special effects mode, etc. Exemplarily, the portrait mode 103B is used to refine the characters in the photos; the large aperture mode is used to blur the background of the target subject in the image and improve the clarity of the target subject; the landscape mode is used to refine the scenery in the photos; and the face special effects mode is used to add special effects to the faces in the photos.
[0105] Optionally, in a specific shooting mode, filter effects, beauty effects, face effects, makeup effects, body effects, etc. can also be superimposed. Exemplarily, in portrait mode 103B, a makeup effect is added. Exemplarily, Figure 3C and Figure 3D As shown, in the photo mode 103A, the shooting interface 12 also includes a filter control 108; after detecting an input operation (such as a click operation) acting on the filter control 108, the camera APP displays multiple filter options (such as a landscape filter 109), and one filter option displays a filter effect image and a filter name. Taking the landscape filter 109 as an example, after detecting the user's input operation of selecting the landscape filter 109, the camera APP can add a landscape filter to the image captured by the camera.
[0106] It is understood that in the embodiment of the present application, the camera APP can perform fine-tuning on the image taken by the camera according to the image retouching parameters used when taking pictures. The above-mentioned image retouching parameters indicate one or more image processing methods selected by the user, such as the shooting mode, filter option, beauty option, makeup option, body option and face special effect option. It is understood that one shooting mode can correspond to one image processing method, and one filter option can also correspond to one image processing method.
[0107] In an embodiment of the present application, the camera APP of the terminal device 100 is provided with a button or operation that supports a continuous shooting function, and the similarity of photos taken by the continuous shooting function is usually very high; in the cloud shooting mode, when the continuous shooting function is started, the terminal device 100 can take multiple photos continuously and automatically upload the above multiple photos to the cloud for fine-tuning.
[0108] For example, Figure 3E and Figure 3F As shown, the terminal device 100 detects the user's input operation to start the continuous shooting function (for example, long pressing the shooting control 105); in response to the above input operation, the terminal device 100 starts to continuously shoot photos and displays the number of photos that have been shot continuously 110. Figure 3F As shown, the quantity mark 110 indicates that one photo has been taken continuously; Figure 3G As shown, the quantity mark 110 indicates that two photos have been taken continuously. Figure 3H and Fig. 3I As shown, when the photo quantity indicator 110 indicates that 6 photos have been taken continuously, the terminal device 100 detects the user's input operation to stop the continuous shooting (for example, stop pressing the shooting control 105); in response to the above input operation, the terminal device 100 stops taking photos continuously, saves the refined images of the 6 photos taken continuously in the cloud collaborative refinement, and displays the thumbnail of the cover image of the photos taken continuously in the album control 106. The cover image can be the first photo taken continuously, or it can be the best image in the photos taken continuously determined by the terminal device 100 using a preset selection model.
[0109] like Fig. 3I and Figure 3J As shown, after detecting that the user clicks the album control 106, the terminal device 100 displays the image display interface 13. The image display interface 13 includes an image display frame 201 and a continuous shooting viewing control 202. The image display frame 201 currently displays the cover image of the continuous shooting photos after cloud-based collaborative refinement, such as the refined image of the first image of the continuous shooting. Figure 3J and Figure 3K As shown, after detecting that the user clicks the continuous shooting viewing control 202, the terminal device 100 displays the user interface 14, which includes thumbnails 203 of each image of the continuous shooting, such as the thumbnail 203A of the second image. Figure 3K and Figure 3L As shown, after detecting that the user clicks on the thumbnail 203A of the second image, the terminal device 100 displays the second image after cloud-based collaborative refinement in the image display frame 201 .
[0110] In some embodiments, the terminal device 100 determines that the first photo a under a continuous shooting function is the first image under the continuous shooting scene, and uploads the first photo to the cloud for fine-tuning; the terminal device 100 determines that a non-first photo (such as photo b) under a continuous shooting function is a non-first image under the continuous shooting scene, and uploads the difference image between photo b and photo c to the cloud for fine-tuning photo b. In one implementation, photo c is the previous photo of photo b under this continuous shooting function. In one implementation, photo c is any photo taken before photo b under this continuous shooting function (such as the first photo a).
[0111] In some embodiments, the camera APP of the terminal device 100 may provide a variety of image processing methods (such as multiple shooting modes, multiple makeup options, multiple filter options, multiple beauty options, multiple lighting options, multiple face special effects options, etc.) for users to choose from in the shooting interface 12; the cloud stores the image processing algorithms / models corresponding to each image processing method. When the camera APP of the terminal device 100 takes a photo and uploads the photo to the cloud, it also uploads the corresponding image retouching parameters of the photo. The image retouching parameters are used to indicate one or more image processing methods used when taking the photo, as well as the required image processing parameters; the cloud refines the photo according to the image processing algorithm / model corresponding to the image processing method indicated by the above-mentioned image retouching parameters to meet the user's shooting needs on the terminal side.
[0112] The embodiments of the present application do not specifically limit the image processing method provided by the camera APP of the terminal device 100, the process of the user selecting the image processing method, and the image processing algorithm / model corresponding to the image processing method.
[0113] For example, the user selects the portrait mode as the shooting mode; the photo editing parameters corresponding to the taken photo indicate the above-mentioned portrait mode; the cloud can refine the photo according to the image processing module algorithm corresponding to the portrait mode.
[0114] For example, the user selects the shooting mode as the photo mode, and selects the landscape filter in the photo mode through the filter control 108; the photo editing parameters corresponding to the taken photo indicate the landscape filter in the photo mode; the cloud can refine the photo according to the image processing module algorithm corresponding to the landscape filter in the photo mode.
[0115] For example, the user selects portrait mode as the shooting mode, and adjusts the image processing parameters in portrait mode (such as skin smoothing parameters, face slimming parameters, etc.); the photo editing parameters corresponding to the taken photos indicate the above-mentioned portrait mode and the image processing parameters in the above-mentioned portrait mode; the cloud performs fine-tuning on the photos according to the image processing algorithm corresponding to the portrait mode and the above-mentioned image processing parameters.
[0116] Application scenario 2: Take a single photo and retouch it using the non-continuous shooting function in cloud camera mode
[0117] In the embodiment of the present application, in the cloud photo mode, the terminal device 100 takes a single photo through the shooting control 105 of the shooting interface 12, and each photo taken is automatically uploaded to the cloud for fine-tuning.
[0118] For example, the user controls the terminal device 100 to take photos c and b successively. The image processing methods (such as shooting mode, filter options) selected for taking photos c and b can be the same or different. Figure 4A and Figure 4B As shown, upon detecting the user's input operation (eg, a click operation) on the portrait mode 103B, the terminal device 100 switches the shooting mode to the portrait mode. Figure 4B As shown, in the portrait mode, when the user's shooting operation is detected (for example, clicking the shooting control 105), the camera APP takes a photo c, obtains and saves the refined image of the photo c collaboratively refined in the cloud. Figure 4C As shown, when the user's shooting operation is detected, the terminal device 100 shoots the photo b, and obtains and saves the refined image of the photo b that is collaboratively refined in the cloud. Figure 4D and Figure 4E As shown, it is detected that the user clicks the album control 106, and the terminal device 100 displays the refined image of photo b on the image display interface 13; Figure 4E and Figure 4F As shown, the user slides photo b to the left to view the refined image of photo c taken previously.
[0119] In some embodiments, when taking photo b, if the terminal device 100 confirms that photo b satisfies at least one of the following conditions: "the shooting time interval between photo b and photo c is less than a time threshold (for example, 0.5s); the similarity between photo b and photo c is greater than a similarity threshold (for example, 80%)", then photo b is determined to be a non-first image in a continuous shooting scenario, and the difference image between photo b and photo c is uploaded to the cloud for fine-tuning photo b; otherwise, photo b is determined to be an image in a non-continuous shooting scenario, and the complete image of photo b is uploaded to the cloud for fine-tuning.
[0120] In some embodiments, when taking photo b, if the terminal device 100 confirms that photo b satisfies "the shooting time interval between photo b and photo c is less than the time threshold, and the similarity between photo b and photo c is greater than the similarity threshold", then photo b is determined to be a non-first image in the continuous shooting scenario.
[0121] In one implementation, photo c is the photo that was taken by the terminal device 100 before photo b and was recently uploaded to the cloud. In one implementation, photo c can be any photo that was taken by the terminal device 100 before photo b and was uploaded to the cloud within a preset time (e.g., 1 minute). In one implementation, the terminal device 100 traverses the similarities between the photos uploaded to the cloud and photo b according to the shooting time from recent to far, and photo c is the first photo whose similarity is greater than the similarity threshold.
[0122] Similarly, the image processing method and retouching parameters of application scenario 2 can refer to the relevant description of application scenario 1, which will not be repeated here.
[0123] In some embodiments, in the aforementioned application scenarios 1 and 2, the terminal device 100 refines the preview image captured by the camera on the terminal side, and displays the refined preview image on the terminal side in the preview frame 102; uploads the photos taken in response to the user's shooting operation to the cloud for refinement, and displays the refined photos on the cloud on the image display interface 13. In one implementation, due to the limited load capacity of the terminal device 100, for the same image processing method, the terminal side adopts an image processing algorithm / model with a lower load than the cloud side; using the same image processing method to refine the photos, the image quality of the photos refined on the cloud side is higher than that of the photos refined on the terminal side. For example, see FIG. 3A to FIG. 3K , Figure 3D The preview frame 102 shows a preview image without adding a landscape filter; Figure 3E The preview frame 102 shows a locally refined preview image after adding a landscape filter, and the image quality of the preview image is higher than that of the unrefined preview image; Figure 3J The image display frame 201 shows a photo taken by a camera under a landscape filter that is refined in the cloud, and the image quality of the photo is higher than the preview image refined locally.
[0124] Application scenario three: Refine each preview image captured by the camera in cloud photography mode
[0125] In some embodiments, the terminal device 100 can also upload the preview image captured by the camera to the cloud for refinement in real time, and display the preview image after collaborative refinement in the cloud in the preview frame 102, so that the user can preview the cloud-refined effect of the image through the preview frame 102 of the shooting interface 12. It can be understood that the refinement of the preview image has a higher requirement for the image processing delay. When the image processing delay is guaranteed to be within a lower delay range, the user can preview the refined image in time through the preview frame 102.
[0126] In some embodiments, the terminal device 100 confirms that the first preview image a captured by the camera after starting the shooting interface 12 is the first image in the continuous shooting scenario, and uploads the first preview image to the cloud for fine-tuning; determines that the preview image b after the first preview image captured by the above camera is a non-first image in the continuous shooting scenario, and uploads the differential image between the preview image b and the preview image c to the cloud for fine-tuning the preview image b.
[0127] In one implementation, preview image c is the previous preview image of preview image b after the current start-up of the shooting interface 12. In one implementation, preview image c is any preview image captured before preview image b after the current start-up of the shooting interface 12, such as the first preview image a.
[0128] Similarly, when uploading a preview image, the corresponding retouching parameters of the preview image are also uploaded. The retouching parameters indicate the image processing method used by the camera APP when capturing the preview image. Specifically, the above-mentioned image processing method and retouching parameters can refer to the relevant description of application scenario one, which will not be repeated here. It should be noted that when capturing preview image a, preview image c and preview image c, the image processing method (such as shooting mode, filter option) adopted by the camera APP can be the same or different.
[0129] It should be noted that FIG. 3A to FIG. 4F The user interface of the camera APP on the terminal device 100 is merely exemplified and should not be construed as limiting the embodiments of the present application. The above interface may include more or fewer controls. The above APP1 may be a system camera application of the terminal device 100, or other system applications or third-party applications with a shooting function, such as an instant messaging application with a shooting function, which is not specifically limited here.
[0130] Application scenario 4: One-click retouching of multiple local images
[0131] In some embodiments, APP2 (e.g., an album APP) of the terminal device 100 provides a one-click fine-tuning function for multiple images. Upon detecting a user's input operation for one-click fine-tuning of multiple images, the terminal device 100 uploads the multiple images to the cloud for fine-tuning.
[0132] For example, FIG. 5A to FIG. 5H A related user interface for one-click refinement of multiple images is shown.
[0133] Figure 5A The image display interface 15 of the photo album APP is shown, and the image display interface 15 displays multiple images stored locally. Figure 5A and Figure 5BAs shown, it is detected that the user has long pressed an image (such as image d) in the image display interface 15, and the terminal device 100 displays a selection control on each image, and the selection control 301 of image d is in a selected state, and the selection controls of other images are in an unselected state; by clicking the selection control, the control can be switched between the selected state and the unselected state. After detecting that the user has long pressed an image in the image display interface 15, a menu bar 302 is also displayed, and the menu bar 302 displays a share control, a favorite control, a delete control, a creation control 302A and more controls. As shown Figure 5C and Figure 5D As shown, after the user selects multiple images through the selection control, the terminal device 100 detects that the user clicks the creation control 302A; in response to the click operation, the terminal device 100 displays the creation menu bar 303, and the creation menu bar 303 includes a one-key editing control 303A. Figure 5D and Figure 5E As shown, after detecting that the user clicks the one-key image repair control 303A, the terminal device 100 displays an editing bar 304 in the user interface 16. The editing controls in the editing bar 304 are used to perform specific image processing on the image, such as a beauty control, a filter control, a high-definition repair control 304A, a character special effect control, etc. Exemplarily, the beauty control is used to trigger the terminal device 100 to display a variety of beauty options, so as to add beauty effects to the characters in the image; the filter control is used to trigger the terminal to display a variety of filter options, so as to add filter effects to the image; the high-definition repair control 304A is used to repair the image content to improve the content clarity and visual effects; the character special effect control is used to trigger the terminal device 100 to display a variety of character special effect options, so as to add character special effects to the characters in the image.
[0134] Take the high-definition repair control 304A as an example. Figure 5E and Fig. 5F As shown, when it is detected that the user clicks on the high-definition restoration control 304A, the terminal device 100 uploads the multiple images selected by the user to the cloud for fine-tuning, and displays the refined images of the multiple images collaboratively refined on the cloud, and also displays a confirmation control 306 and a cancel control 305. The confirmation control 306 is used to confirm the high-definition restoration of the image, and the cancel control 305 is used to cancel the high-definition restoration of the image. Fig. 5F and Figure 5G As shown, it is detected that the user clicks the confirmation control 306, and the terminal device 100 displays the save control 307 on the user interface 16; Figure 5G and Figure 5H As shown, when it is detected that the user clicks the save control 307 , the terminal device 100 saves the refined images of the above-mentioned multiple images and displays the refined images of the above-mentioned multiple images on the image display interface 15 .
[0135] In some embodiments, the attribute parameters of the images in the album include file time, the multiple images are sorted according to the file time, and the terminal device 100 sequentially determines whether each image is the first image of the continuous shooting scene. In some embodiments, the multiple images are sorted according to the order in which the images are selected by the user, and each image is sequentially determined whether it is the first image of the continuous shooting scene.
[0136] In some embodiments, the first image of the above-mentioned multiple images is used as the first image of the continuous shooting scene; for the non-first image among the above-mentioned multiple images (for example, image b), if the terminal device 100 confirms that image b satisfies any of the following conditions: "the similarity between image b and image c is greater than the similarity threshold, and the shooting time interval between image b and image c is less than the time threshold", then image b is determined to be the non-first image in the continuous shooting scene, and the difference image between image b and image c is uploaded to the cloud for fine-tuning image b; otherwise, image b is determined to be an image in a non-continuous shooting scene, and image b is uploaded to the cloud for fine-tuning.
[0137] In some embodiments, if the terminal device 100 confirms that image b satisfies "the similarity between image b and image c is greater than the similarity threshold, and the shooting time interval between image b and image c is less than the time threshold", it is determined that image b is not the first image in the continuous shooting scenario.
[0138] In one implementation, the image c is the previous image of the image b among the multiple images. In one implementation, the image c is any image before the image b among the multiple images.
[0139] In one implementation, the attribute parameters of the locally stored image b may indicate the source of the image b. For example, the image name of the image b obtained by screenshot includes "screenshot", and the image name of the taken photo includes "IMG". It can be understood that if the image b is a photo taken by a camera, the file time of the image b may include the shooting time of the image b.
[0140] Application scenario 5: Refine a local single image
[0141] In an embodiment of the present application, APP2 (such as an album APP) of the terminal device 100 provides a function of refining a single image. When the user's input operation on image b is detected, the terminal device 100 uploads image b to the cloud for refining.
[0142] Exemplarily, the terminal device 100 performs refinement on the image c and the image b successively; FIG. 6A to FIG. 6D A user interface related to fine-tuning a single image is shown. The image processing methods of image c and image b can be the same or different.
[0143] like Fig. 6AAs shown, the image display interface 15 of the photo album APP displays the locally stored images c and b. After the user triggers the terminal device 100 to retouch the image c, the image display interface 15 displays the retouched image of the image c. Fig. 6A and Figure 6B As shown, it is detected that the user clicks on the image b, and the terminal device 100 displays the image display interface 13 of the image b, and the image display interface 13 displays the image b and the editing control 401; Figure 6B and Figure 6C As shown, after detecting that the user clicks the editing control 401, the terminal device 100 displays the editing bar 402 on the image editing interface 17. The editing controls in the editing bar 402 are used to process the image b, such as beauty controls, filter controls, high-definition portrait controls 402A, character special effects controls, etc.; the high-definition portrait control 402A is used to repair the character in the image to improve the character's clarity and visual effect. For example, Figure 6C and Fig.6D As shown, taking the high-definition portrait control 402A as an example, after detecting that the user clicks the high-definition portrait control 402A, the terminal device 100 uploads the image b to the cloud for refinement, and displays the refined image of the refined image b, and also displays a confirmation control 403 and a cancel control 404; the confirmation control 403 is used to confirm that the image is to be repaired, and after confirming that the repair is to be carried out, the above-mentioned refined image can be saved to the album; the cancel control 404 is used to cancel the repair of the image.
[0144] In some embodiments, in application scenario five, the specific implementation of determining whether image b is a non-first image in a continuous shooting scene can refer to the relevant description of image b in application scenario four, which will not be repeated here. The above specific implementation involves image c. In one implementation, image c is the last image uploaded to the cloud for refinement. In one implementation, image c is any image that has been uploaded to the cloud for refinement. In one implementation, image c is any image that has been uploaded to the cloud for refinement within a preset time period (for example, 10 minutes).
[0145] Similarly, in application scenarios 4 and 5, the photo album APP provides a variety of local image processing methods (such as multiple filter options, multiple beauty options, multiple makeup options, multiple character special effects options, high-definition restoration options, etc.) for users to choose from, and the cloud stores the image processing algorithms / models corresponding to each image processing method. When the photo album APP of the terminal device 100 uploads the local image to the cloud for fine-tuning, it also uploads the image retouching parameters corresponding to the local image, and the image retouching parameters indicate the above-mentioned image processing method. Specifically, the image retouching parameters and image processing methods can refer to the relevant description of application scenario one.
[0146] It should be noted that FIG. 5A to FIG. 6DThe user interface of the album APP on the terminal device 100 is merely exemplified and should not be construed as limiting the embodiments of the present application. The above interface may include more or fewer controls. The above APP2 may be a system album application of the terminal device 100, or may be other system applications or third-party applications that have the function of refining local images.
[0147] Not limited to the above five application scenarios, the end-cloud collaborative image processing method provided in the embodiment of the present application can also be applied to other application scenarios that require uploading images to the cloud, and no specific limitations are made here.
[0148] In some embodiments, the refinement mode can be divided into full-image refinement and subject refinement; in the full-image refinement mode, the image refinement area includes the entire area of the image; in the subject refinement mode, the image refinement area includes the display area of the target subject in the image, and the size of the refinement area is smaller than the image size. Before uploading the image to the cloud, the end side can identify the refinement mode of the image to be processed; in the full-image refinement mode, the complete image / the differential image of the complete image of the image to be processed is uploaded to the cloud; in the subject refinement mode, the target subject in the image to be processed is identified, and the end side cuts out the target subject image from the image to be processed, and only sends the target subject image / the differential image of the target subject image to the cloud; the cloud returns the differential image of the target subject image before and after the refinement to the end side; based on the differential image and the target subject image, the end side can restore the refined image of the target subject image; by replacing the target subject image in the image to be processed with the refined image of the target subject image, the refined image of the image to be processed can be obtained. In this way, for the subject refinement mode, the amount of data for uploading and returning images is further reduced, thereby reducing the required network traffic and latency for uploading and returning images, effectively improving the user experience.
[0149] In combination with the above application scenarios, the refinement mode is exemplified.
[0150] In some embodiments, the terminal side pre-stores a correspondence between image processing methods and retouching modes. The image processing methods of the image to be processed may include one or more of the following: shooting mode, filter, character special effects, high-definition restoration, beauty, body beauty, high-definition portrait, etc.; the retouching modes corresponding to different image processing methods may be the same or different.
[0151] For example, the shooting mode may include one or more of the following modes: portrait mode, large aperture mode, night mode, landscape mode, professional mode, etc. Portrait mode and large aperture mode correspond to subject refinement mode, night mode, landscape mode, and professional mode correspond to full-image refinement mode; various filter options correspond to full-image refinement mode; various beauty options correspond to full-image refinement mode; various character special effects options correspond to subject refinement mode; high-definition restoration corresponds to full-image refinement mode; and high-definition portrait corresponds to subject refinement mode. Specifically, the application developer can set the correspondence between the image processing mode and the refinement mode according to actual needs, which is not specifically limited here. If there are multiple image processing modes for the image to be processed, and the refinement modes corresponding to the multiple image processing modes include both full-image refinement and subject refinement, the full-image refinement mode is used for the image. For example, the image processing mode of the image to be processed includes portrait mode and filter 1, the portrait mode corresponds to the subject refinement mode, and filter 1 corresponds to the full-image refinement mode. The refinement mode of the image is determined to be the full-image refinement mode without cutting the target subject image.
[0152] For example, see Figure 3C and Figure 3D , the user selects the landscape filter in the photo mode to shoot, and the photos taken under the landscape filter use the full-image refinement mode; Figure 3C Preview image shown before selecting the Landscape filter, and Figure 3J to Figure 3L From the refined picture of the photo taken under the landscape filter shown, it can be seen that the photo was refined using the full-image refinement mode.
[0153] For example, see FIG. 4A to FIG. 4E , the terminal device 100 takes a photo in the portrait mode, and the target subject of the photo is a person; Figure 4A Preview image before selecting Portrait mode, and Figure 4E As can be seen from the refined picture of the photo taken in portrait mode, the photo was taken using the subject refinement mode and only the people in the photo were refined.
[0154] In some embodiments, a correspondence between subject types and refinement modes is pre-stored, and subject types may include landscapes, people, animals, buildings, cities, etc. The terminal side can intelligently identify the subject type of the target subject in the image to be processed. For example, the refinement mode corresponding to landscapes, buildings, and cities is the overall refinement mode; the refinement mode corresponding to people and animals is the subject refinement mode.
[0155] In some embodiments, when the subject type of the target subject in the image to be processed corresponds to the subject refinement mode and the proportion of the display area of the target subject in the image to be processed is less than a preset proportion (for example, 80%), the terminal device 100 determines that the refinement mode of the image to be processed is the subject refinement mode; otherwise, it is the full image refinement mode.
[0156] In an embodiment of the present application, the image within the refined area of the image to be processed can be referred to as a region map; in the full image refinement mode, the region map of the image to be processed is the image to be processed; in the subject refinement mode, the region map of the image to be processed is the target subject image cut out from the image to be processed.
[0157] In the end-cloud collaborative image processing method provided in the embodiment of the present application, for image a in a non-continuous shooting scenario or the first image a in a continuous shooting scenario, the terminal device 100 sends a complete image of the region map of image a to the cloud; receives the differential image of the region map before and after refinement sent by the server 200, and restores the refined image of image a based on the differential image. For a non-first photo b in a continuous shooting scenario, the terminal device 100 sends a differential image of the region map of image b and the region map of the reference image (i.e., image c) to the cloud, and the differential image is used to restore the region map of image b; receives the differential image of the region map before and after refinement sent by the cloud, and restores the refined image of image b based on the differential image.
[0158] Among them, image c is the reference image for differential with image b, and image c is an image that has been uploaded to the cloud, or an image uploaded to the cloud together with image b, for example, image c is the aforementioned image a. In this way, it is possible to achieve efficient image processing in collaboration with the cloud on the basis of effectively reducing the data traffic of image transmission and reducing processing delay, so that users can view the refined images on the cloud in a timely manner on the terminal side, effectively improving the user experience.
[0159] For example, Fig. 7A A flow chart of a method for image processing in a terminal-cloud collaboration is shown, the method comprising steps S101 to S124. The method comprises the following three stages: a terminal-side upload processing stage, a cloud-side processing stage, and a terminal-side backhaul processing stage.
[0160] Phase 1: End-side upload processing
[0161] S101, the terminal device 100 obtains the current image to be processed.
[0162] The current image to be processed may be image a, image b or image c of any of the aforementioned application scenarios.
[0163] Exemplarily, referring to the descriptions of the aforementioned application scenarios one and two, the image to be processed may be a photo taken by the camera APP of the terminal device 100; when the user's shooting operation is detected, the camera APP obtains the image to be processed taken by the camera. Exemplarily, referring to the descriptions of the aforementioned application scenario three, the image to be processed may be a preview image captured by the camera APP of the terminal device 100; after detecting the operation of the shooting interface 12 for displaying the preview image, the camera APP obtains the image to be processed captured by the camera. Exemplarily, referring to the descriptions of the aforementioned application scenarios four and five, the image to be processed is an image stored locally on the terminal device 100; when a user operation that triggers the refinement of the local image is detected, the album APP uses the image as the image to be processed.
[0164] S102, the terminal device 100 identifies whether the refinement mode of the image to be processed is the subject refinement mode; if not, execute S103; if so, execute S104.
[0165] S103: The terminal device 100 determines that the refinement mode of the image to be processed is the full-image refinement mode, and the area of the image to be processed Figure 1 The image to be processed.
[0166] S104: The terminal device 100 determines the area of the image to be processed Figure 1 Cut the area in the image to be processed for the target subject in the image to be processed Figure 1 , record area Figure 1 At the location of the image to be processed.
[0167] In some embodiments, the terminal device 100 identifies a target subject in the image to be processed, determines that the refined area includes the display subject, and that the refined area is greater than or equal to the display area of the target subject.
[0168] In the embodiment of the present application, the indication area Figure 1 The implementation method of the position in the image to be processed is not specifically limited.
[0169] In some embodiments, in the main refinement mode, the area Figure 1 (i.e. the target subject image) is rectangular. Figure 1 The coordinates of the upper left corner and the lower right corner in the image to be processed, indicating the area Figure 1 Position in the image to be processed; or, by region Figure 1 The coordinates of the upper left corner of the image to be processed, and the area Figure 1 The height and width of the indicator area Figure 1 The position in the image to be processed.
[0170] In some embodiments, in the main refinement mode, the area Figure 1The edge of the target image is composed of the edge lines of the target in the image to be processed, that is, the region Figure 1 The shape of is the shape of the target body. The coordinates of each pixel point on the edge line of the target body indicate the area Figure 1 The position in the image to be processed.
[0171] In some embodiments, steps S102 to S104 do not need to be performed, that is, there is no need to determine the refinement mode, and for any image to be processed, the complete image / the differential image of the complete image is uploaded to the cloud.
[0172] S105. The terminal device 100 identifies whether the image to be processed is a non-first image in a continuous shooting scenario; if not, execute S106; if so, execute S107.
[0173] In some embodiments, when the image to be processed satisfies any one of the following conditions 1 to 3, the image to be processed is a non-first image in the continuous shooting scene; otherwise, it is not a non-first image in the continuous shooting scene.
[0174] Condition 1: The image to be processed is not the first image taken by the continuous shooting function.
[0175] Condition 2: The shooting time interval between the image to be processed and image c is less than a time threshold (eg, 0.5 s).
[0176] Condition 3: The similarity between the image to be processed and image c is greater than a similarity threshold (eg, 80%).
[0177] In some embodiments, the image to be processed adopts the subject refinement mode, and condition 3 specifically includes: the similarity between the region map of the image to be processed (ie, the target subject map) and the region map of image c is greater than a similarity threshold.
[0178] Among them, image c and the image to be processed use the same fine-tuning mode; image c is an image that has been uploaded to the server 200 before the image to be processed, or an image uploaded to the server 200 at the same time as the image to be processed. Image c can be a non-first image in a continuous shooting scene (such as image a), and uploading image c to the server 200 means uploading the differential image corresponding to the area map of image c to the server 200, and the cloud can restore the complete image of the area map of image c based on the differential image. Image c may also not be a non-first image in a continuous shooting scene, and uploading image c to the server 200 means uploading the complete image of the area map of image c to the server 200.
[0179] Exemplarily, the image to be processed is the aforementioned image a, image a does not satisfy any of the aforementioned conditions, and image a is not the non-first image in the continuous shooting scene. The image to be processed is the aforementioned image b, image b satisfies at least one of the aforementioned conditions, and image b is not the non-first image in the continuous shooting scene.
[0180] In one implementation, in condition 2 and / or condition 3, image c is the last image uploaded to the server 200. In one implementation, in condition 3, image c can be any image uploaded to the server 200 within a preset time (e.g., 10 minutes); specifically, images uploaded to the server 200 within the preset time are traversed from the latest to the oldest upload time to determine whether there is an image c that meets condition 3. In one implementation, in condition 3, image c can be any image uploaded to the server 200 at the same time as the image to be processed; specifically, images uploaded to the server 200 at the same time are traversed to determine whether there is an image c that meets condition 3.
[0181] Exemplarily, taking the image to be processed as image b as an example, the aforementioned application scenarios one to five describe in detail how to determine whether image b is a non-first image in a continuous shooting scenario, which will not be repeated here.
[0182] In one implementation, image c is the previous image to be processed of the current image to be processed. For example, in the aforementioned application scenarios 1 and 2, image c may be the previous photo taken by the camera; in the aforementioned application scenario 3, image c may be the previous preview image captured by the camera; in the aforementioned application scenarios 4 and 5, image c is the previous image to be processed according to the file time or the time when the user selected the image; in the aforementioned application scenario 5, image c may be the previous image uploaded to the cloud.
[0183] In some embodiments, Figure 7B As shown, step S105 may specifically include steps D1 to D3.
[0184] D1. Determine whether the image to be processed is a non-first photo taken under the continuous shooting function; if so, the image to be processed is a non-first image in the continuous shooting scene; if not, that is, the image to be processed is the first photo taken under the continuous shooting function / a photo taken under the non-continuous shooting function, then execute the next step.
[0185] D2. Determine whether the shooting time interval between the image to be processed and the previous image to be processed is less than a time threshold; if so, the image to be processed is a non-first image in a continuous shooting scene; otherwise, execute the next step.
[0186] D3. Determine whether the similarity between the image to be processed and the previous image to be processed is greater than a similarity threshold; if so, the image to be processed is a non-first image in the continuous shooting scene; otherwise, determine that the image to be processed is not a non-first image in the continuous shooting scene.
[0187] The embodiment of the present application does not specifically limit the execution order of step S102 and step S105. In some embodiments, step S105 may be executed first to determine the non-first image of the continuous shooting scene, and then step S102 may be executed to identify the fine-tuning mode.
[0188] S106: The image to be processed is not the non-first image in the continuous shooting scene, and the terminal device 100 uploads a request message to the server 200, and the request message includes the region Figure 1 ,area Figure 1 Image ID and region Figure 1 The image type indicates the area Figure 1 is a non-differential image.
[0189] In step S106 , in the full image refinement mode, the terminal device 100 uploads the image to be processed to the server 200 ; in the subject refinement mode, the terminal device 100 uploads the target subject image in the image to be processed to the server 200 .
[0190] S107: The terminal device 100 obtains the area of the image to be processed Figure 1 The difference image 1 with the reference image.
[0191] Differential image 1 = source image (i.e. the area of the image to be processed Figure 1 )-reference image. In the embodiment of the present application, the terminal device 100 selects one image from the images uploaded to the server 200 or the images uploaded to the cloud together as the reference image of the image to be processed according to a preset rule, and the reference image of the image to be processed and the image to be processed are usually similar. Among them, the image to be processed and the reference image of the image to be processed usually use the same refinement mode.
[0192] In the full image refinement mode, the area Figure 1 is the image to be processed; if the image to be processed meets the aforementioned condition 1, the image to be processed is a photo taken by the continuous shooting function, and the reference image of the image to be processed can be the previous photo of the continuous shooting image to be processed, the first photo of the continuous shooting, or any photo before the continuous shooting image to be processed; the previous photo of the continuous shooting image to be processed is used as an example for illustrative description. If the image to be processed meets the aforementioned conditions 2 and / or 3, the reference image of the image to be processed is the aforementioned image c; for example, in application scenario 2, image c is the previous photo taken by the camera.
[0193] The area of the image to be processed in the subject refinement mode Figure 1 The reference image of the image to be processed (i.e., the target main image) is a regional image of the reference image of the image to be processed (i.e., the target main image).
[0194] S108: The terminal device 100 determines whether the data volume of the differential image 1 is smaller than the area Figure 1 If yes, execute S109; otherwise, execute S106.
[0195] Step S108 is optional. In some embodiments, step S109 is directly executed after step S107 without executing S108.
[0196] S109 , the terminal device 100 uploads a request message to the server 200 , including the differential image 1 , the image ID of the differential image 1 , the source image ID, the reference image ID and the image type, where the image type indicates that the differential image 1 is a differential image.
[0197] The source image corresponding to the difference image 1 is the area of the image to be processed Figure 1 , the source image ID is the image ID of the source image, and the reference image ID is the image ID of the reference image.
[0198] It can be understood that if the difference image 1 is larger than the area of the image to be processed Figure 1 If the amount of data is still larger, upload the area to server 200 Figure 1 ; Difference image 1 to area Figure 1 The differential image 1 is uploaded to the server 200 only when the amount of data is small.
[0199] Phase 2: Cloud processing
[0200] S110. The server 200 receives a request message.
[0201] S111. The server 200 determines whether the image type in the request message is a differential image; if so, execute S112; otherwise, execute S113.
[0202] S112: When the image type is a differential image, the server 200 restores the area of the image to be processed according to the reference image ID in the request message and the differential image 1. Figure 1 ; Server 200 determines the restored area Figure 1 The image ID is the source image ID in the request message.
[0203] In an embodiment of the present application, if the image type is a differential image, the differential image carried by the request message needs to be restored to a region map of the image to be processed; if the image type is a non-differential image, it indicates that the request message carries the region map of the image to be processed, and no differential restoration is required.
[0204] In some embodiments, when the image type is a differential image, the request message also carries a differential algorithm identifier, and the terminal device 100 uses the differential algorithm indicated by the differential algorithm identifier to obtain the differential image 1 of the two images. The server 200 determines the restoration algorithm corresponding to the differential algorithm indicated by the differential algorithm identifier, obtains the reference image indicated by the reference image ID, and uses the restoration algorithm, the reference image and the differential image 1 to restore the area of the image to be processed. Figure 1 ; Source image (i.e. the area of the image to be processed Figure 1 )=difference image 1+reference image.
[0205] In some embodiments, the terminal device 100 and the server 200 pre-negotiate to use a specific differential algorithm, and the request message does not need to carry a differential algorithm identifier.
[0206] The embodiments of the present application do not specifically limit the difference algorithm involved. For example, the difference algorithm can be an absolute value difference method, an inter-frame difference method (absDiff), a relative difference method, a threshold difference method, a normalized difference method, a Gaussian difference method, etc.
[0207] S113, server 200 records area Figure 1 and Region Figure 1 Image ID, get the area of the image to be processed Figure 1 Refined picture of .
[0208] In some embodiments, the request message carries the image retouching parameters of the image to be processed, and the server 200 processes the image area to be processed according to the image retouching parameters. Figure 1 Perform refinement and obtain area Figure 1 Specifically, the above-mentioned image retouching parameters can refer to the relevant description of the aforementioned application scenario, which will not be repeated here.
[0209] S114: The server 200 uses the area of the image to be processed Figure 1 As the reference image, get the area Figure 1 Difference image 2 before and after refinement. Difference image 2 = source image (i.e. region Figure 1 The refined image)-reference image (i.e., region Figure 1 ).
[0210] S115: The server 200 determines whether the data volume of the differential image 2 is smaller than the area Figure 1 The data volume of the refined image; if yes, execute S116; otherwise, execute S117.
[0211] Step S115 is optional. In some embodiments, step S116 is directly executed after step S114 without executing S115.
[0212] S116. The server 200 returns a response message to the terminal device 100. The response message includes the differential image 2, the image ID of the differential image 2, the reference image ID and the image type. The image type indicates that the differential image 2 is a differential image.
[0213] S117, the server 200 returns a response message to the terminal device 100, the response message includes the area Figure 1 Refined images and areas Figure 1 The image ID and image type of the image, where the image type indicates that the refined image is a non-differential image.
[0214] It can be understood that if the differential image 2 is smaller than the data size of the refined image, the differential image 2 is transmitted back to the terminal device 100; if the differential image 2 is greater than or equal to the data size of the refined image, the refined image is directly transmitted back.
[0215] Phase 3: End-side backhaul processing
[0216] S118. The terminal device 100 receives a response message.
[0217] S119. The terminal device 100 determines whether the image type in the response message is a differential image; if so, execute S120; otherwise, execute S121.
[0218] S120: Restoring the area of the image to be processed according to the reference image ID and the differential image 2 Figure 1 The refined image of Figure 1 Refined image) = difference image 2 + reference image (i.e., region Figure 1 ).
[0219] In the embodiment of the present application, if the image type is a differential image, the differential image carried in the response message needs to be restored to a refined image; the reference image ID in the response message indicates the area of the image to be processed. Figure 1 If the image type is a non-differential image, it means that the response message carries a refined image and no differential restoration is required; the image ID in the response message indicates the area of the image to be processed. Figure 1 The image ID.
[0220] Similarly, when the image type is a differential image, the response message may also carry a differential algorithm identifier, and the terminal device 100 performs differential restoration according to the restoration algorithm corresponding to the differential algorithm indicated by the differential algorithm identifier.
[0221] S121: The terminal device 100 determines the area Figure 1 Whether the corresponding image to be processed adopts the subject refinement mode; if not, execute S122; if yes, execute S123.
[0222] According to the description of steps S119 and S120, the response message indicates the area Figure 1 The terminal device 100 can Figure 1 The image ID of the image to be processed is queried in the refinement mode. It can be understood that in the full image refinement mode, the area Figure 1 The image ID of the image to be processed is the image ID of the image to be processed; in the subject refinement mode, the area Figure 1 The image ID is the image ID of the target subject image of the image to be processed.
[0223] In some embodiments, in the subject refinement mode, the terminal device 100 records the correspondence between the image ID of the image to be processed and the image ID of the target subject image; in step S121, the image to be processed and the refinement mode of the image to be processed can be queried based on the correspondence. In some embodiments, the terminal device 100 records the image ID of the region image of the image to be processed in the subject refinement mode in file 1. If file 1 includes the region Figure 1 The image ID is Figure 1 The corresponding refinement mode of the image to be processed is main refinement. In one implementation, the terminal device 100 records the image ID of the image to be processed in the full image refinement mode in file 2. If file 2 does not include the area Figure 1 The image ID is Figure 1 The corresponding refinement mode of the image to be processed is subject refinement.
[0224] S122: The terminal device 100 determines the area Figure 1 The refined image is the refined image of the image to be processed.
[0225] S123, the terminal device 100 according to the area Figure 1 The location and area in the image to be processed Figure 1 , and obtain the refined image of the image to be processed.
[0226] In the main refinement mode, according to the area Figure 1 (i.e., the target subject image) is located in the image to be processed, and the terminal device 100 replaces the target subject image in the image to be processed with the refined image of the target subject image to obtain the refined image of the image to be processed.
[0227] It can be understood that in the subject refinement mode, the area of the image to be processed Figure 1 To obtain the target subject image after cutting, the area Figure 1 The refined image of the image to be processed is spliced with the image to be processed to obtain the refined image of the image to be processed.
[0228] S124. The terminal device 100 displays a refined image of the image to be processed.
[0229] Exemplarily, referring to the relevant descriptions of the aforementioned application scenarios one to five, after the terminal device 100 obtains the refined image of the cloud-based collaborative refinement, the terminal device 100 can display the refined image for the user to view.
[0230] In combination with the above embodiments, Figure 8 FIG. 1 shows a device architecture diagram provided by an embodiment of the present application. Figure 8 As shown, the terminal device 100 may include an acquisition module, a cutting module, a continuous shooting recognition module, a terminal side difference module and a display module. The server 200 may include a cloud side difference module and a refinement module.
[0231] The acquisition module on the terminal side is used to acquire the image to be processed, for example, the image is the aforementioned image a, image b or image c.
[0232] The cutting module on the terminal side is used to cut out the target subject image from the image to be processed in the subject refinement mode and determine the area of the image to be processed. Figure 1 For the image to be processed in the full image refinement mode, determine the area of the image to be processed Figure 1 The image to be processed.
[0233] The continuous shooting recognition module on the terminal side is used to identify whether the current image to be processed is a non-first image in the continuous shooting scene. If it is not a non-first image in the continuous shooting scene (such as the aforementioned image a), the device is triggered to send the area of the image to be processed to the server 200. Figure 1 If it is not the first image in the continuous shooting scene (such as the aforementioned image b), the end-side differential module is instructed to obtain the area Figure 1 The difference image of .
[0234] The terminal side difference module is used to obtain a difference image 1 between the region map of a non-first image (such as the aforementioned image b) and a reference image (such as the region map of the aforementioned image c) in a continuous shooting scenario; trigger the terminal device 100 to upload the difference image 1 and the reference image ID to the server 200. The reference image has been uploaded to the cloud, or is uploaded to the cloud at the same time as the difference image 1.
[0235] The cloud-based differential module is used to restore the area of the image to be processed based on the received differential image 1 and the reference image ID. Figure 1 .
[0236] The cloud-based refinement module is used to process the image area Figure 1 Perform refinement and obtain area Figure 1 Refined picture of .
[0237] The cloud differential module is also used to obtain the above areas Figure 1 The difference image 2 before and after the refinement triggers the device to send the difference image 2 and the reference image ID (i.e., the area of the image to be processed) to the terminal device 100. Figure 1 id of the image).
[0238] The difference module on the end side is also used for the area based on the difference image 2 and the image to be processed Figure 1 , restore the area of the image to be processed Figure 1 Refined picture of .
[0239] The cutting module on the end side is also used for the image to be processed in the subject refinement mode, using the area Figure 1The refined image replaces the area in the image to be processed Figure 1 , thereby obtaining a refined image of the image to be processed. It can be understood that for the image to be processed in the full image refinement mode, the region Figure 1 The refined image is the refined image of the image to be processed.
[0240] The display module on the terminal side is used to display the refined image of the image to be processed.
[0241] The embodiment of the present application does not specifically limit the implementation of the image ID. For example, the image IDs of the images to be processed are numbered 1, 2, 3, etc. The image with image ID x can be referred to as image x.
[0242] The image processing flow is exemplified below for the full image refinement mode and the main body refinement mode respectively.
[0243] For example, Fig.9A shows an image processing flow of an image to be processed in the full image refinement mode, Fig. 9B The schematic diagram of each image involved in the processing flow is shown. The above processing flow includes steps A1 to A24. The specific implementation of each step can refer to Fig. 7A The corresponding steps are described in .
[0244] The images to be processed include image 1 and image 4; image 1 is not a non-first image in a continuous shooting scene; image 4 is a non-first image in a continuous shooting scene. Image 1 and image 4 can be images in any of the aforementioned application scenarios.
[0245] A1. The acquisition module of the terminal device 100 acquires the image 1 to be processed.
[0246] For example, image 1 is the first photo taken by the camera APP of the terminal device 100 in the full-image retouching mode. Fig. 9B A schematic diagram of an image 1 is shown.
[0247] In one embodiment, the acquisition module may also acquire image parameters of image 1, including part or all of the image name, retouching mode, file time (e.g., shooting time), image ID, and retouching parameters. Optionally, if image 1 is a photo taken with a continuous shooting function, the image parameters also include a continuous shooting identifier, which may indicate that image 1 is a photo taken with a continuous shooting function and whether it is the first photo of the continuous shooting. Optionally, the continuous shooting identifier may be an independent identifier, or it may be carried in the image name or image ID. Exemplarily, the image name of a continuous shooting photo includes a continuous shooting identifier and a continuous shooting number, the continuous shooting identifier is "Burst", and the continuous shooting number is used to indicate which photo of the continuous shooting the photo is; for example, the image name of the first photo of the continuous shooting includes Burst01, and the image name of the third photo of the continuous shooting includes Burst03.
[0248] A2. The cutting module of the terminal device 100 determines that there is no need to cut the target main image of the image 1 according to the full image retouching mode adopted by the image 1, and the area image in the retouched area of the image 1 is the image 1 itself.
[0249] Exemplary, reference FIG. 3C to FIG. 3L Related description: Image 1 is a photo taken by the terminal device 100 using a landscape filter, and the refinement mode corresponding to the landscape filter refines the entire image.
[0250] A3. The continuous shooting recognition module of the terminal device 100 determines that the image 1 is not the non-first image of the continuous shooting scene.
[0251] Exemplarily, since Image 1 is the first photo taken by the continuous shooting function, the terminal device 100 determines that Image 1 is not a non-first image in the continuous shooting scenario.
[0252] A4. The terminal-side difference module determines that there is no need to perform difference on Image 1, and records Image 1 and the image ID of Image 1.
[0253] The embodiment of the present application does not specifically limit the implementation of interaction between modules within the terminal device 100.
[0254] In one embodiment, the acquisition module sends image 1, the image ID of image 1, and the fine-tuning mode of image 1 to the cutting module, and calls the cutting module to execute step A2; the acquisition module sends image 1, the image ID of image 1, and the continuous shooting identification of image 1 to the continuous shooting identification module, and calls the continuous shooting identification module to execute step A3; the acquisition module sends the execution results of steps A2 and A3, as well as image 1 and the image ID of image 1 to the end-side difference module, and calls the end-side difference module to execute step A4. The execution order of steps A2 and A3 is not specifically limited here.
[0255] In one embodiment, the acquisition module sends image 1 and image parameters of image 1 to the cutting module, and calls the cutting module to execute step A2; when there is no need to cut image 1, the cutting module sends image 1 and image parameters of image 1 to the continuous shooting recognition module, and calls the continuous shooting recognition module to execute step A3; the continuous shooting recognition module sends image 1, image ID of image 1 and the execution result of step A3 to the end-side differential module, and calls the end-side differential module to execute step A4.
[0256] A5. The end-side differential module triggers the terminal device 100 to send a request message 1 to the server 200. The request message 1 includes image 1, image ID of image 1, image type of image 1 and image retouching parameters. The image type indicates that image 1 is a non-differential image.
[0257] It can be understood that Image 1 adopts the full-image refinement mode, and Image 1 is not the non-first image of the continuous shooting scene; therefore, the terminal device 100 does not need to differentiate Image 1 and directly uploads the complete image of Image 1 to the server 200.
[0258] Optionally, the request message 1 may also include an image name. Exemplarily, the image name, image type, and image ID carried in the request message 1 are as follows:
[0259] {
[0260] "imageName":"Image 1", / / image name
[0261] "imagetype":"srcImage", / / Image type, srcImage indicates a non-differential image
[0262] "imageId":"1" / / image ID
[0263] }
[0264] A6. According to the non-differential image indicated by the image type in the request message 1, the cloud-based differential module determines that there is no need to perform differential restoration on the image 1, and records the image 1 and the image ID of the image 1.
[0265] A7. The refinement module of the server 200 obtains a refined image of the image 1 (ie, image 2).
[0266] The retouching module of the server 200 performs retouching on the image 1 according to the image processing algorithm indicated by the retouching parameters in the request message 1, obtains the retouched image 2, and the retouching module of the server 200 sends the image 2 to the cloud difference module. Fig. 9B A schematic diagram of a refined image 2 is shown.
[0267] A8. The cloud-based differential module obtains the refined image of Image 1 (ie, Image 2) and the differential image between Image 1 (ie, Image 3), where Image 1 is the reference image of the differential image.
[0268] For example, Fig. 9B A schematic diagram of an image 3 is shown, where image 3 = image 2 - image 1.
[0269] A9. The cloud-based differential module triggers the server 200 to send a response message 1 to the terminal device 100. The response message 1 includes image 3, the image ID of image 3, the reference image ID, the image type and the differential algorithm identifier. The image type indicates that image 3 is a differential image.
[0270] In some embodiments, when the cloud-based difference module determines that the difference image (ie, image 3) has a smaller data volume than the refined image (ie, image 2), the difference image is transmitted back to the terminal device 100 via a response message 1.
[0271] Exemplarily, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in the response message 1 are as follows:
[0272]
[0273] A10. The end-side difference module determines that differential restoration is required according to the differential image indicated by the image type in the response message 1, and restores the image 2 according to the image 3, the image 1 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.
[0274] For example, Fig. 9B As shown, Image 2 (i.e., the refined image of Image 1) = Image 3 (i.e., the differential image) + Image 1.
[0275] A11. When it is determined that the image 1 indicated by the reference image ID in the response message 1 is not the target main image, the cutting module of the terminal device 100 determines that the image 2 is a refined image of the image 1.
[0276] In some embodiments, the cutting module of the terminal device 100 records the image ID of the cut target main image; if the cutting module determines that the recorded image ID of the target main image does not include the reference image ID (i.e., the image ID of image 1), it is determined that image 1 is not the target main image, but a complete image to be processed.
[0277] In some embodiments, the terminal device 100 records the image ID and refinement mode of the image to be processed; if the cutting module queries that the image ID of the image to be processed includes the reference image ID (i.e., the image ID of image 1), it is determined that image 1 is not the target subject image, but a complete image to be processed.
[0278] A12. The display module of the terminal device 100 displays a refined image of the image 1 (ie, image 2).
[0279] The step A12 is optional. The embodiment of the present application does not specifically limit the time for the terminal device 100 to display the image 1.
[0280] A13. The acquisition module of the terminal device 100 acquires the image 4 to be processed.
[0281] For example, image 4 is the second photo taken by the camera APP of the terminal device 100 in the full-image retouching mode. Fig. 9B A schematic diagram of an image 4 is shown.
[0282] In one embodiment, the acquisition module may also acquire image parameters of image 4, including part or all of the image name, fine-tuning mode, retouching parameters, image ID, continuous shooting flag, and retouching parameters, etc. For details, please refer to the relevant description of image 1.
[0283] A14. The cutting module of the terminal device 100 determines that there is no need to cut the image 4 according to the full image refinement mode adopted by the image 4, and the area image within the refined area of the image 4 is the image 4 itself.
[0284] A15. The continuous shooting recognition module of the terminal device 100 determines that image 4 is not the first image of the continuous shooting scene.
[0285] Exemplary, reference FIG. 3C to FIG. 3L , image 4 is the second photo b taken by the continuous shooting function, and the terminal device 100 determines that image 4 is not a non-first image in the continuous shooting scene. Exemplarily, image 4 is a photo taken by the non-continuous shooting function, and the terminal device 100 determines that the shooting time interval between the photo and the previous photo (i.e., image 1) is less than the time threshold, or the similarity with the previous photo is greater than the similarity threshold; therefore, image 4 is determined to be a non-first image in the continuous shooting scene.
[0286] A16. The end-side difference module obtains a difference image (ie, image 5) between image 4 and image 1, where image 1 is a reference image of the difference image.
[0287] The terminal device 100 selects a reference image for image 4 for difference, for example, the reference image is the previous photo (ie, image 1). Fig. 9B A schematic diagram of a difference image between image 4 and image 1 (ie, image 5) is shown, where image 5 = image 4 - image 1.
[0288] A17. The end-side differential module triggers the terminal device 100 to send a request message 2 to the server 200, including image 5, the image ID of image 5, the reference image ID, the source image ID, the image type and the differential algorithm identifier, and the image type indicates that image 5 is a differential image.
[0289] In some embodiments, request message 1 of step A5 and request message 2 of step A17 may also be uploaded to server 200 at the same time, that is, image 1 (i.e., the first photo) and image 5 (i.e., the differential image between the second photo and the first photo) may be uploaded to server 200 at the same time.
[0290] Exemplarily, the image name, image type, differential algorithm identifier, image ID, reference image ID, and source image ID (i.e., image ID of image 4) carried in request message 2 are as follows:
[0291]
[0292] A18. The cloud-based differential module determines that differential restoration is required based on the differential image indicated by the image type in the request message 2, and restores image 4 based on image 5, image 1 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier, and records image 4 and the image ID of image 4, where the image ID of image 4 is the above-mentioned source image ID.
[0293] A19. The refinement module of the server 200 obtains a refined image of the image 4 (ie, the image 6).
[0294] The refinement module of the server 200 sends the image 6 to the cloud-based difference module. Fig. 9B A schematic diagram of an image 6 is shown.
[0295] The embodiment of the present application does not specifically limit the execution order of step A7 and step A19. In some embodiments, step A7 and step A19 can be executed simultaneously, that is, image 1 and image 4 are refined simultaneously. In one implementation, the refinement module is provided with multiple containers for refinement, and the terminal device 100 assigns image 1 and image 4 to different containers for refinement, and the refinement task execution modules in the two containers respectively refine the two images in parallel.
[0296] A20. The cloud-based differential module obtains a refined image of image 4 (ie, image 6) and a differential image of image 4 (ie, image 7).
[0297] For example, Fig. 9B A schematic diagram of a differential image (ie, Image 7) of Image 4 before and after refinement is shown, where Image 7 = Image 6 - Image 4.
[0298] A21. The cloud-based differential module triggers the server 200 to send a response message 2 to the terminal device 100, including image 7, the image ID of image 7, the reference image ID, the image type and the differential algorithm identifier, and the image type indicates that image 7 is a differential image.
[0299] In some embodiments, when the cloud-based differential module determines that the differential image (ie, image 7 ) has a smaller data volume than the refined image (ie, image 6 ), the differential image is transmitted back to the terminal device 100 via a response message 2 .
[0300] Exemplarily, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in the response message 2 are as follows:
[0301]
[0302] A22. The end-side difference module determines that differential restoration is required according to the differential image indicated by the image type in the response message 1, and restores the image 6 according to the image 7, the image 4 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.
[0303] For example, Fig. 9B As shown, Image 6 (i.e., the refined image of Image 4) = Image 7 (i.e., the differential image) + Image 4.
[0304] A23. When it is determined that image 4 indicated by the reference image ID in response message 2 is not the target main image, the cutting module of terminal device 100 determines that image 6 is a refined image of image 4.
[0305] For details, please refer to the relevant description of step A11, which will not be repeated here.
[0306] A24. The display module of the terminal device 100 displays a refined image of the image 4 (ie, image 6).
[0307] This method identifies the user's continuous shooting scenes and uploads and returns photo data in a differential manner, which greatly reduces the amount of data transmitted in the network and minimizes the overall time consumption.
[0308] Exemplarily, after step A24, the acquisition module on the terminal side also acquires the third photo taken by the camera APP in the full-image retouching mode. The cutting module on the terminal side determines that there is no need to cut the target subject based on the full-image retouching mode adopted by the photo. After the continuous shooting recognition module on the terminal side recognizes that the photo is not the first image in the continuous shooting scene, the differential module on the terminal side acquires the differential image corresponding to the third photo, and triggers the device to send the differential image to the server 200. The differential image can be a differential image between the third photo and the second photo, or a differential image between the third photo and the first photo, that is, the reference image of the differential image can be the second photo or the first photo. Since the cloud-side differential module has acquired the first photo and the second photo, the third photo can be restored based on the above-mentioned differential image and the reference image. The subsequent cloud-side refinement and terminal-side return processing of the third photo can refer to. Fig.9A and Fig. 9B The description of the second photo (i.e., image 4) will not be repeated here.
[0309] For example, Fig. 10A shows an image processing flow of an image to be processed in a subject refinement mode, Fig. 10B The schematic diagram of each image involved in the processing flow is shown. The above processing flow includes steps A1 to A24. The specific implementation of each step can refer to Fig. 7A The corresponding steps are described in .
[0310] The images to be processed include image 11 and image 16; image 11 is not a non-first image in a continuous shooting scene; image 16 is a non-first image in a continuous shooting scene. Image 11 and image 16 can be images in any of the aforementioned application scenarios.
[0311] B1. The acquisition module of the terminal device 100 acquires the image 11 to be processed.
[0312] For example, image 11 is the first photo taken by the camera APP of the terminal device 100 in the subject refinement mode. Fig. 10B A schematic diagram of an image 11 is shown.
[0313] In one embodiment, the acquisition module may also acquire image parameters of the image 11, including part or all of the image name, retouching mode, file time (e.g., shooting time), retouching parameters, image ID, continuous shooting identifier, and retouching parameters, etc. The image parameters of the image 11 may refer to the relevant description of the image 1, which will not be repeated here.
[0314] B2. The cutting module of the terminal device 100 determines to cut the target subject image (ie, image 12) from the image 11 according to the subject refinement mode adopted by the image 11; and records the position of the image 12 in the image 11.
[0315] Exemplary, reference 4A to 4F , Image 11 is the first photo taken by the terminal device 100 using the portrait mode, and the subject is refined in the refinement mode corresponding to the portrait mode. Fig. 10B The schematic diagram of cutting out the target main image (ie, image 12 ) from image 11 is exemplarily shown.
[0316] The cutting module of the terminal device 100 records the image parameters of the target main image (i.e., image 12), including the image ID of the target main image, the image ID of the corresponding full image (i.e., image 11), and the position in image 11 (i.e., the coordinates of the upper left corner, width, and height). For example, the image parameters 2 of image 12 are as follows:
[0317]
[0318] B3. The continuous shooting recognition module of the terminal device 100 determines that the image 11 is not a non-first image of the continuous shooting scene.
[0319] Exemplarily, image 11 is the first photo taken by the continuous shooting function, and the terminal device 100 determines that image 11 is not a non-first image in the continuous shooting scenario.
[0320] B4. The terminal-side difference module determines that there is no need to perform difference on the target subject image of image 11 (ie, image 12 ), and records image 12 and the image ID of image 12 .
[0321] B5. The end-side differential module triggers the terminal device 100 to send a request message 3 to the server 200, including the image 12, the image ID and the image type, where the image type indicates that the image 12 is a non-differential image.
[0322] The embodiment of the present application does not specifically limit the implementation of the interaction between the modules in the terminal device 100. For details, please refer to the relevant description of step A5, which will not be repeated here.
[0323] It can be understood that image 11 adopts the subject refinement mode, and image 11 is not the non-first image of the continuous shooting scene; therefore, the terminal device 100 does not need to differentiate the target subject image of image 11, and directly uploads the complete image of the target subject image of image 11 to the server 200.
[0324] Optionally, the request message 3 may also include the image name of the target subject image. Exemplarily, the image name, image type, and image ID carried in the request message 3 are as follows:
[0325]
[0326] B6. According to the non-differential image indicated by the image type in the request message 3, the cloud-based differential module determines that differential restoration is not required and records the image 12 and the image ID of the image 12.
[0327] B7. The refinement module of the server 200 obtains a refined image of the image 12 (ie, image 13).
[0328] The retouching module of the server 200 performs retouching on the image 12 according to the image processing algorithm indicated by the retouching parameter in the request message 3, obtains the retouched image 13, and sends the image 13 to the cloud difference module. Fig. 10B A schematic diagram of a refined image 13 is shown.
[0329] B8. The cloud-based differential module obtains a refined image of image 12 (ie, image 13) and a differential image of image 12 (ie, image 14), where image 12 is a reference image of the differential image.
[0330] For example, Fig. 10B A schematic diagram of a differential image (ie, image 14 ) between image 11 and before and after refinement is shown, where image 14 = image 13 − image 12 .
[0331] B9. The cloud-based differential module triggers the server 200 to send a response message 3 to the terminal device 100. The response message 3 includes the image 14, the image ID of the image 14, the reference image ID, the image type and the differential algorithm identifier. The image type indicates that the image 14 is a differential image.
[0332] In some embodiments, when the cloud-based differential module determines that the differential image (ie, image 14 ) has a smaller data volume than the refined image (ie, image 13 ), the differential image is transmitted back to the terminal device 100 via a response message 3 .
[0333] Exemplarily, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in the response message 3 are as follows:
[0334]
[0335]
[0336] B10. The end-side difference module determines that differential restoration is required according to the differential image indicated by the image type in the response message 1, and restores the image 13 according to the image 14, the image 12 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.
[0337] For example, Fig. 10B As shown, image 13 (ie, the refined image of image 12 ) = image 14 (ie, the differential image) + image 12 .
[0338] B11. The cutting module of the terminal device 100 determines that the image 12 indicated by the reference image ID is the target main image, uses the image 13 to replace the image 12 in the image 11 to obtain the image 15, and determines that the image 15 is the refined image of the image 11.
[0339] Specifically, for the specific implementation of step B11, reference may be made to the relevant description of step A11, which will not be repeated here.
[0340] B12. The display module of the terminal device 100 displays a refined image of the image 11 (ie, image 15).
[0341] The step B12 is optional. The embodiment of the present application does not specifically limit the time for the terminal device 100 to display the image 1.
[0342] B13. The acquisition module of the terminal device 100 acquires the image 16 to be processed.
[0343] For example, image 16 is a second photo taken by the camera APP of the terminal device 100 in the subject refinement mode. Fig. 10B A schematic diagram of an image 16 is shown.
[0344] In one embodiment, the acquisition module may also acquire image parameters of the image 16, including part or all of the image name, retouching mode, file time, image ID, continuous shooting flag, and retouching parameters, etc. For details, please refer to the relevant description of the image 1.
[0345] B14. The cutting module of the terminal device 100 cuts the target subject image (ie, image 17) from the image 16 according to the subject refinement mode adopted by the image 16; and records the position of the image 17 in the image 16.
[0346] For example, Fig. 10B The schematic diagram of cutting out the target main image (ie, image 17 ) from image 16 is exemplarily shown.
[0347] The cutting module of the terminal device 100 records the image parameters of the target main image, including the image ID of the target main image (i.e., image 17), the image ID of the corresponding full image (i.e., image 16), and the position in image 16 (i.e., the upper left corner coordinates, width, and height). Exemplarily, the image parameters of image 17 are as follows:
[0348]
[0349] B15. The continuous shooting recognition module of the terminal device 100 determines that the image 16 is not the first image of the continuous shooting scene.
[0350] Exemplarily, image 16 is the second photo taken by the continuous shooting function, and the terminal device 100 determines that image 16 is not a non-first image in the continuous shooting scene. 4A to 4F , Image 16 is a photo taken without a continuous shooting function, and the terminal device 100 determines that the shooting time interval between the photo and the previous photo (i.e., Image 11) is less than a time threshold, or the similarity between the target subject image of the photo and the target subject image of the previous photo is greater than a similarity threshold; therefore, it is determined that Image 16 is not the first image in the continuous shooting scenario.
[0351] B16. The end-side differential module obtains a differential image (ie, image 18) between image 17 and image 12.
[0352] In the subject refinement mode, the terminal device 100 selects a reference image for the target subject image of image 16 (ie, image 17) for differentiation, for example, the reference image is the target subject image of the previous photo (ie, image 12). Fig. 10B A schematic diagram of a difference image (ie, image 18 ) between image 17 and image 12 is shown, where image 18 = image 17 − image 12 .
[0353] B17. The end-side differential module triggers the terminal device 100 to send a request message 4 to the server 200, including the image 18, the image ID of the image 18, the reference image ID, the source image ID, the image type and the differential algorithm identifier, where the image type indicates a differential image.
[0354] In some embodiments, when the cloud-based differential module determines that the differential image (ie, image 18 ) has a smaller data volume than the original image (ie, image 17 ), the differential image is uploaded to the server 200 via a request message 4 .
[0355] In some embodiments, the request message 2 of step B5 and the request message 4 of step B17 may also be uploaded to the server 200 at the same time, that is, image 12 (i.e., the target subject image of the first photo) and image 18 (i.e., the differential image between the target subject image of the second photo and the target subject image of the first photo) may be uploaded to the server 200 at the same time.
[0356] Exemplarily, the image name, image type, differential algorithm identifier, image ID, reference image ID, and source image ID carried in the request message 4 are as follows:
[0357]
[0358] B18. The end-side differential module determines that differential restoration is required based on the differential image indicated by the image type in the request message 4, restores image 17 based on image 18, image 12 indicated by the reference image ID, and the differential algorithm identifier, and records image 17 and the image ID of image 17. The image ID of image 17 is the above-mentioned source image ID.
[0359] B19. The refinement module of the server 200 obtains a refined image of the image 17 (ie, image 19).
[0360] The retouching module of the server 200 performs retouching on the image 17 according to the image processing algorithm indicated by the retouching parameters in the request message 4, obtains the retouched image 19, and sends the image 19 to the cloud difference module. Fig. 10B A schematic diagram of a refined image 19 is shown.
[0361] The present application embodiment does not specifically limit the execution order of step B7 and step B19. In some embodiments, step B7 and step B19 can be executed simultaneously, that is, image 12 and image 17 are refined simultaneously.
[0362] B20, the cloud-based differential module obtains the refined image of image 17 (ie, image 19) and the differential image between image 17 (ie, image 20), and image 17 is the reference image of the differential image.
[0363] For example, Fig. 10B A schematic diagram of a differential image (ie, image 20 ) before and after image 17 is refined is shown, where image 20 = image 19 − image 17 .
[0364] B21. The end difference module triggers the server 200 to send a response message 4 to the terminal device 100, including the image 20, the image ID of the image 20, the reference image ID, the image type and the difference algorithm identifier, wherein the image type indicates that the image 20 is a difference image.
[0365] In some embodiments, the cloud-based differential module transmits the differential image back to the terminal device 100 via the response message 4 only when it determines that the differential image (ie, image 20) has a smaller data volume than the refined image (ie, image 19).
[0366] Exemplarily, the image name, image type, differential algorithm identifier, image ID, and reference image ID carried in the response message 4 are as follows:
[0367]
[0368] B22. The end-side difference module determines that differential restoration is required according to the differential image indicated by the image type in the response message 1, and restores the image 19 according to the image 20, the image 17 indicated by the reference image ID, and the restoration algorithm indicated by the differential algorithm identifier.
[0369] B23. The cutting module of the terminal device 100 determines that the image 17 indicated by the reference image ID is the target main image, uses image 19 to replace image 17 in image 16 to obtain image 21, and determines that image 21 is a refined image of image 16.
[0370] B24. The display module of the terminal device 100 displays a refined image of the image 16 (ie, image 21).
[0371] The step B24 is optional. The embodiment of the present application does not impose any specific limitation on the time for the terminal device 100 to display the image 16 .
[0372] Exemplarily, after step B24, the acquisition module on the terminal side also acquires the third photo taken by the camera APP in the subject refinement mode. The cutting module on the terminal side determines the target subject image for cutting the third photo according to the subject refinement mode adopted by the photo. After the continuous shooting recognition module on the terminal side recognizes that the photo is not the first image in the continuous shooting scene, the differential module on the terminal side acquires the differential image corresponding to the target subject image of the third photo, and triggers the device to send the differential image to the server 200. The differential image can be the differential image between the target subject image of the third photo and the target subject image of the second photo, or the differential image with the target subject image of the first photo, that is, the reference image of the differential image is the target subject image of the second photo or the target subject image of the first photo. Since the cloud-side differential module has acquired the target subject image of the first photo and the target subject image of the second photo, the target subject image of the third photo can be restored according to the above differential image and the reference image. The subsequent cloud-side refinement and terminal-side return processing of the third photo can refer to. Fig. 10A and Fig. 10B The description of the second photo (i.e., image 16) will not be repeated here.
[0373] In combination with the foregoing embodiments, an embodiment of the present application provides an end-cloud collaborative image processing method, which includes steps S201 to S208.
[0374] S201: The electronic device obtains a first image to be processed.
[0375] S202. The electronic device sends a first area map of a first image to a server through a first request message; the first area map includes an image within a partial or entire area of the first image.
[0376] S203: The electronic device obtains a second image to be processed, and the second region map includes images within a partial or entire region of the second image.
[0377] S204: The electronic device sends a first differential image to the server through a second request message, where the first differential image is a differential image between the second region image of the second image and the first region image of the first image.
[0378] S205: The server restores the second region map according to the first differential image and the first region map.
[0379] S206: The server performs image processing on the second region map to obtain a refined image of the second region map.
[0380] S207. The server sends a second response message to the electronic device, where the second response message is used to indicate a refined image of the second area image.
[0381] S208. The electronic device determines a refined image of the second image based on the refined image of the second region image.
[0382] In the embodiment of the present application, the image to be processed involved in the aforementioned embodiment may be the first image, the second image or the third image. The first image may also be the image a involved in the aforementioned embodiment, which is not the non-first image in the continuous shooting scene; the second image / third image may be the image b involved in the aforementioned embodiment, that is, the non-first image in the continuous shooting scene.
[0383] In one implementation, the second response message includes a second differential image, which is a differential image between a refined image of the second region image and the second region image; the method also includes: the electronic device restoring the refined image of the second region image based on the second differential image and the second region image.
[0384] Exemplary, reference Fig. 7A , when the image to be processed is the second image, the second region map may be the aforementioned region Figure 1 , the first differential image may be the aforementioned differential image 1; the second differential image may be the aforementioned differential image 2.
[0385] In one implementation, the method also includes: the server performs image processing on the first area image to obtain a refined image of the first area image; the server sends a first response message to the electronic device, the first response message is used to indicate the refined image of the first area image; the electronic device determines the refined image of the first image based on the refined image of the first area image.
[0386] For example, see Fig.9A and Fig. 9B In the described embodiment, in the full image refinement mode, the first image and the first region map of the first image may be the aforementioned image 1; the first request message may be the aforementioned request message 1, and the first response message may be the aforementioned response message 1. The second image and the second region map of the second image may be the aforementioned image 4, and the first difference image may be the aforementioned image 5; the second request message may be the aforementioned request message 2, and the second response message may be the aforementioned response message 2.
[0387] For example, see Fig. 10A and Fig. 10B In the described embodiment, in the subject refinement mode, the first image may be the aforementioned image 11, the first region map of the first image may be the aforementioned image 12; the first request message may be the aforementioned request message 3, and the first response message may be the aforementioned response message 3. The second image may be the aforementioned image 16, the second region map of the second image may be the aforementioned image 17, and the first difference image may be the aforementioned image 18; the second request message may be the aforementioned request message 4, and the second response message may be the aforementioned response message 4.
[0388] In one implementation, the electronic device is provided with a continuous shooting function, and the first image and the second image are two images taken in one continuous shooting function; the method further includes: the electronic device detects a first input operation for starting the continuous shooting function; the electronic device obtains the first image to be processed, and the electronic device obtains the second image to be processed, including: in response to the first input operation, the electronic device obtains the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.
[0389] For example, refer to the description of application scenario 1. FIG. 3E to FIG. 3I As shown, the first input operation may include a long press operation on the shooting control 105 .
[0390] In one implementation, the electronic device acquires a first image to be processed, including: in response to a detected first shooting instruction, the camera of the electronic device captures the first image; the electronic device acquires a second image to be processed, including: in response to a detected second shooting instruction, the camera of the electronic device captures the second image; the shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold. Exemplarily, the time threshold is equal to 0.5s, and the similarity threshold is equal to 80%.
[0391] For example, refer to the description of application scenario 2. Figure 4B and Figure 4C As shown, the first shooting instruction and the second shooting instruction may both include a click operation acting on the shooting control 105 .
[0392] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image being a differential image between a third area map of the third image and a first area map of the first image; the third area map includes images within part or all of the area of the third image; the server restores the third area map based on the third differential image and the first area map; the server performs image processing on the third area map to obtain a refined image of the third area map; the server sends a third response message to the electronic device, the third response message being used to indicate the refined image of the third area map; the electronic device determines the refined image of the third image based on the refined image of the third area map.
[0393] Exemplary, reference Figure 2B In the related description, the first image may be the first photo taken, the second image may be the second photo taken, and the third image may be the nth photo taken (for example, the third photo).
[0394] In one implementation, the method also includes: the electronic device obtains a third image to be processed; the electronic device sends a third differential image to the server through a third request message, the third differential image being a differential image between a third area map of the third image and a second area map of the second image; the third area map includes images within part or all of the area of the third image; the server restores the third area map based on the third differential image and the second area map; the server performs image processing on the third area map to obtain a refined image of the third area map; the server sends a third response message to the electronic device, the third response message being used to indicate the refined image of the third area map; the electronic device determines the refined image of the third image based on the refined image of the third area map.
[0395] Exemplary, reference Figure 2C In the related description, the first image may be the first photo taken, the second image may be the second photo taken, and the third image may be the third photo taken.
[0396] In one implementation, for the third image to be processed, the terminal side may upload to the cloud a differential image between the third image and any image that has been uploaded to the cloud.
[0397] In one implementation, the electronic device sends the first differential image to the server via a second request message, including: when the data volume of the first differential image is smaller than the data volume of the second area image, the electronic device sends the first differential image and the image ID of the first area image to the server via the first request message; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area image, the second response message includes the second differential image and the image ID of the second area image, and the second differential image is a differential image between the refined image of the second area image and the second area image; when the data volume of the second differential image is smaller than the data volume of the refined image of the second area image, the second response message includes the refined image of the second area image.
[0398] In one implementation, when the image refinement mode is the full image refinement mode, the region map of the image includes the image content in the entire region of the image; when the second image refinement mode is the full image refinement mode, the second image and the second region map are the same, and the refined map of the second region map is the refined map of the second image. Fig.9A and Fig. 9B In the described embodiment, in the full image refinement mode, the first image and the first area image of the first image are both image 1; the second image and the second area image of the second image are both image 4.
[0399] In one implementation, when the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; when the second image refinement mode is the subject refinement mode, before the electronic device sends the first differential image to the server through the second request message, the method also includes: the electronic device obtains the position of the second region map in the second image, and crops the second region map from the second image; the electronic device determines the refined image of the second image based on the refined image of the second region map, including: based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with the refined image of the second region map, and obtains the refined image of the second image. For example, see Fig. 10A and Fig. 10B In the described embodiment, in the subject refinement mode, the first image may be the aforementioned image 11, the first area image of the first image may be the aforementioned image 12, and the refined image of the first area image may be the aforementioned image 13. By replacing image 12 in image 11 with image 13, a refined image of image 11 can be obtained.
[0400] In one implementation, the first request message includes a first photo retouching parameter, which is used to indicate at least one image processing method adopted for the second image; the above-mentioned server performs image processing on the second area image of the second image to obtain a refined image of the second area image, including: the server performs image processing on the second image according to at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.
[0401] In one implementation, the electronic device pre-stores a correspondence between multiple image processing methods and refinement modes, the refinement modes including a full-image refinement mode and a subject refinement mode; the above-mentioned multiple image processing methods include multiple shooting modes, the above-mentioned multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is the subject refinement mode; the image processing method adopted by the image is used to determine the refinement mode of the image.
[0402] In one implementation, the first request message also includes an image ID of the first area map; the second request message also includes a reference image ID and a source image ID of the first differential image, the reference image of the first differential image is the first area map, and the source image of the first differential image is the second area map; the server restores the second area map based on the first differential image and the first area map, including: the server restores the second area map based on the first differential image and the first area map indicated by the reference image ID, and determines that the image ID of the restored second area map is the source image ID; the second response message includes the image ID of the second area map.
[0403] In one implementation, the second request message further includes an algorithm identifier, the algorithm identifier indicating the first restoration algorithm; the server restores the second region map according to the first differential image and the first region map, including: the server restores the second region map according to the first differential image, the first region map and the first restoration algorithm. The algorithm identifier may be the aforementioned differential algorithm identifier.
[0404] The following introduces the structure of a terminal device 100 provided in an embodiment of the present application. Fig.11 A schematic structural diagram of the terminal device 100 is shown.
[0405] The terminal 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.
[0406] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal 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.
[0407] 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 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.
[0408] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0409] 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.
[0410] 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.
[0411] 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 terminal device 100.
[0412] 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.
[0413] 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.
[0414] 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.
[0415] 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 terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
[0416] 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.
[0417] 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 terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. 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.
[0418] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0419] 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 terminal 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.
[0420] 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 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.
[0421] The wireless communication function of the terminal 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.
[0422] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 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.
[0423] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the terminal 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.
[0424] 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.
[0425] 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 terminal 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, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0426] In some embodiments, the antenna 1 of the terminal 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 terminal 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).
[0427] The terminal 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, which execute program instructions to generate or change display information.
[0428] 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 terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0429] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0430] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and 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 the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0431] 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 terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0432] 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 terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0433] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0434] 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 the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0435] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0436] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.
[0437] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level; universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.
[0438] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.
[0439] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0440] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
[0441] The terminal 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.
[0442] 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.
[0443] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0444] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.
[0445] 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 the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal 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 terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.
[0446] 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.
[0447] 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 disposed 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.
[0448] The gyro sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (ie, x, y and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting.
[0449] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0450] The magnetic sensor 180D includes a Hall sensor, and the terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
[0451] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).
[0452] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser.
[0453] 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.
[0454] The ambient light sensor 180L is used to sense the brightness of the ambient light. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
[0455] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0456] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.
[0457] The touch sensor 180K is also called a "touch control device". 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 control 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 terminal device 100, which is different from the position of the display screen 194.
[0458] 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 a human vocal part.
[0459] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.
[0460] 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.
[0461] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0462] The SIM card interface 195 is used to connect a SIM card.
[0463] The following introduces the structure of a server 200 provided in an embodiment of the present application. Fig.12 The structure of a server 200 provided in an embodiment of the present application is exemplified.
[0464] like Fig.12 As shown, the server 200 may include: one or more processors 1001, a memory 1002, a communication interface 1003, a transmitter 1005, a receiver 1006, a coupler 1007, and an antenna 1008. These components may be connected via a bus 1004 or other means. Fig.12 Take bus connection as an example.
[0465] The communication interface 1003 can be used for the server 200 to communicate with other communication devices, such as the terminal device 100. Specifically, the communication interface 1003 can be a 3G communication interface, a 4G communication interface, a 5G communication interface, or a communication interface of a future new air interface. Not limited to a wireless communication interface, the server 200 can also be configured with a wired communication interface 1003, such as a local access network (LAN) interface. The transmitter 1005 can be used to transmit and process the signal output by the processor 1001. The receiver 1006 can be used to receive and process the mobile communication signal received by the antenna 1008.
[0466] In some embodiments of the present application, the transmitter 1005 and the receiver 1006 can be regarded as a wireless modem. In the server 200, the number of the transmitter 1005 and the receiver 1006 can be one or more. The antenna 1008 can be used to convert the electromagnetic energy in the transmission line into electromagnetic waves in the free space, or convert the electromagnetic waves in the free space into electromagnetic energy in the transmission line. The coupler 1007 is used to divide the mobile communication signal received by the antenna 1008 into multiple paths and distribute them to multiple receivers 1006.
[0467] The memory 1002 is coupled to the processor 1001 and is used to store various software programs and / or multiple sets of instructions. Specifically, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices. The memory 1002 may store a network communication program, which may be used to communicate with one or more additional devices, one or more terminal devices, or one or more network devices.
[0468] In some embodiments of the present application, the memory 1002 may be used to store an implementation program of the application distribution method provided by one or more embodiments of the present application on the server 200 side. For the implementation of the application distribution method provided by one or more embodiments of the present application, please refer to the above embodiments.
[0469] The processor 1001 can be used to read and execute computer-readable instructions. Specifically, the processor 1001 can be used to call a program stored in the memory 1002, such as an implementation program of the application distribution method provided in one or more embodiments of the present application on the server 200 side, and execute the instructions contained in the program.
[0470] It should be noted that Fig.12 The server 200 shown is only one implementation of the embodiment of the present application. In actual applications, the server 200 may also include more or fewer components, which is not limited here.
[0471] For more details about the functions and working principles of the server 200, please refer to the relevant contents in the above embodiments, which will not be repeated here.
[0472] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
[0473] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it 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 present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0474] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0475] In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for image processing based on end-cloud collaboration. It is characterized in that Applied to an image processing system, the system includes an electronic device and a server, and the method includes: The electronic device acquires a first image to be processed; The electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a partial or entire area of the first image; The electronic device acquires a second image to be processed, and the second region map includes images within a part or all of the region of the second image; The electronic device sends a first differential image to the server through a second request message, where the first differential image is a differential image between the second region image of the second image and the first region image of the first image; The server restores the second area map according to the first differential image and the first area map; The server performs image processing on the second area map to obtain a refined image of the second area map; The server sends a second response message to the electronic device, where the second response message is used to indicate a refined image of the second area image; The electronic device determines a refined image of the second image based on the refined image of the second region image.
2. The method according to claim 1, It is characterized in that The second response message includes a second differential image, where the second differential image is a differential image between a refined image of the second region image and the second region image; and the method further includes: The electronic device restores a refined image of the second region map based on the second differential image and the second region map.
3. The method according to claim 1, It is characterized in that The method further comprises: The server performs image processing on the first area map to obtain a refined image of the first area map; The server sends a first response message to the electronic device, where the first response message is used to indicate a refined image of the first area image; The electronic device determines a refined image of the first image based on the refined image of the first region image.
4. The method according to any one of claims 1 to 3, It is characterized in that The electronic device is provided with a continuous shooting function, and the first image and the second image are two images shot in one continuous shooting function; the method further includes: The electronic device detects a first input operation for starting a continuous shooting function; The electronic device acquires a first image to be processed, and the electronic device acquires a second image to be processed, including: In response to the first input operation, the electronic device acquires the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.
5. The method according to any one of claims 1 to 3, It is characterized in that The electronic device acquires a first image to be processed, including: In response to the detected first shooting instruction, the camera of the electronic device shoots a first image; The electronic device acquires a second image to be processed, including: In response to the detected second shooting instruction, the camera of the electronic device shoots a second image; The shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold.
6. The method according to any one of claims 1 to 5, It is characterized in that The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third area map of the third image and the first area map of the first image; the third area map includes an image within a part or all of the area of the third image; The server restores the third area map according to the third differential image and the first area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.
7. The method according to any one of claims 1 to 5, It is characterized in that The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third area map of the third image and the second area map of the second image; the third area map includes an image within a part or all of the area of the third image; The server restores the third area map according to the third differential image and the second area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.
8. The method according to any one of claims 1 to 7, It is characterized in that The electronic device sends the first differential image to the server through a second request message, including: When the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the image identifiers of the first differential image and the first area map to the server through the first request message; When the data volume of the second differential image is smaller than the data volume of the refined image of the second region image, the second response message includes the second differential image and the image identifier of the second region image, and the second differential image is a differential image between the refined image of the second region image and the second region image; When the data size of the second differential image is smaller than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map.
9. The method according to any one of claims 1 to 8, It is characterized in that When the image refinement mode is the full image refinement mode, the region map of the image includes the image content in the entire region of the image; When the refinement mode of the second image is the full-image refinement mode, the second image and the second region image are the same, and the refined image of the second region image is the refined image of the second image.
10. The method according to any one of claims 1 to 9, It is characterized in that When the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; When the refinement mode of the second image is the subject refinement mode, before the electronic device sends the first difference image to the server through the second request message, the method further includes: The electronic device obtains a position of the second area map in the second image, and crops the second area map from the second image; The electronic device determines a refined image of the second image based on the refined image of the second region image, including: Based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with a refined image of the second region map to obtain a refined image of the second image.
11. The method according to any one of claims 1 to 10, It is characterized in that The first request message includes a first image retouching parameter, where the first image retouching parameter is used to indicate at least one image processing method used for the second image; the server performs image processing on the second region image of the second image to obtain a refined image of the second region image, including: The server performs image processing on the second image according to the at least one image processing method indicated by the first image retouching parameter to obtain a refined image of the second area image.
12. The method according to any one of claims 9 to 11, It is characterized in that The electronic device pre-stores a correspondence between a plurality of image processing methods and refinement modes, wherein the refinement modes include a full image refinement mode and a main body refinement mode; The multiple image processing modes include multiple shooting modes, the multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is a subject refinement mode; The image processing method used for the image is used to determine the image refinement mode.
13. The method according to any one of claims 1 to 12, It is characterized in that The first request message further includes an image identifier of the first region map; the second request message further includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first region map, and the source image of the first differential image is the second region map; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image and the first area map indicated by the reference image identifier, and determines the image identifier of the restored second area map as the source image identifier; and the second response message includes the image identifier of the second area map.
14. The method according to any one of claims 1 to 13, It is characterized in that The second request message further includes an algorithm identifier, where the algorithm identifier indicates a first restoration algorithm; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image, the first area map and the first restoration algorithm.
15. A method for image processing based on end-cloud collaboration. It is characterized in that The method comprises: The electronic device acquires a first image to be processed; The electronic device sends a first area map of the first image to the server through a first request message; the first area map includes images within a partial or entire area of the first image; The electronic device acquires a second image to be processed, and the second region map includes images within a part or all of the region of the second image; The electronic device sends a first differential image to the server through a second request message, where the first differential image is a differential image between a second region image of the second image and the first region image of the first image; the second request message is used to instruct to restore the second region image according to the first differential image, and to obtain a refined image of the second region image; The electronic device receives a second response message sent by the server, where the second response message is used to indicate a refined image of the second area image; The electronic device determines a refined image of the second image based on the refined image of the second region image.
16. The method according to claim 15, It is characterized in that The second response message includes a second differential image, where the second differential image is a differential image between a refined image of the second region image and the second region image; and the method further includes: The electronic device restores a refined image of the second region map based on the second differential image and the second region map.
17. The method according to claim 15, It is characterized in that The first request message is used to instruct the server to obtain a refined image of the first area image; the method further includes: The electronic device receives a first response message sent by the server, where the first response message is used to indicate a refined image of the first area image; The electronic device determines a refined image of the first image based on the refined image of the first region image.
18. The method according to any one of claims 15 to 17, It is characterized in that The electronic device is provided with a continuous shooting function, and the first image and the second image are two images shot in one continuous shooting function; the method further includes: The electronic device detects a first input operation for starting a continuous shooting function; The electronic device acquires a first image to be processed, and the electronic device acquires a second image to be processed, including: In response to the first input operation, the electronic device acquires the first image and the second image of the continuous shooting; the first image is the first image of the continuous shooting, and the second image is a non-first image of the continuous shooting.
19. The method according to any one of claims 15 to 17, It is characterized in that The electronic device acquires a first image to be processed, including: In response to the detected first shooting instruction, the camera of the electronic device shoots a first image; The electronic device acquires a second image to be processed, including: In response to the detected second shooting instruction, the camera of the electronic device shoots a second image; The shooting time interval between the second image and the first image is less than a time threshold, and / or the similarity between the second image and the first image is greater than a similarity threshold.
20. The method according to any one of claims 15 to 19, It is characterized in that The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third region image of the third image and the first region image of the first image; the third region image includes an image in a partial or entire region of the third image; and the third request message is used to instruct to restore the third region image according to the third differential image and obtain a refined image of the third region image; The electronic device receives a third response message sent by the server, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.
21. The method according to any one of claims 15 to 19, It is characterized in that The method further comprises: The electronic device acquires a third image to be processed; The electronic device sends a third differential image to the server through a third request message, wherein the third differential image is a differential image between a third region image of the third image and the second region image of the second image; the third region image includes an image in a partial or entire region of the third image; and the third request message is used to instruct to restore the third region image according to the third differential image and obtain a refined image of the third region image; The electronic device receives a third response message sent by the server, where the third response message is used to indicate a refined image of the third area image; The electronic device determines a refined image of the third image based on the refined image of the third region image.
22. The method according to any one of claims 15 to 21, It is characterized in that The electronic device sends the first differential image to the server through a second request message, including: When the data volume of the first differential image is smaller than the data volume of the second area map, the electronic device sends the image identifiers of the first differential image and the first area map to the server through the first request message; When the data volume of the second differential image is smaller than the data volume of the refined image of the second region image, the second response message includes the second differential image and the image identifier of the second region image, and the second differential image is a differential image between the refined image of the second region image and the second region image; When the data size of the second differential image is smaller than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map.
23. The method according to any one of claims 15 to 22, It is characterized in that When the image refinement mode is the full image refinement mode, the region map of the image includes the image content in the entire region of the image; When the refinement mode of the second image is the full-image refinement mode, the second image and the second region image are the same, and the refined image of the second region image is the refined image of the second image.
24. The method according to any one of claims 15 to 23, It is characterized in that When the image refinement mode is the subject refinement mode, the region map of the image includes the target subject in the image, and the size of the region map of the image is smaller than the size of the image; When the refinement mode of the second image is the subject refinement mode, before the electronic device sends the first difference image to the server through the second request message, the method further includes: The electronic device obtains a position of the second area map in the second image, and crops the second area map from the second image; The electronic device determines a refined image of the second image based on the refined image of the second region image, including: Based on the position of the second region map in the second image, the electronic device replaces the second region map in the second image with a refined image of the second region map to obtain a refined image of the second image.
25. The method according to any one of claims 15 to 24, It is characterized in that The first request message includes a first photo retouching parameter, and the first photo retouching parameter is used to indicate at least one image processing method adopted for the second image; the first request message is used to request the server to perform image processing on the second image according to the at least one image processing method indicated by the first photo retouching parameter to obtain a refined image of the second area image.
26. A method according to any one of claims 23 to 25, It is characterized in that The electronic device pre-stores a correspondence between a plurality of image processing methods and refinement modes, wherein the refinement modes include a full image refinement mode and a main body refinement mode; The multiple image processing modes include multiple shooting modes, the multiple shooting modes include a portrait mode, and the refinement mode corresponding to the portrait mode is a subject refinement mode; The image processing method used for the image is used to determine the image refinement mode.
27. The method according to any one of claims 15 to 26, It is characterized in that The first request message further includes an image identifier of the first area map; The second request message further includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first region image, and the source image of the first differential image is the second region image; The second response message includes an image identifier of the second area map.
28. The method according to any one of claims 15 to 27, It is characterized in that The second request message further includes an algorithm identifier, where the algorithm identifier is used to indicate that the server uses a first restoration algorithm to restore the second area map.
29. A method for image processing based on end-cloud collaboration. It is characterized in that The method comprises: The server receives a first area map of the first image sent by the electronic device through a first request message; the first area map includes an image within a partial or entire area of the first image; The server receives a first differential image sent by the electronic device through a second request message, wherein the first differential image is a differential image between a second area map and the first area map; the second area map includes an image within a part or all of the area of the second image; The server restores the second area map according to the first differential image and the first area map; The server performs image processing on the second area map to obtain a refined image of the second area map; The server sends a second response message to the electronic device, where the second response message is used to indicate a refined image of the second area image; the refined image of the second area image is used to determine a refined image of the second image.
30. The method according to claim 29, It is characterized in that The second response message includes a second differential image, which is a differential image between a refined image of the second area image and the second area image; the second response message is used to instruct the electronic device to restore the refined image of the second area image based on the second differential image and the second area image.
31. The method according to claim 29, It is characterized in that The method further comprises: The server performs image processing on the first area map to obtain a refined image of the first area map; The server sends a first response message to the electronic device, where the first response message is used to indicate a refined image of the first area image; the refined image of the first area image is used to determine a refined image of the first image.
32. A method according to any one of claims 29 to 31, It is characterized in that The method further comprises: The server receives a third differential image sent by the electronic device through a third request message, wherein the third differential image is a differential image between the third area map and the first area map; the third area map includes an image within a part or all of the area of the third image; The server restores the third area map according to the third differential image and the first area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; the refined image of the third area image is used to determine a refined image of the third image.
33. A method according to any one of claims 29 to 31, It is characterized in that The method further comprises: The server receives a third differential image sent by the electronic device through a third request message, wherein the third differential image is a differential image between the third area map and the second area map; the third area map includes an image within a part or all of the area of the third image; The server restores the third area map according to the third differential image and the second area map; The server performs image processing on the third region image to obtain a refined image of the third region image; The server sends a third response message to the electronic device, where the third response message is used to indicate a refined image of the third area image; the refined image of the third area image is used to determine a refined image of the third image.
34. A method according to any one of claims 29 to 33, It is characterized in that When the data volume of the second differential image is smaller than the data volume of the refined image of the second region image, the second response message includes the second differential image and the image identifier of the second region image, and the second differential image is a differential image between the refined image of the second region image and the second region image; When the data size of the second differential image is smaller than the data size of the refined image of the second region map, the second response message includes the refined image of the second region map.
35. A method according to any one of claims 29 to 34, It is characterized in that The first request message includes a first image retouching parameter, where the first image retouching parameter is used to indicate at least one image processing method used for the second image; the server performs image processing on the second region image of the second image to obtain a refined image of the second region image, including: The server performs image processing on the second image according to the at least one image processing method indicated by the first image retouching parameter to obtain a refined image of the second area image.
36. A method according to any one of claims 29 to 35, It is characterized in that The first request message further includes an image identifier of the first region map; the second request message further includes a reference image identifier and a source image identifier of the first differential image, the reference image of the first differential image is the first region map, and the source image of the first differential image is the second region map; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image and the first area map indicated by the reference image identifier, and determines the image identifier of the restored second area map as the source image identifier; and the second response message includes the image identifier of the second area map.
37. A method according to any one of claims 29 to 36, It is characterized in that The second request message further includes an algorithm identifier, where the algorithm identifier indicates a first restoration algorithm; The server restores the second area map according to the first differential image and the first area map, including: The server restores the second area map according to the first differential image, the first area map and the first restoration algorithm.
38. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory is coupled to the processor, and the memory is used to store computer program code, wherein the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the end-cloud collaborative image processing method as described in any one of claims 15-28 or claims 29-37.
39. A computer readable storage medium, It is characterized in that It includes computer instructions, which, when executed on a server, enable the server to execute the end-cloud collaborative image processing method as described in any one of claims 15-28 or claims 29-37.
Citation Information
Patent Citations
Image processing method and electronic equipment
CN110944098A
Image data processing method and device and medium
CN114331946A
Apparatus and method for augmented reality
US20140118398A1
Cited By
Image recognition method, terminal, server, electronic equipment and storage medium
CN120747887A
