Image Processing Method, Apparatus, Electronic Device, and Readable Storage Medium
By utilizing server-stored high-quality scene parameters to optimize image processing, the method enhances image quality in electronic devices while reducing the terminal device's processing load.
Patent Information
- Application Number
- CN202211180396.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-02-26
AI Technical Summary
In the prior art, the image quality improvement effect of electronic devices is poor when taking pictures.
By obtaining element information of the target scene in the preview image, sending it to the server for image optimization processing. The server pre-stores standard parameter information corresponding to different scene elements, and receives and applies image optimization information for image processing.
The effect of image optimization processing is improved, the workload of terminal equipment is reduced, the processing efficiency is improved, and the image quality of images is improved.
Smart Images

Figure CN115835032B_ABST
Abstract
Description
[0001] This application is a divisional application of the parent application with the application number "202110218721X", the application date of "February 26, 2021", and the invention title of "Image Processing Method, Device, Electronic Device and Readable Storage Medium". Technical Field
[0002] This application belongs to the field of electronic devices, and particularly relates to an image processing method, device, electronic device and readable storage medium. Background Art
[0003] With the rapid development of electronic devices, people are already accustomed to using electronic devices such as mobile phones and cameras to take pictures or record videos to record the little bits of life. And with the continuous improvement of shooting technology, people's requirements for the photo effect are getting higher and higher.
[0004] In the prior art, multiple shooting modes are preset in advance, and users can select their favorite shooting mode according to their needs to take pictures in order to modify the image. However, this method has a poor effect on improving the image quality. Summary of the Invention
[0005] The purpose of the embodiments of this application is to provide an image processing method, device, electronic device and readable storage medium, which can solve the problem of poor effect in improving the image quality when taking pictures.
[0006] To solve the above technical problems, this application is implemented as follows:
[0007] In a first aspect, the embodiments of this application provide an image processing method, which is applied to a terminal device, and the method includes:
[0008] Obtain the element information of the target scene in the preview image;
[0009] Send the element information to the server; different standard parameter information corresponding to scene elements is pre-stored in the server;
[0010] Receive the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information;
[0011] Obtain the target image optimized by the image according to the image optimization information.
[0012] In a second aspect, the embodiments of this application provide an image processing method, which is applied to a server, and the method includes:
[0013] Receive the element information of the target scene sent by the terminal device;
[0014] Determine the image optimization information according to the element information and the standard parameter information; the standard parameter information is the information corresponding to different scene elements stored in advance.
[0015] Return the image optimization information to the terminal device.
[0016] In a third aspect, an embodiment of the present application provides an image processing device, which is applied to a terminal device. The device includes:
[0017] A first acquisition module, configured to acquire the element information of the target scene in the preview image.
[0018] A sending module, configured to send the element information to the server; different standard parameter information corresponding to scene elements is stored in advance in the server.
[0019] A receiving module, configured to receive the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information.
[0020] A second acquisition module, configured to acquire the target image optimized according to the image optimization information.
[0021] In a fourth aspect, an embodiment of the present application provides an image processing device, which is applied to a server. The device includes:
[0022] A receiving module, configured to receive the element information of the target scene sent by the terminal device.
[0023] A determination module, configured to determine the image optimization information according to the element information and the standard parameter information; the standard parameter information is the information corresponding to different scene elements stored in advance.
[0024] A return module, configured to return the image optimization information to the terminal device.
[0025] In a fifth aspect, an embodiment of the present application provides an image processing system, including a terminal device and a server:
[0026] The terminal device is configured to acquire the element information of the target scene in the preview image.
[0027] The terminal device is configured to send the element information to the server; different standard parameter information corresponding to scene elements is stored in advance in the server.
[0028] The server is configured to receive the element information of the target scene sent by the terminal device.
[0029] The server is configured to determine image optimization information according to the element information and standard parameter information; the standard parameter information is information corresponding to different scene elements stored in advance.
[0030] The server is configured to return the image optimization information to the terminal device.
[0031] The terminal device is configured to receive the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information.
[0032] The terminal device is configured to obtain a target image with optimized image according to the image optimization information.
[0033] In a sixth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the image processing method described in the first aspect are implemented.
[0034] In a seventh aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the image processing method described in the first aspect are implemented.
[0035] In an eighth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is configured to run a program or instruction to implement the image processing method described in the first aspect.
[0036] In summary, for the image processing method provided by the embodiment of the present invention, the element information of the target scene in the preview image is first obtained, and then the element information is sent to the server. Standard parameter information corresponding to different scene elements is stored in advance in the server. The image optimization information returned by the server is received. The image optimization information is determined by the server according to the element information and the standard parameter information. Finally, according to the image optimization information, a target image with optimized image is obtained. In this way, by obtaining the standard parameter information of high-quality images stored on the server and performing image optimization based on the image optimization information determined by these standard parameter information, the effect of image optimization processing can be improved to a certain extent. Moreover, the terminal device only needs to perform image optimization according to the received image optimization information. Therefore, the workload of the terminal device can be reduced to a certain extent, thereby improving the processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flowchart of the steps of an image processing method provided by an embodiment of the present application;
[0038] Figure 2 It is a flowchart of steps of another image processing method provided by an embodiment of the present application;
[0039] Figure 3 It is a flowchart of steps of another image processing method provided by an embodiment of the present application;
[0040] Figure 4 It is a schematic flowchart provided by an embodiment of the present application;
[0041] Figure 5 It is a block diagram of an image processing apparatus further provided by an embodiment of the present application;
[0042] Figure 6 It is a block diagram of an image processing apparatus further provided by an embodiment of the present application;
[0043] Figure 7 It is a schematic hardware structure diagram of an electronic device for implementing an embodiment of the present application. Specific embodiments
[0044] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0045] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.
[0046] Next, in conjunction with the accompanying drawings, the image processing method provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0047] Figure 1 It is a flowchart of steps of an image processing method provided by an embodiment of the present application, applied to a terminal device, such as Figure 1 as shown, the method may include:
[0048] Step 101, obtain element information of a target scene in a preview image.
[0049] In an embodiment of the present invention, the preview image may be an image displayed in the preview area of the current captured frame. When a user needs to use the terminal device to take a photo, the shooting function of the terminal device can be turned on, and the terminal device can then display a shooting interface, which includes a preview area for displaying the preview image. When the user needs to take a photo, the camera of the terminal device can be aimed at the object to be photographed. At this time, the terminal device can collect the current captured frame containing the object to be photographed through the camera.
[0050] In an embodiment of the present invention, the target scene may be a scene element displayed in the preview image. The scene element may be a person, an animal, a building, a tree, a landscape, the weather, etc. The element information may be the characteristic information of the scene element. For example, when the scene element is a building, the element information may be the size, shape, color, structure, etc. of the building; when the scene element is a person, the element information may be the gender, age, body type, facial features, etc. of the person. The element information may also be the identifier of the scene element, which may be the name, geographical location, etc. of the scene element, and the scene element can be found and determined according to the identifier. For example, if the preview image shows an iron tower in the rain, the target scene may be the iron tower, and the element information may be the height, width, shape, color, structure, etc. of the iron tower, or the name of the iron tower "XX Iron Tower", or the geographical location of the iron tower.
[0051] In an embodiment of the present invention, obtaining the element information of the target scene in the preview image may be that when the terminal device collects the preview image, it performs scene recognition on the preview image to determine the target scene included in the preview image, and then detects each target scene to determine the element information corresponding to each target scene. Specifically, when the terminal device frames and collects the preview image, the preview image may be transmitted to the central processing unit (CPU) through a digital signal processing chip (DSP) for image analysis and calculation, and the digital signal of the preview image is processed into a feature function with scene characteristics. Then, through scene recognition, the scene elements of the preview image information are extracted to obtain the target scene of the preview image and the corresponding element information, that is, the feature function with scene characteristics obtained for the preview image is classified and assigned values. The feature functions classified into different scenes are used as the target scenes, and the values assigned to the characteristics of the scene elements in the feature function are used as the element information corresponding to the target scene.
[0052] Step 102: Send the element information to the server; standard parameter information corresponding to different scene elements is pre-stored in the server.
[0053] In an embodiment of the present invention, sending the element information to the server may be sending the element information corresponding to the target scene as an image optimization processing request to the server. Correspondingly, the server receives the image optimization processing request and performs the corresponding image optimization processing.
[0054] In an embodiment of the present invention, standard parameter information corresponding to different scene elements is pre-stored in the server. The standard parameter information may be characteristic parameters corresponding to different scene elements extracted from a high-quality image, and the high-quality image may be an image with relatively high display quality pre-stored in the server. Since the high-quality image is an image with high pixels and high resolution, the characteristic function obtained according to the high-quality image, that is, the standard parameter information, contains more display information, so that content with more pixels and clearer display can be obtained.
[0055] Step 103: Receive the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information.
[0056] In an embodiment of the present invention, the image optimization information may be determined according to the element information and the standard parameter information. The image optimization information may be image optimization parameters for guiding the optimization processing of the image, or may be an optimization function for displaying the characteristics of image optimization. The present invention does not limit this.
[0057] Step 104: Obtain a target image optimized according to the image optimization information.
[0058] In an embodiment of the present invention, the image may be optimized by using the image optimization information, and the optimized image is used as the target image. For example, if the image optimization information is image optimization parameters, the corresponding parameters of the image may be adjusted to the image optimization parameters to obtain the target image; if the image optimization information is an optimization function, the obtained image is processed by using the optimization function to obtain the target image.
[0059] In summary, for the image processing method provided in the embodiments of the present invention, the element information of the target scene in the preview image is first obtained, and then the element information is sent to the server. Standard parameter information corresponding to different scene elements is pre-stored in the server. The image optimization information returned by the server is received. The image optimization information is determined by the server according to the element information and the standard parameter information. Finally, according to the image optimization information, the target image after image optimization is obtained. In this way, by obtaining the standard parameter information of high-quality images stored on the server and performing image optimization based on the image optimization information determined by these standard parameter information, the effect of optimizing the image can be improved to a certain extent. Moreover, the terminal device only needs to perform image optimization according to the received image optimization information. Therefore, the workload of the terminal device can be reduced to a certain extent, thereby improving the processing efficiency.
[0060] Optionally, in the embodiments of the present invention, the image optimization information may include target imaging optimization parameters and target image optimization parameters. Specifically, the target image can be obtained through the following sub-steps 1041 - sub-step 1042:
[0061] Sub-step 1041: Use the target imaging optimization parameters as shooting parameters and perform shooting to obtain a first image.
[0062] In the embodiments of the present invention, the target imaging optimization parameters can be the parameters for obtaining an image during shooting. For example, they can be the exposure time, contrast, exposure degree, etc. when the camera shoots. By adjusting the parameters of the terminal device when shooting an image, the display effect of the captured image can be improved. Use the target imaging optimization parameters as shooting parameters and perform shooting to obtain a first image. For example, if the target imaging optimization parameters are an exposure time of 0.02 ms and a contrast of 100:1, then when the camera of the terminal device shoots, it can shoot with the target imaging optimization parameters, that is, shoot with an exposure time of 0.02 ms and a contrast of 100:1, and the obtained image is the first image.
[0063] Sub-step 1042: Adjust the first image according to the target image optimization parameters to obtain the target image.
[0064] In the embodiments of the present invention, the target image optimization parameters can be the parameters that need to be adjusted when performing image optimization processing on an image. For example, they can be parameters such as contrast, sensitivity, and resolution. By performing image optimization processing on the captured image, the display effect of the image can be further improved. Adjust the first image according to the target image optimization parameters to obtain the target image. For example, if the target image optimization parameters are a sensitivity of 200 and a resolution of 72 ppi, then when performing image optimization processing on the image, the sensitivity can be adjusted to 200 and the resolution can be adjusted to 72 ppi, and the processed first image is used as the target image.
[0065] Optionally, in the embodiments of the present invention, the element information may include an identifier of a target scenario; the image optimization information may be generated according to target standard parameter information corresponding to the target scenario, the target standard parameter information may be determined from the standard parameter information according to the identifier, the image optimization information may include a first image optimization function and a first imaging optimization function. Specifically, the target image may be obtained through the following sub-steps 1043 to 1045:
[0066] Sub-step 1043: Generate target image optimization parameters according to the first image optimization function, and generate target imaging optimization parameters according to the first imaging optimization function.
[0067] In the embodiments of the present invention, the image optimization information may be generated according to target standard parameter information corresponding to the target scenario, the target standard parameter information may be determined from the standard parameter information according to the identifier. For example, if the target scenario is the ABC iron tower and the identifier of the target scenario is "ABC iron tower", the standard parameter information corresponding to "ABC iron tower" in the scene elements on the server may be used as the target standard parameter information. Further, a first image optimization function and a first imaging optimization function may be generated according to the target standard parameter information. Specifically, according to the display effect of the target standard parameter information, the relational expression that needs to be adjusted when acquiring an image may be used as the first imaging optimization function, and the relational expression for optimizing the image may be used as the first image optimization function.
[0068] In the embodiments of the present invention, generating target image optimization parameters according to the first image optimization function may be based on the first image optimization function, and selecting the parameter value when the first image optimization function has the highest value, that is, when the optimization processing effect is the best, as the target image optimization parameters. Generating target imaging optimization parameters according to the first imaging optimization function may be based on the first imaging optimization function, and selecting the parameter value when the first imaging optimization function has the highest value, that is, when the acquired image has the best display, as the target imaging optimization parameters.
[0069] Sub-step 1044: Use the target imaging optimization parameters as shooting parameters and perform shooting to obtain a second image.
[0070] For example, if the target imaging optimization parameters are ABC, when the terminal device calls the camera to take a photo, ABC may be used as the shooting parameters, and the photo-taking operation is performed, and the taken image is used as the second image.
[0071] Sub-step 1045: Adjust the second image according to the target image optimization parameters to obtain the target image.
[0072] In the embodiments of the present invention, the content of obtaining the target image is as described above. In this way, as long as the server returns the first imaging optimization function and the first image optimization function, the optimization parameters for shooting and obtaining images can be generated by using the first imaging optimization function, and the optimization parameters for image processing can be generated by using the first imaging optimization function, which can reduce the occupancy rate of the processing resources of the terminal device, thereby improving the efficiency of processing images. Moreover, by combining the standard parameter information with better imaging effects stored on the server, the processing effect of the images can be improved, so that the imaging effect of the captured images can be independent of the size of a single pixel of the photosensitive element of the terminal device, thus realizing the improvement of the imaging quality.
[0073] Optionally, in the embodiments of the present invention, the element information may include the preview parameter information of the target scene and the identifier of the target scene, the image optimization information may include the target standard parameter information and the second imaging optimization function, the target standard parameter information may be determined from the standard parameter information according to the identifier, and the second imaging optimization function may be generated based on the preview parameter information of the same target scene and the target standard parameter information. Specifically, the target image can be obtained through the following sub-steps S1 - S6:
[0074] Sub-step S1: Generate the first imaging optimization parameters according to the second imaging optimization function.
[0075] In the embodiments of the present invention, since the second imaging optimization function is generated based on the preview parameter information of the same target scene and the target standard parameter information, and the preview parameter information represents the parameters corresponding to the current imaging quality of the terminal device, and the target standard parameter information represents the parameters corresponding to a higher imaging quality of the same target scene, the second imaging optimization function can quantify the difference between the current imaging of the terminal device and the higher imaging quality. It should be noted that the second imaging optimization function can be generated for some target scenes. For example, for target scenes such as girl, dog, and arch bridge, the second imaging optimization function can be generated for the scene element "girl", that is, f(girl) = {gender, system, age, facial features,...}.
[0076] In the embodiments of the present invention, generating the first imaging optimization parameters according to the second imaging optimization function, using the first imaging optimization parameters as shooting parameters, and performing shooting to obtain an intermediate image may be generating the first imaging optimization parameters by using the second imaging optimization function for some target scenes, and the terminal device adjusts the shooting parameters to the first imaging optimization parameters for shooting to obtain an intermediate image.
[0077] Sub-step S2: Use the first imaging optimization parameters as shooting parameters and perform shooting to obtain an intermediate image.
[0078] In the embodiments of the present invention, since the intermediate image is generated according to the optimization function corresponding to a part of the target scene, and the target standard parameter information is the parameter information corresponding to a higher imaging quality for each target scene, generating a first image comprehensive optimization function according to the target standard parameter information and the intermediate image can enable the obtained first image comprehensive optimization function to more accurately adjust the parameters, so that the imaging quality of the image obtained by the terminal device can be close to the higher imaging quality. Generating the target imaging optimization parameters and the target image optimization parameters respectively by using the first image comprehensive optimization function, and then obtaining the target image is as described above.
[0079] Sub-step S3: Generate a first image comprehensive optimization function according to the target standard parameter information and the intermediate image.
[0080] Sub-step S4: Determine the target imaging optimization parameters according to the first image comprehensive optimization function, and determine the target image optimization parameters according to the first image comprehensive optimization function.
[0081] Sub-step S5: Use the target imaging optimization parameters as shooting parameters, and perform shooting to obtain a third image.
[0082] Sub-step S6: Adjust the third image according to the target image optimization parameters to obtain the target image.
[0083] In the embodiments of the present invention, by first using the parameter information of the high imaging quality corresponding to a part of the target scene to generate the imaging optimization parameters, and using the imaging optimization parameters to shoot to obtain an image, and then combining the parameter information of the high imaging quality of all target scenes for secondary optimization calculation to obtain the final imaging parameters and image parameters. In this way, not only can the occupancy rate of the processing resources of the terminal device be reduced, but also through the secondary optimization calculation, the processing effect of the parameters on the image can be improved, so that the imaging quality of the shot image can not only improve the pixel number, but also improve the size of a single pixel.
[0084] Optionally, in the embodiments of the present invention, the element information may include the preview parameter information of the target scene and the identifier of the target scene, the image optimization information may include the second image comprehensive optimization function and the target standard parameter information of each target scene, the target standard parameter information may be determined from the standard parameter information according to the identifier, the target scene may include the first target scene and the second target scene, and the second image comprehensive optimization function may be determined based on the preview parameter information of the first target scene. Specifically, the target image can be obtained through the following sub-steps P1 - sub-step P5:
[0085] Sub-step P1: Generate a third image comprehensive optimization function according to the preview parameter information of the second target scene.
[0086] In the embodiment of the present invention, since the target scene is divided into a first target scene and a second target scene, and the first target scene and the second target scene are used to generate an image comprehensive optimization function, an optimization function can be obtained for different scene elements in the image, and a parameter information that can ensure the imaging quality of each scene element is determined. According to the preview parameter information of the second target scene, a third image comprehensive optimization function is generated, which can be to model the preview parameter information corresponding to the second target scene to obtain the third image comprehensive optimization function. For example, the second target scene is a building and a person, and the preview parameter information corresponding to the second target scene is f(y1)=f(f(weather); a1), f(y2)=f(f(iron tower); a2), then the generated third image comprehensive optimization function can be F(z)={f(y1), f(y2)}={[f(weather); a1], [f(building); a2]}.
[0087] Sub-step P2: generating a fourth image comprehensive optimization function according to the second image comprehensive optimization function, the third image comprehensive optimization function and the target standard parameter information of each target scene.
[0088] In the embodiment of the present invention, a fourth image comprehensive optimization function is generated according to the second image comprehensive optimization function, the third image comprehensive optimization function and the target standard parameter information of each target scene. For example, the second image comprehensive optimization function is F(z)={f(y3),f(y4)}={[f(people); a3],[f(grass); a4]}, the third image comprehensive optimization function is F(z)={f(y1),f(y2)}={[f(weather); a1],[f(building); a2]}, and the target standard parameter information of each target scene is F(b)={[f(weather); b1],[f(building); b2],[f(people); b3],[f(grass and trees); b4]}, then the generated fourth image comprehensive optimization function can be F(z)={f(y1),f(y2),f(y3),f(y4)}={[f(weather); a1],[f(building); a2],[f(people); a3],[f(grass and trees); a4],[f(weather); b1],[f(building); b2],[f(people); b3],[f(grass and trees); b4]}.
[0089] Sub-step P3: determining target imaging optimization parameters according to the fourth image comprehensive optimization function, and determining target image optimization parameters according to the fourth image comprehensive optimization function.
[0090] In the embodiment of the present invention, the operations of respectively generating target imaging optimization parameters and target image optimization parameters using the fourth image comprehensive optimization function and then acquiring the target image are as described above.
[0091] Sub-step P4: Use the target imaging optimization parameters as shooting parameters and perform shooting to obtain a fourth image.
[0092] Specifically, the implementation manner of this step can refer to the foregoing steps, and the embodiments of the present invention do not limit this.
[0093] Sub-step P5: Adjust the fourth image according to the target image optimization parameters to obtain the target image.
[0094] In the embodiments of the present invention, when the processing resources on the terminal device are relatively abundant, the terminal device can also perform modeling to generate a comprehensive optimization function, and combine the comprehensive optimization function returned by the server to determine the final imaging parameters and image parameters for guiding shooting, which can not only improve the efficiency of image processing, but also not be limited to the single pixel size of the photosensitive element of the terminal device, making the obtained target image closer to the stored high-quality imaging image.
[0095] Optionally, in the embodiments of the present invention, the element information may include the identifier of the target scene, and the image optimization information may further include the standard relevant parameters of the target scene determined according to the identifier. Before the step of obtaining the target image optimized by the image according to the image optimization information, the following steps may further be included:
[0096] For any one of the target scenes, adjust the original relevant parameters of the scene area corresponding to the target scene in the preview image to the standard relevant parameters of the target scene.
[0097] In the embodiments of the present invention, the standard relevant parameters may be the pixel values of the high-quality imaging images stored in the server, and the original relevant parameters may be the pixel values in the preview images collected by the terminal device. For any target scene, adjusting the original relevant parameters of the scene area corresponding to the target scene in the preview image to the standard relevant parameters of the target scene may be to replace the pixel values of each pixel in the scene area corresponding to the target scene in the preview image with the pixel values of the standard relevant parameters of the target scene. For example, if the original relevant parameters of target scene 1 in the preview image are pixel value A and the standard relevant parameters of target scene 1 are pixel value B, it may be to replace pixel value A of target scene 1 with pixel value B.
[0098] In the embodiments of the present invention, by replacing the scene area of the target scene with the pixels of the same target scene with higher imaging quality, it is not limited to the size of a single pixel obtained by the photosensitive element of the terminal device, and the number and size of the pixels in the target image can be increased, thereby improving the imaging quality of the target image.
[0099] In summary, for the image processing method provided in the embodiments of the present invention, the element information of the target scene in the preview image is first obtained, and then the element information is sent to the server. Standard parameter information corresponding to different scene elements is pre-stored in the server. The image optimization information returned by the server is received. The image optimization information is determined by the server according to the element information and the standard parameter information. According to the standard relevant parameters of each target scene, the scene areas corresponding to each target scene in the preview image are adjusted. Finally, according to the image optimization information, the target image after image optimization is obtained. In this way, by obtaining the standard parameter information of high-quality images stored on the server and performing image optimization based on the image optimization information determined based on these standard parameter information, the effect of image optimization processing can be improved to a certain extent. Moreover, the terminal device only needs to perform image optimization according to the received image optimization information. Therefore, the workload of the terminal device can be reduced to a certain extent, thereby improving the processing efficiency. Further, by replacing the scene area of the target scene with pixels of the same target scene with higher imaging quality, it is not limited to the size of a single pixel obtained by the photosensitive element of the terminal device, and the number and size of pixels in the target image can be increased, thereby improving the imaging quality of the target image.
[0100] Figure 2 It is a flowchart of steps of another image processing method provided in the embodiments of the present application, which is applied to a server, as Figure 2 shown. This method may include:
[0101] Step 201, receive the element information of the target scene sent by the terminal device.
[0102] It should be noted that the terminal device may also send a label to mark the information content that needs to be returned by the server. For example, if the label sent by the terminal device is "imaging optimization parameters and image optimization parameters", the server needs to generate "imaging optimization parameters and image optimization parameters" and return them to the terminal device; if the label sent by the terminal device is "image optimization function and imaging optimization function", the server needs to generate "image optimization function and imaging optimization function" and return them to the terminal device.
[0103] Step 202, determine the image optimization information according to the element information and the standard parameter information; the standard parameter information is the information corresponding to different scene elements pre-stored.
[0104] In the embodiments of the present invention, since the element information may be the preview parameter information of the terminal device when shooting the target scene, and the standard parameter information is the parameter information of the target scene with higher imaging quality, corresponding image optimization information can be generated according to the needs of the terminal device.
[0105] Step 203, return the image optimization information to the terminal device.
[0106] For example, if the image optimization information is "image optimization function and imaging optimization function", then "image optimization function and imaging optimization function" can be returned to the terminal device. If the image optimization information is "imaging optimization parameter and image optimization parameter", then "imaging optimization parameter and image optimization parameter" can be returned to the terminal device.
[0107] In summary, the image processing method provided by the embodiments of the present invention first receives the element information of the target scene sent by the terminal device, determines the image optimization information according to the element information and the standard parameter information, where the standard parameter information is the information corresponding to different scene elements stored in advance. Finally, the image optimization information is returned to the terminal device. By storing scene elements with higher imaging quality on the server, it can be used as optimization materials when the terminal device captures scene elements, thereby improving the imaging quality of the images captured by the terminal device. Moreover, it can also be used as a supplement to the processing resources of the terminal device to further improve the efficiency of image processing.
[0108] Optionally, in the embodiments of the present invention, the scene element information may include the preview parameter information of the target scene and the identifier of the target scene. Step 202 may include:
[0109] Search in the standard parameter information according to the identifier to determine the target standard parameter information corresponding to the target scene; generate a fifth image comprehensive optimization function according to the preview parameter information and the target standard parameter information; determine the image optimization information according to the fifth image comprehensive optimization function.
[0110] In the embodiments of the present invention, searching in the standard parameter information according to the identifier to determine the target standard parameter information corresponding to the target scene may be to search in the names recorded in the standard parameter information according to the name of the target scene, and determine the standard parameter information with the same name as the target scene as the target standard parameter information. For example, if the name of the target scene is "Arch Bridge 1", then search in the standard parameter information for the standard parameter information corresponding to the name of the scene element "Arch Bridge 1", and use the standard parameter information corresponding to "Arch Bridge 1" as the target standard parameter information.
[0111] In an embodiment of the present invention, according to preview parameter information and target standard parameter information, a fifth image comprehensive optimization function is generated. For example, if the preview parameter information is F(z) = {[f(plants); a1], [f(buildings); a2], [f(people); a3]}, and the target standard parameter information F(c) = {[f(plants); c1], [f(buildings); c2]}, then the fifth image comprehensive optimization function can be obtained as F(z) = {[f(plants); a1], [f(buildings); a2], [f(people); a3], [f(plants); c1], [f(buildings); c2]}. According to the fifth image comprehensive optimization function, image optimization information is determined, which can be information required by the terminal device generated based on the fifth image comprehensive optimization function as the image optimization information.
[0112] In an embodiment of the present invention, by identifying the same scene elements with high imaging quality stored on the server, an image comprehensive optimization function is generated. In this way, the terminal device is not limited by the hardware limitations of the shooting device, and the captured image can be optimized according to an image with higher imaging quality, thereby improving the imaging quality of the target image.
[0113] Optionally, in an embodiment of the present invention, the image optimization information may include target imaging optimization parameters and target image optimization parameters. The step of determining the image optimization information according to the fifth image comprehensive optimization function may include:
[0114] Generating the target imaging optimization parameters according to the fifth image comprehensive optimization function, and generating the target image optimization parameters according to the fifth image comprehensive optimization function; using the target imaging optimization parameters and the target image optimization parameters as the image optimization information.
[0115] In the embodiments of the present invention, target imaging optimization parameters are generated according to the fifth image comprehensive optimization function. For example, when the target imaging optimization parameter is the exposure time, since the fifth image comprehensive optimization function determines the imaging quality based on different parameter variables, the value corresponding to the shooting parameter in the fifth image comprehensive optimization function can be determined by selecting the situation with the best imaging quality in the fifth image comprehensive optimization function, and the exposure time corresponding to the shooting parameter value can be determined according to the preset correspondence table, and this exposure time is used as the target imaging optimization parameter. According to the fifth image comprehensive optimization function, target image optimization parameters are generated. For example, when the target image optimization parameter is the resolution, since the fifth image comprehensive optimization function determines the image quality based on different parameter variables, the value corresponding to the shooting parameter in the fifth image comprehensive optimization function can be determined by selecting the situation with the best imaging quality in the fifth image comprehensive optimization function, and the resolution corresponding to the shooting parameter value can be determined according to the preset correspondence table, and this resolution is used as the target imaging optimization parameter. By connecting the server and the terminal device together, the problem of long processing speed and low efficiency of previous image processing caused by limited processing resources of the terminal device can be avoided, and the imaging effect of the image can be obtained, which can not be limited to the size of a single pixel of the photosensitive element of the terminal device, thereby realizing the improvement of imaging quality.
[0116] Optionally, in the embodiments of the present invention, the image optimization information may include a third imaging optimization function and a second image optimization function. The step of determining the image optimization information according to the fifth image comprehensive optimization function may include:
[0117] Generating the third imaging optimization function according to the fifth image comprehensive optimization function, and generating the second image optimization function according to the fifth image comprehensive optimization function; using the third imaging optimization function and the second image optimization function as the image optimization information.
[0118] In the embodiments of the present invention, generating the third imaging optimization function according to the fifth image comprehensive optimization function may be to select the parameters that will affect imaging in the fifth image comprehensive optimization function, such as the exposure time, contrast, etc., and obtain the corresponding imaging optimization function under the condition of the best imaging quality indicated by the fifth image comprehensive optimization function. Generating the second image optimization function according to the fifth image comprehensive optimization function may be to select the parameters during image display, such as the resolution, sensitivity, etc., and obtain the corresponding image optimization function under the condition of the best imaging quality indicated by the fifth image comprehensive optimization function.
[0119] In the embodiments of the present invention, by separately obtaining an imaging optimization function and an image optimization function, it is convenient for a terminal device to select optimal shooting parameters according to the imaging optimization function during shooting, and to select optimal display parameters according to the image optimization function when performing image optimization processing, avoiding the situation where image processing operations cannot be executed due to limited processing resources of the terminal device itself, thereby improving the efficiency of image processing.
[0120] Optionally, in the embodiments of the present invention, the image optimization information may include a fifth image comprehensive optimization function and target standard parameter information for each target scene. The step of determining the image optimization information according to the fifth image comprehensive optimization function may include:
[0121] Regarding the fifth image comprehensive optimization function and the target standard parameter information for each target scene as the image optimization information.
[0122] In the embodiments of the present invention, when the processing resources of the terminal device are relatively sufficient, the server only needs to provide the target standard parameter information for each target scene and the fifth image comprehensive optimization function. Therefore, the server can provide more storage resources for the terminal device, and can flexibly return image optimization information according to the processing capacity of the terminal device, thereby improving the efficiency of image processing.
[0123] Optionally, in the embodiments of the present invention, standard related parameters corresponding to different scene elements may be stored in the server, and the image optimization information may further include standard related parameters of the target scene. The method may further include:
[0124] Obtaining the standard related parameters corresponding to the target scene according to the identifier.
[0125] In the embodiments of the present invention, when the identifier is the name of a scene element, it may be to search in the server for standard related parameters with the same name and identifier as the scene element. By determining the standard related parameters corresponding to the target scene, it is convenient for subsequent extraction and replacement of the standard related parameters to avoid problems of incorrect operations.
[0126] In summary, for the image processing method provided by the embodiments of the present invention, the element information of the target scene sent by the terminal device is first received, the target standard parameter information corresponding to the target scene is determined by looking up according to the identifier in the standard parameter information, a fifth image comprehensive optimization function is generated according to the preview parameter information and the target standard parameter information, and the image optimization information is determined according to the fifth image comprehensive optimization function, where the standard parameter information is the information corresponding to different scene elements stored in advance. Finally, the image optimization information is returned to the terminal device. By storing scene elements with higher imaging quality on the server, it can be used as optimization material when the terminal device captures scene elements, thereby improving the imaging quality of the images captured by the terminal device. Moreover, it can also be used as a supplement to the processing resources of the terminal device, further improving the efficiency of image processing. Additionally, it enables the terminal device to be not limited by the hardware limitations of the shooting device and can optimize the captured images according to images with higher imaging quality, thus improving the imaging quality of the target images.
[0127] Figure 3 is a flowchart of steps of another image processing method provided by an embodiment of the present application. This method can be applied to a system including a terminal device and a server, such as Figure 3 shown. This method may include:
[0128] Step 301: The terminal device obtains the element information of the target scene in the preview image.
[0129] Step 302: The terminal device sends the element information to the server; different scene element - corresponding standard parameter information is pre - stored in the server.
[0130] Step 303: The server receives the element information of the target scene sent by the terminal device.
[0131] Step 304: The server determines the image optimization information according to the element information and the standard parameter information; the standard parameter information is the information corresponding to different scene elements stored in advance.
[0132] Step 305: The server returns the image optimization information to the terminal device.
[0133] Step 306: The terminal device receives the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information.
[0134] Step 307: The terminal device obtains the target image optimized according to the image optimization information.
[0135] Optionally, an implementation manner of the present invention is as follows: The terminal device recognizes scene elements in the viewfinder preview window and extracts the element information corresponding to N target scenes. The target scenes may include buildings, animals, people, landscapes, plants, etc. The element information may be sunny, rainy, snowy, cloudy, night, etc. for the weather, hue, style, shape, size, etc. for the buildings, season, mountains and waters, greenlands, rural areas, etc. for the landscapes, gender, body type, age, facial features, etc. for the people, color, size, species, gregariousness, etc. for the animals, flowers, trees, grasslands, colors, etc. for the plants. The terminal device sends the element information corresponding to the N target scenes to the server. The server matches the N target scenes with the stored scene element information of high imaging quality. The server generates a comprehensive optimization function F(z) = F(X,A) according to the matching results of the N target scenes and the element information. Finally, the target imaging optimization parameters and the target image optimization parameters are generated according to the comprehensive optimization function and returned to the terminal device. The terminal device receives the target imaging optimization parameters and the target image optimization parameters, uses the target imaging optimization parameters as the shooting parameters to take a picture, and performs image processing according to the target image optimization parameters to obtain the target image.
[0136] Exemplarily, the target scene of the preview image obtained by the terminal device includes an iron tower on a rainy day. Due to the limitation of the shooting device of the terminal device, the imaging quality of the image is poor, and the lines of the iron tower may be relatively blurred, resulting in unclear identification. In the embodiment of the present invention, the standard image corresponding to the target scene of the iron tower is found in the server. The standard image may be an image of the iron tower with high imaging quality, and the details of the iron tower in the standard image are retained completely and the lines are clear. Further, the terminal device can optimize the preview image on the terminal device according to the standard image in the server to obtain the target image, which can effectively improve the imaging quality of the preview image, make the iron tower display more clearly, and thus improve the display effect of the image.
[0137] Specifically, when the terminal device extracts two scene elements of rainy day (weather) and iron tower (building) during viewfinder preview, that is, f(weather) = rainy day; f(building) = iron tower; it can send a request to the server and quickly find the scene data of the iron tower on a rainy day from the server side, complete data matching and comparison, and determine the relationship function f(y) = {pixels, contrast, exposure, pixel size,...} with the scene image stored in the server. The matched scene data: f(y1) = f(f(weather); a1); f(y2) = f(f(iron tower); a2), and a comprehensive optimization function is obtained, that is, F(z) = {(f(x1); a1), (f(x2); a2)}. Since the iron tower on a rainy day on the server side is high-quality image data under big data statistics, through data comparison, optimization data can be provided for the current shooting scene.
[0138] Optionally, another implementation of the present invention is as follows: When the terminal device is in viewfinder preview, it analyzes and calculates the image input to the central processing unit through the digital signal processing chip, and then extracts elements from the preview image information through scene recognition to obtain N target scenes. The terminal device sends the element information corresponding to the N target scenes it extracts to the server. The server determines the standard parameter information corresponding to different scene elements according to the matching results of the N target scenes and the content of the large database, and establishes N relationship functions. By using the analysis and calculation ability of the server, it realizes scene restoration and eliminates the problem of scene distortion caused by factors such as the device's own configuration. The server feeds back the standard parameter information corresponding to different scene elements to the terminal device. The terminal device replaces some of the target scenes according to the standard parameter information, and generates a comprehensive optimization function according to the preview parameter information corresponding to another part of the target scenes. The terminal device combines the replaced standard parameter information and the comprehensive optimization function to generate target imaging optimization parameters and target image optimization parameters, and uses the target imaging optimization parameters as shooting parameters to take pictures, and performs image processing according to the target image optimization parameters to obtain the target image.
[0139] Optionally, yet another implementation of the present invention is as follows: When the terminal device is in viewfinder preview, it analyzes and calculates the image input to the central processing unit through the digital signal processing chip, and then extracts elements from the preview image information through scene recognition to obtain N target scenes, where the target scenes include target scene 1 and target scene 2. The terminal device sends the element information corresponding to the N target scenes it extracts to the server. The server determines the standard parameter information corresponding to different scene elements according to the matching results of the N target scenes and the content of the large database, and establishes N relationship functions. The server generates a comprehensive optimization function 1 according to the preview parameter information of target scene 1, and returns the comprehensive optimization function 1 and the standard parameter information corresponding to different scene elements to the terminal device. The terminal device takes a picture according to the comprehensive optimization function 1 to obtain an intermediate image, and generates a comprehensive optimization function 2 for the intermediate image and the standard parameter information, generates target imaging optimization parameters and target image optimization parameters, and uses the target imaging optimization parameters as shooting parameters to take pictures, and performs image processing according to the target image optimization parameters to obtain the target image. The terminal device simultaneously replaces the scene area of target scene 2 with the corresponding standard parameter information.
[0140] Optionally, another implementation of the present invention is as follows: When the terminal device is in the viewfinder preview, it analyzes and calculates the image input to the central processing unit by the digital signal processing chip, and then extracts elements from the preview image information through scene recognition to obtain N target scenes, where the target scenes include target scene 3, target scene 4, and target scene 5. The terminal device sends the element information corresponding to the N target scenes it extracts to the server. The server determines the standard parameter information corresponding to different scene elements according to the matching results of the N target scenes and the content of the large database, and generates the comprehensive optimization function 3 according to the preview parameter information of target scene 3. The server returns the comprehensive optimization function 3 and the standard parameter information corresponding to different scene elements to the terminal device. The terminal device generates the comprehensive optimization function 4 according to the preview parameter information of target scene 4. The terminal device generates the target imaging optimization parameter and the target image optimization parameter according to the comprehensive optimization function 3 and the comprehensive optimization function 4, and uses the target imaging optimization parameter as the shooting parameter to take a picture, and performs image processing according to the target image optimization parameter to obtain the target image. The terminal device also replaces the scene area of target scene 5 with the corresponding standard parameter information.
[0141] Exemplarily, Figure 4 is a schematic flowchart provided by an embodiment of the present application. As Figure 4 shown, the photographic system device obtains a preview image by networking during viewfinding. Specifically, in the photographic system device, the sensor 03 can obtain the scene SEC01 through the lens 02 to obtain the preview image, and then transmit the preview image to the DSP04 for processing. Then, the DSP04 transmits the image to the CPU05, stores it in 06, and sends it to the server through the 5G network 07. In the server, it searches in the database 11 through supercomputing 08 to determine the standard image corresponding to the same target scene, and determines the modeling scheme 10 according to the standard image, where the standard image is collected by the collector 09 and stored in the database 11 by the server. Through the high-speed bandwidth capability of the 5G network, the extracted scene elements are transmitted to the server for big data analysis and restoration of the optimal scene while the device is taking pictures, and the restored data is provided to the camera, thereby realizing shooting optimization. The server includes a scene database based on big data, with data analysis capabilities, modeling capabilities, and the ability to self-expand the database, changing the pattern of the photographic system.
[0142] It should be noted that for the image processing method provided by the embodiment of the present application, the execution subject can be an image processing method device, or a control module in the image processing method device for executing the image processing method. In the embodiment of the present application, the image processing method device is used as an example to execute the image processing method to illustrate the image processing method device provided by the embodiment of the present application.
[0143] Figure 5The block diagram of an image processing apparatus provided by an embodiment of this application is applicable to a terminal device, such as Figure 5 As shown, the image processing apparatus 40 may include:
[0144] A first acquisition module 401, configured to acquire element information of a target scene in a preview image;
[0145] A sending module 402, configured to send the element information to a server; standard parameter information corresponding to different scene elements is pre-stored in the server;
[0146] A receiving module 403, configured to receive image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information;
[0147] A second acquisition module 404, configured to acquire a target image optimized by an image according to the image optimization information.
[0148] In summary, for the image processing apparatus provided by an embodiment of the present invention, it first acquires the element information of the target scene in the preview image, then sends the element information to the server, where standard parameter information corresponding to different scene elements is pre-stored. It receives the image optimization information returned by the server, and the image optimization information is determined by the server according to the element information and the standard parameter information. Finally, according to the image optimization information, it acquires the target image optimized by the image. In this way, by acquiring the standard parameter information of high-quality images stored on the server and performing image optimization based on the image optimization information determined by these standard parameter information, the effect of optimizing the image can be improved to a certain extent. Moreover, the terminal device only needs to perform image optimization according to the received image optimization information. Therefore, the workload of the terminal device can be reduced to a certain extent, thereby improving the processing efficiency.
[0149] Optionally, the image optimization information includes a target imaging optimization parameter and a target image optimization parameter;
[0150] The second acquisition module 404 is further configured to:
[0151] Use the target imaging optimization parameter as a shooting parameter and perform shooting to obtain a first image;
[0152] Adjust the first image according to the target image optimization parameter to obtain the target image.
[0153] Optionally, the element information includes the identifier of the target scenario; the image optimization information is generated according to the target standard parameter information corresponding to the target scenario, and the target standard parameter information is determined from the standard parameter information according to the identifier; the image optimization information includes a first image optimization function and a first imaging optimization function;
[0154] The second acquisition module 404 is further configured to:
[0155] Generate target image optimization parameters according to the first image optimization function, and generate target imaging optimization parameters according to the first imaging optimization function;
[0156] Use the target imaging optimization parameters as shooting parameters, and perform shooting to obtain a second image;
[0157] Adjust the second image according to the target image optimization parameters to obtain the target image.
[0158] Optionally, the element information includes the preview parameter information of the target scenario and the identifier of the target scenario; the image optimization information includes the target standard parameter information and a second imaging optimization function; the target standard parameter information is determined from the standard parameter information according to the identifier; the second imaging optimization function is generated based on the preview parameter information and the target standard parameter information of the same target scenario;
[0159] The second acquisition module 404 is further configured to:
[0160] Generate first imaging optimization parameters according to the second imaging optimization function;
[0161] Use the first imaging optimization parameters as shooting parameters, and perform shooting to obtain an intermediate image;
[0162] Generate a first image comprehensive optimization function according to the target standard parameter information and the intermediate image;
[0163] Determine target imaging optimization parameters according to the first image comprehensive optimization function, and determine target image optimization parameters according to the first image comprehensive optimization function;
[0164] Use the target imaging optimization parameters as shooting parameters, and perform shooting to obtain a third image;
[0165] Adjust the third image according to the target image optimization parameters to obtain the target image.
[0166] Optionally, the element information includes preview parameter information of the target scene and an identifier of the target scene; the image optimization information includes a second image comprehensive optimization function and target standard parameter information of each target scene; the target standard parameter information is determined from the standard parameter information according to the identifier; the target scene includes a first target scene and a second target scene; the second image comprehensive optimization function is determined based on the preview parameter information of the first target scene;
[0167] The second acquisition module 404 is further configured to:
[0168] Generate a third image comprehensive optimization function according to the preview parameter information of the second target scene;
[0169] Generate a fourth image comprehensive optimization function according to the second image comprehensive optimization function, the third image comprehensive optimization function, and the target standard parameter information of each target scene;
[0170] Determine target imaging optimization parameters according to the fourth image comprehensive optimization function, and determine target image optimization parameters according to the fourth image comprehensive optimization function;
[0171] Use the target imaging optimization parameters as shooting parameters, and perform shooting to obtain a fourth image;
[0172] Adjust the fourth image according to the target image optimization parameters to obtain the target image.
[0173] Optionally, the element information includes an identifier of the target scene; the image optimization information further includes standard related parameters of the target scene determined according to the identifier;
[0174] The apparatus 40 further includes:
[0175] An adjustment module, configured to, for any one of the target scenes, adjust the original related parameters of the scene area corresponding to the target scene in the preview image to the standard related parameters of the target scene.
[0176] In summary, the image processing device provided by the embodiments of the present invention first obtains the element information of the target scene in the preview image, and then sends the element information to the server. Standard parameter information corresponding to different scene elements is pre-stored in the server. The image optimization information returned by the server is determined by the server according to the element information and the standard parameter information. According to the standard relevant parameters of each target scene, the scene areas corresponding to each target scene in the preview image are adjusted. Finally, according to the image optimization information, the target image after image optimization is obtained. In this way, by obtaining the standard parameter information of high-quality images stored on the server and performing image optimization based on the image optimization information determined by these standard parameter information, the effect of image optimization processing can be improved to a certain extent. Moreover, the terminal device only needs to perform image optimization according to the received image optimization information. Therefore, the workload of the terminal device can be reduced to a certain extent, thereby improving the processing efficiency. Further, by replacing the scene area of the target scene with pixels of the same target scene with higher imaging quality, it is not limited to the size of a single pixel obtained by the photosensitive element of the terminal device, and the number and size of pixels in the target image can be increased, thereby improving the imaging quality of the target image.
[0177] Figure 6 The block diagram of an image processing device provided by an embodiment of the present application is also applicable to a server, as Figure 6 shown. The image processing device 50 may include:
[0178] A receiving module 501, configured to receive the element information of the target scene sent by the terminal device;
[0179] A determining module 502, configured to determine image optimization information according to the element information and standard parameter information; the standard parameter information is information corresponding to different scene elements pre-stored;
[0180] A returning module 503, configured to return the image optimization information to the terminal device.
[0181] In summary, the image processing device provided by the embodiments of the present invention first receives the element information of the target scene sent by the terminal device, determines image optimization information according to the element information and standard parameter information, where the standard parameter information is information corresponding to different scene elements pre-stored, and finally returns the image optimization information to the terminal device. By storing scene elements with higher imaging quality on the server, it can be used as optimization material when the terminal device shoots scene elements, thereby improving the imaging quality of the images shot by the terminal device. Moreover, it can also be used as a supplement to the processing resources of the terminal device to further improve the efficiency of image processing.
[0182] Optionally, the scene element information includes preview parameter information of the target scene and an identifier of the target scene;
[0183] The determining module 502 is further configured to:
[0184] Search in the standard parameter information according to the identifier to determine target standard parameter information corresponding to the target scene;
[0185] Generate a fifth image comprehensive optimization function according to the preview parameter information and the target standard parameter information;
[0186] Determine the image optimization information according to the fifth image comprehensive optimization function.
[0187] Optionally, the image optimization information includes target imaging optimization parameters and target image optimization parameters;
[0188] The determining module 502 is further configured to:
[0189] Generate the target imaging optimization parameters according to the fifth image comprehensive optimization function, and generate the target image optimization parameters according to the fifth image comprehensive optimization function;
[0190] Use the target imaging optimization parameters and the target image optimization parameters as the image optimization information.
[0191] Optionally, the image optimization information includes a third imaging optimization function and a second image optimization function;
[0192] The determining module 502 is further configured to:
[0193] Generate the third imaging optimization function according to the fifth image comprehensive optimization function, and generate the second image optimization function according to the fifth image comprehensive optimization function;
[0194] Use the third imaging optimization function and the second image optimization function as the image optimization information.
[0195] Optionally, the image optimization information includes the fifth image comprehensive optimization function and the target standard parameter information of each target scene;
[0196] The determining module 502 is further configured to:
[0197] Use the fifth image comprehensive optimization function and the target standard parameter information of each target scene as the image optimization information.
[0198] Optionally, standard related parameters corresponding to different scenario elements are stored in the server; the image optimization information further includes the standard related parameters of the target scenario;
[0199] The apparatus 50 further includes:
[0200] A third obtaining module, configured to obtain the standard related parameters corresponding to the target scenario according to the identifier.
[0201] In summary, the image processing apparatus provided in the embodiment of the present invention first receives the element information of the target scenario sent by the terminal device, searches in the standard parameter information according to the identifier to determine the target standard parameter information corresponding to the target scenario, generates a fifth image comprehensive optimization function according to the preview parameter information and the target standard parameter information, determines the image optimization information according to the fifth image comprehensive optimization function, where the standard parameter information is the information corresponding to different scenario elements stored in advance, and finally, returns the image optimization information to the terminal device. By storing scenario elements with higher imaging quality on the server, it can be used as an optimization material when the terminal device captures scenario elements, thereby improving the imaging quality of the images captured by the terminal device. Moreover, it can also be used as a supplement to the processing resources of the terminal device to further improve the efficiency of image processing. Additionally, it enables the terminal device to be not limited by the hardware limitations of the capturing device and can optimize the captured images according to images with higher imaging quality, thus improving the imaging quality of the target images.
[0202] The image processing in the embodiments of the present application device can be a device, or a component, an integrated circuit, or a chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0203] The image processing apparatus in the embodiments of the present application can be a device with an operating system. The operating system can be the Android operating system, the iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0204] The image processing apparatus provided by the embodiments of the present application can implement Figures 1 to 7 each process of the image processing method embodiments. To avoid repetition, it will not be elaborated here.
[0205] Optionally, the embodiments of the present application further provide an electronic device 1000, including a processor 1001, a memory 1002, a program or instruction stored on the memory 1002 and executable on the processor 1001. When the program or instruction is executed by the processor 1001, it implements each process of the above-mentioned image processing method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0206] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0207] Figure 7 It is a schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.
[0208] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc.
[0209] Those skilled in the art can understand that the electronic device 1000 may further include a power source (such as a battery) for supplying power to each component. The power source can be logically connected to the processor 1010 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 7 The structure of the electronic device shown in does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0210] Among them, the processor 1010 is used to obtain the element information of the target scene in the preview image; send the element information to the server; different standard parameter information corresponding to scene elements is pre-stored in the server; receive the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information; obtain the target image with optimized image according to the image optimization information.
[0211] A processor 1010 for receiving element information of a target scene sent by a terminal device; determining image optimization information according to the element information and standard parameter information, where the standard parameter information is information corresponding to different scene elements stored in advance; and returning the image optimization information to the terminal device.
[0212] In summary, for the image processing method provided in the embodiment of the present invention, the element information of the target scene in the preview image is first obtained, and then the element information is sent to the server. The server stores in advance standard parameter information corresponding to different scene elements, and receives the image optimization information returned by the server. The image optimization information is determined by the server according to the element information and the standard parameter information. Finally, according to the image optimization information, the target image after image optimization is obtained. In this way, by obtaining the standard parameter information of high-quality images stored on the server and performing image optimization based on the image optimization information determined by these standard parameter information, the effect of image optimization processing can be improved to a certain extent. Moreover, the terminal device only needs to perform image optimization according to the received image optimization information. Therefore, the workload of the terminal device can be reduced to a certain extent, thereby improving the processing efficiency.
[0213] It should be understood that in the embodiment of the present application, the input unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042. The graphics processor 10041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. The other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here. The memory 1009 may be used to store software programs and various data, including but not limited to application programs and operating systems. The processor 1010 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1010.
[0214] An embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the image processing method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.
[0215] Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0216] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run a program or instruction to implement each process of the above-mentioned embodiment of the image processing method, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.
[0217] It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-on-chip, a system chip, a chip system, or a system-on-chip, etc.
[0218] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0219] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0220] The embodiments of the present application have been described above with reference to the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. An image processing method, characterized in that, Applied to a terminal device, the method includes: Obtain the element information of the target scene in the preview image; Send the element information to the server; different standard parameter information corresponding to scene elements is pre-stored in the server; Receive the image optimization information returned by the server; the image optimization information is determined by the server according to the element information and the standard parameter information; Obtain a target image with optimized image according to the image optimization information; The element information includes the preview parameter information of the target scene and the identifier of the target scene; the image optimization information includes a second image comprehensive optimization function and the target standard parameter information of each target scene; the target standard parameter information is determined from the standard parameter information according to the identifier; the target scene includes a first target scene and a second target scene; the second image comprehensive optimization function is determined based on the preview parameter information of the first target scene; The obtaining a target image with optimized image according to the image optimization information includes: Generate a third image comprehensive optimization function according to the preview parameter information of the second target scene; Generate a fourth image comprehensive optimization function according to the second image comprehensive optimization function, the third image comprehensive optimization function, and the target standard parameter information of each target scene; Determine the target imaging optimization parameters according to the fourth image comprehensive optimization function, and determine the target image optimization parameters according to the fourth image comprehensive optimization function; Use the target imaging optimization parameters as shooting parameters and perform shooting to obtain a fourth image; Adjust the fourth image according to the target image optimization parameters to obtain the target image.
2. The method according to claim 1, wherein The image optimization information further includes the standard related parameters of the target scene determined according to the identifier, and the standard related parameters are the pixel values of high imaging quality images stored in the server; Before the obtaining a target image with optimized image according to the image optimization information, it further includes: For any one of the target scenes, adjust the original related parameters of the scene area corresponding to the target scene in the preview image to the standard related parameters of the target scene.
3. An image processing method, characterized in that, Applied to a server, the method includes: Receive the element information of the target scene sent by the terminal device; Determine the image optimization information according to the element information and the standard parameter information; the standard parameter information is the information corresponding to different scene elements pre-stored; Return the image optimization information to the terminal device; The element information includes the preview parameter information of the target scene and the identifier of the target scene; the image optimization information includes a second image comprehensive optimization function and the target standard parameter information of each target scene; the target standard parameter information is determined from the standard parameter information according to the identifier; the target scene includes a first target scene and a second target scene; the second image comprehensive optimization function is determined based on the preview parameter information of the first target scene; The preview parameter information of the second target scene is used for the terminal device to generate a third image comprehensive optimization function; The second image comprehensive optimization function, the third image comprehensive optimization function, and the target standard parameter information of each target scene are used for the terminal device to generate a fourth image comprehensive optimization function; The fourth image comprehensive optimization function is used for the terminal device to determine target imaging optimization parameters, and the fourth image comprehensive optimization function is used for the terminal device to determine target image optimization parameters; The target imaging optimization parameters are used for the terminal device to take a fourth image; The target image optimization parameters are used for the terminal device to adjust the fourth image to obtain the target image.
4. The method according to claim 3, wherein The server stores standard related parameters corresponding to different scene elements, and the standard related parameters are the pixel values of high imaging quality images stored in the server; The image optimization information further includes the standard related parameters of the target scene; The method further includes: Obtaining the standard related parameters corresponding to the target scene according to the identifier.
5. An image processing apparatus, characterized in that, Applied to a terminal device, the device includes: A first acquisition module, configured to acquire element information of a target scene in a preview image; A sending module, configured to send the element information to a server; The server pre-stores standard parameter information corresponding to different scene elements; A receiving module, configured to receive image optimization information returned by the server; The image optimization information is determined by the server according to the element information and the standard parameter information; A second acquisition module, configured to acquire a target image optimized by an image according to the image optimization information; The element information includes preview parameter information of the target scene and an identifier of the target scene; The image optimization information includes a second image comprehensive optimization function and target standard parameter information of each target scene; The target standard parameter information is determined from the standard parameter information according to the identifier; The target scene includes a first target scene and a second target scene; The second image comprehensive optimization function is determined based on the preview parameter information of the first target scene; The second acquisition module is further configured to: Generate a third image comprehensive optimization function according to the preview parameter information of the second target scene; Generate a fourth image comprehensive optimization function according to the second image comprehensive optimization function, the third image comprehensive optimization function, and the target standard parameter information of each target scene; Determine target imaging optimization parameters according to the fourth image comprehensive optimization function, and determine target image optimization parameters according to the fourth image comprehensive optimization function; Use the target imaging optimization parameters as shooting parameters and take a fourth image; Adjust the fourth image according to the target image optimization parameters to obtain the target image.
6. The device according to claim 5, characterized in that, The image optimization information further includes determining the standard related parameters of the target scene according to the identifier, and the standard related parameters are the pixel values of high imaging quality images stored in the server; The device further includes: An adjustment module, configured to adjust, for any one of the target scenarios, the original relevant parameters of the scene area corresponding to the target scenario in the preview image to the standard relevant parameters of the target scenario.
7. An image processing apparatus, characterized in that, Applied to a server, the device includes: A receiving module, configured to receive the element information of the target scenario sent by the terminal device; A determining module, configured to determine image optimization information according to the element information and the standard parameter information; the standard parameter information is information corresponding to different scene elements stored in advance; A returning module, configured to return the image optimization information to the terminal device; The element information includes the preview parameter information of the target scenario and the identifier of the target scenario; the image optimization information includes the second image comprehensive optimization function and the target standard parameter information of each target scenario; the target standard parameter information is determined from the standard parameter information according to the identifier; the target scenarios include the first target scenario and the second target scenario; the second image comprehensive optimization function is determined based on the preview parameter information of the first target scenario; The preview parameter information of the second target scenario is used for the terminal device to generate the third image comprehensive optimization function; The second image comprehensive optimization function, the third image comprehensive optimization function, and the target standard parameter information of each target scenario are used for the terminal device to generate the fourth image comprehensive optimization function; The fourth image comprehensive optimization function is used for the terminal device to determine the target imaging optimization parameters, and the fourth image comprehensive optimization function is used for the terminal device to determine the target image optimization parameters; The target imaging optimization parameters are used for the terminal device to take a picture to obtain a fourth image; The target image optimization parameters are used for the terminal device to adjust the fourth image to obtain the target image; The determining module is further configured to: Search in the standard parameter information according to the identifier to determine the target standard parameter information corresponding to the target scenario.
8. The device according to claim 7, characterized in that, The server stores standard relevant parameters corresponding to different scene elements, and the standard relevant parameters are the pixel values of high imaging quality images stored in the server; The image optimization information further includes the standard relevant parameters of the target scenario; The device further includes: A third obtaining module, configured to obtain the standard relevant parameters corresponding to the target scenario according to the identifier.
9. An electronic device, characterized in that, Comprising a processor, a memory, and a program stored on the memory and executable on the processor, the program, when executed by the processor, implements the steps of the image processing method according to any one of claims 1-2.
10. A readable storage medium, characterized in that, A program is stored on the readable storage medium, and when the program is executed by the processor, it implements the steps of the image processing method according to any one of claims 1-2.
11. An electronic device, characterized in that, Comprising a processor, a memory, and a program stored on the memory and executable on the processor, the program, when executed by the processor, implements the steps of the image processing method according to any one of claims 3-4.
12. A readable storage medium, characterized in that, A program is stored on the readable storage medium, and when the program is executed by a processor, the steps of the image processing method described in any one of claims 3-4 are implemented.
Citation Information
Patent Citations
Shooting method, shooting device, image processing method, image processing device, and communication system
CN105812646A
Shooting method, mobile terminal and cloud end server
CN107566529A