White balance processing method and apparatus, electronic device, and computer-readable storage medium
By displaying a specified area and calculating white balance parameters in image processing, the problem of users finding it difficult to adjust white balance intuitively and accurately is solved, achieving intuitive and accurate white balance correction, simplifying user operation and improving processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LENOVO (BEIJING) LTD
- Filing Date
- 2023-05-19
- Publication Date
- 2026-07-28
AI Technical Summary
In existing technologies, it is difficult for users to intuitively and accurately adjust the white balance. They usually need to repeatedly adjust it by observing the adjusted image, which is very inconvenient.
By displaying a first image, defining a specified area, determining a second white balance parameter based on the specified area, and adjusting the image based on this parameter to achieve white balance correction, the system provides area selection and white balance adjustment functions. It also uses multiple algorithms and reference coefficients to calculate reference white balance parameters, allowing for intuitive white balance processing.
It achieves intuitive and accurate white balance processing, reduces the complexity of user operations and the number of debugging attempts, and improves the accuracy and efficiency of white balance processing.
Smart Images

Figure CN116567436B_ABST
Abstract
Description
Technical Field
[0001] This application relates to image processing technology, and more particularly to a white balance processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] White balance is a fundamental module in image processing. Its purpose is to remove the influence of light source color on the color of objects and restore the true colors of objects. Therefore, white balance determines the accuracy of the overall tone of an image. Most images are automatically adjusted by the device, which inevitably leads to some inaccuracies. Currently available manual white balance adjustment methods allow users to set the color temperature value for white balance or provide several typical light sources as options, then adjust the white balance based on the user's settings or selections. However, because users cannot directly obtain the effect of white balance based on color temperature values or light sources, it is difficult to achieve intuitive and accurate adjustment. They usually need to observe the adjusted image repeatedly for adjustments, which is quite inconvenient. Summary of the Invention
[0003] This application provides a white balance processing method, apparatus, electronic device, and computer-readable storage medium that can perform white balance processing intuitively and accurately.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides a white balance processing method, including:
[0006] Display a first image, which has been processed by a first white balance parameter;
[0007] Determine a specified region for the first image;
[0008] Determine the second white balance parameter based on the specified area;
[0009] The first image displayed based on the second white balance parameter is the second image.
[0010] In the above scheme, determining the specified region for the first image includes:
[0011] Display area selection function items;
[0012] In response to the operation of selecting a function item for the region, a specified region for the first image is determined.
[0013] In the above scheme, the display area selection function includes:
[0014] Displays the white balance adjustment function;
[0015] In response to a trigger operation on the white balance adjustment function, the region selection function is presented.
[0016] In the above scheme, determining the second white balance parameter based on the specified area includes:
[0017] Determine at least two reference white balance parameters based on the specified area;
[0018] Based on each of the aforementioned reference white balance parameters, the representative image of the specified region is adjusted to the corresponding reference image, with each reference white balance parameter corresponding to one reference image;
[0019] Display at least two of the reference images;
[0020] The second white balance parameter is determined based on the user's selection of the at least two reference images.
[0021] In the above scheme, determining at least two reference white balance parameters based on the specified area includes:
[0022] Obtain the color values of multiple pixels within the specified area;
[0023] Based on the color value of each pixel, a corresponding reference color value is determined using at least two algorithms, with each algorithm corresponding to a reference color value.
[0024] Determine the corresponding reference white balance parameters based on each reference color value.
[0025] In the above scheme, determining at least two reference white balance parameters based on the specified area includes:
[0026] Obtain the color values of multiple pixels within the specified area;
[0027] The target color value is determined based on the color value of each pixel using a target algorithm.
[0028] Determine the target white balance parameters based on the target color value;
[0029] Obtain at least two reference coefficients;
[0030] Each reference white balance parameter is determined based on at least two reference coefficients and the target white balance parameter, with each reference coefficient corresponding to one reference white balance parameter.
[0031] In the above scheme, the first image is obtained by adjusting the original image based on the first white balance parameter, and the first image displayed after adjusting based on the second white balance parameter is the second image, including:
[0032] The original image is adjusted to the second image based on the second white balance parameter;
[0033] The first image displayed is now updated to the second image.
[0034] In the above scheme, the first image displayed based on the second white balance parameter is the second image, including:
[0035] The first image is adjusted to the second image based on the second white balance parameter;
[0036] The first image displayed is now updated to the second image.
[0037] In the above scheme, after adjusting the first image displayed based on the second white balance parameter to be the second image, it further includes:
[0038] Determine the color temperature value of the second image;
[0039] Display the color temperature adjustment function and present the color temperature value of the second image in the color temperature adjustment function;
[0040] The color temperature adjustment function is used to receive color temperature adjustment operations and perform white balance processing on the second image according to the color temperature adjustment operations.
[0041] This application provides a white balance processing device, including:
[0042] A display module is used to display a first image, which is processed by a first white balance parameter.
[0043] A region determination module is used to determine a specified region for the first image;
[0044] The parameter determination module is used to determine the second white balance parameter based on the specified area;
[0045] An adjustment module is used to adjust the displayed first image to a second image based on the second white balance parameter.
[0046] This application provides an electronic device, including:
[0047] Memory, used to store executable instructions;
[0048] The processor, when executing executable instructions stored in the memory, implements the white balance processing method provided in the embodiments of this application.
[0049] This application provides a computer-readable storage medium storing executable instructions for inducing a processor to execute and implement the white balance processing method provided in this application.
[0050] This application embodiment displays a first image processed by a first white balance parameter, determines a specified area for the first image, then determines a second white balance parameter based on the specified area, and finally adjusts the displayed first image to a second image based on the second white balance parameter. By determining the second white balance parameter through a specified area within the first image to perform corresponding white balance correction, it allows users to intuitively associate image effects, making white balance processing more intuitive and accurate. Attached Figure Description
[0051] Figure 1 This is an optional structural schematic diagram of the electronic device 100 provided in the embodiments of this application;
[0052] Figure 2 This is an optional flowchart of the white balance processing method provided in the embodiments of this application;
[0053] Figure 3 This is an optional detailed flowchart of step 202 provided in the embodiments of this application;
[0054] Figure 4 This is an optional schematic diagram of the first image provided in the embodiments of this application;
[0055] Figure 5 This is an optional schematic diagram illustrating the display process of the region selection function item provided in the embodiments of this application;
[0056] Figure 6 This is an optional detailed flowchart of step 203 provided in the embodiments of this application;
[0057] Figure 7 This is an optional schematic diagram of a reference image provided in an embodiment of this application;
[0058] Figure 8 This is an optional schematic diagram of the second image provided in the embodiments of this application;
[0059] Figure 9 This is an optional flowchart of the white balance processing method provided in the embodiments of this application;
[0060] Figure 10 This is an optional schematic diagram of the color temperature adjustment function provided in the embodiments of this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0063] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0065] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0066] 1) RAW, short for RAW Image Format, is referred to as raw in programming. It can be understood as the original data of a CMOS or CCD image sensor converting the captured light source signals into digital signals. A RAW file records the raw information from the digital camera sensor, along with metadata (such as ISO settings, shutter speed, aperture value, white balance, etc.) generated by the camera during shooting. RAW is an unprocessed and uncompressed format; it can be conceptualized as "raw image encoded data" or more figuratively called "digital negative."
[0067] 2) YUV is a color encoding method commonly used in various video processing components. When encoding photos or videos, YUV takes into account human perception, allowing for reduced chroma bandwidth. YUV is a type of true-color color space; proper nouns such as Y'UV, YUV, YCbCr, and YPbPr can all be referred to as YUV, with some overlap. "Y" represents luminance (or luminance), which is the grayscale value, while "U" and "V" represent chroma (or chroma), describing the color and saturation of the image.
[0068] This application provides a white balance processing method, apparatus, electronic device, and computer-readable storage medium that can perform white balance processing intuitively and accurately.
[0069] First, the electronic device used to implement the above-described white balance processing method, as provided in the embodiments of this application, will be described. See [link to relevant documentation]. Figure 1 , Figure 1 This is an optional structural diagram of the electronic device 100 provided in this application embodiment. In practical applications, the electronic device 100 can be implemented as a terminal or a server. The terminal can be a laptop, tablet, desktop computer, smartphone, dedicated messaging device, portable gaming device, smart speaker, smartwatch, etc., but is not limited to these. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) services, and big data and artificial intelligence platforms. Figure 1 The illustrated electronic device 100 includes at least one processor 101, a memory 105, at least one network interface 102, and a user interface 103. The various components of the electronic device 100 are coupled together via a bus system 104. It is understood that the bus system 104 is used to implement communication between these components. In addition to a data bus, the bus system 104 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 1 The general labeled all buses as Bus System 104.
[0070] The processor 101 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0071] User interface 103 includes one or more output devices 1031 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 103 also includes one or more input devices 1032, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0072] The memory 105 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 105 may optionally include one or more storage devices physically located away from the processor 101.
[0073] The memory 105 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 105 described in this application embodiment is intended to include any suitable type of memory.
[0074] In some embodiments, the memory 105 can store data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof. In this embodiment, the memory 105 stores an operating system 1051, a network communication module 1052, a presentation module 1053, an input processing module 1054, and a white balance processing device 1055. Specifically,
[0075] The operating system 1051 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.
[0076] The network communication module 1052 is used to reach other computing devices via one or more (wired or wireless) network interfaces 102, such as Bluetooth, WiFi, and Universal Serial Bus (USB).
[0077] Presentation module 1053 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 1031 (e.g., a display screen, a speaker, etc.) associated with user interface 103;
[0078] The input processing module 1054 is used to detect and translate one or more user inputs or interactions from one or more input devices 1032.
[0079] In some embodiments, the white balance processing device provided in this application can be implemented in software. Figure 1A white balance processing device 1055 stored in memory 105 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a display module 10551, a region determination module 10552, a parameter determination module 10553, and an adjustment module 10554. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.
[0080] In other embodiments, the white balance processing device provided in this application can be implemented in hardware. As an example, the white balance processing device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the white balance processing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0081] The white balance processing method provided in this application will be described below with reference to exemplary applications and implementations of the terminal provided in the embodiments of this application.
[0082] See Figure 2 , Figure 2 This is an optional flowchart illustrating the white balance processing method provided in this application embodiment, which will be combined with... Figure 2 The steps shown are explained.
[0083] Step 201: Display the first image, which has been processed by the first white balance parameter;
[0084] Step 202: Determine a specified region for the first image;
[0085] Step 203: Determine the second white balance parameter based on the specified area;
[0086] Step 204: Adjust the displayed first image to a second image based on the second white balance parameter.
[0087] In practice, the terminal displays the first image on its display interface. In real-world scenarios, the first image can be an image that has already been created as an image file, presented by opening the image file in a folder, such as in a photo album. In some embodiments, the first image can also be a preview image that has not yet been created as an image file; for example, the terminal can present the first image in a camera preview interface. It should be understood that triggering the shooting function within the camera preview interface will generate the corresponding image file and store it on the terminal.
[0088] In this embodiment, the designated area is an image region within the first image. In actual implementation, the designated area can be specified by the user. Specifically, see [link to relevant documentation]. Figure 3 , Figure 3 This is an optional detailed flowchart of step 202 provided in the embodiments of this application. Step 202 can be implemented in the following way:
[0089] Step 2021: Display the region selection function.
[0090] Step 2022: In response to the operation of selecting a function item for the region, a specified region for the first image is determined.
[0091] In practice, the terminal displays a region selection function on the screen. Users can select a specific region by operating this function. Specifically, the terminal receives an operation on the region selection function and, in response, determines a specified region for the first image. In a real-world scenario, the terminal, in response to a press operation on the region selection function within the first image, determines the press position corresponding to the press operation and designates the region selection function at the press position as the specified region. In some embodiments, the terminal can also control the region selection function to move within the first image in response to a press operation, and then, in response to the release of the press operation, designate the region selected by the region selection function within the first image as the specified region. See, for example... Figure 4 , Figure 4 This is an optional schematic diagram of the first image provided in this application embodiment. Here, the first image 401 presents a region selection function item 402. The region selection function item 402 provided in this application embodiment is rectangular, and its size and shape are fixed. The user can drag the region selection function item 402 to determine the corresponding specified area. In some embodiments, the region selection function item 402 does not have a fixed size and shape, and the user can change its size and shape through operation to select the specified area. In this application embodiment, by providing a region selection function item for the user to determine the specified area, the user can independently and accurately adjust the white balance as needed.
[0092] In some embodiments, step 2021 includes: displaying a white balance adjustment function item; and, in response to a trigger operation on the white balance adjustment function item, presenting a region selection function item.
[0093] For example, see Figure 5 , Figure 5 This is an optional schematic diagram of the display process of the region selection function item provided in this application embodiment. Here, the white balance adjustment function item 502 is first presented in the display interface. In this application embodiment, the white balance adjustment function item 502 is presented on the first image 501. In some embodiments, the white balance adjustment function item 502 can also be presented in other forms, such as through a drop-down menu. The terminal responds to the trigger operation of the white balance adjustment function item 502 and presents the region selection function item 503. This application embodiment provides the white balance adjustment function item to trigger the presentation of the corresponding region selection function item, avoiding misoperation caused by directly presenting the region selection function item.
[0094] In some embodiments, see Figure 6 , Figure 6 This is an optional detailed flowchart of step 203 provided in the embodiment of this application. Step 203 can also be implemented in the following ways:
[0095] Step 2031: Determine at least two reference white balance parameters based on the specified area;
[0096] Step 2032: Based on each of the reference white balance parameters, adjust the representative image of the specified area to the corresponding reference image, with each reference white balance parameter corresponding to one reference image;
[0097] Step 2033: Display at least two of the reference images;
[0098] The second white balance parameter is determined based on the user's selection of the at least two reference images.
[0099] In practice, after determining a specified area, the terminal determines at least two reference white balance parameters based on that area. Here, the terminal can determine at least two reference white balance parameters based on the specified area using at least two different strategies.
[0100] Specifically, in some embodiments, step 2031 can be implemented as follows: obtaining the color values of multiple pixels within the specified area; determining corresponding reference color values based on at least two algorithms according to the color values of each pixel, with each algorithm corresponding to one reference color value; and determining corresponding reference white balance parameters based on each reference color value.
[0101] Here, the color value can be, for example, RGB (red, green, blue) values. In actual implementation, the terminal can obtain the color values of multiple pixels within a specified area, and determine the corresponding reference color value based on the color value of each pixel using at least two algorithms. These at least two algorithms can include an arithmetic mean algorithm and a geometric mean algorithm, etc. Those skilled in the art can also set other algorithms as needed; this application does not specifically limit the type of algorithm. For example, if there are four pixels in the specified area, and the RGB values of these four pixels are (255, 192, 205), (242, 189, 206), (246, 196, 199), and (238, 179, 241), then the reference color value obtained by the arithmetic mean algorithm is (245, 189, 213), and the reference color value obtained by the geometric mean algorithm is (245, 189, 212). In actual implementation, the terminal calculates the color values of multiple pixels according to each algorithm to obtain the corresponding reference color value. Then, the reference white balance parameter is determined based on the reference color value. Specifically, the terminal determines the color value difference between a reference color value and a target color value, and determines a reference white balance parameter based on this color value difference. This reference white balance parameter is used to adjust the reference color value to the target color value. Here, the difference between the target color value and the standard color value corresponding to white is less than or equal to a difference threshold. This embodiment of the application obtains the color values of multiple pixels within a specified area and calculates these values using at least two algorithms to obtain at least two corresponding reference white balance parameters. This ensures accurate acquisition of the reference white balance parameters and provides diversity in the reference white balance parameters.
[0102] In some embodiments, step 2031 can also be implemented as follows: obtaining the color values of multiple pixels within the specified area; determining a target color value based on a target algorithm according to the color values of each pixel; determining a target white balance parameter based on the target color value; obtaining at least two reference coefficients; and determining corresponding reference white balance parameters based on the at least two reference coefficients and the target white balance parameter, with each reference coefficient corresponding to one reference white balance parameter. Here, the target algorithm can be an arithmetic mean algorithm, a geometric mean algorithm, etc. The terminal calculates the color values of multiple pixels using the target algorithm to obtain the target color value. Then, a target white balance parameter is determined based on the target color value. Here, the method for determining the target white balance parameter based on the target color value is the same as that provided in the above embodiments of this application, and will not be repeated here. Next, at least two reference coefficients are obtained, and the target white balance parameter is calculated based on the at least two reference coefficients to obtain the corresponding at least two reference white balance parameters. Specifically, the terminal multiplies the at least two reference coefficients by the target white balance parameter to obtain the corresponding reference white balance parameter. Here, the reference coefficients can be preset, and those skilled in the art can make corresponding settings according to actual effects and needs; the embodiments of this application do not impose specific limitations. The embodiments of this application first determine the target white balance parameter, and then obtain at least two reference white balance parameters based on at least two reference coefficients combined with the target white balance parameter. This allows for the flexible acquisition of multiple reference white balance parameters, and the ability to obtain reference white balance parameters that better meet user needs through the setting of reference coefficients.
[0103] In practical implementation, after obtaining at least two reference white balance parameters, the terminal adjusts the representative image of the specified area to the corresponding reference image based on each reference white balance parameter. Here, the representative image of the specified area can be an image within the entire range defined by the specified area, or it can be a partial image within the specified area. Those skilled in the art can set the definition method of the representative image according to actual needs, and this application embodiment does not specifically limit this. Here, the example of the representative image being an image within the entire range defined by the specified area is used for illustration. For example, see [link to relevant documentation]. Figure 7 , Figure 7 This is an optional schematic diagram of the reference image provided in the embodiments of this application. Figure 7 The designated area 700 shown corresponds to three reference images: reference image 701, reference image 702, and reference image 703. The terminal displays these three reference images corresponding to the designated area 700 on the display interface for the user to browse.
[0104] In practice, users can select from at least two displayed reference images, choosing the appropriate reference image based on their desired effect. The white balance parameter corresponding to the selected reference image is then determined as the second white balance parameter. This second white balance parameter is then used to adjust the displayed first image to match the second image. For example, regarding... Figure 7 The reference images 701-703 are shown. If the user selects reference image 703, the terminal responds to the user's selection operation for reference image 703 by determining the reference white balance parameter corresponding to reference image 703 as the second white balance parameter, adjusting the white balance of the first image based on the second white balance parameter to obtain the corresponding second image, and updating the displayed first image to the second image. See also Figure 8 , Figure 8 This is an optional schematic diagram of the second image provided in the embodiments of this application.
[0105] In some embodiments, the terminal can also directly determine the second white balance parameter based on a specified area. Specifically, the terminal can obtain the color values of multiple pixels within a specified area, determine the corresponding target color value based on a specified algorithm for each pixel color value, and determine the second white balance parameter based on the target color value.
[0106] For example, the terminal calculates the second white balance parameter (i.e., R) based on the RGB values of multiple pixels in a specified area using the following formula. gain and B gain ):
[0107]
[0108]
[0109] Where N is the number of pixels in the specified region, N≥2, and N is a positive integer, G i Let G be the value of the i-th pixel among multiple pixels, and R be the value of the i-th pixel. i Let R be the value of the i-th pixel among multiple pixels, and B be the value of the i-th pixel. i The B value of the i-th pixel among multiple pixels, 1≤i≤N, and i is a positive integer.
[0110] In this embodiment, by displaying a first image processed by a first white balance parameter, a specified area for the first image is determined, then a second white balance parameter is determined based on the specified area, and finally the displayed first image is adjusted to a second image based on the second white balance parameter. By determining the second white balance parameter through a specified area within the first image to perform corresponding white balance correction, users can intuitively associate the image effect, making white balance processing more intuitive and accurate.
[0111] In some embodiments, the first image is obtained by adjusting the original image based on the first white balance parameter. Step 204 can be implemented as follows: adjust the original image to the second image based on the second white balance parameter; update the displayed first image to the second image.
[0112] Here, the first image is the image obtained by adjusting the original image using the first white balance parameter. In this embodiment, the terminal directly performs white balance processing on the original image based on the second white balance parameter to obtain the second image, and then updates the displayed first image to the second image. Specifically, the terminal replaces the first white balance parameter with the second white balance parameter, performs white balance processing on the original image in the RAW domain to obtain the second image, and replaces the displayed first image with the second image. For example, if the first white balance parameter is R′... gain and B′ gain In this embodiment of the application, R is directly used. gain Replace R′ gain and B gain Replace B′ gain Using R gain and B gain White balance correction is performed on the original image. By performing white balance correction in the RAW domain, interference from the first white balance parameter can be avoided, resulting in more accurate white balance correction.
[0113] In some embodiments, step 204 can also be implemented by: adjusting the first image to a second image based on the second white balance parameter; updating the displayed first image to the second image.
[0114] Here, the first image is an image adjusted by the first white balance parameter. In this embodiment, the terminal performs white balance processing on the first image in the YUV domain based on the second white balance parameter to obtain the second image, and replaces the displayed first image with the second image. By performing white balance processing in the YUV domain, secondary white balance correction can be easily achieved. For example, the first image can be white balanced using the following formula:
[0115] I' R =I R *R gain
[0116] I' B =I B *B gain
[0117] Among them, I′ R Let I′ be the value of the second image in the R domain. B I is the value of the second image in the B domain. RLet I be the value of the first image in the R domain. B This is the value of the first image in the B domain.
[0118] In some embodiments, see Figure 9 , Figure 9 This is an optional flowchart illustrating the white balance processing method provided in this application embodiment. After step 204, the following can also be performed:
[0119] Step 901: Determine the color temperature value of the second image;
[0120] Step 902: Display the color temperature adjustment function item and present the color temperature value of the second image in the color temperature adjustment function item;
[0121] The color temperature adjustment function is used to receive color temperature adjustment operations and perform white balance processing on the second image according to the color temperature adjustment operations.
[0122] In practice, the terminal determines and displays the color temperature value of the second image. Specifically, the terminal displays a color temperature adjustment function on the display interface, and within this function, it displays the color temperature value of the second image. Here, the color temperature adjustment function can receive the user's color temperature adjustment operation. Upon receiving the operation, it performs white balance processing on the second image based on the adjusted color temperature value. For example, see [link to example]. Figure 10 , Figure 10 This is an optional schematic diagram of the color temperature adjustment function provided in an embodiment of this application. Here, the second image 1001 displays the color temperature adjustment function 1002, and the color temperature adjustment function 1002 displays the color temperature value of the second image, such as... Figure 10 The displayed color temperature value is 2266, in Kelvin. By determining the color temperature value of the second image and displaying it within the color temperature adjustment function, and providing a color temperature adjustment function for users to adjust the color temperature for white balance adjustment, more diverse methods can be provided for users to adjust white balance, while also enabling more refined white balance adjustment.
[0123] The following description continues to illustrate the exemplary structure of the white balance processing device 1055 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 1 As shown, the software module stored in the white balance processing device 1055 in the memory 105 may include:
[0124] Display module 10551 is used to display a first image, the first image being processed by a first white balance parameter;
[0125] The region determination module 10552 is used to determine a specified region for the first image;
[0126] The parameter determination module 10553 is used to determine the second white balance parameter based on the specified area;
[0127] The adjustment module 10554 is used to adjust the displayed first image to a second image based on the second white balance parameter.
[0128] In some embodiments, the region determination module 10552 is further configured to display a region selection function item; and in response to an operation on the region selection function item, to determine a specified region for the first image.
[0129] In some embodiments, the region determination module 10552 is further configured to display a white balance adjustment function item; and to present the region selection function item in response to a trigger operation on the white balance adjustment function item.
[0130] In some embodiments, the parameter determination module 10553 is further configured to determine at least two reference white balance parameters based on the specified area; adjust the representative image of the specified area to a corresponding reference image based on each of the reference white balance parameters, with each reference white balance parameter corresponding to a reference image; display at least two of the reference images; wherein the second white balance parameter is determined based on the user's selection of the at least two reference images.
[0131] In some embodiments, the parameter determination module 10553 is further configured to obtain the color values of multiple pixels within the specified area; determine corresponding reference color values based on at least two algorithms according to the color values of each pixel, with each algorithm corresponding to a reference color value; and determine corresponding reference white balance parameters based on each reference color value.
[0132] In some embodiments, the parameter determination module 10553 is further configured to obtain color values of multiple pixels within the specified area; determine a target color value based on a target algorithm according to the color values of each pixel; determine a target white balance parameter based on the target color value; obtain at least two reference coefficients; and determine corresponding reference white balance parameters based on the at least two reference coefficients and the target white balance parameter, wherein each reference coefficient corresponds to a reference white balance parameter.
[0133] In some embodiments, the first image is obtained by adjusting the original image based on the first white balance parameter, and the adjustment module 10554 is further configured to adjust the original image to the second image based on the second white balance parameter; and update the displayed first image to the second image.
[0134] In some embodiments, the adjustment module 10554 is further configured to adjust the first image to a second image based on the second white balance parameter; and update the displayed first image to the second image.
[0135] In some embodiments, the device further includes: a color temperature display module, configured to determine the color temperature value of the second image; display a color temperature adjustment function item, and present the color temperature value of the second image in the color temperature adjustment function item; wherein the color temperature adjustment function item is configured to receive a color temperature adjustment operation and perform white balance processing on the second image according to the color temperature adjustment operation.
[0136] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, so it will not be repeated.
[0137] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the white balance processing method described above in this application.
[0138] This application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored and when executed by a processor, the processor will execute the white balance processing method provided in this application.
[0139] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0140] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0141] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0142] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0143] In summary, the embodiments of this application enable intuitive and accurate white balance processing.
[0144] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A white balance processing method characterized by comprising: include: Display a first image, which has been processed by a first white balance parameter; Display area selection function items; In response to the user's selection of a function item for the region, a specified region for the first image is determined; Determine at least two reference white balance parameters based on the specified area; The reference white balance parameter is obtained by processing the color values of multiple pixels within the specified area; Based on each of the aforementioned reference white balance parameters, the representative image of the specified region is adjusted to the corresponding reference image, with each reference white balance parameter corresponding to one reference image; Display at least two of the reference images; Among them, based on the user's selection of the at least two reference images, the reference white balance parameter corresponding to the selected reference image is determined as the second white balance parameter; The first image displayed based on the second white balance parameter is the second image.
2. The method according to claim 1, wherein the display area selection function includes: Displays the white balance adjustment function; In response to a trigger operation on the white balance adjustment function, the region selection function is presented.
3. The method according to claim 1, wherein determining at least two reference white balance parameters based on the designated area comprises: Obtain the color values of multiple pixels within the specified area; Based on the color value of each pixel, a corresponding reference color value is determined using at least two algorithms, with each algorithm corresponding to a reference color value. Determine the corresponding reference white balance parameters based on each reference color value.
4. The method according to claim 1, wherein determining at least two reference white balance parameters based on the designated area comprises: Obtain the color values of multiple pixels within the specified area; The target color value is determined based on the color value of each pixel using a target algorithm. Determine the target white balance parameters based on the target color value; Obtain at least two reference coefficients; Each reference white balance parameter is determined based on at least two reference coefficients and the target white balance parameter, with each reference coefficient corresponding to one reference white balance parameter.
5. The method according to claim 1, wherein the first image is obtained by adjusting an original image based on the first white balance parameter, and the first image displayed based on the second white balance parameter is a second image, comprising: The original image is adjusted to the second image based on the second white balance parameter; The first image displayed is now updated to the second image.
6. The method according to claim 1, wherein the first image displayed based on the second white balance parameter is a second image, comprising: The first image is adjusted to the second image based on the second white balance parameter; The first image displayed is now updated to the second image.
7. The method according to claim 1, wherein after adjusting the displayed first image to a second image based on the second white balance parameter, the method further comprises: Determine the color temperature value of the second image; Display the color temperature adjustment function and present the color temperature value of the second image in the color temperature adjustment function; The color temperature adjustment function is used to receive color temperature adjustment operations and perform white balance processing on the second image according to the color temperature adjustment operations.
8. A white balance processing device, comprising: A display module is used to display a first image, which is processed by a first white balance parameter. The region determination module is used to determine a specified region for the first image in response to the user's operation of selecting a function item for the displayed region; The parameter determination module is used to determine at least two reference white balance parameters based on the specified area; The reference white balance parameter is obtained by processing the color values of multiple pixels within the specified area; Based on each of the aforementioned reference white balance parameters, the representative image of the specified region is adjusted to the corresponding reference image, with each reference white balance parameter corresponding to one reference image; Display at least two of the reference images; wherein, based on the user's selection of the at least two reference images, the reference white balance parameter corresponding to the selected reference image is determined as the second white balance parameter; An adjustment module is used to adjust the displayed first image to a second image based on the second white balance parameter.