Image processing method and device, electronic equipment and computer readable storage medium

By acquiring and applying the processing parameters of the image processing instructions to adjust the image shooting parameters, the problem of inconsistent effects after image adjustment is solved, and the consistency between image editing and shooting effects is achieved.

CN120264157APending Publication Date: 2025-07-04GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510449467.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In traditional technology, it is impossible to ensure the consistency of the image and the shooting effect of the terminal device under the desired effect after image adjustment.

Method used

By obtaining the processing parameters of the image processing instructions, adjusting the shooting parameters of the target display image to obtain adjustment parameters, and processing the original image according to the adjustment parameters to ensure the consistency of the image effect.

Benefits of technology

Adjust image effects based on the original image to ensure the consistency between the effect after image editing and the image shooting effect of the terminal device, and optimize the image editing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120264157A_ABST
    Figure CN120264157A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, electronic equipment and a computer readable storage medium. The method comprises the following steps: in response to an image processing instruction, obtaining a processing parameter corresponding to the image processing instruction; adjusting a shooting parameter of the target display image according to the processing parameter to obtain an adjustment parameter; processing an original image corresponding to the target display image according to the adjustment parameter to obtain a processed image; the original image is an image obtained by encoding the initial image; the target display image is an image obtained after the initial image is processed by adopting the shooting parameters. By the adoption of the method, it can be ensured that the display effect of the adjusted image under the expected effect obtained after the shot image is edited is consistent with the display effect of the shot image under the expected effect of the terminal device, and the consistency of the image effect after image editing is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, electronic device, and computer-readable storage medium. Background Art

[0002] With the continuous development of image capture technologies, when a user captures an image using a terminal device, filters, blurs, watermarks, etc. can be added to the preview image for image capture. However, in some scenarios, the user may be dissatisfied with the captured image and needs to adjust the display effect of the captured image. For example, adjust the filter effect, or blur effect, or watermark effect added to the captured image.

[0003] In traditional technologies, mainly the adjustment of the desired effect is performed based on the captured image to obtain an adjusted image. However, there is a problem in traditional technologies that it is impossible to ensure that the adjusted image is consistent with the effect of the captured image on the terminal device under the desired effect. Summary of the Invention

[0004] Embodiments of this application provide an image processing method, apparatus, electronic device, and computer-readable storage medium, which can ensure the consistency of the adjusted image obtained after editing and processing the captured image under the desired effect with the effect of the captured image on the terminal device under the desired effect.

[0005] In a first aspect, this application provides an image processing method, and the method includes:

[0006] Respond to an image processing instruction, and obtain a processing parameter corresponding to the image processing instruction;

[0007] Adjust the shooting parameter of the target display image according to the processing parameter to obtain an adjustment parameter;

[0008] Process the original image corresponding to the target display image according to the adjustment parameter to obtain a processed image; the original image is an image obtained by encoding an initial image; the target display image is an image obtained by processing the initial image using the shooting parameter.

[0009] In a second aspect, this application also provides an image processing apparatus, and the apparatus includes:

[0010] A first acquisition module, configured to respond to an image processing instruction and obtain a processing parameter corresponding to the image processing instruction;

[0011] An adjustment module, configured to adjust the shooting parameter of the target display image according to the processing parameter to obtain an adjustment parameter;

[0012] A processing module, configured to process the original image corresponding to the target display image according to the adjustment parameter to obtain a processed image; the original image is an image obtained by encoding an initial image; the target display image is an image obtained by processing the initial image using the shooting parameter.

[0013] In a third aspect, the present application further provides an electronic device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to execute the steps of the image processing method as described in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the image processing method as described in the first aspect are implemented.

[0015] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the image processing method as described in the first aspect are implemented.

[0016] For the above image processing method, device, electronic device, and computer-readable storage medium, when the electronic device responds to an image processing instruction, by obtaining the processing parameter corresponding to the image processing instruction, it can adjust the shooting parameter of the target display image according to the processing parameter to obtain an adjustment parameter, and thus can process the original image corresponding to the target display image according to the adjustment parameter to obtain a processed image; wherein, the original image is an image obtained by encoding an initial image; the target display image is an image obtained by processing the initial image using the shooting parameter. Since the electronic device processes the original image corresponding to the target display image according to the adjustment parameter, and the original image is directly obtained by encoding the initial image, and the initial image is obtained by processing multiple frames of raw images collected by an image sensor, that is, the original image has not been rendered by the shooting parameter, then adjusting the image effect on the basis of the original image is equivalent to the electronic device shooting based on the adjusted image effect, so as to ensure the consistency between the effect after image editing and processing and the effect of the shooting image obtained by the electronic device based on the adjusted image effect. In this way, editing and adjusting the image effect on the basis of the original image can ensure an image effect consistent with the direct output image of the electronic device and optimize the image editing effect. Description of the Drawings

[0017] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0018] Figure 1 It is an application environment diagram of an image processing method in an embodiment;

[0019] Figure 2 It is a flowchart of an image processing method in an embodiment;

[0020] Figure 3 It is a flowchart of an image processing method in another embodiment;

[0021] Figure 4 It is a flowchart of an image processing method in another embodiment;

[0022] Figure 5 It is a flowchart of an image processing method in another embodiment;

[0023] Figure 6 It is a flowchart of an image processing method in another embodiment;

[0024] Figure 7 It is a flowchart of an image processing method in another embodiment;

[0025] Figure 8 It is a flowchart of an image processing method in another embodiment;

[0026] Figure 9 It is a flowchart for generating a target display image and an original image in an embodiment;

[0027] Figure 10 It is a processing flowchart for editing preview and editing save in an embodiment;

[0028] Figure 11 It is a structural block diagram of an image processing device in an embodiment;

[0029] Figure 12 It is a structural block diagram of an image processing device in another embodiment;

[0030] Figure 13 It is a structural block diagram of an image processing device in another embodiment;

[0031] Figure 14 It is a structural block diagram of an image processing device in another embodiment;

[0032] Figure 15It is a structural block diagram of an image processing device in another embodiment;

[0033] Figure 16 It is a schematic internal structure diagram of an electronic device in one embodiment. Detailed implementation manners

[0034] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0035] The image processing method provided by the embodiments of the present application can be applied to, for example, Figure 1 the electronic device shown. Among them, a camera is mounted on the electronic device. When using the electronic device to capture a picture, effects such as filters, blurring or watermarks can be added to the preview picture captured by the camera to meet the user's image capture under specific effects. For the captured image, when the user views the captured image in the photo album, if the user is not satisfied with the effect of the captured image, the user can also edit and adjust the effect of the captured image to obtain the desired image effect. Exemplarily, the camera mounted on the electronic device may include at least one of a wide-angle camera, a telephoto camera, a super-sensitive camera, an ultra-wide-angle camera, a periscope telephoto camera, and a macro camera. The image processing method provided by the embodiments of the present application can be applied to the scenario where the electronic device edits and processes the effects of the above-mentioned captured images.

[0036] In one embodiment, as Figure 2 shown, an image processing method is provided. Taking the method applied to the Figure 1 electronic device as an example, the method includes the following steps:

[0037] S201, in response to an image processing instruction, obtain a processing parameter corresponding to the image processing instruction.

[0038] Generally, the user can use the camera application (APP) of the electronic device to capture a scene, thereby obtaining a captured image. The captured image will be saved in the photo album APP on the local device of the electronic device, and the user can use the photo album APP to view the captured image; of course, when the user views the captured image using the photo album APP, the user can also edit the captured image, and the editing operations may include, but are not limited to, cropping and rotating, adjusting, filtering, marking, adding text, adding watermarks, adding mosaics, beautifying, adding stickers, and the like.

[0039] Exemplarily, in this embodiment, during the process of a user using the photo album APP to edit a captured image, the editing control of the photo album APP can be triggered, and one or more editing operations can be performed as needed. It should be noted that when the user edits the captured image, the electronic device can process the captured image according to the user's editing operation. Therefore, hereinafter, the editing operation of the image can be referred to as the processing operation of the image. Additionally, the captured image to be edited can be referred to as the target display image. If the user triggers a certain image processing operation for the target display image, the photo album APP can generate an image processing instruction according to the processing parameters corresponding to the triggered image processing operation, and send the image processing instruction to the processor of the electronic device. The processor of the electronic device receives the image processing instruction sent by the photo album APP and obtains the processing parameters corresponding to the image processing instruction in response to the image processing instruction.

[0040] Exemplarily, the processing parameters can include filter parameters. For example, if the triggered image processing operation is to add a filter to the target display image or switch the filter of the target display image, the image processing instruction can carry the filter type selected by the user. According to the filter type, the processor can obtain the filter parameters corresponding to the filter type according to the correspondence between different filter types and the corresponding filter parameters, where the filter parameters can include at least one of brightness, contrast, exposure, light sense, saturation, color temperature, sharpness, etc.

[0041] It should be noted that the types and quantities of filter parameters corresponding to different filter types may be different. For example, the style filters can include filter types such as fresh, retro, clear, and bright. In the embodiments of the present application, the filter parameters corresponding to different filter types are not specifically limited. Additionally, in the case where the image processing operation is other processing operations except for filters, the processing parameters corresponding to the image processing instruction include at least one processing parameter corresponding to the image processing operation, and no specific examples are given for this in this embodiment.

[0042] S202, adjust the shooting parameters of the target display image according to the processing parameters to obtain adjustment parameters.

[0043] Among them, the shooting parameters of the target display image can include at least one parameter triggered by the user before triggering the shooting control to adjust the display effect of the preview screen, such as filter parameters, brightness parameters, blur parameters, beauty parameters, exposure parameters, etc. It should be noted that for the parameters that the user has not adjusted, the shooting can be performed according to the default parameters during shooting. For example, when the user does not select any filter, the shooting can be performed without a filter, and when the user does not adjust the brightness parameter, the shooting can be performed according to the default brightness value, etc.

[0044] Exemplarily, when the user edits the target display image and triggers an edit operation, the electronic device can obtain the processing parameters corresponding to the image processing instruction, and adjust the shooting parameters of the target display image according to the processing parameters, so as to obtain the adjustment parameters. As an alternative implementation, in this embodiment, the electronic device can replace the corresponding parameters in the shooting parameters of the target display image with the processing parameters corresponding to the image processing instruction to obtain the adjustment parameters, where the adjustment parameters include the replaced processing parameters and other shooting parameters other than the processing parameters.

[0045] Exemplarily, when the image processing operation triggered by the user is a filter switching operation, the processing parameters may include filter parameters. In this case, the electronic device can replace the filter parameters in the shooting parameters of the target display image with the filter parameters corresponding to the image processing instruction; for example, if the filter parameter in the shooting parameters of the target display image is none, and the filter parameter corresponding to the image processing instruction is filter parameter A, then the filter parameter in the shooting parameters of the target display image can be modified from none to filter parameter A, or if the filter parameter in the shooting parameters of the target display image is filter parameter B, and the filter parameter corresponding to the image processing instruction is filter parameter A, then the filter parameter in the shooting parameters of the target display image can be modified from filter parameter B to filter parameter A.

[0046] S203, process the original image corresponding to the target display image according to the adjustment parameters to obtain the processed image.

[0047] Wherein, the original image is the image obtained after encoding the initial image; the target display image is the image obtained after processing the initial image with the shooting parameters.

[0048] Exemplarily, the initial image can be an image captured by the camera of an electronic device. For example, multiple frames of raw images are captured by the image sensor of the camera, and basic processing is performed on the multiple frames of raw images through the Hardware Abstraction Layer (HAL). Then, the processed multiple frames of raw images are subjected to image fusion through the application layer (APP) to obtain the initial image. For example, the initial image can be an image in the P010 HDR P3 HLG format. Among them, P010 refers to a video format or encoding method, usually referring to a 10-bit color depth, a video encoding format using the YUV 4:2:2 sampling format. This format is often used for the recording and editing of high-definition videos and can provide richer colors and details. The HDR (High Dynamic Range) image technology aims to provide a wider brightness range and richer colors. The HDR technology can make the details of the dark and bright parts in the picture clearer and the colors richer. There are multiple HDR standards, including HDR10, HDR10+, HLG (Hybrid Log Gamma), and Dolby Vision, etc. P3 is a color space standard created by the Digital Cinema Initiative (DCI) and the Society of Motion Picture and Television Engineers (SMPTE), and can also be called DCI-P3. Its color gamut is wider than that of the traditional sRGB color gamut and can cover more colors, especially with a wider range of green and red. HLG (Hybrid Log Gamma) is an HDR standard that does not require metadata and can be backward compatible with Standard Dynamic Range (SDR) display devices, enabling more vivid pictures to be presented on existing SDR display devices.

[0049] After obtaining the initial image, the initial image can be encoded to obtain the original image. Exemplarily, the encoding process may include Ultra High Dynamic Range (UHDR) encoding. UHDR can provide a larger brightness range, richer colors, and higher contrast. After UHDR encoding, a JPEGR format original image can be obtained. Among them, the JPEGR (JPEG with optiMized dynamic Range) format is a compressed image format used to save Ultra High Dynamic Range (UHDR) images. For example, the initial image in P010 HDR P3 HLG format can be UHDR encoded to obtain the original image in JPEGR format. Exemplarily, the encoding process can be as follows: First, perform a down-conversion process of HDR to SDR on the initial image in P010 HDR P3 HLG format to obtain an NV21 SDR P3 S RGB image and a Source Gainmap. Then, encode the NV21 SDR P3 S RGB image to obtain a Source JPEG image, and perform UHDR encoding on the Source JPEG image and the Source Gainmap to obtain Source JPEGR, that is, the original image in JPEGR format.

[0050] Exemplarily, the implementation process of the down-conversion process of HDR to SDR can be as follows: For the same shooting scene, the tone curve (Tone Curve) of SDR and the Tone Curve of HDR will be designed simultaneously. Combine the tone (Tone) and standard encoding (i.e., standard gamma) to obtain two final gammas hlgGammaTone and srgbGammaTone with Tone, where:

[0051] srgbGammaTone = sRGB_gamma(standard gamma) + sdr_ToneCurve;

[0052] hlgGammaTone = HLG_gamam(standard gamma) + hdr_ToneCurve.

[0053] Multiple frames of raw images are combined into one frame of the basic P010 image. Applying hlgGammaTone to the P010 image can obtain the HDR image. Among them, hlgGammaTone is a gamma with adjustments (Tone) such as brightness, color, contrast, and tone performance. Conversely, reversing hlgGammaTone (which can be understood as restoring to the P010 image output from multiple frames of raw) and reapplying srgbGammaTone with Tone realizes the down-conversion to SDR.

[0054] Exemplarily, the encoding process can also be: performing UHDR encoding on the initial image in P010 HDR P3 HLG format and the NV21 SDR P3 S RGB image to obtain Source JPEGR, or it can also be: performing UHDR encoding on the initial image in P010 HDR P3 HLG format and the Source JPEG image to obtain Source JPEGR, where the Source JPEG image is obtained by encoding and compressing the NV21 SDR P3 S RGB image.

[0055] In addition, after obtaining the initial image, the initial image can also be processed using shooting parameters to obtain a captured image, that is, the target display image. As an optional implementation manner, the shooting parameters in this embodiment can at least include at least one of a filter parameter, a blurring parameter, and a watermark parameter. For example, when the shooting parameters include a filter parameter, a blurring parameter, and a watermark parameter, the filter parameter and the blurring parameter can be used to process the initial image in P010 HDR P3 HLG format to obtain a first image. Then, the watermark parameter is used to add a watermark to the first image to obtain a second image. Then, UHDR encoding is performed on the second image to obtain a target display image in JPEGR format, where the target display image in JPEGR format is the captured image generated after the user triggers the shooting control. In this example, the generated captured image can be called the Final image (Final Image), that is, the final large image generated by the camera taking a photo.

[0056] Exemplarily, after generating the captured image (i.e., the Final image), the captured image (i.e., the Final image) can be saved in the local album of the electronic device. Among them, the original image and the shooting parameters can be used as extended data of the captured image (i.e., the Final image) and saved in the preset memory of the electronic device. The extended data can be used for post-processing the captured image (i.e., the Final image), that is, editing processing.

[0057] Exemplarily, when the electronic device responds to an image processing instruction for the target display image, it can adjust the shooting parameters in the extended data of the target display image according to the processing parameters corresponding to the image processing instruction to obtain adjusted parameters. Then, the original image in the extended data of the target display image can be processed according to the adjusted parameters to obtain a processed image; that is, on the original image that has not undergone any filter, blurring, or watermark processing, the display effect is adjusted, and the adjusted parameters are applied to the original image to obtain a processed image, just like using the adjusted parameters for camera shooting, so as to obtain a processed image with the same effect as that of camera shooting.

[0058] In the above image processing method, when the electronic device responds to an image processing instruction, by obtaining the processing parameters corresponding to the image processing instruction, it can adjust the shooting parameters of the target display image according to the processing parameters to obtain adjustment parameters, and thus can process the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; wherein, the original image is an image obtained after encoding the initial image; the target display image is an image obtained after processing the initial image using the shooting parameters. Since the electronic device processes the original image corresponding to the target display image according to the adjustment parameters, and the original image is directly obtained after encoding the initial image, and the initial image is obtained after processing multiple frames of raw images collected by the image sensor, that is, the original image has not been rendered by the shooting parameters, then adjusting the image effect based on the original image is equivalent to the electronic device shooting based on the adjusted image effect, thereby ensuring the consistency between the effect after image editing and processing and the effect of the shooting image obtained by the electronic device based on the adjusted image effect. In this way, editing and adjusting the image effect based on the original image can ensure an image effect consistent with the direct output image of the electronic device and optimize the image editing effect.

[0059] In this embodiment, the detailed process of processing the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image will be explained. In one embodiment, as Figure 3 shown, the above S203 includes:

[0060] S301, perform decoding processing on the original image to obtain the first bitmap and the first gain map of the original image.

[0061] Exemplarily, the original image can be subjected to UHDR decoding processing to obtain a first bitmap and a first gain map corresponding to the original image. Among them, a bitmap image, also known as a dot matrix image or a raster image, is composed of individual points called pixels (picture elements). These points can be arranged and colored differently to form patterns; a gain map is an RGB map that stores RGB three-channel color and brightness adjustment information. Through an algorithm, the SDR base image is dynamically mapped to a high dynamic range (HDR) effect to adapt to different display devices (such as HDR screens). As an alternative implementation, the first bitmap can be a bitmap in the RGBA_8888 format, which can be expressed as Bitmap RGBA_8888. Among them, the RGBA_8888 format is an image storage format. Each pixel is composed of four components: red (R), green (G), blue (B), and transparency (A). Each component occupies 8 bits (i.e., 1 byte). Therefore, the storage size of one pixel is 4 bytes. This format not only supports rich color representations but also can handle transparent effects. The first gain map can be expressed as Source Gainmap. It should be noted that the first bitmap corresponding to the original image can be an SDR bitmap, that is, a bitmap under the standard dynamic range.

[0062] Exemplarily, the electronic device can call the UHDR decoding algorithm to perform UHDR decoding processing on the original image, thereby outputting a first bitmap and a first gain map corresponding to the original image for subsequent editing processing based on the first bitmap and the first gain map of the original image.

[0063] S302, process the first bitmap and the first gain map according to the adjustment parameters to obtain a processed image.

[0064] Exemplarily, the electronic device can apply the adjustment parameters to the first bitmap and the first gain map respectively to obtain a processed first bitmap and a processed first gain map. Then, perform UHDR encoding on the processed first bitmap and the processed first gain map to obtain a processed image; or, alternatively, first fuse the first bitmap and the first gain map to obtain a fused image, and then apply the adjustment parameters to the fused image to obtain a processed image. Among them, the processed image can be a new JPEG image, and the electronic device can display the processed image on the display screen and present it to the user.

[0065] In this embodiment, the electronic device first decodes the original image to obtain the first bitmap and the first gain map of the original image, and processes the first bitmap and the first gain map according to the adjustment parameters to obtain the processed image. Since the adjustment parameters can process the first bitmap and the first gain map simultaneously, ensuring that the same effect change occurs to both the first bitmap and the first gain map under the action of the adjustment parameters. Compared with the traditional method of only adjusting the decoded bitmap without synchronously adjusting the gain map, which results in a certain difference between the SDR effect presented by the processed image and the tone of the HDR image. Therefore, by using the method of this embodiment, while ensuring the consistency between the effect after image editing processing and the effect of the captured image obtained by the electronic device based on the adjusted image effect, it can also ensure that the effect of the obtained processed image is consistent with the tone of the HDR image.

[0066] In some alternative embodiments, the electronic device can perform editing processing on the fused image of the first bitmap and the first gain map. In this embodiment, the detailed process of processing the first bitmap and the first gain map according to the adjustment parameters to obtain the processed image will be explained. In one embodiment, as Figure 4 shown, step S302 above includes:

[0067] S401, perform fusion processing on the first bitmap and the first gain map to obtain the fused image of the original image.

[0068] In this embodiment, the fused image obtained after fusion processing can be the above-mentioned fused image. Exemplarily, for the first bitmap and the first gain map of the original image, an HDR image can be obtained according to the first bitmap and the first gain map. For example, by performing fusion encoding on the first bitmap (SDR bitmap) and the first gain map to generate the fused image (HDR image) corresponding to the original image, that is, converting the format of the SDR image to obtain the HDR image. As an alternative embodiment, the first gain map can be attached to the first bitmap to achieve the fusion of the first bitmap and the first gain map, and the obtained fused image can be an image in the P010 HDR P3 HLG format.

[0069] S402, apply the adjustment parameters to the fused image to obtain the processed image.

[0070] Exemplarily, in this embodiment, by applying the adjustment parameters to the fused image after fusion processing, the adjustment parameters simultaneously adjust the effects of the first bitmap and the first gain map, thereby obtaining the processed image.

[0071] In this embodiment, first, a fused image is obtained by fusing the first bitmap and the first gain image. Then, the adjustment parameters are applied to the fused image to obtain a processed image. Since the fused image contains the information of the first bitmap and the first gain image, when processing the fused image according to the adjustment parameters, it can be ensured that both the first bitmap and the first gain image can have the same effect change under the action of the adjustment parameters, so as to ensure that the effect of the obtained processed image is consistent with the tone of HDR. In addition, by uniformly processing the fused image, not only can the processing efficiency be improved, but also it can be ensured that the first bitmap and the first gain image execute the same processing process, further improving the consistency between the effect of the processed image and the HDR tone.

[0072] In some scenarios, the above adjustment parameters may include a blurring adjustment parameter, a filter adjustment parameter, and a watermark adjustment parameter, that is, to adjust the blurring effect, filter effect, and watermark effect of the target display image. In this embodiment, the detailed process of applying the adjustment parameters to the fused image to obtain a processed image is explained. In one embodiment, as Figure 5 shown, the above S402 includes:

[0073] S501, applying the blurring adjustment parameter to the fused image to obtain a first processed image.

[0074] Exemplarily, in the case where the user first adjusts the blurring effect, the electronic device can first process the fused image according to the blurring adjustment parameter, that is, first apply the blurring adjustment parameter to the fused image to obtain the first processed image after blurring processing. For example, in the case where the fused image is an image in the P010 HDR P3 HLG format, after applying the blurring adjustment parameter to the fused image, an image in the Bitmap RGBA_1010102 format can be obtained, and the image in the Bitmap RGBA_1010102 format can be used as the first processed image; or, for an image in the Bitmap RGBA_1010102 format, it can be further converted to an HDR Texture (texture) format image, and the HDR Texture format image can be used as the first processed image. Among them, the RGBA_1010102 format is a 30-bit color format, where red (R), green (G), and blue (B) each occupy 10 bits, and the alpha channel occupies 2 bits. It is commonly used in application scenarios of high dynamic range (HDR) display and can provide richer colors and details.

[0075] Exemplarily, when the user has preferentially performed a blurring adjustment operation to obtain a first processed image after blurring processing, the electronic device can display the first processed image on the display screen of the electronic device and present it to the user so that the user can view the effect after blurring adjustment. If the user is satisfied with the effect after blurring adjustment, the user can continue to perform other adjustment operations. If the user is not satisfied with the effect after blurring adjustment, the user can also re-perform the blurring adjustment operation so that the electronic device can obtain new blurring adjustment parameters and apply the new blurring adjustment parameters to the fusion image to obtain the first processed image.

[0076] S502. Process the first processed image according to the filter adjustment parameter and the watermark adjustment parameter to obtain a processed image.

[0077] In this embodiment, after completing the blurring adjustment operation, the user can perform a filter adjustment operation and a watermark adjustment operation, and process the first processed image according to the filter adjustment parameter corresponding to the filter adjustment operation and the watermark adjustment parameter corresponding to the watermark adjustment operation, so as to obtain a processed image. Exemplarily, the user can first perform the filter adjustment operation and then perform the watermark adjustment operation, or, alternatively, the user can first perform the watermark adjustment operation and then perform the filter adjustment operation.

[0078] As an optional implementation manner, when the user first performs the filter adjustment operation and then performs the watermark adjustment operation, the electronic device can first apply the filter adjustment parameter to the first processed image to obtain a second processed image. For the watermark adjustment operation, the electronic device can first obtain the second bitmap and the second gain map of the second processed image, then apply the watermark adjustment parameter to the second bitmap to obtain a third bitmap, and apply the watermark adjustment parameter to the second gain map to obtain a third gain map, and perform a fusion process on the third bitmap and the third gain map to obtain a processed image.

[0079] Exemplarily, taking the first processed image as an image in HDR Texture format as an example, the filter adjustment parameters can be applied to the first processed image to obtain a second processed image in HDR Texture format. Then, a down-conversion process of converting HDR to SDR is performed on the second processed image in HDR Texture format, and a second bitmap and a second gain map corresponding to the second processed image can be obtained. Among them, the second bitmap can be represented as Bitmap RGBA_8888, and the second gain map can be represented as Source Gainmap. When the watermark adjustment parameters are applied to the second bitmap to obtain a third bitmap, the third bitmap can also be represented as Bitmap RGBA_8888. When the watermark adjustment parameters are applied to the second gain map to obtain a third gain map, the third gain map can also be represented as Source Gainmap. However, it should be noted that the second bitmap and the third bitmap are not completely the same, and the second gain map and the third gain map are not completely the same either.

[0080] Further, based on the third bitmap and the third gain map, a real-time preview after editing can be performed, that is, the third gain map is attached to the third bitmap for real-time preview display, so that the user can timely view the image display effect after blurring, filtering, and watermark adjustment. Exemplarily, the electronic device can also perform a fusion process on the third bitmap and the third gain map to obtain a processed image, and locally save the processed image. For example, when the electronic device receives a trigger operation from the user on the completion control or the save control, the third bitmap and the third gain map can be fused to obtain and save the processed image.

[0081] In this embodiment, when the adjustment parameters include blurring adjustment parameters, filter adjustment parameters, and watermark adjustment parameters, the blurring adjustment parameters, filter adjustment parameters, and watermark adjustment parameters can be sequentially applied to the fused image, and the latter can be applied to the image processed by the former, so as to obtain an image after blurring, filtering, and watermark processing, so as to ensure that the effect of the obtained processed image is consistent with the tone of HDR.

[0082] In some scenarios, the electronic device can synchronously generate a raw image corresponding to the target display image during the process of shooting and generating the shooting image, that is, the above-mentioned target display image. In this embodiment, the generation process of the raw image is explained. In one embodiment, as Figure 6 shown, the above method further includes:

[0083] S601, perform a conversion process on the initial image to obtain a first base image and a raw gain map.

[0084] Exemplarily, the initial image can be subjected to a down-conversion process from HDR to SDR to obtain SDR, that is, the first base image and the original gain map under the standard dynamic range. For example, when the initial image is an image in the P010 HDR P3 HLG format, the P010 HDR P3 HLG image is subjected to an HDR-to-SDR process to obtain the first base image and the original gain map. Exemplarily, the first base image can be an image in the NV21 SDR P3 S RGB format. Among them, NV21 is an image format based on the YUV color space, adopting the YUV 4:2:0 sampling method. The Y component represents the luminance information and stores the luminance values of all pixels. The UV components represent the chrominance information and are stored in an interleaved manner, where the V component is in front and the U component is behind. While ensuring the image quality, NV21 can significantly reduce the storage space and transmission bandwidth. On the Android platform, NV21 is the standard format of the camera and video encoder and has wide compatibility. The original gain map can be expressed as Source Gainmap, where the original image (Source Image) can refer to the original buried image embedded by the camera in the extended data of the large image (i.e., the Final image).

[0085] S602, encode the first base image and the original gain map to obtain the original image.

[0086] Exemplarily, the first base image can be encoded first to generate the original image in the JPRG format, denoted as Source JPEG. Then, the Source JPEG and the original gain map (Source Gainmap) can be subjected to UHDR encoding to generate the original image in the JPRGR format, denoted as Source JPEGR.

[0087] In this embodiment, when the electronic device generates the original image, by performing a down-conversion process on the initial image collected by the sensor, the first base image and the original gain map are obtained, and the first base image and the original gain map are subjected to UHDR encoding to obtain the original image in the JPEGR format, which is used as the extended data of the target display image for subsequent editing processing of the target display image based on the original image, ensuring the consistency between the effect after image editing processing and the effect of the captured image obtained by the electronic device based on the adjusted image effect, and optimizing the image editing effect.

[0088] In some scenarios, the above watermark adjustment operation can be a watermark removal operation, and the user can remove the watermark in the target display image to obtain a watermark-free image. In this embodiment, the detailed process of the watermark removal operation is explained. In one embodiment, as Figure 7 shown, the above method further includes:

[0089] S701, in response to a watermark removal instruction, obtain a target image block of a target display image; the target image block includes watermark information.

[0090] Exemplarily, when a user triggers a watermark removal control, a watermark removal instruction can be generated. When the electronic device responds to the watermark removal instruction, it can analyze the target display image and obtain the target image block containing the watermark information from the target display image. As an alternative implementation, the electronic device can use a watermark recognition algorithm to identify the watermark area containing the watermark information in the target display image, and intercept the target image block containing the watermark information from the target display image according to the watermark area.

[0091] As another alternative implementation, the electronic device can also obtain the watermark area information of the target display image. For example, obtain the watermark area information of the target display image from the extended data of the target display image, and obtain the target image block containing the watermark information from the target display image according to the watermark area information. Exemplarily, during the process of the user shooting to generate the target display image, when the electronic device adds a watermark to the target display image, it can save the watermark parameters. For example, the watermark parameters, the above shooting parameters, and the original image can be saved as the extended data of the target display image, or the shooting parameters can also include the watermark parameters, and the shooting parameters and the original image can be saved as the extended data of the target display image, etc. Among them, the watermark parameters include watermark area information, watermark text information, watermark font information, etc.

[0092] S702, obtain a replacement image block corresponding to the target image block.

[0093] Wherein, the size and position of the replacement image block in the target display image are the same as those of the target image block in the target display image, and the display effect of the replacement image block is consistent with the display effect of other image areas except the target image block in the target display image.

[0094] Exemplarily, taking the shooting parameters including watermark parameters as an example, during the process of the electronic device processing the initial image with the shooting parameters to obtain the target display image, the electronic device can first use other shooting parameters except the watermark parameters in the shooting parameters to process the initial image to obtain a candidate shooting image, and obtain the image block of the area where the watermark information is located from the candidate shooting image as the replacement image block. For the candidate shooting image, the electronic device can process the candidate shooting image with the watermark parameters to obtain the target display image.

[0095] Exemplarily, the electronic device can also use the replacement image block corresponding to the watermark area in the target display image as the extended data of the target display image and save it for subsequent use when performing the watermark removal operation.

[0096] S703 replaces the target image block with a replacement image block to obtain a watermark-removed image.

[0097] Exemplarily, in the case of obtaining the target image block and the replacement image block corresponding to the watermark area in the target display image, the target image block in the target display image can be replaced with the replacement image block, so as to obtain a watermark-removed image.

[0098] In this embodiment, when performing the watermark removal operation, the target image block containing the watermark information can be obtained from the target display image, and at the same time, the replacement image block corresponding to the watermark area in the target display image can be obtained. Since the display effect of the replacement image block is the same as that of the non-watermark area in the target display image, after the target image block in the target display image is replaced with the replacement image block, the display effect between the original watermark area and the non-watermark area in the obtained watermark-removed image can be kept consistent, which can ensure the consistency between the effect after image editing processing and the effect of the captured image obtained by the electronic device based on the adjusted image effect, and optimize the image editing effect.

[0099] In this embodiment, the detailed process of obtaining the replacement image block corresponding to the target image block will be explained. In one embodiment, as Figure 8 shown, the above S702 includes:

[0100] S801, converting the initial image of the target display image to obtain a second base image and a shooting gain map corresponding to the initial image.

[0101] Exemplarily, during the shooting process, if the user selects the normal shooting mode instead of the portrait shooting mode, the shooting parameters do not include the blurring parameter. If the user also does not select any filter type, the shooting parameters do not include the filter parameter. In the case that the shooting parameters do not include the blurring parameter and the filter parameter, the electronic device can perform a down-conversion process of converting HDR to SDR on the initial image to obtain a second base image and a shooting gain map. For example, in the case that the initial image is an image in the P010 HDRP3 HLG format, perform HDR to SDR processing on the P010 HDR P3 HLG image to obtain a second base image and a shooting gain map. Exemplarily, the second base image can be an image in the NV21 SDR P3 S RGB format, and the shooting gain map can be represented as Final Gainmap.

[0102] Exemplarily, if the shooting parameters include a blurring parameter and / or a filter parameter, the electronic device may first use the blurring parameter and / or the filter parameter to process the initial image, and perform a down-conversion process of HDR to SDR on the processed initial image, so as to obtain a second basic image and a shooting gain map. Among them, the second basic image may also be an image in the NV21 SDR P3S RGB format, and the shooting gain map may be represented as Final Gainmap.

[0103] S802, use the area corresponding to the target image block in the second basic image as the area basic image.

[0104] Exemplarily, in the case of obtaining the second basic image, on the one hand, intercept the area corresponding to the target image block in the second basic image, that is, the watermark area, as the area basic image. The area basic image can also be called the original image of the watermark coverage area, and it can be an image in the JPEG format. On the other hand, use the watermark parameter to add a watermark to the second basic image, and encode the second basic image after adding the watermark to obtain a Final large image in the JPEG format. Then, the Final large image in the JPEG format and the shooting gain map (Final Gainmap) can be encoded by UHDR, and finally a shooting image in the JPEGR format, that is, the target display image, can be generated, which can be represented as Final JPEGR.

[0105] S803, use the area corresponding to the target image block in the shooting gain map as the area gain map.

[0106] In this embodiment, the area corresponding to the target image block, that is, the area gain map corresponding to the watermark area, can also be extracted from the shooting gain map. The area gain map can also be called the watermark coverage area gain map.

[0107] S804, perform a fusion process on the area basic image and the area gain map to obtain a replacement image block.

[0108] Exemplarily, for the watermark area, that is, the watermark coverage area, a UHDR encoding fusion process can be performed on the area basic image and the area gain map corresponding to the watermark area, so as to obtain a replacement image block corresponding to the watermark area, that is, a watermark coverage area JPEGR image.

[0109] In this embodiment, for the watermark removal operation, before adding a watermark to an image during image capture, the electronic device may obtain a corresponding second base image and a capture gain map based on the initial image, extract a region base image corresponding to the watermark region from the second base image, and extract a region gain map corresponding to the watermark region from the capture gain map, so as to generate a replacement image block corresponding to the watermark region according to the region base image and the region gain map, ensuring the consistency of the display effect of the non-watermark region in the target display image generated after adding the watermark, and further ensuring the consistency of the display effect of the original watermark region and the non-watermark region in the image after watermark removal, thus optimizing the watermark removal effect.

[0110] For the convenience of understanding by those skilled in the art, the following provides a detailed introduction to an image processing method applied to an electronic device, where the electronic device includes:

[0111] S1. Obtain an initial image collected by a camera sensor, and generate a target display image, an original image corresponding to the target display image, and a replacement image corresponding to a watermark region in the target display image based on the initial image.

[0112] Refer to Figure 9 As shown, the target display image is the captured image generated after the camera captures, that is, the Final JPEG image, which is used for album display, and the user can view the Final JPEG image in the album. The original image is the original embedded image in the extended data of the captured image (i.e., the large image), that is, the Source JPEG image.

[0113] Continue to refer to Figure 9 As shown, exemplarily, during the process of processing the initial image with shooting parameters to generate a captured image, that is, the Final JPEG image, when adding a watermark at the camera end, the RGB three-channel Gainmap of all pixels within the watermark coverage area is set to a unified gray color (i.e., R = G = B), which can ensure that the white text watermark has a consistent brightness enhancement and is not affected by the three-channel colors of the picture, so as to solve the problem of watermark color deviation that occurs after traditional watermark addition and improve the watermark effect.

[0114] Continue to refer to Figure 9As shown, exemplarily, before applying filters / blur / watermarks to the initial image, the camera end simultaneously saves a Source JPEG without filters / blur / watermarks, generates a SourceGainmap without filters / blur / watermarks, and packs and generates a Source JPEGR original image in JPEGR format. Additionally, the filter / blur / watermark parameters during filter / blur / watermark application, the HDR-to-SDR parameters, and the JPEGR image of the watermark overlay area before watermark application, i.e., the replacement image block, are jointly used as extended data for the camera large image for subsequent album editing. That is, in addition to packing the Source JPEGR original image of the complete picture, the camera end extracts the original image of the area covered by the watermark in the picture and also extracts the Gainmap of the watermark overlay area to generate a JPEGR original image of the watermark overlay area for restoring the post-editing of the album watermark. When editing to remove the watermark, the watermark area in the Final image can be directly replaced with the JPEGR original image of the watermark overlay area, ensuring normal watermark effects when removing text watermarks or modifying them to other texts during watermark editing. Among them, when extracting the original JPEG image of the watermark overlay area, the position information of the watermark overlay area can be obtained during the watermark algorithm processing, and the input NV21 SDR P3 SRGB image of the watermark is cropped according to the position information of the watermark overlay area to obtain the cropped overlay area NV21 image, and then the overlay area NV21 image is JPEG-encoded to obtain the original JPEG image of the watermark overlay area.

[0115] Additionally, it should be noted that in this embodiment, after the down-conversion process of HDR to SDR, the obtained gain maps (including the shooting gain map Final Gainmap and the original gain map Source Gainmap) are all three-channel gain maps, which can ensure that the subsequent editing real-time preview and the saved image after editing both present a three-channel HDR effect, and the effect is consistent with the effect of the camera's actual shooting in the same scene.

[0116] S2. Respond to the image processing instruction and obtain the processing parameters corresponding to the image processing instruction.

[0117] S3. Adjust the shooting parameters of the target display image according to the processing parameters to obtain the adjustment parameters.

[0118] S4. Process the original image corresponding to the target display image according to the adjustment parameters to obtain the processed image.

[0119] Reference Figure 10As shown, exemplarily, by accessing the IPU (Image Process Unit, post-image editing processing module) capabilities at the album editing end, when editing and processing the target display image, the editing and processing are performed based on the original image corresponding to the target display image. That is, after parsing the original image (Source JPEGR), operations such as defocusing / filtering / watermark adjustment are performed to achieve operations such as removing defocusing / regulating the defocusing intensity, removing filters / changing filters, removing watermarks / changing watermarks, etc. Since the Final image has a three-channel HDR effect, therefore, throughout the editing process, the three-channel HDR effect can still be displayed.

[0120] Exemplarily, when performing defocusing / filtering / watermark adjustment operations, the album editor defines whether each adjustment operation supports three-channel HDR editing in the metadata, and judges whether the current input image and the current adjustment operation support the HDR effect before each adjustment operation is executed. If three-channel HDR editing is supported, the parsed original image is processed using the adjustment parameters, and the HDR image is subjected to an HDR to SDR down-conversion before being sent for display, so that the display image is rendered in the SDR+Gainmap mode. While supporting HDR display, performing a down-conversion on the HDR image can achieve that when the user adjusts the screen brightness beyond the reserved HDR redundant brightness, it changes with the screen brightness, ensuring that the preview during album editing at any brightness is still in the HDR effect, achieving the purpose of supporting changes with the screen brightness.

[0121] Taking the example that the defocusing / filtering / watermark adjustment operations all support three-channel HDR editing, the process of the defocusing / filtering / watermark adjustment operation, that is, step S4, may include:

[0122] S41, perform decoding processing on the original image to obtain the first bitmap and the first gain map of the original image.

[0123] Among them, the original image is the Source JPEGR format image, the first bitmap is the Bitmap RGBA_8888 obtained by performing UHDR decoding on the Source image, and the first gain map is the SourceGainmap obtained by performing UHDR decoding on the Source image.

[0124] S42, perform fusion processing on the first bitmap and the first gain map to obtain the fused image of the original image.

[0125] Among them, the fused image is the P010HDR P3 HLG obtained by fusing the Bitmap RGBA_8888 and the Source Gainmap.

[0126] S43, apply the defocusing adjustment parameters to the fused image to obtain the first processed image.

[0127] Using the defocus adjustment parameter, perform a defocus adjustment operation on the fused image to obtain Bitmap RGBA_1010102, and then perform a format conversion on Bitmap RGBA_1010102 to obtain an HDR Texture, which is the first processed image.

[0128] S44, Apply the filter adjustment parameter to the first processed image to obtain a second processed image.

[0129] Using the filter adjustment parameter, perform a filter adjustment operation on the first processed image to obtain an HDR Texture, which is the second processed image.

[0130] S45, Obtain the second bitmap and the second gain map of the second processed image.

[0131] Before performing the watermark adjustment operation, perform a down-conversion process of HDR to SDR on the HDR Texture to obtain the second bitmap Bitmap RGBA_8888 and the second gain map Source Gainmap.

[0132] S46, If it is a watermark adjustment operation, apply the watermark adjustment parameter to the second bitmap to obtain a third bitmap; and apply the watermark adjustment parameter to the second gain map to obtain a third gain map.

[0133] Using the watermark adjustment parameter, process the second bitmap and the second gain map respectively to obtain the third bitmap and the third gain map after watermark processing.

[0134] S47, Based on the third bitmap and the third gain map, perform real-time preview editing and save after editing.

[0135] S48, If it is a watermark removal operation, obtain the target image block and the replacement image block corresponding to the watermark area in the target display image.

[0136] Among them, the replacement image block corresponding to the watermark area in the target display image is the original JPEG image of the above watermark-covered area.

[0137] S49, Replace the target image block with the replacement image block to obtain the image after watermark removal.

[0138] Using the method in this embodiment, the three-channel HDR effect can be displayed in the editing preview, and the saved image after editing is still a three-channel HDR image. Users can achieve the consistency of the UHDR effect throughout the entire link of camera shooting large pictures - album editing preview - album editing and saving, realizing what you see is what you get in the post-shooting editing link, and ensuring that it is exactly the same as the effect directly output by the camera.

[0139] It should be noted that for the descriptions in the above steps, reference can be made to the relevant descriptions in the above embodiments, and the effects are similar. Therefore, the present embodiment will not be elaborated herein.

[0140] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0141] Based on the same inventive concept, the embodiments of the present application also provide an image processing apparatus for implementing the above-mentioned image processing method. The implementation solutions provided by this apparatus to solve problems are similar to those described in the above method. Therefore, the specific limitations in one or more embodiments of the following image processing apparatus can refer to the limitations on the image processing method in the above text, and will not be elaborated herein.

[0142] In an exemplary embodiment, as Figure 11 shown, an image processing apparatus is provided, including: a first acquisition module 10, an adjustment module 11, and a processing module 12, where:

[0143] The first acquisition module 10 is configured to obtain processing parameters corresponding to an image processing instruction in response to the image processing instruction;

[0144] The adjustment module 11 is configured to adjust the shooting parameters of the target display image according to the processing parameters to obtain adjustment parameters;

[0145] The processing module 12 is configured to process the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; the original image is an image obtained by encoding an initial image; the target display image is an image obtained by processing the initial image using the shooting parameters.

[0146] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be elaborated herein.

[0147] On the basis of the above embodiment, as Figure 12 shown, exemplarily, the above processing module 12 includes: a first acquisition unit 121 and a processing unit 122, where:

[0148] The first acquisition unit 121 is configured to perform decoding processing on the original image to obtain the first bitmap and the first gain map of the original image;

[0149] The processing unit 122 is configured to process the first bitmap and the first gain map according to the adjustment parameters to obtain a processed image.

[0150] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0151] Based on the above embodiment, please continue to refer to Figure 12 , exemplarily, the above processing unit 122 is specifically configured to perform fusion processing on the first bitmap and the first gain map to obtain a fused image of the original image; apply the adjustment parameters to the fused image to obtain a processed image.

[0152] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0153] Based on the above embodiment, please continue to refer to Figure 12 , exemplarily, the above adjustment parameters include a blurring adjustment parameter, a filter adjustment parameter, and a watermark adjustment parameter. The above processing unit 122 is specifically configured to apply the blurring adjustment parameter to the fused image to obtain a first processed image; process the first processed image according to the filter adjustment parameter and the watermark adjustment parameter to obtain a processed image.

[0154] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0155] Based on the above embodiment, please continue to refer to Figure 12 , exemplarily, the above processing unit 122 is specifically configured to apply the filter adjustment parameter to the first processed image to obtain a second processed image; obtain the second bitmap and the second gain map of the second processed image; apply the watermark adjustment parameter to the second bitmap to obtain a third bitmap; apply the watermark adjustment parameter to the second gain map to obtain a third gain map; perform fusion processing on the third bitmap and the third gain map to obtain a processed image.

[0156] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0157] Based on the above embodiment, as Figure 13 shown, exemplarily, the above apparatus further includes: a conversion module 13 and an encoding module 14, where:

[0158] A conversion module 13, configured to perform conversion processing on an initial image to obtain a first basic image and an original gain map;

[0159] An encoding module 14, configured to perform encoding processing on the first basic image and the original gain map to obtain an original image.

[0160] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0161] Based on the above embodiment, as Figure 14 shown, exemplarily, the above apparatus further includes: a second acquisition module 15, a third acquisition module 16, and a replacement module 17, where:

[0162] The second acquisition module 15 is configured to obtain a target image block of a target display image in response to a watermark removal instruction; the target image block includes watermark information;

[0163] The third acquisition module 16 is configured to obtain a replacement image block corresponding to the target image block;

[0164] The replacement module 17 is configured to replace the target image block with the replacement image block to obtain a watermark-removed image.

[0165] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0166] Based on the above embodiment, as Figure 15 shown, exemplarily, the above third acquisition module 16 includes: a conversion unit 161, a second acquisition unit 162, a third acquisition unit 163, and a fusion unit 164, where:

[0167] The conversion unit 161 is configured to convert an initial image of a target display image to obtain a second basic image corresponding to the initial image and a shooting gain map;

[0168] The second acquisition unit 162 is configured to use the region corresponding to the target image block in the second basic image as a region basic image;

[0169] The third acquisition unit 163 is configured to use the region corresponding to the target image block in the shooting gain map as a region gain map;

[0170] The fusion unit 164 is configured to perform fusion processing on the region basic image and the region gain map to obtain a replacement image block.

[0171] The image processing apparatus provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0172] Each module in the above image processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the electronic device in hardware form or be independent of it, or can be stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0173] In one embodiment, a computer device is provided. The computer device can be an electronic device, and its internal structure diagram can be as Figure 16 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program, when executed by the processor, implements an image processing method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0174] Those skilled in the art can understand that Figure 16 the structure shown in

[0175] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0176] Respond to the image processing instruction and obtain the processing parameters corresponding to the image processing instruction;

[0177] Adjust the shooting parameters of the target display image according to the processing parameters to obtain adjustment parameters;

[0178] Process the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; the original image is an image obtained by encoding the initial image; the target display image is an image obtained by processing the initial image using the shooting parameters.

[0179] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0180] Decode the original image to obtain the first bitmap and the first gain map of the original image;

[0181] Process the first bitmap and the first gain map according to the adjustment parameters to obtain a processed image.

[0182] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0183] Fuse the first bitmap and the first gain map to obtain a fused image of the original image;

[0184] Apply the adjustment parameters to the fused image to obtain a processed image.

[0185] In one embodiment, the adjustment parameters include a blurring adjustment parameter, a filter adjustment parameter, and a watermark adjustment parameter; when the processor executes the computer program, the following steps are further implemented:

[0186] Apply the blurring adjustment parameter to the fused image to obtain a first processed image;

[0187] Process the first processed image according to the filter adjustment parameter and the watermark adjustment parameter to obtain a processed image.

[0188] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0189] Apply the filter adjustment parameter to the first processed image to obtain a second processed image;

[0190] Obtain the second bitmap and the second gain map of the second processed image;

[0191] Apply the watermark adjustment parameter to the second bitmap to obtain a third bitmap;

[0192] Apply the watermark adjustment parameter to the second gain map to obtain a third gain map;

[0193] Fuse the third bitmap and the third gain map to obtain a processed image.

[0194] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0195] Perform conversion processing on the initial image to obtain a first basic image and an original gain map;

[0196] Perform encoding processing on the first basic image and the original gain map to obtain an original image.

[0197] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0198] Respond to the watermark removal instruction to obtain a target image block of the target display image; the target image block includes watermark information;

[0199] Obtain a replacement image block corresponding to the target image block;

[0200] Use the replacement image block to replace the target image block to obtain an image after watermark removal.

[0201] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0202] Convert the initial image of the target display image to obtain a second basic image corresponding to the initial image and a shooting gain map;

[0203] Use the area corresponding to the target image block in the second basic image as the area basic image;

[0204] Use the area corresponding to the target image block in the shooting gain map as the area gain map;

[0205] Perform fusion processing on the area basic image and the area gain map to obtain a replacement image block.

[0206] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0207] Respond to the image processing instruction to obtain processing parameters corresponding to the image processing instruction;

[0208] Adjust the shooting parameters of the target display image according to the processing parameters to obtain adjustment parameters;

[0209] Process the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; the original image is the image obtained after encoding processing of the initial image; the target display image is the image obtained after processing the initial image with the shooting parameters.

[0210] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0211] Decode the original image to obtain the first bitmap and the first gain map of the original image;

[0212] Process the first bitmap and the first gain map according to the adjustment parameters to obtain the processed image.

[0213] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0214] Fuse the first bitmap and the first gain map to obtain the fused image of the original image;

[0215] Apply the adjustment parameters to the fused image to obtain the processed image.

[0216] In one embodiment, the adjustment parameters include a blurring adjustment parameter, a filter adjustment parameter, and a watermark adjustment parameter; when the computer program is executed by a processor, the following steps are further implemented:

[0217] Apply the blurring adjustment parameter to the fused image to obtain the first processed image;

[0218] Process the first processed image according to the filter adjustment parameter and the watermark adjustment parameter to obtain the processed image.

[0219] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0220] Apply the filter adjustment parameter to the first processed image to obtain the second processed image;

[0221] Obtain the second bitmap and the second gain map of the second processed image;

[0222] Apply the watermark adjustment parameter to the second bitmap to obtain the third bitmap;

[0223] Apply the watermark adjustment parameter to the second gain map to obtain the third gain map;

[0224] Fuse the third bitmap and the third gain map to obtain the processed image.

[0225] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0226] Convert the initial image to obtain the first base image and the original gain map;

[0227] Encode the first base image and the original gain map to obtain the original image.

[0228] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0229] In response to a watermark removal instruction, obtain a target image block of the target display image; the target image block includes watermark information;

[0230] Obtain a replacement image block corresponding to the target image block;

[0231] Use the replacement image block to replace the target image block to obtain an image without watermark.

[0232] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0233] Convert the initial image of the target display image to obtain a second base image and a shooting gain map corresponding to the initial image;

[0234] Use the area corresponding to the target image block in the second base image as the area base image;

[0235] Use the area corresponding to the target image block in the shooting gain map as the area gain map;

[0236] Fuse the area base image and the area gain map to obtain a replacement image block.

[0237] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor implements the following steps:

[0238] In response to an image processing instruction, obtain processing parameters corresponding to the image processing instruction;

[0239] Adjust the shooting parameters of the target display image according to the processing parameters to obtain adjustment parameters;

[0240] Process the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; the original image is an image obtained by encoding the initial image; the target display image is an image obtained by processing the initial image with the shooting parameters.

[0241] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0242] Decode the original image to obtain the first bitmap and the first gain map of the original image;

[0243] Process the first bitmap and the first gain map according to the adjustment parameters to obtain a processed image.

[0244] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0245] Fuse the first bitmap and the first gain map to obtain a fused image of the original image;

[0246] Apply the adjustment parameters to the fused image to obtain the processed image.

[0247] In one embodiment, the adjustment parameters include blurring adjustment parameters, filter adjustment parameters, and watermark adjustment parameters; when the computer program is executed by a processor, the following steps are further implemented:

[0248] Apply the blurring adjustment parameters to the fused image to obtain the first processed image;

[0249] Process the first processed image according to the filter adjustment parameters and the watermark adjustment parameters to obtain the processed image.

[0250] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0251] Apply the filter adjustment parameters to the first processed image to obtain the second processed image;

[0252] Obtain the second bitmap and the second gain map of the second processed image;

[0253] Apply the watermark adjustment parameters to the second bitmap to obtain the third bitmap;

[0254] Apply the watermark adjustment parameters to the second gain map to obtain the third gain map;

[0255] Fuse the third bitmap and the third gain map to obtain the processed image.

[0256] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0257] Perform a conversion process on the initial image to obtain the first base image and the original gain map;

[0258] Perform an encoding process on the first base image and the original gain map to obtain the original image.

[0259] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0260] Respond to the watermark removal instruction to obtain the target image block of the target display image; the target image block includes watermark information;

[0261] Obtain the replacement image block corresponding to the target image block;

[0262] Replace the target image block with the replacement image block to obtain the watermark-removed image.

[0263] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0264] Convert the initial image of the target display image to obtain a second basic image corresponding to the initial image and a shooting gain map;

[0265] Use the area corresponding to the target image block in the second basic image as the area basic image;

[0266] Use the area corresponding to the target image block in the shooting gain map as the area gain map;

[0267] Perform a fusion process on the area basic image and the area gain map to obtain a replacement image block.

[0268] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the various embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0269] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0270] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. An image processing method, characterized in that, The method includes: In response to an image processing instruction, obtaining processing parameters corresponding to the image processing instruction; Adjusting shooting parameters of a target display image according to the processing parameters to obtain adjustment parameters; Processing an original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; the original image is an image obtained by encoding an initial image; the target display image is an image obtained by processing the initial image using the shooting parameters.

2. The method according to claim 1, wherein The processing the original image corresponding to the target display image according to the adjustment parameters to obtain a processed image includes: Performing a decoding process on the original image to obtain a first bitmap and a first gain map of the original image; Processing the first bitmap and the first gain map according to the adjustment parameters to obtain the processed image.

3. The method according to claim 2, wherein The processing the first bitmap and the first gain map according to the adjustment parameters to obtain the processed image includes: Performing a fusion process on the first bitmap and the first gain map to obtain a fused image of the original image; Applying the adjustment parameters to the fused image to obtain the processed image.

4. The method according to claim 3, characterized in that The adjustment parameters include a blurring adjustment parameter, a filter adjustment parameter, and a watermark adjustment parameter; applying the adjustment parameters to the fused image to obtain the processed image includes: Applying the blurring adjustment parameter to the fused image to obtain a first processed image; Processing the first processed image according to the filter adjustment parameter and the watermark adjustment parameter to obtain the processed image.

5. The method according to claim 4, characterized in that, The processing the first processed image according to the filter adjustment parameter and the watermark adjustment parameter to obtain the processed image includes: Applying the filter adjustment parameter to the first processed image to obtain a second processed image; Obtaining a second bitmap and a second gain map of the second processed image; Applying the watermark adjustment parameter to the second bitmap to obtain a third bitmap; Applying the watermark adjustment parameter to the second gain map to obtain a third gain map; Performing a fusion process on the third bitmap and the third gain map to obtain the processed image.

6. The method according to any one of claims 1 to 5, characterized in that The method further includes: Performing a conversion process on the initial image to obtain a first basic image and an original gain map; Encoding the first basic image and the original gain map to obtain the original image.

7. The method according to any one of claims 1 to 5, characterized in that The method includes: In response to a watermark removal instruction, obtaining a target image block of the target display image; the target image block includes watermark information; Obtaining a replacement image block corresponding to the target image block; Replacing the target image block with the replacement image block to obtain a watermark-removed image.

8. The method according to claim 7, characterized in that The obtaining a replacement image block corresponding to the target image block includes: Converting the initial image of the target display image to obtain a second basic image and a shooting gain map corresponding to the initial image; Taking a region of the second basic image corresponding to the target image block as a region basic image; Taking a region of the shooting gain map corresponding to the target image block as a region gain map; Fuse the regional base image and the regional gain map to obtain the replacement image block.

9. An image processing apparatus, characterized in that, The device includes: A first acquisition module, configured to respond to an image processing instruction and acquire processing parameters corresponding to the image processing instruction; An adjustment module, configured to adjust shooting parameters of a target display image according to the processing parameters to obtain adjustment parameters; A processing module, configured to process an original image corresponding to the target display image according to the adjustment parameters to obtain a processed image; the original image is an image obtained by encoding an initial image; the target display image is an image obtained by processing the initial image using the shooting parameters.

10. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.