KR102561307B1 - Method of performing white balancing - Google Patents

Method of performing white balancing Download PDF

Info

Publication number
KR102561307B1
KR102561307B1 KR1020180167891A KR20180167891A KR102561307B1 KR 102561307 B1 KR102561307 B1 KR 102561307B1 KR 1020180167891 A KR1020180167891 A KR 1020180167891A KR 20180167891 A KR20180167891 A KR 20180167891A KR 102561307 B1 KR102561307 B1 KR 102561307B1
Authority
KR
South Korea
Prior art keywords
block
value
blue
average
red
Prior art date
Application number
KR1020180167891A
Other languages
Korean (ko)
Other versions
KR20200078212A (en
Inventor
정영제
이상욱
이영은
Original Assignee
한화비전 주식회사
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 한화비전 주식회사 filed Critical 한화비전 주식회사
Priority to KR1020180167891A priority Critical patent/KR102561307B1/en
Publication of KR20200078212A publication Critical patent/KR20200078212A/en
Application granted granted Critical
Publication of KR102561307B1 publication Critical patent/KR102561307B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/67Circuits for processing colour signals for matrixing

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Of Color Television Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

본 실시예의 화이트 밸런싱을 수행하는 방법에 있어서, 프로세서는 복수의 블록들 각각이 화이트 영역 또는 특정 색상 영역에 해당하는지를 판단한다. 프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 영상 데이터를 사용하여 적색 게인, 청색 게인, 및 가중값을 구한다. 프로세서는, 특정 색상 영역에 해당하는 블록들 각각에 대하여, 색상별로 다르게 설정되어 있는 목표 적색 게인, 목표 청색 게인, 및 목표 가중값을 적용하여 적색 게인, 청색 게인, 및 가중값을 선정한다. 프로세서는, 화이트 영역 및 특정 색상 영역에 해당하는 블록들 각각의 적색 게인, 청색 게인, 및 가중값을 적용하여, 입력 영상의 모든 화소 값들을 보정한다.In the white balancing method of the present embodiment, the processor determines whether each of the plurality of blocks corresponds to a white area or a specific color area. The processor obtains a red gain, a blue gain, and a weight value for each of the blocks corresponding to the white area using image data. The processor selects a red gain, a blue gain, and a weight value by applying a target red gain, a target blue gain, and a target weight value set differently for each color to each of the blocks corresponding to a specific color region. The processor corrects all pixel values of the input image by applying red gain, blue gain, and weight values of each of the blocks corresponding to the white area and the specific color area.

Description

화이트 밸런싱을 수행하는 방법{Method of performing white balancing}Method of performing white balancing}

본 발명은, 화이트 밸런싱(white balancing)을 수행하는 방법에 관한 것으로서, 보다 상세하게는, 입력 영상에 대하여 프로세서가 화이트 밸런싱을 수행하는 방법에 관한 것이다. The present invention relates to a method of performing white balancing, and more particularly, to a method of performing white balancing by a processor with respect to an input image.

카메라 또는 디스플레이 장치의 프로세서에 의하여 수행되는 화이트 밸런싱(white balancing)은 고화질의 영상을 출력하기 위하여 필요하다. 특히, 고배율 줌 카메라, 사물 인터넷(IOT : Internet Of Things)용 카메라, B2C(Business To Consumer)용 카메라, 액션 캠(Action Cam), 및 착용(wearable) 카메라와 같이 고화질이 요구되는 카메라의 경우, 고성능의 화이트 밸런싱이 요구된다.White balancing performed by a processor of a camera or display device is necessary to output a high-quality image. In particular, in the case of cameras requiring high image quality, such as high-magnification zoom cameras, Internet Of Things (IOT) cameras, B2C (Business To Consumer) cameras, action cams, and wearable cameras, High-performance white balancing is required.

통상적인 화이트 밸런싱에 있어서, 입력 영상은 복수의 블록들로 구획되고, 화이트 영역에 해당하는 블록들 각각의 적색 게인(gain), 청색 게인, 및 가중값을 적용하여, 입력 영상의 모든 화소 값들을 보정한다. In normal white balancing, an input image is divided into a plurality of blocks, and all pixel values of the input image are corrected by applying a red gain, a blue gain, and a weight value of each of the blocks corresponding to the white area. do.

상기 화이트 영역에 해당하는 블록들을 선정함과 관련하여, 서로 다른 색온도의 광원들의 중복 조명에서 화이트 영역은 상대적으로 넓게 설정된다. 이에 따라, 서로 다른 색온도의 광원들의 중복 조명에서 피사체를 촬영하여 화이트 밸런싱(white balancing)을 수행할 경우, 상기 피사체의 특정 색상들에서 색 끌림 현상이 일어난다. Regarding the selection of the blocks corresponding to the white area, the white area is set to be relatively wide in overlapping lighting of light sources of different color temperatures. Accordingly, when white balancing is performed by photographing an object under overlapping illumination of light sources having different color temperatures, a color drag phenomenon occurs in specific colors of the object.

예를 들어, 낮은 색온도의 광원과 유사한 색상 예를 들어, 오렌지(Orange) 색 또는 스킨(Skin) 색은, 높은 색온도의 조명 영역에서 촬영되어 화이트 밸런싱(white balancing)이 수행될 경우, 색 끌림 현상을 발생시킨다.For example, if a color similar to a light source with a low color temperature, for example, an orange color or a skin color, is photographed in a lighting area with a high color temperature and white balancing is performed, color drag occurs. causes

또한, 야외의 나무 또는 하늘이 높은 배율로 촬영되어 화이트 밸런싱(white balancing)이 수행될 경우, 녹색 또는 시안(Cyan) 색은 색 끌림 현상을 발생시킨다. In addition, when an outdoor tree or sky is photographed at a high magnification and white balancing is performed, a green or cyan color causes a color drag.

상기 배경 기술의 문제점은, 발명자가 본 발명의 도출을 위하여 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 내용으로서, 반드시 본 발명의 출원 전에 일반 공중에게 공지된 내용이라 할 수 없다.The problem of the background art is that the inventor possessed for the derivation of the present invention, or was acquired in the process of deriving the present invention, and cannot necessarily be known to the general public prior to filing the present invention.

미국 등록 특허 제9420247호(출원인 : 한화테크윈 주식회사)US Registered Patent No. 9420247 (Applicant: Hanwha Techwin Co., Ltd.)

본 발명의 실시예는, 서로 다른 색온도의 광원들의 중복 조명에서 얻어진 촬영 영상에 대하여, 특정 색상들의 색 끌림 현상을 예방할 수 있는 화이트 밸런싱(white balancing)의 수행 방법을 제공하고자 한다. An embodiment of the present invention is intended to provide a method of performing white balancing capable of preventing color dragging of specific colors with respect to captured images obtained by overlapping illumination of light sources of different color temperatures.

본 발명의 실시예는, 입력 영상에 대하여 프로세서가 화이트 밸런싱(white balancing)을 수행하는 방법으로서, 단계들 (S1) 내지 (S5)를 수행한다.An embodiment of the present invention is a method for a processor to perform white balancing on an input image, and steps (S1) to (S5) are performed.

상기 단계 (S1)에서, 상기 프로세서는 상기 입력 영상을 복수의 블록들로 구획한다.In the step S1, the processor partitions the input image into a plurality of blocks.

상기 단계 (S2)에서, 상기 프로세서는 상기 복수의 블록들 각각이 화이트 영역 또는 특정 색상 영역에 해당하는지를 판단한다.In step S2, the processor determines whether each of the plurality of blocks corresponds to a white area or a specific color area.

상기 단계 (S3)에서, 상기 프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 영상 데이터를 사용하여 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 구한다.In step S3, the processor obtains a red gain (RGain Block ), a blue gain (BGain Block ), and a weight value (Weight block ) for each of the blocks corresponding to the white area using image data. .

상기 단계 (S4)에서, 상기 프로세서는, 상기 특정 색상 영역에 해당하는 블록들 각각에 대하여, 색상별로 다르게 설정되어 있는 목표 적색 게인(RGainco target value), 목표 청색 게인(BGainco target value), 및 목표 가중값(Weightco target value)을 적용하여 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 선정함; In the step (S4), the processor, for each of the blocks corresponding to the specific color region, a target red gain (RGain co target value ) and a target blue gain (BGain co target value ) set differently for each color, and selecting a red gain (RGain Block ), a blue gain (BGain Block ), and a weight value (Weight block ) by applying a target weight value (Weight co target value );

상기 단계 (S5)에서, 상기 프로세서는, 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적용하여, 상기 입력 영상의 모든 화소 값들을 보정한다.In the step S5, the processor applies a red gain (RGain Block ), a blue gain (BGain Block ), and a weight value (Weight block ) of each of the blocks corresponding to the white area and the specific color area, All pixel values of the input image are corrected.

본 실시예의 상기 화이트 밸런싱(white balancing)을 수행하는 방법에 의하면, 상기 화이트 영역에 해당하는 블록들뿐만 아니라 상기 특정 색상 영역에 해당하는 블록들도 적용 대상이 된다. 즉, 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적용하여, 상기 입력 영상의 모든 화소 값들을 보정한다.According to the white balancing method of the present embodiment, not only blocks corresponding to the white area but also blocks corresponding to the specific color area are applied. That is, all pixel values of the input image are corrected by applying the red gain (RGain Block ), blue gain (BGain Block ), and weight block (Weight block ) of each of the blocks corresponding to the white area and the specific color area. do.

따라서, 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적절히 설정할 수 있으므로, 상기 화이트 영역이 상대적으로 넓게 설정되더라도 특정 색상들의 색 끌림 현상을 예방할 수 있다. 즉, 서로 다른 색온도의 광원들의 중복 조명에서 얻어진 촬영 영상에 대하여, 특정 색상들의 색 끌림 현상을 예방할 수 있다.Therefore, since the red gain (RGain Block ), blue gain (BGain Block ), and weight value (Weight block ) of each of the blocks corresponding to the specific color region can be appropriately set, even if the white region is set relatively wide, a specific color It is possible to prevent color attraction of people. That is, it is possible to prevent a color dragging phenomenon of specific colors in a photographed image obtained by overlapping illumination of light sources having different color temperatures.

도 1은 본 발명의 일 실시예의 화이트 밸런싱(white balancing)을 수행하는 방법을 보여주는 흐름도이다.
도 2는 도 1의 단계 S1의 대상 프레임을 보여주는 도면이다.
도 3은 도 2에서의 어느 한 블록을 보여주는 도면이다.
도 4는 도 1에서의 단계 S5의 상세 단계들을 보여주는 흐름도이다.
도 5는 도 4의 단계 S503에서의 기준-게인 좌표 영역이 설정됨을 보여주는 도면이다.
도 6은 도 4의 단계 S503에서의 보정 매트릭스의 예를 보여주는 도면이다.
도 7은 도 1의 단계 (S2)를 수행하기 위하여 화이트 영역을 설정하는 방법을 보여주는 흐름도이다.
도 8은 도 7의 단계 S701에서 구해진 화이트 영상들을 보여주는 도면이다.
도 9는 도 7의 단계 S710에서 각각의 좌표가 2차원 그래프 상에 표시됨을 보여주는 도면이다.
도 10은 도 9에서 표시된 좌표들에 따라 화이트 영역이 설정됨을 보여주는 그래프이다.
도 11은 도 7의 단계들이 수행됨에 이어서 추가적으로 수행되는 설정 단계들을 보여주는 흐름도이다.
도 12는 도 11의 단계 S1101에 의하여 설정된 테이블의 예를 보여주는 도면이다.
도 13은 도 4의 단계 S503 및 도 5에서의 기준-게인 좌표 영역이 설정되는 과정을 보여주는 흐름도이다.
도 14는 복수의 보정 매트릭스들 중에서 도 4의 단계 S504에서 적용될 보정 매트릭스를 선택하는 방법을 보여주는 흐름도이다.
도 15는 도 1의 단계 (S2)를 수행하기 위하여 특정 색상 영역을 설정하는 방법을 보여주는 흐름도이다.
도 16은 도 15의 단계 S1501을 수행하기 위하여 촬영되는 컬러 체커(Color checker)의 보드를 보여주는 도면이다.
도 17은 도 15의 단계 S1508에서 특정 색상들 각각의 영역이 도 10의 화이트 영역과 함께 설정됨을 보여주는 그래프이다.
도 18은 도 15의 단계들이 수행됨에 이어서 추가적으로 수행되는 설정 단계들을 보여주는 흐름도이다.
1 is a flowchart showing a method of performing white balancing in one embodiment of the present invention.
FIG. 2 is a diagram showing a target frame of step S1 of FIG. 1 .
FIG. 3 is a view showing any one block in FIG. 2 .
FIG. 4 is a flowchart showing detailed steps of step S5 in FIG. 1 .
FIG. 5 is a diagram showing that the reference-gain coordinate area is set in step S503 of FIG. 4 .
FIG. 6 is a diagram showing an example of a correction matrix in step S503 of FIG. 4 .
FIG. 7 is a flowchart showing a method of setting a white area to perform step S2 of FIG. 1 .
FIG. 8 is a diagram showing white images obtained in step S701 of FIG. 7 .
FIG. 9 is a diagram showing that each coordinate is displayed on a 2D graph in step S710 of FIG. 7 .
10 is a graph showing that a white area is set according to the coordinates indicated in FIG. 9 .
FIG. 11 is a flow chart showing configuration steps additionally performed after the steps of FIG. 7 are performed.
FIG. 12 is a diagram showing an example of a table set by step S1101 of FIG. 11 .
FIG. 13 is a flowchart showing a process of setting a reference-gain coordinate area in step S503 of FIG. 4 and FIG. 5 .
FIG. 14 is a flowchart showing a method of selecting a correction matrix to be applied in step S504 of FIG. 4 from among a plurality of correction matrices.
FIG. 15 is a flowchart illustrating a method of setting a specific color region in order to perform step S2 of FIG. 1 .
FIG. 16 is a diagram showing a board of a color checker taken to perform step S1501 of FIG. 15 .
FIG. 17 is a graph showing that each area of specific colors is set together with the white area of FIG. 10 in step S1508 of FIG. 15 .
FIG. 18 is a flowchart showing configuration steps additionally performed after the steps of FIG. 15 are performed.

하기의 설명 및 첨부된 도면은 본 발명에 따른 동작을 이해하기 위한 것이며, 본 기술 분야의 통상의 기술자가 용이하게 구현할 수 있는 부분은 생략될 수 있다. The following description and accompanying drawings are for understanding the operation according to the present invention, and parts that can be easily implemented by those skilled in the art may be omitted.

또한 본 명세서 및 도면은 본 발명을 제한하기 위한 목적으로 제공된 것은 아니고, 본 발명의 범위는 청구의 범위에 의하여 정해져야 한다. 본 명세서에서 사용된 용어들은 본 발명을 가장 적절하게 표현할 수 있도록 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야 한다.In addition, this specification and drawings are not provided for the purpose of limiting the present invention, and the scope of the present invention should be defined by the claims. The terms used in this specification should be interpreted as meanings and concepts corresponding to the technical idea of the present invention so as to most appropriately express the present invention.

이하 첨부된 도면들을 참조하여 본 발명의 실시예가 상세히 설명된다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예의 화이트 밸런싱(white balancing)을 수행하는 방법을 보여준다.1 shows a method of performing white balancing in one embodiment of the present invention.

도 2는 도 1의 단계 S1의 대상 프레임을 보여준다. 도 2에서 참조 부호 201은 입력 영상의 프레임을, 그리고 B1 내지 BN은 영상 구획에 의한 블록들을 각각 가리킨다. FIG. 2 shows a target frame of step S1 of FIG. 1 . In FIG. 2 , reference numeral 201 denotes a frame of an input image, and B 1 to B N denote blocks according to image partitions, respectively.

도 3은 도 2에서의 어느 한 블록을 보여준다.FIG. 3 shows any one block in FIG. 2 .

도 1 내지 3을 참조하여, 본 실시예의 화이트 밸런싱(white balancing)을 수행하는 방법을 설명하기로 한다.Referring to FIGS. 1 to 3, a method of performing white balancing in this embodiment will be described.

단계 (S1)에서, 프로세서는 입력 영상(201)을 N 개의 블록들(B1 내지 BN)로 구획한다. In step S1, the processor partitions the input image 201 into N blocks B 1 to B N .

단계 (S2)에서, 프로세서는 N 개의 블록들(B1 내지 BN) 각각이 화이트 영역 또는 특정 색상 영역에 해당하는지를 판단한다. 화이트 영역 또는 특정 색상 영역의 설정 방법은 도 7 및 15를 참조하여 상세히 설명될 것이다.In step S2, the processor determines whether each of the N blocks B 1 to B N corresponds to a white area or a specific color area. A method of setting a white area or a specific color area will be described in detail with reference to FIGS. 7 and 15 .

단계 (S3)에서, 프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 영상 데이터를 사용하여 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 구한다. 적색 게인(RGainBlock)과 청색 게인(BGainBlock)을 구하는 상세 과정은 다음과 같다.In step S3, the processor obtains a red gain (RGain Block ), a blue gain (BGain Block ), and a weight value (Weight block ) for each of the blocks corresponding to the white area using image data. The detailed process of obtaining the red gain (RGain Block ) and blue gain (BGain Block ) is as follows.

프로세서는 화이트 영역에 해당하는 블록들 각각의 평균 적색 값(Raverage), 평균 녹색 값(Gaverage), 및 평균 청색 값(Baverage)을 계산한다(도 14의 단계 S1401과 동일함). The processor calculates an average red value (R average ), an average green value (G average ), and an average blue value (B average ) of each of the blocks corresponding to the white area (same as step S1401 of FIG. 14 ).

프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 평균 적색 값(Raverage)에 태양광의 화이트 영상의 적색 게인(RGainsolar)이 곱해진 결과의 정규화된 블록 적색 값(RBlock)을 계산한다(도 14의 단계 S1402에 포함됨). 즉, 아래의 수학식 1에 의하여 정규화된 블록 적색 값(RBlock)이 계산된다.For each of the blocks corresponding to the white region, the processor calculates a normalized block red value (R Block ) obtained by multiplying the average red value (R average ) by the red gain (RGain solar ) of the white image of sunlight. (included in step S1402 in Fig. 14). That is, the normalized block red value (R Block ) is calculated by Equation 1 below.

Figure 112018129385551-pat00001
Figure 112018129385551-pat00001

프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 평균 녹색 값(Gaverage)을 정규화된 블록 녹색 값(GBlock)으로 설정한다(도 14의 단계 S1402에 포함됨). 즉, 아래의 수학식 2에 의하여 정규화된 블록 녹색 값(GBlock)이 설정된다.The processor sets the average green value (G average ) to the normalized block green value (G Block ) for each of the blocks corresponding to the white area (included in step S1402 of FIG. 14 ). That is, a normalized block green value (G Block ) is set by Equation 2 below.

Figure 112018129385551-pat00002
Figure 112018129385551-pat00002

프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 평균 청색 값(Baverage)에 태양광의 화이트 영상의 청색 게인(BGainsolar)이 곱해진 결과의 정규화된 블록 청색 값(BBlock)을 계산한다(도 14의 단계 S1402에 포함됨). 즉, 아래의 수학식 3에 의하여 정규화된 블록 청색 값(BBlock)이 계산된다.For each of the blocks corresponding to the white region, the processor calculates a normalized block blue value (B Block ) obtained by multiplying the average blue value (B average ) by the blue gain (BGain solar ) of the white image of sunlight. (included in step S1402 in Fig. 14). That is, the normalized block blue value (B Block ) is calculated by Equation 3 below.

Figure 112018129385551-pat00003
Figure 112018129385551-pat00003

상기 적색 게인(RGainBlock)은 아래의 수학식 4에 의하여 계산된다. The red gain (RGain Block ) is calculated by Equation 4 below.

Figure 112018129385551-pat00004
Figure 112018129385551-pat00004

상기 청색 게인(BGainBlock)은 아래의 수학식 5에 의하여 계산된다. The blue gain (BGain Block ) is calculated by Equation 5 below.

Figure 112018129385551-pat00005
Figure 112018129385551-pat00005

한편, 서로 다른 색온도의 화이트 영상들 각각의 적색 비율(Dr)과 청색 비율(Db)에 따라 복수의 가중값들이 미리 설정되어 있다. 상기 화이트 영역에 해당하는 블록들 각각에 대한 가중값(Weightblock)은 상기 설정되어 있는 가중값들 중에서 선택된다. 이를 선택하는 방법은 다음과 같다.Meanwhile, a plurality of weight values are preset according to a red ratio (Dr) and a blue ratio (Db) of each of the white images having different color temperatures. A weight block for each of the blocks corresponding to the white area is selected from the set weight values. Here's how to select it.

프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 상기 정규화된 블록 청색 값(BBlock), 상기 정규화된 블록 적색 값(RBlock), 및 상기 정규화된 블록 녹색 값(GBlock)을 적용하여, 블록 휘도 값(YBlock), 블록 적색-색차 값(CrBlock), 및 블록 청색-색차 값(CbBlock)을 계산한다. 본 실시예의 경우, 아래의 수학식 6 내지 8이 적용된다.The processor applies the normalized block blue value (B Block ), the normalized block red value (R Block ), and the normalized block green value (G Block ) to each of the blocks corresponding to the white area. , a block luminance value (Y Block ), a block red-chrominance value (Cr Block ), and a block blue-chrominance value (Cb Block ) are calculated. In the case of this embodiment, Equations 6 to 8 below are applied.

Figure 112018129385551-pat00006
Figure 112018129385551-pat00006

Figure 112018129385551-pat00007
Figure 112018129385551-pat00007

Figure 112018129385551-pat00008
Figure 112018129385551-pat00008

상기 수학식 6 내지 8에서, α1 내지 α9는 응용 시스템 별로 적절히 설정될 수 있는 상수들을 가리킨다. In Equations 6 to 8, α 1 to α 9 indicate constants that can be appropriately set for each application system.

프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 상기 블록 휘도 값(YBlock)에 대한 상기 블록 적색-색차 값(CrBlock)의 비율에 정규화용 숫자 k가 곱해진 결과의 블록 적색 비율(DrWhite Region Block)을 계산한다. 즉, 아래의 수학식 9가 실행된다.For each of the blocks corresponding to the white area, the block red ratio of the result obtained by multiplying the ratio of the block red-chrominance value (Cr Block ) to the block luminance value (Y Block ) by the number k for normalization ( Dr White Region Block ) is calculated. That is, Equation 9 below is executed.

Figure 112018129385551-pat00009
Figure 112018129385551-pat00009

프로세서는, 화이트 영역에 해당하는 블록들 각각에 대하여, 상기 블록 휘도 값(YBlock)에 대한 상기 블록 청색-색차 값(CbBlock)의 비율에 상기 정규화용 숫자가 곱해진 결과의 블록 청색 비율(DbWhite Region Block)을 계산한다. 즉, 아래의 수학식 10이 실행된다.For each of the blocks corresponding to the white area, the block blue ratio (result obtained by multiplying the ratio of the block blue-chrominance value (Cb Block ) to the block luminance value (Y Block ) by the number for normalization) Db White Region Block ) is calculated. That is, Equation 10 below is executed.

Figure 112018129385551-pat00010
Figure 112018129385551-pat00010

여기에서, 화이트 영역에 해당하는 블록들 각각에 대하여, 미리 설정되어 있는 복수의 가중값들 중에서 블록들 각각의 블록 적색 비율(DrWhite Region Block)과 블록 청색 비율(DrWhite Region Block)에 가장 근접되는 가중값(Weightblock)이 선택된다.Here, for each of the blocks corresponding to the white area, among a plurality of preset weight values, the block red ratio (Dr White Region Block ) and the block blue ratio (Dr White Region Block ) of each of the blocks are closest to each other. Weight block is selected.

단계 (S4)에서, 프로세서는, 특정 색상 영역에 해당하는 블록들 각각에 대하여, 색상별로 다르게 설정되어 있는 목표 적색 게인(RGainco target value), 목표 청색 게인(BGainco target value), 및 목표 가중값(Weightco target value)을 적용하여 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 선정한다.In step S4, the processor sets a target red gain (RGain co target value ), a target blue gain (BGain co target value ), and a target weight value set differently for each color for each of the blocks corresponding to the specific color region. (Weight co target value ) is applied to select red gain (RGain Block ), blue gain (BGain Block ), and weight value (Weight block ).

여기에서, 목표 적색 게인(RGainco target value), 목표 청색 게인(BGainco target value), 및 목표 가중값(Weightco target value)은 도 18을 참조하여 설명될 것이다.Here, a target red gain (RGain co target value ), a target blue gain (BGain co target value ), and a target weight value (Weight co target value ) will be described with reference to FIG. 18 .

단계 (S5)에서, 프로세서는, 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적용하여, 상기 입력 영상의 모든 화소 값들을 보정한다. 이와 관련된 내용이 도 4 내지 6을 참조하여 설명될 것이다.In step S5, the processor applies a red gain (RGain Block ), a blue gain (BGain Block ), and a weight value (Weight block ) of each of the blocks corresponding to the white area and the specific color area to obtain the input All pixel values of the image are corrected. Contents related to this will be described with reference to FIGS. 4 to 6 .

상기와 같이 화이트 밸런싱(white balancing)을 수행하는 방법에 의하면, 화이트 영역에 해당하는 블록들뿐만 아니라 특정 색상 영역에 해당하는 블록들도 적용 대상이 된다. 즉, 화이트 영역 및 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적용하여, 입력 영상의 모든 화소 값들을 보정한다.According to the method of performing white balancing as described above, not only blocks corresponding to a white area but also blocks corresponding to a specific color area are applied. That is, all pixel values of the input image are corrected by applying the red gain (RGain Block ), blue gain (BGain Block ), and weight block (Weight block ) of each of the blocks corresponding to the white area and the specific color area.

따라서, 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적절히 설정할 수 있으므로, 화이트 영역이 상대적으로 넓게 설정되더라도 특정 색상들의 색 끌림 현상을 예방할 수 있다. 즉, 서로 다른 색온도의 광원들의 중복 조명에서 얻어진 촬영 영상에 대하여, 특정 색상들의 색 끌림 현상을 예방할 수 있다.Therefore, since the red gain (RGain Block ), blue gain (BGain Block ), and weight value (Weight block ) of each of the blocks corresponding to a specific color area can be appropriately set, even if the white area is set relatively wide, the color of specific colors You can prevent drag. That is, it is possible to prevent a color dragging phenomenon of specific colors in a photographed image obtained by overlapping illumination of light sources having different color temperatures.

도 4는 도 1에서의 단계 S5의 상세 단계들을 보여준다.FIG. 4 shows detailed steps of step S5 in FIG. 1 .

도 5는 도 4의 단계 S503에서의 기준-게인 좌표 영역이 설정됨을 보여준다.FIG. 5 shows that the reference-gain coordinate area is set in step S503 of FIG. 4 .

도 6은 도 4의 단계 S503에서의 보정 매트릭스의 예를 보여준다.FIG. 6 shows an example of a correction matrix in step S503 of FIG. 4 .

도 4 내지 6을 참조하여, 도 1에서의 단계 S5의 상세 단계들을 설명하기로 한다.Referring to FIGS. 4 to 6 , detailed steps of step S5 in FIG. 1 will be described.

프로세서는, 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 가중값(Weightblock)의 총합에 대한 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock)과 가중값(Weightblock)의 곱의 총합의 비율인 적색 게인의 총합 비율(RGaintot)을 계산한다(단계 S501). 여기에서 아래의 수학식 11이 실행된다.The processor calculates a red gain (RGain Block ) and a weight value of each of the blocks corresponding to the white area and the specific color area with respect to the sum of weight values (Weight block ) of each of the blocks corresponding to the white area and the specific color area. A ratio of the total sum of the products of (Weight block ), RGain tot , is calculated (Step S501 ). Here, Equation 11 below is executed.

Figure 112018129385551-pat00011
Figure 112018129385551-pat00011

프로세서는, 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 가중값(Weightblock)의 총합에 대한 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 청색 게인(BGainBlock)과 가중값(Weightblock)의 곱의 총합의 비율인 청색 게인의 총합 비율(BGaintot)을 계산한다(단계 S502). 여기에서 아래의 수학식 12가 실행된다.The processor calculates a blue gain (BGain Block ) and a weight value of each of the blocks corresponding to the white region and the specific color region relative to the sum of the weight values (Weight block ) of each of the blocks corresponding to the white region and the specific color region. The ratio of the total sum of the products of (Weight block ), BGain tot , is calculated (Step S502 ). Here, Equation 12 below is executed.

Figure 112018129385551-pat00012
Figure 112018129385551-pat00012

프로세서는, 적색 게인의 총합 비율(RGaintot)을 적용될 최종 적색-게인 비율RGainfinal)로 설정하고, 상기 청색 게인의 총합 비율(BGaintot)을 적용될 최종 청색-게인 비율(BGainfinal)로 설정하되, 미리 설정되어 있는 기준 게인-좌표 영역 내에 들도록 상기 최종 적색-게인 비율(RGainfinal)과 상기 최종 청색-게인 비율(BGainfinal)을 조정한다(단계 S503).The processor sets the ratio of the total red gain (RGain tot ) to the final red-gain ratio RGain final ) to be applied, and sets the ratio of the total sum of the blue gains (BGain tot ) to the final blue-gain ratio (BGain final ) to be applied, , the final red-gain ratio (RGain final ) and the final blue-gain ratio (BGain final ) are adjusted so as to fall within a preset reference gain-coordinate range (step S503).

상기 기준-게인 좌표 영역의 설정 방법은 도 14를 참조하여 설명될 것이다. 이에 따라 작성된 도 5를 참조하면, 적색 게인과 청색 게인의 2차원 그래프상에서 기준-게인 좌표 영역의 꼭지점들은 1 내지 5이다. 이와 같은 기준-게인 좌표 영역이 적용됨에 의하여, 저색 광원(백열등, 할로겐등)의 고유의 색상이 어느 정도 유지될 수 있으므로, 현실 재현성이 높아질 수 있다.A method of setting the reference-gain coordinate area will be described with reference to FIG. 14 . Referring to FIG. 5 prepared accordingly, vertices of the reference-gain coordinate area are 1 to 5 on the two-dimensional graph of the red gain and the blue gain. By applying such a reference-gain coordinate area, since the inherent color of a low-color light source (incandescent light, halogen light, etc.) can be maintained to some extent, reality reproducibility can be improved.

다음에, 프로세서는, 상기 최종 적색-게인 비율(RGainfinal), 상기 최종 청색-게인 비율(BGainfinal) 및 보정 매트릭스(601)를 적용하여, 상기 입력 영상의 모든 화소 값들을 보정한다(단계 S504). 잘 알려져 있는 바와 같이, 도 6과 같은 형식의 보정 매트릭스(601)는 입력 영상의 적색(R), 녹색(G), 및 청색(B)의 화소 값들 모두에 적용된다. Next, the processor corrects all pixel values of the input image by applying the final red-gain ratio (RGain final ), the final blue-gain ratio (BGain final ) and the correction matrix 601 (step S504). ). As is well known, the correction matrix 601 in the form of FIG. 6 is applied to all red (R), green (G), and blue (B) pixel values of an input image.

한편, 도 1의 상기 단계 (S2)를 수행하기 위하여 2차원 그래프 상에서 상기 화이트 영역이 미리 설정되어 있다. Meanwhile, in order to perform the step (S2) of FIG. 1, the white area is preset on the two-dimensional graph.

도 7은 도 1의 단계 (S2)를 수행하기 위하여 화이트 영역을 설정하는 방법을 보여준다.FIG. 7 shows a method of setting a white area to perform step S2 of FIG. 1 .

도 8은 도 7의 단계 S701에서 구해진 화이트 영상들(I1 내지 Ik)을 보여준다.FIG. 8 shows white images I1 to Ik obtained in step S701 of FIG. 7 .

도 9는 도 7의 단계 S710에서 각각의 좌표가 2차원 그래프 상에 표시됨을 보여준다. 도 9에서 참조 부호 901은 색온도 별 화이트 영상의 적색 비율(Dr)과 청색 비율(Db)의 테이블을 가리킨다. 참조 부호 902는 색온도 별 화이트 영상의 적색 비율(Dr)과 청색 비율(Db)의 그래프를 가리킨다.FIG. 9 shows that each coordinate is displayed on a two-dimensional graph in step S710 of FIG. 7 . In FIG. 9 , reference numeral 901 indicates a table of a red ratio (Dr) and a blue ratio (Db) of a white image for each color temperature. Reference numeral 902 indicates a graph of a red ratio (Dr) and a blue ratio (Db) of a white image for each color temperature.

도 10은 도 9에서 표시된 좌표들에 따라 화이트 영역이 설정됨을 보여준다. 도 10에서 참조 부호 1001은 화이트 영역을 가리킨다.FIG. 10 shows that the white area is set according to the coordinates indicated in FIG. 9 . Reference numeral 1001 in FIG. 10 indicates a white area.

도 7 내지 10을 참조하여, 화이트 영역을 설정하는 방법을 설명하기로 한다.A method of setting a white area will be described with reference to FIGS. 7 to 10 .

먼저, 주위 조명의 색온도를 다르게 하면서 기준 화이트 보드를 촬영하여, 서로 다른 색온도의 k 개의 화이트 영상들(I1 내지 Ik)을 구한다(단계 S701).First, a reference white board is photographed while changing the color temperature of ambient light, and k white images I1 to Ik of different color temperatures are obtained (step S701).

다음에, 기준 태양광 조명에서 상기 기준 화이트 보드를 촬영하여, 태양광의 화이트 영상을 구한다(단계 S702).Next, a white image of sunlight is obtained by photographing the standard white board under standard sunlight illumination (step S702).

다음에, 상기 태양광의 화이트 영상의 평균 적색 값(Rsolar), 평균 녹색 값(Gsolar), 및 평균 청색(Bsolar) 값을 계산한다(단계 S703).Next, the average red value (R solar ), average green value (G solar ), and average blue value (B solar ) of the white image of sunlight are calculated (step S703).

다음에, 상기 태양광의 화이트 영상의 청색 게인(BGainsolar) 및 적색 게인(RGainsolar)을 계산한다(단계 S704). Next, blue gain (BGain solar ) and red gain (RGain solar ) of the white image of the sunlight are calculated (step S704).

상기 단계 S704는 아래의 두 단계들로 구분될 수 있다.The step S704 can be divided into the following two steps.

먼저, 상기 평균 청색(Bsolar) 값에 대한 상기 평균 녹색 값(Gsolar)의 비율인 상기 태양광의 화이트 영상의 청색 게인(BGainsolar)을 계산한다(단계 S704-1). 즉, 아래의 수학식 13이 실행된다.First, a blue gain ( BGain solar ) of the white image of the sunlight, which is a ratio of the average green value (G solar ) to the average blue (B solar ) value, is calculated (step S704-1). That is, Equation 13 below is executed.

Figure 112018129385551-pat00013
Figure 112018129385551-pat00013

다음에, 상기 평균 적색 값(Rsolar)에 대한 상기 평균 녹색 값(Gsolar)의 비율인 상기 태양광의 화이트 영상의 적색 게인(RGainsolar)을 계산한다(단계 S704-2). 즉, 아래의 수학식 14가 실행된다.Next, a red gain (RGain solar ) of the white image of sunlight, which is a ratio of the average green value (G solar ) to the average red value (R solar ) , is calculated (step S704-2). That is, Equation 14 below is executed.

Figure 112018129385551-pat00014
Figure 112018129385551-pat00014

다음에, 상기 서로 다른 색온도의 k 개의 화이트 영상들(I1 내지 Ik) 각각을 복수의 블록들로 구획한다(단계 S705). 구획 방법은 도 2를 참조하여 설명된 바와 같다.Next, each of the k white images I1 to Ik of different color temperatures is partitioned into a plurality of blocks (step S705). The segmentation method is as described with reference to FIG. 2 .

다음에, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각의 평균 적색 값(Raverage), 평균 녹색 값(Gaverage), 및 평균 청색 값(Baverage)을 계산한다(단계 S706).Next, an average red value (R average ), an average green value (G average ), and an average blue value (B average ) of each of the plurality of blocks of the plurality of white images I1 to Ik are calculated ( Step S706).

다음에, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 정규화된 블록 적색 값(Rblock), 정규화된 블록 청색 값(Bblock), 및 정규화된 블록 녹색 값(Gblock)을 구한다(단계 S707). Next, for each of the plurality of blocks of the plurality of white images I1 to Ik, a normalized block red value (R block ), a normalized block blue value (B block ), and a normalized block green value (G block ) is obtained (step S707).

상기 단계 S707은 다음의 세 단계들을 포함한다.The step S707 includes the following three steps.

첫째, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 평균 적색 값(Raverage)에 상기 태양광의 화이트 영상의 적색 게인(RGainsolar)이 곱해진 결과의 정규화된 블록 적색 값(Rblock)을 계산한다(단계 S707-1). 즉, 아래의 수학식 15를 실행한다.First, for each of the plurality of blocks of the plurality of white images I1 to Ik, a normalization result obtained by multiplying an average red value (R average ) by a red gain (RGain solar ) of the white image of sunlight is normalized. A block red value (R block ) is calculated (step S707-1). That is, Equation 15 below is executed.

Figure 112018129385551-pat00015
Figure 112018129385551-pat00015

둘째, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 상기 평균 청색 값(Baverage)에 상기 태양광의 화이트 영상의 청색 게인(BGainsolar)이 곱해진 결과의 정규화된 블록 청색 값(Bblock)을 계산한다(단계 S707-2). 즉, 아래의 수학식 16을 실행한다.Second, for each of the plurality of blocks of the plurality of white images I1 to Ik, normalization of a result obtained by multiplying the average blue value B average by the blue gain BGain solar of the white image of sunlight A block blue value (B block ) is calculated (step S707-2). That is, Equation 16 below is executed.

Figure 112018129385551-pat00016
Figure 112018129385551-pat00016

셋째, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 상기 평균 녹색 값(Gaverage)을 정규화된 블록 녹색 값(Gblock)으로 설정한다(단계 S707-3). 즉, 아래의 수학식 17을 실행한다.Third, for each of the plurality of blocks of the plurality of white images I1 to Ik, the average green value (G average ) is set to a normalized block green value (G block ) (step S707-3). . That is, Equation 17 below is executed.

Figure 112018129385551-pat00017
Figure 112018129385551-pat00017

다음에, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 상기 정규화된 블록 청색 값(Bblock), 상기 정규화된 블록 적색 값(Rblock), 및 상기 정규화된 블록 녹색 값(Gblock)을 적용하여, 블록 휘도 값(Yblock), 블록 적색-색차 값(Crblock), 및 블록 청색-색차 값(Cbblock)을 계산한다(단계 S708). 본 실시예의 경우, 상기 단계 S708에서 상기 수학식 6 내지 8이 사용된다. Next, for each of the plurality of blocks of the plurality of white images I1 to Ik, the normalized block blue value (B block ), the normalized block red value (R block ), and the normalized block red value (R block ) By applying the block green value (G block ), a block luminance value (Y block ), a block red-chrominance value (Cr block ), and a block blue-chrominance value (Cb block ) are calculated (step S708). In the case of this embodiment, Equations 6 to 8 are used in the step S708.

다음에, 상기 복수의 화이트 영상들(I1 내지 Ik) 각각에 대하여 적색 비율(Dr) 및 청색 비율(Db)을 계산한다(단계 S709). 상기 단계 S709는 다음 세 단계들을 포함한다.Next, a red ratio Dr and a blue ratio Db are calculated for each of the plurality of white images I1 to Ik (step S709). The step S709 includes the following three steps.

첫째, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 상기 블록 휘도 값(Yblock)에 대한 상기 블록 적색-색차 값(Crblock)의 비율에 정규화용 숫자 k가 곱해진 결과의 블록 적색 비율(Drblock)을 계산한다(단계 S709-1). 즉, 아래의 수학식 18이 사용된다.First, with respect to each of the plurality of blocks of the plurality of white images I1 to Ik, the normalization number k corresponds to the ratio of the block red-chrominance value (Cr block ) to the block luminance value (Y block ). The block red ratio (Dr block ) of the result multiplied by is calculated (step S709-1). That is, Equation 18 below is used.

Figure 112018129385551-pat00018
Figure 112018129385551-pat00018

둘째, 상기 복수의 화이트 영상들(I1 내지 Ik)의 상기 복수의 블록들 각각에 대하여, 상기 블록 휘도 값(Yblock)에 대한 상기 블록 청색-색차 값(Cbblock)의 비율에 상기 정규화용 숫자가 곱해진 결과의 블록 청색 비율(Dbblock)을 계산한다(단계 S709-2). 즉, 아래의 수학식 19가 사용된다.Second, with respect to each of the plurality of blocks of the plurality of white images I1 to Ik, the normalization number corresponds to the ratio of the block blue-chrominance value (Cb block ) to the block luminance value (Y block ). Calculate the block blue ratio (Db block ) of the result multiplied by (step S709-2). That is, Equation 19 below is used.

Figure 112018129385551-pat00019
Figure 112018129385551-pat00019

셋째, 상기 복수의 화이트 영상들(I1 내지 Ik) 각각에 대하여, 상기 블록 적색 비율(Drblock)의 총합으로서의 적색 비율(Dr) 및 상기 블록 청색 비율(Dbblock)의 총합으로서의 청색 비율(Db)을 계산한다(단계 S709-3). Third, for each of the plurality of white images I1 to Ik, the red ratio (Dr) as the sum of the block red ratio (Dr block ) and the blue ratio (Db) as the sum of the block blue ratio (Db block ) Calculate (step S709-3).

다음에, 2차원 그래프(902)의 제1축을 상기 적색 비율(Dr)의 축으로, 그리고 제2축을 상기 청색 비율(Db)의 축으로 설정하여, 복수의 화이트 영상들(I1 내지 Ik) 각각의 상기 적색 비율(Dr)과 상기 청색 비율(Db)의 좌표를 상기 2차원 그래프상에 표시하고, 표시된 좌표 영역이 포함되도록 상기 화이트 영역(1102)을 설정한다(단계 S710). 이를 단계적으로 설명하면 다음과 같다. Next, by setting the first axis of the 2D graph 902 as the axis of the red ratio (Dr) and the second axis as the axis of the blue ratio (Db), each of the plurality of white images I1 to Ik The coordinates of the red ratio Dr and the blue ratio Db of are displayed on the 2D graph, and the white area 1102 is set to include the displayed coordinate area (step S710). A step-by-step explanation of this is as follows.

먼저, 색온도 별 화이트 영상의 적색 비율(Dr)과 청색 비율(Db)의 테이블(901)에 따라 색온도 별 화이트 영상의 적색 비율(Dr)과 청색 비율(Db)의 그래프(902)를 작성한다(도 9 참조).First, a graph 902 of the red ratio (Dr) and blue ratio (Db) of the white image for each color temperature is prepared according to the table 901 of the red ratio (Dr) and blue ratio (Db) of the white image for each color temperature ( see Figure 9).

다음에, 표시된 좌표 영역을 기준으로 하여 화이트 영역의 그래프를 작성함에 의하여, 화이트 영역(1001)을 설정한다(도 10 참조).Next, a white area 1001 is set by creating a white area graph based on the displayed coordinate area (see FIG. 10).

도 11은 도 7의 단계들이 수행됨에 이어서 추가적으로 수행되는 설정 단계들을 보여준다.FIG. 11 shows additional setup steps performed following the steps of FIG. 7 .

도 12는 도 11의 단계 S1101에 의하여 설정된 테이블의 예를 보여준다. FIG. 12 shows an example of a table set by step S1101 of FIG. 11 .

도 11 및 12를 참조하면, 화이트 영역(도 10의 1001)을 설정한 후, 이에 상응하는 구간 기준점 테이블(1201)을 설정한다(단계 S1101). 즉, k 개의 색온도에 대한 상기 적색 비율(Dr)과 청색 비율(Db)의 테이블(1201)을 설정한다. 본 실시예의 경우, k 개의 색온도에 대한 상기 적색 비율(Dr)과 청색 비율(Db)의 좌표가 각각의 구간 기준점의 좌표이다.11 and 12, after setting a white area (1001 in FIG. 10), a corresponding section reference point table 1201 is set (step S1101). That is, a table 1201 of the red ratio (Dr) and blue ratio (Db) for k color temperatures is set. In this embodiment, the coordinates of the red ratio (Dr) and blue ratio (Db) for k color temperatures are the coordinates of each section reference point.

다음에, 각각의 구간 기준점에 대하여 보정 매트릭스 및 가중값을 설정한다(단계 S1102). 가중값의 설정에 있어서, 색온도가 높아질수록 가중값이 높아지도록 설정되었다. 이에 따라, 인간의 시각적 특성에 보다 부합되는 화이트 밸런싱의 결과를 얻을 수 있다. Next, a correction matrix and weight values are set for each segment reference point (step S1102). In setting the weight value, the weight value is set to increase as the color temperature increases. Accordingly, it is possible to obtain a result of white balancing that is more in line with human visual characteristics.

아래의 표 1은 각각의 구간 기준점에 대하여 보정 매트릭스 및 가중값이 설정된 예를 보여준다.Table 1 below shows an example in which correction matrices and weight values are set for each interval reference point.

구간 기준점 번호 Interval base point number Dr Dr Db Db 색온도(K) Color temperature (K) 보정 매트릭스 번호correction matrix number 가중값 weight 1 One . . . . 11000 11000 1 One ω1 ω 1 2 2 . . . . 8000 8000 2 2 ω2 ω 2 3 3 . . . . 7000 7000 3 3 ω3 ω 3 4 4 . . . . 5000 5000 4 4 ω4 ω 4 5 5 . . . . 4000 4000 5 5 ω5 ω 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K K . . . . 1800 1800 K K ωK ω K

도 13은 도 4의 단계 S503 및 도 5에서의 기준-게인 좌표 영역이 설정되는 과정을 보여준다. 도 5, 8 및 13을 참조하여, 도 13의 과정을 설명하기로 한다.FIG. 13 shows a process of setting the reference-gain coordinate area in step S503 of FIG. 4 and FIG. 5 . The process of FIG. 13 will be described with reference to FIGS. 5, 8 and 13.

프로세서는, 복수의 화이트 영상들(I1 내지 Ik) 각각의 평균 적색 값(RTemp), 평균 녹색 값(GTemp), 및 평균 청색 값(BTemp)을 계산한다(단계 S1301).The processor calculates an average red value (R Temp ), an average green value (G Temp ), and an average blue value (B Temp ) of each of the plurality of white images I1 to Ik (step S1301).

프로세서는, 상기 평균 적색 값(RTemp)에 대한 상기 평균 녹색 값(GTemp)의 비율인 상기 복수의 화이트 영상들 각각의 적색 게인(RGainTemp)을 계산한다(단계 S1302). 즉, 아래의 수학식 20이 실행된다. The processor calculates a red gain (RGain Temp ) of each of the plurality of white images, which is a ratio of the average green value (G Temp ) to the average red value (R Temp ) (step S1302). That is, Equation 20 below is executed.

Figure 112018129385551-pat00020
Figure 112018129385551-pat00020

프로세서는, 상기 평균 청색 값(BTemp)에 대한 상기 평균 녹색 값(GTemp)의 비율인 상기 복수의 화이트 영상들 각각의 청색 게인(BGainTemp)을 계산한다(단계 S1303). 즉, 아래의 수학식 21이 실행된다. The processor calculates a blue gain (BGain Temp ) of each of the plurality of white images, which is a ratio of the average green value (G Temp ) to the average blue value (B Temp ) (step S1303). That is, Equation 21 below is executed.

Figure 112018129385551-pat00021
Figure 112018129385551-pat00021

각각의 화이트 영상(I1 내지 Ik) 즉, 각각의 색온도에 대하여 구해진 적색 게인(RGainTemp)과 청색 게인(BGainTemp)의 예는 아래의 표 2와 같다(도 5 참조).Examples of red gain (RGain Temp ) and blue gain (BGain Temp ) obtained for each white image (I1 to Ik), that is, each color temperature, are shown in Table 2 below (see FIG. 5).

화이트 영상 번호 white video number 적색 게인(RGainTemp) Red Gain (RGain Temp ) 청색 게인(BGainTemp)Blue Gain (BGain Temp ) 색온도(K) Color temperature (K) I1 I1 . . . . 11000 11000 I2 I2 . . . . 8000 8000 I3 I3 . . . . 7000 7000 I4 I4 . . . . 5000 5000 I5 I5 . . . . 4000 4000 . . . . . . . . . . . . . . . . . . . . . . . . Ik Ik . . . . 1800 1800

다음에, 프로세서는, 2차원 그래프의 제1축(X-축)을 상기 적색 게인(RGainTemp)의 축으로, 그리고 제2축(Y-축)을 상기 청색 게인(BGainTemp)의 축으로 설정한다(단계 S1304, 도 5 참조).Next, the processor takes the first axis (X-axis) of the two-dimensional graph as the axis of the red gain (RGain Temp ) and the second axis (Y-axis) as the axis of the blue gain (BGain Temp ). Set (step S1304, see Fig. 5).

그리고 프로세서는, 상기 복수의 화이트 영상들(I1 내지 Ik) 각각의 상기 적색 게인(RGainTemp)과 상기 청색 게인(BGainTemp)의 좌표를 상기 2차원 그래프상에 표시하고, 표시된 좌표 영역이 포함되도록 상기 기준 게인-좌표 영역을 설정한다(단계 S1305). 이에 따라 작성된 도 5를 참조하면, 표시된 좌표 영역은 굵은 곡선의 영역이다. 상기한 바와 같이, 기준-게인 좌표 영역의 꼭지점들은 1 내지 5이다.The processor displays the coordinates of the red gain (RGain Temp ) and the blue gain (BGain Temp ) of each of the plurality of white images (I1 to Ik) on the 2D graph, and the displayed coordinate area is included. The reference gain-coordinate area is set (step S1305). Referring to FIG. 5 prepared accordingly, the displayed coordinate area is an area of a thick curve. As described above, the vertices of the reference-gain coordinate region are 1 to 5.

이와 같은 기준-게인 좌표 영역이 적용됨에 의하여, 저색 광원(백열등, 할로겐등)의 고유의 색상이 어느 정도 유지될 수 있으므로, 현실 재현성이 높아질 수 있다.By applying such a reference-gain coordinate area, since the inherent color of a low-color light source (incandescent light, halogen light, etc.) can be maintained to some extent, reality reproducibility can be improved.

한편, 도 4의 단계 (S504)에서 적용될 상기 보정 매트릭스는, 상기 복수의 화이트 영상들(I1 내지 Ik) 각각의 상기 적색 비율(Dr)과 상기 청색 비율(Db)에 따라 미리 설정되어 있는 복수의 보정 매트릭스들 중에서 어느 하나이다.Meanwhile, the correction matrix to be applied in step S504 of FIG. 4 is a plurality of previously set according to the red ratio Dr and the blue ratio Db of each of the plurality of white images I1 to Ik. One of the correction matrices.

도 14는 복수의 보정 매트릭스들 중에서 도 4의 단계 S504에서 적용될 보정 매트릭스(도 6의 601)를 선택하는 방법을 보여준다. 도 2 내지 4, 도 6 및 14를 참조하여, 적용될 보정 매트릭스(도 6의 601)를 선택하는 방법을 설명하기로 한다.FIG. 14 shows a method of selecting a correction matrix (601 in FIG. 6) to be applied in step S504 of FIG. 4 from among a plurality of correction matrices. Referring to Figs. 2 to 4 and Figs. 6 and 14, a method of selecting a correction matrix (601 in Fig. 6) to be applied will be described.

프로세서는 상기 화이트 영역에 해당하는 블록들 각각의 평균 적색 값(Raverage), 평균 녹색 값(Gaverage), 및 평균 청색 값(Baverage)을 계산한다(단계 S1401).The processor calculates an average red value (R average ), an average green value (G average ), and an average blue value (B average ) of each of the blocks corresponding to the white area (step S1401).

프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 정규화된 블록 적색 값(RBlock), 정규화된 블록 녹색 값(GBlock), 및 정규화된 블록 청색 값(BBlock)을 구한다(단계 S1402). 이 단계 S1402를 상세히 설명하면 다음과 같다.The processor obtains a normalized block red value (R Block ), a normalized block green value (G Block ), and a normalized block blue value (B Block ) for each of the blocks corresponding to the white area (step S1402 ). A detailed description of this step S1402 is as follows.

프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 평균 적색 값(Raverage)에 상기 태양광의 화이트 영상의 적색 게인(RGainsolar)이 곱해진 결과의 정규화된 블록 적색 값(RBlock)을 계산한다(단계 S1402-1). 즉, 상기 수학식 1에 의한 정규화된 블록 적색 값(RBlock)이 사용된다.For each of the blocks corresponding to the white region, the processor obtains a normalized block red value (R Block ) obtained by multiplying the average red value (R average ) by the red gain (RGain solar ) of the white image of the sunlight. Calculate (step S1402-1). That is, the normalized block red value (R Block ) according to Equation 1 is used.

프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 상기 평균 녹색 값(Gaverage)을 정규화된 블록 녹색 값(GBlock)으로 설정한다(단계 S1402-2). 즉, 상기 수학식 2에 의한 정규화된 블록 녹색 값(GBlock)이 사용된다.The processor sets the average green value (G average ) to the normalized block green value (G Block ) for each of the blocks corresponding to the white area (step S1402-2). That is, the normalized block green value (G Block ) according to Equation 2 is used.

그리고 프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 상기 평균 청색 값(Baverage)에 상기 태양광의 화이트 영상의 청색 게인(BGainsolar)이 곱해진 결과의 정규화된 블록 청색 값(BBlock)을 계산한다(단계 S1402-3). 즉, 상기 수학식 3에 의한 정규화된 블록 청색 값(BBlock)이 사용된다.Further, the processor, for each of the blocks corresponding to the white region, the normalized block blue value (B Block ) is calculated (step S1402-3). That is, the normalized block blue value (B Block ) according to Equation 3 is used.

다음에, 프로세서는, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 상기 정규화된 블록 청색 값(BBlock), 상기 정규화된 블록 적색 값(RBlock), 및 상기 정규화된 블록 녹색 값(GBlock)을 적용하여, 블록 휘도 값(YBlock), 블록 적색-색차 값(CrBlock), 및 블록 청색-색차 값(CbBlock)을 계산한다(단계 S1403). 즉, 상기 수학식 6 내지 8에 의한 값들이 사용된다.Next, for each of the blocks corresponding to the white area, the normalized block blue value (B Block ), the normalized block red value (R Block ), and the normalized block green value (G Block ) ) is applied to calculate a block luminance value (Y Block ), a block red-chrominance value (Cr Block ), and a block blue-color difference value (Cb Block ) (step S1403). That is, the values according to Equations 6 to 8 are used.

다음에, 프로세서는, 화이트 영역에 해당하는 블록들의 블록 적색 비율(DrWhite Region Block)의 총합(Drtot) 및 블록 청색 비율(DbWhite Region Block)의 총합(Dbtot)을 계산한다(단계 S1404). 상기 단계 S1404는 아래의 세 단계들로 구분될 수 있다.Next, the processor calculates the total sum (Dr tot ) of the block red ratio (Dr White Region Block ) and the total sum (Db tot ) of the block blue ratio (Db White Region Block ) of the blocks corresponding to the white region (step S1404 ). The step S1404 can be divided into the following three steps.

첫째, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 프로세서는 상기 블록 휘도 값(YBlock)에 대한 상기 블록 적색-색차 값(CrBlock)의 비율에 상기 정규화용 숫자가 곱해진 결과의 블록 적색 비율(DrWhite Region Block)을 계산한다(단계 S1404-1). 즉, 상기 수학식 9에 의한 블록 적색 비율(DrWhite Region Block)이 사용된다.First, with respect to each of the blocks corresponding to the white area, the processor multiplies the ratio of the block red-chrominance value (Cr Block ) to the block luminance value (Y Block ) by the normalization number to obtain a block red color. The ratio (Dr White Region Block ) is calculated (step S1404-1). That is, the block red ratio (Dr White Region Block ) according to Equation 9 is used.

둘째, 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 프로세서는 상기 블록 휘도 값(YBlock)에 대한 상기 블록 청색-색차 값(CbBlock)의 비율에 상기 정규화용 숫자가 곱해진 결과의 블록 청색 비율(DbWhite Region Block)을 계산한다(단계 S1404-2). 즉, 상기 수학식 10에 의한 블록 청색 비율(DbWhite Region Block)이 사용된다.Second, for each of the blocks corresponding to the white area, the processor multiplies the ratio of the block blue-chrominance value (Cb Block ) to the block luminance value (Y Block ) by the normalization number to obtain a block blue color. The ratio (Db White Region Block ) is calculated (step S1404-2). That is, the block blue ratio (Db White Region Block ) according to Equation 10 is used.

셋째, 프로세서는, 화이트 영역에 해당하는 블록들의 블록 적색 비율(DrWhite Region Block)의 총합(Drtot) 및 블록 청색 비율(DbWhite Region Block)의 총합(Dbtot)을 계산한다(단계 S1404-3). 즉, 아래의 수학식 22 및 23이 실행된다.Thirdly, the processor calculates the total (Dr tot ) of the block red ratio (Dr White Region Block ) and the total sum (Db tot ) of the block blue ratio (Db White Region Block ) of the blocks corresponding to the white region (step S1404- 3). That is, Equations 22 and 23 below are executed.

Figure 112018129385551-pat00022
Figure 112018129385551-pat00022

Figure 112018129385551-pat00023
Figure 112018129385551-pat00023

프로세서는, 상기 복수의 보정 매트릭스들 중에서, 상기 블록 적색 비율(DrWhite Region Block)의 총합(Drtot) 및 상기 블록 청색 비율(DbWhite Region Block)의 총합(Dbtot)에 가장 근접되는 상기 적색 비율(Dr)과 상기 청색 비율(Db)의 보정 매트릭스(도 6의 601)를 선택한다(단계 S1405).Among the plurality of correction matrices, the processor determines the red color closest to the sum (Dr tot ) of the block red ratio (Dr White Region Block ) and the sum (Db tot ) of the block blue ratio (Db White Region Block ). A correction matrix (601 in FIG. 6) of the ratio Dr and the blue ratio Db is selected (step S1405).

한편, 상기 단계 (S2)를 수행하기 위하여 2차원 그래프 상에서 상기 특정 색상 영역이 미리 설정되어 있다.Meanwhile, in order to perform the step (S2), the specific color region is set in advance on the 2D graph.

도 15는 도 1의 단계 (S2)를 수행하기 위하여 특정 색상 영역을 설정하는 방법을 보여준다.FIG. 15 shows a method of setting a specific color region to perform step (S2) of FIG. 1 .

도 16은 도 15의 단계 S1501을 수행하기 위하여 촬영되는 컬러 체커(Color checker)의 보드(1601)를 보여준다.FIG. 16 shows a board 1601 of a color checker taken to perform step S1501 of FIG. 15 .

도 17은 도 15의 단계 S1508에서 특정 색상들 각각의 영역이 도 10의 화이트 영역과 함께 설정됨을 보여준다. 도 17에서 참조 부호 1701은 화이트 영역과 특정 색상 영역의 그래프를, 1001은 화이트 영역을, 그리고 1702 내지 1705는 특정 색상 영역들을 각각 가리킨다.FIG. 17 shows that in step S1508 of FIG. 15 , each area of specific colors is set together with the white area of FIG. 10 . In FIG. 17 , reference numeral 1701 indicates a graph of a white area and a specific color area, 1001 indicates a white area, and numerals 1702 to 1705 indicate specific color areas, respectively.

도 15 내지 17을 참조하여 도 15의 방법을 설명하기로 한다.The method of FIG. 15 will be described with reference to FIGS. 15 to 17 .

프로세서는, 특정 색상들을 포함한 색상들이 배열된 색상 보드(1601)를 기준 태양광 조명에서 촬영하여, 색상 배열 영상을 구한다(단계 S1501). The processor obtains a color arrangement image by photographing the color board 1601 in which colors including specific colors are arranged under standard sunlight illumination (step S1501).

프로세서는 상기 색상 배열 영상을 복수의 블록들로 구획한다(단계 S1502). 구획 방법은 도 2를 참조하여 설명된 바와 같다.The processor partitions the color array image into a plurality of blocks (step S1502). The segmentation method is as described with reference to FIG. 2 .

프로세서는 상기 색상 배열 영상의 상기 복수의 블록들 중에서 상기 특정 색상들 각각에 해당하는 블록들을 선정한다(단계 S1503). 본 실시예에서의 특정 색상들은 스킨(skin) 색, 녹색, 적색, 및 시안(cyan) 색이다. The processor selects blocks corresponding to the specific colors from among the plurality of blocks of the color array image (step S1503). Specific colors in this embodiment are skin color, green, red, and cyan color.

프로세서는, 특정 색상 별로 선정된 블록들의 화소 값들을 사용하여, 상기 특정 색상들 각각에 대하여 평균 청색 값(Baverage), 평균 적색 값(Raverage), 및 평균 녹색 값(Gaverage)을 계산한다(단계 S1504).The processor calculates an average blue value (B average ), an average red value (R average ), and an average green value (G average ) for each of the specific colors, using pixel values of blocks selected for each specific color. (Step S1504).

프로세서는, 상기 특정 색상들 각각에 대하여, 정규화된 청색 값(Bco), 정규화된 적색 값(Rco), 및 정규화된 녹색 값(Gco)을 구한다(단계 S1505). 이 단계 S1505는 다음 세 단계들로 구분될 수 있다.The processor obtains a normalized blue value (B co ), a normalized red value (R co ), and a normalized green value (G co ) for each of the specific colors (step S1505). This step S1505 can be divided into the following three steps.

프로세서는, 상기 특정 색상들 각각에 대하여, 상기 평균 청색 값(Baverage)에 상기 태양광의 화이트 영상의 청색 게인(BGainsolar)이 곱해진 결과의 정규화된 청색 값(Bco)을 계산한다(단계 S1505-1). 즉, 아래의 수학식 24에 의하여 정규화된 블록 청색 값(Rco)이 계산된다.The processor calculates, for each of the specific colors, a normalized blue value (B co ) obtained by multiplying the average blue value (B average ) by the blue gain (BGain solar ) of the white image of the sunlight (step S1505-1). That is, the normalized block blue value R co is calculated by Equation 24 below.

Figure 112018129385551-pat00024
Figure 112018129385551-pat00024

프로세서는, 상기 특정 색상들 각각에 대하여, 상기 평균 적색 값(Raverage)에 상기 태양광의 화이트 영상의 적색 게인(RGainsolar)이 곱해진 결과의 정규화된 적색 값(Rco)을 계산한다(단계 S1505-2). 즉, 아래의 수학식 25에 의하여 정규화된 블록 청색 값(Rco)이 계산된다.For each of the specific colors, the processor calculates a normalized red value (R co ) obtained by multiplying the average red value (R average ) by the red gain (RGain solar ) of the white image of the sunlight (step S1505-2). That is, the normalized block blue value (R co ) is calculated by Equation 25 below.

Figure 112018129385551-pat00025
Figure 112018129385551-pat00025

프로세서는, 상기 특정 색상들 각각에 대하여, 상기 평균 녹색 값(Gaverage)을 정규화된 녹색 값(Gco)으로 설정한다(단계 S1505-3). 즉, 아래의 수학식 26에 의하여 정규화된 녹색 값(Gco)이 계산된다.The processor sets the average green value (G average ) to the normalized green value (G co ) for each of the specific colors (step S1505-3). That is, the normalized green value (G co ) is calculated by Equation 26 below.

Figure 112018129385551-pat00026
Figure 112018129385551-pat00026

다음에, 프로세서는, 상기 특정 색상들 각각에 대하여, 상기 정규화된 청색 값(Bco), 상기 정규화된 적색 값(Rco), 및 상기 정규화된 녹색 값(Gco)을 적용하여, 휘도 값(Yco), 적색-색차 값(Crco), 및 청색-색차 값(Cbco)을 계산한다(단계 S1506). 본 실시예의 경우, 아래의 수학식 27 내지 29가 적용된다.Next, the processor applies the normalized blue value (B co ), the normalized red value (R co ), and the normalized green value (G co ) to each of the specific colors to obtain a luminance value. (Y co ), a red-color difference value (Cr co ), and a blue-color difference value (Cb co ) are calculated (step S1506). In the case of this embodiment, Equations 27 to 29 below are applied.

Figure 112018129385551-pat00027
Figure 112018129385551-pat00027

Figure 112018129385551-pat00028
Figure 112018129385551-pat00028

Figure 112018129385551-pat00029
Figure 112018129385551-pat00029

상기 수학식 27 내지 29에서, α1 내지 α9는 응용 시스템 별로 적절히 설정될 수 있는 상수들을 가리킨다. In Equations 27 to 29, α 1 to α 9 indicate constants that can be appropriately set for each application system.

다음에, 프로세서는, 상기 특정 색상들 각각에 대하여 적색 비율(Dr) 및 청색 비율(Db)을 계산한다(단계 S1507). 이 단계는 다음 두 단계들로 구분될 수 있다.Next, the processor calculates a red ratio (Dr) and a blue ratio (Db) for each of the specific colors (step S1507). This step can be divided into the following two steps.

프로세서는, 상기 특정 색상들 각각에 대하여, 상기 휘도 값(Yco)에 대한 상기 적색-색차 값(Crco)의 비율에 정규화용 숫자 k가 곱해진 결과의 적색 비율(Dr)을 계산한다(단계 S1507-1). 즉, 아래의 수학식 30이 실행된다.For each of the specific colors, the processor calculates a red ratio (Dr) obtained by multiplying the ratio of the red-chrominance value (Cr co ) to the luminance value (Y co ) by the normalization number k ( Step S1507-1). That is, Equation 30 below is executed.

Figure 112018129385551-pat00030
Figure 112018129385551-pat00030

프로세서는, 상기 특정 색상들 각각에 대하여, 상기 휘도 값(Yco)에 대한 상기 청색-색차 값(Cbco)의 비율에 상기 정규화용 숫자 k가 곱해진 결과의 청색 비율(Db)을 계산한다(단계 S1507-2). 즉, 아래의 수학식 31이 실행된다.For each of the specific colors, the processor calculates a blue ratio (Db) obtained by multiplying the ratio of the blue-chrominance value (Cb co ) to the luminance value (Y co ) by the number k for normalization. (Step S1507-2). That is, Equation 31 below is executed.

Figure 112018129385551-pat00031
Figure 112018129385551-pat00031

프로세서는, 특정 색상들 각각의 상기 적색 비율(Dr)과 상기 청색 비율(Db)의 좌표를 상기 2차원 그래프상(1701)에 표시하고, 표시된 좌표 영역이 각각 포함되도록 상기 특정 색상 영역(1702 내지 1705)을 설정한다(단계 S1508). The processor displays the coordinates of the red ratio (Dr) and the blue ratio (Db) of each of the specific colors on the 2D graph 1701, and the specific color regions 1702 to 1702 to include the displayed coordinate regions, respectively. 1705) is set (step S1508).

본 실시예의 경우, 화이트 영역(1001)은 다각형으로 설정되고, 특정 색상 영역(1702 내지 1705)은 타원형으로 설정된다. 물론, 화이트 영역(1001)과 특정 색상 영역(1702 내지 1705)은 하드웨어의 시스템 특성에 따라 또다른 형상으로 설정될 수 있다. In this embodiment, the white area 1001 is set as a polygon, and the specific color areas 1702 to 1705 are set as an ellipse. Of course, the white area 1001 and the specific color areas 1702 to 1705 may be set in another shape according to hardware system characteristics.

도 18은 도 15의 단계들이 수행됨에 이어서 추가적으로 수행되는 설정 단계들을 보여준다. 이 설정 단계들은 도 1의 단계 S4의 수행을 위하여 미리 수행되어야 한다. 이들을 설명하면 다음과 같다.FIG. 18 shows setup steps that are additionally performed after the steps of FIG. 15 are performed. These setting steps must be performed in advance to perform step S4 of FIG. 1 . These are explained as follows.

프로세서는, 특정 색상들 각각에 대하여, 상기 평균 적색 값(Raverage)에 대한 상기 평균 녹색 값(Gaverage)의 비율인 목표 적색 게인(RGainco target value)을 설정한다(단계 S1801). 여기에서 아래의 수학식 32의 계산 결과가 목표 적색 게인(RGainco target value)으로 설정된다. The processor sets a target red gain (RGain co target value), which is a ratio of the average green value (G average ) to the average red value (R average ), for each of the specific colors (step S1801). Here, the calculation result of Equation 32 below is set as the target red gain (RGain co target value ).

Figure 112018129385551-pat00032
Figure 112018129385551-pat00032

프로세서는, 특정 색상들 각각에 대하여, 상기 평균 청색 값(Baverage)에 대한 상기 평균 녹색 값(Gaverage)의 비율인 목표 청색 게인(BGainco target value)을 설정한다(단계 S1802). 여기에서 아래의 수학식 33의 계산 결과가 목표 청색 게인(BGainco target value)으로 설정된다. For each of the specific colors, the processor sets a target blue gain (BGain co target value) that is a ratio of the average green value (G average ) to the average blue value (B average ) (step S1802). Here, the calculation result of Equation 33 below is set as the target blue gain (BGain co target value ).

Figure 112018129385551-pat00033
Figure 112018129385551-pat00033

그리고, 프로세서는 특정 색상들 각각에 대하여 목표 가중값(Weightco target value)을 설정한다(단계 S1803). Then, the processor sets a target weight value (Weight co target value ) for each of the specific colors (step S1803).

이상 설명된 바와 같이, 본 발명의 실시예의 화이트 밸런싱(white balancing)을 수행하는 방법에 의하면, 화이트 영역에 해당하는 블록들뿐만 아니라 특정 색상 영역에 해당하는 블록들도 적용 대상이 된다. 즉, 화이트 영역 및 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적용하여, 입력 영상의 모든 화소 값들을 보정한다.As described above, according to the white balancing method according to an embodiment of the present invention, not only blocks corresponding to a white area but also blocks corresponding to a specific color area are applied. That is, all pixel values of the input image are corrected by applying the red gain (RGain Block ), blue gain (BGain Block ), and weight block (Weight block ) of each of the blocks corresponding to the white area and the specific color area.

따라서, 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적절히 설정할 수 있으므로, 화이트 영역이 상대적으로 넓게 설정되더라도 특정 색상들의 색 끌림 현상을 예방할 수 있다. 즉, 서로 다른 색온도의 광원들의 중복 조명에서 얻어진 촬영 영상에 대하여, 특정 색상들의 색 끌림 현상을 예방할 수 있다.Therefore, since the red gain (RGain Block ), blue gain (BGain Block ), and weight value (Weight block ) of each of the blocks corresponding to a specific color area can be appropriately set, even if the white area is set relatively wide, the color of specific colors You can prevent drag. That is, it is possible to prevent a color dragging phenomenon of specific colors in a photographed image obtained by overlapping illumination of light sources having different color temperatures.

이제까지 본 발명에 대하여 바람직한 실시예를 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 본 발명을 구현할 수 있음을 이해할 것이다. So far, the present invention has been mainly looked at with respect to preferred embodiments. Those skilled in the art to which the present invention belongs will understand that the present invention can be implemented in a modified form without departing from the essential characteristics of the present invention.

그러므로 상기 개시된 실시예는 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 특허청구범위에 의해 청구된 발명 및 청구된 발명과 균등한 발명들은 본 발명에 포함된 것으로 해석되어야 한다.Therefore, the disclosed embodiments should be considered from a descriptive point of view rather than a limiting point of view. The scope of the present invention is shown in the claims rather than the foregoing description, and the inventions claimed by the claims and inventions equivalent to the claimed inventions should be construed as being included in the present invention.

본 발명은 화이트 밸런싱(white balancing) 외의 영상 데이터 조정에도 이용될 가능성이 있다.There is a possibility that the present invention can also be used for image data adjustment other than white balancing.

201 : 영상 프레임, B1 내지 BN : 블록들,
601 : 보정 매트릭스, I1 내지 Ik : 화이트 영상들,
901 : 색온도 별 화이트 영상의 적색 비율(Dr)과 청색 비율(Db)의 테이블,
902 : 색온도 별 화이트 영상의 적색 비율(Dr)과 청색 비율(Db)의 그래프,
1001 : 화이트 영역,
1201 : 구간 기준점 테이블,
1601 : 컬러 체커(Color checker)의 보드,
1701 : 화이트 영역과 특정 색상 영역의 그래프,
1702 내지 1705 : 특정 색상 영역들.
201: video frame, B 1 to B N : blocks,
601: correction matrix, I1 to Ik: white images,
901: Table of red ratio (Dr) and blue ratio (Db) of white image for each color temperature,
902: A graph of the red ratio (Dr) and blue ratio (Db) of the white image for each color temperature,
1001: white area,
1201: section reference point table,
1601: board of color checker,
1701: graph of white area and specific color area,
1702 to 1705: specific color regions.

Claims (6)

입력 영상에 대하여 프로세서가 화이트 밸런싱(white balancing)을 수행하는 방법에 있어서,
(S1) 상기 입력 영상을 복수의 블록들로 구획함;
(S2) 상기 복수의 블록들 각각이 화이트 영역 또는 특정 색상 영역에 해당하는지를 판단함;
(S3) 상기 화이트 영역에 해당하는 블록들 각각에 대하여, 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 구함;
(S4) 색상별로 다르게 설정되어 있는 목표 적색 게인(RGainco target value), 목표 청색 게인(BGainco target value), 및 목표 가중값(Weightco target value)을 적용하여, 상기 특정 색상 영역에 해당하는 블록들 각각의 색상에 대응하는 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 선정함; 및
(S5) 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock), 청색 게인(BGainBlock), 및 가중값(Weightblock)을 적용하여, 상기 입력 영상의 모든 화소 값들을 보정함;을 포함하고,
상기 단계 (S3)는,
상기 화이트 영역에 해당하는 블록들 각각에 대하여, 평균 적색 값(Raverage), 평균 녹색 값(Gaverage), 및 평균 청색 값(Baverage)을 계산함;
상기 평균 적색 값(Raverage)에 태양광의 화이트 영상의 적색 게인(RGainsolar)이 곱해진 결과의 정규화된 블록 적색 값(RBlock), 상기 평균 녹색 값(Gaverage)을 정규화한 블록 녹색 값(Gblock), 및 평균 청색 값(Baverage)에 태양광의 화이트 영상의 청색 게인(BGainsolar)이 곱해진 결과의 정규화된 블록 청색 값(Bblock)을 계산함;
상기 블록 적색 값(RBlock)에 대한 상기 블록 녹색 값(Gblock)의 비율인 상기 적색 게인(RGainBlock), 및 상기 블록 청색 값(Bblock)에 대한 상기 블록 녹색 값(Gblock)의 비율인 상기 청색 게인(BGainBlock)을 계산함; 및
상기 입력 영상의 화이트 영역의 블록들 각각에 대하여, 미리 설정된 복수의 가중값들 중 각 블록의 블록 적색 비율(DrWhite Region Block)과 블록 청색 비율(DrWhite Region Block)에 가장 근접한 가중값(Weightblock)을 선택함;을 포함하고,
상기 단계 (S4)에 앞서, 상기 색상별로, 평균 적색 값(Raverage)에 대한 평균 녹색 값(Gaverage)의 비율인 상기 목표 적색 게인(RGainco target value), 평균 청색 값(Baverage)에 대한 평균 녹색 값(Gaverage)의 비율인 상기 목표 청색 게인(BGainco target value), 및 상기 목표 가중값(Weightco target value)이 설정된, 화이트 밸런싱(white balancing)을 수행하는 방법.
A method for performing white balancing by a processor on an input image, the method comprising:
(S1) dividing the input image into a plurality of blocks;
(S2) determining whether each of the plurality of blocks corresponds to a white area or a specific color area;
(S3) obtaining a red gain (RGain Block ), a blue gain (BGain Block ), and a weight value (Weight block ) for each of the blocks corresponding to the white area;
(S4) A block corresponding to the specific color region by applying a target red gain (RGain co target value ), a target blue gain (BGain co target value ), and a target weight value (Weight co target value ) set differently for each color select red gain (RGain Block ), blue gain (BGain Block ), and weight value (Weight block ) corresponding to each color; and
(S5) All pixel values of the input image are obtained by applying red gain (RGain Block ), blue gain (BGain Block ), and weight block (Weight block ) of each of the blocks corresponding to the white area and the specific color area. Including; correcting;
In the step (S3),
Calculate an average red value (R average ), an average green value (G average ), and an average blue value (B average ) for each of the blocks corresponding to the white area;
A normalized block red value (R Block ) obtained by multiplying the average red value (R average ) by a red gain (RGain solar ) of a white image of sunlight, and a block green value (normalized by the average green value (G average )) Calculate a normalized block blue value (B block ) obtained by multiplying G block ), and the average blue value (B average ) by the blue gain (B Gainsolar ) of the white image of sunlight;
The red gain (RGain Block ), which is the ratio of the block green value (G block ) to the block red value (R Block ), and the ratio of the block green value (G block ) to the block blue value (B block ) Calculate the blue gain (BGain Block ); and
For each of the blocks in the white region of the input image, among a plurality of preset weight values, a weight block closest to the block red ratio (Dr White Region Block ) and the block blue ratio (Dr White Region Block ) of each block (Weight block ) including;
Prior to the step (S4), for each color, the target red gain (RGain co target value), which is the ratio of the average green value (G average ) to the average red value (R average ), the average blue value (B average ) A method of performing white balancing in which the target blue gain (BGain co target value ), which is a ratio of the average green value (G average ), and the target weight value (Weightco target value) are set.
청구항 1에 있어서 상기 단계 (S5)는,
(S501) 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 가중값(Weightblock)의 총합에 대한 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 적색 게인(RGainBlock)과 가중값(Weightblock)의 곱의 총합의 비율인 적색 게인의 총합 비율(RGaintot)을 계산함;
(S502) 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 가중값(Weightblock)의 총합에 대한 상기 화이트 영역 및 상기 특정 색상 영역에 해당하는 블록들 각각의 청색 게인(BGainBlock)과 가중값(Weightblock)의 곱의 총합의 비율인 청색 게인의 총합 비율(BGaintot)을 계산함;
(S503) 상기 적색 게인의 총합 비율(RGaintot)을 적용될 최종 적색-게인 비율(RGainfinal)로 설정하고, 상기 청색 게인의 총합 비율(BGaintot)을 적용될 최종 청색-게인 비율(BGainfinal)로 설정하되, 미리 설정되어 있는 기준 게인-좌표 영역 내에 들도록 상기 최종 적색-게인 비율(RGainfinal)과 상기 최종 청색-게인 비율(BGainfinal)을 조정함; 및
(S504) 상기 최종 적색-게인 비율(RGainfinal), 상기 최종 청색-게인 비율(BGainfinal) 및 보정 매트릭스를 적용하여, 상기 입력 영상의 모든 화소 값들을 보정함;을 포함한, 화이트 밸런싱(white balancing)을 수행하는 방법.
The step (S5) of claim 1,
(S501) A red gain (RGain Block ) and a weight value of each of the blocks corresponding to the white area and the specific color area relative to the sum of weight values (Weight block ) of each of the blocks corresponding to the white area and the specific color area Calculate the ratio of the sum of the red gains (RGain tot ), which is the ratio of the sum of the products of (Weight block );
(S502) A blue gain (BGain Block ) and a weight value of each of the blocks corresponding to the white area and the specific color area relative to the sum of weight values (Weight block ) of each of the blocks corresponding to the white area and the specific color area (Weight block ) Calculate the ratio of the total sum of the blue gain (BGain tot ), which is the ratio of the sum of the products;
(S503) The total ratio of the red gain (RGain tot ) is set as the final red-gain ratio (RGain final ) to be applied, and the ratio of the total sum of the blue gains (BGain tot ) is set as the final blue-gain ratio (BGain final ) to be applied. setting, but adjusting the final red-gain ratio (RGain final ) and the final blue-gain ratio (BGain final ) so as to fall within a preset reference gain-coordinate range; and
(S504) Correcting all pixel values of the input image by applying the final red-gain ratio (RGain final ), the final blue-gain ratio (BGain final ), and a correction matrix; white balancing including )How to do the.
청구항 1에 있어서, 상기 단계 (S2)를 수행하기 위하여 2차원 그래프 상에서 상기 화이트 영역이 미리 설정되어 있고, 상기 화이트 영역을 설정하는 방법은,
(S701) 주위 조명의 색온도를 다르게 하면서 기준 화이트 보드를 촬영하여, 서로 다른 색온도의 복수의 화이트 영상들을 구함;
(S702) 기준 태양광 조명에서 상기 기준 화이트 보드를 촬영하여, 태양광의 화이트 영상을 구함;
(S703) 상기 태양광의 화이트 영상의 평균 적색 값(Rsolar), 평균 녹색 값(Gsolar), 및 평균 청색(Bsolar) 값을 계산함;
(S704-1) 상기 평균 청색(Bsolar) 값에 대한 상기 평균 녹색 값(Gsolar)의 비율인 상기 태양광의 화이트 영상의 청색 게인(BGainsolar)을 계산함;
(S704-2) 상기 평균 적색 값(Rsolar)에 대한 상기 평균 녹색 값(Gsolar)의 비율인 상기 태양광의 화이트 영상의 적색 게인(RGainsolar)을 계산함;
(S705) 상기 서로 다른 색온도의 복수의 화이트 영상들 각각을 복수의 블록들로 구획함;
(S706) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각의 평균 적색 값(Raverage), 평균 녹색 값(Gaverage), 및 평균 청색 값(Baverage)을 계산함;
(S707-1) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각에 대하여, 평균 적색 값(Raverage)에 상기 태양광의 화이트 영상의 적색 게인(RGainsolar)이 곱해진 결과의 정규화된 블록 적색 값(Rblock)을 계산함;
(S707-2) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각에 대하여, 상기 평균 청색 값(Baverage)에 상기 태양광의 화이트 영상의 청색 게인(BGainsolar)이 곱해진 결과의 정규화된 블록 청색 값(Bblock)을 계산함;
(S707-3) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각에 대하여, 상기 평균 녹색 값(Gaverage)을 정규화된 블록 녹색 값(Gblock)으로 설정함;
(S708) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각에 대하여, 상기 정규화된 블록 청색 값(Bblock), 상기 정규화된 블록 적색 값(Rblock), 및 상기 정규화된 블록 녹색 값(Gblock)을 적용하여, 블록 휘도 값(Yblock), 블록 적색-색차 값(Crblock), 및 블록 청색-색차 값(Cbblock)을 계산함;
(S709-1) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각에 대하여, 상기 블록 휘도 값(Yblock)에 대한 상기 블록 적색-색차 값(Crblock)의 비율에 정규화용 숫자가 곱해진 결과의 블록 적색 비율(Drblock)을 계산함;
(S709-2) 상기 복수의 화이트 영상들의 상기 복수의 블록들 각각에 대하여, 상기 블록 휘도 값(Yblock)에 대한 상기 블록 청색-색차 값(Cbblock)의 비율에 상기 정규화용 숫자가 곱해진 결과의 블록 청색 비율(Dbblock)을 계산함;
(S709-3) 상기 복수의 화이트 영상들 각각에 대하여, 상기 블록 적색 비율(Drblock)의 총합으로서의 적색 비율(Dr) 및 상기 블록 청색 비율(Dbblock)의 총합으로서의 청색 비율(Db)을 계산함;
(S710-1) 상기 2차원 그래프의 제1축을 상기 적색 비율(Dr)의 축으로, 그리고 제2축을 상기 청색 비율(Db)의 축으로 설정함; 및
(S710-2) 상기 복수의 화이트 영상들 각각의 상기 적색 비율(Dr)과 상기 청색 비율(Db)의 좌표를 상기 2차원 그래프상에 표시하고, 표시된 좌표 영역이 포함되도록 상기 화이트 영역을 설정함;을 포함한, 화이트 밸런싱(white balancing)을 수행하는 방법.
The method according to claim 1, wherein the white area is preset on a two-dimensional graph in order to perform the step (S2), and the method for setting the white area comprises:
(S701) obtaining a plurality of white images of different color temperatures by photographing the reference white board while changing the color temperature of ambient light;
(S702) Obtaining a white image of sunlight by photographing the reference white board under reference sunlight illumination;
(S703) calculating an average red value (R solar ), an average green value (G solar ), and an average blue value (B solar ) of the white image of sunlight;
(S704-1) Calculating a blue gain (BGain solar ) of the white image of the sunlight, which is a ratio of the average green value (G solar ) to the average blue value (B solar ) ;
(S704-2) Calculating a red gain (RGain solar ) of the white image of sunlight, which is a ratio of the average green value (G solar ) to the average red value (R solar );
(S705) partitioning each of the plurality of white images having different color temperatures into a plurality of blocks;
(S706) calculating an average red value (R average ), an average green value (G average ), and an average blue value (B average ) of each of the plurality of blocks of the plurality of white images;
(S707-1) For each of the plurality of blocks of the plurality of white images, a normalized block red value obtained by multiplying the average red value (R average ) by the red gain (RGain solar ) of the white image of sunlight Calculate (R block );
(S707-2) For each of the plurality of blocks of the plurality of white images, the normalized block blue color obtained by multiplying the average blue value (B average ) by the blue gain (BGain solar ) of the white image of the sunlight. Calculate the value (B block );
(S707-3) setting the average green value (G average ) to a normalized block green value (G block ) for each of the plurality of blocks of the plurality of white images;
(S708) For each of the plurality of blocks of the plurality of white images, the normalized block blue value (B block ), the normalized block red value (R block ), and the normalized block green value (G block ) to calculate a block luminance value (Y block ), a block red-chrominance value (Cr block ), and a block blue-chrominance value (Cb block );
(S709-1) For each of the plurality of blocks of the plurality of white images, the result obtained by multiplying the ratio of the block red-chrominance value (Cr block ) to the block luminance value (Y block ) by a number for normalization Calculate the block red ratio of (Dr block );
(S709-2) For each of the plurality of blocks of the plurality of white images, the ratio of the block blue-chrominance value (Cb block ) to the block luminance value (Y block ) is multiplied by the number for normalization. Calculate the resulting block blue percentage (Db block );
(S709-3) For each of the plurality of white images, calculate the red ratio (Dr) as the sum of the block red ratio (Dr block ) and the blue ratio (Db) as the sum of the block blue ratio (Db block ). box;
(S710-1) setting the first axis of the two-dimensional graph as the axis of the red ratio (Dr) and the second axis as the axis of the blue ratio (Db); and
(S710-2) Displaying the coordinates of the red ratio (Dr) and the blue ratio (Db) of each of the plurality of white images on the 2D graph, and setting the white area to include the displayed coordinate area. A method of performing white balancing, including ;.
삭제delete 삭제delete 삭제delete
KR1020180167891A 2018-12-21 2018-12-21 Method of performing white balancing KR102561307B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180167891A KR102561307B1 (en) 2018-12-21 2018-12-21 Method of performing white balancing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180167891A KR102561307B1 (en) 2018-12-21 2018-12-21 Method of performing white balancing

Publications (2)

Publication Number Publication Date
KR20200078212A KR20200078212A (en) 2020-07-01
KR102561307B1 true KR102561307B1 (en) 2023-07-28

Family

ID=71602101

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180167891A KR102561307B1 (en) 2018-12-21 2018-12-21 Method of performing white balancing

Country Status (1)

Country Link
KR (1) KR102561307B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008160477A (en) 2006-12-22 2008-07-10 Canon Inc Imaging apparatus, its control method, program, and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060089096A (en) * 2005-02-03 2006-08-08 엘지전자 주식회사 Automatic white balance apparatus
KR101143834B1 (en) * 2007-04-23 2012-07-12 삼성테크윈 주식회사 Aparatus and metod for controlling auto white balance
KR101030393B1 (en) * 2009-02-20 2011-04-20 인하대학교 산학협력단 Apparatus and method for adjusting white balance of digital image
KR102170686B1 (en) 2014-03-18 2020-10-27 한화테크윈 주식회사 Apparatus and method for interpolating white balance

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008160477A (en) 2006-12-22 2008-07-10 Canon Inc Imaging apparatus, its control method, program, and storage medium

Also Published As

Publication number Publication date
KR20200078212A (en) 2020-07-01

Similar Documents

Publication Publication Date Title
US9251612B2 (en) Optimal dynamic seam adjustment system and method for image stitching
KR101502598B1 (en) Image processing apparatus and method for enhancing of depth perception
JP2006121695A (en) Device and method for color correction of input image
US8432433B2 (en) Method and apparatus for colorizing a monochrome infrared image
US20090009525A1 (en) Color Adjustment Device and Method
US8854709B1 (en) Automatic white balance based on dynamic mapping
CN108281111A (en) Display control method and device
CN101884222A (en) Image processing for supporting a stereoscopic presentation
US20170006272A1 (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
JP2009122842A (en) Setting parameter optimization device and program therefor
CN104780354B (en) Image processing apparatus, image processing method and program
US10368048B2 (en) Method for the representation of a three-dimensional scene on an auto-stereoscopic monitor
TW200416625A (en) System and method of gamut mapping image data
US9451225B2 (en) Color augmented local area contrast enhancement
KR102561307B1 (en) Method of performing white balancing
CN102903091B (en) Method for stitching image in digital image processing apparatus
CN107767412A (en) A kind of image processing method and device
TW202021330A (en) Image zooming method and device
Tang et al. Arriving light control for color vision deficiency compensation using optical see-through head-mounted display
KR102301924B1 (en) Shadow reconstruction method using multi-scale gamma correction
JP2014003486A (en) Image processing device, image capturing device, image display device, image processing method, and program
CN108711176B (en) Method and device for determining gain value of panoramic fisheye camera and adjusting imaging color, terminal and fisheye camera
US9667940B2 (en) Adaptive colorspace conversion for 3D stereoscopic disparity estimation
KR20210069597A (en) Method of performing white balancing
KR100791267B1 (en) Method of improving brightness in Multi-projector

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant