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

By performing separate filtering operations on elements of different drawing channels in the image, the problem of poor image display effect in the prior art is solved, and better user experience and personalized needs are achieved.

CN112561827BActive Publication Date: 2024-12-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011530190.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-22
Publication Date
2024-12-06
Estimated Expiration
2040-12-22

AI Technical Summary

Technical Problem

The method of global filtering processing of the entire frame data in the prior art leads to poor image display effect and cannot meet the user's needs for personalized and specific scenarios.

Method used

By obtaining the filter instructions for the target image, determine the target subject and target filter, and perform targeted filter operations based on its drawing channel, including UI drawing channels and non-UI drawing channels, optimizing the image display effect.

Benefits of technology

It realizes targeted control of the effective scope of the filter, improves the image display effect, meets users' personalized and differentiated usage needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112561827B_ABST
    Figure CN112561827B_ABST
Patent Text Reader

Abstract

The present application relates to an image processing method, device, electronic device and computer storage medium. The method includes: the terminal obtains a filter instruction of a target image, determines a target subject and a target filter in the target image according to the filter instruction, performs a filter operation on the target subject according to the drawing channel of the target filter and the target subject, and since the target image includes multiple subjects, and the drawing channel includes a UI drawing channel or a non-UI drawing channel, the terminal can determine whether the current filter operation is for the subject of the UI drawing channel, or the subject of the non-UI drawing channel, or the global image according to the target subject, performs a filter operation according to the determined drawing channel, and specifically controls the effective range of the filter, while optimizing the image display effect, meets the user's personalized and differentiated use needs and the functional needs of some specific scenarios, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When using terminal devices, users can use color filters to adjust the display effects of displayed images according to their preferences and usage habits, such as high-dynamic range (HDR) display and cartoon-style display, to improve user experience.

[0003] The existing technologies all perform filter processing on the entire frame data of the displayed image, that is, after rendering the complete frame data, the entire frame data is taken out and global filter processing is performed on the entire frame data.

[0004] However, the existing method of performing global filter processing on the entire frame of data results in poor image display effect. Summary of the invention

[0005] The embodiments of the present application provide an image processing method, device, electronic device, and computer-readable storage medium, which can perform separate filter operations on elements of different drawing channels in an image.

[0006] An image processing method, the method comprising:

[0007] Get the filter instruction of the target image; the target image includes multiple subjects;

[0008] According to the filter instruction, determine the target subject and the target filter in the target image;

[0009] According to the target filter and the drawing channel of the target subject, the filter operation is performed on the target subject; the drawing channel includes a UI drawing channel or a non-UI drawing channel.

[0010] In one embodiment, the method further comprises:

[0011] Get the graphics API drawing instructions of the target image;

[0012] According to the graphics API drawing instructions, determine the input parameters of each subject in the target image;

[0013] According to the input parameters of each subject, the drawing channel of each subject is determined.

[0014] In one embodiment, determining the drawing channel of the subject according to the input parameters of the subject includes:

[0015] The drawing channel of the subject is determined according to the input parameters of the subject and a preset database; the database includes the corresponding relationship between the input parameters and the drawing channel.

[0016] In one embodiment, the method for constructing the above database includes:

[0017] Obtain input parameters of each subject in the sample image;

[0018] According to the preset judgment rules, the drawing channel corresponding to the input parameters of each subject in the sample image is determined;

[0019] Establish the corresponding relationship between each input parameter and the drawing channel.

[0020] In one embodiment, the above-mentioned obtaining the graphics API drawing instruction of the target image includes:

[0021] According to the preset hook algorithm, get the graphics API drawing instructions of the target image.

[0022] In one embodiment, the filter instruction for obtaining the target image includes:

[0023] Displaying each subject label and filter label of the target image in the display interface;

[0024] The filter instruction is obtained based on the display interface, and the filter instruction includes the label of the target subject and the label of the target filter.

[0025] In one embodiment, the filter operation is performed on the target subject according to the target filter and the drawing channel of the target subject, including:

[0026] According to the target filter and the drawing channel of the target subject, the image parameters of the target subject are adjusted; the image parameters include any one of color, brightness, saturation and contrast.

[0027] In one embodiment, if there are multiple target entities, the method further includes:

[0028] According to the drawing channels of each target subject and the priority of the preset drawing channels, the execution order of the filter operations of each target subject is determined; the priority of the UI drawing channel is higher than the priority of the non-UI drawing channel;

[0029] According to the execution order of the filter operations of each target subject, the filter operations are performed on the target subject to obtain the filter effects of each target subject;

[0030] Overlays the filter effects on all target subjects.

[0031] An image processing device, the device comprising:

[0032] An acquisition module is used to acquire filter instructions of a target image; the target image includes multiple subjects;

[0033] A determination module, used for determining a target subject and a target filter in a target image according to a filter instruction;

[0034] The synthesis module is used to perform a filter operation on each target subject according to the target filter and the drawing channel of each target subject; the drawing channel includes a UI drawing channel or a non-UI drawing channel.

[0035] In the above-mentioned image processing method, device, electronic device and computer-readable storage medium, the terminal obtains the filter instruction of the target image, determines the target subject and the target filter in the target image according to the filter instruction, and performs the filter operation on the target subject according to the drawing channel of the target filter and the target subject. Since the target image includes multiple subjects, and the drawing channel includes a UI drawing channel or a non-UI drawing channel, the terminal can determine whether the current filter operation is for the subject of the UI drawing channel, the subject of the non-UI drawing channel, or the global image according to the target subject, and performs the filter operation according to the determined drawing channel, and specifically controls the effective range of the filter. While optimizing the image display effect, it meets the user's personalized and differentiated usage needs and the functional needs of some specific scenarios, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A diagram showing an application environment of an image processing method in an embodiment;

[0038] Figure 2 is a flowchart of an image processing method in one embodiment;

[0039] Figure 3 is a flowchart of an image processing method in one embodiment;

[0040] Figure 4 is a flowchart of an image processing method in one embodiment;

[0041] Figure 5 is a flowchart of an image processing method in one embodiment;

[0042] Figure 6 is a flowchart of an image processing method in one embodiment;

[0043] Figure 7 is a flowchart of an image processing method in one embodiment;

[0044] Figure 8 is a structural block diagram of an image processing device in one embodiment;

[0045] Fig. 9 is a structural block diagram of an image processing device in one embodiment;

[0046] Fig.10 is a structural block diagram of an image processing device in one embodiment;

[0047] Fig.11 is a structural block diagram of an image processing device in one embodiment;

[0048] Fig.12 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client. Both the first client and the second client are clients, but they are not the same client.

[0051] Figure 1 FIG. 1 is a schematic diagram of an application environment of an image processing method in an embodiment. Figure 1 As shown, the application environment includes a terminal 101. After receiving the filter operation instruction of the image, the image processing module in the terminal 101 can detect and determine the drawing channel of each subject in the image, thereby realizing the separate filter operation of different drawing channel subjects. The terminal 101 can be any terminal with image display and processing functions, such as a smart phone, a tablet computer, a computer device with a display screen, etc.

[0052] Figure 2 FIG. 1 is a flowchart of an image processing method in an embodiment. The image processing method in this embodiment is executed on Figure 1 This article describes the terminal or server in the following example. Figure 2 As shown, the image processing method includes steps 201 to 203.

[0053] Step 201, obtaining a filter instruction of a target image; the target image includes multiple subjects.

[0054] The target image refers to the current image to be operated, which includes multiple subjects, where the subject can be a display element in the image screen; for example, the target image is the game startup interface, which includes the game login icon, background dynamic image, and other functional icons such as settings and logout. The filter instruction refers to the instruction triggered by the user's need to perform a filter operation on the current image; the filter instruction can include information such as the target subject label and the target filter label determined by the user.

[0055] In this embodiment, the terminal may first obtain an image to be processed, and use the image to be operated as a target image for subsequent filter operations. Then, the terminal obtains a filter instruction for the target image, wherein the terminal may obtain a filter instruction triggered by a display interface operation; or obtain a voice control instruction for a filter operation through a voice module.

[0056] Step 202: Determine the target subject and the target filter in the target image according to the filter instruction.

[0057] The target subject refers to the element in the image that the user needs to filter, and the target filter refers to the filter type determined by the user. The filter type may include a sketch filter, an oil painting filter, a fun filter, and a functional filter for adjusting color tone, etc., which are not limited in the embodiments of the present application.

[0058] In this embodiment, since the filter instruction carries the target subject tag and the target filter tag, the terminal determines the target subject corresponding to the target subject tag according to the target subject tag in the filter instruction; and determines the target filter corresponding to the target filter tag according to the target filter tag. Obviously, the tag can represent a unique identifier, and the tag can be a character of a specified length, which is not limited in this embodiment.

[0059] Step 203, performing a filter operation on the target subject according to the target filter and the drawing channel of the target subject; the drawing channel includes a UI drawing channel or a non-UI drawing channel.

[0060] Among them, the UI drawing channel refers to the image display method based on UI design. Taking the game startup interface as an example, the login box icon, setting icon, logout icon, etc. in the game startup interface are all designed through UI in terms of position, shape, color, icon, etc. in the startup interface. This type of element is the main element of the UI drawing channel. Correspondingly, the non-UI drawing channel refers to the image display method achieved through data rendering. In the game startup interface, the dynamic background image in the interface needs to be achieved through data rendering, that is, this type of element can be considered as the main element of the non-UI drawing channel.

[0061] In this embodiment, the terminal determines the drawing channel corresponding to the target subject according to the target subject in the filter instruction. After determining the drawing channel corresponding to the target subject, the terminal obtains the target filter from the filter library to perform a drawing operation on the target subject to obtain an image effect after superimposing the target filter. Optionally, the terminal can also display the filter effect of the target subject in the display interface.

[0062] In the image processing method of this embodiment, the terminal obtains a filter instruction of the target image, determines the target subject and the target filter in the target image according to the filter instruction, and performs a filter operation on the target subject according to the drawing channel of the target filter and the target subject. Since the target image includes multiple subjects, and the drawing channel includes a UI drawing channel or a non-UI drawing channel, the terminal can determine whether the current filter operation is for the subject of the UI drawing channel, the subject of the non-UI drawing channel, or the global image according to the target subject, and performs a filter operation according to the determined drawing channel, so as to control the effective range of the filter in a targeted manner, thereby optimizing the image display effect, satisfying the user's personalized and differentiated usage needs and the functional needs of some specific scenarios, and improving the user experience.

[0063] Before the terminal performs a filter operation on the target image, it needs to determine the drawing channel of each subject in the target image. In one embodiment, Figure 3 As shown, the above method also includes:

[0064] Step 301, obtaining a graphics API drawing instruction of a target image.

[0065] The graphics API drawing instructions include information such as drawing parameters and input parameters of all entities that form the image.

[0066] Optionally, the terminal can obtain the graphics API drawing instruction of the target image according to a preset hook algorithm. The graphics API types that the terminal can obtain include but are not limited to OpenGL, OpenGL ES, Vulkan, DirectX, Metal, etc.

[0067] Step 302: Determine input parameters of each subject in the target image according to the graphics API drawing instruction.

[0068] In this embodiment, the graphics API drawing instruction includes information carried in the target image, and determines the input parameters of each subject in the target image. Optionally, the terminal can construct a key-value correspondence between each subject and its corresponding input parameter, and store the key-value correspondence in a database.

[0069] Step 303: Determine the drawing channel of each subject according to the input parameters of each subject.

[0070] Among them, the input parameters include the subject's position, texture, icon, depth, coordinates, grid and other information.

[0071] In this embodiment, the terminal can input the input parameters of the subject into a preset classification model to obtain the drawing channel corresponding to the subject. Optionally, the terminal can also traverse the target parameters that match the input parameters of the subject according to the preset database of correspondence between the input parameters and the drawing channels, and obtain the drawing channel corresponding to the target parameters as the drawing channel of the subject, which is not limited in this embodiment.

[0072] In this embodiment, the terminal can use a hook mechanism to obtain graphics API drawing instructions, and then determine the drawing channels of each subject of the target image according to the instructions. The entire process does not need to rely on a third-party interception module or interception platform, providing users with a rich visual experience while reducing development costs.

[0073] Optionally, in one of the embodiments, determining the drawing channel of the subject according to the input parameters of the subject includes:

[0074] The drawing channel of the subject is determined according to the input parameters of the subject and a preset database; the database includes the corresponding relationship between the input parameters and the drawing channel.

[0075] In this embodiment, the terminal can pre-construct the correspondence between the input parameters and the drawing channel to form a database including the correspondence, and then traverse the target parameters that match the input parameters of the subject based on the database and the input parameters of the subject, and obtain the drawing channel corresponding to the target parameters as the drawing channel of the subject. This embodiment does not limit this.

[0076] In this embodiment, the terminal can determine the drawing channels of each subject of the target image based on a preset database. This solution simply and effectively distinguishes subjects of different drawing channels, which facilitates subsequent filter operations on subjects of different drawing channels.

[0077] The terminal can be constructed based on the sample image in the pre-built database. In one embodiment, Figure 4 As shown, the method for constructing the above database includes:

[0078] Step 401: Obtain input parameters of each subject in a sample image.

[0079] The sample image may be a screened image that includes both UI drawing channels and non-UI drawing channels. For example, the sample image may be a plurality of game interface images, which are typical images that include both elements of UI drawing channels and elements of non-UI drawing channels.

[0080] In this embodiment, the terminal obtains input parameters of all subjects included in each sample image based on the determined multiple sample images. Optionally, the terminal can classify and store all input parameters of all subjects in all sample images, for example, storing the texture information of all subjects in the sample images as a table, storing the grid information of all subjects in the sample images as a table, and storing the depth information of all subjects in the sample images as a table. This embodiment does not limit this.

[0081] Step 402: Determine the rendering channel corresponding to the input parameters of each subject in the sample image according to a preset judgment rule.

[0082] The preset judgment rule refers to a judgment rule for drawing a channel according to input parameters. Optionally, the judgment rule can be implemented based on a neural network model or a preset logic judgment rule.

[0083] In this embodiment, the terminal determines the drawing channels corresponding to the input parameters of each subject in all sample images in turn according to the preset judgment rules. For example, if the texture information of subject 1 in the sample image is empty, then according to the logic judgment rule, the drawing channel corresponding to the subject is considered to be the UI drawing channel; if the texture information of subject 2 in the sample image is not empty, then according to the logic judgment rule, the drawing channel corresponding to the subject is considered to be the non-UI drawing channel. Alternatively, if the icon information of subject 3 in the sample image is a picture, then according to the logic judgment rule, the drawing channel corresponding to the subject is considered to be the UI drawing channel; if the icon information of subject 4 in the sample image is rendering data, then according to the logic judgment rule, the drawing channel corresponding to the subject is considered to be the non-UI drawing channel. This embodiment does not limit this.

[0084] Step 403: Establishing the corresponding relationship between each input parameter and the drawing channel.

[0085] In this embodiment, after confirming the rendering channels corresponding to the input parameters of all subjects in the sample image, the terminal may construct a correspondence between the input parameters and the rendering channels, and store the correspondence in a preset database.

[0086] In this embodiment, the terminal can form a corresponding relationship between each input parameter and the drawing channel according to the sample image and the preset determination rule, which simply and effectively provides a basis for determining the drawing channel according to the target subject in the target image.

[0087] When the terminal obtains the filter instruction of the target image, in one embodiment, Figure 5 As shown, the filter instruction for obtaining the target image includes:

[0088] Step 501: Displaying each subject label and filter label of the target image in the display interface.

[0089] Among them, the main label and filter label refer to the control information displayed in the display interface.

[0090] In this embodiment, the terminal can display the subject labels of the current target image and all the filter labels in the filter library in the display interface. Among them, the filter labels include but are not limited to a variety of color filter labels, functional filter labels, fun filter labels, HDR filter labels, and image quality enhancement filter labels. Optionally, the terminal can also encrypt all the filter labels in the filter library, and after obtaining the key information input by the user or the background, decrypt and display all the filter labels in the filter library.

[0091] Step 502: Obtain a filter instruction based on the display interface, where the filter instruction includes a label of a target subject and a label of a target filter.

[0092] In this embodiment, the terminal obtains the filter instruction based on the display interface, that is, when the user determines the label of the target subject and the label of the target filter based on the subject label and the filter label of the display interface, the terminal is triggered to obtain the label of the target subject and the label of the target filter. Among them, the target subject label can be a single subject label, or multiple subject labels, or it can also be a global subject label, which is not limited in this embodiment.

[0093] In this embodiment, the terminal can display the subject tags and filter tags of the target image based on the display interface and obtain filter instructions. Different subject tags and filter tags provide users with a variety of filter operation options, thereby optimizing the user experience.

[0094] After the terminal determines the target subject and the target filter, in one embodiment, the filter operation is performed on the target subject according to the target filter and the drawing channel of the target subject, including:

[0095] According to the target filter and the drawing channel of the target subject, the image parameters of the target subject are adjusted; the image parameters include any one of color, brightness, saturation and contrast.

[0096] In this embodiment, after determining the drawing channels of the target filter and the target subject, the terminal performs a filter operation. Optionally, the image parameters of the target subject are adjusted according to the adjustment parameters in the target filter. For example, the target filter is a hue filter, and the adjustment parameters include brightness +2, saturation +3, and contrast +5. The terminal then adjusts the brightness, saturation, and contrast of the target subject's image parameters by +2, +3, and +5 according to the adjustment parameters to complete the filter operation on the target subject. This embodiment does not limit this.

[0097] In this embodiment, the terminal can adjust the image parameters of the target subject according to the adjustment parameters in the target filter, thereby controlling the effective range of the filter in a targeted manner and optimizing the display effect of the image.

[0098] If the target subject tag is multiple subject tags, or is a global subject tag, in one embodiment, Figure 6 As shown, if there are multiple target entities, the method further includes:

[0099] Step 601, determining the filter execution order of each target subject according to the drawing channel of each target subject and the preset drawing channel priority; the priority of the UI drawing channel is higher than the priority of the non-UI drawing channel.

[0100] In this embodiment, if the terminal receives multiple target subject tags and multiple target filter tags, the terminal determines the priority order of the execution of each target subject filter according to the drawing channel of each target subject. According to the actual situation of the image composition, generally, the priority of the image of the UI drawing channel is higher than that of the image of the non-UI drawing channel. For example, the target subject tag game startup interface login box icon and dynamic background image; wherein, the target filter tag corresponding to the login box icon is filter 1, and the target filter tag corresponding to the dynamic background image is filter 2, wherein, the terminal has determined that the login box icon is the subject of the UI drawing channel, and the dynamic background image is the subject of the non-UI drawing channel, then, the priority order of the determined filter operation is that the filter operation of the login box icon takes precedence over the filter operation of the dynamic background image, and this embodiment does not limit this.

[0101] Step 602: Perform filter operations on the target subjects according to the filter execution order of each target subject to obtain the filter effects of each target subject.

[0102] In this embodiment, the terminal performs filter operations according to the target filters corresponding to each target subject according to the determined filter execution order of each target subject. Taking the above example as an example, the terminal first performs filter operations on the login box icon according to filter 1 in the order of priority to obtain the filter effect of the login box icon; then performs filter operations on the dynamic background image according to filter 2 to obtain the filter effect of the dynamic background image, which is not limited in this embodiment.

[0103] Step 603: superimpose and display the filter effects of all target subjects.

[0104] In this embodiment, the terminal obtains the filter effects of each target subject in the order of filter execution, performs filter superposition synthesis, forms a superposition effect of the filter effects of multiple target subjects, and completes the filter operation of the target image. Optionally, the terminal can also display the filter superposition effect on the display interface, which is not limited in this embodiment.

[0105] In this embodiment, the terminal performs different filter operations on different target subjects in sequence according to the priority of the drawing channel, thereby controlling the effective range of the filter in a targeted manner and optimizing the display effect of the image.

[0106] In one embodiment, Figure 7 As shown, another image processing method is provided, including steps 101 to 112.

[0107] Step 101, obtaining input parameters of each subject in the sample image;

[0108] Step 102, determining the drawing channel corresponding to the input parameters of each subject in the sample image according to a preset judgment rule;

[0109] Step 103, establishing a database including corresponding relationships between input parameters and drawing channels;

[0110] Step 104, obtaining a graphics API drawing instruction of the target image according to a preset hook algorithm;

[0111] Step 105, determining input parameters of each subject in the target image according to the graphics API drawing instruction;

[0112] Step 106, determining the drawing channel of each subject according to the input parameters of each subject and the database;

[0113] Step 107, displaying each subject label and filter label of the target image in the display interface;

[0114] Step 108, obtaining a filter instruction based on the display interface;

[0115] Step 109, determining at least one target subject and at least one target filter in the target image according to the filter instruction;

[0116] Step 110, determining the execution order of the filter operations of each target subject according to the drawing channel of each target subject and the priority of the preset drawing channel;

[0117] Step 111, performing filter operations on the target subjects according to the execution order of the filter operations of the target subjects, and obtaining the filter effects of the target subjects;

[0118] Step 112, superimposing and displaying the filter effects of all target subjects.

[0119] In this embodiment, the terminal can determine whether the current filter operation is for the UI drawing channel or the non-UI drawing channel or the global image according to the target subject, and perform the filter operation according to the determined drawing channel to achieve targeted control of the effective range of the filter. While optimizing the display effect of the image after the filter operation, it meets the user's personalized and differentiated usage needs and the functional needs of some specific scenarios, improves the user experience, and adopts a hook mechanism to intercept graphics API drawing instructions, without relying on third-party application developers, reducing development costs.

[0120] It should be understood that although Figure 2-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0121] Figure 8 FIG. 1 is a structural block diagram of an image processing device according to an embodiment. Figure 8 As shown, the device includes an acquisition module 01, a determination module 02 and a synthesis module 03, wherein:

[0122] The acquisition module 01 is used to acquire the filter instruction of the target image; the target image includes multiple subjects;

[0123] The determination module 02 is used to determine the target subject and the target filter in the target image according to the filter instruction;

[0124] The synthesis module 03 is used to perform a filter operation on each target subject according to the target filter and the drawing channel of each target subject; the drawing channel includes a UI drawing channel or a non-UI drawing channel.

[0125] In one embodiment, if Fig. 9 As shown, the above-mentioned image processing device further includes a capture module 04;

[0126] The interception module 04 is used to obtain the graphics API drawing instructions of the target image;

[0127] The determination module 02 is further used to determine the input parameters of each subject in the target image according to the graphics API drawing instruction;

[0128] The determination module 02 is further used to determine the drawing channel of each subject according to the input parameters of each subject.

[0129] In one embodiment, the determination module 02 is used to determine the drawing channel of the subject according to the input parameters of the subject and a preset database; the database includes the corresponding relationship between the input parameters and the drawing channel.

[0130] In one embodiment, if Fig.10 As shown, the above-mentioned image processing device further includes a construction module 05;

[0131] The construction module 05 is used to obtain the input parameters of each subject in the sample image; determine the rendering channel corresponding to the input parameters of each subject in the sample image according to a preset judgment rule; and establish the corresponding relationship between each input parameter and the rendering channel.

[0132] In one embodiment, the above-mentioned interception module 04 is used to obtain the graphics API drawing instruction of the target image according to a preset hook algorithm.

[0133] In one of the embodiments, the acquisition module 01 is used to display the subject labels and filter labels of the target image in the display interface; and to acquire a filter instruction based on the display interface, wherein the filter instruction includes a label of the target subject and a label of the target filter.

[0134] In one of the embodiments, the synthesis module 03 is used to adjust the image parameters of the target subject according to the target filter and the drawing channel of the target subject; the image parameters include any one of color, brightness, saturation and contrast.

[0135] In one embodiment, if there are multiple target entities, such as Fig.11 As shown, the above-mentioned image processing device further includes a superposition module 06;

[0136] The superposition module 06 is used to determine the execution order of the filter operation of each target subject according to the drawing channel of each target subject and the priority of the preset drawing channel; the priority of the UI drawing channel is higher than the priority of the non-UI drawing channel; according to the execution order of the filter operation of each target subject, the filter operation is performed on the target subject to obtain the filter effect of each target subject; and the filter effects of all target subjects are superimposed and displayed.

[0137] The division of the modules in the above-mentioned image processing device is only for illustration. In other embodiments, the image processing device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned image processing device.

[0138] For the specific definition of the image processing device, please refer to the definition of the image processing method above, which will not be repeated here. Each module in the above image processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0139] Fig.12 FIG. 1 is a schematic diagram of the internal structure of an electronic device in one embodiment. Fig.12 As shown, the electronic device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an image processing method provided in each of the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.

[0140] The implementation of each module in the image processing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program module constituted by the computer program may be stored in a memory of an electronic device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.

[0141] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to perform the steps of the image processing method.

[0142] A computer program product comprising instructions, when executed on a computer, causes the computer to perform an image processing method.

[0143] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0144] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image processing method, characterized in that: The method comprises: Obtaining a filter instruction of a target image; the target image includes a plurality of subjects; the subjects are display elements in the target image; the display elements are functional icons; the target image refers to the current image to be operated; According to the filter instruction, a target subject and a target filter in the target image are determined; the target filter refers to a filter type determined by a user, and the filter type includes a sketch filter, an oil painting filter, a fun filter, and a functional filter for adjusting color tone; According to the target filter and the drawing channel of the target subject, the filter operation is performed on the target subject; the drawing channel includes a UI drawing channel or a non-UI drawing channel; the UI drawing channel is an image display method based on UI design; the non-UI drawing channel is an image display method implemented by data rendering.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining graphics API drawing instructions for the target image; Determining input parameters of each subject in the target image according to the graphics API drawing instruction; According to the input parameters of each of the subjects, a drawing channel of each of the subjects is determined.

3. The method according to claim 2, characterized in that Determining the drawing channel of each subject according to the input parameters of each subject includes: The drawing channel of the subject is determined according to the input parameters of the subject and a preset database; the database includes a corresponding relationship between the input parameters and the drawing channel.

4. The method according to claim 3, characterized in that The method for constructing the database includes: Obtain input parameters of each subject in the sample image; Determine the drawing channel corresponding to the input parameters of each subject in the sample image according to a preset judgment rule; A relationship between each of the input parameters and the drawing channel is established.

5. The method according to claim 2 or 3, characterized in that: The step of obtaining a graphics API drawing instruction for the target image includes: According to a preset hook algorithm, a graphics API drawing instruction of the target image is obtained.

6. The method according to any one of claims 1 to 4, characterized in that: The filter instruction for obtaining the target image includes: Displaying each subject label and filter label of the target image in a display interface; The filter instruction is acquired based on the display interface, wherein the filter instruction includes a label of a target subject and a label of a target filter.

7. The method according to any one of claims 1 to 4, characterized in that: The performing a filter operation on the target subject according to the target filter and the drawing channel of the target subject includes: According to the target filter and the drawing channel of the target subject, the image parameters of the target subject are adjusted; the image parameters include any one of color, brightness, saturation and contrast.

8. The method according to claim 7, characterized in that If there are multiple target entities, the method further includes: Determine the execution order of the filter operations of each target subject according to the drawing channel of each target subject and the priority of the preset drawing channel; the priority of the UI drawing channel is higher than the priority of the non-UI drawing channel; According to the execution order of the filter operations of the target subjects, the filter operations are performed on the target subjects to obtain the filter effects of the target subjects; The filter effects of all the target subjects are superimposed.

9. An image processing device, characterized in that: include: An acquisition module, used for acquiring a filter instruction of a target image; the target image includes a plurality of subjects; the subjects are display elements in the target image; The display element is a functional icon; the target image refers to the current image to be operated; A determination module, configured to determine a target subject and a target filter in the target image according to the filter instruction; the target filter refers to a filter type determined by a user, and the filter types include sketch filters, oil painting filters, fun filters, and functional filters for adjusting color tones; A synthesis module, used for performing a filter operation on each of the target subjects according to the target filter and a drawing channel of each of the target subjects; the drawing channel includes a UI drawing channel or a non-UI drawing channel; The UI drawing channel is an image display method based on UI design; the non-UI drawing channel is an image display method implemented through data rendering.

10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the image processing method according to any one of claims 1 to 8.

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