PRIORITY

This application is a National Phase Entry of PCT International Application No. PCT/KR2019/006945 which was filed on Jun. 10, 2019, and claims priority to Korean Patent Application No. 10-2018-0072361, which was filed on Jun. 22, 2018, the entire contents of each of which is incorporated herein by reference.

TECHNICAL FIELD

Embodiments disclosed in the disclosure relate to technologies of determining a type of a light source of an image.

BACKGROUND ART

With the advancement of IT technology, a camera has developed from a traditional film camera to a digital camera. The digital camera may convert light into an electrical image signal and may store the electrical image signal as digital data (image data).

Unlike a conventional film camera, the digital camera may perform white balancing for correction to a unique neutral color of a subject, with regard to a color temperature of light applied to the subject upon image capture. In general, the white balancing technique tracks achromatic color regions in some or all of pixels of the captured image and adjusts a color temperature of the entire image with respect to pixel values of the achromatic color regions.

DISCLOSURE

Technical Problem

According to a conventional white balancing technique, because a color of a light source and a unique color of a subject are mixed in an image obtained by capturing the subject, it is impossible to estimate an accurate type and an accurate color temperature of the light source. Furthermore, when using the general white balancing technique, because each algorithm should be formed with regard to each of a method for determining a typical light source and a method for determining an exceptional light source, there is a problem that computational resources of an electronic device are excessively used.

Embodiments disclosed in the disclosure may provide an electronic device and a method for more accurately determining a type of a light source of an image using an image sensor where a plurality of light receiving elements are included in a unit pixel.

Technical Solution

In accordance with an aspect of the disclosure, an electronic device is provided. The electronic device may include an image sensor including a pixel array, the pixel array including a plurality of pixels including a plurality of first light receiving elements and a plurality of second light receiving elements and each of the plurality of pixels including at least one of the plurality of first light receiving elements and at least one of the plurality of second light receiving elements, at least one processor electrically connected with the image sensor, and a memory storing data about correlationship between a value of at least one first reference parameter based on reference color components indicating a color and a value of a second reference parameter based on pixel values output from each of the first light receiving elements and the second light receiving elements, the pixel values forming the color. The data about the correlationship may correspond to each of a plurality of segmented regions of an image obtained through the image sensor and a type of a predefined light source. The memory may store instructions, when executed, causing the processor to obtain the image through the image sensor, segment the obtained image into the plurality of regions, calculate values of a first parameter for each of the plurality of regions based on the reference color components indicating a representative color of each of the plurality of regions, calculate values of a second parameter for each of the plurality of regions based on first pixel values output from the plurality of first light receiving elements included in each of the plurality of regions and second pixel values output from the plurality of second light receiving elements, determine types of a light source respectively corresponding to the plurality of regions, based on a value of the second reference parameter included in the data about the correlationship, the value corresponding to the calculated values of the first parameter, and the values of the second parameter calculated for each of the plurality of regions, and determine a type of a light source of the image based on the determined types of the light source.

In accordance with another aspect of the disclosure, a method for determining a light source of an image is provided. The method may include obtaining an image by means of an image sensor including a plurality of pixels, each of which includes a first light receiving element and a second light receiving element, segmenting the obtained image into a plurality of regions, calculating values of a first parameter for each of the plurality of regions based on reference color components indicating a representative color of each of the plurality of regions, calculating values of a second parameter for each of the plurality of regions based on first pixel values output from the first light receiving element included in each of the plurality of regions and second pixel values output from the second light receiving element, determining types of a light source respectively corresponding to the plurality of regions, based on values of the second parameter included in data about correlationship stored in a memory, the values corresponding to the calculated values of the first parameter, and the calculated values of the second parameter, and determining a type of a light source of the image based on the determined types of the light source respectively corresponding to the regions.

In accordance with another aspect of the disclosure, an electronic device is provided. The electronic device may include an image sensor including a plurality of pixels, each of at least some of the plurality of pixels including a plurality of light receiving elements, a memory, and a processor. The processor may be configured to obtain an image using the image sensor, segment at least a portion of the image into a plurality of regions, calculate values of at least one first parameter for every the plurality of regions based on reference color components indicating a representative color of each of the plurality of regions, calculate values of a second parameter corresponding to each of the plurality of regions using first pixel values corresponding to some of the plurality of light receiving elements of each of the plurality of regions and second pixel values corresponding to some of the plurality of light receiving elements, determine types of a light source corresponding to the plurality of regions, based on comparison between the values of the first parameter and the values of the second parameter and data about correlationship of the first parameter and the second parameter corresponding to specified light sources, and correct white balance of the image, based on the determined one or more type of the light sources corresponding to the plurality of regions.

Advantageous Effects

According to embodiments disclosed in the disclosure, a type of a light source of an image may be more accurately determined by determining the type of the light source for each image region.

The image may be segmented into a plurality of regions and pixel binning may be performed for each region to reduce an error rate of determining a type of a light source.

In addition, various effects ascertained directly or indirectly through the disclosure may be provided.

