Method and device for deep white balance editing
Combining the encoder and decoder networks through a deep learning framework solves the color projection problem caused by incorrect white balance settings, achieves precise correction and WB editing of sRGB images, supports multiple lighting settings, and improves the visual quality and User control capabilities.
Patent Information
- Application Number
- CN202411011713.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-10-22
- Filing Date
- 2020-11-11
- Publication Date
- 2024-10-08
AI Technical Summary
It is difficult to effectively correct the strong color cast problem caused by incorrect white balance settings with existing technologies, especially in deep neural network models. Traditional methods such as the KNN method have error propagation in ISP processing and are difficult to easily correct.
Adopting an end-to-end deep learning framework, combined with encoder and decoder networks, the DNN architecture is trained to learn accurate white balance correction, support WB editing for indoor and outdoor lighting settings, and generate images with different WB settings through multiple decoders.
It achieves true white balance correction for sRGB images, provides more precise WB editing capabilities, supports image generalization in addition to training data, and allows users to freely edit WB settings, improving the visual quality and aesthetic attributes of images.
Smart Images

Figure CN118748707A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent with application date of November 11, 2020, application number 202080091131.9, and invention name “Method and device for deep white balance editing”. Technical Field
[0002] Methods and apparatus according to embodiments of the present invention relate to deep white balance editing. Background Art
[0003] White balancing ("WB") refers to a low-level computer vision task that is applied to all camera images. WB is performed to represent scene objects with the same color, even when the scene objects are captured under different lighting conditions. Conceptually, WB is performed to normalize the lighting effects that are added to the captured images of the scene so that it appears that the images of all objects were captured under ideal "white light." WB is an initial color processing operation performed by the camera's onboard integrated signal processor ("ISP") on the raw, unprocessed RGB images from the sensor. After WB is performed, the ISP applies other color rendering operations to additionally process the raw RGB image through a final standard RGB (sRGB) encoding.
[0004] WB is intended to normalize the lighting effects to be added to the scene, but in some cases the ISP incorporates aesthetic considerations into the color rendering based on photographic preferences. Photographic preferences are not always based on the white light assumption and can vary based on various factors such as cultural preferences and scene content.
[0005] Most digital cameras offer an option to control the WB setting during image acquisition (or capture). However, once the WB setting is selected and the image is fully processed by the ISP through final sRGB, it is difficult to perform WB editing without access to the original unprocessed raw RGB image. This problem is exacerbated when the WB setting is incorrect, resulting in strong color casts in the final sRGB image.
[0006] The ability to edit WB in sRGB images is useful not only in photography tasks but also in computer vision applications such as object recognition, scene understanding, and color enhancement.
[0007] Recent studies have shown that images captured with incorrect WB settings produce effects similar to untargeted adversarial attacks on deep neural network (“DNN”) models.
[0008] To understand the difficulty of WB editing of sRGB images, let’s look at the method by which WB is performed by the camera. WB consists of two operations performed in tandem by the ISP: (1) estimating the response of the camera sensor to the scene illumination in the form of a raw RGB vector; and (2) dividing the R, G, and B color channels of the colors of the raw RGB image according to the corresponding channel responses of the raw RGB vector.
[0009] The first operation to estimate the illumination vector includes the camera's automatic white balance ("AWB") process. In addition to AWB, the user can also manually select a WB preset from among the WB presets, and when using most cameras, the raw RGB vectors for each camera are determined by the camera manufacturer. The presets correspond to common scene illuminations (e.g., daylight, shade, and incandescent light).
[0010] When the raw RGB vector of the scene illumination is defined, linear scaling is applied to each color channel separately and independently in order to normalize the illumination. This scaling work is performed using a 3x3 diagonal matrix. In practice, the white-balanced (or white-balanced) raw RGB image is additionally processed by a large number of ISP operations of each non-linear camera to render the final image in the output reference color space (i.e., sRGB color space). This non-linear work makes it difficult to use traditional diagonal correction to correct images rendered with strong color casts due to camera WB errors.
[0011] In order to perform correct post-capture WB editing, the rendered sRGB values should be appropriately inverted to obtain the corresponding unprocessed raw RGB values and then rendered again (or re-rendered). This can be achieved by computing an accurate radiometric calibration method of the color de-rendering metadata. A recent study proposed a method to directly correct sRGB images captured with incorrect WB settings. This study introduced an example-based framework that used a large-scale dataset of more than 60,000 sRGB images rendered by a software camera pipeline due to incorrect WB settings. Each sRGB image contains a corresponding sRGB image rendered with the correct WB settings. When an input image is given, the dataset is searched to detect similar images using a k-nearest neighbor (“KNN”) strategy, and a mapping function of the corresponding correct WB image is computed. This study shows that the above color mapping computed from the examples is effective in correcting the input image. Subsequently, in this study, the KNN idea is extended to map the correct WB image to the incorrect view to enhance the image, thereby training a deep neural network. Summary of the invention
[0012] Technical issues
[0013] Methods and apparatus according to embodiments of the present invention relate to deep white balance editing.
[0014] Solution to the problem
[0015] Embodiments of the present invention provide a method and apparatus for deep white balance editing.
[0016] One aspect of the present invention provides a mobile device, comprising: at least one memory configured to store at least one instruction; at least one processor configured to execute the at least one instruction to: obtain first image data; obtain information about shooting conditions of the mobile device using at least one sensor; determine an AI model corresponding to the shooting conditions from multiple AI models for white balance control stored in the memory based on the information about the shooting conditions obtained by the at least one sensor; control the determined AI model to be loaded into the at least one processor; and input the first image data into the determined AI model to obtain second image data with a white balance controlled to correspond to the shooting conditions, wherein the multiple AI models each include an encoder model and a decoder model, the encoder model being used to obtain an intermediate representation of an input image with an original white balance that has not been corrected by image signal processing, and the decoder model being used to obtain a first output image with a first white balance different from the original white balance based on the intermediate representation.
[0017] One aspect of the present invention provides an apparatus for deep white balance editing, the apparatus comprising a memory storing instructions and at least one processor, the processor being configured to execute the instructions to obtain an input image having an original white balance corrected by image signal processing, and to obtain an intermediate representation of the obtained input image having the original white balance not corrected by image signal processing by using a first neural network. The at least one processor is further configured to execute the instructions to obtain a first output image having a first white balance different from the original white balance by using a second neural network based on the obtained intermediate representation.
[0018] One aspect of the present invention provides a deep white balance editing method performed by at least one processor, the method comprising obtaining an input image having an original white balance corrected by image signal processing, and obtaining an intermediate representation of the input image not corrected by image signal processing by using a first neural network. The method may also include obtaining a first output image having a first WB different from the original WB by using a second neural network based on the obtained intermediate representation.
[0019] According to one aspect of the present invention, a computer-readable recording medium storing instructions is provided, which, when executed by at least one processor for deep white balance editing, performs the following operations. The instructions can be executed by at least one processor to obtain an input image with an original white balance through image signal processing, and obtain an intermediate representation of the obtained input image with the original white balance not corrected by the image signal processing. The at least one processor can also execute the instructions to obtain a first output image with a first white balance different from the original white balance by using a second neural network based on the obtained intermediate representation.
[0020] Although the above method, device and computer-readable recording medium have been described separately, the description is not intended to limit the scope of use or function thereof. In practice, the method, device and computer-readable recording medium may be combined with other aspects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above aspects, other aspects and features of the embodiments of the present invention will become more apparent through the following description in conjunction with the accompanying drawings.
[0022] Figure 1 is a block diagram of a deep white balance editing apparatus according to an embodiment of the present invention.
[0023] Figure 2 yes Figure 1 A block diagram of an encoder of an apparatus for deep white balance editing.
[0024] Figure 3 yes Figure 1 A block diagram of a first white balance (WB) decoder of an apparatus for deep white balance editing.
[0025] Figure 4 yes Figure 1 A block diagram of a second WB decoder of an apparatus for deep white balance editing.
[0026] Figure 5 is a flow chart of a deep white balance editing method according to an embodiment of the present invention.
[0027] Figure 6 is a flow chart of a training method for deep white balance editing according to an embodiment of the present invention.
[0028] Figure 7 is a diagram of a color mapping process in a deep white balance editing method according to an embodiment of the present invention.
[0029] Figure 8 is a flowchart of a deep white balance editing method according to another embodiment of the present invention.
[0030] Fig. 9is a diagram of a user interface for deep white balance editing according to an embodiment of the present invention.
[0031] Fig.10 is a block diagram of a computer system according to an embodiment of the present invention.
[0032] Fig.11 is a block diagram of a mobile device according to an embodiment of the present invention.
[0033] Fig.12 is a diagram for describing identifying whether a mobile device is located indoors or outdoors based on various types of information obtained by the mobile device, and performing WB control based on a result of the identification. DETAILED DESCRIPTION
[0034] Embodiments of the present invention provide a method and apparatus for deep white balance editing.
[0035] Specifically, this paper introduces a deep learning approach for realistically editing the white balance (WB) of sRGB images. Sensor images are captured by a camera and rendered by an integrated signal processor (ISP) with sRGB color space encoding. The rendering performed by the ISP starts with a WB process that is used to remove color casts from scene illumination. Thereafter, the ISP applies a series of nonlinear color operations to improve the visual quality of the final sRGB image. A recent study showed that sRGB images rendered with incorrect WB cannot be easily corrected by the ISP's nonlinear rendering. This study proposes a k-nearest neighbor (KNN) solution based on tens of thousands of pairs of images. However, the ISP may incorrectly correct the WB of the image in the initial stage of processing, and this error may propagate throughout the processing, even in the KNN solution.
[0036] In the above embodiment of the present invention, this problem can be fixed using a DNN architecture trained by an end-to-end method to learn accurate WB. The DNN architecture maps the input image to two WB settings corresponding to indoor lighting and outdoor lighting. The above embodiment of the present invention is more accurate than the KNN method in terms of correcting the wrong WB setting, and provides users with the freedom to edit the WB of sRGB images to other lighting settings.
[0037] The above embodiments of the present invention provide a deep learning framework that allows realistic post-capture WB editing of sRGB images. The framework includes a single encoder network combined with three decoder networks for the following WB settings: (1) "correct" AWB setting; (2) indoor WB setting; (3) outdoor WB setting. The first decoder can edit sRGB images with incorrect WB control to have correct WB. The framework is very useful for post-capture WB correction. Additional indoor and outdoor decoders provide users with the ability to mix the two outputs of the decoders to create a wide range of WB looks. This functionality supports photo editing work for controlling the aesthetic WB properties of images. The framework is easily generalized to images other than the training data and allows obtaining state-of-the-art results on the above work.
[0038] The present invention allows various modifications and multiple examples, so the above-mentioned embodiments of the present invention will be described in detail in the accompanying drawings. However, it should be understood that this is not intended to limit the present invention to practical modes, and all modifications, equivalents and substitutes that depart from the spirit and technical scope of the present invention are included in the present invention.
[0039] When it is determined that the essence of the present invention will become obscure due to the detailed description of the related art, the detailed description of the above-mentioned embodiments of the present invention will be omitted. The numbers used herein (eg, first, second, etc.) are identification codes used to distinguish one element from another.
[0040] Those of ordinary skill in the art will understand that, unless otherwise stated, when elements are referred to as being “connected” or “coupled” to each other, the elements are directly connected or coupled to each other or connected to each other through another element.
[0041] Each element described herein may additionally perform part or all of the functions of other elements as well as their functions, or the main functions of each element may be completely performed by another element.
[0042] In this specification, the term "image" may be understood to refer to a static image, a moving image including a series of static images (or frames), or a video. The image may be a two-dimensional (2D) or three-dimensional (3D) image.
[0043] In this specification, the term "neural network" refers to a representative example of an artificial intelligence (AI) model, but the above-mentioned embodiments are not limited to the AI model using an algorithm.
[0044] In this specification, the term "parameter" or "neural network parameter" may be understood to refer to a value used during the operation of each layer of a neural network, and may include, for example, a weight used when applying an input value to an operation expression. Here, the parameter may be represented in a matrix form. The parameter is set as a training result value and may be updated by training data when necessary.
[0045] Throughout the disclosure, "at least one of a, b, or c" means only a, only b, only c, both a and b, both a and c, both b and c, all of a, b, and c, or variations thereof.
[0046] Figure 1 is a block diagram of an apparatus 100 for deep white balance editing according to an embodiment of the present invention.
[0047] refer to Figure 1 , the apparatus 100 includes an encoder 105 , a first WB decoder 110 and a second WB decoder 115 .
[0048] The apparatus 100 may be implemented as an electronic device (eg, a mobile device) and / or a server.
[0049] The encoder 105 is configured to obtain (or receive) an input image (e.g., an sRGB image) having an original WB corrected by the ISP of the camera through image signal processing. The encoder 105 is also configured to obtain and send an intermediate representation of the obtained input image, and the intermediate representation has the original WB that is not corrected by image signal processing. The encoder 105 includes, for example, referring to the following Figure 2 Describes a neural network, such as a convolutional network (CNN) or a deep neural network (DNN).
[0050] The first WB decoder 110 is configured to obtain and transmit a first output image having a first WB different from the original WB based on the obtained intermediate representation. Figure 3 As mentioned above, the first WB decoder 110 may include, for example, a neural network such as a CNN or a DNN. For example, the first WB may be an automatic white balance (AWB).
[0051] The first WB decoder 110 is configured to obtain and transmit a second output image having a second WB different from the original WB and the first WB based on the obtained intermediate representation. The second WB decoder 115 may include, for example, a neural network such as a CNN or a DNN, as described below with reference to Figure 4 For example, the second WB may be a shadow WB associated with 2850K (K) or an incandescent WB associated with a color temperature of 7500K.
[0052] Specifically, when considering the ISP of an unknown camera setting WB (in) Rendered input sRGB image I WB(in) When editing the input sRGB image I WB(in) The color of the input sRGB image I WB(in) It may seem that the WB is set with the target WB (t) Re-rendered.
[0053] This can be done exactly when the original unprocessed raw RGB image is available. When reconstructing the original unprocessed raw RGB values, WB sets WB (in) Might change to target WB setting WB (t) , then, the software-based ISP may re-render the sRGB image to restore to the original sRGB color space. The process can be described by the following equation:
[0054] [Equation 1]
[0055] F:I WB(in) ->D WB(in) Represents an unknown reconstruction function used to restore the sRGB image rendered by the camera to the applied WB setting WB (in) The corresponding original RGB image D.
[0056] G:D WB(in) ->I WB(t) Indicates unknown camera rendering function, used to edit WB settings WB (in) And re-render the final sRGB image I WB(t) The symbol “·” indicates a combination of functions.
[0057] This process aims to model the G·F function to generate the final sRGB image I WB(t) First, we analyze how functions G and F work together to generate the final sRGB image I WB(t) From equation 1 above, the function G receives the intermediate representation, renders the intermediate representation by encoding it in sRGB color space to have a target WB setting WB (t) , and the function F takes as input the sRGB image I WB(in) Convert to an intermediate representation (i.e., the original RGB image D with the captured WB settings).
[0058] Due to the non-linearity of the rendering chain applied to the ISP, the function G can be viewed as a hybrid function consisting of a set of sub-functions, and each sub-function renders an intermediate representation using a specific WB setting.
[0059] The process is designed to set the WB using the target WB (t) Generate the final sRGB image I WB(t) , rather than reconstructing / re-rendering the original RGB values. Therefore, the function of G·F can be modeled with an encoder / decoder scheme. The decoder g 1 and g 2 ... (i.e., the first and second WB decoders 110 and 115) generate a final SRGB image with different WB settings, while the encoder f (i.e., Figure 1 The encoder 105) inputs the sRGB image I WB(in) is sent as a potential representation. Similar to equation (1), the framework can be expressed as follows:
[0060] [Equation 2]
[0061]
[0062] And Z can represent the input original sRGB image I WB(in) An intermediate representation (i.e., latent representation) of .
[0063] As in the case of Equation 1 above, the process aims to transform the function g t Change to set WB for another WB y The new function g y , so that functions f and g t can be independent of each other without changing the function f.
[0064] In the embodiment of the present invention, the following three different WB settings are provided:
[0065] (i)WB (A) : Appropriate illumination of the scene where the AWB captures the image;
[0066] (ii)WB (t) : Tungsten / incandescent WB for interior lighting; and
[0067] (iii)WB (S) : Shadow WB of outdoor lighting.
[0068] Therefore, three different types of decoders g are generated A , g T and g S , used to generate output images corresponding to AWB, incandescent WB, and shadow WB.
[0069] Incandescent WB and Shade WB are selected based on color properties. This can be understood when considering lighting in terms of correlated color temperature. For example, Incandescent and Shade WB settings are associated with color temperatures of 2850K and 7500K, respectively. A wide range of lighting color temperatures is considered to be a pleasing range of lighting. In addition, the wide color temperature range between Incandescent WB and Shade WB allows an approximation of an image to be obtained within that range by interpolating color temperatures within that range. Fig. 9 The details of this interpolation process are described in . In AWB mode, the correlated color temperature varies according to the lighting conditions of the input image and is therefore not fixed.
[0070] Return to reference Figure 1, showing an overview of the DNN architecture. The U-Net architecture can be used with multi-scale skip connections 120 between the encoder 105 and the first and second WB decoders 110 and 115. The framework includes two main units. The first main unit is the encoder 105, which is a 4-level encoder unit for extracting a multi-scale latent representation (intermediate representation) of the input image. The second main unit includes at least two 4-level decoders (e.g., the first and second WB decoders 110 and 115). The main units have different bottlenecks and different upsampling components. Each convolutional layer has 24 channels in the first level of the encoder 105 and the last layer of each of the first and second WB decoders 110 and 115. The number of channels of each convolutional layer is twice the number of channels of each subsequent or previous level. (For example, the third level of the encoder 105 has 192 channels for each convolutional layer)
[0071] Figure 2 yes Figure 1 1 is a block diagram of an encoder 105 of an apparatus 100 for deep white balance editing.
[0072] refer to Figure 2 , the encoder 105 may include a first stage 205, a second stage 210, and a third stage 215. The input image may be transmitted through each layer of the first stage 205, the second stage 210, and the third stage 215 to obtain an intermediate representation output from the first WB decoder 110 and / or the second WB decoder 115.
[0073] The first stage 205 may include 3x3 convolutional layers 205a and 205b (with stride 1 and padding 1), and rectified linear unit (ReLU) layers 205c and 205d. The ReLU layer 205c may be located between the convolutional layers 205a and 205b, and the convolutional layer 205b may be located between the ReLU layers 205c and 205d. For example, the sizes of the convolutional layers 205a and 205b and the ReLU layers 205c and 205d may be 128x128x24, respectively.
[0074] The second layer 210 may include 2x2 max pooling layers 210a and 210b (with stride 1), 3x3 convolutional layers 210c and 210d (with stride 1 and padding 1), and ReLU layers 210e and 210f. The ReLU layer 210e may be located between the convolutional layers 210c and 210d, the convolutional layer 210d may be located between the ReLU layers 210e and 210f, and the convolutional layers 210c and 210d and the ReLU layers 210e and 210f may be located between the max pooling layers 210a and 210b. For example, the convolutional layers 210c and 210d and the ReLU layers 210e and 210f may each have a size of 64x64x48, the max pooling layer 210a may have a size of 64x64x24, and the max pooling layer 210b may have a size of 32x32x48.
[0075] The third layer 215 may include 3x3 convolutional layers 215a and 215b (with stride 1 and padding 1), ReLU layers 215c and 215d, and a 2x2 maximum pooling layer 215e (with stride 2). The ReLU layer 215c may be located between the convolutional layers 215a and 215b, the convolutional layer 215b may be located between the ReLU layers 215c and 215d, and the maximum pooling layer 215e may be located after the convolutional layers 215a and 215b and the ReLU layers 215c and 215d. For example, the convolutional layers 215a and 215b and the ReLU layers 215c and 215d may each have a size of 16x16x192, and the maximum pooling layer 215e may have a size of 8x8x192.
[0076] Figure 3 yes Figure 1 1 is a block diagram of a first WB decoder 110 of an apparatus 100 for deep white balance editing.
[0077] refer to Figure 3 , the first Wb decoder 110 includes a first stage 305, a second stage 310, a third stage 315, and a fourth stage 320. The intermediate representation may be transmitted through each layer of the first stage 305, the second stage 310, the third stage 315, and the fourth stage 320 to obtain a first output image.
[0078] The first layer 305 may include ReLU layers 305a and 305b, and 3x3 convolutional layers 305c and 305d (with stride 1 and padding 1). The convolutional layer 305c may be located between the ReLU layers 305a and 305b, and the ReLU layer 305b may be located between the convolutional layers 305c and 305d. For example, the sizes of the ReLU layers 305a and 305b and the convolutional layers 305c and 305d may be 8x8x384, respectively.
[0079] The second stage 310 may include a 2x2 upsampling layer 310a, a 3x3 convolutional layer 310b, 310c, and 310d (with stride 1 and padding 1), a depth cascade layer 310e, and ReLU layers 310f and 310g. The layers of the second stage 310 may be an upsampling layer 310a, a convolutional layer 310b, a depth cascade layer 310e, a ReLU layer 310f, a convolutional layer 310c, a ReLU layer 310g, and a convolutional layer 310d arranged in a direction from input to output. For example, the sizes of the upsampling layer 310a, the convolutional layers 310b, 310c, and 310d, and the ReLU layers 310f and 310g may be 16x16x192, respectively, and the size of the depth cascade layer 310e is 16x16x384.
[0080] The third stage 315 may include a 2x2 upsampling layer 315a, a 3x3 convolutional layer 315b, 315c, and 315d (with stride 1 and padding 1), a depth cascade layer 315e, and ReLU layers 315f and 315g. The layers of the third stage 315 may be an upsampling layer 315a, a convolutional layer 315b, a depth cascade layer 315e, a ReLU layer 315f, a convolutional layer 315c, a ReLU layer 315g, and a convolutional layer 315d arranged in a direction from input to output. For example, the sizes of the upsampling layer 315a, the convolutional layers 315b, 315c, and 315d, and the ReLU layers 315f and 315g may be 64x64x48, respectively, and the size of the depth cascade layer 315e is 64x64x46.
[0081] The fourth stage 320 may include a 2x2 upsampling layer 320a, 3x3 convolutional layers 320b, 320c, and 320d (with stride 1 and padding 1), a depthwise concatenation layer 320e, ReLU layers 320f and 320g, and a 1x1 convolutional layer 320h (with stride 1 and padding 1). The layers of the fourth stage 320 may be an upsampling layer 320a, a convolutional layer 320b, a depthwise concatenation layer 320e, a ReLU layer 320f, a convolutional layer 320c, a ReLU layer 320g, a convolutional layer 320d, and a convolutional layer 320h arranged in a direction from input to output. For example, the sizes of the upsampling layer 320a, the convolutional layers 320b, 320c and 320d, and the ReLU layers 320f and 320g may be 128x128x24 respectively, the size of the depth concatenation layer 320e may be 128x128x48, and the size of the convolutional layer 320h may be 128x128x3.
[0082] Figure 4 yes Figure 1 1 is a block diagram of a second WB decoder 115 of the apparatus 100 for deep white balance editing.
[0083] refer to Figure 4, the second WB decoder 115 includes a first stage 405, a second stage 410, a third stage 415, and a fourth stage 420. The intermediate representation may be transmitted through each layer of the first stage 405, the second stage 410, the third stage 415, and the fourth stage 420 to obtain a second output image.
[0084] The first stage 405 may include ReLU layers 405a and 405b and 3x3 convolutional layers 405c and 405d (with stride 1 and padding 1). Convolutional layer 405c may be located between ReLU layers 405a and 405b, and ReLU layer 405b may be located between convolutional layers 405c and 405d. For example, the sizes of ReLU layers 405a and 405b and convolutional layers 405c and 405d may be 8x8x384, respectively.
[0085] The second stage 410 may include a 2x2 upsampling layer 410a, a 3x3 convolutional layer 410b, 410c, and 410d (with stride 1 and padding 1), a depth cascade layer 410e, and ReLU layers 410f and 410g. The layers of the second stage 410 may be an upsampling layer 410a, a convolutional layer 410b, a depth cascade layer 410e, a ReLU layer 410f, a convolutional layer 410c, a ReLU layer 410g, and a convolutional layer 410d arranged in a direction from input to output. For example, the size of each of the upsampling layer 410a, the convolutional layers 410b, 410c, and 410d, and the ReLU layers 410f and 410g may be 16x16x192, and the size of the depth cascade layer 410e may be 16x16x384.
[0086] The third stage 415 may include a 2x2 upsampling layer 415a, a 3x3 convolutional layer 415b, 415c, and 415d (with stride 1 and padding 1), a depth tandem layer 415e, and ReLU layers 415f and 415g. The layers of the third stage 415 may be an upsampling layer 415a, a convolutional layer 415b, a depth tandem layer 415e, a ReLU layer 415f, a convolutional layer 415c, a ReLU layer 415g, and a convolutional layer 415d arranged in a direction from input to output. For example, the sizes of the upsampling layer 415a, the convolutional layers 415b, 415c, and 415d, and the ReLU layers 415f and 415g may be 64x64x48, respectively, and the size of the depth tandem layer 415e may be 64x64x66.
[0087] The fourth stage 420 may include a 2x2 upsampling layer 420a, 3x3 convolutional layers 420b, 420c, and 420d (with stride 1 and padding 1), a depth cascade layer 420e, ReLU layers 420f and 420g, and a 1x1 convolutional layer 420h (with stride 1 and padding 1). The layers of the fourth stage 420 may be an upsampling layer 420a, a convolutional layer 420b, a depth cascade layer 420e, a ReLU layer 420f, a convolutional layer 420c, a ReLU layer 420g, a convolutional layer 420d, and a convolutional layer 420h arranged in a direction from input to output. For example, the sizes of the upsampling layer 420a, the convolutional layers 420b, 420c and 420d, and the ReLU layers 420f and 420g may be 128x128x24, respectively, the size of the depth concatenation layer 420e may be 128x128x48, and the size of the convolutional layer 420h may be 128x128x3.
[0088] refer to Figures 2 to 4 , a skip connection 120a may connect the first stage 205 of the encoder 105 to the fourth stage 320 of the first WB decoder 110 and / or the fourth stage 420 of the second WB decoder 115. A skip connection 120b may connect the second stage 210 of the encoder 105 to the third stage 315 of the first WB decoder 110 and / or the third stage 415 of the second WB decoder 115. A skip connection 120c may connect the third stage 215 of the encoder 105 to the second stage 310 of the first WB decoder 110 and / or the second stage 410 of the second WB decoder 115.
[0089] Figure 5 is a flowchart of a deep white balance editing method 500 according to an embodiment of the present invention.
[0090] The method 500 may be used by at least one processor Figure 1 The deep white balance editing apparatus 100 is used to perform the deep white balance editing.
[0091] refer to Figure 5 , in operation 505 , the method 500 includes obtaining an input image having an original WB corrected by image signal processing.
[0092] In operation 510 , the method 500 includes obtaining an intermediate representation of the obtained input image by using a first neural network, wherein the intermediate representation has an original WB that is not corrected by image signal processing.
[0093] In operation 515 , the method 500 includes obtaining a first output image having a first WB different from the original WB by using a second neural network based on the obtained intermediate representation.
[0094] In operation 520 , the method 500 includes obtaining a second output image having a second WB different from the original WB and the first WB by using a third neural network based on the obtained intermediate representation.
[0095] The method 500 may further include displaying a slider for selecting one of the plurality of WBs, and based on a user input for selecting one of the plurality of WBs, displaying a composite image having the WB selected from the plurality of WBs by using the displayed slider and the obtained first output image, the obtained second output image, a mixed image of the obtained first output image and the second output image, or a combination thereof.
[0096] The at least one processor, the first neural network, and the second neural network may be implemented in a server, and the method 500 may further include receiving an input image in which the original WB is corrected from an ISP of the electronic device, and transmitting the obtained first output image through image signal processing by the ISP.
[0097] Figure 6 is a flow chart of a training (or learning) method 600 for deep white balance editing according to an embodiment of the present invention.
[0098] Method 600 can be performed by training Figure 1 The apparatus 100 for deep white balance editing is executed by at least one processor.
[0099] refer to Figure 6 , in operation 605, method 600 includes obtaining a rendered WB dataset. The rendered WB dataset is used to train and validate the device 100 for deep white balance editing. This dataset may include approximately 65,000 sRGB images rendered using various types of camera models and various WB settings (including shadow settings and incandescent settings). For each image, there is a corresponding ground truth image rendered using the correct WB setting (i.e., considered as a correct AWB result). The dataset includes two subsets, namely a training set (set 1) and a test set (set 2). Three-fold cross validation is performed using set 1 to train and validate the device 100. In particular, 12,000 training images are randomly selected from two folds, and 2,000 validation images are randomly selected from the remaining folds. For each training image, three ground truth images are rendered with (i) correct WB (represented by AWB), (ii) shadow WB, and (iii) incandescent WB. Three examples were trained while changing the training and validation folds.
[0100] In operation 610, method 600 includes enhancing the obtained rendered WB dataset. Specifically, additional 1029 original RGB images of the same scene included in the rendered WB dataset are rendered, but the training images are enhanced using a specific color temperature. In each epoch, four 128x128 patches are randomly selected from each training image and the corresponding ground truth image of each decoder. Geometric enhancement (rotation and flipping) can be used as additional data enhancement for the selected patches to avoid overfitting.
[0101] In operation 615 , the method 600 may include processing the enhanced rendered WB dataset by using the apparatus 100 to obtain reconstructed images (tiles) corresponding to the correct WB, the shadow WB, and the incandescent WB.
[0102] In operation 620, the method 600 includes obtaining the loss between the reconstructed image and the ground truth image (patches) corresponding to the correct WB, the shadow WB, and the incandescent WB. For example, the apparatus 100 is trained to minimize the squared L2 norm loss function between the reconstructed patch and the ground truth patch.
[0103] [Equation 3]
[0104]
[0105] h and w represent the width and height of the patch, respectively, and p represents the index of each pixel of each training patch P and ground truth camera rendering patch C. i∈{A, T, S} represents three target WB settings. Alternatively, the L1 norm loss function can be used to train the device 100.
[0106] In operation 625, method 600 includes updating the parameters of the neural network in device 100 (e.g., encoder 105, first WB decoder 110 and second WB decoder 115) to minimize the obtained loss. For example, after initializing the weights of the convolutional layer of device 100, a gradient moving average decay rate β may be used. 1 = 0.9 and square gradient moving average decay rate β 2 = 0.999, the adaptive moment estimation optimizer repeats the training process 165,000 times. -4 The learning rate is reduced by 0.5 every 25 epochs. For example, the L2 normalization ratio can be set to 10 -5 , and 32 training patches can be deployed as an iterative mini-batch size.
[0107] Figure 7 is a diagram of a color mapping process in a deep white balance editing method according to an embodiment of the present invention.
[0108] The DNN model according to an embodiment of the present invention is a fully convolutional network, in which a 4-level encoder / decoder with a 2x2 maximum pooling layer and an upsampling layer is used, so the size must be 2 4 The input image can be processed to have the original size.
[0109] However, all input images can be resized to sizes up to 656 pixels to ensure consistent execution time for input images of all sizes. The DNN model is applied to such images with resize. Thereafter, the color mapping function between the input image with resize and the output image is calculated and applied to the full-size input image.
[0110] refer to Figure 7 , performs a color mapping process to transform the original input image relative to the input image I WB(in) (h×w pixels) (i.e., h×w×3 pixels) and the corresponding output image generated by the encoder 705 and one of the decoders (i.e., the decoder 710) (h′×w′ pixels, in this case, h′≤h and w′≤w) are generated. A polynomial function based on the mapping matrix ρ can be used to convert the downsampled input image I WB(in)↓ The colors of the global map are mapped to the generated output image For example, the mapping matrix can be calculated by a closed-form solution as follows:
[0111] [Equation 4]
[0112] ρ=(S T S) -1 S T Y
[0113] S=h(r(I WB(in)↓ )), Y = r(I WB(t) ), r:I (h×w×3) →I (hw×3) It can be from I (h×w×3) Construction I (hw!×3) The reshaping function, h:I (hw×3) →I (hw×n) It can be a polynomial kernel function that maps the RGB vector of the image to a higher n-dimensional space. For example, an 11-dimensional polynomial mapping can be used.
[0114] When calculating the mapping matrix ρ, the final result for the same input image can be calculated by the following equation:
[0115] [Equation 5]
[0116] I WB(t) =r -1 (ρh(r(I WB(in))))
[0117] Figure 8 is a flowchart of a deep white balance editing method 800 according to another embodiment of the present invention.
[0118] Method 800 may be performed using Figure 1 The method is executed by at least one processor of the apparatus 100 for deep white balance editing.
[0119] In operation 805 , method 800 includes obtaining an input image having an original WB corrected by image signal processing.
[0120] In operation 810 , method 800 includes downsampling the obtained input image.
[0121] In operation 815 , method 800 includes obtaining a downsampled intermediate representation of the downsampled input image by using a first neural network, wherein the intermediate representation has an original WB that is not corrected by image signal processing.
[0122] In operation 820 , method 800 includes obtaining, based on the obtained downsampled intermediate representation, a downsampled output image having a first WB different from the original WB using a second neural network.
[0123] In operation 825 , the method 800 includes obtaining a first output image having a first WB different from the original WB by applying color mapping to the obtained down-sampled output image.
[0124] Fig. 9 is a diagram of a user interface 900 for deep white balance editing according to an embodiment of the present invention.
[0125] The user interface 900 displays an input image 905 and a slider 910 so that a user can select an image from output images generated based on three available WB settings, such as an AWB setting, a shadow WB setting, and an incandescent WB setting. Fig. 9 As shown in (a) or 9(b), a first output image 915 having an incandescent WB (2850K) or a second output image 920 having a shadow WB (7500K) may be generated and displayed on the user interface 900. The slider 910 may be within a Kelvin range 925, such as 2850K to 7500K, and the user may select a Kelvin value within the range 925 by sliding the slider 910 to the selected value. Based on the user input for selecting the value, the user interface 900 may display an output image corresponding to the selected value.
[0126] Using the shadow WB setting and the incandescent WB setting and the values selected by the user from the range 925, the user can additionally edit the input image 905 to make it a third output image 930 having a specific WB (e.g., 3500K) other than the shadow WB or the incandescent WB in terms of color temperature, such as Fig. 9 (c) is shown. In order to produce the effect of setting a new target WB corresponding to a color temperature t not produced by one of the decoders (e.g., the first WB decoder 110), interpolation can be performed between the first and second output images 915 and 920 produced using the incandescent and shadow WB settings, respectively. The interpolation can be described by the following equation:
[0127] [Equation 6]
[0128] I WB(t) =bI WB(T) +(1-b)I WB(S)
[0129] I WB(T) and I WB(S) may represent the first and second output images 915 and 920 generated using the incandescent and shadow WB settings, respectively, and b .... The given interpolation ratio.
[0130] The user interface 900 may be implemented in an electronic device, for example, a user application installed in a mobile device. The user application may be configured to edit a WB of an image captured by a camera of the electronic device and processed by an image signal processor of the electronic device. The user application may be part of a library editing service.
[0131] Fig.10 is a block diagram of a computer system 1000 according to an embodiment of the present invention.
[0132] like Fig.10 As shown, computer system 1000 may include a processor 1010 , a memory 1020 , an input / output interface 1030 , and a display 1040 .
[0133] The apparatus 1000 may be implemented as an electronic device (eg, a mobile device) and / or a server.
[0134] The processor 1010 may execute Figure 1The processor 1010 controls the overall control of the device 100 for deep white balance editing and executes one or more programs stored in the memory 1020. The processor 1010 is embodied in hardware, firmware, or a combination of hardware and software. The processor 1010 may be a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or other types of processing components. In some embodiments of the present invention, the processor 1010 includes one or more processors programmed to perform functions.
[0135] The processor 1010 according to an embodiment of the present invention can be realized by using the above reference Figures 1 to 9 The encoder 105, the first WB decoder 110 and the second WB decoder 115 perform one or more functions.
[0136] The memory 1020 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optical disk, and / or a solid-state optical disk), a compact disk (CD), a digital versatile disk (DVD), a floppy disk, a cassette, a magnetic tape, and / or other types of non-transitory computer-readable media, and corresponding drives. Alternatively, the memory 1020 may include a random access memory (RAM), a read-only memory (ROM), and / or other types of dynamic or static storage devices (e.g., flash memory, magnetic memory, and / or optical memory).
[0137] The memory 1020 may store various types of data, programs, or applications for driving and controlling the device 100. The program stored in the memory 1020 may include one or more instructions. The program including one or more instructions or applications stored in the memory 1020 may be executed by the processor 1010.
[0138] The input / output interface 1030 allows the computer system 1000 to communicate with other devices (such as other electronic devices and other servers) through a wired connection, a wireless connection, or a combination thereof. For example, when the apparatus 100 and the computer system 1000 are implemented in a server, the processor 1010 can receive an input image having an original WB corrected by the image signal processor of the electronic device through image signal processing from the image signal processor through the input / output interface 1030. The processor 1010 can send an output image having a WB different from the original WB to the electronic device through the input / output interface 1030.
[0139] The display 1040 may obtain data from, for example, the processor 1010, and display the obtained data. The display 1040 may include, for example, a touch screen, a television, a computer monitor, or a combination thereof.
[0140] Embodiments of the present invention provide a deep learning framework for editing WB. The framework accurately corrects the WB of an image with an incorrect WB. The framework also allows users to freely edit the WB of sRGB images with different lighting settings. The framework includes a single encoder and multiple decoders. The multi-decoder model is trained to generate multiple WB settings in an end-to-end manner. The framework can achieve the most advanced WB correction and manipulation results and produce more efficient compilation results than previous WB correction and manipulation tasks.
[0141] Fig.11 is a block diagram of a mobile device 1100 according to an embodiment of the present invention.
[0142] refer to Fig.11 The mobile device 1100 may include a camera module 1100 and a processor 1120. The embodiment of the present invention is not limited thereto, and the mobile device 1100 may further include a display 1130, a user interface module 1140, an illumination sensing module 1170, a GPS sensing module 1180, a network information obtaining module 1190, and a storage module 1150.
[0143] The camera module 1110 may include a lens module 1112 , an image sensing module 1114 , and an image signal processor 1116 .
[0144] The lens module 1112 may include at least one lens for collecting light reflected from an object and transmitting the light to the image sensing module 1114. According to one embodiment of the present invention, the camera module 1110 may include a plurality of lens modules. In this case, the plurality of lens modules may have the same lens properties (e.g., viewing angle, focal length, auto focus, F number, or optical zoom). Alternatively, at least one lens module may have at least one lens property that is different from the lens properties of other lens modules. For example, the lens module 1112 may include at least one lens of a wide-angle lens, an ultra-wide-angle lens, or a telephoto lens.
[0145] The image sensing module 1114 may include at least one image sensor to convert the light collected by and transmitted from the lens module 1112 into an electrical signal. In addition, the image sensing module 1114 may obtain an image corresponding to the object by using the electrical signal. The image obtained by the image sensing module 1114 is described herein as raw image data. For example, at least one image sensor may be a charge coupled device (CCD) sensor or a complementary metal oxide semiconductor (CMOS) sensor, and the image sensing module 1114 may include a color filter array configured with a Bayer pattern and a corresponding pixel array including at least one CCD sensor and a CMOS sensor. However, the embodiments of the present invention are not limited thereto, and the image sensing module 1114 may be implemented in various forms. For example, the image sensing module 1114 may be implemented as a concave sensor. Raw image data may be understood to refer to image data obtained from the image sensing module 1114 without image processing by the image signal processor 1116, and may be, for example, color filter array data, such as raw Bayer pattern data.
[0146] The image signal processor 1116 can perform image processing on the raw image data and output the data in a specific image format. The image format can be understood as an image format with a specific color space, and an output device (e.g., a display device or a printer device) can represent the color space to output the image or store the image before outputting the image. For example, the image format can be an RGB-based format, a CMYK-based format, a YCbCR-based format, etc. Examples of RGB-based formats include sRGB format, Adobe RGB format, Prophoto RGB format, etc., and examples of CMYK-based formats include SWOP CMYK format, etc.
[0147] For example, the image signal processor 1116 may process raw image data and output sRGB image data.
[0148] The image signal processor 1116 may be implemented by hardware. However, the image signal processor 1116 is not limited thereto and may be implemented by a combination of hardware and software. In this case, the image signal processor 1116 may be implemented as a software module in the processor 1120 outside the camera module 1110. Alternatively, the image signal processor 1116 may be implemented as hardware separate from the camera module 1110 and the processor 1120. The image signal processor 1116 may perform the function of processing raw image data together with the processor 1120 outside the camera module 1110. In another embodiment of the present invention, the image signal processor 1116 may be implemented as a system on chip (SoC) in the camera module 1110.
[0149] The image signal processor 1116 or the processor 1120 may include a demosaicking module 1121 , a noise reduction module 1122 , a white balance control module 1123 , a color space conversion module 1124 , a color operation module 1125 , and an image output module 1126 .
[0150] The unmixing module 1121 may perform unmixing on the original image data. For example, the unmixing module 1121 may perform RGB unmixing on the original image data to obtain RGB image data. Unmixing may be a type of color interpolation.
[0151] The noise reduction module 1122 may perform noise reduction processing on the RGB data to obtain noise-reduced RGB image data.
[0152] The white balance control module 1123 may receive the first image data and output the second image data with the controlled WB. The first image data may be the original RGB image data, and the second image data may be the RGB data with the controlled WB. In this case, the first image data may be the sRGB image data obtained when passing through at least one of the demixing module 1121 or the noise reduction module 1122.
[0153] Alternatively, the first image data may be raw color filter array data and the second image data may be color filter array data with controlled WB.
[0154] According to one embodiment of the present invention, the white balance control module 1123 may input the first image data into at least one of the multiple AI models and obtain at least one segment of the second image data with controlled WB. In this case, the multiple AI models may be composed of neural networks, and each AI model may include an encoder model and a decoder model. The multiple AI models may include different decoder models. The multiple AI models may include the same encoder model.
[0155] For example, the white balance control module 1123 may include Figure 1 The encoder 105 (corresponding to the encoder model), the first WB decoder 110 and the second WB decoder 115 (corresponding to the decoder model). However, it will be understood by those skilled in the art that the white balance control module 1123 is not limited to the first WB decoder 110 and the second WB decoder 115, and may also include a third WB decoder, a fourth WB decoder, etc. The first WB decoder and the second WB decoder may be selectively used by a processor or a video signal processor, and the data processed by the encoder is the processed input data.
[0156] The encoder and multiple WB decoders can be configured as neural networks and trained using original sRGB images or sRGB images with altered WB as training data.
[0157] Furthermore, the encoder and multiple WB decoders can be trained using the initial raw image and the raw image with changed WB as training data.
[0158] "Original" is used here as an expression corresponding to "changed WB", and is not limited to images in which the image signal processor 1116 and the like do not perform WB control on the initial original image data obtained by the image sensing module 1114, and can be understood to refer to images in which the image signal processor 1116 performs WB control on the initial original image data.
[0159] In this case, when the image signal processor 1116 or the like does not perform WB control on the initial raw image data obtained by the image sensing module 1114 as input data to the white balance control module 1123, the white balance control module 1123 may be regarded as an original WB control module, and when the image signal processor 1116 or the like performs WB control on the initial raw image data obtained by the image sensing module 1114 as input data to the white balance control module 1123, it may be regarded as a post-WB control module. Fig.11 The above description of the WB in the previous figures relates to the WB post-control module, but those skilled in the art will appreciate that embodiments of the present invention are not limited thereto and the above description may also be applied to the original WB module.
[0160] “Changed WB” may be understood as WB being changed to have a WB attribute (eg, AWB, incandescent WB, or shadow WB) which is expected to be the output of a certain WB decoder.
[0161] The encoder may be configured as a first neural network and receive sRGB image data as input data and output original image data corresponding to the sRGB image data as output data.
[0162] In one embodiment of the present invention, the encoding may receive raw image data as input data and output an intermediate representation corresponding to the raw image data as output data.
[0163] Each of the plurality of decoders may be configured as a second neural network having a structure different from that of the first neural network, and receives the original image data output from the encoder as input data. The encoder may receive the initial original image data obtained by the image sensing module 1114 as input data. In this case, an AI model consisting only of a decoder may be installed in the mobile device 1100 to process the initial original image data obtained by the image sensing module 1114. That is, during the training of the AI model, the decoder and the encoder may be trained through one training process, but when the trained AI model is applied to the mobile device 1100, only the decoder may be selected and stored in the storage module 1150 of the mobile device 1100.
[0164] In one embodiment of the present invention, each decoder may receive the intermediate representation output from the encoder as input data. The decoder converts the input data into data corresponding to a predetermined WB attribute and outputs a result of converting the input data.
[0165] When the decoders receive raw image data as input data, each decoder converts the raw image data according to the WB attribute corresponding thereto to generate and output sRGB image data reflecting the WB attribute.
[0166] In one embodiment of the present invention, in order to interact with a user, the mobile device may convert raw image data into sRGB image data, display the sRGB image data, and receive a WB setting value desired by the user through the display screen, but in order to regain an image with the desired WB setting value applied, the white balance control module 1123 may obtain the raw image data corresponding to the displayed sRGB image through an encoder, and obtain the sRGB image data with a changed WB through a decoder corresponding to the WB setting desired by the user.
[0167] In another embodiment of the present invention, based on the information about the shooting conditions obtained by the sensor module 1160, one of the plurality of AI models may be selected, and an image of a WB setting value corresponding to the shooting conditions may be obtained by the selected AI model. In this case, the AI model may be an AI configured with only a decoder, and receives an initial raw image obtained by the image sensing module 1114 as input data.
[0168] When the decoder receives the intermediate representation corresponding to the input raw image data as input data, the decoder generates and outputs the raw image data converted according to the WB attribute corresponding to each decoder. That is, when the user interface is not required, in order to obtain the image to which the user's desired WB setting value is applied again, the white balance control module 1123 can obtain the intermediate representation corresponding to the raw image data through the encoder, and obtain the raw image data with the WB changed through the decoder corresponding to the user's desired WB setting.
[0169] The weights and biases of the first neural network and the at least one second neural network may be pre-trained and set. In one embodiment of the present invention, the processor 1120 or the image signal processor 1116 may receive the weights and biases of the first neural network and the at least one second neural network that are pre-trained and stored from a separate training device, and control the first neural network and the at least one second neural network stored in the storage module 1150 to be set using the received at least one weight and bias.
[0170] The white balance control module 1123 may determine an AI model corresponding to the shooting condition among a plurality of AI models stored in the storage model 1150 based on information about the shooting condition obtained through the sensor module 1160, and may input the first image data into the determined AI model to obtain the second image data having WB controlled to correspond to the shooting condition. This will be described in detail after the sensor module 1160 is described below.
[0171] The color space conversion module 1124 can obtain image data having a converted color space by performing color space conversion on the input image data. For example, the color space conversion module 1124 can perform CIE-XYZ image data by performing color space conversion on the RGB image data.
[0172] The color operation module 1125 may obtain color-operated image data by performing a color operation on the image data having the converted color space. The color processing may include gamma correction and may be referred to as photo-finishing.
[0173] The image output module 1126 may output image data by performing mapping on the color-operated image data. For example, the output image data may be SRGB image data.
[0174] The sensor module 1160 may obtain information about photographing conditions. For example, the sensor module 1160 may include an illumination sensing module 1170 , a GPS sensing module 1180 , and a network information obtaining module 1190 .
[0175] The illuminance sensing module 1170 may obtain illuminance sensor information. The illuminance sensor information may represent lux sensed by the illuminance sensor.
[0176] The GPS sensing module 1180 may obtain GPS sensor information. The GPS sensor information may represent at least one of longitude, latitude, or altitude obtained by the GPS sensor. The GPS sensor information may be periodically or aperiodically obtained and updated in response to a request.
[0177] The network information obtaining module 1190 may obtain network status information. The network status information may include but is not limited to at least one of received signal strength indication (RSSI) information of at least one scanned access point (AP) or service set identifier (SSID) information of at least one scanned AP.
[0178] The white balance control module 1123 can determine an AI model corresponding to the shooting conditions among multiple AI models for WB control stored in the storage model 1150 based on information about the shooting conditions obtained through the sensor module 1160, and can input the first image data into the determined AI model to obtain second image data having WB controlled to correspond to the shooting conditions.
[0179] For example, the white balance control module 1123 can identify whether the mobile device 1100 is located indoors or outdoors based on at least one of the GPS sensor information, the illuminance sensor information, or the network status information. The white balance control module 1123 can determine the AI model corresponding to the recognition result based on the recognition result. For example, there may be a tungsten / incandescent WB setting (or a fluorescent WB setting) representing indoor lighting, a shadow WB setting representing outdoor lighting, etc., and the white balance control module 1123 can identify whether the mobile device 1100 is located indoors or outdoors, and based on the recognition result, determine the AI model corresponding to the WB setting related to the recognition result among various types of WB settings.
[0180] refer to Fig.11 In the previous figures, although it is described above that the output image data having a specific WB is obtained using a WB decoder corresponding to a specific WB setting (e.g., an AWB setting, an incandescent WB setting, or a shadow WB setting), the embodiments of the present invention are not limited thereto, and those skilled in the art will understand that in Fig.11 In the embodiments of the previous drawings, the second image data having the WB controlled to correspond to the shooting conditions can be obtained from the first image data based on the information on the shooting conditions (indoors / outdoors).
[0181] Generally, the AWB setting is an accurate WB setting, but an output image with a more appropriate WB setting may be obtained using a WB decoder corresponding to the WB setting determined based on information about the shooting conditions (indoor / outdoor). However, the embodiments of the present invention are not limited thereto, and an output image with the AWB setting and an output image with the WB setting corresponding to the shooting conditions in the indoor WB setting and the outdoor WB setting may be simultaneously obtained and displayed on a display so that a user can select one of the output images.
[0182] In one embodiment of the present invention, the processor 1120 may determine a WB setting corresponding to information obtained using information about shooting conditions obtained by at least one sensor module 1160. The processor 1120 may determine an AI model corresponding to the determined WB setting among a plurality of AI models stored in the storage module 1150. The processor 1120 may control the image signal processor 1116 to process the CFA image data obtained from the image sensing module 1114 by loading the determined AI model to the image signal processor 1116. More specifically, the processor 1120 may control data about the AI model determined among a plurality of AI models stored in the storage module 1150 to be loaded into a memory (not shown) in the processor 1116. The image signal processor 1116 may process the CFA image data received from the image sensing module 1114 by using the data about the AI model loaded into the memory. The image signal processor 1116 may obtain RGB image data by processing the CFA image data through the AI model.
[0183] In one embodiment of the present invention, a storage module (not shown) in the image signal processor 1116 may store a plurality of AI models. Here, the storage module is different from the memory in the image signal processor 1116. That is, the storage module may be a flash memory or a DRAM, and the memory may be an SRAM. In this case, the image signal processor 1116 receives data about a WB setting corresponding to the information by using information obtained from the processor 1120 by at least one sensor module 1160. The image signal processor 1116 may determine the AI model to be processed by using the received data about the WB setting. The image signal processor 1116 may control the determined AI model to be loaded into the memory (not shown) in the image signal processor 1116. The image signal processor 1116 may process the CFA image data received from the image sensing module 1114 by using the data about the AI model loaded into the memory. The image signal processor 1116 may obtain RGB image data by processing the CFA image data through the AI model.
[0184] The white balance control module 1123 may recognize that the mobile device is located indoors when the GPS sensor information is not updated, and recognize that the mobile device is located outdoors when the GPS sensor information is updated.
[0185] When the sensor value (e.g., lux value) of the illuminance sensor information is greater than or equal to the first value, the white balance control module 1123 may recognize that the mobile device is located outdoors. In this case, the white balance control module 1123 may recognize whether the sun rises based on the current time information, and an estimated value according to the sun position corresponding to the current time may be set to the first value. Since only artificial lighting exists when the sun is not expected to rise, the mobile device may be recognized as being located indoors regardless of the sensor value of the illuminance sensor information.
[0186] When the sensor value (eg, lux value) of the illuminance sensor information is less than or equal to the second value, the white balance control module 1123 may recognize that the mobile device is located indoors.
[0187] The white balance control module 1123 may identify that the mobile device is located indoors when the average RSSI of the scanned APs is greater than or equal to a first value, and identify that the mobile device is located outdoors when the average RSSI of the scanned APs is less than a second value.
[0188] Otherwise, when among the scanned APs, the number of APs whose RSSI is less than or equal to the second value is greater than or equal to the second number or the number of APs greater than or equal to the first value is less than the first number, the white balance control module 1123 may identify that the module is located outdoors.
[0189] When the number of APs whose RSSI is greater than or equal to the first value among the scanned APs is greater than or equal to the first number, the white balance control module 1123 may recognize that the module is located indoors.
[0190] When the number of APs having RSSI less than or equal to the second value among the scanned APs is greater than or equal to the second number, or the number of APs greater than or equal to the first value is less than the first number, the white balance control module 1123 may recognize that the module is located outdoors.
[0191] When the above conditions are met, only APs with SSIDs (part of which corresponds to the string) can be considered. However, the embodiments of the present invention are not limited thereto, and whether the final condition is met can be determined by distinguishing a group of corresponding APs from other groups of APs and assigning different weights to the results of determining whether these groups each meet the intermediate conditions.
[0192] The following will refer to Fig.12An embodiment in which the white balance control module 1123 identifies whether the mobile device 1100 is located indoors or outdoors based on at least one of GPS sensor information, illumination sensor information, or network status information is described in detail.
[0193] The display 1130 may display various types of image data. Specifically, the processor 1120 controls the display 1130 to display data having a specific image format output by the image signal processor 1116 or the like.
[0194] The user interface module 1140 may receive various types of user inputs. The display 1130 and the user interface module 1140 may be implemented together as a touch screen including a touch sensor and a display panel (e.g., LCD or AMOLED). The processor 1120 may control the camera module 1110 to be driven based on the user input received through the user interface module 1140. That is, the processor 1120 may control the display panel to display a user interface (UI) icon for starting to capture an image and a UI icon for setting image capture conditions. When receiving a user input inputted through the touch sensor, the processor 1120 may control the image sensing module 1115 to convert the light collected by the lens module 1112 in the camera module 1110 into an electrical signal.
[0195] The storage module 1150 can display various types of image data. Specifically, the processor 1120 controls the storage module 1150 to store data having a specific image format output by the image signal processor 1116, etc. The image format stored in the storage module 1150 may be different from the image format output to the display 1130. For example, the processor 1120 may perform lossy / lossless compression on at least one output image obtained from the white balance control module 1123 according to a specific compression standard (e.g., the JPEG standard), and control the storage module 1150 to store the compressed output image.
[0196] The storage module 1150 may also store information about an AI model used in the white balance module 1123 .
[0197] Fig.12 is a diagram for describing identifying whether a mobile device is located indoors or outdoors based on various types of information obtained by the mobile device, and performing WB control based on a result of the identification.
[0198] refer to Fig.12, the mobile device 1200 can obtain illumination sensor information by sensing light (e.g., a fluorescent lamp or an incandescent lamp) from the indoor lamp 120 using the illumination sensor 1205. When the value of the illumination sensor information is less than or equal to the first value, the mobile device 1200 can recognize that the mobile device 1200 is located indoors. This is because generally, the illumination value indoors is much smaller than the illumination value outdoors.
[0199] The mobile device 1200 may use a GPS sensor to obtain GPS sensor information from the GPS satellite 1210. When the GPS sensor information is not updated, the mobile device 1200 may recognize that the mobile device 1200 is located indoors. This is because it is generally difficult to receive GPS sensor information when the mobile device 1200 is located indoors.
[0200] The mobile device 1200 may scan surrounding APs 1235 to obtain a list of at least one scanned AP. The mobile device 1200 may identify the number of scanned APs 1235 based on the number of SSIDs of the scanned APs 1235, and identify the signal strength of each scanned AP 1235 based on the RSSI 1240 of the scanned APs 1235.
[0201] When the average value of RSSI 1240 of the scanned AP 1235 is greater than or equal to the first value, the mobile device 1200 can recognize that the mobile device 1200 is located indoors. This is because generally, when the mobile device 1200 is located indoors, the AP 1235 is located near the mobile device 1200, so the average value of RSSI 1240 of the AP 1235 is small.
[0202] Alternatively, when the number of APs 1235 whose RSSI 1240 is greater than or equal to the first value is greater than or equal to the first number, the mobile device 1200 can recognize that the mobile device 1200 is located indoors. Generally, this is because when the mobile device 1200 is located indoors, many APs are located close to the mobile device 1200, and therefore, the number of APs whose RSSI 1240 is larger indoors is greater than the number of APs whose RSSI 1240 is larger outdoors.
[0203] The mobile device 1200 can obtain illumination sensor information by sensing light from the sun 1230 using the illumination sensor 1205. When the value of the illumination sensor information is greater than or equal to the second value, the mobile device 1200 can recognize that the mobile device 1200 is located indoors. This is because, in general, the outdoor illumination value is much greater than the indoor illumination value.
[0204] The mobile device 1200 can obtain GPS sensor information from the GPS satellite 1210 by using a GPS sensor. When updating the GPS sensor information, the mobile device 1200 can recognize that the mobile device 1200 is located outdoors. This is because, in general, when the mobile device 1200 is located outdoors, GPS sensor information is easier to receive than when the mobile device 1200 is located indoors, and thus can be updated in response to a request in most cases.
[0205] The mobile device 1200 may scan APs 1235 around the mobile device 1200. The mobile device 1200 may identify the number of scanned APs 1235 based on the number of SSIDs of the scanned APs 1235, and identify the signal strength of each scanned AP 1235 based on the RSSI 1240 of the scanned APs 1235.
[0206] When the average value of the RSSI 1240 of the scanned AP 1235 is less than the second value, the mobile device 1200 can recognize that the mobile device 1200 is located outdoors. This is because, generally, when the mobile device 1200 is located outdoors, the average RSSI of the AP 1235 is small due to a large distance between the mobile device 1200 and the AP 1235 or due to various types of obstacles.
[0207] Alternatively, when the number of APs 1235 whose RSSI 1240 is less than or equal to the second value is greater than or equal to the second number, the mobile device 1200 can recognize that the mobile device 1200 is located outdoors. This is because, in general, when the mobile device 1200 is located outdoors, the number of APs 1235 with a small RSSI outdoors is smaller than the number of APs 1235 with a small RSSI indoors due to a large distance between the mobile device 1200 and the AP 1235 or due to various types of obstacles.
[0208] However, the embodiments of the present invention are not limited thereto, and when the number of APs 1235 whose RSSI 1240 is greater than or equal to the first value is less than the first number, the mobile device 1200 may recognize that the mobile device 1200 is located outdoors. This is because, in general, when the mobile device 1200 is located outdoors, the number of APs 1235 close to the outdoor mobile device 1200 is less than the number of APs 1235 close to the indoor mobile device 1200.
[0209] However, embodiments of the present invention are not limited thereto, and the mobile device 1200 may identify whether the mobile device 1200 is located indoors or outdoors through various techniques based on at least one of illumination sensor information, GPS sensor information, or network status information.
[0210] The mobile device 1200 may perform white balance control based on the recognition result. For example, there may be a tungsten / incandescent WB setting (or a fluorescent WB setting) representing indoor lighting, a shadow WB setting representing outdoor lighting, etc., and based on the recognition result, the mobile device 1200 may recognize whether the mobile device 1200 is located indoors or outdoors, determine an AI model associated with the WB setting among multiple AI models associated with the multiple WB settings, and obtain an output image using the determined AI model.
[0211] Although embodiments of the present invention have been described above with reference to the accompanying drawings, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the following claims.
Claims
1. A mobile device, include: at least one memory configured to store at least one instruction; at least one processor configured to execute the at least one instruction to: obtaining first image data; obtaining information about a photographing condition of the mobile device using at least one sensor; determining, based on the information about the shooting condition obtained by the at least one sensor, an AI model corresponding to the shooting condition among a plurality of AI models for white balance control stored in the memory; Controlling the determined AI model to be loaded into the at least one processor; as well as inputting the first image data to the determined AI model to obtain second image data having a white balance controlled to correspond to the shooting condition, Among them, the multiple AI models each include an encoder model and a decoder model, the encoder model is used to obtain an intermediate representation of an input image with an original white balance that has not been corrected by image signal processing, and the decoder model is used to obtain a first output image with a first white balance different from the original white balance based on the intermediate representation.
2. The mobile device according to claim 1, in, The first image data includes raw color filter array data.
3. The mobile device according to claim 1, in, The first image data includes original RGB data.
4. The mobile device according to claim 1, in, The multiple AI models each include a different decoder model, each decoder model having a predetermined white balance property corresponding thereto.
5. The mobile device according to claim 1, in, The at least one sensor comprises: A global positioning system GPS sensor configured to obtain GPS sensor information; an illuminance sensor configured to obtain illuminance sensor information; and The network status information obtaining module is configured to obtain network status information. wherein the at least one processor identifies whether the mobile device is located indoors or outdoors based on at least one of the GPS sensor information, the illumination sensor information, or the network status information, and An AI model corresponding to the recognition result among the plurality of AI models for white balance control stored in the memory is determined.
6. The mobile device according to claim 5, in, When determining whether the mobile device is located indoors or outdoors based on at least one of the GPS sensor information, the illumination sensor information, or the network status information, when the GPS sensor information is not updated, the mobile device is identified as being located indoors, and when the GPS sensor information is updated, the mobile device is identified as being located outdoors.
7. The mobile device according to claim 5, in, When determining whether the mobile device is located indoors or outdoors based on at least one of the GPS sensor information, the illuminance sensor information, or the network status information, the mobile device is identified as being located outdoors when a sensor value of the illuminance sensor information is greater than or equal to a first value, and When the sensor value of the illumination sensor information is less than or equal to a second value, the mobile device is identified as being located indoors.
8. The mobile device according to claim 5, in, The network status information includes received signal strength indication RSSI information of at least one scanned access point AP, Wherein, when it is determined whether the mobile device is located indoors or outdoors based on at least one of the GPS sensor information, the illumination sensor information, or the network status information, the at least one processor is further configured to: When the average value of the RSSI of the scanned APs is greater than or equal to a first value, identifying that the mobile device is located indoors, and when the average value of the RSSI of the scanned APs is less than a second value, identifying that the mobile device is located outdoors; and When the number of APs whose RSSI among the scanned APs is greater than or equal to a first value is greater than or equal to a first number, it is identified that the mobile device is located indoors, and when the number of APs whose RSSI is less than or equal to a second value is greater than or equal to a second number, or when the number of APs whose RSSI is greater than or equal to the first value is less than the first number, it is identified that the mobile device is located outdoors.
9. The mobile device according to claim 8, in, The network status information further includes service set identifier SSID information of the at least one AP.
