Image processing method, device and storage medium

By displaying a collection of images to obtain a filter matrix and then merging and processing the images, the problem of users having difficulty designing filters themselves is solved, achieving automated image filter adjustment and improving image quality and user experience.

CN115797193BActive Publication Date: 2026-11-20BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111063509.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2026-11-20
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

Users find it difficult to design filters to achieve the desired image effects, and existing filter adjustments require color knowledge and are complex to operate.

Method used

By displaying a set of images, the filter matrix of the target image is obtained. The original image is then processed according to the filter matrix and fused with the target filter image to generate the target fused image.

Benefits of technology

It eliminates the need for users to manually design filters, automatically adjusting image filter effects to improve image quality and enhance user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797193B_ABST
    Figure CN115797193B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image processing method, device and storage medium, the method comprising: in response to receiving a filter adjustment instruction for an original image, displaying a set of images; in response to receiving a selection instruction for a target image in the set of images, obtaining the target image; determining a filter matrix of the target image, the filter matrix being used to represent a filter effect of the target image; processing the original image according to the filter matrix to obtain a target filter image; and performing image fusion on the original image and the target filter image to obtain a target fusion image. Through the above technical solution, the filter of the original image can be adjusted by processing the original image according to the filter matrix of the target image, and the target fusion image obtained presents the filter effect of the target image desired by the user, without the user having to design the desired filter or manually adjust the color parameters, thereby meeting the user's filter adjustment requirements and improving the quality of the target fusion image obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to image processing methods, apparatus and storage media. Background Technology

[0002] Filters are mainly used to achieve various special effects on images. Currently, users can add filters to images through the terminal, but users can usually only select some built-in filters. However, the effects of these filters may not be what the user wants. If the user designs their own filters, they need to manually adjust the image parameters and have a certain understanding of color. Therefore, it is difficult for users to design their own filters, and it is not easy to achieve. As a result, users may not be able to process the image to the effect they want. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides an image processing method, apparatus and storage medium.

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

[0005] In response to receiving a filter adjustment command for the original image, display the image set;

[0006] In response to receiving a selection instruction for a target image in the image set, the target image is acquired;

[0007] Determine the filter matrix of the target image, wherein the filter matrix is ​​used to characterize the filter effect of the target image;

[0008] The original image is processed according to the filter matrix to obtain the target filter image;

[0009] The original image and the target filter image are fused together to obtain the target fused image.

[0010] Optionally, determining the filter matrix of the target image includes:

[0011] Determine the mean values ​​of the first R channel, the first G channel, and the first B channel of the pixels in the original image;

[0012] Determine the average values ​​of the second R channel, the second G channel, and the second B channel of the pixels in the target image;

[0013] The filter matrix is ​​determined based on the mean values ​​of the first R channel, the first G channel, the first B channel, the second R channel, the second G channel, the second B channel, and preset hyperparameters.

[0014] Optionally, determining the filter matrix based on the mean values ​​of the first R channel, the first G channel, the first B channel, the second R channel, the second G channel, the second B channel, and preset hyperparameters includes:

[0015] The element values ​​of each element in the first row of the filter matrix are determined based on the mean value of the first B channel, the mean value of the second B channel, and the preset hyperparameters.

[0016] The element values ​​of each element in the second row of the filter matrix are determined based on the mean of the first G channel, the mean of the second G channel, and the preset hyperparameters.

[0017] The element values ​​of each element in the third row of the filter matrix are determined based on the mean of the first R channel, the mean of the second R channel, and the preset hyperparameters.

[0018] Optionally, the step of fusing the original image and the target filter image to obtain a target fused image includes:

[0019] Obtain the first weight information corresponding to the original image and the second weight information corresponding to the target filter image;

[0020] Based on the original image, the first weight information, the target filter image, and the second weight information, image fusion is performed to obtain the target fused image.

[0021] Optionally, obtaining the first weight information corresponding to the original image and the second weight information corresponding to the target filter image includes:

[0022] Display sliders for adjusting the weights of the original image and the target filter image;

[0023] The first weight information and the second weight information are determined based on the user's sliding operation on the slider.

[0024] Optionally, processing the original image according to the filter matrix to obtain the target filter image includes:

[0025] The RGB values ​​of each pixel in the original image are processed according to the filter matrix to obtain the target filter image.

[0026] Optionally, after the step of determining the filter matrix of the target image, the method further includes:

[0027] Output a prompt message, wherein the prompt message is used to prompt the user whether to save the filter effect of the target image;

[0028] In response to receiving a confirmation instruction from the user that the filter effect representing the target image is saved, the filter matrix is ​​stored.

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

[0030] The display module is used to display a collection of images in response to receiving a filter adjustment command for the original image;

[0031] The acquisition module is configured to acquire the target image in response to receiving a selection instruction for a target image in the image set;

[0032] A determining module is used to determine the filter matrix of the target image, wherein the filter matrix is ​​used to characterize the filter effect of the target image;

[0033] The processing module is used to process the original image according to the filter matrix to obtain the target filter image;

[0034] The fusion module is used to fuse the original image and the target filter image to obtain a target fused image.

[0035] Optionally, the determining module includes:

[0036] The first determining submodule is used to determine the first R channel mean, the first G channel mean, and the first B channel mean of the pixels in the original image;

[0037] The second determining submodule is used to determine the average value of the second R channel, the average value of the second G channel, and the average value of the second B channel of the pixels in the target image;

[0038] The matrix determination submodule is used to determine the filter matrix based on the mean values ​​of the first R channel, the first G channel, the first B channel, the second R channel, the second G channel, the second B channel, and preset hyperparameters.

[0039] Optionally, the matrix determination submodule includes:

[0040] The third determining submodule is used to determine the element value of each element in the first row of the filter matrix based on the mean value of the first B channel, the mean value of the second B channel, and the preset hyperparameters.

[0041] The fourth determining submodule is used to determine the element value of each element in the second row of the filter matrix based on the mean value of the first G channel, the mean value of the second G channel, and the preset hyperparameters.

[0042] The fifth determining submodule is used to determine the element values ​​of each element in the third row of the filter matrix based on the mean value of the first R channel, the mean value of the second R channel, and the preset hyperparameters.

[0043] Optionally, the fusion module includes:

[0044] The acquisition submodule is used to acquire the first weight information corresponding to the original image and the second weight information corresponding to the target filter image;

[0045] The fusion submodule is used to perform image fusion based on the original image, the first weight information, the target filter image, and the second weight information to obtain the target fused image.

[0046] Optionally, the acquisition submodule includes:

[0047] The display submodule is used to display sliders for adjusting the weights of the original image and the target filter image, respectively.

[0048] The sixth determining submodule is used to determine the first weight information and the second weight information based on the user's sliding operation on the slider.

[0049] Optionally, the processing module is used to process the RGB values ​​of each pixel in the original image according to the filter matrix to obtain the target filter image.

[0050] Optionally, the device further includes:

[0051] An output module is used to output a prompt message after the determining module determines the filter matrix of the target image, wherein the prompt message is used to prompt the user whether to save the filter effect of the target image;

[0052] The storage module is used to store the filter matrix in response to receiving a confirmation command from the user that represents saving the filter effect of the target image.

[0053] According to a third aspect of the present disclosure, an image processing apparatus is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to perform the steps of the image processing method provided in the first aspect of the present disclosure.

[0054] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the image processing method provided in the first aspect of the present disclosure.

[0055] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0056] The above technical solution, in response to receiving a filter adjustment instruction for the original image, displays an image set; in response to receiving a selection instruction for a target image in the image set, acquires the target image and determines its filter matrix. This filter matrix characterizes the filter effect of the target image. Then, the original image is processed according to the filter matrix to obtain the target filter image. Finally, the original image and the target filter image are fused to obtain a target fused image. Thus, by processing the original image according to the filter matrix of the target image, the filter of the original image can be adjusted. The resulting target fused image presents the desired filter effect of the target image, eliminating the need for the user to design their own filter or manually adjust color parameters. This satisfies the user's filter adjustment needs, improves the quality of the obtained target fused image, and enhances the user experience.

[0057] 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

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

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

[0060] Figure 2 This is a flowchart illustrating a method for determining a filter matrix for a target image according to an exemplary embodiment.

[0061] Figure 3 This is a flowchart illustrating a method for fusing an original image and a target filter image to obtain a target fused image, according to an exemplary embodiment.

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

[0063] Figure 5 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment. Detailed Implementation

[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. 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.

[0065] Figure 1 This is a flowchart illustrating an image processing method according to an exemplary embodiment. This method can be applied to terminal devices, such as mobile phones, tablets, and personal computers. Figure 1 As shown, the method may include steps 101 to 105.

[0066] In step 101, in response to receiving a filter adjustment instruction for the original image, the image set is displayed.

[0067] The original image can be a pre-stored image on the terminal, an image captured in real-time by the user through the terminal's camera, or a frame from a video. This disclosure does not limit the size or acquisition method of the original image.

[0068] Users can edit the original image via the terminal, such as cropping it, and adjust its filters to customize the effect. For example, the terminal may display a filter adjustment button for the original image. When the user clicks this button, the terminal receives a filter adjustment instruction for the original image. In response to receiving the instruction, the terminal may display an image set, which may include one or more images, such as a list of photos stored on the terminal.

[0069] In step 102, in response to receiving a selection instruction for a target image in the image set, the target image is acquired.

[0070] Users can select images from an image collection that display the desired filter effect. For example, if a user clicks on an image in the collection, the terminal receives a selection instruction for the target image. The terminal can then use the clicked image as the target image, representing the filter effect the user wants to apply to it. The target image is different from the original image; that is, the target image and the original image are not the same image.

[0071] In step 103, the filter matrix of the target image is determined.

[0072] The filter matrix is ​​used to characterize the filter effect on the target image. As an example, the filter matrix can be a square matrix, such as a matrix with three rows and three columns, meaning it can contain nine elements. This example is for illustrative purposes only and does not constitute a limitation on the implementation method.

[0073] In step 104, the original image is processed according to the filter matrix to obtain the target filter image.

[0074] In step 105, the original image and the target filter image are fused to obtain the target fused image.

[0075] The user selects a target image from the image set, representing the filter effect that the user wants to add to the original image. In this disclosure, the filter matrix of the target image can be automatically determined, and the original image is processed according to the filter matrix of the target image to obtain the target filter image. Then, the original image and the target filter image are fused to obtain the target fused image. In this way, the filter of the original image can be adjusted, and the obtained target fused image presents the filter effect of the target image that the user wants.

[0076] The above technical solution, in response to receiving a filter adjustment instruction for the original image, displays an image set; in response to receiving a selection instruction for a target image in the image set, acquires the target image and determines its filter matrix. This filter matrix characterizes the filter effect of the target image. Then, the original image is processed according to the filter matrix to obtain the target filter image. Finally, the original image and the target filter image are fused to obtain a target fused image. Thus, by processing the original image according to the filter matrix of the target image, the filter of the original image can be adjusted. The resulting target fused image presents the desired filter effect of the target image, eliminating the need for the user to design their own filter or manually adjust color parameters. This satisfies the user's filter adjustment needs, improves the quality of the obtained target fused image, and enhances the user experience.

[0077] Figure 2 This is a flowchart illustrating a method for determining a filter matrix for a target image according to an exemplary embodiment, such as... Figure 2 As shown, step 103 may include steps 201 to 203.

[0078] In step 201, the mean values ​​of the first R channel, the first G channel, and the first B channel of the pixels in the original image are determined.

[0079] Specifically, the first R-channel average can be obtained by using the ratio of the sum of the R-channel values ​​of each pixel in the original image to the number of pixels in the original image, the first G-channel average can be obtained by using the ratio of the sum of the G-channel values ​​of each pixel in the original image to the number of pixels in the original image, and the first B-channel average can be obtained by using the ratio of the sum of the B-channel values ​​of each pixel in the original image to the number of pixels in the original image.

[0080] In step 202, the average values ​​of the second R channel, the second G channel, and the second B channel of the pixels in the target image are determined.

[0081] Specifically, the ratio of the sum of the R channel values ​​of each pixel in the target image to the number of pixels in the target image can be used as the second R channel mean, the ratio of the sum of the G channel values ​​of each pixel in the target image to the number of pixels in the target image can be used as the second G channel mean, and the ratio of the sum of the B channel values ​​of each pixel in the target image to the number of pixels in the target image can be used as the second B channel mean.

[0082] It should be noted that this disclosure does not restrict the execution order of steps 201 and 202. Step 201 may be executed after step 202, or the two may be executed in parallel. Figure 2 The method shown is for illustrative purposes only.

[0083] In step 203, the filter matrix is ​​determined based on the mean values ​​of the first R channel, the first G channel, the first B channel, the second R channel, the second G channel, the second B channel, and preset hyperparameters.

[0084] The derivation process for determining the filter matrix is ​​described below.

[0085] The mean value of the first R channel of the pixels in the original image is represented as... The mean value of the first G channel is expressed as: The mean of the first B channel is expressed as: The mean value of the second R channel of the pixels in the target image is represented as... The mean value of the second G channel is expressed as: The mean of the second B channel is expressed as follows: If the filter matrix is ​​A, then the following expression (1) holds:

[0086]

[0087] Taking a filter matrix of 3 rows and 3 columns as an example, matrix A can be represented as:

[0088]

[0089] Then expression (1) can be transformed into the following expression (2):

[0090]

[0091] Expression (2) can be transformed into the following expression (3):

[0092]

[0093] Let matrix Then the augmented matrix A” = (A, m) of matrix A has a rank (A”) ≤ 3 < n, where n is the number of unknowns in the unsolved filter matrix, which is the number of elements in the filter matrix. When not all elements are 0, the relationship between the rank of the augmented matrix A” and the rank of matrix A is rank(A”) = rank(A) = 3 < n, then A has infinite solutions. Since the rank of matrix A is 3, 6 elements can be designated as free unknowns from the 9 elements of matrix A to ensure that A has a unique solution. The selection of which 6 elements are designated as free unknowns can be random and is not limited in this disclosure. As an example, for instance, a… 01 a 02 a 11 a 12 a 21 a 22 Designated as a free unknown, the free unknown can be represented by other unknowns, i.e., a. 00 a 10 a 20 And it can be represented by preset hyperparameters. For example, the preset hyperparameters may include a first preset hyperparameter α and a second preset hyperparameter β, which can be set experimentally.

[0094] The relationships between each free unknown and other unknowns can be seen as follows:

[0095] a 01 =α*a 00 ;a 02 =β*a 00 ;a 11 =α*a 10 ;

[0096] a 12 =β*a 10 ;a 21 =α*a 20 ;a 22 =β*a 20 .

[0097] The first preset hyperparameter α can be 1.96, and the second preset hyperparameter β can be 0.48.

[0098] Substituting the relationships between the various free unknowns and other unknowns into expression (2), we obtain the following expression:

[0099]

[0100]

[0101]

[0102]

[0103]

[0104] In this way, the element values ​​of each element in the filter matrix can be determined. Therefore, the implementation method of step 203 can be:

[0105] Based on the average value of the first B channel Second B channel mean And preset hyperparameters α and β, to determine the element values ​​of each element in the first row of the filter matrix;

[0106] Based on the average value of the first G channel Second G channel mean And preset hyperparameters α and β, to determine the element values ​​of each element in the second row of the filter matrix;

[0107] Based on the mean of the first R channel Second R channel mean And preset hyperparameters α and β, to determine the element values ​​of each element in the third row of the filter matrix.

[0108] The above technical solution can calculate the element values ​​of each element in the filter matrix, and then process the original image according to the filter matrix. The filter of the original image can be adjusted so that the adjusted original image presents the filter effect of the target image that the user wants, without the need for the user to design the desired filter.

[0109] In this disclosure, step 104 can be implemented as follows:

[0110] The RGB values ​​of each pixel in the original image are processed according to the filter matrix to obtain the target filter image.

[0111] The RGB values ​​of each pixel in the original image can be processed separately. The RGB values ​​of the pixels in the original image can be processed according to the filter matrix using the following formula (4):

[0112] A*[r1,g1,b1] T=[r2,g2,b2] T (4)

[0113] A is the filter matrix, r1 represents the R channel value of the pixel in the original image, r2 represents the R channel value of the corresponding pixel in the target filter image, g1 represents the G channel value of the pixel in the original image, g2 represents the G channel value of the corresponding pixel in the target filter image, b1 represents the B channel value of the pixel in the original image, and b2 represents the B channel value of the corresponding pixel in the target filter image.

[0114] In this disclosure, exemplary embodiments of step 105 may be as follows: Figure 3 As shown, it includes steps 3021 and 3022.

[0115] In step 3021, the first weight information corresponding to the original image and the second weight information corresponding to the target filter image are obtained.

[0116] The implementation of step 3021 can be as follows: displaying a slider for adjusting the weights of the original image and the target filter image; determining the first weight information and the second weight information based on the user's sliding operation on the slider.

[0117] After obtaining the target filter image, the terminal can display a slider that can be slid up and down or left and right. This slider is used by the user to adjust the weight of the original image and the target filter image respectively.

[0118] For example, taking a slider that slides left and right as an example, if the user slides to the left, it means increasing the weight of the original image and decreasing the weight of the target filter image. If the user slides the slider to the far left, the weight of the target filter image is zero, and the result is the original image itself. Similarly, if the user slides to the right, it means decreasing the weight of the original image and increasing the weight of the target filter image. If the user slides the slider to the far right, the weight of the original image is zero, and the result is the target filter image.

[0119] Determining the first and second weight information based on the user's sliding action on the slider can make the final target fused image more in line with the user's needs and improve the user experience.

[0120] In step 3022, image fusion is performed based on the original image, the first weight information, the target filter image, and the second weight information to obtain the target fused image.

[0121] For example, the target fused image mix can be obtained by the following formula (5):

[0122] mix = η * p x +(1-η)*px (5)

[0123] Where η represents the first weight information, p x The original image is represented by the sum of the first and second weight information, which is 1. 1-η represents the second weight information, and p... x ' represents the target filter image, and η ranges from [0,1]. η can be initially set to, for example, 0.6, and then varies depending on the user's movement of the slider.

[0124] The above method can fuse the original image and the target filter image to obtain a target fused image. The first weight information corresponding to the original image and the second weight information corresponding to the target filter image can be determined based on the sliding operation of the slider, so that the final target fused image better meets the user's needs and improves the user experience.

[0125] In this disclosure, after the step of determining the filter matrix of the target image, the image processing method may further include:

[0126] Output a prompt message, which prompts the user whether to save the filter effect of the target image;

[0127] In response to receiving a confirmation command from the user that represents the filter effect to be saved for the target image, the filter matrix is ​​stored.

[0128] For example, this prompt can be displayed as a pop-up window or via voice. Using a pop-up window as an example, it could display the text prompt "Save the current filter as a frequently used filter?" If the user clicks "Yes," it indicates that the user's input confirms the saving of the filter effect for the target image. The filter matrix for the target image can then be stored, and the user can customize the name of this filter effect. The user can then directly apply this filter effect to other images in the future. In this way, the desired filter effect can be obtained without the user manually adjusting color parameters and applied to any other image, meeting the user's needs.

[0129] Based on the same inventive concept, this disclosure also provides an image processing apparatus. Figure 4 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment, such as... Figure 4 As shown, the device 500 may include:

[0130] The display module 501 is used to display a collection of images in response to receiving a filter adjustment instruction for the original image;

[0131] Acquisition module 502 is configured to acquire the target image in response to receiving a selection instruction for a target image in the image set;

[0132] The determining module 503 is used to determine the filter matrix of the target image, wherein the filter matrix is ​​used to characterize the filter effect of the target image;

[0133] The processing module 504 is used to process the original image according to the filter matrix to obtain the target filter image;

[0134] The fusion module 505 is used to fuse the original image and the target filter image to obtain a target fused image.

[0135] The above technical solution, in response to receiving a filter adjustment instruction for the original image, displays an image set; in response to receiving a selection instruction for a target image in the image set, acquires the target image and determines its filter matrix. This filter matrix characterizes the filter effect of the target image. Then, the original image is processed according to the filter matrix to obtain the target filter image. Finally, the original image and the target filter image are fused to obtain a target fused image. Thus, by processing the original image according to the filter matrix of the target image, the filter of the original image can be adjusted. The resulting target fused image presents the desired filter effect of the target image, eliminating the need for the user to design their own filter or manually adjust color parameters. This satisfies the user's filter adjustment needs, improves the quality of the obtained target fused image, and enhances the user experience.

[0136] Optionally, the determining module 503 includes:

[0137] The first determining submodule is used to determine the first R channel mean, the first G channel mean, and the first B channel mean of the pixels in the original image;

[0138] The second determining submodule is used to determine the average value of the second R channel, the average value of the second G channel, and the average value of the second B channel of the pixels in the target image;

[0139] The matrix determination submodule is used to determine the filter matrix based on the mean values ​​of the first R channel, the first G channel, the first B channel, the second R channel, the second G channel, the second B channel, and preset hyperparameters.

[0140] Optionally, the matrix determination submodule includes:

[0141] The third determining submodule is used to determine the element value of each element in the first row of the filter matrix based on the mean of the first B channel, the mean of the second B channel, and the preset hyperparameters.

[0142] The fourth determining submodule is used to determine the element value of each element in the second row of the filter matrix based on the mean value of the first G channel, the mean value of the second G channel, and the preset hyperparameters.

[0143] The fifth determining submodule is used to determine the element values ​​of each element in the third row of the filter matrix based on the mean value of the first R channel, the mean value of the second R channel, and the preset hyperparameters.

[0144] Optionally, the fusion module 505 includes:

[0145] The acquisition submodule is used to acquire the first weight information corresponding to the original image and the second weight information corresponding to the target filter image;

[0146] The fusion submodule is used to perform image fusion based on the original image, the first weight information, the target filter image, and the second weight information to obtain the target fused image.

[0147] Optionally, the acquisition submodule includes:

[0148] The display submodule is used to display sliders for adjusting the weights of the original image and the target filter image, respectively.

[0149] The sixth determining submodule is used to determine the first weight information and the second weight information based on the user's sliding operation on the slider.

[0150] Optionally, the processing module 504 is used to process the RGB values ​​of each pixel in the original image according to the filter matrix to obtain the target filter image.

[0151] Optionally, the device 500 further includes:

[0152] An output module is used to output a prompt message after the determining module 503 determines the filter matrix of the target image, wherein the prompt message is used to prompt the user whether to save the filter effect of the target image;

[0153] The storage module is used to store the filter matrix in response to receiving a confirmation command from the user that represents saving the filter effect of the target image.

[0154] 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.

[0155] This disclosure also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the image processing method provided in this disclosure.

[0156] Figure 5 This is a block diagram illustrating an image processing apparatus 800 according to an exemplary embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0157] Reference Figure 5 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0158] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the image processing method described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0159] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 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, or optical disk.

[0160] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 800.

[0161] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the 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 the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the 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.

[0162] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 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 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0163] I / O interface 812 provides an interface between processing component 802 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.

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

[0165] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 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.

[0166] In an exemplary embodiment, the apparatus 800 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 image processing method described above.

[0167] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to complete the image processing method described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0168] In another exemplary embodiment, a computer program product is also provided, which includes a computer program executable by a programmable device, the computer program having a code portion for performing the image processing method described above when executed by the programmable device.

[0169] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application 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 following claims.

[0170] 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, include: In response to receiving a filter adjustment command for the original image, display the image set; In response to receiving a selection instruction for a target image in the image set, the target image is acquired; Determine the filter matrix of the target image, wherein the filter matrix is ​​used to characterize the filter effect of the target image; The original image is processed according to the filter matrix to obtain the target filter image; The original image and the target filter image are fused together to obtain the target fused image; The step of determining the filter matrix of the target image includes: Determine the mean values ​​of the first R channel, the first G channel, and the first B channel of the pixels in the original image; Determine the average values ​​of the second R channel, the second G channel, and the second B channel of the pixels in the target image; Based on the mean value of the first B channel, the mean value of the second B channel, and the preset hyperparameter, the element value of each element in the first row of the filter matrix is ​​determined. The preset hyperparameter is the proportional relationship between the free unknown and other unknowns in the filter matrix. The element values ​​of each element in the second row of the filter matrix are determined based on the mean of the first G channel, the mean of the second G channel, and the preset hyperparameters. The element values ​​of each element in the third row of the filter matrix are determined based on the mean of the first R channel, the mean of the second R channel, and the preset hyperparameters.

2. The method according to claim 1, characterized in that, The step of fusing the original image and the target filter image to obtain a target fused image includes: Obtain the first weight information corresponding to the original image and the second weight information corresponding to the target filter image; Based on the original image, the first weight information, the target filter image, and the second weight information, image fusion is performed to obtain the target fused image.

3. The method according to claim 2, characterized in that, The step of obtaining the first weight information corresponding to the original image and the second weight information corresponding to the target filter image includes: Display sliders for adjusting the weights of the original image and the target filter image; The first weight information and the second weight information are determined based on the user's sliding operation on the slider.

4. The method according to claim 1, characterized in that, The step of processing the original image according to the filter matrix to obtain the target filter image includes: The RGB values ​​of each pixel in the original image are processed according to the filter matrix to obtain the target filter image.

5. The method according to claim 1, characterized in that, Following the step of determining the filter matrix of the target image, the method further includes: Output a prompt message, wherein the prompt message is used to prompt the user whether to save the filter effect of the target image; In response to receiving a confirmation instruction from the user that the filter effect representing the target image is saved, the filter matrix is ​​stored.

6. An image processing apparatus, characterized in that, include: The display module is used to display a collection of images in response to receiving a filter adjustment command for the original image; The acquisition module is configured to acquire the target image in response to receiving a selection instruction for a target image in the image set; A determining module is used to determine the filter matrix of the target image, wherein the filter matrix is ​​used to characterize the filter effect of the target image; The processing module is used to process the original image according to the filter matrix to obtain the target filter image; The fusion module is used to fuse the original image and the target filter image to obtain a target fused image; The determining module includes: The first determining submodule is used to determine the first R channel mean, the first G channel mean, and the first B channel mean of the pixels in the original image; The second determining submodule is used to determine the average value of the second R channel, the average value of the second G channel, and the average value of the second B channel of the pixels in the target image; The third determining submodule is used to determine the element value of each element in the first row of the filter matrix based on the mean of the first B channel, the mean of the second B channel, and the preset hyperparameters. The preset hyperparameters are the proportional relationship between the free unknowns and other unknowns in the filter matrix. The fourth determining submodule is used to determine the element value of each element in the second row of the filter matrix based on the mean value of the first G channel, the mean value of the second G channel, and the preset hyperparameters. The fifth determining submodule is used to determine the element values ​​of each element in the third row of the filter matrix based on the mean of the first R channel, the mean of the second R channel, and the preset hyperparameters.

7. An image processing apparatus, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When executed by a processor, the program instructions implement the steps of the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Picture processing method and device in online presentation file, storage medium and equipment

    CN110599394A

  • Image processing method and device, computer readable medium and terminal equipment

    CN111652830A