Image processing method and device, electronic equipment and storage medium

By acquiring the running status and performance parameters of the terminal device, the appropriate filtering algorithm and processing strategy are determined, which solves the problem of video quality processing stuttering on mobile devices and achieves efficient video quality processing.

CN115170439BActive Publication Date: 2026-05-15BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2022-08-17
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing video quality processing methods are prone to causing device lag on mobile devices due to the complexity of sharpening filtering algorithms and limitations in computing power, and cannot guarantee video quality processing on mobile devices with different computing capabilities.

Method used

By obtaining the current operating status and performance attribute parameters of the terminal, the target filtering algorithm and image processing strategy are determined. The accelerated image processing algorithm and the target filtering algorithm are used to sharpen the image to be processed, adapting to the data processing capabilities of the terminal.

Benefits of technology

It improves image processing efficiency and success rate, ensuring efficient video quality processing on mobile devices with varying computing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170439B_ABST
    Figure CN115170439B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image processing method, device, electronic equipment, storage medium and computer program product, the method comprising: acquiring a to-be-processed image; acquiring a current running state of a terminal and a target filtering algorithm; the current running state reflects the current data processing capability of the terminal, and the target filtering algorithm is determined based on the performance attribute parameter of the terminal; determining a target image processing strategy corresponding to the current running state according to a mapping relationship between the running state and the image processing strategy; the target image processing strategy at least contains the target filtering algorithm; and performing sharpening processing on the to-be-processed image based on the target image processing strategy to obtain a sharpened target image. By using the method, the image processing efficiency and success rate are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to video processing technology, and more particularly to image processing methods, apparatus, electronic devices, storage media, and computer program products. Background Technology

[0002] With the development of video technology, the secondary creation and forwarding of videos are becoming increasingly frequent. However, these processes can degrade video quality, making the processed videos blurry. Therefore, effective video quality processing methods are crucial for providing users with a better video processing experience.

[0003] Current video image quality processing methods generally employ image sharpening to compensate for image contours, enhance image edges and areas with grayscale abrupt changes, thereby making the image clearer.

[0004] However, current image sharpening methods are limited by the complexity of the sharpening filter algorithm itself and the computing power of the mobile device executing the image sharpening algorithm. This can easily cause problems such as the sharpening filter algorithm failing to run on mobile devices or device lag. Therefore, it is impossible to guarantee video quality processing on mobile devices with different computing capabilities. Summary of the Invention

[0005] This disclosure provides an image processing method, apparatus, electronic device, storage medium, and computer program product to at least solve the problem in related technologies where video images become unclear after secondary creation or forwarding processing. The technical solution of this disclosure is as follows:

[0006] According to a first aspect of the present disclosure, an image processing method is provided, the method comprising:

[0007] Obtain the image to be processed;

[0008] The current operating status of the terminal and the target filtering algorithm are obtained; the current operating status reflects the current data processing capability of the terminal, and the target filtering algorithm is determined based on the performance attribute parameters of the terminal.

[0009] Based on the mapping relationship between the running state and the image processing strategy, a target image processing strategy corresponding to the current running state is determined; the target image processing strategy includes at least a target filtering algorithm.

[0010] Based on the target image processing strategy, the image to be processed is sharpened to obtain the sharpened target image.

[0011] In one embodiment, the target acquisition filtering algorithm includes:

[0012] Obtain the target performance attribute parameters of the terminal;

[0013] Based on the preset correspondence between performance attribute parameters and filtering algorithms, the target filtering algorithm corresponding to the target performance attribute parameters is obtained.

[0014] In one embodiment, the target acquisition filtering algorithm includes:

[0015] Obtain the target performance attribute parameters of the terminal;

[0016] Based on a preset performance level matching strategy, a target performance level that matches the target performance attribute parameter is determined;

[0017] Based on the preset correspondence between performance levels and filtering algorithms, the target filtering algorithm corresponding to the target performance level is obtained.

[0018] In one embodiment, obtaining the current operating state of the terminal includes:

[0019] Obtain the current operating parameter information of the terminal, and determine the current operating status of the terminal based on the operating parameter information.

[0020] In one embodiment, determining the target image processing strategy corresponding to the current operating state based on the mapping relationship between the operating state and the image processing strategy includes:

[0021] When the current running state indicates a first running state, the target image processing strategy corresponding to the current running state is determined as the first processing strategy based on the mapping relationship between the running state and the image processing strategy.

[0022] When the current operating state indicates a second operating state, the target image processing strategy corresponding to the current operating state is determined as the second processing strategy based on the mapping relationship between the operating state and the image processing strategy; the data processing capability corresponding to the second operating state is higher than the data processing capability corresponding to the first operating state.

[0023] In one embodiment, the step of sharpening the image to be processed based on the target image processing strategy to obtain a sharpened target image includes:

[0024] When the target image processing strategy is the first processing strategy, the image to be processed is sharpened based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy to obtain the sharpened target image.

[0025] When the target image processing strategy is the second processing strategy, the image to be processed is sharpened based on the target filtering algorithm included in the second processing strategy to obtain the sharpened target image.

[0026] In one embodiment, the step of sharpening the image to be processed based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy to obtain a sharpened target image includes:

[0027] The image to be processed is sampled according to the first interpolation sampling algorithm to obtain a low-resolution image;

[0028] The low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution detail image;

[0029] According to the second interpolation sampling algorithm, the low-resolution detail image is interpolated and restored to obtain a high-resolution detail image. Then, according to the image to be processed, the high-resolution detail image, and the preset sharpening algorithm, the sharpened target image is obtained.

[0030] In one embodiment, the step of filtering the low-resolution image according to the target filtering algorithm to obtain a low-resolution detail image includes:

[0031] The low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution structure image;

[0032] The pixel values ​​of each pixel in the low-resolution image and the low-resolution structural image are compared to obtain a low-resolution detail image.

[0033] In one embodiment, the step of sharpening the image to be processed based on the target filtering algorithm included in the second processing strategy to obtain a sharpened target image includes:

[0034] According to the target filtering algorithm, the image to be processed is filtered to obtain a high-resolution detail image corresponding to the image to be processed;

[0035] The sharpened image is obtained based on the image to be processed, the high-resolution detail image, and the preset sharpening algorithm.

[0036] In one embodiment, obtaining the sharpened target image based on the image to be processed, the high-resolution detail image, and a preset sharpening algorithm includes:

[0037] Based on the preset sharpening weight coefficients, each of the high-resolution detail images is weighted to obtain an enhanced detail image;

[0038] The pixel values ​​of each pixel in the enhanced detail image and the image to be processed are summed to obtain the sharpened target image.

[0039] According to a second aspect of the present disclosure, an image processing apparatus is provided, the apparatus comprising:

[0040] The first acquisition unit is configured to acquire the image to be processed.

[0041] The second acquisition unit is configured to acquire the current operating state of the terminal and the target filtering algorithm. The current operating state reflects the current data processing capability of the terminal, and the target filtering algorithm is determined based on the performance attribute parameters of the terminal.

[0042] The determining unit is configured to perform a task based on the mapping relationship between the running state and the image processing strategy to determine the target image processing strategy corresponding to the current running state; the target image processing strategy includes at least a target filtering algorithm.

[0043] The processing unit is configured to perform sharpening processing on the image to be processed based on the target image processing strategy to obtain a sharpened target image.

[0044] In one embodiment, the second acquiring unit includes:

[0045] The first acquisition subunit is configured to acquire the target performance attribute parameters of the terminal.

[0046] The second acquisition subunit is configured to execute a target filtering algorithm corresponding to the target performance attribute parameter based on a preset correspondence between performance attribute parameters and filtering algorithms.

[0047] In one embodiment, the second acquiring unit includes:

[0048] The third acquisition subunit is configured to acquire the target performance attribute parameters of the terminal.

[0049] The subunit is configured to execute a target performance level that matches the target performance attribute parameter according to a preset performance level matching strategy.

[0050] The fourth acquisition subunit is configured to execute a target filtering algorithm corresponding to the target performance level based on a preset correspondence between performance level and filtering algorithm.

[0051] In one embodiment, the second acquisition unit is specifically configured to acquire the current operating parameter information of the terminal and determine the current operating state of the terminal based on the operating parameter information.

[0052] In one embodiment, the determining unit includes:

[0053] The first determining subunit is configured to, when the current operating state indicates a first operating state, determine the target image processing strategy corresponding to the current operating state as the first processing strategy based on the mapping relationship between the operating state and the image processing strategy.

[0054] The second determining subunit is configured to, when the current operating state indicates a second operating state, determine the target image processing strategy corresponding to the current operating state as the second processing strategy based on the mapping relationship between the operating state and the image processing strategy; the data processing capability corresponding to the second operating state is higher than the data processing capability corresponding to the first operating state.

[0055] In one embodiment, the processing unit includes:

[0056] The first processing subunit is configured to perform sharpening processing on the image to be processed based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy when the target image processing strategy is the first processing strategy, so as to obtain the sharpened target image.

[0057] The second processing subunit is configured to perform sharpening processing on the image to be processed based on the target filtering algorithm included in the second processing strategy when the target image processing strategy is the second processing strategy, so as to obtain a sharpened target image.

[0058] In one embodiment, the first processing subunit includes:

[0059] The interpolation subunit is configured to perform sampling processing on the image to be processed according to the first interpolation sampling algorithm to obtain a low-resolution image when the target image processing strategy is the first image processing strategy.

[0060] The first filtering subunit is configured to perform filtering processing on the low-resolution image according to the target filtering algorithm to obtain a low-resolution detail image;

[0061] The sharpening subunit is configured to perform interpolation restoration processing on the low-resolution detail image according to the second interpolation sampling algorithm to obtain a high-resolution detail image, and to obtain a sharpened image according to the image to be processed, the high-resolution detail image and the preset sharpening algorithm.

[0062] In one embodiment, the first filtering subunit is configured to perform filtering processing on the low-resolution image according to the target filtering algorithm to obtain a low-resolution structure image;

[0063] And, configured to perform difference processing on the pixel values ​​of each pixel in the low-resolution image and the low-resolution structural image to obtain a low-resolution detail image.

[0064] In one embodiment, the second processing subunit includes:

[0065] The second filtering subunit is configured to perform filtering processing on the image to be processed according to the target filtering algorithm to obtain a high-resolution detail image corresponding to the image to be processed.

[0066] The sharpening subunit is configured to perform a sharpened image based on the image to be processed, the high-resolution detail image, and a preset sharpening algorithm.

[0067] In one embodiment, the sharpening subunit is configured to perform weighted processing on each of the high-resolution detail images according to a preset sharpening weight coefficient to obtain an enhanced detail image;

[0068] The pixel values ​​of each pixel in the enhanced detail image and the image to be processed are summed to obtain the sharpened image.

[0069] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0070] processor;

[0071] Memory used to store the processor's executable instructions;

[0072] The processor is configured to execute the instructions to implement the image processing method as described in any one of the first aspects above.

[0073] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform an image processing method as described in any one of the first aspects above.

[0074] According to a fifth aspect of the present disclosure, a computer program product is provided, wherein when the instructions are executed by a processor of an electronic device, the electronic device is enabled to perform the image processing method described in any one of the first aspects.

[0075] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0076] Not only does it determine the target filtering algorithm through performance attribute parameters, ensuring that the current terminal's data processing capabilities are compatible with the target filtering algorithm, but it also further determines an image processing strategy that matches the current data processing capabilities based on the terminal's current operating state, thereby further improving image processing efficiency and success rate.

[0077] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0078] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0079] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment.

[0080] Figure 2 This is a flowchart illustrating the steps of a target filtering algorithm according to an exemplary embodiment.

[0081] Figure 3 This is a flowchart illustrating the steps of a target filtering algorithm according to another exemplary embodiment.

[0082] Figure 4 This is a flowchart illustrating the steps of determining a target image processing strategy according to an exemplary embodiment.

[0083] Figure 5 This is a flowchart illustrating image sharpening processing steps according to an exemplary embodiment.

[0084] Figure 6 This is a flowchart illustrating image processing steps according to a first processing strategy, based on an exemplary embodiment.

[0085] Figure 7 This is a flowchart illustrating the steps of filtering a low-resolution image according to an exemplary embodiment.

[0086] Figure 8 This is a flowchart illustrating image processing steps according to a second processing strategy, based on an exemplary embodiment.

[0087] Figure 9 This is a flowchart illustrating a step of sharpening an original image according to an exemplary embodiment.

[0088] Figure 10 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment.

[0089] Figure 11 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0090] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0091] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0092] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0093] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment, which is applied to a terminal. For example, the terminal can be a mobile terminal (i.e., a mobile device), or it can be a PC (Personal Computer) terminal device, etc. This disclosure does not limit the terminal executing the image processing method, such as... Figure 1 As shown, the method includes the following steps.

[0094] In step S110, the image to be processed is acquired.

[0095] In practice, secondary creation or forwarding of video works can cause the images in the video works to be unclear. Therefore, in cases where the image quality of secondary creation or forwarded video works is unclear, the terminal can obtain the image to be processed in the video works.

[0096] In step S120, the current running status of the terminal and the target filtering algorithm are obtained.

[0097] The current operating status reflects the terminal's current data processing capability. This data processing capability is capped by the data processing performance (i.e., maximum processing capability) characterized by the terminal's performance attribute parameters.

[0098] The target filtering algorithm is determined by the performance attribute parameters of the current terminal. These performance attribute parameters characterize the data processing performance of the current terminal.

[0099] Different terminal models have different data processing performance, especially mobile terminals. Compared to PC terminals and servers, mobile terminals have limited computing power. When the filtering algorithm is complex, it cannot be executed on a terminal with limited data processing performance; conversely, if the filtering algorithm is simple but executed on a terminal with sufficient data processing performance, the terminal's data processing resources are not fully utilized. Therefore, determining a suitable filtering algorithm for each terminal can improve the success rate and efficiency of image processing. Specifically, the complexity of the filtering algorithm can be determined based on the types of operations included in the algorithm (e.g., addition, multiplication, division, etc.) and the number of operations of each type. The data processing performance of the terminal can be determined based on the terminal's performance attribute parameters. Each terminal stores its performance attribute parameters, such as CPU (Central Processing Unit) model, CPU version, GPU (Graphics Processing Unit) computing power (GFLOPS, Giga Floating-point Operations Per Second), GPU version, etc. These performance attribute parameters can reflect the terminal's data processing performance, which is the theoretical maximum processing capacity of the data processing performance.

[0100] In practice, during image processing, the terminal schedules filtering algorithms based on its own performance attribute parameters, selecting a target filtering algorithm that matches those parameters. Furthermore, the terminal also acquires its current operating status to determine its actual data processing capabilities.

[0101] Optionally, there are various types of pre-stored filtering algorithms, such as bilateral filtering, Gaussian filtering, and guided filtering. This disclosure does not limit the types and number of pre-stored filtering algorithms.

[0102] In step S130, the target image processing strategy corresponding to the current running state is determined based on the mapping relationship between the running state and the image processing strategy.

[0103] The target image processing strategy includes at least a target filtering algorithm.

[0104] In practice, the computer equipment determines the target image processing strategy corresponding to the current operating state based on the mapping relationship between the operating state and the image processing strategy.

[0105] In step S140, the image to be processed is sharpened based on the target image processing strategy to obtain the sharpened target image.

[0106] In practice, the terminal uses the determined target image processing strategy and the algorithms contained in the target image processing strategy to sharpen the image to be processed, and obtain the sharpened target image.

[0107] In implementation, when the terminal's current data processing capabilities are limited, the first processing strategy can be used as the target image processing strategy to sharpen the image to be processed. Then, the terminal uses the accelerated image processing algorithm and target filtering algorithm included in the first processing strategy to sharpen the image to be processed, obtaining the sharpened image. The accelerated image processing algorithm includes a downsampling method to reduce the resolution of the image to be processed, enabling the image processing task to be completed quickly while consuming fewer of the terminal's data processing resources.

[0108] In the aforementioned image processing method, the terminal acquires the image to be processed and obtains its current operating state and the target filtering algorithm. The current operating state reflects the terminal's current data processing capability. The target filtering algorithm is determined based on the terminal's performance attribute parameters. The terminal determines the target image processing strategy corresponding to its current operating state based on the mapping relationship between the operating state and image processing strategies; the target image processing strategy includes at least the target filtering algorithm. Then, the terminal sharpens the image to be processed based on the target image processing strategy to obtain the sharpened target image. This method not only determines the target filtering algorithm through performance attribute parameters, ensuring that the current terminal's data processing capability is compatible with the current target filtering algorithm, but also further determines an image processing strategy matching the current data processing capability based on the terminal's current operating state, thereby further improving image processing efficiency and success rate.

[0109] In one exemplary embodiment, such as Figure 2 As shown, in step S110, obtaining the target filtering algorithm can be achieved through the following steps:

[0110] In step S111, the target performance attribute parameters of the terminal are obtained.

[0111] In implementation, the terminal obtains the performance attribute parameters of its own device (also known as the target performance attribute parameters). These performance attribute parameters may include, but are not limited to, the device model, CPU model, GPU model, computing power, etc. For example, GPU models include Mali-G76 MP10, Adreno506, etc., and computing power parameters are 115.2, 127, etc.

[0112] In step S112, the target filtering algorithm corresponding to the target performance attribute parameter is obtained based on the preset correspondence between performance attribute parameters and filtering algorithms.

[0113] In implementation, based on the preset correspondence between performance attribute parameters and filtering algorithms, the terminal determines the corresponding target filtering algorithm according to the target performance attribute parameters (i.e., the performance attribute parameters of its own device). Optionally, the correspondence between performance attribute parameters and filtering algorithms can be stored in a database or other readable storage unit. When the terminal needs to process the image to be processed, it can query the correspondence between performance attribute parameters and filtering algorithms in the database or storage unit to determine the target filtering algorithm that matches the target performance attribute parameters.

[0114] Optionally, the correspondence between performance attribute parameters and filtering algorithms can be created by technicians based on experience, or by the device according to preset creation rules. Specifically, the device creates the correspondence between performance attribute parameters and filtering algorithms by: acquiring a set of filtering algorithms and a set of sample attribute parameters. The set of filtering algorithms contains multiple filtering algorithms, and the set of sample attribute parameters contains sample performance attribute parameters corresponding to multiple sample terminals. Then, for each filtering algorithm, the computing power value of each filtering algorithm is obtained. This computing power value is positively correlated with the types and number of operations contained in each filtering algorithm. This computing power value can be set by technicians based on experience, or it can be obtained based on the types and number of operations and preset computing power calculation rules. This application does not limit the calculation method of the computing power value. Then, the computing power parameters in the sample performance attribute parameters are matched with the computing power values ​​of each filtering algorithm. The filtering algorithm corresponding to the computing power value closest to the computing power parameter is taken as the target filtering algorithm, and a correspondence between the sample performance attribute parameters and filtering algorithms to which the computing power parameter belongs is established.

[0115] In this embodiment, the target filtering algorithm is determined by the target performance attribute parameters of the terminal, so that when the terminal performs image processing, its data processing performance is fully adapted to the target filtering algorithm, thereby improving the success rate and efficiency of image processing.

[0116] In one exemplary embodiment, such as Figure 3 As shown, in step S110, the target filtering algorithm can be obtained through the following steps:

[0117] In step S301, the target performance attribute parameters of the terminal are obtained.

[0118] In implementation, the terminal acquires its own target performance attribute parameters. These target performance attribute parameters are illustrated in the example given in step S111 above; however, this embodiment does not limit the types of target performance attribute parameters.

[0119] In step S302, the target performance level that matches the target performance attribute parameter is determined according to the preset performance level matching strategy.

[0120] In implementation, the terminal determines its target performance level based on a preset level matching strategy and its own target performance attribute parameters. For example, if there are multiple target performance attribute parameters, the performance level of each target performance attribute parameter is determined for each parameter and the preset performance level corresponding attribute parameter conditions (e.g., setting a level model range for model-type performance attribute parameters, and setting a level threshold for numerical-type performance attribute parameters). Then, the lowest performance level among all the performance levels corresponding to all target performance attribute parameters is taken as the target performance level of the terminal. Alternatively, if there are multiple target performance attribute parameters, a priority for level judgment is set for each parameter, and the performance level of the target performance attribute parameter with the highest priority is taken as the target performance level of the terminal. This embodiment does not limit the method for determining the target performance level.

[0121] Optionally, the performance level can be divided into three levels: high, medium, and low. For each performance level, the corresponding attribute parameter conditions are pre-defined. For example, for model-type performance attribute parameters, a level model range is set, and for numerical-type performance attribute parameters, a level threshold is set. Among them, model-type performance attribute parameters include device model, CPU model, GPU model, etc., and numerical-type performance attribute parameters include computing power, etc. The specific performance attribute parameters that satisfy the conditions for each of the three performance levels (high, medium, and low) are shown in Table 1 below:

[0122] Table 1

[0123]

[0124]

[0125] In Table 1, A, B, and C represent low-performance device models, D, E, and F represent medium-performance device models, F, G, and H represent high-performance device models, a, b, and c represent low-performance CPU models, d, e, and f represent medium-performance CPU models, m, I, and J represent high-performance CPU models, Ad1, P, and Ad2 represent low-performance GPU models, M1, M2, and M3 represent medium-performance GPU models, and M4, Ad3, and Ad4 represent high-performance GPU models. The parameters in Table 1 are not actual model names, but are used as model designations in the form of parameters.

[0126] In step S303, based on the preset correspondence between performance levels and filtering algorithms, the target filtering algorithm corresponding to the target performance level is obtained.

[0127] In implementation, after determining the target performance level of the terminal, the target filtering algorithm corresponding to the target performance level is obtained based on the preset correspondence between performance levels and filtering algorithms. Optionally, the correspondence between performance levels and filtering algorithms is stored in the form of a lookup table, as shown in Table 2 below:

[0128] Table 2

[0129] High performance level Medium performance level Low performance level Two bilateral filtering algorithms A bilateral filtering algorithm A Gaussian filtering algorithm

[0130] In Table 2, the filtering algorithms corresponding to the high-performance level are two bilateral filtering algorithms, the filtering algorithm corresponding to the medium-performance level is one bilateral filtering algorithm, and the filtering algorithm corresponding to the low-performance level is one Gaussian filtering algorithm. In this lookup table, if the current terminal's target performance level is high-performance, then the two bilateral filtering algorithms corresponding to the high-performance level are selected as the target filtering algorithms.

[0131] Optionally, the process of creating the preset correspondence between performance levels and filtering algorithms is similar to the process of creating the correspondence between performance attribute parameters and filtering algorithms in step S112 above. Specifically, the terminal determines its data processing performance at each performance level based on the performance attribute parameters contained in each performance level. Then, the terminal determines the computing power value of each filtering algorithm based on the types and numbers of operations contained in each filtering algorithm. The terminal matches the data processing performance with each computing power value to obtain a matching degree result. Then, based on the obtained matching degree result, the correspondence between performance levels and filtering algorithms is established.

[0132] In this embodiment, the target performance level of the terminal is determined by the target performance attribute parameters, and then the target filtering algorithm that matches the target performance level is determined. Compared with determining the target filtering algorithm from the correspondence between a large number of performance attribute parameters and filtering algorithms, the time for determining the filtering algorithm is shortened and the efficiency of determining the target filtering algorithm is improved.

[0133] Optionally, the correspondence between performance attribute parameters and filtering algorithms, and the correspondence between performance levels and filtering algorithms in the above embodiments, can be further combined. That is, performance levels are pre-defined, and then, under each performance level, the correspondence between included performance attribute parameters and filtering algorithms is determined. Therefore, in the lookup table containing the correspondence between performance attribute parameters and filtering algorithms for each performance level, the terminal can first determine its target performance level. After determining the target performance level, based on the target performance attribute parameters of its own device, the target filtering algorithm is determined from the correspondence between performance attribute parameters and filtering algorithms under that target performance level.

[0134] In an exemplary embodiment, in step S120, the target image processing strategy corresponding to the image to be processed is determined according to the current operating state of the terminal. This can be achieved through the following steps:

[0135] Obtain the terminal's current operating parameter information and determine the terminal's current operating status based on the current operating parameter information.

[0136] In implementation, the terminal acquires current operating parameter information, which may include, but is not limited to, CPU temperature, CPU utilization, GPU temperature, GPU utilization, GPU processing power, etc. Then, the terminal determines its current operating status based on this parameter information, thereby reflecting its current data processing capabilities.

[0137] In this embodiment, a target image processing strategy matching the current operating state of the terminal is determined, and the image to be processed is processed by the determined target image processing strategy, which makes full use of the terminal's data processing resources and improves image processing efficiency and success rate.

[0138] In an exemplary embodiment, the terminal pre-stores multiple image processing strategies, such as a first processing strategy and a second processing strategy. The resource consumption of executing the first processing strategy is lower than that of executing the second processing strategy. Therefore, the image processing speed of the terminal executing the first processing strategy can be greater than the image processing speed of executing the second processing strategy. Furthermore, the terminal also stores a mapping relationship between the operating state and the image processing strategies. Figure 4As shown, in step S130, the target image processing strategy corresponding to the current running state is determined according to the mapping relationship between the running state and the image processing strategy. This is specifically achieved through the following steps:

[0139] In step S410, when the current running state indicates the first running state, the target image processing strategy corresponding to the current running state is determined as the first processing strategy according to the mapping relationship between the running state and the image processing strategy.

[0140] In practice, when the current operating status indicates the first operating status, that is, when the various operating parameters of the current data processing capability are lower than the preset data processing capability threshold (the current operating status is poor), the terminal determines the target image processing strategy corresponding to the current operating status as the first processing strategy based on the mapping relationship between the operating status and the image processing strategy, so as to speed up the image processing.

[0141] In step S420, when the current running state indicates the second running state, the target image processing strategy corresponding to the current running state is determined as the second processing strategy according to the mapping relationship between the running state and the image processing strategy.

[0142] The data processing capability corresponding to the second operating state is higher than that corresponding to the first operating state.

[0143] In implementation, when the current operating state indicates the second operating state—that is, when the various operating parameters of the current data processing capability are higher than or equal to the preset data processing capability threshold (the current operating state is better)—the terminal determines the target image processing strategy corresponding to the current operating state as the second processing strategy based on the mapping relationship between the operating state and the image processing strategy, in order to ensure the sharpening effect of image processing. The various operating parameters reflecting the current operating state may include, but are not limited to, CPU temperature, CPU utilization, CPU efficiency, GPU temperature, GPU utilization, GPU efficiency, and GPU computing power.

[0144] In one exemplary embodiment, such as Figure 5 As shown, in step 140, based on the target image processing strategy, the image to be processed is sharpened to obtain the sharpened target image. The specific implementation method is achieved through the following steps:

[0145] In step S510, when the target image processing strategy is the first processing strategy, the image to be processed is sharpened based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy to obtain the sharpened target image.

[0146] In implementation, when the target image processing strategy is the first processing strategy, during the processing of the image to be processed, the terminal executes the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy. Specifically, the image to be processed (i.e. the original image) is preprocessed by the accelerated image processing algorithm to obtain the processed image, and the processed image is filtered by the target filtering algorithm to obtain the sharpened target image, thereby speeding up the image data processing process.

[0147] In step S520, when the target image processing strategy is the second processing strategy, the image to be processed is sharpened based on the target filtering algorithm included in the second processing strategy to obtain the sharpened target image.

[0148] In practice, when the target image processing strategy is the second processing strategy, during the processing of the image to be processed, the terminal executes the target filtering algorithm included in the second processing strategy to filter the image to be processed and obtain the sharpened target image.

[0149] In an exemplary embodiment, the terminal's performance attribute parameters characterize the maximum processing capability the terminal can provide. These performance attribute parameters determine the target filtering algorithm, ensuring that the terminal's maximum data processing capability meets the data processing requirements of various operations within the filtering algorithm without causing lag or rendering the filtering algorithm unusable. Furthermore, during image processing, the terminal can further consider power consumption limitations when executing the target filtering algorithm, taking into account its actual data processing performance. For example, when processing an image, its high resolution can lead to increased CPU and GPU resource consumption by the image processor. If the image processor's CPU and GPU utilization is high and its data processing capability is weak, the terminal's filter will spend a longer time processing the multiple filtering units within the image, increasing the terminal's power consumption. To address this issue, such as... Figure 6 As shown, in step S520, when the target image processing strategy is the second processing strategy, the image to be processed is sharpened based on the target filtering algorithm included in the second processing strategy to obtain the sharpened target image. This can be achieved through the following steps:

[0150] In step S521, the image to be processed is sampled according to the first interpolation sampling algorithm to obtain a low-resolution image.

[0151] In practice, when the target image processing strategy is the first processing strategy, the terminal performs downsampling (or downsampling) on ​​the image to be processed (the image to be processed can be represented by I) according to the first interpolation sampling algorithm to obtain a low-resolution image with proportionally reduced width and height.

[0152] Optionally, the first interpolation sampling algorithm can be a bilinear interpolation algorithm, a cubic linear interpolation algorithm, a nearest neighbor interpolation algorithm, a LANC10OS interpolation algorithm (an algorithm that transforms a symmetric matrix into a symmetric tridiagonal matrix through an orthogonal similarity transformation), etc. The embodiments of this application do not limit the type of the first interpolation algorithm.

[0153] In step S522, the low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution detail image.

[0154] Regardless of whether the image is low-resolution or high-resolution, it can be decomposed into two parts after image decomposition. One part contains image structure information (i.e., larger objects in the image), forming a structure image, and the other part contains image detail information (also known as image texture information, i.e. smaller image details in the image), forming a detail image.

[0155] In implementation, the terminal performs filtering processing on the low-resolution image according to the target filtering algorithm (for example, using an edge-preserving filtering algorithm to perform edge-preserving filtering processing), effectively preserving the edge information in the low-resolution image, thereby obtaining the low-resolution structural image corresponding to the low-resolution image (the low-resolution image can be represented by B). Then, the difference between the low-resolution image and the low-resolution structural image is performed to obtain the low-resolution detail image corresponding to the low-resolution image (the low-resolution detail image can be represented by D).

[0156] In step S523, the low-resolution detail image is interpolated and restored according to the second interpolation sampling algorithm to obtain a high-resolution detail image, and the sharpened image is obtained according to the image to be processed, the high-resolution detail image and the preset sharpening algorithm.

[0157] In implementation, after the low-resolution detail image is obtained through the target filtering algorithm, since the size of the low-resolution detail image is proportionally reduced relative to the size of the original image to be processed, it is necessary to restore the low-resolution detail image to the size of the original image to be processed in order to enhance the image quality of the original image to be processed. Therefore, the terminal performs interpolation restoration processing (also known as upsampling processing, up) on the low-resolution detail image according to the second interpolation sampling algorithm, and proportionally enlarges it according to the size of the original image to be processed to obtain a high-resolution detail image. Then, the terminal obtains the sharpened image based on the image to be processed, the high-resolution detail image, and the preset sharpening algorithm.

[0158] Optionally, the second interpolation sampling algorithm can be a bilinear interpolation algorithm, a cubic linear interpolation algorithm, a nearest neighbor interpolation algorithm, a LANC10OS interpolation algorithm, etc. The embodiments of this application do not limit the type of the second interpolation algorithm.

[0159] Optionally, since the first interpolation sampling algorithm downsamples (or downsamples) the image to be processed, and the second interpolation sampling algorithm upsamples the image to be processed, in order to avoid moiré patterns or aliasing effects, the terminal can select the first interpolation sampling algorithm and the second interpolation sampling algorithm as the same type of interpolation sampling algorithm in the preset, and set the ratio between the first interpolation sampling algorithm (downsampling algorithm) and the second interpolation sampling algorithm (upsampling algorithm) to 1.

[0160] In this embodiment, the image to be processed is converted into a proportionally scaled-down low-resolution image using a first interpolation sampling method. Then, the low-resolution image is filtered using a target filtering algorithm, shortening the image filtering time and improving image processing efficiency. Next, the filtered low-resolution detail image is interpolated and restored using a second interpolation sampling algorithm, allowing the restored high-resolution detail image to enhance the image quality of the original image to be processed.

[0161] In one exemplary embodiment, such as Figure 7 As shown, in step S522, the low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution detail image. This can be achieved through the following steps:

[0162] In step S701, the low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution structure image.

[0163] In implementation, the terminal filters the low-resolution image according to the target filtering algorithm to obtain a low-resolution structural image. Specifically, the target filtering algorithm is a bilateral filtering algorithm. The image to be processed is subjected to the first interpolation algorithm (i.e., downsampling) to obtain a low-resolution image, which is denoted by Down(I). The bilateral filtering algorithm is denoted by BF. Then, the low-resolution structural image is obtained by filtering Down(I) according to the bilateral filtering algorithm, which is denoted by BF(Down(I)).

[0164] In step S702, the pixel values ​​of each pixel in the low-resolution image and the low-resolution structural image are compared to obtain a low-resolution detail image.

[0165] In implementation, the low-resolution image contains low-resolution structural information and low-resolution image information. Filtering the low-resolution image yields a low-resolution structural image. Then, the terminal performs interpolation processing on the low-resolution image and the low-resolution structural image to obtain a low-resolution detail image. This low-resolution detail image reflects the image's detailed texture information, edge information, etc. For example, interpolating the low-resolution image Down(I) and the low-resolution structural image BF(Down(I)) yields a low-resolution detail image, represented as: Down(I) - BF(Down(I)).

[0166] In this embodiment, a low-resolution detail image is obtained by filtering the low-resolution image, so that the detail information in the original image to be processed is enhanced based on the low-resolution detail image, thereby improving the image quality and clarity of the original image to be processed.

[0167] In one exemplary embodiment, such as Figure 8 As shown, in step S140, when the target image processing strategy is the second processing strategy, the image to be processed is sharpened according to the target filtering algorithm to obtain the sharpened image. This can be achieved through the following steps:

[0168] In step S141, when the target image processing strategy is the second processing strategy, the image to be processed is filtered according to the target filtering algorithm to obtain the high-resolution detail image corresponding to the image to be processed.

[0169] In practice, when the target image processing strategy is the second processing strategy, it indicates that the terminal's current data processing performance is good. That is, the utilization and occupancy rates of the terminal's CPU, GPU, and other resources are high. There is no limitation on the amount of resources used for image processing of the image to be processed. Therefore, the terminal can directly filter the image to be processed (i.e., in the case of high resolution) according to the target filtering algorithm to obtain a high-resolution structural image after filtering. Then, the terminal performs difference calculation based on the image to be processed and the high-resolution structural image to obtain a high-resolution detail image, which is then used to enhance the image quality of the original image to be processed.

[0170] In step S142, a sharpened image is obtained based on the image to be processed, the high-resolution detail image, and the preset sharpening algorithm.

[0171] In practice, the terminal enhances the image quality of the original image to be processed based on the high-resolution detail image obtained after filtering and the preset sharpening weight coefficients. That is, the high-resolution detail image enhanced by the sharpening weight coefficients is applied to the original image to be processed to obtain the sharpened image.

[0172] In this embodiment, when the terminal's data processing performance is good, according to the second processing strategy, only the adapted target filtering algorithm is used to filter the original image to be processed to obtain a high-resolution detail image. Then, the image to be processed is sharpened based on the high-resolution detail image to obtain a sharpened image. The target image processing strategy and target filtering algorithm adapted by the terminal are matched with the terminal's data processing capabilities, so that the terminal's data processing resources are fully utilized, improving image processing efficiency and image processing success rate.

[0173] In one exemplary embodiment, such as Figure 9 As shown, in step S523 or step S142, the sharpened image is obtained based on the image to be processed, the high-resolution detail image, and the preset sharpening algorithm. This can be achieved through the following steps:

[0174] In step 901, each high-resolution detail image is weighted according to a preset sharpening weight coefficient to obtain an enhanced detail image.

[0175] In implementation, the terminal performs weighted processing on each high-resolution detail image obtained after filtering, according to preset sharpening weight coefficients, to obtain a (high-resolution) enhanced detail image. Specifically, for example, taking a target filtering algorithm consisting of two bilateral filtering algorithms as an example, the formula for the filtering process corresponding to the image to be processed is as follows:

[0176] B1 = BF (I)

[0177] D1 = I - B1

[0178] B2 = BF (B1)

[0179] D2 = B1 - B2

[0180] In this context, the image to be processed is denoted by I, the bilateral filtering algorithm is denoted by BF, B1 and D1 are the structural image and detail image obtained by the first bilateral filtering algorithm on the image to be processed I, respectively, B2 is the structural image obtained by the second bilateral filtering algorithm on the structural image B1, and D2 is the detail image corresponding to the structural image.

[0181] Then, the computer device performs weighted processing on the two obtained high-resolution detail images D1 and D2, for example, by using preset weight coefficients A and B to weight D1 and D2, to obtain an enhanced detail image, denoted as A*D1+B*D2.

[0182] Optionally, the weighting coefficients for high-resolution detail images can be set based on the texture information contained in each high-resolution detail image. When a high-resolution detail image contains more texture information, the weighting coefficient is smaller; when it contains less texture information, the weighting coefficient is larger. Alternatively, a weighting range can be preset, and then by providing users with an interface to adjust the weighting coefficients, users can determine the weighting coefficients corresponding to the target sharpening effect based on the sharpening effects of different combinations of displayed weighting coefficients.

[0183] In step 902, the enhanced detail image and the image to be processed are summed to obtain the sharpened image.

[0184] In practice, the terminal sums the enhanced detail image and the image to be processed, that is, it applies the texture information contained in the enhanced detail image to the original image to be processed, and obtains the sharpened image.

[0185] In this embodiment, by enhancing the detail image and applying the enhanced detail image to the original image to be processed, the sharpening of the original image to be processed is completed, thereby improving the image quality and clarity of the original image to be processed.

[0186] It should be understood that, although Figures 1-9 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 1-8 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0187] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0188] Figure 10 This is a block diagram of an image processing apparatus according to an exemplary embodiment. (Refer to...) Figure 10 The device 1000 includes a first acquisition unit 1002, a second acquisition unit 1004, a determination unit 1006, and a processing module 1008.

[0189] The first acquisition unit 1002 is configured to acquire the image to be processed;

[0190] The second acquisition unit 1004 is configured to acquire the current operating status of the terminal and the target filtering algorithm. The current operating status reflects the current data processing capability of the terminal, and the target filtering algorithm is determined based on the performance attribute parameters of the terminal.

[0191] The determining unit 1006 is configured to determine the target image processing strategy corresponding to the current running state based on the mapping relationship between the running state and the image processing strategy. The target image processing strategy includes at least a target filtering algorithm.

[0192] The processing unit 1008 is configured to perform a target image processing strategy to sharpen the image to be processed, thereby obtaining a sharpened target image.

[0193] In one exemplary embodiment, the second acquisition unit 1004 includes:

[0194] The first acquisition subunit is configured to acquire the target performance attribute parameters of the terminal.

[0195] The second acquisition subunit is configured to execute a target filtering algorithm corresponding to the target performance attribute parameters based on a preset correspondence between performance attribute parameters and filtering algorithms.

[0196] In one exemplary embodiment, the second acquisition unit 1004 includes:

[0197] The third acquisition subunit is configured to acquire the target performance attribute parameters of the terminal.

[0198] The sub-unit is configured to execute a target performance level that matches the target performance attribute parameters based on a preset performance level matching strategy.

[0199] The fourth acquisition subunit is configured to execute a target filtering algorithm corresponding to the target performance level based on a preset correspondence between performance levels and filtering algorithms.

[0200] In an exemplary embodiment, the second acquisition unit 1004 is specifically configured to acquire the current operating parameter information of the terminal and determine the current operating state of the terminal based on the operating parameter information.

[0201] In an exemplary embodiment, the determining unit 1006 includes:

[0202] The first determining subunit is configured to, when the current running state indicates a first running state, determine the target image processing strategy corresponding to the current running state as the first processing strategy based on the mapping relationship between the running state and the image processing strategy.

[0203] The second determining subunit is configured to, when the current operating state indicates a second operating state, determine the target image processing strategy corresponding to the current operating state as the second processing strategy based on the mapping relationship between the operating state and the image processing strategy; the data processing capability corresponding to the second operating state is higher than the data processing capability corresponding to the first operating state.

[0204] In one embodiment, the processing unit 1008 includes:

[0205] The first processing subunit is configured to perform sharpening processing on the image to be processed based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy when the target image processing strategy is the first processing strategy, so as to obtain the sharpened target image.

[0206] The second processing subunit is configured to perform sharpening processing on the image to be processed based on the target filtering algorithm included in the second processing strategy when the target image processing strategy is the second processing strategy, so as to obtain the sharpened target image.

[0207] In one exemplary embodiment, the first processing subunit includes:

[0208] The interpolation subunit is configured to perform sampling processing on the image to be processed according to the first interpolation sampling algorithm to obtain a low-resolution image when the target image processing strategy is the first image processing strategy.

[0209] The first filtering subunit is configured to perform filtering processing on the low-resolution image according to the target filtering algorithm to obtain a low-resolution detail image.

[0210] The sharpening subunit is configured to perform interpolation restoration processing on the low-resolution detail image according to the second interpolation sampling algorithm to obtain a high-resolution detail image, and obtain a sharpened image based on the image to be processed, the high-resolution detail image and the preset sharpening algorithm.

[0211] In one exemplary embodiment, the first filtering subunit is configured to perform filtering processing on the low-resolution image according to the target filtering algorithm to obtain a low-resolution structural image;

[0212] And, configured to perform difference processing on the pixel values ​​of each pixel in the low-resolution image and the low-resolution structural image to obtain a low-resolution detail image.

[0213] In one exemplary embodiment, the second processing subunit includes:

[0214] The second filtering subunit is configured to perform filtering processing on the image to be processed according to the target filtering algorithm when the target image processing strategy is the second image processing strategy, so as to obtain a high-resolution detail image corresponding to the image to be processed.

[0215] The sharpening subunit is configured to execute a sharpened image based on the image to be processed, the high-resolution detail image, and a preset sharpening algorithm.

[0216] In an exemplary embodiment, the sharpening subunit is configured to perform weighted processing on each high-resolution detail image according to a preset sharpening weight coefficient to obtain an enhanced detail image;

[0217] The pixel values ​​of each pixel in the enhanced detail image and the image to be processed are summed to obtain the sharpened image.

[0218] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0219] Figure 11 This is a block diagram illustrating an electronic device 1100 for image processing according to an exemplary embodiment. For example, the electronic device 1100 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0220] Reference Figure 11 The electronic device 1100 may include one or more of the following components: processing component 1102, memory 1104, power supply component 1106, multimedia component 1108, audio component 1110, input / output (I / O) interface 1112, sensor component 1114, and communication component 1116.

[0221] Processing component 1102 typically controls the overall operation of electronic device 1100, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1102 may include one or more modules to facilitate interaction between processing component 1102 and other components. For example, processing component 1102 may include a multimedia module to facilitate interaction between multimedia component 1108 and processing component 1102.

[0222] Memory 1104 is configured to store various types of data to support the operation of electronic device 1100. Examples of such data include instructions for any application or method operating on electronic device 1100, contact data, phonebook data, messages, pictures, videos, etc. Memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, optical disk, or graphene memory.

[0223] Power supply component 1106 provides power to various components of electronic device 1100. Power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 1100.

[0224] Multimedia component 1108 includes a screen that provides an output interface between electronic device 1100 and a user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of a touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1108 includes a front-facing camera and / or a rear-facing camera. When electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0225] Audio component 1110 is configured to output and / or input audio signals. For example, audio component 1110 includes a microphone (MIC) configured to receive external audio signals when electronic device 1100 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1104 or transmitted via communication component 1116. In some embodiments, audio component 1110 also includes a speaker for outputting audio signals.

[0226] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0227] Sensor assembly 1114 includes one or more sensors for providing state assessments of various aspects of electronic device 1100. For example, sensor assembly 1114 may detect the on / off state of electronic device 1100, the relative positioning of components such as the display and keypad of electronic device 1100, changes in position of electronic device 1100 or its components, the presence or absence of user contact with electronic device 1100, orientation or acceleration / deceleration of device 1100, and temperature changes of electronic device 1100. Sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1114 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0228] Communication component 1116 is configured to facilitate wired or wireless communication between electronic device 1100 and other devices. Electronic device 1100 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 1116 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1116 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0229] In an exemplary embodiment, the electronic device 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0230] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, which can be executed by a processor 1120 of an electronic device 1100 to perform the above-described method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0231] In an exemplary embodiment, a computer program product is also provided, which includes instructions that can be executed by a processor 1120 of an electronic device 1100 to perform the above-described method.

[0232] It should be noted that the above-mentioned apparatus, electronic equipment, computer-readable storage medium, computer program product, etc., may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.

[0233] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0234] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. An image processing method, characterized in that, Applied to a terminal, the method includes: Obtain the image to be processed; The current operating status of the terminal and the target filtering algorithm are obtained; the current operating status reflects the current data processing capability of the terminal, and the target filtering algorithm is determined based on the performance attribute parameters of the terminal. Based on the mapping relationship between the running state and the image processing strategy, a target image processing strategy corresponding to the current running state is determined; the target image processing strategy includes at least a target filtering algorithm; the image processing strategy includes a first processing strategy and a second processing strategy, wherein the resource consumption of the terminal executing the first processing strategy is lower than the resource consumption of executing the second processing strategy; When the target image processing strategy is the first processing strategy, the image to be processed is sharpened based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy to obtain the sharpened target image; wherein, the accelerated image processing algorithm includes a downsampling method; When the target image processing strategy is the second processing strategy, the image to be processed is sharpened based on the target filtering algorithm included in the second processing strategy to obtain the sharpened target image.

2. The image processing method according to claim 1, characterized in that, The target acquisition filtering algorithm includes: Obtain the target performance attribute parameters of the terminal; Based on the preset correspondence between performance attribute parameters and filtering algorithms, the target filtering algorithm corresponding to the target performance attribute parameters is obtained.

3. The image processing method according to claim 1, characterized in that, The target acquisition filtering algorithm includes: Obtain the target performance attribute parameters of the terminal; Based on a preset performance level matching strategy, a target performance level that matches the target performance attribute parameter is determined; Based on the preset correspondence between performance levels and filtering algorithms, the target filtering algorithm corresponding to the target performance level is obtained.

4. The image processing method according to claim 1, characterized in that, The step of obtaining the current operating status of the terminal includes: Obtain the current operating parameter information of the terminal, and determine the current operating status of the terminal based on the operating parameter information.

5. The image processing method according to claim 1, characterized in that, The step of determining the target image processing strategy corresponding to the current operating state based on the mapping relationship between the operating state and the image processing strategy includes: When the current running state indicates a first running state, the target image processing strategy corresponding to the current running state is determined as the first processing strategy based on the mapping relationship between the running state and the image processing strategy. When the current operating state indicates a second operating state, the target image processing strategy corresponding to the current operating state is determined as the second processing strategy based on the mapping relationship between the operating state and the image processing strategy; the data processing capability corresponding to the second operating state is higher than the data processing capability corresponding to the first operating state.

6. The image processing method according to claim 1, characterized in that, The step of sharpening the image to be processed based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy to obtain a sharpened target image includes: The image to be processed is sampled according to the first interpolation sampling algorithm to obtain a low-resolution image; The low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution detail image; According to the second interpolation sampling algorithm, the low-resolution detail image is interpolated and restored to obtain a high-resolution detail image. Then, according to the image to be processed, the high-resolution detail image, and the preset sharpening algorithm, the sharpened target image is obtained.

7. The image processing method according to claim 6, characterized in that, The step of filtering the low-resolution image according to the target filtering algorithm to obtain a low-resolution detail image includes: The low-resolution image is filtered according to the target filtering algorithm to obtain a low-resolution structure image; The pixel values ​​of each pixel in the low-resolution image and the low-resolution structural image are compared to obtain a low-resolution detail image.

8. The image processing method according to claim 1, characterized in that, The step of sharpening the image to be processed based on the target filtering algorithm included in the second processing strategy to obtain a sharpened target image includes: According to the target filtering algorithm, the image to be processed is filtered to obtain a high-resolution detail image corresponding to the image to be processed; Based on the image to be processed, the high-resolution detail image, and the preset sharpening algorithm, a sharpened target image is obtained.

9. The image processing method according to any one of claims 6 to 8, characterized in that, The step of obtaining the sharpened target image based on the image to be processed, the high-resolution detail image, and a preset sharpening algorithm includes: Based on the preset sharpening weight coefficients, each of the high-resolution detail images is weighted to obtain an enhanced detail image; The pixel values ​​of each pixel in the enhanced detail image and the image to be processed are summed to obtain the sharpened target image.

10. An image processing apparatus, characterized in that, Applied to a terminal, the device includes: The first acquisition unit is configured to acquire the image to be processed. The second acquisition unit is configured to acquire the current operating state of the terminal and the target filtering algorithm. The current operating state reflects the current data processing capability of the terminal, and the target filtering algorithm is determined based on the performance attribute parameters of the terminal. The determining unit is configured to determine a target image processing strategy corresponding to the current running state based on the mapping relationship between the running state and the image processing strategy; the target image processing strategy includes at least a target filtering algorithm; the image processing strategy includes a first processing strategy and a second processing strategy, wherein the resource consumption of the terminal executing the first processing strategy is lower than the resource consumption of executing the second processing strategy; The processing unit is configured to perform sharpening processing on the image to be processed based on the accelerated image processing algorithm and the target filtering algorithm included in the first processing strategy when the target image processing strategy is the first processing strategy, to obtain a sharpened target image; wherein, the accelerated image processing algorithm includes a downsampling method; When the target image processing strategy is the second processing strategy, the image to be processed is sharpened based on the target filtering algorithm included in the second processing strategy to obtain the sharpened target image.

11. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the image processing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the image processing method as described in any one of claims 1 to 9.

13. A computer program product, the computer program product comprising instructions, characterized in that, When the instructions are executed by the processor of the electronic device, the electronic device is able to perform the image processing method as described in any one of claims 1 to 9.