Patent Description:
Undesired lens shading (e.g., vignetting) may appear as a brightness level drops at a periphery of an image compared to a center of an image. Due to lack of illumination, corner areas in lenses may appear darker compared to center areas. This unexpected darkness is corrected by increasing a brightness level at corners to compensate for the amount of insufficient illumination. Vignetting may be used as an artistic effect, but it is often considered to be an artifact that reduces the image quality in a camera system.

In general, vignetting correction can be categorized into two types. The first type is a grid look up table (LUT)-based correction, and the second type is a functional approximation to a distribution of correction factors.

To perform LUT-based correction, a uniform white (or gray) plane is captured in a dark room to present a shading profile of a lens. The shading profile is intersected with grid sections, and a finite number of point values representing an anti-shading profile gain are stored in an LUT, and for all other points in the frame, the shading gains are computed through interpolation with the surrounding grid points.

Functional approximation correction can be performed many different ways, such as using polynomials, empirical exponential functions, and/or hyper cosine functions. Equation (<NUM>), below, is an example of an approximated function M that uses a 6th-order polynomial α calculated using a radius r from the center of an image. The type of the function depends on the lens design.

Most lens shading correction (LSC) schemes utilize a factory calibration setting by capturing a uniform gray plane in a darkroom. The factory calibration setting is designed to achieve a static luminance level from the center of the image to each edge or corner of the image. The factory calibration setting, however, cannot completely remove color artifacts when customers take pictures of real scenes under various lighting conditions. For example, the images in <FIG> have visible chroma shading artifacts, even though the factory calibration setting was applied. In terms of brightness, the images have no problems in that there is no luminance drop throughout the entire frame. In terms of color rendering, the images fail to maintain a static red, green, blue (RGB) ratio, showing some areas more greenish or more reddish. For example, (a) of <FIG> shows the image to have an undesired green tint at the center area of the image. Additionally, (b) of <FIG> shows the image to include undesired red tints in the corners of the image. In addition, (c) of <FIG> shows the center area of the image to have an undesired red tint to the image.

From <NPL>, it is known an automatic antivignetting method which alleviates color shading artifacts regardless of ambient color temperature. The proposed method incorporates both a Color Temperature Metric (CTM) and a Vignetting Gain Control (VGC) algorithm in a commercial Image Signal Processor (ISP) which is embedded in mobile phone camera modules.

The present invention has been made to address the above-mentioned problems and disadvantages, and to provide at least the advantages described below.

Further developments are defined by the appended dependent claims.

Hereinafter, embodiments of the present disclosure are described in detail with reference to the accompanying drawings. It should be noted that the same elements will be designated by the same reference numerals although they are shown in different drawings. In the following description, specific details such as detailed configurations and components are merely provided to assist with the overall understanding of the embodiments of the present disclosure. Therefore, it should be apparent to those skilled in the art that various changes and modifications of the embodiments described herein may be made without departing from the scope of the present disclosure. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness. The terms described below are terms defined in consideration of the functions in the present disclosure, and may be different according to users, intentions of the users, or customs. Therefore, the definitions of the terms should be determined based on the contents throughout this specification.

The electronic device according to one embodiment may be one of various types of electronic devices. The electronic devices may include, for example, a portable communication device (e.g., a smart phone), a computer, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance. According to one embodiment of the disclosure, an electronic device is not limited to those described above.

The terms used in the present disclosure are not intended to limit the present disclosure but are intended to include various changes, equivalents, or replacements for a corresponding embodiment. With regard to the descriptions of the accompanying drawings, similar reference numerals may be used to refer to similar or related elements. A singular form of a noun corresponding to an item may include one or more of the things, unless the relevant context clearly indicates otherwise. As used herein, terms such as "1st," "2nd," "first," and "second" may be used to distinguish a corresponding component from another component, but are not intended to limit the components in other aspects (e.g., importance or order). It is intended that if an element (e.g., a first element) is referred to, with or without the term "operatively" or "communicatively", as "coupled with," "coupled to," "connected with," or "connected to" another element (e.g., a second element), it indicates that the element may be coupled with the other element directly (e.g., wired), wirelessly, or via a third element.

As used herein, the term "module" may include a unit implemented in hardware, software, or firmware, and may interchangeably be used with other terms, for example, "logic," "logic block," "part," and "circuitry. " A module may be a single integral component, or a minimum unit or part thereof, adapted to perform one or more functions. For example, according to one embodiment, a module may be implemented in a form of an application-specific integrated circuit (ASIC).

Color rendering is one of the most important factors for the beauty of photos, but some images suffer from inconsistent color rendering due to the physical limitations of optical lenses in cameras. Luminance fall-off may be enhanced by an offline factory calibration, but it is hard to control the chrominance shading without real-time adjustments. This disclosure provides embodiments which improve lens shading performance.

For example, the present disclosure utilizes thumbnail statistics generated at every frame in a camera preview. The thumbnail statistics may include all of the color information of a scene. Based on the scene, the ideal LSC gain may be found and then combined with the original gain in to improve image quality.

<FIG> illustrates examples of chroma shading artifacts and corresponding color ratios, according to an embodiment.

Referring to <FIG>, an R/G ratio is obtained by taking the average of the pixel intensities of R divided by G's pixel intensities along the vertical direction of an image. Since both photo (a) and photo (b) of <FIG> have more red color as they approach the periphery, central pixels have small R/G ratios. Graph (c) of <FIG> is a graph of an R/G ratio of photo (a) of <FIG>, which is equivalent to a plain gray chart in a darkroom. Graph (c) has a convex "U" pattern, however the R/G ratio should ideally appear as a flat line (e.g., a constant R/G ratio). Graph (d) of <FIG> is an R/G ratio of photo (b) of <FIG>. Although photo (b) includes many irregularities (e.g., unlike photo (a), photo (b) includes dynamic changes in pixel values), the R/G ratio in graph (d) also resembles the convex pattern, similar to graph (c) (e.g., due to the red color along the periphery of photo (b)).

When the pixel intensities are adjusted so that graph (c) and graph (d) arrive at a flat curve, the chroma artifact is reduced or eliminated completely. The algorithm introduced in this disclosure causes an R/G ratio and a B/G ratio to be as balanced as possible, without degrading the quality of the original color rendering, by applying a concept of a SD-LSC grid gain. Conceptually, SD-LSC is summarized in <FIG>.

<FIG> is a block diagram illustrating implementation of SD-LSC, according to an embodiment.

Grid gains (e.g., gain values assigned to regions of an image that is segmented via a grid) may be dynamically updated at every frame according to captured scenes, which can be used to partially control gains at the area(s) having artifacts, rather than controlling the whole image.

Referring to <FIG>, to acquire scene information, the SD-LSC may utilize a small size thumbnail <NUM> generated from the previous frame in the preview mode of a camera image signal processor (ISP). In addition, an input grid gain <NUM> of the present frame may be input to the SD-LSC. Applying SD-LSC, an updated grid gain <NUM> may be obtained based on the previous frame's thumbnail <NUM> and the present frame's input grid gain <NUM>. The updated grid gain <NUM> may be applied to an image.

Most LSC techniques are static approaches. Gains are assigned from pre-determined values that are calibrated in a factory. Although they may reflect various capture conditions including brightness levels, color temperature, or lens positions, they have limitations to overcome the color shading artifacts in that those artifacts unexpectedly occur more often under certain scene patterns. Because SD-LSC calculates new gains depending on preview images (e.g., thumbnail <NUM>), it allows for the reflection of dynamically varying capture conditions in real time no matter what type of scene is presented. Newly updated LSC gains guarantee better color rendering and higher real-world fidelity, which improves user satisfaction.

Many different types of LSC models may be used, but these models may generally be simplified as shown in Equation (<NUM>).

In Equation (<NUM>), (x,y) is a pixel position and c is a color channel. The gain G is composed of factory calibrated values to compensate for a static luminance level regardless of pixel position. Because this LSC model works independently without interaction among color channels, it is impossible to detect color deviance producing color shading.

Most camera ISPs include the ability to apply auto focus, auto exposure, and auto white balance statistical algorithms to estimate ideal color rendering conditions based on a statistical thumbnail of a preview frame. This is called a 3A operation. The results of a 3A operation may be referred to as "scene information". The 3A operation and thumbnail creation are performed in the Bayer domain to achieve real-time processing. For example, applying auto focus in the Bayer domain may be referred to as applying a "3A statistical algorithm". Similarly, applying auto exposure and/or auto white balance in the Bayer domain may each be referred to as applying a "3A statistical algorithm".

The color shading is observed by users when an ISP generates a final sRGB output (e.g., a Joint Photographic Experts Group (JPEG) file). An aspect of SD-LSC is to anticipate the chroma shading using the thumbnail generated from the previous frame. However, some artifacts in the Bayer domain and visible when in the sRGB domain, may not be observed in the thumbnail. To determine how RGB colors are distributed, SD-LSC performs a simple sRGB process by simulating WB and pre-gamma blocks. The combination of LSC, WB, and pre-gamma may be expressed as shown in Equation (<NUM>).

In Equation (<NUM>), Ii is the LSC input, Io is the pre-gamma output, W is the WB gain, and pre-gamma is assumed for the typically used power of <NUM>/<NUM>.

<FIG> depicts the LSC input Ii being processed to obtain the pre-gamma output Io, according to an embodiment.

Referring to <FIG>, a Bayer pattern may be applied to the input Ii. After LSC and WB are performed, a color balanced image may be obtained. In addition, after performing pre-gamma, a brightness balanced image may be obtained as the pre-gamma output Io.

An additional aspect of the disclosure is to implement the HW ISP where a fixed-point (FXP) operation and bit-shift scaling are applied. FXP operation processing may be applied to modify Equation (<NUM>), as shown below in Equation (<NUM>).

In Equation (<NUM>), d<NUM> is a pre-gamma bit-shift, d<NUM> is a WB bit-shift, and d<NUM> is an LSC bit-shift. Together with bit-shift scaling, elements of each processing function Ii (x,y,c), G(x,y,c), and W(c) have integer numbers.

After obtaining the pre-gamma output Io, the grid gain values G(x, y, c) can be reversely derived using Equation (<NUM>).

Now assume there is a value of a pre-gamma output that has no chroma shading artifact at all which may be referred to as an "ideal gain" or "ideal grid gain". In <FIG>, images (a) and (b) have chroma shading artifacts, and therefore have non-flat R/G and B/G curves (c) and (d), respectively. An image with an ideal gain would have the R/G ratio or B/G ratio to always have constant numbers, regardless of pixel positions through the entire area of an image. Denote the ideal pre-gamma output Ĩo. The ideal red and blue channel output with respect to a green channel can be considered as shown in Equation (<NUM>) with the same ratio, where K represents a constant.

In the image with an ideal gain, pixel values are expressed as shown in Equation (<NUM>).

Thus, by putting the Equation (<NUM>) into Equation (<NUM>), the ideal grid gain values G̃(x, y, c) can be estimated as shown in Equation (<NUM>).

Once the constants K are determined, the ideal grid gain value G̃ that makes the image entirely free of chroma artifacts can be calculated.

The image with the ideal gain (e.g., the ideal image) is not the final target. More specifically, if the ideal gain is applied as is, it would be representative of only one color ratio applied to the entire area of the image, losing color information.

<FIG> illustrates an input image applying an original gain and the input image applying an ideal gain, according to an embodiment.

To preserve the color information, the final output gain Gnewis determined by combining (or merging) the input gain and the ideal gain, as shown in Equation (<NUM>).

Although a method for determining β will be described in more detail below, the overall idea is that more input gain G is required at colorful regions and more ideal gain G̃ is required at areas where the chroma shading is visible (e.g., less colorful regions). In other words, the input gain G is applied to some areas of an image (e.g., colorful areas) and the ideal gain G̃ is applied to other areas of the image (e.g., less colorful areas).

It is important to choose the constants K(R) and K(B) that are representative of an R/G ratio and B/G ratio for the whole image.

<FIG> illustrates separately applying two different ideal gains to an input image, according to an embodiment.

Referring to <FIG>, an input image is illustrated on the left-hand side of the figure. If ratios are randomly chosen, like #<NUM> in <FIG> (corresponding to (R,G,B) = (<NUM>,<NUM>,<NUM>)), the results would have big color shifts, like image (a) in <FIG> (which appears to have a heavy red tint), even if there is no chroma shading artifact with the constant color ratio. However, choosing #<NUM> in <FIG> (corresponding to (R,G,B)=(<NUM>,<NUM>,<NUM>)) as the representative ratios is more preferable in that it does not have as significant of an effect on the overall shift in color rendering of the original image, as evidenced by image (b) in <FIG>.

For this reason, choosing the R/G and B/G ratios that are present across the majority of pixels in the images is preferred. In statistics, the mode of a set of data values is the value that appears the most often. Therefore, the mode of the R/G and B/G ratios should be selected as representative from the pre-gamma output in Equation (<NUM>), derived from the thumbnail. Denoting the ratio with respect to the green channel is shown in Equation (<NUM>).

R and B can be any decimal numbers, but a target of this application is an FXP operation, meaning R and B are discrete integer numbers. If a thumbnail width is P and a height is Q, by counting the number of (R̂, B̂) among a pre-gamma output with P × Q total samples, a two dimensional (2D) histogram can be generated with respect to R̂ and B̂. h(R̂ , B̂) may be denoted as the 2D histogram for the R/G ratio and the B/G ratio. Then, the mode values of the R and B channels become the index of the maximum value of h(R̂ , B̂), as shown in Equation (<NUM>).

Because the number of samples P × Q may be too sparse to generate a 2D histogram, and since the thumbnail is a mini version of the full frame, maximum values may not be reliable enough to represent the whole image. Accordingly, mode values of the R and B channels may be obtained by taking a local average h(R̂, B̂), as shown in Equation (<NUM>).

Thus, the representative ratio (K(R), K(B)) may be obtained by Equation (<NUM>).

As discussed above, the ideal gain is applied to certain portions of an image and the input gain is applied to other portions of the image. Final gain values that are applied to an image are determined by combining ideal gains and input gains to respective regions of the image. Colorful regions of image (e.g., regions of the image having a relatively high difference in a chroma value with respect to an average chroma value of the image), where there are no lens shading artifacts, do not have to use the gain of an ideal image, and may keep input gains that are based on the original pixel values. The chroma shading artifacts are more likely to be visible in the areas of the input image whose color ratios are slightly different from the ideal ratio. Therefore, applying the gain of the ideal image is more likely for less colorful regions of the image (e.g., regions of the image having a relatively low difference in a chroma value with respect to an average chroma value of the image).

"Merging" the ideal and input gains (e.g., applying the ideal gain to some regions of the image and applying the input gain to other regions of the image) may be performed using two steps, a ratio difference step and a gain difference step.

The ratio difference dr(x, y) may be used as a weight to merge ideal and input gains, as shown in Equation (<NUM>).

<FIG> is a visualization of the ratio difference dr(x, y), according to an embodiment. The ratio difference dr(x, y) may be a ratio difference among color channels.

Referring to <FIG>, an example image (a) illustrates a Macbeth color checker area and green plants. A corresponding ratio difference dr(x, y) (a linear combination of input gain and ideal gain) is illustrated in (b) of <FIG>. Ideal and original gains are merged based on Equation (<NUM>), such that black/dark regions are more likely to use ideal grid gains, and white/light regions are more likely to use original gains. The merging process introduced by Equation (<NUM>) becomes the following Equation (<NUM>) and Equation (<NUM>): <MAT> <MAT>.

In Equations (<NUM>) and (<NUM>), dr_max and dr_min are upper and lower limits, meaning if the ratio difference is beyond a corresponding upper or lower limit, only an input gain is used or only an ideal gain is used.

In addition to the ratio difference step, a gain difference step may also be included to merge the ideal gain with the input gain. If Gratio values are too different from original input gains, despite having small ratio differences, they may be the root cause as to why the final sRGB output image has an unwanted color deviance (e.g., a color shift artifact). Many images may be merged using the ratio difference, but some images may need additional merging techniques to eliminate other side effects. For this reason, a process that continues to apply input gains when the new gain Gratio values are too different from the input gains may be used in accordance with Equations (<NUM>)-(<NUM>). <MAT> <MAT> <MAT>.

Thus, Gout(x, y, c) may be the final gain output in the above two-step merging process.

<FIG> illustrates an overall block diagram of SD-LSC, according to an embodiment.

Referring to (a) of <FIG>, a Bayer thumbnail <NUM> and an input grid gain <NUM> are provided as inputs. The Bayer thumbnail <NUM> is processed by applying WB and pre-gamma, and the representative ratios K(R), K(B) are computed for the processed thumbnail. In addition, the Bayer thumbnail <NUM> is also resized (e.g., downsampled) before applying WB and pre-gamma to determine the ideal grid gain because, in general, a grid gain size (W×H) is smaller than thumbnail size (P×Q). Alternatively, the grid gain size may be upsampled to the size of the thumbnail <NUM> (e.g., P×Q) instead, which could be used to generate better quality images. However, when a low computational complexity is preferred, such as when using a smart phone preview mode or a video recording that needs stable processing in real-time for at least <NUM> frames per second (fps), thumbnail downsampling would be a better approach than upsampling. Once the ideal grid gain is obtained, merging the ideal grid gain with the input grid gain is performed to obtain the new (final) grid gains.

Referring to (b) of <FIG>, the step of calculating the representative ratios K(R), K(B), is expanded upon. That is, in order to compute the representative ratios K(R), K(B), the processed thumbnail is used to compute R, G, and B ratios. For example, as explained above with reference to Equation (<NUM>), an R/G and B/G ratio that is most likely to appear across the majority of pixels (e.g., a mode) is selected to calculate R̂ and B̂. Then, as explained above with reference to Equation (<NUM>), R̂ and B̂ is used to generate a 2D histogram h(R̂ , B̂). Further, as explained above with reference to Equation (<NUM>), a local average h(R̂, B̂) of the 2D histogram is determined, and as explained above with reference to Equation (<NUM>), a maximum ratio of the local average h(R̂, B̂) is used to calculate the representative ratio K(R), K(B)).

Referring to (c) of <FIG>, the step of merging the ideal gain with the input gain is expanded upon. As explained above, one or both of the ratio difference and/or the gain difference are used to merge the ideal gain with the input gain.

The ratio difference dr(x, y) is used as a weight to merge ideal and input gains, as shown in Equation (<NUM>). If the ratio difference dr(x, y) is beyond a corresponding upper limit dr_max or lower limit dr_min, only an input gain is used or only an ideal gain is used.

In addition to the ratio difference step, a gain difference step may also be used to merge the ideal gain with the input gain. If adjusted gain values Gratio based on the ratio difference dr(x, y) are too different from original input gains G(x, y, c), then original input gain values may be used instead of adjusted gain values, as explained above with reference to Equations (<NUM>)-(<NUM>).

<FIG> illustrates a flowchart for performing SD-LSC, according to an embodiment.

The steps illustrated in <FIG> may be performed in an alternate order and other additional steps may be added. In addition, the steps illustrated in <FIG> may be stored as instructions and performed by a processor.

Referring to <FIG>, in step <NUM>, scene information is collected from a Bayer thumbnail of an input image by applying at least one 3A statistical algorithm to the Bayer thumbnail, as discussed above.

In step <NUM>, an sRGB thumbnail is generated by processing the Bayer thumbnail to simulate WB and/or pre-gamma blocks. For example, after WB is performed, a color balanced image may be obtained. In addition, after performing pre-gamma, a brightness balanced image may be obtained as the pre-gamma output.

In step <NUM>, a representative color channel ratio of the input image is determined (e.g., calculated or computed) based on the scene information and the sRGB thumbnail. Step <NUM> will be discussed further with reference to <FIG>, below.

In step <NUM>, an ideal grid gain of the input image is determined based on the representative color channel ratio and a grid gain of the input image. For example, the ideal grid gain can be calculated using Equation (<NUM>), above, and the grid gain of the input image may be provided as input.

In step <NUM>, the ideal grid gain and the grid gain of the input image are merged to generate a new grid gain. Step <NUM> will be discussed further with reference to <FIG>, below.

In step <NUM>, the new grid gain is applied to an image (e.g., the input image).

<FIG> illustrates a flowchart for determining a representative color channel ratio corresponding to step <NUM> in <FIG>, according to an embodiment.

The steps illustrated in <FIG> may be performed in an alternate order and/or some steps may be omitted, and other additional steps may be added. In addition, the steps illustrated in <FIG> may be stored as instructions and performed by a processor.

Referring to <FIG>, a processed thumbnail is provided as input. The processed thumbnail may be assumed to have undergone WB and/or pre-gamma processing and may correspond to the pre-gamma output Io, as shown in <FIG>.

In step <NUM>, an R,G,B ratio is calculated. For example, as explained above with reference to Equation (<NUM>), a color ratio that is most likely to appear across the majority of pixels (e.g., a mode) may be calculated.

In step <NUM>, a 2D histogram is calculated. For example, the 2D histogram of a color ratio (e.g., R/G) can be calculated with respect to mean values of a color (e.g., R̂ and B̂) over the entirety of an image.

In step <NUM>, a local average using the 2D histogram is calculated. In addition, as explained above with reference to Equation (<NUM>), a maximum ratio of the local average is used to calculate the representative ratio K(R), K(B) (e.g., a representative color ratio) in step <NUM>.

Further, the representative ratio K(R), K(B) may be used to calculate the ideal gain.

<FIG> illustrates a flowchart for merging the ideal grid gain and the grid gain of the input image corresponding to step <NUM> in <FIG>, according to an embodiment.

The ideal and input gains may be merged (e.g., applying the ideal gain to some regions of the image and applying the input gain to other regions of the image) using two steps, a ratio difference step and a gain difference step. Steps <NUM>-<NUM> correspond to a ratio difference step and steps <NUM>-<NUM> correspond to a gain difference step.

Referring to <FIG>, in step <NUM>, a ratio difference is calculated. The ratio difference may be a linear combination of the input gain and ideal gain. In step <NUM>, the ratio difference is merged. For example, the ideal gains and the input gains may be merged based on Equation (<NUM>), above, such that adjusted gain values may be used based on the ratio difference.

In step <NUM>, a gain difference is calculated. If the merged gain values (calculated in step <NUM>) are too different from the original input gains, then in step <NUM>, the gain difference is merged such that the original input gain values may be used instead of adjusted gain values, as explained above with reference to Equations (<NUM>)-(<NUM>).

<FIG> illustrates an electronic device in a network environment, according to an embodiment. The electronic device of <FIG> may be configured to perform any one of the above methods discussed with reference to <FIG>.

Referring to <FIG>, the electronic device <NUM>, e.g., a mobile terminal including GPS functionality, in the network environment <NUM> may communicate with an electronic device <NUM> via a first network <NUM> (e.g., a short-range wireless communication network), or an electronic device <NUM> or a server <NUM> via a second network <NUM> (e.g., a long-range wireless communication network). The electronic device <NUM> may communicate with the electronic device <NUM> via the server <NUM>. The electronic device <NUM> may include a processor <NUM>, a memory <NUM>, an input device <NUM>, a sound output device <NUM>, a display device <NUM>, an audio module <NUM>, a sensor module <NUM>, an interface <NUM>, a haptic module <NUM>, a camera module <NUM>, a power management module <NUM>, a battery <NUM>, a communication module <NUM>, a subscriber identification module (SIM) <NUM>, or an antenna module <NUM> including a GNSS antenna. In one embodiment, at least one (e.g., the display device <NUM> or the camera module <NUM>) of the components may be omitted from the electronic device <NUM>, or one or more other components may be added to the electronic device <NUM>. In one embodiment, some of the components may be implemented as a single integrated circuit (IC). For example, the sensor module <NUM> (e.g., a fingerprint sensor, an iris sensor, or an illuminance sensor) may be embedded in the display device <NUM> (e.g., a display).

The processor <NUM> may execute, for example, software (e.g., a program <NUM>) to control at least one other component (e.g., a hardware or a software component) of the electronic device <NUM> coupled with the processor <NUM>, and may perform various data processing or computations. As at least part of the data processing or computations, the processor <NUM> may load a command or data received from another component (e.g., the sensor module <NUM> or the communication module <NUM>) in volatile memory <NUM>, process the command or the data stored in the volatile memory <NUM>, and store resulting data in non-volatile memory <NUM>. The processor <NUM> may include a main processor <NUM> (e.g., a central processing unit (CPU) or an application processor, and an auxiliary processor <NUM> (e.g., a graphics processing unit (GPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP)) that is operable independently from, or in conjunction with, the main processor <NUM>. Additionally or alternatively, the auxiliary processor <NUM> may be adapted to consume less power than the main processor <NUM>, or execute a particular function. The auxiliary processor <NUM> may be implemented as being separate from, or a part of, the main processor <NUM>.

The auxiliary processor <NUM> may control at least some of the functions or states related to at least one component (e.g., the display device <NUM>, the sensor module <NUM>, or the communication module <NUM>) among the components of the electronic device <NUM>, instead of the main processor <NUM> while the main processor <NUM> is in an inactive (e.g., sleep) state, or together with the main processor <NUM> while the main processor <NUM> is in an active state (e.g., executing an application). According to one embodiment, the auxiliary processor <NUM> (e.g., an image signal processor or a communication processor) may be implemented as part of another component (e.g., the camera module <NUM> or the communication module <NUM>) functionally related to the auxiliary processor <NUM>.

According to one embodiment, the audio module <NUM> may obtain the sound via the input device <NUM>, or output the sound via the sound output device <NUM> or a headphone of an external electronic device <NUM> directly (e.g., wiredly) or wirelessly coupled with the electronic device <NUM>.

The interface <NUM> may support one or more specified protocols to be used for the electronic device <NUM> to be coupled with the external electronic device <NUM> directly (e.g., wiredly) or wirelessly. According to one embodiment, the interface <NUM> may include, for example, a high-definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

The communication module <NUM> may include one or more communication processors that are operable independently from the processor <NUM> (e.g., the application processor) and supports a direct (e.g., wired) communication or a wireless communication. According to one embodiment, the communication module <NUM> may include a wireless communication module <NUM> (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module <NUM> (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate with the external electronic device via the first network <NUM> (e.g., a short-range communication network, such as Bluetooth™, wireless-fidelity (Wi-Fi) direct, or a standard of the Infrared Data Association (IrDA)) or the second network <NUM> (e.g., a long-range communication network, such as a cellular network, the Internet, or a computer network (e.g., LAN or wide area network (WAN)). These various types of communication modules may be implemented as a single component (e.g., a single IC), or may be implemented as multiple components (e.g., multiple ICs) that are separate from each other.

According to one embodiment, commands or data may be transmitted or received between the electronic device <NUM> and the external electronic device <NUM> via the server <NUM> coupled with the second network <NUM>.

Claim 1:
A method of performing scene-dependent lens shading correction, SD-LSC, the method comprising:
providing an input image;
providing an input grid gain (<NUM>; <NUM>) of the input image, the input grid gain (<NUM>; <NUM>) being composed of pre-calibrated values to compensate for a static luminance level;
providing a Bayer thumbnail (<NUM>) of the input image;
collecting (<NUM>) scene information from the Bayer thumbnail (<NUM>) by applying at least one 3A statistical algorithm to the Bayer thumbnail;
generating (<NUM>) a standard red green blue, sRGB, thumbnail by processing the Bayer thumbnail (<NUM>) to simulate white balance, WB, and pre-gamma blocks;
determining (<NUM>) a representative color channel ratio (K(R); K(B)) of the input image based on the scene information and the sRGB thumbnail;
determining (<NUM>) an ideal grid gain of the input image based on the representative color channel ratio (K(R); K(B)) and the input grid gain (<NUM>; <NUM>);
merging (<NUM>) the ideal grid gain and the input grid gain (<NUM>; <NUM>) such that the input grid gain of the input image is applied to more colorful regions of the input image and the ideal grid gain is applied to less colorful regions of the input image to generate a new grid gain; and
applying (<NUM>) the new grid gain to the input image.