Image processing method and device, electronic equipment, storage medium and chip

By acquiring the white balance algorithm categories and confidence of the image, and reasonably allocating the weight of the white balance parameters, the problem of inaccurate determination of white balance parameters is solved, and a better white balance processing effect is achieved.

CN120378759APending Publication Date: 2025-07-25BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411405008.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, the accuracy of determining white balance parameters is insufficient, resulting in poor white balance treatment effect.

Method used

By obtaining the white balance algorithm category and confidence of the image to be processed, the target weight of the white balance parameter is determined, and reasonable allocation is made based on the confidence, the target white balance parameter is finally determined, and the accuracy of the white balance parameter is improved.

Benefits of technology

The accuracy of determining white balance parameters is improved, thereby improving the white balance processing effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378759A_ABST
    Figure CN120378759A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, electronic equipment, a storage medium and a chip, and the method comprises the steps: obtaining a white balance algorithm type corresponding to a to-be-processed image and the confidence coefficient of the white balance algorithm type, and determining the target weight of a white balance parameter of the image according to the confidence coefficient of the white balance algorithm type, the white balance parameter comprises a white balance parameter determined based on a white balance algorithm category, determining a target white balance parameter of the image according to the white balance parameter of the image and the target weight, and realizing reasonable distribution of the target weight of the white balance parameter of the image through confidence of the white balance algorithm category. And the target white balance parameter is obtained through fusion based on the target weight, so that the accuracy of determining the white balance parameter is improved, and the white balance processing effect of the image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] White balance is an adjustment that a digital camera device or related software can perform on a captured image to ensure that the white in the image can appropriately reflect the actual white in the real-world scene of the captured image. In related technologies, white balance parameters are determined through a white balance algorithm, and the image color is adjusted through the white balance parameters so that the color of the adjusted image is consistent with the color actually observed by the human eye.

[0003] How to improve the accuracy of determining white balance parameters and thus improve the effect of white balance processing is an issue that technicians are increasingly concerned about. Summary of the Invention

[0004] This application aims to solve at least one of the technical problems in related technologies to some extent.

[0005] To this end, this application proposes an image processing method, apparatus, electronic device, storage medium, and chip, which improves the accuracy of determining white balance parameters and thus improves the effect of white balance processing.

[0006] An embodiment of one aspect of this application proposes an image processing method, including:

[0007] Obtaining the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category;

[0008] Determining the target weight of the white balance parameters of the image according to the confidence level of the white balance algorithm category; wherein, the white balance parameters include the white balance parameters determined based on the white balance algorithm category;

[0009] Determining the target white balance parameters of the image according to the white balance parameters and the target weight of the image.

[0010] An embodiment of another aspect of this application proposes an image processing apparatus, including:

[0011] An obtaining module, configured to obtain the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category;

[0012] A first determination module, configured to determine the target weight of the white balance parameters of the image according to the confidence level of the white balance algorithm category; wherein, the white balance parameters include the white balance parameters determined based on the white balance algorithm category;

[0013] A second determination module, configured to determine a target white balance parameter of the image according to the white balance parameter of the image and a target weight.

[0014] In another aspect of the present application, an embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the foregoing aspect is implemented.

[0015] In another aspect of the present application, an embodiment provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the foregoing aspect is implemented.

[0016] In another aspect of the present application, an embodiment provides a computer program product, on which a computer program is stored. When the program is executed by a processor, the method described in the foregoing aspect is implemented.

[0017] In another aspect of the present application, an embodiment provides a chip, including a processing circuit, and the processing circuit is configured to implement the method described in the foregoing aspect.

[0018] The image processing method, device, electronic device, storage medium, and chip provided by the present application obtain a white balance algorithm category corresponding to an image to be processed and a confidence level of the white balance algorithm category, determine a target weight of the white balance parameter of the image according to the confidence level of the white balance algorithm category, where the white balance parameter includes a white balance parameter determined based on the white balance algorithm category, determine a target white balance parameter of the image according to the white balance parameter of the image and the target weight, and through the confidence level of the white balance algorithm category, a reasonable allocation of the target weight of the white balance parameter of the image is realized, and then the target white balance parameter is obtained by fusing based on the target weight, improving the accuracy of determining the white balance parameter, and thus improving the white balance processing effect of the image.

[0019] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. Description of the Drawings

[0020] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:

[0021] Figure 1 is a schematic flowchart of an image processing method provided by an embodiment of the present application;

[0022] Figure 2 is a schematic flowchart of another image processing method provided by an embodiment of the present application;

[0023] Figure 3Schematic flowchart of another image processing method provided by an embodiment of this application;

[0024] Figure 4 Schematic structural diagram of an image processing apparatus provided by an embodiment of this application;

[0025] Figure 5 Schematic structural diagram of an electronic device provided by an embodiment of this application. Detailed implementation manners

[0026] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as limiting the present application.

[0027] The image processing method, apparatus, electronic device, storage medium, and chip according to the embodiments of the present application will be described below with reference to the accompanying drawings.

[0028] In the related art, the white balance technology aims to simulate the constancy of white for the human eye under different light sources, mainly including the traditional Automatic White Balance (AWB) algorithm and the Artificial Intelligence AIAWB algorithm. Among them, the traditional AWB algorithm finds the pixel with the highest probability of neutral color in the picture by artificially setting a large number of rules, and then restores it to white to determine the white balance parameters for white balance adjustment. The AIAWB algorithm implicitly learns the mapping relationship from the image to the white point, that is, obtains the white balance parameters for white balance adjustment, through a large number of manually labeled data, so as to achieve the white balance adjustment effect. Each of the two types of algorithms has its own advantages and disadvantages. The traditional AWB algorithm has stronger interpretability and debuggability, but its overall performance is worse than that of the AIAWB algorithm; the AIAWB algorithm has better overall performance, but its interpretability and debuggability are worse. Therefore, the two types of methods are generally combined now to achieve better results.

[0029] However, in the related art, when fusing white balance parameters obtained by at least one white balance algorithm using parameters such as correlated color temperature (CCT), brightness (luxindex), and color cast (Duv) in the purple-red direction, the accuracy of the fusion result is insufficient. For this reason, the present application proposes an image processing method, which obtains the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category, and determines the target weight of the white balance parameters of the image according to the confidence level of the white balance algorithm category. Among them, the white balance parameters include the white balance parameters determined based on the white balance algorithm category. According to the white balance parameters of the image and the target weight, the target white balance parameters of the image are determined. Based on the confidence level of the white balance algorithm category, a detailed distinction of the white balance algorithm category is realized, so as to realize a reasonable allocation of the target weight of the white balance parameters of the image, and then fuse based on the target weight to obtain the target white balance parameters, improving the accuracy of determining the white balance parameters, and further improving the white balance adjustment effect of the image.

[0030] Figure 1 It is a schematic flowchart of an image processing method provided by an embodiment of the present application.

[0031] The execution subject of the image processing method in the embodiment of the present application is an image processing device, which can be set in an electronic device. The electronic device can be a mobile terminal, such as a smart phone, a personal digital assistant, a smart wearable device, an IPAD, etc., which is not limited in this embodiment. The execution subject of the image processing method in the embodiment of the present application can also be a processor chip (such as an image signal processor ISP)

[0032] Such as Figure 1 shown, the method may include the following steps:

[0033] Step 101, obtain the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category.

[0034] Among them, the image to be processed is at least one of an RGB image and an RG / BG statistical image. Among them, RG is (Red / Green, red-green ratio), and BG is (Blue / Green, blue-green ratio).

[0035] Among them, the image to be processed can be white balance processed using at least one category of white balance algorithm, and the processing effects obtained by performing white balance processing on the image using different white balance algorithm categories are also different. As an example, the white balance algorithm category includes an artificial intelligence automatic white balance AIAWB algorithm category and a traditional automatic white balance AWB algorithm category. Thus, the image can be white balance processed using the AIAWB algorithm category and can also be white balance processed using the traditional AWB algorithm category.

[0036] Among them, the confidence of the white balance algorithm category indicates the possibility of this white balance algorithm category being the better white balance algorithm category for this image. The larger the value of the confidence, the higher the possibility. As an example, the value of the confidence is from 0 to 1. The confidence of the white balance algorithm category of AIAWB corresponding to the image to be processed is 0.8, and the confidence of the white balance algorithm category of traditional AWB is 0.2. Then it is considered that the accuracy of using the white balance algorithm category of AIAWB for white balance processing of this image to be processed is higher, and the accuracy of using the white balance algorithm category of traditional AWB for white balance processing is lower. Therefore, the first white balance algorithm category (dominant algorithm) corresponding to the image to be processed is the white balance algorithm category of AIAWB, simply referred to as the AIAWB category.

[0037] Among them, the white balance algorithms corresponding to different white balance algorithm categories are different. For example, the AIAWB category can be deep learning (such as convolutional neural network CNN) or machine learning algorithms (such as support vector machine, random forest, etc.). The traditional AWB category can be the gray world assumption method or the color temperature method, etc.

[0038] Step 102: Determine the target weight of the white balance parameter of the image according to the confidence of the white balance algorithm category.

[0039] Among them, the white balance parameter of the image corresponding to the white balance algorithm category is the white balance parameter of this image calculated by using the white balance algorithm corresponding to this white balance algorithm category.

[0040] In the embodiment of this application, the confidence of the white balance algorithm category is proportional to the target weight of the white balance parameter of the image corresponding to the white balance algorithm category. Among them, the higher the confidence of the white balance algorithm category, the greater the target weight of the white balance parameter of the image corresponding to the white balance algorithm category. In the case where there are multiple white balance algorithm categories, the sum of the target weights of the white balance parameters of the images corresponding to the multiple white balance algorithm categories is 1.

[0041] Among them, the white balance parameter includes the white balance parameter for performing white balance adjustment on the image determined based on the white balance algorithm category, that is, the white balance parameter of the image determined by using the white balance algorithm corresponding to this white balance algorithm category. As an implementation manner, based on the white balance algorithm, the color temperature information of the image to be processed is identified, and the white balance parameter of the image to be processed is determined according to the color temperature information. Among them, the white balance parameter includes a white balance gain value, and the white balance gain value is used to perform white balance adjustment on the image to be processed.

[0042] Step 103: Determine the target white balance parameter of the image according to the white balance parameter and the target weight of the image.

[0043] In the embodiments of the present application, the target weights of each white balance parameter are used to perform weighted summation on each white balance parameter to obtain the target white balance parameter of the image. By carefully distinguishing the types of white balance algorithms corresponding to the image, the weights for fusing each white balance parameter corresponding to the white balance algorithm type are allocated based on the confidence of the white balance algorithm type, improving the accuracy of weight allocation, and further improving the accuracy of determining the target white balance parameter of the image.

[0044] In the image processing method of the embodiments of the present application, the white balance algorithm category corresponding to the image to be processed and the confidence of the white balance algorithm category are obtained. According to the confidence of the white balance algorithm category, the target weight of the white balance parameter of the image is determined, where the white balance parameter includes the white balance parameter determined based on the white balance algorithm category. According to the white balance parameter and the target weight of the image, the target white balance parameter of the image is determined. Through the confidence of the white balance algorithm category, a reasonable allocation of the target weight of the white balance parameter of the image is achieved, and then the target white balance parameter is obtained by fusing based on the target weight, improving the accuracy of determining the white balance parameter, and thus improving the white balance adjustment effect of the image.

[0045] Based on the above embodiments, Figure 2 is a schematic flowchart of another image processing method provided by the embodiments of the present application, which illustrates how to adjust the initial weight of the white balance parameter. By adjusting on the basis of the existing initial weight, the amount of calculation is reduced and the efficiency is improved. As Figure 2 shown, the method includes the following steps:

[0046] Step 201, obtain the image to be processed and the associated information of the image.

[0047] Among them, the associated information of the image includes the scene information for collecting the image, such as the brightness information of the scene and the white point information in the image determined by using a set white balance algorithm. The white point information refers to the pixel point information in the image that should be regarded as white. As an example, the set white balance algorithms include the AIAWB algorithm and the traditional AWB algorithm.

[0048] Step 202, determine the white balance algorithm category corresponding to the image and the confidence of the white balance algorithm category according to the image and the associated information of the image.

[0049] In an implementation manner of the embodiments of the present application, a traditional rule-based algorithm is used. Through an identification module, according to the image and the associated information of the image, the white balance algorithm category corresponding to the current image and the confidence of the white balance algorithm category are determined, where the value range of the confidence can also be from 0 to 100, and the specific range can be set based on requirements.

[0050] In another implementation of the embodiments of the present application, a pre-trained classification model is adopted. The classification model has learned the corresponding relationship between the image and its associated information, and the corresponding white balance scene and confidence level. Thus, according to the image and its associated information, the white balance algorithm category corresponding to the current image and the confidence level of the white balance algorithm category are determined.

[0051] Step 203: Obtain the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category.

[0052] Among them, Step 203 can refer to the relevant explanations in the foregoing embodiments. The principle is the same and will not be elaborated here.

[0053] Step 204: Obtain the initial weights of the respective white balance parameters of the image.

[0054] Among them, the respective white balance parameters of the image include the white balance parameters determined by the white balance algorithm corresponding to the white balance algorithm category, and may also include the white balance parameters determined by other white balance algorithms.

[0055] In the embodiments of the present application, for the scenario where the initial weights of the respective white balance parameters of the image have been determined, the initial weights of the respective white balance parameters may be determined manually based on prior experience or determined by any algorithm, which is not limited in this embodiment. Furthermore, the values of the initial weights of the respective white balance parameters of the image are adjusted.

[0056] Step 205: Adjust the initial weights of the respective white balance parameters of the image according to the confidence level of the white balance algorithm category to obtain the target weights of the respective white balance parameters of the image.

[0057] In one implementation of the embodiments of the present application, according to the confidence level of the white balance algorithm category, the adjustment values of the initial weights of the respective white balance parameters of the image are determined. According to the adjustment values of the initial weights of the respective white balance parameters of the image, the initial weights of the respective white balance parameters are adjusted to obtain the target weights of the respective white balance parameters, so as to improve the accuracy.

[0058] Among them, according to the confidence of the white balance algorithm category, the adjustment value of the initial weight of each white balance parameter of the image is determined. As an implementation, there are multiple white balance algorithm categories. The confidences of multiple white balance algorithm categories are compared to determine the first white balance algorithm category. The first white balance algorithm category is the white balance algorithm category with the highest confidence among multiple white balance algorithm categories. According to the confidence of the first white balance algorithm category, the first weight adjustment value of the white balance parameter corresponding to the first white balance algorithm category and the second weight adjustment values of the white balance parameters corresponding to each second white balance algorithm category other than the first white balance algorithm category are determined. The first weight adjustment value is used to increase the initial weight of the white balance parameter corresponding to the first white balance algorithm category. That is, the first weight adjustment value is proportional to the confidence of the first white balance algorithm category. Each second weight adjustment value is used to decrease the initial weight of the white balance parameter corresponding to each second white balance algorithm category. Each second weight adjustment value is inversely proportional to the confidence of the first white balance algorithm category. That is, the higher the confidence of the first white balance algorithm category, the smaller each second weight adjustment value. In this application, by determining the white balance algorithm category and the corresponding confidence of the image object to be processed, fine-grained distinction of the scene is realized. Based on the confidence, the target white balance algorithm category that is more suitable or more matched for the image to be processed is determined, so as to increase the weight of the white balance parameter determined by the white balance algorithm corresponding to the target white balance algorithm category, and decrease the weight of the white balance parameter determined by other white balance algorithms, thereby improving the accuracy of the target white balance parameter obtained by fusion, and thus improving the accuracy of white balance adjustment for the image.

[0059] Step 206: Determine the target white balance parameter of the image according to the white balance parameter and the target weight of the image.

[0060] In an implementation of the embodiment of this application, the target weights of each white balance parameter and each white balance parameter are weighted and added to obtain the target white balance parameter. Since the target weight of the white balance parameter corresponding to the target white balance algorithm category of the image is larger, by distinguishing the white balance algorithm category corresponding to the image, the rationality of the weight distribution for fusing the white balance parameters is improved, that is, the weight of the target white balance algorithm category corresponding to the image is increased, that is, the weight of the white balance parameter corresponding to the target white balance algorithm category is increased, and finally the white balance processing effect is improved.

[0061] In the image processing method according to the embodiments of the present application, by determining the white balance algorithm category of the image object to be processed and the corresponding confidence level, a fine-grained distinction of the white balance algorithm categories is achieved. Based on the confidence level, the first white balance algorithm category that is more suitable or better matched for the image to be processed is determined, thereby increasing the weight of the white balance parameters determined by the white balance algorithm corresponding to the first white balance algorithm category, reducing the weight of the white balance parameters determined by other white balance algorithms, and further improving the accuracy of the target white balance parameters obtained by fusion, thus improving the accuracy of white balance adjustment for the image.

[0062] Based on the above embodiments, the embodiments of the present application provide another image processing method. Figure 3 As a schematic flowchart of another image processing method provided by the embodiments of the present application, it illustrates how to determine the weights of various white balance parameters when the weights of each white balance parameter are unknown, as Figure 3 shown, this method includes the following steps:

[0063] Step 301, obtain the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category.

[0064] Among them, step 301 can refer to the relevant explanations in the foregoing embodiments, with the same principle, and will not be elaborated here.

[0065] Step 302, obtain the set mapping relationship.

[0066] Among them, the mapping relationship includes the corresponding relationship between the confidence levels of each white balance algorithm category and the weights of the white balance parameters corresponding to each white balance algorithm category. Specifically, each white balance algorithm category has a corresponding white balance algorithm, and the white balance parameters determined based on this white balance algorithm are the white balance parameters corresponding to each white balance algorithm category.

[0067] Step 303, determine the target weights of each white balance parameter according to the confidence levels of multiple white balance algorithm categories and the set mapping relationship.

[0068] In the embodiments of the present application, each white balance parameter of the image is the white balance parameter corresponding to each white balance algorithm category, and the white balance parameters corresponding to each white balance scene are determined according to the white balance algorithms corresponding to each white balance scene. Since the set mapping relationship already includes the confidence levels of each white balance algorithm category and the target weights of the white balance parameters corresponding to each white balance algorithm category, it is possible to determine the target weights of the white balance parameters corresponding to each white balance algorithm category based on the magnitudes of the confidence levels of each white balance algorithm category in the case where there are no pre-existing weights of the white balance parameters, so as to achieve the accuracy of weight determination.

[0069] Among them, the confidence of the white balance algorithm category is proportional to the target weight of the corresponding white balance parameter. The higher the confidence of the white balance algorithm category, the greater the target weight of the corresponding white balance parameter. On the contrary, the smaller the confidence of the white balance algorithm category, the smaller the target weight of the corresponding white balance parameter. That is to say, the higher the confidence of the white balance algorithm category corresponding to the image, the higher the accuracy of the white balance algorithm category in adjusting the white balance of the image, and then the greater the weight of the corresponding white balance parameter, so as to improve the accuracy of the target white balance parameter corresponding to the image.

[0070] Step 304: Determine the target white balance parameter of the image according to the white balance parameter and the target weight of the image.

[0071] Among them, step 304 can refer to the relevant explanations in the foregoing embodiments. The principle is the same and will not be elaborated here.

[0072] In the image processing method of the embodiment of the present application, by determining the white balance algorithm category and the corresponding confidence of the image object to be processed, a fine-grained distinction of the white balance algorithm category corresponding to the image is realized. That is to say, a fine-grained distinction of the white balance algorithm scenario is realized. Based on the confidence, the first white balance algorithm category that is more suitable or more matched for the image to be processed is determined, so as to increase the weight of the white balance parameter determined based on the white balance algorithm corresponding to the first white balance algorithm category, and reduce the weight of the white balance parameter determined by other white balance algorithms, thereby improving the accuracy of the target white balance parameter obtained by fusion, and thus improving the accuracy of white balance adjustment for the image.

[0073] To implement the above embodiments, the embodiment of the present application also proposes an image processing device.

[0074] Figure 4 It is a schematic structural diagram of an image processing device provided by an embodiment of the present application.

[0075] As Figure 4 shown, the device may include:

[0076] An acquisition module 41, configured to acquire the white balance algorithm category corresponding to the image to be processed and the confidence of the white balance algorithm category.

[0077] A first determination module 42, configured to determine the target weight of the white balance parameter of the image according to the confidence of the white balance algorithm category; wherein, the white balance parameter includes the white balance parameter determined based on the white balance algorithm category.

[0078] A second determination module 43, configured to determine the target white balance parameter of the image according to the white balance parameter and the target weight of the image.

[0079] Further, in an implementation manner of the embodiment of the present application, the device includes a third determination module, configured to:

[0080] Obtain the image to be processed and the association information of the image;

[0081] Determine the white balance algorithm category corresponding to the image and the confidence of the white balance algorithm category according to the image and the association information of the image.

[0082] In an implementation manner of the embodiment of the present application, there are multiple white balance parameters, and the first determination module 42 is further configured to:

[0083] Obtain the initial weights of the respective white balance parameters of the image;

[0084] Adjust the initial weights of the respective white balance parameters of the image according to the confidence of the white balance algorithm category to obtain the target weights of the respective white balance parameters of the image.

[0085] In an implementation manner of the embodiment of the present application, the first determination module 42 is further configured to:

[0086] Determine the adjustment values of the initial weights of the respective white balance parameters of the image according to the confidence of the white balance algorithm category;

[0087] Adjust the initial weights of the respective white balance parameters according to the adjustment values of the initial weights of the respective white balance parameters of the image to obtain the target weights of the respective white balance parameters.

[0088] In an implementation manner of the embodiment of the present application, there are multiple white balance algorithm categories, and the first determination module 42 is further configured to:

[0089] Compare the confidences of the multiple white balance algorithm categories to determine the first white balance algorithm category; wherein, the first white balance algorithm category is the white balance algorithm category with the largest confidence among the multiple white balance algorithm categories;

[0090] Determine the first weight adjustment value of the white balance parameter corresponding to the first white balance algorithm category and the second weight adjustment values of the white balance parameters corresponding to the respective second white balance algorithm categories other than the first white balance algorithm category according to the confidence of the first white balance algorithm category; wherein, the first weight adjustment value is used to increase the initial weight of the white balance parameter corresponding to the first white balance algorithm category; each of the second weight adjustment values is used to decrease the initial weight of the white balance parameter corresponding to each second white balance algorithm category.

[0091] In an implementation manner of the embodiment of the present application, there are multiple white balance algorithm categories, and the first determination module 42 is further configured to:

[0092] Obtain the set mapping relationship; wherein, the mapping relationship includes the correspondence between the confidence levels of each white balance algorithm category and the target weights of the white balance parameters corresponding to each white balance algorithm category;

[0093] Determine the target weights of each of the white balance parameters according to the confidence levels of the multiple white balance algorithm categories and the set mapping relationship.

[0094] In an implementation manner of the embodiment of the present application, there are multiple white balance parameters, and the second determination module 43 is further configured to:

[0095] Perform weighted addition on the target weights of each of the white balance parameters and each of the white balance parameters to obtain the target white balance parameters.

[0096] It should be noted that the foregoing explanation of the method embodiment also applies to the device of this embodiment, and will not be elaborated here.

[0097] The image processing device of the embodiment of the present application obtains the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category, determines the target weights of the white balance parameters of the image according to the confidence level of the white balance algorithm category, wherein the white balance parameters include the white balance parameters determined based on the white balance algorithm category, determines the target white balance parameters of the image according to the white balance parameters and the target weights of the image, and realizes a reasonable allocation of the target weights of the white balance parameters of the image through the confidence level of the white balance algorithm category, and then performs fusion based on the target weights to obtain the target white balance parameters, improving the accuracy of determining the white balance parameters, thereby improving the white balance processing effect of the image.

[0098] To implement the above embodiment, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the foregoing method embodiment is implemented.

[0099] To implement the above embodiment, the present application also proposes a non-transitory computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the foregoing method embodiment is implemented.

[0100] To implement the above embodiment, the present application also proposes a computer program product, on which a computer program is stored. When the computer program is executed by a processor, the method described in the foregoing method embodiment is implemented.

[0101] To implement the above embodiment, the present application also proposes a chip, including a processing circuit, and the processing circuit is used to implement the method described in the foregoing method embodiment.

[0102] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0103] Referring to Figure 5 , the electronic 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.

[0104] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0105] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 may 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 memory, flash memory, a magnetic disk, or an optical disk.

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

[0107] The multimedia component 808 includes a screen that provides an output interface between the electronic 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 can be implemented as a touch screen 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 can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0108] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.

[0109] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.

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

[0111] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a communication standard-based wireless network, such as WiFi, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0112] In an exemplary embodiment, the electronic device 800 can 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 for performing the above method.

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

[0114] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0115] Furthermore, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0116] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logic function or process. The scope of the preferred embodiments of the present application includes additional implementations, where functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0117] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing a logical function, and can be embodied specifically in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.

[0118] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0119] Those of ordinary skill in the art can understand that all or part of the steps carried out in implementing the above-described embodiment methods can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0120] In addition, in each of the embodiments of the present application, each functional unit can be integrated in a processing module, or each unit can exist physically alone, or two or more units can be integrated in a module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0121] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. An image processing method, characterized in that, Including: Obtain the white balance algorithm category corresponding to the image to be processed and the confidence of the white balance algorithm category; Determine the target weight of the white balance parameters of the image according to the confidence of the white balance algorithm category; wherein, the white balance parameters include white balance parameters determined based on the white balance algorithm category; Determine the target white balance parameters of the image according to the white balance parameters and the target weight of the image.

2. The method according to claim 1, wherein Before obtaining the white balance algorithm category corresponding to the image to be processed and the confidence of the white balance algorithm category, it further includes: Obtain the image to be processed and the associated information of the image; Determine the white balance algorithm category corresponding to the image and the confidence of the white balance algorithm category according to the image and the associated information of the image.

3. The method according to claim 1, characterized in that, There are multiple white balance parameters, and determining the target weight of the white balance parameters of the image according to the confidence of the white balance algorithm category includes: Obtain the initial weight of each white balance parameter of the image; Adjust the initial weight of each white balance parameter of the image according to the confidence of the white balance algorithm category to obtain the target weight of each white balance parameter of the image.

4. The method according to claim 3, wherein Adjusting the initial weight of each white balance parameter of the image according to the confidence of the white balance algorithm category to obtain the target weight of each white balance parameter of the image includes: Determine the adjustment value of the initial weight of each white balance parameter of the image according to the confidence of the white balance algorithm category; Adjust the initial weight of each white balance parameter according to the adjustment value of the initial weight of each white balance parameter of the image to obtain the target weight of each white balance parameter.

5. The method according to claim 4, wherein There are multiple white balance algorithm categories, and determining the adjustment value of the initial weight of each white balance parameter of the image according to the confidence of the white balance algorithm category includes: Compare the confidences of the multiple white balance algorithm categories to determine the first white balance algorithm category; wherein, the first white balance algorithm category is the white balance algorithm category with the highest confidence among the multiple white balance algorithm categories; Determine the first weight adjustment value of the white balance parameters corresponding to the first white balance algorithm category and the second weight adjustment values of the white balance parameters corresponding to each second white balance algorithm category other than the first white balance algorithm category according to the confidence of the first white balance algorithm category; wherein, the first weight adjustment value is used to increase the initial weight of the white balance parameters corresponding to the first white balance algorithm category; each of the second weight adjustment values is used to decrease the initial weight of the white balance parameters corresponding to each second white balance algorithm category.

6. The method according to claim 1, wherein There are multiple white balance algorithm categories, and determining the target weight of the white balance parameters of the image according to the confidence of the white balance algorithm category includes: Obtain the set mapping relationship; wherein, the mapping relationship includes the corresponding relationship between the confidences of each white balance algorithm category and the target weights of the white balance parameters corresponding to each white balance algorithm category; Determine the target weights of each white balance parameter according to the confidences of the multiple white balance algorithm categories and the set mapping relationship.

7. The method according to claim 1, wherein The white balance parameters are multiple. Determining the target white balance parameter of the image according to the white balance parameter and the target weight of the image includes: Performing weighted addition on the target weight of each of the white balance parameters and each of the white balance parameters to obtain the target white balance parameter.

8. An image processing apparatus, characterized in that, Including: An acquisition module, configured to acquire the white balance algorithm category corresponding to the image to be processed and the confidence level of the white balance algorithm category; A first determination module, configured to determine the target weight of the white balance parameter of the image according to the confidence level of the white balance algorithm category; wherein, the white balance parameter includes the white balance parameter determined based on the white balance algorithm category; A second determination module, configured to determine the target white balance parameter of the image according to the white balance parameter and the target weight of the image.

9. An electronic device, characterized in that, Including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method according to any one of claims 1-7 is implemented.

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

11. A chip, including a processing circuit, where the processing circuit is configured to implement the method according to any one of claims 1-7 when executed.