KR102619830B1 - Method and apparatus for correcting image - Google Patents
Method and apparatus for correcting image Download PDFInfo
- Publication number
- KR102619830B1 KR102619830B1 KR1020210052984A KR20210052984A KR102619830B1 KR 102619830 B1 KR102619830 B1 KR 102619830B1 KR 1020210052984 A KR1020210052984 A KR 1020210052984A KR 20210052984 A KR20210052984 A KR 20210052984A KR 102619830 B1 KR102619830 B1 KR 102619830B1
- Authority
- KR
- South Korea
- Prior art keywords
- map
- image
- light source
- light sources
- illumination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000003702 image correction Methods 0.000 claims abstract description 122
- 238000003062 neural network model Methods 0.000 claims abstract description 44
- 238000005286 illumination Methods 0.000 claims description 132
- 238000002156 mixing Methods 0.000 claims description 104
- 239000013598 vector Substances 0.000 claims description 50
- 239000000203 mixture Substances 0.000 claims description 13
- 230000004044 response Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 2
- 230000000977 initiatory effect Effects 0.000 claims description 2
- 238000012549 training Methods 0.000 description 33
- 238000012545 processing Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 11
- 238000013528 artificial neural network Methods 0.000 description 8
- 239000000284 extract Substances 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 4
- 238000010801 machine learning Methods 0.000 description 4
- 238000013527 convolutional neural network Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 241000239290 Araneae Species 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 239000011521 glass Substances 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000000513 principal component analysis Methods 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- MHOFGBJTSNWTDT-UHFFFAOYSA-M 2-[n-ethyl-4-[(6-methoxy-3-methyl-1,3-benzothiazol-3-ium-2-yl)diazenyl]anilino]ethanol;methyl sulfate Chemical compound COS([O-])(=O)=O.C1=CC(N(CCO)CC)=CC=C1N=NC1=[N+](C)C2=CC=C(OC)C=C2S1 MHOFGBJTSNWTDT-UHFFFAOYSA-M 0.000 description 1
- 241000396922 Pontia daplidice Species 0.000 description 1
- BQCADISMDOOEFD-UHFFFAOYSA-N Silver Chemical compound [Ag] BQCADISMDOOEFD-UHFFFAOYSA-N 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000001421 changed effect Effects 0.000 description 1
- 230000001149 cognitive effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000001795 light effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
- 229910052709 silver Inorganic materials 0.000 description 1
- 239000004332 silver Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/105—Controlling the light source in response to determined parameters
- H05B47/11—Controlling the light source in response to determined parameters by determining the brightness or colour temperature of ambient light
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B45/00—Circuit arrangements for operating light-emitting diodes [LED]
- H05B45/20—Controlling the colour of the light
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Apparatus For Radiation Diagnosis (AREA)
- Closed-Circuit Television Systems (AREA)
Abstract
이미지 보정 방법 및 장치가 개시된다. 이미지 보정 장치는 혼합 조명에 의한 컬러 캐스트를 나타내는 조명 맵을 뉴럴 네트워크 모델에 기초하여 생성하고, 조명 맵을 이용하여 이미지에서 컬러 캐스트를 제거할 수 있다.An image correction method and apparatus are disclosed. The image correction device may generate a lighting map representing a color cast due to mixed lighting based on a neural network model and remove the color cast from the image using the lighting map.
Description
아래 실시예들은 이미지 보정 기술에 관한 것이다.The embodiments below relate to image correction technology.
화이트 밸런싱(White balance, WB)에서, 조명에 의한 컬러 캐스트(color cast)를 제거하기 위해, 장면(scene)에서 조명(illumination)의 색상을 추정하는 것이 중요하다. 화이트 밸런싱은 사람의 시각 시스템(visual system)에서 색채 항등성(color constancy)를 모사(imitate)하는 것으로서, 시각적으로 만족스러운 촬영을 위한 인카메라 이미징 파이프라인(imaging pipeline)의 코어 요소 중 하나이다. 화이트 밸런싱, 또는 계산적 색채 항등성(computational color constancy)은 컴퓨터 비전(computer vision)에서 오랫동안 다뤄져 왔다.In white balancing (WB), it is important to estimate the color of illumination in a scene to remove color casts caused by lighting. White balancing imitates color constancy in the human visual system and is one of the core elements of the in-camera imaging pipeline for visually satisfying shooting. White balancing, or computational color constancy, has been dealt with in computer vision for a long time.
위에서 설명한 배경기술은 발명자가 본원의 개시 내용을 도출하는 과정에서 보유하거나 습득한 것으로서, 반드시 본 출원 전에 일반 공중에 공개된 공지기술이라고 할 수는 없다.The background technology described above is possessed or acquired by the inventor in the process of deriving the disclosure of the present application, and cannot necessarily be said to be known technology disclosed to the general public before this application.
일 실시예에 따른 프로세서로 구현되는 이미지 보정 방법은, 획득된 입력 이미지의 각 픽셀(pixel)에 대해 하나 이상의 광원(illuminant)의 색도(chromaticity)가 개별적으로(individually) 미치는(affect) 컬러 캐스트(color cast)를 나타내는 조명 값(illumination value)을 포함하는 조명 맵(illumination map)을, 뉴럴 네트워크 모델에 기초하여 상기 획득된 입력 이미지로부터 생성하는 단계; 및 상기 생성된 조명 맵을 이용하여 상기 입력 이미지로부터 적어도 일부 컬러 캐스트를 제거함으로써 출력 이미지를 생성하는 단계를 포함할 수 있다.An image correction method implemented with a processor according to an embodiment includes a color cast (color cast) in which the chromaticity of one or more illuminants individually affects each pixel of an acquired input image. generating an illumination map including illumination values representing a color cast from the obtained input image based on a neural network model; and generating an output image by removing at least some color cast from the input image using the generated illumination map.
상기 조명 맵을 생성하는 단계는, 적어도 한 픽셀에 대해 복수의 광원들 중 한 광원의 색도에 대응하는 부분 조명 벡터 및 다른 광원의 색도에 대응하는 부분 조명 벡터가 혼합된(mixed) 조명 벡터를 갖는 상기 조명 맵을 생성하는 단계를 포함할 수 있다.The step of generating the illumination map includes, for at least one pixel, having an illumination vector in which a partial illumination vector corresponding to the chromaticity of one light source among a plurality of light sources and a partial illumination vector corresponding to the chromaticity of the other light source are mixed. It may include generating the lighting map.
상기 조명 맵에서 한 픽셀에 영향을 미치는 복수의 광원들의 색도의 혼합 계수(mixture coefficient)는 다른 픽셀에 영향을 미치는 상기 복수의 광원들의 색도의 혼합 계수와 다를 수 있다.In the illumination map, a mixture coefficient of chromaticities of a plurality of light sources affecting one pixel may be different from a mixing coefficient of chromaticities of the plurality of light sources affecting another pixel.
상기 출력 이미지를 생성하는 단계는, 상기 입력 이미지에 대하여 상기 조명 맵을 엘리먼트 별 연산(element-wise operation)으로 적용함으로써 상기 출력 이미지를 생성하는 단계를 포함할 수 있다.Generating the output image may include generating the output image by applying the illumination map to the input image through an element-wise operation.
상기 출력 이미지를 생성하는 단계는, 상기 입력 이미지의 각 픽셀의 픽셀 값을 상기 조명 맵의 조명 값들 중 해당 픽셀의 픽셀 위치에 대응하는 조명 값으로 나누는(divide) 단계를 포함할 수 있다.Generating the output image may include dividing the pixel value of each pixel of the input image by an illumination value corresponding to the pixel position of the pixel among the illumination values of the illumination map.
상기 출력 이미지를 생성하는 단계는, 화이트 밸런싱된(white-balanced) 이미지를 생성하는 단계를 포함할 수 있다.Generating the output image may include generating a white-balanced image.
이미지 보정 방법은 상기 조명 맵을 복수의 광원들 별로 분해(decompose)함으로써 각 광원에 대응하는 색도 정보(chromaticity) 및 해당 광원의 혼합 계수 맵(mixture coefficient map)을 결정하는 단계; 및 상기 복수의 광원들 중 일부 광원에 대응하는 색도 정보를 보존하고 나머지 광원에 대응하는 색도 정보를 백색 정보로 변경하여 혼합 계수 맵과 함께 상기 출력 이미지에 적용함으로써 부분적으로 화이트 밸런싱된 이미지를 출력하는 단계를 더 포함할 수 있다.The image correction method includes determining chromaticity information corresponding to each light source and a mixture coefficient map of the light source by decomposing the illumination map into a plurality of light sources; and outputting a partially white-balanced image by preserving chromaticity information corresponding to some of the light sources among the plurality of light sources, changing chromaticity information corresponding to the remaining light sources into white information, and applying it to the output image along with a blending coefficient map. Additional steps may be included.
상기 부분적으로 화이트 밸런싱된 이미지를 출력하는 단계는, 상기 일부 광원에 의한 컬러 캐스트를 보존하는 상기 부분적으로 화이트밸런싱된 이미지를 출력하는 단계를 포함할 수 있다.Outputting the partially white-balanced image may include outputting the partially white-balanced image while preserving the color cast caused by the partial light source.
상기 부분적으로 화이트 밸런싱된 이미지를 출력하는 단계는, 상기 일부 광원에 대응하는 색도 정보 및 해당 혼합 계수 맵을 이용하여 상기 일부 광원에 대응하는 부분 조명 맵을 생성하는 단계; 상기 나머지 광원에 대응하는 상기 백색 정보 및 해당 혼합 계수 맵을 이용하여 상기 나머지 광원에 대응하는 나머지 조명 맵을 생성하는 단계; 상기 부분 조명 맵 및 상기 나머지 조명 맵을 합산하여 재조명 맵을 생성하는 단계; 및 상기 출력 이미지의 각 픽셀의 픽셀 값에 상기 재조명 맵의 재조명 값들 중 해당 픽셀의 픽셀 위치에 대응하는 재조명 값을 곱(multiply)하는 단계를 포함할 수 있다.The step of outputting the partially white balanced image may include generating a partial illumination map corresponding to the partial light source using chromaticity information corresponding to the partial light source and a corresponding blending coefficient map; generating a remaining illumination map corresponding to the remaining light source using the white information and a corresponding mixing coefficient map corresponding to the remaining light source; generating a re-illumination map by adding the partial illumination map and the remaining illumination map; and multiplying the pixel value of each pixel of the output image by a relighting value corresponding to the pixel position of the corresponding pixel among the relighting values of the relighting map.
상기 조명 맵을 생성하는 단계는, 상기 획득된 입력 이미지에 상기 뉴럴 네트워크 모델을 적용함으로써, 광원 별 색도 정보 및 해당 광원의 혼합 계수 맵을 추출하는 단계; 및 상기 색도 정보 및 상기 혼합 계수 맵에 기초하여 상기 조명 맵을 생성하는 단계를 포함할 수 있다.Generating the illumination map includes extracting chromaticity information for each light source and a mixing coefficient map of the corresponding light source by applying the neural network model to the obtained input image; and generating the lighting map based on the chromaticity information and the mixing coefficient map.
상기 조명 맵을 생성하는 단계는, 복수의 광원들 중 각 광원의 색도 정보 및 해당 광원의 혼합 계수 맵을 곱(multiply)하여 부분 조명 맵을 산출하는 단계; 및 상기 복수의 광원들의 부분 조명 맵을 합산함으로써 상기 조명 맵을 생성하는 단계를 포함할 수 있다.Generating the illumination map includes calculating a partial illumination map by multiplying the chromaticity information of each light source among a plurality of light sources and the mixing coefficient map of the corresponding light source; and generating the illumination map by summing partial illumination maps of the plurality of light sources.
상기 출력 이미지를 생성하는 단계는, 복수의 광원들 중 대상 광원에 대응하는 색도 정보를 결정하는 단계; 상기 결정된 색도 정보 및 상기 혼합 계수 맵을 곱함으로써 상기 대상 광원에 대한 부분 조명 맵을 산출하는 단계; 상기 대상 광원에 대한 부분 조명 맵 및 나머지 광원에 대한 나머지 조명 맵을 합산하여 재조명 맵을 생성하는 단계; 및 상기 재조명 맵을 상기 출력 이미지에 적용함으로써 상기 대상 광원에 의한 컬러 캐스트를 적어도 일부 보존하는 부분적으로 화이트 밸런싱된 재조명된 이미지를 출력하는 단계를 포함할 수 있다.Generating the output image may include determining chromaticity information corresponding to a target light source among a plurality of light sources; calculating a partial illumination map for the target light source by multiplying the determined chromaticity information and the mixing coefficient map; generating a relighting map by summing the partial illumination map for the target light source and the remaining illumination map for the remaining light sources; and outputting a partially white balanced re-illuminated image that preserves at least some color cast by the target light source by applying the re-lighting map to the output image.
상기 색도 정보를 조정하는 단계는, 복수의 광원들 중 나머지 광원에 대응하는 색도 정보를 백색 정보로 변경하는 단계를 포함할 수 있다.The step of adjusting the chromaticity information may include changing chromaticity information corresponding to the remaining light sources among the plurality of light sources into white information.
이미지 보정 방법은 한 픽셀에 대해 복수의 광원들 별로 산출된 혼합 계수의 합이 기준 값이 되도록, 상기 복수의 광원들 별로 혼합 계수 맵을 결정하는 단계; 상기 복수의 광원들 별 색도 정보 및 해당하는 혼합 계수 맵에 기초하여 각 광원에 대응하는 부분 조명 맵을 산출하는 단계; 및 상기 산출된 부분 조명 맵을 상기 입력 이미지 및 상기 출력 이미지 중 하나에 적용하는 단계를 더 포함할 수 있다.The image correction method includes determining a blending coefficient map for each of the plurality of light sources so that the sum of the blending coefficients calculated for each of the plurality of light sources for one pixel becomes a reference value; calculating a partial illumination map corresponding to each light source based on chromaticity information for each of the plurality of light sources and a corresponding mixing coefficient map; and applying the calculated partial illumination map to one of the input image and the output image.
상기 혼합 계수 맵을 결정하는 단계는, 상기 입력 이미지에 영향을 미치는 광원 색도의 개수를 식별하는 단계; 및 상기 식별된 개수로 상기 혼합 계수 맵을 생성하는 단계를 포함할 수 있다.Determining the blending coefficient map may include identifying a number of light source chromaticities affecting the input image; And it may include generating the mixing coefficient map with the identified number.
상기 광원 색도의 개수를 식별하는 단계는, 상기 광원 색도의 개수를 3개로 고정하는 단계를 포함할 수 있다.The step of identifying the number of light source chromaticities may include fixing the number of light source chromaticities to three.
상기 혼합 계수 맵을 생성하는 단계는, 상기 식별된 개수가 2이상인 경우에 응답하여, 상기 혼합 계수 맵의 생성을 개시하는 단계를 포함할 수 있다.Generating the mixing coefficient map may include initiating generation of the mixing coefficient map in response to the identified number being 2 or more.
상기 혼합 계수 맵을 결정하는 단계는, 상기 복수의 광원들이 두 개의 광원들인 경우, 상기 두 개의 광원들 중 한 광원에 대한 혼합 계수 맵을 추정하는 단계; 및 픽셀 별로 기준 값으로부터 상기 혼합 계수 맵의 각 혼합 계수를 차감함으로써 나머지 광원에 대한 혼합 계수 맵을 산출하는 단계를 포함할 수 있다.Determining the mixing coefficient map may include, when the plurality of light sources are two light sources, estimating a mixing coefficient map for one of the two light sources; and calculating a blending coefficient map for the remaining light sources by subtracting each blending coefficient of the blending coefficient map from a reference value for each pixel.
일 실시예에 따른 이미지 보정 장치는, 입력 이미지를 획득하는 이미지 센서; 상기 획득된 입력 이미지의 각 픽셀(pixel)에 대해 하나 이상의 광원(illuminant)의 색도(chromaticity)가 개별적으로(individually) 미치는(affect) 컬러 캐스트(color cast)를 나타내는 조명 값(illumination value)을 포함하는 조명 맵(illumination map)을, 뉴럴 네트워크 모델에 기초하여 상기 획득된 입력 이미지로부터 생성하고, 상기 생성된 조명 맵을 이용하여 상기 입력 이미지로부터 적어도 일부 컬러 캐스트를 제거함으로써 출력 이미지를 생성하는 프로세서; 및 상기 생성된 출력 이미지를 표시하는 디스플레이를 포함할 수 있다.An image correction device according to an embodiment includes an image sensor that acquires an input image; Contains an illumination value indicating the color cast that the chromaticity of one or more illuminants individually affects for each pixel of the obtained input image. a processor that generates an illumination map from the obtained input image based on a neural network model, and generates an output image by removing at least some color casts from the input image using the generated illumination map; and a display that displays the generated output image.
도 1은 일 실시예에 따른 이미지 보정 방법을 설명하는 흐름도이다.
도 2는 일 실시예에 따른 뉴럴 네트워크에 기초한 화이트 밸런싱 동작을 설명하는 도면이다.
도 3은 일 실시예에 따른 화이트 밸런스 이미지로부터 재조명된(relighted) 이미지를 출력하는 동작을 설명하는 도면이다.
도 4 및 도 5는 일 실시예에 따른 색도 정보, 혼합 계수 정보, 및 조명 맵을 이용한 화이트 밸런싱 동작을 설명하는 도면이다.
도 6은 일 실시예에 따른 화이트 밸런싱 동작을 설명하는 흐름도이다.
도 7은 일 실시예에 따른 일부 광원에 의한 조명 성분을 보존하는 예시적인 동작을 설명하는 도면이다.
도 8 및 도 9은 일 실시예에 따른 뉴럴 네트워크의 트레이닝을 위한 트레이닝 데이터의 수집 동작을 설명하는 도면이다.
도 10은 일 실시예에 따른 이미지 보정 장치의 하드웨어 구현의 예를 도시한 도면이다.1 is a flowchart explaining an image correction method according to an embodiment.
FIG. 2 is a diagram illustrating a white balancing operation based on a neural network according to an embodiment.
FIG. 3 is a diagram illustrating an operation of outputting a relighted image from a white balance image according to an embodiment.
Figures 4 and 5 are diagrams illustrating a white balancing operation using chromaticity information, mixing coefficient information, and lighting map according to an embodiment.
Figure 6 is a flowchart explaining a white balancing operation according to one embodiment.
FIG. 7 is a diagram illustrating an example operation of preserving lighting components by some light sources according to an embodiment.
FIGS. 8 and 9 are diagrams illustrating an operation of collecting training data for training a neural network according to an embodiment.
FIG. 10 is a diagram illustrating an example of hardware implementation of an image correction device according to an embodiment.
실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 구현될 수 있다. 따라서, 실제 구현되는 형태는 개시된 특정 실시예로만 한정되는 것이 아니며, 본 명세서의 범위는 실시예들로 설명한 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of the embodiments are disclosed for illustrative purposes only and may be changed and implemented in various forms. Accordingly, the actual implementation form is not limited to the specific disclosed embodiments, and the scope of the present specification includes changes, equivalents, or substitutes included in the technical idea described in the embodiments.
제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Terms such as first or second may be used to describe various components, but these terms should be interpreted only for the purpose of distinguishing one component from another component. For example, a first component may be named a second component, and similarly, the second component may also be named a first component.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다.When a component is referred to as being “connected” to another component, it should be understood that it may be directly connected or connected to the other component, but that other components may exist in between.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설명된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as “comprise” or “have” are intended to designate the presence of the described features, numbers, steps, operations, components, parts, or combinations thereof, and are intended to indicate the presence of one or more other features or numbers, It should be understood that this does not exclude in advance the possibility of the presence or addition of steps, operations, components, parts, or combinations thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the art. Terms as defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings they have in the context of the related technology, and unless clearly defined in this specification, should not be interpreted in an idealized or overly formal sense. No.
이하, 실시예들을 첨부된 도면들을 참조하여 상세하게 설명한다. 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고, 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments will be described in detail with reference to the attached drawings. In the description with reference to the accompanying drawings, identical components will be assigned the same reference numerals regardless of the reference numerals, and overlapping descriptions thereof will be omitted.
인간의 인지적 특성으로 흰색 채도의 물체가 채도를 갖는 광원(illuminant)(예를 들어, 백열등)에 의한 조명으로 인해, 카메라 센서 및/또는 이미지 센서가 해당 물체를 흰색 이외의 다른 색상(예를 들어, 노르스름한 색상(Yellowish color))으로 센싱할 수 있다. 화이트 밸런싱은 흰색 채도를 갖는 물체를 사람이 흰색으로 인지하는 현상을 이미징(imaging)에서 재현하기 위한 동작으로서, 이미지 전체에 광원의 색도로 인한 컬러 캐스트를 제거함으로써 색상 왜곡을 보정하는 동작을 나타낼 수 있다. 아래에서 설명하는 바와 같이, 일 실시예에 따른 이미지 보정 방법은 다중 조명(multi illumination) 환경에서의 화이트 밸런싱(white balancing)을 수행하기 위한 것으로서, 뉴럴 네트워크 모델에 기초하여 입력 이미지를 화이트 밸런스 이미지로 변환할 수 있다.Due to human cognitive characteristics, when an object with white saturation is illuminated by an illuminant with high saturation (e.g., an incandescent light), the camera sensor and/or image sensor detects the object in a color other than white (e.g., an illuminant). For example, it can be sensed as a yellowish color. White balancing is an operation to reproduce the phenomenon in imaging where a person perceives an object with white saturation as white. It can represent the operation of correcting color distortion by removing the color cast due to the chromaticity of the light source throughout the image. there is. As described below, an image correction method according to an embodiment is for performing white balancing in a multi illumination environment, converting an input image into a white balance image based on a neural network model. It can be converted.
도 1은 일 실시예에 따른 이미지 보정 방법을 설명하는 흐름도이다.1 is a flowchart explaining an image correction method according to an embodiment.
우선, 단계(110)에서 이미지 보정 장치는 획득된 입력 이미지의 각 픽셀(pixel)에 대해 하나 이상의 광원들(illuminant)의 색도(chromaticity)가 개별적으로(individually) 미치는(affect) 컬러 캐스트(color cast)를 나타내는 조명 값(illumination value)을 포함하는 조명 맵(illumination map)을, 뉴럴 네트워크 모델에 기초하여 획득된 입력 이미지로부터 생성할 수 있다. 본 명세서에서는 입력 이미지가 복수의 광원들에 의한 컬러 캐스트를 포함하는 예시를 주로 설명한다. 예를 들어, 이미지 보정 장치는 적어도 한 픽셀에 대해 복수의 광원들 중 한 광원의 색도에 대응하는 부분 조명 벡터 및 다른 광원의 색도에 대응하는 부분 조명 벡터가 혼합된(mixed) 조명 벡터를 갖는 조명 맵을 생성할 수 있다. 다만, 광원이 복수인 것으로 한정하는 것은 아니다.First, in
색도는 광원의 색상에서 밝기를 제외한, 색채를 나타내는 성분일 수 있다. 전술한 바와 같이 복수의 광원들이 존재하는 상황에서 촬영된 입력 이미지에서 각 픽셀에 나타나는 컬러 캐스트가 상이할 수 있다. 예를 들어, 한 픽셀에 복수의 광원들에 의한 조명들(illuminations)이 작용하는 비율이 상이할 수 있고, 해당 픽셀에 나타나는 컬러 캐스트의 색상은 복합적으로 작용하는 조명들에 대응하는 채도들이 혼합된 비율에 의해 결정될 수 있다. 각 픽셀에 한 광원에 의한 조명(illumination) 및 음영(shading)이 미치는(affect) 세기(intensity)의 비율을 혼합 비율(mixture ratio) 또는 혼합 계수(mixture coefficient)라고 나타낼 수 있다. 각 픽셀에 대한 혼합 계수의 집합을 혼합 계수 맵이라고 나타낼 수 있으며, 하기 수학식 5에서 설명한다. 조명 맵은 입력 이미지의 컬러 캐스트를 보정하기 위한 조명 값들을 포함하는 맵으로서, 한 픽셀에 대한 조명 값은 해당 픽셀에 혼합 계수에 따라 혼합된 광원들의 색도들에 따른 컬러 캐스트를 보상하기 위한 값을 나타낼 수 있다. 조명 값은 각 광원의 색도에 대응하는 부분 조명 값이 합산된 값일 수 있으며, 색상 채널의 정의에 따른 색상 채널 별 성분을 가지는 부분 조명 벡터의 포맷으로 표현될 수 도 있다. 조명 맵은 하기 수학식 6에서 상세히 설명한다.Chromaticity may be a component representing the color of the light source, excluding brightness. As described above, the color cast that appears in each pixel may be different in an input image captured in a situation where a plurality of light sources are present. For example, the rate at which illuminations from multiple light sources act on one pixel may be different, and the color of the color cast appearing in that pixel is a mixture of saturations corresponding to the illuminations acting in combination. It can be determined by ratio. The ratio of the intensity of illumination and shading by a light source on each pixel can be expressed as a mixture ratio or mixture coefficient. The set of mixing coefficients for each pixel can be expressed as a mixing coefficient map, which is explained in Equation 5 below. The lighting map is a map containing lighting values for correcting the color cast of the input image. The lighting value for one pixel is a value for compensating for the color cast according to the chromaticities of light sources mixed according to the mixing coefficient for the pixel. It can be expressed. The lighting value may be a sum of partial lighting values corresponding to the chromaticities of each light source, and may be expressed in the format of a partial lighting vector with components for each color channel according to the definition of the color channel. The lighting map is explained in detail in Equation 6 below.
예를 들어, 본 명세서에서 혼합 광원(mixed illuminant) 하에 촬영된 이미지는 아래 수학식 1과 같이 모델링될 수 있다. 혼합 광원은 서로 다른 채도를 갖는 둘 이상의 광원들을 포함할 수 있다.For example, in this specification, an image taken under a mixed illuminant can be modeled as shown in
전술한 수학식 1에서 x는 이미지 I에 포함된 픽셀들 중 한 픽셀의 픽셀 위치로서, 이미지 I 내 좌표(예를 들어, 2차원 좌표)를 나타낼 수 있다. I(x)는 이미지 I의 픽셀 위치 x의 픽셀 값을 나타낼 수 있다. r(x)는 이미지 I에서 픽셀 위치 x의 표면 반사(surface reflectance)를 나타낼 수 있다. 는 이미지 I에서 픽셀 위치 x에 혼합 광원이 미치는 조명(illumination) 및 음영(shading)의 세기를 포함하는 스케일링 텀(scaling term)일 수 있다. 는 N개의 광원들 중 제i 광원이 픽셀 위치 x의 픽셀에 미치는 조명 및 음영의 세기를 나타낼 수 있다. 은 혼합 광원의 색도 정보(chromaticity information)를 나타낼 수 있다. 는 제i 광원의 색도 정보를 나타낼 수 있다. 여기서, i는 1이상 N이하의 정수일 수 있다. 본 명세서에서, 는 엘리먼트 별 곱(element-wise product)을 나타낼 수 있다.In the above-described
일 실시예에 따른 색도 정보는 광원의 색도를 색공간(color space)에 따라 정의되는 색도 벡터(chromaticity vector)를 포함할 수 있다. 예를 들어, 본 명세서에서는 색공간으로서 RGB(Red, Green, Blue) 색공간에서 정의되는 색상 벡터를 주로 설명하며, 기본(primary) 적색 색도(red chromaticity)는 (1,0,0), 기본 녹색 색도(green chromaticity)는 (0,1,0), 기본 청색 색도는 (0,0,1)의 벡터로 각각 표현될 수 있다. 흑색(black) 정보는 (0,0,0), 백색(white) 정보는 (1,1,1)의 벡터로 표현될 수 있다. 일 실시예에 따른 색도 벡터는 G 값이 1이 되도록 정규화될 수 있다. 예를 들어, (R,G,B)=(0.3, 0.7, 0.3)의 벡터에 대해 각 채널의 성분 값을 G값인 0.7로 나눔으로써, 정규화된 색도 벡터는 (0.43, 1, 0.43)이 될 수 있다. 다만, 색도 벡터의 값을 전술한 바로 한정하는 것은 아니고, 하드웨어 구성 및/또는 소프트웨어 구성에 따라 색도 벡터의 각 원소의 값이 달라지거나 정규화 방식이 달라질 수 있다. RGB 색공간이 아닌 HSV(Hue, Saturation, Value) 색공간, CIE(Commission internationale de l'eclairage) 색공간, 및/또는 CMYK(Cyan, Magenta, Yellow, Black) 색공간에 따라 색도 벡터가 정의될 수도 있다. 색도 벡터의 차원은 색공간의 성분(component) 개수에 따라 달라질 수 있는데, 전술한 예시에서 색도 벡터가 3차원으로 설명되었으나, CMYK 색공간과 같이 4개 성분으로 정의되는 색공간에서는 4차원으로 정의될 수 있다.Chromaticity information according to one embodiment may include a chromaticity vector in which the chromaticity of a light source is defined according to a color space. For example, this specification mainly describes color vectors defined in the RGB (Red, Green, Blue) color space as a color space, and the primary red chromaticity is (1,0,0). Green chromaticity can be expressed as a vector of (0,1,0), and basic blue chromaticity can be expressed as a vector of (0,0,1). Black information can be expressed as a vector of (0,0,0), and white information can be expressed as a vector of (1,1,1). The chromaticity vector according to one embodiment may be normalized so that the G value is 1. For example, for a vector of (R,G,B)=(0.3, 0.7, 0.3), by dividing the component value of each channel by the G value of 0.7, the normalized chromaticity vector would be (0.43, 1, 0.43). You can. However, the value of the chromaticity vector is not limited to the above-mentioned value, and the value of each element of the chromaticity vector may vary or the normalization method may vary depending on the hardware configuration and/or software configuration. The chromaticity vector may be defined according to the HSV (Hue, Saturation, Value) color space, CIE (Commission internationale de l'eclairage) color space, and/or CMYK (Cyan, Magenta, Yellow, Black) color space rather than the RGB color space. It may be possible. The dimension of the chromaticity vector may vary depending on the number of components of the color space. In the above example, the chromaticity vector was described as 3-dimensional, but in a color space defined by 4 components, such as the CMYK color space, it is defined as 4-dimensional. It can be.
전술한 수학식 1에서 N은 1이상의 정수일 수 있다. 아래에서 N=2인 예시로서, 제1 광원을 a 광원, 제2 광원을 b 광원으로 설명한다. 다만, N=2로 한정하는 것은 아니다.In
전술한 수학식 2에서 Iab(x)는 광원 a 및 광원 b 하에서 촬영된 이미지 Iab의 픽셀 위치 x에 대응하는 픽셀 값을 나타낼 수 있다. 는 광원 a가 픽셀 위치 x에 미치는 조명 및 음영의 세기, 는 광원 a의 색도 벡터를 나타낼 수 있다. 유사하게, 는 광원 b가 픽셀 위치 x에 미치는 조명 및 음영의 세기, 는 광원 b의 색도 벡터를 나타낼 수 있다. 화이트 밸런싱은 모든 광원들이 표준 색도(canonical chromaticity)를 가지게 보정하는 것으로 해석될 수 있다. 예를 들어, 화이트 밸런싱된 이미지는 하기 수학식 3과 같이 광원 a의 색도 벡터 및 광원 b의 색도 벡터가 모두 1로 보정된 이미지일 수 있다.In
전술한 수학식 3에서 는 화이트 밸런싱된 이미지 의 픽셀 위치 x의 픽셀 값을 나타낼 수 있다. 은 백색을 지시하는 색도 정보(이하, '백색 정보')로서, 예시적으로 (1,1,1)의 색도 벡터일 수 있다. 아래 수학식 4 내지 수학식 6에서는 설명의 편의를 위하여 개별 픽셀의 픽셀 위치를 나타내는 x를 생략하고, 이미지 Iab를 기준으로 설명한다. In the
전술한 수학식 4에 설명된 바와 같이, 입력 이미지 Iab는 화이트 밸런싱된 이미지 에 조명 맵 Lab가 엘리먼트 별 곱(element-wise product)으로 적용된 결과로 해석될 수 있다. 는 광원 a의 혼합 계수 맵을 나타낼 수 있다. 는 광원 b의 혼합 계수 맵을 나타낼 수 있다. 이미지 보정 장치는 복수의 광원들이 두 개의 광원들인 경우, 두 개의 광원들 중 한 광원(예를 들어, 광원 a)에 대한 혼합 계수 맵 을 추정할 수 있다. 이미지 보정 장치는 픽셀 별로 기준 값(예를 들어, 1)으로부터 혼합 계수 맵 의 각 혼합 계수를 차감함으로써 나머지 광원(예를 들어, 광원 b)에 대한 혼합 계수 맵을 산출할 수 있다. 다만, 전술한 수학식 5에서 광원 a 및 광원 b에 대한 혼합 계수 맵을 예로 설명하였으나, N개의 광원들 중 제i 광원에 대한 혼합 계수 맵은 으로 일반화될 수 있다.As described in Equation 4 above, the input image I ab is a white balanced image It can be interpreted as the result of applying the lighting map L ab as an element-wise product. may represent the mixing coefficient map of light source a. may represent the mixing coefficient map of light source b. When the plurality of light sources are two light sources, the image correction device provides a mixing coefficient map for one of the two light sources (for example, light source a). can be estimated. The image correction device produces a blending coefficient map for each pixel from a reference value (e.g., 1). A blending coefficient map for the remaining light source (e.g., light source b) by subtracting each blending coefficient from can be calculated. However, in the above equation 5, the mixing coefficient map for light source a and light source b is explained as an example, but the mixing coefficient map for the ith light source among the N light sources is It can be generalized as:
참고로, Lab(x)는 픽셀 위치 x에 대응하는 조명 벡터로서, 전술한 수학식 6의 조명 맵 Lab은 조명 벡터 Lab(x)의 집합일 수 있다. 조명 벡터 Lab(x)에 포함된 부분 조명 벡터 , 은 각각 광원의 혼합 계수 맵들 , 과 색도 벡터 , 의 곱이므로, 조명 맵 Lab은 색 공간의 정의에 따른 색상 채널 별 조명 채널 맵들의 집합으로도 해석될 수 있다. 예시적으로 픽셀 위치 x에 대한 부분 조명 벡터 은 색도 벡터 중 각 색상 채널(예를 들어, RGB 중 한 채널)에 대응하는 성분 및 픽셀 위치 x의 혼합 계수 의 곱으로서, R 채널에 대응하는 부분 조명 성분, G 채널에 대응하는 부분 조명 성분, 및 B 채널에 대응하는 부분 조명 성분을 개별적으로 포함할 수 있다. 전술한 수학식 6에서 나타난 바와 같이, 조명 맵 Lab에서 각 광원의 혼합 계수 맵들 , , 색도 벡터 , 는 픽셀 별로 공간적으로(spatially) 다른 값을 가질 수 있다. 이미지 보정 장치는 조명 맵 Lab을 뉴럴 네트워크 모델에 기초하여 생성할 수 있다. 예를 들어, 뉴럴 네트워크 모델은 입력 이미지로부터 조명 맵 Lab을 추출하도록 설계 및 트레이닝된 모델일 수 있다. 조명 맵 Lab을 직접 추출하는 뉴럴 네트워크 모델은 하기 도 2에 도시된다. 다른 예를 들어, 뉴럴 네트워크 모델은 입력 이미지로부터 광원 별 색도 정보 및 혼합 계수 맵을 추출하도록 설계 및 트레이닝된 모델일 수 있다. 이미지 보정 장치는 추출된 색도 정보 및 혼합 계수 맵을 이용하여 조명 맵을 산출할 수 있다. 색도 정보 및 혼합 계수 맵을 추출하는 뉴럴 네트워크 모델은 하기 도 4에 도시된다.For reference, L ab (x) is a lighting vector corresponding to the pixel position x, and the lighting map L ab in Equation 6 described above may be a set of lighting vectors L ab (x). The partial illumination vector contained in the illumination vector L ab (x) , are the mixing coefficient maps of each light source. , and chromaticity vector , Since it is a product of , the lighting map L ab can also be interpreted as a set of lighting channel maps for each color channel according to the definition of the color space. Illustratively, the partial illumination vector for pixel position x: silver chromaticity vector Components corresponding to each color channel (e.g., one of RGB) and a mixing coefficient for pixel location x As a product of , it may individually include a partial illumination component corresponding to the R channel, a partial illumination component corresponding to the G channel, and a partial illumination component corresponding to the B channel. As shown in Equation 6 above, the mixing coefficient maps of each light source in the lighting map L ab , , chromaticity vector , may have spatially different values for each pixel. The image correction device may generate the lighting map L ab based on a neural network model. For example, a neural network model may be a model designed and trained to extract a lighting map L ab from an input image. A neural network model that directly extracts the lighting map L ab is shown in Figure 2 below. As another example, a neural network model may be a model designed and trained to extract chromaticity information and mixing coefficient maps for each light source from an input image. The image correction device can calculate a lighting map using the extracted chromaticity information and mixing coefficient map. The neural network model for extracting chromaticity information and mixing coefficient map is shown in Figure 4 below.
그리고 단계(120)에서 이미지 보정 장치는 생성된 조명 맵 Lab을 이용하여 입력 이미지로부터 적어도 일부 컬러 캐스트를 제거함으로써 출력 이미지를 생성할 수 있다. 예를 들어, 이미지 보정 장치는 입력 이미지에 대하여 조명 맵 Lab을 엘리먼트 별 연산(element-wise operation)으로 적용함으로써 출력 이미지를 생성할 수 있다. 이미지 보정 장치는, 하기 수학식 7과 같이, 입력 이미지 Iab 의 각 픽셀의 픽셀 값을 조명 맵 Lab의 조명 값들 중 해당 픽셀의 픽셀 위치에 대응하는 조명 값으로 나눌(divide) 수 있다. 예를 들어, 이미지 보정 장치는 각 픽셀 위치에 대해 색상 채널 별로 조명 벡터에서 해당 색상 채널에 대응하는 성분으로 해당 색상 채널 값을 나눌 수 있다. 본 명세서에서 엘리먼트 별 연산(예를 들어, 엘리먼트 별 곱 및 엘리먼트 별 나누기)은 서로 대응하는 색상 채널들끼리 같은 픽셀 위치에 대응하는 값들 간에 수행될 수 있다. 이미지 보정 장치는 입력 이미지 Iab로부터 화이트 밸런싱된(white-balanced) 이미지를 출력 이미지로서 생성할 수 있다. 하기 수학식 7은 전술한 수학식 6으로부터 도출된 화이트 밸런싱된 이미지 를 나타낼 수 있다.And in
전술한 수학식 7에서 는 엘리먼트 별 나누기(element-wise division)를 나타낼 수 있다.In the aforementioned equation 7, may represent element-wise division.
입력 이미지에 나타나는 장면이 단일 조명 하에 촬영된 것으로 가정될 시, 입력 이미지 전체가 그레이(grey)로 처리, 또는 입력 이미지에서 흰색 채도(white chromaticity)로 추정된 영역에 기초하여 입력 이미지 전체가 단일 조명 채도(illumination chromaticity)로 정규화에 의해 화이트 밸런싱이 수행될 수 있다. 다만, 실제 촬영 환경은 다양한 채도의 광원들(illuminants)이 혼재되므로, 각 광원의 채도에 의한 영향이 장면을 캡쳐한 입력 이미지의 픽셀(Pixel) 별로 복합적으로 작용할 수 있다. 일 실시예에 따른 이미지 보정 방법은 다중 광원에 의한 복합적인 채도 영향을 보상함으로써, 혼합 조명 상황에서도 만족스러운 화이트 밸런싱 결과를 제공할 수 있다. 전술한 바와 같이, 이미지 보정 방법은 서로 다른 채도를 갖는 광원들에 의한 조명을 픽셀 레벨로 달리 적용함으로써, 이미지의 로컬 영역(local region)에 대해 개별적으로 화이트 밸런싱을 수행할 수 있다. 다시 말해, 이미지의 한 픽셀에서 보상되는 컬러 캐스트를 유발한 광원의 색도와 다른 픽셀에서 보상되는 컬러 캐스트를 유발한 광원의 색도가 다르게 결정될 수 있다.When the scene appearing in the input image is assumed to have been shot under a single light, the entire input image is treated as gray, or the entire input image is illuminated with a single light based on the area estimated to have white chromaticity in the input image. White balancing can be performed by normalizing by illumination chromaticity. However, since the actual shooting environment contains a mixture of illuminants of various saturations, the influence of the saturation of each light source may have a complex effect on each pixel of the input image capturing the scene. The image correction method according to one embodiment can provide satisfactory white balancing results even in mixed lighting situations by compensating for the complex saturation effect caused by multiple light sources. As described above, the image correction method can individually perform white balancing on local regions of the image by applying different illumination from light sources with different saturations at the pixel level. In other words, the chromaticity of the light source causing the color cast compensated for in one pixel of the image may be determined differently from the chromaticity of the light source causing the color cast compensated for in another pixel.
예를 들어, 야외 사진은 노란색 태양광 및 파란색 하늘과 같은 2개의 광원에 의해 유발되는 컬러 캐스트를 픽셀 별로 다르게 포함할 수 있고, 실내 사진도 자연광, 실내 전등, 및 플래시 외부 광과 같은 3개의 광원에 의해 유발되는 컬러 캐스트를 픽셀 별로 다르게 포함할 수 있다. 일 실시예에 따른 이미지 보정 방법은 다양한 색도의 광원들에 의한 컬러 캐스트의 혼합 비율(mixture ratio)이 픽셀 별로 상이한 이미지를 각 픽셀에 최적화되어 결정된 조명 값을 이용하여 보정함으로써 화이트 밸런싱을 수행할 수 있다.For example, an outdoor photo may have a different pixel-by-pixel color cast caused by two light sources, such as yellow sunlight and a blue sky, while an indoor photo may have a different color cast caused by three light sources, such as natural light, indoor lighting, and external flash light. The color cast caused by can be included differently for each pixel. An image correction method according to an embodiment can perform white balancing by correcting images in which the mixture ratio of color casts by light sources of various chromaticities is different for each pixel using lighting values determined to be optimized for each pixel. there is.
도 2는 일 실시예에 따른 뉴럴 네트워크에 기초한 화이트 밸런싱 동작을 설명하는 도면이다.FIG. 2 is a diagram illustrating a white balancing operation based on a neural network according to an embodiment.
일 실시예에 따른 이미지 보정 장치는 입력 이미지(201)로부터 뉴럴 네트워크 모델(210)에 기초하여 조명 맵(230)을 산출할 수 있다.The image correction device according to one embodiment may calculate the
입력 이미지(201)는 색 공간에 따른 채널 이미지를 포함할 수 있다. 예를 들어, RGB 이미지는 적색 채널 이미지, 녹색 채널 이미지, 및 청색 채널 이미지를 포함할 수 있다. 다른 예를 들어, YUV 이미지 및 HSV 이미지도 각각 대응하는 채널 이미지를 포함할 수 있다. 입력 이미지(201)의 해상도는 제한이 없으며, Full HD(High Definition) 해상도 및 4K 해상도 이미지일 수 있다.The
뉴럴 네트워크 모델(210)은 입력 이미지(201)와 동일한 해상도로 조명 맵(230)을 출력하도록 설계된 기계 학습 모델을 나타낼 수 있다. 조명 맵(230)은 픽셀 위치 별로 컬러 캐스트를 보상하기 위한 조명 값들(예를 들어, 조명 벡터들)을 포함할 수 있다. 기계 학습 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 뉴럴 네트워크 모델이 수행되는 이미지 보정 장치 자체에서 수행될 수 있고, 별도의 서버를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 뉴럴 네트워크 모델은, 복수의 인공 뉴럴 네트워크 레이어들을 포함할 수 있다. 뉴럴 네트워 모델은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks), U-넷(U-net) 또는 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 뉴럴 네트워크 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다. 도 2에 도시된 예시에서 이미지 보정 장치는 입력 이미지(201)를 뉴럴 네트워크 모델(210)에 입력하여 전파시킴으로써 조명 맵(230)을 추출할 수 있다.The
뉴럴 네트워크 모델(210)은 L1, L2, 및 SSIM(Structural similarity)와 같은 손실에 기초하여 트레이닝될 수 있다. 트레이닝 장치는 뉴럴 네트워크 모델(210)에 트레이닝 입력을 전파시켜 산출된 임시 출력 및 트레이닝 출력 간에 전술한 손실을 산출하고, 손실이 최소화되도록 뉴럴 네트워크 모델(210)의 파라미터(예를 들어, 연결 가중치)를 업데이트할 수 있다. 뉴럴 네트워크 모델(210)의 트레이닝을 위해, 다중 조명 환경에서 촬영된 이미지에 대해 해당 이미지의 참값(ground truth) 조명 맵, 픽셀 레벨로 화이트 밸런싱된 이미지 중 적어도 하나를 포함하는 트레이닝 데이터가 요구될 수 있다. 트레이닝 데이터는 하기 도 8 및 도 9에서 설명한다.The
이미지 보정 장치는 입력 이미지(201)와 동일한 크기 및 해상도의 조명 맵(230)을 추정할 수 있고, 조명 맵(230)을 입력 이미지(201)에 엘리먼트 별 나누기(280)로 적용함으로써 동일한 크기 및 해상도의 화이트 밸런싱된 출력 이미지(208)를 출력할 수 있다.The image correction device can estimate a
도 3은 일 실시예에 따른 화이트 밸런스 이미지로부터 재조명된(relighted) 이미지를 출력하는 동작을 설명하는 도면이다.FIG. 3 is a diagram illustrating an operation of outputting a relighted image from a white balance image according to an embodiment.
일 실시예에 따른 이미지 보정 장치는 도 2에 도시된 동작에 더하여 분해 동작(340)를 수행할 수 있다.The image correction device according to one embodiment may perform a
예를 들어, 이미지 보정 장치는 조명 맵(230)을 복수의 광원들 별로 분해(decompose)함으로써 각 광원에 대응하는 색도 정보(chromaticity)(351) 및 해당 광원의 혼합 계수 맵(mixture coefficient map)(352)을 결정할 수 있다. 이미지 보정 장치는 PCA(Principal component analysis)을 통해 복수의 광원들 별로 조명 맵(230)을 분해할 수 있다. 조명 맵(230)에서 한 픽셀에 영향을 미치는 복수의 광원들의 색도의 혼합 계수(mixture coefficient)는 다른 픽셀에 영향을 미치는 복수의 광원들의 색도의 혼합 계수와 다를 수 있다.For example, the image correction device decomposes the
이미지 보정 장치는 복수의 광원들 중 일부 광원에 대응하는 색도 정보(351)를 보존하고 나머지 광원에 대응하는 색도 정보를 변경하여 혼합 계수 맵(352)과 함께 출력 이미지(208)에 추가 적용함으로써 부분적으로 화이트 밸런싱된 이미지(309)를 출력할 수 있다. 예를 들어, 이미지 보정 장치는 일부 광원에 대응하는 색도 정보(351) 및 혼합 계수 맵(352)을 이용하여 일부 광원에 대응하는 대상 부분 조명 맵을 생성할 수 있다. 이미지 보정 장치는 나머지 광원에 대응하는 색도 정보를 백색 정보로 변경하고, 백색 정보 및 혼합 계수 맵(352)을 이용하여 나머지 광원에 대응하는 나머지 조명 맵을 생성할 수 있다. 나머지 조명 맵은 나머지 광원의 색도를 백색으로 치환하였으므로, 나머지 광원에 의한 컬러 캐스트가 제거된 부분 조명 맵일 수 있다. 이미지 보정 장치는 대상 부분 조명 맵 및 나머지 조명 맵을 합산하여 재조명 맵(relighting map)을 생성할 수 있다. 재조명 맵은 화이트 밸런싱된 이미지에서 일부 광원의 색도에 따른 컬러 캐스트 효과를 부가하여 재조명하는 재조명 값들을 포함하는 맵일 수 있다. 이미지 보정 장치는 출력 이미지(208)의 각 픽셀의 픽셀 값에 재조명 맵의 재조명 값들 중 해당 픽셀의 픽셀 위치에 대응하는 재조명 값을 곱(multiply)함으로써 엘리먼트 별 곱(390)을 적용할 수 있다. 부분적으로 화이트 밸런싱된 이미지(309)는 화이트 밸런싱된 이미지에 대상 광원에 의한 컬러 캐스트가 부가된 이미지일 수 있다. 따라서, 이미지 보정 장치는 일부 광원에 의한 컬러 캐스트를 보존하는 부분적으로 화이트밸런싱된 이미지(309)를 출력할 수 있다.The image correction device preserves the
도 3에 도시된 기계 학습 구조에서는 도 2에서 전술한 손실 외에, 색상 채널에 대한 코사인 유사도(Cosine Similarity)가 추가적으로 손실에 더 포함될 수도 있다.In the machine learning structure shown in FIG. 3, in addition to the loss described above in FIG. 2, cosine similarity for the color channel may be additionally included in the loss.
도 3에서는 조명 맵을 추출한 후 색도 정보 및 혼합 계수 맵이 생성되는 예시를 설명하였으나, 아래에서는 조명 맵을 생성하기 전 색도 정보 및 혼합 계수 맵이 추출되는 예시를 설명한다.In FIG. 3, an example in which chromaticity information and a mixing coefficient map are generated after extracting a lighting map is described. However, an example in which chromaticity information and a mixing coefficient map are extracted before generating a lighting map is described below.
도 4 및 도 5는 일 실시예에 따른 색도 정보, 혼합 계수 정보, 및 조명 맵을 이용한 화이트 밸런싱 동작을 설명하는 도면이다.Figures 4 and 5 are diagrams illustrating a white balancing operation using chromaticity information, mixing coefficient information, and lighting map according to an embodiment.
일 실시예에 따른 이미지 보정 장치는 획득된 입력 이미지(201)에 뉴럴 네트워크 모델(410)을 적용함으로써, 광원 별 색도 정보(421) 및 해당 광원의 혼합 계수 맵(422)을 추출할 수 있다. 예를 들어, 뉴럴 네트워크 모델(410)은 입력 이미지(201)로부터 광원 별 색도 정보(421) 및 혼합 계수 맵(422)을 출력하도록 설계 및 트레이닝된 모델일 수 있다.An image correction device according to an embodiment may extract chromaticity information for each
예를 들어, 이미지 보정 장치는 색도 정보 및 혼합 계수 맵에 기초하여, 예를 들어, 선형 보간(linear interpolation)으로, 조명 맵을 생성할 수 있다. 예를 들어, 이미지 보정 장치는 복수의 광원들 중 각 광원의 색도 정보 및 해당 광원의 혼합 계수 맵을 곱(multiply)하여 부분 조명 맵을 산출할 수 있다. 이미지 보정 장치는 복수의 광원들의 부분 조명 맵을 합산함으로써 조명 맵(430)을 생성할 수 있다. 여기서, 이미지 보정 장치는, 광원의 색도 정보(421)에 대한 변경 없이 합산된 조명 맵(430)을 입력 이미지(201)에 엘리먼트 별 나누기(480)로 적용함으로써 화이트 밸런싱된 출력 이미지(408)를 생성할 수 있다.For example, an image correction device may generate an illumination map based on chromaticity information and a mixing coefficient map, for example, by linear interpolation. For example, the image correction device may calculate a partial illumination map by multiplying the chromaticity information of each light source among a plurality of light sources and the mixing coefficient map of the corresponding light source. The image correction device may generate the
또한, 이미지 보정 장치는 전술한 화이트 밸런싱된 출력 이미지(408)에 재조명 맵을 추가 적용함으로써 컬러 캐스트를 적어도 일부 보존하는 부분적으로 화이트 밸런싱된 이미지 및/또는 입력 이미지(201)에서 일부 광원에 의한 조명 효과가 변경된 이미지를 출력할 수 있다. Additionally, the image correction device may further apply a re-illumination map to the above-described white
예를 들어, 이미지 보정 장치는 대상 광원에 대응하는 색도 정보(421)를 결정할 수 있다. 예를 들어, 이미지 보정 장치는 대상 광원에 대응하는 색도 정보(421)를 원본 색도 벡터(original chromaticity vector)로 유지할 수 있다. 한 광원에 대한 원본 색도 벡터는 뉴럴 네트워크 모델(410)에 기초하여 추출된 해당 광원에 대한 색도 벡터를 나타낼 수 있다. 이미지 보정 장치는 유지된 색도 정보(421) 및 혼합 계수 맵(422)을 곱함으로써 대상 광원에 대한 부분 조명 맵을 산출할 수 있다. 예를 들어, 이미지 보정 장치는 원본 색도 벡터를 가지는 대상 광원의 색도 정보(421) 및 혼합 계수 맵(422) 간의 곱으로부터 산출된 대상 광원에 대한 부분 조명 맵을 산출할 수 있다. 이미지 보정 장치는 대상 광원에 대한 부분 조명 맵 및 나머지 광원에 대한 나머지 조명 맵을 합산하여 재조명 맵을 생성할 수 있다. 여기서, 이미지 보정 장치는 나머지 광원에 대응하는 색도 정보를 백색 정보(예를 들어, (1,1,1) 벡터)로 변경함으로써, 나머지 광원에 의한 컬러 캐스트가 배제된 재조명 맵을 생성할 수 있다. 이미지 보정 장치는 재조명 맵을 출력 이미지(408)에 엘리먼트 별 곱(element-wise product)으로 적용함으로써 대상 광원에 의한 컬러 캐스트를 적어도 일부 보존하는 부분적으로 화이트 밸런싱된 재조명된 이미지를 생성할 수 있다. 따라서, 이미지 보정 장치는 재조명 맵을 통해 입력 이미지(201)에서 나머지 광원에 의한 컬러 캐스트를 제거하고, 대상 광원에 의한 컬러 캐스트를 보존하는 부분적으로 화이트 밸런싱된 재조명된 이미지를 출력할 수 있다. 다만, 재조명 맵의 생성을 전술한 바로 한정하는 것은 아니다.For example, the image correction device may determine
다른 예를 들어, 이미지 보정 장치는 복수의 광원들 중 대상 광원에 대응하는 색도 정보를 대상 색도 벡터(target chromaticity vector)로 변경할 수 있다. 대상 색도 벡터는 사용자가 변경하길 원하는 색도를 지시하는 벡터일 수 있다. 이미지 보정 장치는 결정된 대상 색도 벡터 및 혼합 계수 맵(422)을 곱함으로써 대상 광원에 대해 대상 색도를 갖는 부분 조명 맵을 산출할 수 있다. 이미지 보정 장치는 대상 광원에 대한 부분 조명 맵 및 나머지 광원에 대한 나머지 조명 맵을 합산하여 재조명 맵을 생성할 수 있다. 예시적으로, 나머지 광원에 대한 색도 정보가 유지되는 경우, 이미지 보정 장치는 재조명 맵을 출력 이미지(408)에 엘리먼트 별 곱에 기초하여 적용함으로써 원본 입력 이미지(201)에서 대상 광원에 의한 조명 효과만 대상 색도로 변경된 이미지를 출력할 수 있다. 다른 예시에 따르면 이미지 보정 장치는 나머지 광원에 대한 색도 정보를 백색 정보로 변경할 수 있고, 대상 색도 벡터에 기초한 부분 조명 맵 및 백색 정보에 기초한 나머지 조명 맵을 합산하여 재조명 맵을 생성할 수 있다. 이 경우, 이미지 보정 장치는 재조명 맵을 출력 이미지(408)에 엘리먼트 별 곱에 기초하여 적용함으로써 화이트 밸런싱된 출력 이미지(408)에 대상 색도를 갖는 대상 광원에 의한 조명 효과만 부가된 부분적으로 화이트 밸런싱된 이미지를 출력할 수 있다.For another example, the image correction device may change chromaticity information corresponding to a target light source among a plurality of light sources into a target chromaticity vector. The target chromaticity vector may be a vector indicating the chromaticity that the user wants to change. The image correction device may calculate a partial illumination map having a target chromaticity for the target light source by multiplying the determined target chromaticity vector and the mixing
참고로, 이미지 보정 장치는 한 픽셀에 대해 복수의 광원들 별로 산출된 혼합 계수의 합이 기준 값(예를 들어, 1)이 되도록, 복수의 광원들 별로 혼합 계수 맵(422)을 결정할 수 있다. 예를 들어, 복수의 광원들의 혼합 계수 맵들에서 같은 픽셀 위치에 대응하는 값들의 합이 기준 값일 수 있다. 따라서, 혼합 계수 맵들의 합산이 기준 값으로 일정하므로 보정 과정에서 밝기에 변화가 없는 바, 일 실시예에 따른 이미지 보정 장치는 이미지의 밝기는 유지한 채로 광원의 색도에 의한 컬러 캐스트만 효과적으로 제거할 수 있다. 이미지 보정 장치는 복수의 광원들 별 색도 정보(421) 및 해당하는 혼합 계수 맵(422)에 기초하여 각 광원에 대응하는 부분 조명 맵을 산출할 수 있다. 이미지 보정 장치는 산출된 부분 조명 맵을 입력 이미지(201) 및 도 3의 출력 이미지(208) 중 하나에 적용할 수 있다.For reference, the image correction device may determine the blending
도 4에서는 N개(예를 들어, N=3)의 광원들에 대해 N개의 색도 정보(421) 및 N개의 혼합 계수 맵(422)이 추출될 수 있다. 일 실시예에 따르면, 이미지 보정 장치는 복수의 광원들의 개수 별로 뉴럴 네트워크 모델(410)을 저장할 수 있다. 이미지 보정 장치는 입력 이미지(201)로부터 광원의 개수를 식별하고, 식별된 개수에 대응하는 뉴럴 네트워크 모델(410)을 로딩할 수 있다. 이미지 보정 장치는 로딩된 뉴럴 네트워크 모델(410)에 기초하여, 식별된 광원의 개수에 대응하는 색도 정보(421) 및 혼합 계수 맵(422)을 추출할 수 있다.In FIG. 4 ,
도 5는 예시적인 적용 결과를 설명한다. 이미지 보정 장치는 입력 이미지(501)로부터 뉴럴 네트워크 모델에 기초하여 제1 색도 정보(521a) 및 제1 혼합 계수 맵(522a)을 추출하고, 제2 색도 정보(521b) 및 제2 혼합 계수 맵(522b)도 추출할 수 있다. 입력 이미지(501)는 창문을 통한 외광 (Illuminant #1)과 실내 조명에 의한 내광(Illuminant #2)가 존재하는 이미지일 수 있다. 이미지 보정 장치는 제1 색도 정보(521a), 제1 혼합 계수 맵(522a), 제2 색도 정보(521b) 및 제2 혼합 계수 맵(522b)을 선형 보간함으로써, 조명 맵(530)을 획득할 수 있다. 이미지 보정 장치는 조명 맵(530)을 이용하여 입력 이미지(501)를 보정함으로써 모든 조명 효과가 보상된 완전히 화이트 밸런싱된 출력 이미지(508)를 획득할 수 있다.Figure 5 illustrates example application results. The image correction device extracts
도 6은 일 실시예에 따른 화이트 밸런싱 동작을 설명하는 흐름도이다.Figure 6 is a flowchart explaining a white balancing operation according to one embodiment.
우선, 단계(610)에서 이미지 보정 장치는 이미지를 획득할 수 있다. 예를 들어, 이미지 보정 장치는 이미지 센서를 통해 이미지를 촬영할 수 있다. 다른 예를 들어, 이미지 보정 장치는 통신부를 통해 외부 서버로부터 이미지를 수신할 수도 있다. 또 다른 예를 들어, 이미지 보정 장치는 메모리에 저장된 이미지를 로딩할 수도 있다.First, in
그리고 단계(620)에서 이미지 보정 장치는 이미지 내 복수의 조명이 존재하는지 여부를 판별할 수 있다. 예를 들어, 이미지 보정 장치는 이미지 내 픽셀들에 미치는 컬러 캐스트를 유발한 광원들의 색도의 종류를 식별할 수 있다.And in
이어서 단계(621)에서 이미지 보정 장치는 이미지 내 단일 광원에 의한 컬러 캐스트만 존재하는 경우에 응답하여, 다른 방식으로 화이트 밸런스를 조절할 수 있다. 예를 들어, 이미지 보정 장치는 단일 조명을 가정한 방식으로 화이트 밸런스를 조절할 수도 있다. 다만, 이로 한정하는 것은 아니고, 이미지 보정 장치는 단일 광원인 경우에도, 도 1 내지 도 5에서 전술한 방식에 따라 화이트 밸런싱을 수행할 수도 있다. 예를 들어, 이미지 보정 장치는 도 1 내지 도 5에서 광원들 별로 획득된 부분 조명 맵의 평균 맵(예를 들어, 같은 픽셀 위치를 지시하는 조명 값들의 평균 값으로 구성된 맵)을 이미지에 적용함으로써, 단일 조명을 가정하여 화이트 밸런싱된 이미지를 출력할 수 있다. 이 경우, 이미지 보정 장치는 단계(620)를 생략할 수도 있다.Next, in
일 실시예에 따른 이미지 보정 장치는 식별된 광원의 개수가 2이상인 경우에 응답하여, 혼합 계수 맵의 생성을 개시할 수 있다.The image correction device according to an embodiment may initiate generation of a blending coefficient map in response to a case where the number of identified light sources is 2 or more.
그리고 단계(630)에서 이미지 보정 장치는 각 조명의 색도 및 해당 조명에 대한 혼합 계수 맵을 추정할 수 있다. 예를 들어, 이미지 보정 장치는 입력 이미지에 영향을 미치는 광원 색도의 개수를 식별할 수 있다. 이미지 보정 장치는 식별된 개수로 혼합 계수 맵을 생성할 수 있다. 도 3에 도시된 예시에서 이미지 보정 장치는 조명 맵을 식별된 개수의 색도 정보 및 혼합 계수 맵으로 분해할 수 있다. 도 4에 도시된 예시에서 이미지 보정 장치는 식별된 개수에 대응하여 미리 트레이닝된 뉴럴 네트워크 모델에 기초하여 식별된 개수의 색도 정보 및 혼합 계수 맵을 추출할 수 있다.And in
다른 예를 들어, 이미지 보정 장치는 광원 색도의 개수를 3개로 고정 및/또는 제한할 수도 있다. 색 공간은 일반적으로 3개 차원으로 구성되므로, 3개 광원에 대해서만 색도 정보 및 혼합 계수 맵을 산출하는 것이 효과적일 수 있다.As another example, the image correction device may fix and/or limit the number of light source chromaticities to three. Since the color space generally consists of three dimensions, it may be effective to calculate chromaticity information and mixing coefficient maps for only three light sources.
이어서 단계(640)에서 이미지 보정 장치는 조명 맵을 추정할 수 있다. 예를 들어, 이미지 보정 장치는 전술한 색도 정보 및 혼합 계수 맵의 곱에 기초하여 각 광원의 부분 조명 맵을 산출하고, 부분 조명 맵들을 합산하여 조명 맵을 산출할 수 있다.Next, in
그리고 단계(650)에서 이미지 보정 장치는 보존할 광원에 따라 색도 정보를 조절할 수 있다. 색도 정보가 조정될 경우, 일부 광원 정보를 보존하기 위한 조명 맵이 생성될 수 있다. 색도 정보가 조정되지 않은 경우, 모든 광원에 의한 컬러 캐스트를 제거하기 위한 조명 맵이 생성될 수 있다. 색도 정보의 조절은 하기 도 7에서 설명한다.And in
이어서 단계(660)에서 이미지 보정 장치는 입력 이미지에 조명 맵을 적용하여 출력 이미지를 생성할 수 있다. 색도 정보가 조정된 경우, 일부 컬러 캐스트를 보존한 출력 이미지가 생성될 수 있다. 따라서, 이미지 보정 장치는 조명별로 분리된 화이트 밸런싱을 진행할 수 있다.Next, in
도 7은 일 실시예에 따른 일부 광원에 의한 조명 성분을 보존하는 예시적인 동작을 설명하는 도면이다.FIG. 7 is a diagram illustrating an example operation of preserving lighting components by some light sources according to an embodiment.
일 실시예에 따른 이미지 보정 장치는 도 7에 도시된 바와 같은 전자 장치(예를 들어, 모바일 단말)(700)로 구현될 수 있다. 다만, 이로 한정하는 것은 아니고, 전자 장치(700)는 이미지 센서를 탑재한 다양한 장치(예를 들어, 태블릿, AR(augmented reality) 글래스, 차량, 및 TV 등)으로 구현될 수 있다.The image correction device according to one embodiment may be implemented as an electronic device (eg, mobile terminal) 700 as shown in FIG. 7 . However, it is not limited to this, and the
전자 장치(700)는 도 1 내지 도 6에서 전술한 바에 따라 생성된 화이트 밸런싱된 출력 이미지(790)를 사용자 입력(709)에 응답하여 디스플레이로 출력할 수 있다. 또한, 전자 장치(700)는 보존할 광원에 대한 선택을 제공할 수 있다. 예를 들어, 전자 장치(700)는 사용자 입력에 응답하여, 사용자의 취향(User's preference)에 대응하는 조명 효과에 대해서는 화이트 밸런싱을 배제하고, 나머지 조명 효과에 대해서만 선별적으로 화이트 밸런싱을 적용할 수 있다.The
예를 들어, 전자 장치(700)는 사용자 입력에 의하여 선택된 대상 광원의 색도 정보를 유지하고, 나머지 광원의 색도 정보를 백색 정보로 변경할 수 있다. 도 4에서 전술한 바와 같이, 전자 장치(700)는 유지된 색도 정보로 대상 광원에 대한 부분 조명 맵을 산출하고, 백색 정보로 나머지 조명 맵을 산출하며, 부분 조명 맵 및 나머지 조명 맵을 합산하여 재조명 맵을 생성할 수 있다. 전자 장치(700)는 화이트 밸런싱된 출력 이미지(790)에 재조명 맵을 적용함으로써, 재조명된 이미지를 출력할 수 있다. For example, the
도 7에서 전자 장치(700)는 사용자 입력(701)에 응답하여 제2 광원의 제2 색도 정보를 백색 정보(예를 들어, (1,1,1) 벡터)로 치환하여 생성된 재조명 맵을 출력 이미지(790)에 적용함으로써 제1 재조명된 이미지(710)를 획득할 수 있다. 다른 예를 들어, 전자 장치(700)는 사용자 입력(702)에 응답하여 제1 광원의 제1 색도 정보를 백색 정보로 치환하여 생성된 재조명 맵을 출력 이미지(790)에 적용함으로써 제2 재조명된 이미지(720)를 획득할 수 있다. 따라서 전자 장치(700)는 사용자의 선호에 따라 선택적으로 화이트 밸런싱을 수행할 수 있으며, In FIG. 7 , the
또한, 다른 예를 들어, 이미지 보정 장치는 사용자 입력에 응답하여 광원들 별 색도 정보를 변경할 수 있다. 이미지 보정 장치는 복수의 광원들 중 일부 광원에 의한 컬러 캐스트의 색도를 변경할 수 있다. 전자 장치(700)는 대상 광원의 색도를 변경함으로써 일부 광원의 조명 효과의 색도를 사용자가 원하는 색도로 변경할 수도 있다. 따라서, 전자 장치(700)는 일부 조명에만 화이트 밸런싱을 선별적으로 적용함으로써, 장면의 현장감을 보장하면서 사용자의 선택에 따라 다양하게 화이트 밸런싱된 이미지를 생성할 수 있다.Additionally, as another example, the image correction device may change chromaticity information for each light source in response to user input. An image correction device may change the chromaticity of a color cast by some light sources among a plurality of light sources. The
도 8 및 도 9은 일 실시예에 따른 뉴럴 네트워크의 트레이닝을 위한 트레이닝 데이터의 수집 동작을 설명하는 도면이다.FIGS. 8 and 9 are diagrams illustrating an operation of collecting training data for training a neural network according to an embodiment.
일 실시예에 따르면 전술한 조명 맵 또는 광원 별 색도 정보와 혼합 계수 맵을 출력하기 위한 뉴럴 네트워크 모델(예를 들어, CNN, HDRnet, 및 U-net 등)을 트레이닝시키기 위한, 트레이닝 데이터 셋트가 수집될 수 있다. 트레이닝 데이터 셋트는 다중 조명 화이트 밸런싱을 위한, 대규모 다중 광원 데이터 셋트(Large Scale Multi- Illuminant dataset, LSMI)일 수 있다. 예를 들어, 트레이닝 데이터 셋트는 픽셀 레벨 참값 조명 맵(ground truth illumination map)을 가지는 다양한 장면에 대한 이미지들을 포함할 수 있다. 다른 예를 들어, 트레이닝 데이터 셋트는 다양한 장면에 대한 트레이닝 이미지들 및 각 트레이닝 이미지에 대응하는 광원 별 참값 색도 정보 및 참값 혼합 계수 맵을 포함할 수 있다. 또한, 트레이닝 장치는 혼합 계수 맵의 혼합 계수 값들을 변경하여 트레이닝 데이터를 증강할 수 있다.According to one embodiment, a training data set is collected for training a neural network model (e.g., CNN, HDRnet, and U-net, etc.) to output the above-described lighting map or chromaticity information for each light source and a mixing coefficient map. It can be. The training data set may be a Large Scale Multi-Illuminant dataset (LSMI) for multi-illumination white balancing. For example, a training data set may include images for various scenes with pixel-level ground truth illumination maps. As another example, the training data set may include training images for various scenes, true value chromaticity information for each light source corresponding to each training image, and a true value mixing coefficient map. Additionally, the training device may augment the training data by changing the blending coefficient values of the blending coefficient map.
일 실시예에 따르면 단일 조명으로만 구성된 장면을 촬영하고, Color Checker, Grey Card, 또는 Spider Cube등을 이용하여 장면에 존재하는 단일 조명 효과가 알려진 화이트 밸런싱 기법을 통해 추정될 수 있다. 단일 조명 하에 획득된 화이트 밸런싱된 영상에 가상의 조명 맵을 무작위(Random)로 생성 및 적용함으로써 다중 조명(Mixed-Illumination)이 적용된 가상의 트레이닝 이미지가 획득될 수 있다. According to one embodiment, a scene consisting of only a single light is photographed, and the single light effect present in the scene can be estimated using a known white balancing technique using Color Checker, Gray Card, or Spider Cube. A virtual training image with mixed illumination applied can be obtained by randomly generating and applying a virtual illumination map to a white balanced image acquired under a single illumination.
예시적으로 도 8에 도시된 예시에서 트레이닝 이미지(810) Iab는 광원 a 및 광원 b 둘 다 턴온된 상태에서 촬영된 이미지일 수 있다. 광원 a는 창문을 통해 들어오는 자연광, 광원 b는 실내에 설치된 전등에 의한 내부광일 수 있다. 광원 a는 제어 불가능하나, 광원 b는 제어 가능하므로, 광원 b가 턴오프된 상태에서 이미지(820) Ia가 촬영될 수 있다. 전술한 트레이닝 이미지(810) Iab는 장면 다양성(scene diversity)을 위해 사무실, 스튜디오, 거실, 침실, 식당, 카페 등과 같은 다양한 실제 세계 장소들에서 캡쳐될 수 있다.For example, in the example shown in FIG. 8 , the training image 810 I ab may be an image taken with both light source a and light source b turned on. Light source a may be natural light coming through a window, and light source b may be internal light from a light installed indoors. Light source a is not controllable, but light source b is controllable, so the image 820 I a can be captured with light source b turned off. The training image 810 I ab described above may be captured in various real world locations such as an office, studio, living room, bedroom, restaurant, cafe, etc. for scene diversity.
광원 a가 턴오프될 수 없음에도 불구하고, 전술한 수학식 8과 같이, 트레이닝 이미지(810) Iab로부터 이미지(820) Ia가 차감됨으로써, 광원 b 하에서의 이미지(830) Ib가 획득될 수 있다. 각 이미지에서 장면 내 배치된 컬러 차트들(821, 831)(예를 들어, 맥베스 컬러 차트(Macbeth color chart), Color Checker, Grey Card, 또는 Spider Cube 등)를 이용하여 개별 광원의 참값 색도가 개별적으로 추정될 수 있다. 참값 혼합 계수 맵은 하기 수학식 9에 따라 추정될 수 있다.Even though the light source a cannot be turned off, the image 820 I a is subtracted from the training image 810 I ab , as shown in Equation 8 above, so that the image 830 I b under the light source b can be obtained. You can. In each image, the true chromaticity of each light source is individually determined using
RGB 색상계의 베이어 패턴(Bayer pattern)을 이용하는 카메라 센서 및/또는 이미지 센서는 동일 면적 내에서 G 색상을 센싱하는 소자의 개수가 많으므로, 녹색 채널의 세기 값이 밝기로 근사화될 수 있다. 전술한 수학식 9에 의해 픽셀 레벨로 개별 광원에 의한 색도가 혼합된 비율을 지시하는 참값 혼합 계수 맵이 획득될 수 있다. 예를 들어, 도 9에 도시된 바와 같이, 이미지 Ia에 대해서는 녹색 채널 이미지(921) Ia,G가 획득되고, 이미지 Ib에 대해서는 녹색 채널 이미지(931) Ib,G가 획득될 수 있다. 트레이닝 장치는 각 녹색 채널 이미지들(921, 931)의 녹색 값이 1이 되도록 정규화함으로써, 광원 a의 혼합 계수 맵(922) 및 광원 b의 혼합 계수 맵(932)이 획득될 수 있다. 광원 a의 색도 정보 및 혼합 계수 맵(922)의 곱에 광원 b의 색도 정보 및 혼합 계수 맵(932)의 곱이 합산되어, 참값 조명 맵(970)이 추정될 수 있다. 도 8 및 도 9에서와 같이 실제 세계에서 확보된 트레이닝 데이터 셋트는 무작위 조명 정보의 적용을 통해 증강될 수도 있다.Camera sensors and/or image sensors that use the Bayer pattern of the RGB color system have a large number of elements that sense the G color within the same area, so the intensity value of the green channel can be approximated as brightness. By using Equation 9 described above, a true value mixing coefficient map indicating the mixing ratio of chromaticities by individual light sources at the pixel level can be obtained. For example, as shown in Figure 9, the green channel image 921 I a,G can be acquired for image I a , and the green channel image 931 I b ,G can be acquired for image I b. there is. The training device normalizes the green value of each
트레이닝 장치는 전술한 바에 따라 획득된 트레이닝 데이터 셋트를 이용하여 뉴럴 네트워크 모델(310, 410)을 트레이닝시킬 수 있다. 가상의 트레이닝 이미지 및 해당 트레이닝 이미지를 증강하는데 사용된 참값 색도 정보 및 참값 혼합 계수 맵을 트레이닝 출력으로 하여 도 4에 설명된 뉴럴 네트워크 모델(410)을 트레이닝시킬 수 있다. 다른 예를 들어, 트레이닝 장치는 가상의 트레이닝 이미지 및 그에 대응하는 참값 조명 맵을 트레이닝 출력으로 하여 도 3에 설명된 뉴럴 네트워크 모델(310)을 트레이닝시킬 수도 있다. 트레이닝 장치는 트레이닝 이미지를 임시 뉴럴 네트워크 모델에 입력하여 출력된 임시 출력 및 트레이닝 출력(예를 들어, 참값 조명 맵, 참값 색도 정보, 및 참값 혼합 계수 맵) 간의 손실을 산출하고, 산출된 손실이 임계 손실 미만이 될 때까지 뉴럴 네트워크 모델의 파라미터를 반복적으로 업데이트할 수 있다.The training device can train the
뉴럴 네트워크 모델은 예시적으로 HDRnet 및 U-넷을 포함할 수 있으며, 도 3 및 도 4에 도시된 뉴럴 네트워크 모델들이 U-넷으로 구현될 경우 높은 성능을 나타낼 수 있다.Neural network models may include HDRnet and U-net as examples, and can exhibit high performance when the neural network models shown in FIGS. 3 and 4 are implemented as U-net.
도 10은 일 실시예에 따른 이미지 보정 장치의 하드웨어 구현의 예를 도시한 도면이다.FIG. 10 is a diagram illustrating an example of hardware implementation of an image correction device according to an embodiment.
일 실시예에 따른 이미지 보정 장치(1000)는 이미지 획득부(1010), 프로세서(1020), 메모리(1030), 및 디스플레이(1040)를 포함할 수 있다.The
이미지 획득부(1010)는 입력 이미지를 획득할 수 있다. 이미지 획득부(1010)는 입력 이미지를 캡쳐하는 이미지 센서 및 입력 이미지를 수신하는 통신부 중 적어도 하나를 포함할 수 있다.The image acquisition unit 1010 may acquire an input image. The image acquisition unit 1010 may include at least one of an image sensor that captures an input image and a communication unit that receives the input image.
프로세서(1020)는 메모리(1030)에 저장된 뉴럴 네트워크 모델을 이용하여 입력 이미지로부터 화이트 밸런싱된 이미지를 생성하거나, 재조명된 이미지를 생성할 수 있다. 예를 들어, 프로세서(1020)는 획득된 입력 이미지의 각 픽셀(pixel)에 대해 복수의 광원들(illuminants)의 색도(chromaticity)가 개별적으로(individually) 미치는(affect) 컬러 캐스트(color cast)를 나타내는 조명 값(illumination value)을 포함하는 조명 맵(illumination map)을, 뉴럴 네트워크 모델에 기초하여 획득된 입력 이미지로부터 생성할 수 있다. 프로세서(1020)는 생성된 조명 맵을 이용하여 입력 이미지로부터 적어도 일부 컬러 캐스트를 제거함으로써 출력 이미지를 생성할 수 있다. 다만, 프로세서(1020)의 동작을 이로 한정하는 것은 아니고, 도 1 내지 도 9에서 설명된 동작들을 수행할 수도 있다.The processor 1020 may generate a white balanced image or a re-illuminated image from an input image using a neural network model stored in the memory 1030. For example, the processor 1020 performs a color cast in which the chromaticity of a plurality of illuminants individually affects each pixel of the acquired input image. An illumination map including the illumination value may be generated from an input image obtained based on a neural network model. Processor 1020 may generate an output image by removing at least some color cast from the input image using the generated illumination map. However, the operation of the processor 1020 is not limited to this, and the operations described in FIGS. 1 to 9 may be performed.
메모리(1030)는 뉴럴 네트워크 모델을 저장할 수 있다. 메모리(1030)는 일 실시예에 따른 이미지 보정 방법을 수행하기 위해 요구되는 데이터를 임시적으로 또는 영구적으로 저장할 수 있다. 예를 들어, 메모리(1030)는 입력 이미지, 출력 이미지, 및/또는 재조명된 이미지도 저장할 수 있다.The memory 1030 may store a neural network model. The memory 1030 may temporarily or permanently store data required to perform an image correction method according to an embodiment. For example, memory 1030 may also store input images, output images, and/or re-illuminated images.
디스플레이(1040)는 생성된 출력 이미지를 표시할 수 있다. 디스플레이(1040)는 입력 이미지 및/또는 재조명된 이미지도 시각화할 수 있다.The display 1040 can display the generated output image. Display 1040 may also visualize input images and/or re-illuminated images.
일 실시예에 따른 이미지 보정 장치(1000)는 입력 이미지와 같은 크기의 조명 맵을 추정하여 이미지 내 모든 광원에 의한 조명 효과들을 선택적으로 화이트 밸런싱할 수 있다. 예를 들어, 이미지 보정 장치(1000)는 광원 별 색도 정보 및 혼합 계수 맵을 개별적으로 추정함으로써, 혼합 조명 효과를 선택적으로 보정할 수 있다. 이미지 보정 장치(1000)는 픽셀 레벨로 화이트 밸런싱이 가능한 바, 이미지의 한 픽셀에서 보상 및/또는 제거된 컬러 캐스트의 색도 및 양이 다른 픽셀에서 보상 및/또는 제거된 컬러 캐스트의 색도 및 양과 다를 수 있다.The
이미지 보정 장치(1000)는 딥 이미지 프로세싱(Deep Image Processing), 인공지능 컴퓨팅, 및 뉴럴 프로세서(1020)를 활용한 영상 처리 장치에 적용될 수 있으며, 예시적으로 모바일 카메라, 일반 카메라, 영상 처리 서버, 모바일 단말, AR 글래스, 차량 등으로 구현될 수 있다. 이미지 보정 장치(1000)에 의해 출력되는 화이트 밸런싱된 이미지 및/또는 재조명된 이미지는 이미지 분류(Image Classification), 객체 추적(Object Tracking), 광류(Optical Flow), 깊이 추정(Depth Estimation) 등과 같이 이미지 내 특징(Feature)을 인식 및/또는 추적하는 장치에 적용될 수 있다. 화이트 밸런싱된 이미지로 인해, 조명으로 인한 객체 인식 혼란이 감소되고, 강인성(Robustness)이 개선될 수 있다.The
이상에서 설명된 실시예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 컨트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The embodiments described above may be implemented with hardware components, software components, and/or a combination of hardware components and software components. For example, the devices, methods, and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, and a field programmable gate (FPGA). It may be implemented using a general-purpose computer or a special-purpose computer, such as an array, programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and software applications running on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 저장될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. It can be saved in . Software may be distributed over networked computer systems and thus stored or executed in a distributed manner. Software and data may be stored on a computer-readable recording medium.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 저장할 수 있으며 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. A computer-readable medium may store program instructions, data files, data structures, etc., singly or in combination, and the program instructions recorded on the medium may be specially designed and constructed for the embodiment or may be known and available to those skilled in the art of computer software. there is. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.
위에서 설명한 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 또는 복수의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The hardware devices described above may be configured to operate as one or multiple software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 이를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited drawings, those skilled in the art can apply various technical modifications and variations based on this. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims also fall within the scope of the claims described below.
Claims (20)
획득된 입력 이미지의 각 픽셀(pixel)에 대해 하나 이상의 광원(illuminant)의 색도(chromaticity)가 개별적으로(individually) 미치는(affect) 컬러 캐스트(color cast)를 나타내는 조명 값(illumination value)을 포함하는 조명 맵(illumination map)을, 뉴럴 네트워크 모델에 기초하여 상기 획득된 입력 이미지로부터 생성하는 단계;
상기 생성된 조명 맵을 이용하여 상기 입력 이미지로부터 적어도 일부 컬러 캐스트를 제거함으로써 출력 이미지를 생성하는 단계;
상기 조명 맵을 복수의 광원들 별로 분해(decompose)함으로써 각 광원에 대응하는 색도 정보(chromaticity information)를 결정하는 단계; 및
상기 복수의 광원들 중 일부 광원에 대응하는 색도 정보를 보존하고, 나머지 광원에 대응하는 색도 정보는 백색 정보로 변경하여 상기 출력 이미지를 조정함으로써 부분적으로 화이트 밸런싱된 이미지를 생성하는 단계
를 포함하는 이미지 보정 방법.
In an image correction method implemented with a processor,
Containing an illumination value representing the color cast that the chromaticity of one or more illuminants individually affects for each pixel of the acquired input image. generating an illumination map from the obtained input image based on a neural network model;
generating an output image by removing at least some color cast from the input image using the generated illumination map;
determining chromaticity information corresponding to each light source by decomposing the illumination map into a plurality of light sources; and
Generating a partially white balanced image by preserving chromaticity information corresponding to some of the light sources among the plurality of light sources and changing the chromaticity information corresponding to the remaining light sources to white information to adjust the output image.
An image correction method comprising:
상기 조명 맵을 생성하는 단계는,
적어도 한 픽셀에 대해 복수의 광원들 중 한 광원의 색도에 대응하는 부분 조명 벡터 및 다른 광원의 색도에 대응하는 부분 조명 벡터가 혼합된(mixed) 조명 벡터를 갖는 상기 조명 맵을 생성하는 단계
를 포함하는 이미지 보정 방법.According to paragraph 1,
The step of generating the lighting map is,
Generating, for at least one pixel, the illumination map having an illumination vector that is a mixture of a partial illumination vector corresponding to the chromaticity of one of the plurality of light sources and a partial illumination vector corresponding to the chromaticity of the other light source.
An image correction method comprising:
상기 조명 맵에서 한 픽셀에 영향을 미치는 복수의 광원들의 색도의 혼합 계수(mixture coefficient)는 다른 픽셀에 영향을 미치는 상기 복수의 광원들의 색도의 혼합 계수와 다른,
이미지 보정 방법.According to paragraph 1,
In the illumination map, a mixture coefficient of the chromaticities of a plurality of light sources affecting one pixel is different from a mixing coefficient of the chromaticities of the plurality of light sources affecting another pixel,
How to correct images.
상기 출력 이미지를 생성하는 단계는,
상기 입력 이미지에 대하여 상기 조명 맵을 엘리먼트 별 연산(element-wise operation)으로 적용함으로써 상기 출력 이미지를 생성하는 단계
를 포함하는 이미지 보정 방법.According to paragraph 1,
The step of generating the output image is,
Generating the output image by applying the illumination map to the input image through an element-wise operation.
An image correction method comprising:
상기 출력 이미지를 생성하는 단계는,
상기 입력 이미지의 각 픽셀의 픽셀 값을 상기 조명 맵의 조명 값들 중 해당 픽셀의 픽셀 위치에 대응하는 조명 값으로 나누는(divide) 단계
를 포함하는 이미지 보정 방법.According to paragraph 4,
The step of generating the output image is,
Dividing the pixel value of each pixel of the input image by the lighting value corresponding to the pixel position of the pixel among the lighting values of the lighting map.
An image correction method comprising:
상기 출력 이미지를 생성하는 단계는,
화이트 밸런싱된(white-balanced) 이미지를 생성하는 단계
를 포함하는 이미지 보정 방법.According to paragraph 1,
The step of generating the output image is,
Steps to create a white-balanced image
An image correction method comprising:
상기 색도 정보를 결정하는 단계는,
상기 조명 맵을 복수의 광원들 별로 분해(decompose)함으로써 각 광원에 대응하는 색도 정보(chromaticity) 및 해당 광원의 혼합 계수 맵(mixture coefficient map)을 결정하는 단계를 포함하고,
상기 부분적으로 화이트 밸런싱된 이미지를 생성하는 단계는,
상기 복수의 광원들 중 일부 광원에 대응하는 색도 정보를 보존하고 나머지 광원에 대응하는 색도 정보를 백색 정보로 변경하여 혼합 계수 맵과 함께 상기 출력 이미지에 적용함으로써 부분적으로 화이트 밸런싱된 이미지를 출력하는 단계
를 포함하는 이미지 보정 방법.
According to paragraph 1,
The step of determining the chromaticity information is,
By decomposing the illumination map into a plurality of light sources, determining chromaticity information corresponding to each light source and a mixture coefficient map of the light source,
The step of generating the partially white balanced image includes:
Outputting a partially white balanced image by preserving chromaticity information corresponding to some of the light sources among the plurality of light sources, changing the chromaticity information corresponding to the remaining light sources into white information, and applying it to the output image along with a blending coefficient map.
An image correction method comprising:
상기 부분적으로 화이트 밸런싱된 이미지를 출력하는 단계는,
상기 일부 광원에 의한 컬러 캐스트를 보존하는 상기 부분적으로 화이트밸런싱된 이미지를 출력하는 단계
를 포함하는 이미지 보정 방법.In clause 7,
The step of outputting the partially white balanced image includes:
Outputting the partially white balanced image preserving color cast by the partial light source.
An image correction method comprising:
상기 부분적으로 화이트 밸런싱된 이미지를 출력하는 단계는,
상기 일부 광원에 대응하는 색도 정보 및 해당 혼합 계수 맵을 이용하여 상기 일부 광원에 대응하는 부분 조명 맵을 생성하는 단계;
상기 나머지 광원에 대응하는 상기 백색 정보 및 해당 혼합 계수 맵을 이용하여 상기 나머지 광원에 대응하는 나머지 조명 맵을 생성하는 단계;
상기 부분 조명 맵 및 상기 나머지 조명 맵을 합산하여 재조명 맵을 생성하는 단계; 및
상기 출력 이미지의 각 픽셀의 픽셀 값에 상기 재조명 맵의 재조명 값들 중 해당 픽셀의 픽셀 위치에 대응하는 재조명 값을 곱(multiply)하는 단계
를 포함하는 이미지 보정 방법.In clause 7,
The step of outputting the partially white balanced image includes:
generating a partial illumination map corresponding to the partial light source using chromaticity information and a corresponding mixing coefficient map corresponding to the partial light source;
generating a remaining illumination map corresponding to the remaining light source using the white information and a corresponding mixing coefficient map corresponding to the remaining light source;
generating a re-illumination map by adding the partial illumination map and the remaining illumination map; and
Multiplying the pixel value of each pixel of the output image by a relighting value corresponding to the pixel position of the pixel among the relighting values of the relighting map.
An image correction method comprising:
상기 조명 맵을 생성하는 단계는,
상기 획득된 입력 이미지에 상기 뉴럴 네트워크 모델을 적용함으로써, 광원 별 색도 정보 및 해당 광원의 혼합 계수 맵을 추출하는 단계; 및
상기 색도 정보 및 상기 혼합 계수 맵에 기초하여 상기 조명 맵을 생성하는 단계
를 포함하는 이미지 보정 방법.According to paragraph 1,
The step of generating the lighting map is,
extracting chromaticity information for each light source and a mixing coefficient map of the corresponding light source by applying the neural network model to the obtained input image; and
Generating the lighting map based on the chromaticity information and the mixing coefficient map.
An image correction method comprising:
상기 조명 맵을 생성하는 단계는,
복수의 광원들 중 각 광원의 색도 정보 및 해당 광원의 혼합 계수 맵을 곱(multiply)하여 부분 조명 맵을 산출하는 단계; 및
상기 복수의 광원들의 부분 조명 맵을 합산함으로써 상기 조명 맵을 생성하는 단계
를 포함하는 이미지 보정 방법.According to clause 10,
The step of generating the lighting map is,
calculating a partial illumination map by multiplying the chromaticity information of each light source among the plurality of light sources and the mixing coefficient map of the corresponding light source; and
generating the illumination map by summing partial illumination maps of the plurality of light sources.
An image correction method comprising:
상기 출력 이미지를 생성하는 단계는,
복수의 광원들 중 대상 광원에 대응하는 색도 정보를 결정하는 단계;
상기 결정된 색도 정보 및 상기 혼합 계수 맵을 곱함으로써 상기 대상 광원에 대한 부분 조명 맵을 산출하는 단계;
상기 대상 광원에 대한 부분 조명 맵 및 나머지 광원에 대한 나머지 조명 맵을 합산하여 재조명 맵을 생성하는 단계; 및
상기 재조명 맵을 상기 출력 이미지에 적용함으로써 상기 대상 광원에 의한 컬러 캐스트를 적어도 일부 보존하는 부분적으로 화이트 밸런싱된 재조명된 이미지를 출력하는 단계
를 포함하는 이미지 보정 방법.According to clause 10,
The step of generating the output image is,
determining chromaticity information corresponding to a target light source among a plurality of light sources;
calculating a partial illumination map for the target light source by multiplying the determined chromaticity information and the mixing coefficient map;
generating a relighting map by summing the partial illumination map for the target light source and the remaining illumination map for the remaining light sources; and
Outputting a partially white balanced re-illuminated image that preserves at least some color cast by the target light source by applying the re-lighting map to the output image.
An image correction method comprising:
상기 색도 정보를 조정하는 단계는,
복수의 광원들 중 나머지 광원에 대응하는 색도 정보를 백색 정보로 변경하는 단계
를 포함하는 이미지 보정 방법.According to clause 12,
The step of adjusting the chromaticity information is,
A step of changing chromaticity information corresponding to the remaining light sources among the plurality of light sources into white information.
An image correction method comprising:
한 픽셀에 대해 복수의 광원들 별로 산출된 혼합 계수의 합이 기준 값이 되도록, 상기 복수의 광원들 별로 혼합 계수 맵을 결정하는 단계;
상기 복수의 광원들 별 색도 정보 및 해당하는 혼합 계수 맵에 기초하여 각 광원에 대응하는 부분 조명 맵을 산출하는 단계; 및
상기 산출된 부분 조명 맵을 상기 입력 이미지 및 상기 출력 이미지 중 하나에 적용하는 단계
를 더 포함하는 이미지 보정 방법.According to paragraph 1,
determining a blending coefficient map for each of the plurality of light sources so that the sum of the blending coefficients calculated for each of the plurality of light sources for one pixel becomes a reference value;
calculating a partial illumination map corresponding to each light source based on chromaticity information for each of the plurality of light sources and a corresponding mixing coefficient map; and
Applying the calculated partial illumination map to one of the input image and the output image.
An image correction method further comprising:
상기 혼합 계수 맵을 결정하는 단계는,
상기 입력 이미지에 영향을 미치는 광원 색도의 개수를 식별하는 단계; 및
상기 식별된 개수로 상기 혼합 계수 맵을 생성하는 단계
를 포함하는 이미지 보정 방법.According to clause 14,
The step of determining the mixing coefficient map is,
identifying the number of light source chromaticities affecting the input image; and
generating the mixing coefficient map with the identified number
An image correction method comprising:
상기 광원 색도의 개수를 식별하는 단계는,
상기 광원 색도의 개수를 3개로 고정하는 단계
를 포함하는 이미지 보정 방법.According to clause 15,
The step of identifying the number of light source chromaticities is,
Fixing the number of light source chromaticities to 3
An image correction method comprising:
상기 혼합 계수 맵을 생성하는 단계는,
상기 식별된 개수가 2이상인 경우에 응답하여, 상기 혼합 계수 맵의 생성을 개시하는 단계
를 포함하는 이미지 보정 방법.According to clause 15,
The step of generating the mixing coefficient map is,
In response to the identified number being 2 or more, initiating generation of the mixing coefficient map.
An image correction method comprising:
상기 혼합 계수 맵을 결정하는 단계는,
상기 복수의 광원들이 두 개의 광원들인 경우, 상기 두 개의 광원들 중 한 광원에 대한 혼합 계수 맵을 추정하는 단계; 및
픽셀 별로 기준 값으로부터 상기 혼합 계수 맵의 각 혼합 계수를 차감함으로써 나머지 광원에 대한 혼합 계수 맵을 산출하는 단계;
를 포함하는 이미지 보정 방법.According to clause 14,
The step of determining the mixing coefficient map is,
When the plurality of light sources are two light sources, estimating a mixing coefficient map for one of the two light sources; and
calculating a blending coefficient map for the remaining light sources by subtracting each blending coefficient of the blending coefficient map from a reference value for each pixel;
An image correction method comprising:
입력 이미지를 획득하는 이미지 센서;
상기 획득된 입력 이미지의 각 픽셀(pixel)에 대해 하나 이상의 광원(illuminant)의 색도(chromaticity)가 개별적으로(individually) 미치는(affect) 컬러 캐스트(color cast)를 나타내는 조명 값(illumination value)을 포함하는 조명 맵(illumination map)을, 뉴럴 네트워크 모델에 기초하여 상기 획득된 입력 이미지로부터 생성하고, 상기 생성된 조명 맵을 이용하여 상기 입력 이미지로부터 적어도 일부 컬러 캐스트를 제거함으로써 출력 이미지를 생성하며, 상기 조명 맵을 복수의 광원들 별로 분해함으로써 각 광원에 대응하는 색도 정보를 결정하고, 상기 복수의 광원들 중 일부 광원에 대응하는 색도 정보를 보존하며, 나머지 광원에 대응하는 색도 정보는 백색 정보로 변경하여 상기 출력 이미지를 조정함으로써 부분적으로 화이트 밸런싱된 이미지를 생성하는 프로세서; 및
상기 생성된 출력 이미지를 표시하는 디스플레이
를 포함하는 이미지 보정 장치.
In the image correction device,
An image sensor that acquires an input image;
Contains an illumination value indicating the color cast that the chromaticity of one or more illuminants individually affects for each pixel of the obtained input image. An illumination map is generated from the obtained input image based on a neural network model, and an output image is generated by removing at least some color casts from the input image using the generated illumination map, By decomposing the lighting map into a plurality of light sources, chromaticity information corresponding to each light source is determined, chromaticity information corresponding to some of the plurality of light sources is preserved, and chromaticity information corresponding to the remaining light sources is changed to white information. a processor for generating a partially white balanced image by adjusting the output image; and
Display for displaying the generated output image
An image correction device comprising:
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/402,906 US12219113B2 (en) | 2021-03-11 | 2021-08-16 | Method and apparatus with image correction |
CN202110978977.0A CN115082328A (en) | 2021-03-11 | 2021-08-25 | Method and apparatus for image correction |
EP21215548.5A EP4057609B1 (en) | 2021-03-11 | 2021-12-17 | Method and apparatus for image correction |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210032119 | 2021-03-11 | ||
KR20210032119 | 2021-03-11 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20220127715A KR20220127715A (en) | 2022-09-20 |
KR102619830B1 true KR102619830B1 (en) | 2024-01-03 |
Family
ID=83446320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210052984A Active KR102619830B1 (en) | 2021-03-11 | 2021-04-23 | Method and apparatus for correcting image |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102619830B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102796974B1 (en) * | 2024-07-16 | 2025-04-18 | 주식회사 벤타엑스 | Artificial intelligence-based VR image correction and conversion method and device |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115541550A (en) * | 2022-10-21 | 2022-12-30 | 南京理工大学 | Structured light illumination microscopic imaging method based on principal component analysis |
CN115564686B (en) * | 2022-11-04 | 2025-06-20 | 福州大学 | A high-quality HDR image generation system |
WO2024240508A1 (en) * | 2023-05-22 | 2024-11-28 | Valeo Vision | Determining a luminance map for implementing a motor vehicle function by means of a model |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001320598A (en) * | 2000-03-02 | 2001-11-16 | Oki Data Corp | Color correction device |
-
2021
- 2021-04-23 KR KR1020210052984A patent/KR102619830B1/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001320598A (en) * | 2000-03-02 | 2001-11-16 | Oki Data Corp | Color correction device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102796974B1 (en) * | 2024-07-16 | 2025-04-18 | 주식회사 벤타엑스 | Artificial intelligence-based VR image correction and conversion method and device |
Also Published As
Publication number | Publication date |
---|---|
KR20220127715A (en) | 2022-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102619830B1 (en) | Method and apparatus for correcting image | |
EP4057609B1 (en) | Method and apparatus for image correction | |
Bianco et al. | A new color correction method for underwater imaging | |
US8947549B2 (en) | Spectral synthesis for image capturing device processing | |
EP3542347B1 (en) | Fast fourier color constancy | |
US9723285B2 (en) | Multi-area white-balance control device, multi-area white-balance control method, multi-area white-balance control program, computer in which multi-area white-balance control program is recorded, multi-area white-balance image-processing device, multi-area white-balance image-processing method, multi-area white-balance image-processing program, computer in which multi-area white-balance image-processing program is recorded, and image-capture apparatus | |
US8811733B2 (en) | Method of chromatic classification of pixels and method of adaptive enhancement of a color image | |
US20200396434A1 (en) | Image White Balance Processing System and Method | |
US10171785B2 (en) | Color balancing based on reference points | |
US20230209029A1 (en) | Apparatus and method for white balance editing | |
CN110930341A (en) | Low-illumination image enhancement method based on image fusion | |
Kim et al. | Large scale multi-illuminant (lsmi) dataset for developing white balance algorithm under mixed illumination | |
JP5719123B2 (en) | Image processing apparatus, image processing method, and program | |
US20170132765A1 (en) | Image correction device, image correction method and storage medium | |
CN112866667B (en) | Image white balance processing method and device, electronic equipment and storage medium | |
CN108024105A (en) | Image color adjusting method, device, electronic equipment and storage medium | |
CN108401148A (en) | Method for performing automatic white balance on image | |
CN109325905B (en) | Image processing method, image processing device, computer readable storage medium and electronic apparatus | |
JP7463186B2 (en) | Information processing device, information processing method, and program | |
Chiang et al. | Color image enhancement with saturation adjustment method | |
US20160286090A1 (en) | Image processing method, image processing apparatus, and image processing program | |
Hsu et al. | Color constancy and color consistency using dynamic gamut adjustment | |
US20180322676A1 (en) | Simplified lighting compositing | |
JP5824423B2 (en) | Illumination light color estimation device, illumination light color estimation method, and illumination light color estimation program | |
CN112995632B (en) | Image white balance processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20210423 |
|
PA0201 | Request for examination | ||
PG1501 | Laying open of application | ||
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20230517 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20231121 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20231227 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20231228 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration |