Image processing method and device, electronic equipment and storage medium

By first adjusting the resolution and then performing processing operations in high-resolution image processing, the problems of high-resolution image processing delay and slow system response are solved, and processing fluency is improved.

CN120070181APending Publication Date: 2025-05-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510134536.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

During high-resolution image processing, huge calculations lead to high processing delays, slow system responses and even stuttering and crashing.

Method used

When the target processing operation is the first type, the image resolution is adjusted first and then the target processing operation is performed, the resolution threshold is reduced and the target resolution value is determined according to the terminal screen area size.

Benefits of technology

This reduces the computing power overhead of target processing operations, improves the fluency of image processing, and reduces the phenomenon of processing delay and slow system response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070181A_ABST
    Figure CN120070181A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and apparatus, an electronic device and a storage medium. The method comprises the steps of obtaining a target image and a target processing operation for the target image; if the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is a first type, reducing the resolution of the target image; the first type is a processing operation type of the same image obtained by uniformly adjusting the processed versions with different resolutions to the same resolution after the processing operation is executed on the versions with different resolutions of the same image; and executing the target processing operation on the target image of which the resolution is reduced. The computing power overhead of target processing operation can be reduced, the smoothness of the image processing process is improved, and the probability that the processing delay is too high, the system response is slow and even the phenomena such as jamming and crash occur is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, apparatus, electronic device, and storage medium. Background Art

[0002] In today's digital age, image processing technologies play a crucial role in numerous fields. Whether it is in computer vision, medical image analysis, film and television production, or satellite remote sensing image processing and other fields, various processing operations on images are widely involved. However, processing high-resolution images faces many challenges. Due to the huge number of pixels contained in high-resolution images, when processing them, the amount of computation will increase exponentially. This huge computing power overhead directly leads to difficulties in the smooth progress of the image processing process, which is specifically manifested as phenomena such as excessive processing delays, slow system responses, or even freezing and crashing. Therefore, how to improve the image processing rate of high-resolution images is an urgent problem to be solved at present. Summary of the Invention

[0003] To solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image processing method, apparatus, electronic device, and storage medium.

[0004] In a first aspect, the present disclosure provides an image processing method, including:

[0005] Obtaining a target image and a target processing operation for the target image;

[0006] If the current resolution of the target image is greater than or equal to a preset resolution threshold, and the type of the target processing operation is a first type, reducing the resolution of the target image; the first type is a type of processing operation in which after processing operations are performed on different resolution versions of the same image, the processed different resolution versions are then uniformly adjusted to the same resolution, and the resulting images are the same;

[0007] Performing the target processing operation on the target image after reducing the resolution.

[0008] In a second aspect, the present disclosure further provides an image processing apparatus, including:

[0009] An obtaining module, configured to obtain a target image and a target processing operation for the target image;

[0010] An adjustment module, configured to reduce the resolution of the target image if the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is the first type; the first type is a type of processing operation in which after processing operations are performed on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the resulting images are the same.

[0011] A processing module, configured to perform the target processing operation on the target image with the reduced resolution.

[0012] In a third aspect, the present disclosure further provides an electronic device, which includes:

[0013] One or more processors;

[0014] A storage device, configured to store one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.

[0016] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the image processing method as described above is implemented.

[0017] The technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art:

[0018] The technical solution provided by the embodiments of the present disclosure is configured to reduce the resolution of the target image if the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is the first type; the first type is a type of processing operation in which after processing operations are performed on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the resulting images are the same; and perform the target processing operation on the target image with the reduced resolution. Since the same image of different resolution versions processed by the first type of processing operation is the same after being adjusted to the same resolution. This indicates that performing the first type of processing operation on the image first and then adjusting the resolution is visually consistent with performing the first type of processing operation after adjusting the resolution first. However, compared with the solution of performing the first type of processing operation first and then adjusting the resolution, the computing power overhead of adjusting the resolution first and then performing the first type of processing operation is lower. The essence of the above technical solution is that when the target processing operation is the first type of processing operation, adjusting the image resolution first and then performing the target processing operation can reduce the computing power overhead of the target processing operation, improve the fluency of the image processing process, and reduce the probability of phenomena such as too high processing delay, slow system response, or even freezing and crashing. Description of the Drawings

[0019] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.

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

[0021] Figure 1 A flowchart of an image processing method provided for an embodiment of the present disclosure;

[0022] Figure 2 A schematic diagram of a terminal screen provided for an embodiment of the present disclosure;

[0023] Figure 3 A schematic structural diagram of an image processing device in an embodiment of the present disclosure;

[0024] Figure 4 A schematic structural diagram of an electronic device in an embodiment of the present disclosure. Detailed implementation manners

[0025] In order to be able to more clearly understand the above objects, features, and advantages of the present disclosure, the following will further describe the solutions of the present disclosure. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.

[0026] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.

[0027] Figure 1 A flowchart of an image processing method provided for an embodiment of the present disclosure. This embodiment is applicable to the situation of performing image processing in a client. This method can be executed by an image processing device, which can be implemented in a software and / or hardware manner, and the device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a personal digital assistant, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one computer, a smart home device, etc. Alternatively, this embodiment is applicable to the situation of performing image processing in a server. This method can be executed by an image processing device, which can be implemented in a software and / or hardware manner, and the device can be configured in an electronic device, such as a server.

[0028] Such asFigure 1 As shown in Figure 1 , the method may specifically include:

[0029] S110. Obtain a target image and a target processing operation for the target image.

[0030] The target image may be, for example, an image to be processed and is the processing object of the target processing operation. Optionally, the target image may be an image taken or uploaded by a user, or an image downloaded from the network. The target image may be, for example, a static image, a dynamic image, or an image frame in a video.

[0031] The target processing operation is a specific processing operation for the target image. This application does not limit what the specific target processing operation is. Exemplarily, the target processing operation may be, for example, an import operation, a scaling operation, a cropping operation, a skin smoothing operation, a filter operation, a sharpening operation, an operation of adding text or adding stickers, etc., for the target image.

[0032] S120. If the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is the first type, reduce the resolution of the target image; the first type is a type of processing operation in which, after performing processing operations on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the resulting images are the same.

[0033] The current resolution of the target image may be, for example, the resolution of the target image at the moment when the target processing operation for the target image is detected. It should be noted that the target image has an original resolution. The original resolution of the target image is the image resolution when the target image is initially created or obtained. Since, during the process of processing the target image, it may involve one or more resolution adjustments to the target image, the current resolution of the target image may be equal to the original resolution of the target image or may not be equal to the original resolution of the target image when the target processing operation for the target image is detected.

[0034] The preset resolution threshold is a pre-specified resolution threshold used to measure whether the current resolution of the target image is too large. If the current resolution of the target image is greater than or equal to the preset resolution threshold, it means that the current resolution of the target image is too large. If the target processing operation is directly performed on the target image, it may cause huge computing power overhead. If the current resolution of the target image is less than the preset resolution threshold, it means that the current resolution of the target image is relatively small. If the target processing operation is directly performed on the target image, the computing power overhead is relatively small.

[0035] It should be noted that in some usage scenarios of the technical solution provided in this application, the resolution adjustment is mainly divided into two categories. One is to reduce the image resolution so that the resolution of the reduced image is lower than its original resolution, in order to reduce the computing power overhead of image processing. The other is to increase the image resolution so that the increased image resolution is the same as its original resolution, in order to ensure that the effect of image processing is better and reliable. In other words, in some usage scenarios of the technical solution of this application, when the current resolution of the target image is greater than or equal to the preset resolution threshold, it means that the current resolution of the target image is the original resolution of the target image. When the current resolution of the target image is less than the preset resolution threshold, it means that the current resolution of the target image is lower than the original resolution of the target image.

[0036] In practice, the types of processing operations can be set to include a first type and a second type.

[0037] The first type is a type of processing operation in which after performing processing operations on different resolution versions of the same image, the different resolution versions after the processing operations are then uniformly adjusted to the same resolution, and the resulting images are the same. Exemplarily, the processing operations belonging to the first type may include at least one of the following: rotation, flipping, translation, scaling, import, cropping, and color space conversion of the image, etc. Among them, "the resulting images are the same" may include, for example, that the resulting images are consistent in terms of details and color accuracy.

[0038] The second type is a type of processing operation in which after performing processing operations on different resolution versions of the same image, the different resolution versions after the processing operations are then uniformly adjusted to the same resolution, and the resulting images are different. Exemplarily, the processing operations belonging to the second type may include at least one of the following: adding a skin smoothing effect, a filtering effect, and sharpening. Among them, "the resulting images are different" may be manifested, for example, as differences in the resulting images in terms of details and / or color accuracy. Such differences may stem from changes in pixel values or may also be reflected in changes at the pixel level such as pixel arrangement and pixel - to - pixel relationships.

[0039] There are various specific implementation methods for this step, and this application does not limit it. Exemplarily, the implementation method of this step includes: if the type of the target processing operation is the first type, determining the size of the area on the current terminal screen for displaying the target image; based on the size of the area on the current terminal screen for displaying the target image, determining the target resolution value; adjusting the resolution of the target image to be equal to the target resolution value. Here, the terminal refers to the current terminal used to display the target image. Exemplarily, see Figure 2, in the terminal screen, if area 1 is used to display the target image, when it is determined that the resolution of the target image needs to be reduced, the specific resolution value to which the resolution of the target image needs to be reduced is determined in combination with the size of area 1. The purpose of this setting is to consider the display effect of the target image while reducing the resolution of the target image, so as to achieve the purpose of seeking a balance between ensuring the clear visual effect of the target image and reducing the computing power overhead.

[0040] In some embodiments, optionally, "determining the target resolution value based on the size of the area in the current terminal screen for displaying the target image" may include: determining the target resolution value based on the size of the area in the current terminal screen for displaying the target image and the target processing operation.

[0041] In practice, performing a target processing operation on the target image can be regarded as adjusting the parameters of the target image. The target processing operation includes information such as which parameters are adjusted and the adjustment amplitude. By setting the target processing operation to be considered when determining the target resolution value, the purpose is to estimate the visual performance of the image after performing the target processing operation on the target image by means of the target processing operation, so as to avoid the situation where the finally presented target image is distorted due to excessive reduction of the resolution of the target image.

[0042] In other embodiments, optionally, determining the target resolution value based on the size of the area in the current terminal screen for displaying the target image includes: in a preset plurality of resolution levels, determining the target level based on the size of the area in the current terminal screen for displaying the target image; each resolution level has a corresponding resolution value; and taking the resolution value corresponding to the target level as the target resolution value.

[0043] Exemplarily, assume that a total of 3 resolution levels are set, namely level 1, level 2, and level 3. The resolution value corresponding to level 1 is 1280×720, the resolution value corresponding to level 2 is 1920×1080, and the resolution value corresponding to level 3 is 3840×2160. If the current resolution of the target image is 7680×4320 and the resolution of the target image needs to be reduced, one of the above three levels can be selected as the target level according to the size of the area in the current terminal screen for displaying the target image. By adjusting the resolution of the target image to the resolution value corresponding to the target level, the purpose of reducing the resolution of the target image is achieved.

[0044] If resolution levels are preset, the rendering process can be pre-constructed or optimized for these resolution levels. When the resolution needs to be adjusted, it is possible to quickly select an appropriate rendering pipeline from the rendering pipelines corresponding to the preset resolution levels for rendering, without the need to construct or optimize the rendering pipeline in real time, which can improve the rendering speed and thus quickly obtain the target image after resolution adjustment.

[0045] Similarly, determining the target resolution value based on the size of the area on the current terminal screen for displaying the target image and the target processing operation may include: determining the target level among a preset plurality of resolution levels based on the size of the area on the current terminal screen for displaying the target image and the target processing operation; each resolution level has a corresponding resolution value; and taking the resolution value corresponding to the target level as the target resolution value. Such a setting can also improve the rendering speed and thus quickly obtain the target image after resolution adjustment.

[0046] S130. Perform a target processing operation on the target image after reducing the resolution.

[0047] In the above technical solution, if the current resolution of the target image is greater than or equal to the preset resolution threshold and the type of the target processing operation is the first type, the resolution of the target image is reduced; the first type is a type of processing operation in which, after performing processing operations on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the resulting images are the same; and a target processing operation is performed on the target image after reducing the resolution. Since the same image of different resolution versions processed by the first type of processing operation is the same after being adjusted to the same resolution. This shows that performing the first type of processing operation on the image first and then adjusting the resolution is visually consistent with adjusting the resolution first and then performing the first type of processing operation. However, compared with the solution of performing the first type of processing operation first and then adjusting the resolution, the computing power overhead of adjusting the resolution first and then performing the first type of processing operation is lower. The essence of the above technical solution is that when the target processing operation is the first type of processing operation, adjusting the image resolution first and then performing the target processing operation can reduce the computing power overhead of the target processing operation, improve the fluency of the image processing process, and reduce the probability of phenomena such as excessive processing delay, slow system response, and even freezing and crashing.

[0048] On the basis of the above technical solution, optionally, if the current resolution of the target image is greater than or equal to the preset resolution threshold, and the type of the target processing operation is the second type, perform the target processing operation on the target image; the second type is a type of processing operation obtained by performing processing operations on different resolution versions of the same image and then uniformly adjusting the processed different resolution versions to the same resolution. Here, "performing the target processing operation on the target image" means directly performing the target processing operation on the target image without adjusting the resolution of the target image.

[0049] Since the images obtained after adjusting different resolution versions of the same image processed by the second type of processing operation to the same resolution are different. This indicates that there are differences in the visual performance of the image between the scheme of first adjusting the image to a small resolution, performing the second type of processing operation on the small-resolution image, and then converting the small-resolution image into a large-resolution image, and the scheme of directly performing the second type of processing operation on the large-resolution image. In this case, to ensure that the high-resolution image has a better visual effect, the target processing operation should be directly performed on the high-resolution target image.

[0050] On the basis of the above technical solutions, optionally, the method may further include: in response to a save instruction for the processed target image, determining whether the resolution of the current target image is the same as the original resolution of the target image; the original resolution of the target image is the image resolution when the target image was initially created or acquired; the original resolution of the target image is greater than or equal to the preset resolution threshold; if the resolution of the current target image is different from the original resolution of the target image, adjust the resolution of the target image to be equal to the original resolution of the target image; save the target image adjusted to the original resolution. In some scenarios, optionally, "the resolution of the current target image is different from the original resolution of the target image" includes: the resolution of the current target image is less than the original resolution of the target image. The purpose of this setting is to save the processed target image as a high-resolution image when it is necessary to save the processed target image, so as to ensure that the saved image has high quality. It should also be noted that in practice, compared with low-resolution images, high-resolution images have finer details, higher clarity, and greater potential for post-processing. High-resolution images have a wider range of usage scenarios than low-resolution images, so high-resolution images are saved here.

[0051] Based on the above technical solutions, optionally, if the current resolution of the target image is less than the preset resolution threshold and the type of the target processing operation is the second type, adjust the resolution of the target image to the original resolution of the target image; the second type is a type of processing operation obtained by performing processing operations on different resolution versions of the same image and then uniformly adjusting the processed different resolution versions to the same resolution; perform the target processing operation on the target image at the original resolution.

[0052] The current resolution of the target image being less than the preset resolution threshold means that the current resolution of the target image is relatively low. Since there are differences in the visual performance of the image between the scheme of first adjusting the image to a small resolution, performing a second-type processing operation on the small-resolution image, and then converting the small-resolution image into a large-resolution image, and the scheme of directly performing a second-type processing operation on the large-resolution image. By setting that if the current resolution of the target image is less than the preset resolution threshold and the type of the target processing operation is the second type, adjust the resolution of the target image to the original resolution of the target image; perform the target processing operation on the target image at the original resolution. The purpose is to ensure that the finally obtained high-resolution image has a better visual effect, first convert the low-resolution image into a high-resolution image, and then directly perform the target processing operation on the high-resolution target image.

[0053] Optionally, if the current resolution of the target image is less than the preset resolution threshold and the type of the target processing operation is the first type, perform the target processing operation on the target image. Here, "performing the target processing operation on the target image" means directly performing the target processing operation on the target image without adjusting the resolution of the target image.

[0054] The following describes the solution provided by this application in combination with a specific scenario.

[0055] Suppose a user wishes to process a certain image. According to the image processing sequence, there are a total of 4 steps, namely importing the image into an image editing application, cropping the image, retouching the image, and saving the image. This image is the target image, and the first three steps above are three processing operations on the target image. During the execution of each of the first three steps, the operation involved in that step is the target processing operation. Among them, the type of the import operation corresponding to the first step, and the type of the cropping operation corresponding to the second step are both of the first type. The type of the retouching operation corresponding to the third step is of the second type. Suppose there are 3 resolution levels set, namely level 1, level 2, and level 3. The resolution value corresponding to level 1 is 1280×720, the resolution value corresponding to level 2 is 1920×1080, and the resolution value corresponding to level 3 is 3840×2160. The original resolution of this image is 7680×4320, and the preset resolution threshold is 7680×4320.

[0056] When the first step is executed, the current resolution of the image is equal to the original resolution, equal to the preset resolution threshold, and the type of the import operation corresponding to the first step is of the first type. Determine the target level among the three resolution levels. Suppose the target level determined this time is level 1. First, adjust the resolution of the image to 1280×720, and then display the image on the terminal screen. After the first step is completed, the resolution of the image is 1280×720.

[0057] When the second step is executed, the current resolution of the image is equal to the resolution of the image after the first step is completed, which is 1280×720, less than the preset resolution threshold, and the type of the import operation corresponding to the second step is of the first type. There is no need to adjust the resolution of the image. Directly crop the image and display the cropped image on the terminal screen. After the second step is completed, the resolution of the image is 1280×720.

[0058] When the third step is executed, the current resolution of the image is equal to the resolution of the image after the second step is completed, which is 1280×720, less than the preset resolution threshold, and the type of the import operation corresponding to the third step is of the second type. Adjust the resolution of the image to be equal to the original resolution of the image. After adjustment, the resolution of the image is 7680×4320. Retouch the image and display the retouched image on the terminal screen. After the third step is completed, the resolution of the image is 7680×4320.

[0059] When the fourth step is executed, the current resolution of the image is equal to the resolution of the image after the third step is completed, which is 7680×4320 and equal to the original resolution of the image. The image is directly saved. The resolution of the saved image is 7680×4320.

[0060] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0061] For example, when receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be executed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that executes the operations of the technical solutions of the present disclosure according to the prompt message.

[0062] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0063] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not limit the implementation manners of the present disclosure, and other manners that meet relevant laws and regulations can also be applied to the implementation manners of the present disclosure.

[0064] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0065] Figure 3 It is a schematic structural diagram of an image processing apparatus in an embodiment of the present disclosure. The image processing apparatus provided in the embodiments of the present disclosure can be configured in a client or can be configured in a server. Refer to Figure 3 , the image processing apparatus specifically includes:

[0066] An acquisition module 310, configured to acquire a target image and a target processing operation for the target image;

[0067] An adjustment module 320, configured to reduce the resolution of the target image if the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is a first type; the first type is a type of processing operation in which after processing operations are performed on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the obtained images are the same.

[0068] A processing module 330, configured to perform the target processing operation on the target image after the resolution is reduced.

[0069] Further, the adjustment module 320 is configured to:

[0070] If the type of the target processing operation is the first type, determine the size of the area on the current terminal screen for displaying the target image;

[0071] Based on the size of the area on the current terminal screen for displaying the target image, determine a target resolution value;

[0072] Adjust the resolution of the target image to be equal to the target resolution value.

[0073] Further, the adjustment module 320 is configured to:

[0074] Based on the size of the area on the current terminal screen for displaying the target image and the target processing operation, determine a target resolution value.

[0075] Further, the adjustment module 320 is configured to:

[0076] Among a preset plurality of resolution levels, based on the size of the area on the current terminal screen for displaying the target image and the target processing operation, determine a target level; the resolution level has a corresponding resolution value;

[0077] Use the resolution value corresponding to the target level as the target resolution value.

[0078] Further, the adjustment module 320 is further configured to:

[0079] If the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is a second type, perform the target processing operation on the target image; the second type is a type of processing operation in which after processing operations are performed on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the obtained images are different.

[0080] Further, the device further includes a storage module, configured to:

[0081] In response to a save instruction for the processed target image, determine whether the current resolution of the target image is the same as the original resolution of the target image; the original resolution of the target image is the image resolution when the target image was initially created or acquired; the original resolution of the target image is greater than or equal to the preset resolution threshold;

[0082] If the current resolution of the target image is different from the original resolution of the target image, adjust the resolution of the target image to be equal to the original resolution of the target image;

[0083] Save the target image whose resolution has been adjusted to the original resolution.

[0084] Furthermore, the adjustment module 320 is further configured to:

[0085] If the current resolution of the target image is less than the preset resolution threshold, and the type of the target processing operation is the second type, adjust the resolution of the target image to the original resolution of the target image; the second type is a type of processing operation obtained by performing processing operations on different resolution versions of the same image and then uniformly adjusting the different resolution versions after the processing operations to the same resolution, resulting in different processed images;

[0086] Perform the target processing operation on the target image at the original resolution.

[0087] The image processing apparatus provided by the embodiments of the present disclosure can execute the steps performed by the client or the server in the image processing method provided by the method embodiments of the present disclosure, and has the execution steps and beneficial effects, which will not be elaborated here.

[0088] Figure 4 It is a schematic structural diagram of an electronic device in the embodiments of the present disclosure. Specifically refer to the following Figure 4 , which shows a schematic structural diagram of the electronic device 1000 suitable for implementing the embodiments of the present disclosure. The electronic device 1000 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 4 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0089] Such as Figure 4As shown, the electronic device 1000 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1001, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1008 into the random access memory (RAM) 1003 to implement the image processing method as in the embodiments of the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.

[0090] Generally, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or wiredly to exchange information. Although Figure 4 the electronic device 1000 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0091] In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the methods shown in the flowcharts, so as to implement the image processing method as above. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments of the present disclosure are executed.

[0092] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include an information signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated information signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0093] In some embodiments, the client and the server can communicate using any known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital information in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any known or future-developed networks.

[0094] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.

[0095] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to:

[0096] Obtain a target image and a target processing operation for the target image;

[0097] If the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is of the first type, reduce the resolution of the target image; the first type is a type of processing operation in which, after performing processing operations on different resolution versions of the same image, the different resolution versions after the processing operations are uniformly adjusted to the same resolution, and the resulting images are the same;

[0098] Perform the target processing operation on the target image with the reduced resolution.

[0099] Optionally, when one or more of the above programs are executed by the electronic device, the electronic device may also perform the other steps of the above embodiments.

[0100] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0101] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0102] The units involved in the embodiments of the present disclosure may be implemented in software or in hardware. In some cases, the name of a unit does not constitute a limitation on the unit itself.

[0103] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, the types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0104] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0105] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0106] One or more processors;

[0107] A memory for storing one or more programs;

[0108] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the image processing methods provided by the present disclosure.

[0109] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements any of the image processing methods provided by the present disclosure.

[0110] The embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the above image processing method.

[0111] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0112] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image processing method, characterized in that: include: Acquire a target image and a target processing operation on the target image; If the current resolution of the target image is greater than or equal to the preset resolution threshold, and the type of the target processing operation is the first type, reducing the resolution of the target image; the first type is to perform processing operations on different resolution versions of the same image, and then uniformly adjust the different resolution versions that have undergone the processing operation to the same resolution, so that the obtained images have the same processing operation type; The target processing operation is performed on the target image after reducing the resolution.

2. The method according to claim 1, characterized in that: If the type of the target processing operation is the first type, reducing the resolution of the target image includes: If the type of the target processing operation is the first type, determining the size of an area in the current terminal screen for displaying the target image; Determining a target resolution value based on the size of an area on the current terminal screen for displaying the target image; The resolution of the target image is adjusted to be equal to the target resolution value.

3. The method according to claim 2, characterized in that The determining of the target resolution value based on the size of the area for displaying the target image in the current terminal screen includes: A target resolution value is determined based on the size of an area in a current terminal screen for displaying the target image and the target processing operation.

4. The method according to claim 3, characterized in that The determining of the target resolution value based on the size of the area for displaying the target image in the current terminal screen and the target processing operation includes: Among the preset multiple resolution levels, a target level is determined based on the size of the area for displaying the target image in the current terminal screen and the target processing operation; the resolution level has a resolution value corresponding thereto; The resolution value corresponding to the target gear position is used as the target resolution value.

5. The method according to claim 1, characterized in that Also includes: If the current resolution of the target image is greater than or equal to a preset resolution threshold, and the type of the target processing operation is the second type, the target processing operation is performed on the target image; the second type is to perform processing operations on different resolution versions of the same image, and then uniformly adjust the different resolution versions that have undergone the processing operation to the same resolution, so that the resulting images have different processing operation types.

6. The method according to claim 1, characterized in that Also includes: In response to a save instruction for the processed target image, determining whether a current resolution of the target image is the same as an original resolution of the target image; The original resolution of the target image is the image resolution when the target image is initially created or acquired; The original resolution of the target image is greater than or equal to the preset resolution threshold; If the current resolution of the target image is different from the original resolution of the target image, adjusting the resolution of the target image to be equal to the original resolution of the target image; The target image adjusted to the original resolution is saved.

7. The method according to claim 1, characterized in that Also includes: If the current resolution of the target image is less than the preset resolution threshold, and the type of the target processing operation is the second type, the resolution of the target image is adjusted to the original resolution of the target image; the second type is to perform processing operations on different resolution versions of the same image, and then uniformly adjust the different resolution versions that have undergone the processing operation to the same resolution, so that the obtained images are of different processing operation types; The target processing operation is performed on the target image at the native resolution.

8. An image processing device, characterized in that: include: An acquisition module, used for acquiring a target image and performing a target processing operation on the target image; an adjustment module, configured to reduce the resolution of the target image if the current resolution of the target image is greater than or equal to a preset resolution threshold and the type of the target processing operation is a first type; the first type is to perform processing operations on different resolution versions of the same image and then uniformly adjust the different resolution versions that have undergone the processing operations to the same resolution, so that the obtained images have the same processing operation type; A processing module is used to perform the target processing operation on the target image after reducing the resolution.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

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