KR20150087688A - System and method for adjusting auto white balance(AWB) - Google Patents
System and method for adjusting auto white balance(AWB) Download PDFInfo
- Publication number
- KR20150087688A KR20150087688A KR1020140007911A KR20140007911A KR20150087688A KR 20150087688 A KR20150087688 A KR 20150087688A KR 1020140007911 A KR1020140007911 A KR 1020140007911A KR 20140007911 A KR20140007911 A KR 20140007911A KR 20150087688 A KR20150087688 A KR 20150087688A
- Authority
- KR
- South Korea
- Prior art keywords
- color
- achromatic
- awb
- correction
- data
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
- H04N23/12—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with one sensor only
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
Description
본 발명은 자동 화이트 밸런스 조정 시스템 및 자동 화이트 밸런스 조정 방법에 관한 것으로, 보다 정확한 자동 화이트 밸런스 조정을 위한 시스템 및 방법에 관한 것이다. The present invention relates to an automatic white balance adjustment system and an automatic white balance adjustment method, and more particularly, to a system and method for more accurate automatic white balance adjustment.
일반적으로 촬영 장치에서는 무채색의 피사체가 광원의 영향을 받아 색을 띄며 촬영되는 현상을 방지하기 위해 화이트 밸런스 조정을 실시한다. 화이트 밸런스 조정은 입력된 영상 데이터에서 광원에 의한 물체 색의 변화가 가장 큰 화이트 색상을 검출하여 검출한 화이트 색상의 R, G, B 구성비로 색 온도를 판단한 후, 검출한 화이트 색상을 기준으로 색 온도에 따른 R(Red)과 B(Blue)를 보정함으로써 전체 색감을 시프트(shift)시켜 색 밸런스를 맞추는 색 보정 기능을 말한다.In general, the white balance adjustment is performed in the photographing apparatus to prevent an achromatic subject from being photographed due to the influence of the light source. The white balance adjustment detects the white color having the largest change in the object color by the light source from the input image data, determines the color temperature by the R, G, and B ratio of the detected white color, Refers to a color correction function that shifts the overall color by correcting R (Red) and B (Blue) according to the temperature to adjust the color balance.
디지털 스틸 카메라, 디지털 비디오 카메라 등과 같은 영상 장치를 사용하여 동일한 피사체를 촬영할 경우, 실내의 백색 램프, 형광 조명등, 태양광 아래 등 여러 가지 광원의 조건에 따라 촬영된 색의 겉보기 색이 달라지게 된다. 사람의 눈은 각각의 광원에 순응하여 화이트를 화이트로 느낄 수 있는 칼라 항상성(Color constancy)을 가진다. 그러나, 영상 장치는 색 온도(Color temperature)가 상이한 광원에 포함된 R, G, B 성분이 반영되어 광원의 색 온도가 높을 경우에는 푸른색이 포함된 화이트를 재현하고 색 온도가 낮은 경우에는 붉은색이 포함된 화이트를 재현하게 된다. When the same object is photographed using a video device such as a digital still camera or a digital video camera, the apparent color of the photographed color varies depending on conditions of various light sources such as a white lamp, a fluorescent lamp, and a sunlight in the room. The human eye has a color constancy that can adapt to each light source and make white feel white. However, when the color temperature of the light source is high, the white light including the blue color is reproduced by reflecting the R, G, and B components included in the light source having different color temperature, and the red It reproduces white containing color.
따라서, 광원에 의해 색 온도가 변한 경우에 화이트가 화이트로 보이도록 하는 화이트 밸런스 조정이 필요하다. 예를 들어, 푸른색이 포함된 화이트에서는 R(Red)의 게인(Gain)을 증가시키고 B(Blue)의 게인을 감소시키도록 조정하고, 붉은색이 포함된 화이트에서는 B의 게인을 증가시키고 R의 게인을 감소시키도록 조정할 필요가 있다.Therefore, it is necessary to adjust the white balance so that white appears as white when the color temperature is changed by the light source. For example, in the case of white with blue color, the gain of R (red) is increased and the gain of B (blue) is adjusted to be decreased. In the case of white containing red color, It is necessary to adjust to reduce the gain of the antenna.
통상적인 자동 화이트 밸런스(Auto White Balance) 알고리즘은 영상 내의 무채색 샘플의 R, G, B 값 또는 U, V 값을 적산하여 누적한 후 R의 적산 값과 G의 적산 값의 비율과 B의 적산 값과 G의 적산 값의 비율이 1이 되도록 AWB 게인을 조절 하거나 U와 V 적산 값이 0이 되도록 AWB 게인을 조절한다. 영상 내의 무채색 샘플을 선정하기 위해 R/G, B/G 또는 U, V에서 AWB 샘플 윈도우를 설정하고 설정된 AWB 샘플 윈도우에 포함되는 샘플 값만을 적산하게 된다. A typical Auto White Balance algorithm is a method of accumulating R, G, and B values or U and V values of an achromatic sample in an image and accumulating the ratio of the R integrated value and the G integrated value to the B integrated value Adjust the AWB gain so that the ratio of the integrated value of G and G becomes 1, or adjust the AWB gain so that the U and V integrated value becomes 0. In order to select an achromatic sample in the image, AWB sample window is set in R / G, B / G or U, V and only sample values included in the set AWB sample window are accumulated.
통상적으로 AWB 샘플 윈도우는 AWB 조정이 이루어져야 하는 색 온도 범위를 모두 포함되도록 설정하는 것이 일반적이다. 그러나, 이 설정에 다른 광원 색을 가지는 물체가 영상에 포함된 경우 무채색 물체가 아니더라도 AWB 샘플 윈도우에 포함됨으로써 AWB 조정이 제대로 이루어 지지 않는 문제점이 있다.Typically, the AWB sample window is set to include all of the color temperature ranges for which AWB adjustment should be made. However, when an object having a different color of light is included in the image in this setting, AWB adjustment is not properly performed by being included in the AWB sample window even if it is not an achromatic object.
본 발명의 실시 예는 전술한 종래의 문제점을 해결하기 위하여, 다른 광원 색을 가지는 물체가 AWB 샘플 윈도우에 포함되더라도 화이트 밸런스 조정이 정확히 이루어질 수 있도록 하는 것에 그 특징이 있다. The embodiment of the present invention is characterized in that white balance adjustment can be accurately performed even if an object having a different color of light is included in an AWB sample window in order to solve the above-described conventional problems.
상기한 목적을 달성하기 위한 본 발명의 실시 예에 따른 자동 화이트 밸런스 조정 시스템은 R, G, B 데이타를 입력받아 무채색 여부를 판정하는 제 1 무채색 판정부와, 상기 제 1 무채색 판정부에서 무채색으로 판정된 데이터를 보정하는 제 1 보정부와, 보정된 데이타에 컬러 보정을 진행하는 컬러 보정부와, 기 설정된 임계값을 기준으로 상기 제 1 무채색 판정부에서 무채색으로 판정된 데이터 및 칼라 보정이 진행된 데이터의 무채색 여부를 판정하는 제 2 무채색 판정부와, 상기 제 2 무채색 판정부에서 무채색으로 판정된 데이타를 보정하는 제 2 보정부를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an automatic white balance adjustment system including a first achromatic color determination unit for receiving R, G, and B data and determining whether the color is achromatic; A color correction unit for performing color correction on the corrected data; and a color correction unit for correcting the data determined to be achromatic in the first achromatic color determination unit on the basis of a predetermined threshold value, A second achromatic color determining section for determining whether or not the data is achromatic; and a second correcting section for correcting data determined to be achromatic in the second achromatic color determining section.
나아가, 상기 색 판정 임계값을 생성하는 색 판정 임계값 조절부를 더 포함하며, 상기 색 판정 임계값 조절부는 2차 무채색 판정을 통과한 샘플 수가 기 설정된 임계값보다 적으면 상기 색 판정 임계값을 크게 조절하고, 상기 2차 무채색 판정을 통과한 샘플 수가 기 설정된 임계값보다 많으면 상기 색 판정 임계값을 작게 조절하는 것을 특징으로 한다.The color determination threshold value adjuster may further include a color determination threshold value adjuster configured to increase the color determination threshold value if the number of samples that pass the second achromatic color determination is less than a preset threshold value When the number of samples passing through the second achromatic color determination is greater than a preset threshold value, the color determination threshold value is adjusted to be small.
나아가, 상기 제 1 보정부 및 제 2 보정부는 각각 상기 R, G, B 데이타와 상기 제 1 무채색 판정부에서 생성된 무채색 판정 결과를 적산하는 적산부와, 상기 적산부에서 적산된 R, G, B 적산 값으로 AWB 게인을 계산하는 AWB 게인(gain) 계산부와, 상기 AWB 게인 계산 값으로 AWB 보정을 진행하는 AWB 보정부를 포함하는 것을 특징으로 한다.Further, the first correcting unit and the second correcting unit may include an integrating unit for integrating the R, G, and B data and the achromatic color determination result generated by the first achromatic color determining unit, An AWB gain calculation unit for calculating an AWB gain by the B integrated value, and an AWB correction unit for performing AWB correction using the AWB gain calculated value.
나아가, 상기 1차 무채색 판정부는 무채색 샘플 윈도우를 적용하며, 상기 R, G, B 데이타 값이 샘플 윈도우 내에 위치하면 무채색으로 판정하고, 상기 R, G, B, 데이타 값이 샘플 윈도우 밖에 위치하면 유채색으로 판정하는 것을 특징으로 한다.The first achromatic color determining unit applies an achromatic color sample window. If the R, G, B data values are located in the sample window, the first achromatic color determining unit determines achromatic color. If the R, G, B data values are located outside the sample window, .
한편, 본 발명의 실시 예에 따른 자동 화이트 밸런스 조정 방법은 R, G, B 데이타를 입력받아 1차 무채색 여부를 판정하는 단계와, 상기 무채색으로 판정된 데이터에 1차 AWB 보정을 진행하는 단계와, 보정된 데이타에 컬러 보정을 진행하는 단계와, 기 설정된 색 판정 임계값을 기준으로 상기 무채색으로 판정된 데이터 및 칼라 보정이 진행된 데이터의 무채색 여부를 판정하는 단계와, 상기 무채색으로 판정된 데이타에 2차 AWB 보정을 진행하는 단계를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided an automatic white balance adjustment method comprising the steps of: receiving R, G and B data and determining whether the color is achromatic; performing a primary AWB correction on data determined to be achromatic; Determining whether the achromatic color of the data and the color corrected data are achromatic or not based on the predetermined color determining threshold value; And performing a secondary AWB correction.
나아가, 상기 2차 AWB 보정을 진행하는 단계는 2차 무채색으로 판정된 데이타들을 누적하는 단계와, 상기 누적된 데이타들을 통해 2차 AWB 게인을 계산하는 단계와, 상기 계산된 2차 AWB 게인 값으로 AWB 보정을 진행하는 단계를 더 포함하는 것을 특징으로 한다.In addition, the step of performing the secondary AWB correction may include accumulating data determined to be a second achromatic color, calculating a secondary AWB gain through the accumulated data, Further comprising a step of performing AWB correction.
본 발명은 1차 AWB 보정을 진행한 후, 칼라 보정을 통해 유채색 샘플을 더욱 강조시킨 후 2차 AWB 보정을 진행함으로써, 보다 정밀한 샘플을 엄선하여 AWB 보정을 수행할 수 있다. 이에 따라 정확하고 정밀한 화이트 밸런스 조정을 수행할 수 있는 효과를 얻을 수 있다. In the present invention, after performing the primary AWB correction, the chromatic color sample is further emphasized through the color correction, and then the secondary AWB correction is performed, so that more accurate samples can be selected and AWB correction can be performed. Thus, it is possible to obtain an effect of performing accurate and precise white balance adjustment.
아울러 본 발명의 바람직한 실시 예는 예시의 목적을 위한 것으로, 당업자라면 첨부된 특허청구범위의 기술적 사상과 범위를 통해 다양한 수정, 변경, 대체 및 부가가 가능할 것이며, 이러한 수정 변경 등은 이하의 특허청구범위에 속하는 것으로 보아야 할 것이다.It will be apparent to those skilled in the art that various modifications, additions, and substitutions are possible, and that various modifications, additions and substitutions are possible, within the spirit and scope of the appended claims. As shown in Fig.
도 1은 본 발명의 실시 예에 따른 화이트 밸런스 조정 시스템을 도시한 시스템도이다.
도 2는 본 발명의 실시 예에 따른 화이트 밸런스 조정 방법을 도시한 순서도이다.
도 3a 및 도 3b는 본 발명의 실시 예에 따른 무채색 샘플 분포를 도시한 그래프이다.
도 4a 및 도 4b는 본 발명의 실시 예에 따른 무채색 샘플 윈도우를 도시한 그래프이다.
도 5는 본 발명의 실시 예에 따른 무채색 판정 기준을 도시한 그래프이다.1 is a system diagram showing a white balance adjustment system according to an embodiment of the present invention.
2 is a flowchart illustrating a white balance adjustment method according to an embodiment of the present invention.
3A and 3B are graphs showing an achromatic sample distribution according to an embodiment of the present invention.
4A and 4B are graphs showing an achromatic sample window according to an embodiment of the present invention.
5 is a graph showing an achromatic color determination criterion according to an embodiment of the present invention.
이하, 첨부한 도면을 참조하여 본 발명의 실시 예에 대해 상세히 설명하고자 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 실시 예에 따른 화이트 밸런스 조정 시스템을 도시한 시스템도이다.1 is a system diagram showing a white balance adjustment system according to an embodiment of the present invention.
도 1을 참조하면, 자동 화이트 밸런스(Auto White Balance, 이하, AWB라고 함) 조정 시스템은 제 1 무채색 판정부(100), 제 1 보정부(103), 칼라 보정부(120), 제 2 무채색 판정부(125), 색 판정 임계값 조절부(130) 및 제 2 보정부(133)를 포함한다. 여기서, 제 1 보정부(103)는 제 1 적산부(105), 제 1 AWB 게인(gain) 계산부(110) 및 제 1 AWB 보정부(115)를 포함한다. 그리고, 제 2 보정부(133)는 제 2 적산부(135), 제 2 AWB 게인(gain) 계산부(140) 및 제 2 AWB 보정부(145)를 포함한다.1, an automatic white balance (AWB) adjustment system includes a first achromatic
먼저, 제 1 무채색 판정부(100)에서는 R(Red), G(Green), B(Blue) 데이타를 입력받아 무채색 여부를 판정하고, 무채색 판정 결과를 제 1 적산부(105)와 제 2 무채색 판정부(125)로 전달한다. 제 1 무채색 판정부(100)는 R/G, B/G 도메인 또는 U, V 도메인에서 샘플 윈도우를 설정하여 그 값이 설정된 샘플 윈도우 내에 위치하면 무채색으로 판정하고, 샘플 윈도우 밖에 위치하면 유채색으로 판정한다. First, the first achromatic
그리고, 제 1 적산부(105)는 AWB 보정 전 R, G, B 데이타와 제 1 무채색 판정부(100)에서 생성된 무채색 판정 결과를 입력받는다. 무채색 판정 결과 무채색이라고 판정되면 제 1 적산부(105)에서는 입력받은 R, G, B 데이타를 각각 적산한다. 이때, 적산 주기는 한 프레임 간격으로 하는 것이 보통이나 레지스터 조절 변수에 따라 사용자가 선택하게 할 수도 있다. 예를 들어, 저 화소 촬영 시스템인 경우 수 프레임 동안 무채색 샘플을 누적하여야 AWB 조정에 적합한 샘플 수가 확보된다. 한편, 고 화소 촬영 시스템인 경우 한 프레임만 누적하더라도 AWB 조정에 적합한 샘플 수가 확보될 수 있다. 따라서, 적산 주기는 사용자가 조절하여 선택하도록 한다.The
제 1 AWB 게인(gain) 계산부(110)는 제 1 적산부(105)에서 적산된 R 적산 값, G 적산 값, B 적산 값으로 AWB 게인을 계산한다. AWB 게인은 R gain(G 적산값/R 적산값)과 B gain(G 적산값/B 적산 값)으로 계산되며, 보정해야 하는 값을 의미한다.The first
제 1 AWB 보정부(115)는 R, G, B 데이타와 제 1 AWB 게인 계산부(110)에서 계산된 AWB 게인 값을 입력받아 1차 AWB 보정을 실시한다. 1차 AWB 게인 계산부(115)에서 계산된 R 게인을 R 값에 곱하고 B 게인을 B 값에 곱하여 AWB 보정을 실시한다. The first AWB correction unit 115 receives the R, G, and B data and the AWB gain values calculated by the first AWB
그리고, 칼라 보정부(120)에서는 1차 AWB 보정된 데이타를 입력받아 칼라 보정을 진행한다. 통상적으로 이미지 센서 등의 촬영 장치로 촬영하여 칼라 보정을 실시하지 않은 영상은 사람이 눈으로 보는 색의 값과 다른 값을 가지게 된다. 칼라 보정을 하게 되면 사람의 눈이 보는 값과 유사한 값으로 영상의 색을 구현할 수 있게 된다. 즉, 칼라 보정이 실시된 데이타로 무채색 판정을 할 경우 좀 더 정밀한 무채색 판정을 할 수 있다.The
제 2 무채색 판정부(125)는 1차 AWB 보정된 데이타와 칼라 보정이 실시된 데이타에 대해 2차로 무채색 여부를 판정한다. 2차 무채색 판정은 1차 무채색 판정을 통과한 샘플 안에서만 이루어지며 색 판정 임계값 조절부(130)를 통해 색 판정 임계 값을 입력받아 진행한다. The second achromatic
색 판정 임계값 조절 부(130)는 영상 내에서 가장 무채색에 가까운 샘플만을 선정하여 AWB 보정을 하기 위한 것으로, 한 프레임 동안 제 2 무채색 판정을 통과한 샘플 수를 카운팅하여 적정 샘플 수 범위보다 많으면 제 2 무채색 판정부(125)에서 사용되는 색 판정 임계값(gth)를 작게하고, 적정 샘플 수 범위보다 적으면 임계값을 크게 한다. 이때, 임계값이 커질 수 있는 최대 값을 레지스터 조절 변수로 설정함으로써 임계값이 너무 커져 유채색 샘플이 AWB 보정에 사용되는 것을 방지할 수 있다. 즉, 색 판정 임계값 조절 부(130)는 무채색에 가까운 샘플로만 AWB 보정을 실시하여 정밀한 AWB 보정이 수행되도록 할 수 있다. 색 판정 임계 값에 사용되는 적정 샘플 수 범위는 레지스터 조절 변수로 두어 다양한 화소수에 대응할 수 있도록 한다.The color determination
제 2 적산부(135)는 AWB 보정 전의 R, G, B 데이타를 입력받아 제 2 무채색 판정부(125)에서 무채색으로 판정된 샘플의 R, G, B 데이타를 각각 적산한다. 이때, 적산 주기는 제 1 적산부(105)에서와 같이 사용자가 적절한 값을 설정할 수 있도록 레지스터 조절 변수로 설정할 수 있다.The second integrating
제 2 AWB 게인 계산부(140)는 제 2 적산부(105)에서 적산한 R, G, B 적산 값을 통해 2차 AWB 게인을 계산한다. 제 1 AWB 게인 계산부(110)에서와 같이 R 게인과 B 게인을 출력하며, R 게인과 B 게인의 계산 방법 또한 제 1 AWB 게인 계산부(140)와 같다. 다만 제 2 AWB 게인 계산부(140)에서 출력되는 R, B 게인 값은 계산된 게인이 한번에 출력되는 것이 아니라 여러 프레임에 나누어 최종 AWB 게인 값에 도달되도록 하는 것이 바람직하다. 이는 AWB 보정 중에 AWB 게인 값이 급격하게 바뀌어 영상이 출렁거리는 것을 방지하고 보다 자연스럽게 AWB 보정을 수행하기 위함이다. 이 때, AWB 게인 값이 최종 게인 값에 도달되는 속도는 레지스터 조절변수로 두어 사용자가 설정할 수 있게 한다. The second
제 2 AWB 보정부(145)는 AWB 보정 전의 R, G, B 데이타와 제 2 AWB 게인 계산부(140)에서 계산한 AWB 게인 값을 입력받아 2차 AWB 보정을 실시한다. 2차 AWB 보정은 제 2 AWB 계산 부(140)에서 계산한 R 게안을 R 값에 곱하고 B 게인을 B 값에 곱하여 AWB 보정을 실시한다. 2차 AWB 보정이 실시된 데이타가 본 AWB 시스템의 최종 출력이 된다.The second AWB correction unit 145 receives the R, G, and B data before the AWB correction and the AWB gain calculated by the second AWB
도 2는 본 발명의 실시 예에 따른 화이트 밸런스 조정 방법을 도시한 순서도이다.2 is a flowchart illustrating a white balance adjustment method according to an embodiment of the present invention.
도 2를 참조하면, 자동 화이트 밸런스(Auto White Balance, 이하, AWB라고 함) 보정 전 R, G, B 데이타를 입력받아 1차 무채색 여부를 판별한다(단계 S100). 1차 무채색 여부를 판정하는 단계는 제 1 무채색 판정부(100)의 무채색 샘플 윈도우를 통해 진행할 수 있다. AWB 보정이 진행되지 않은 입력 R, G, B 데이타 값으로 G/B, G/R 또는 U, V값을 계산한 후 샘플 윈도우 내에 위치하면 무채색으로 판정하고, 샘플 윈도우 밖에 위치하면 유채색으로 판정한다. Referring to FIG. 2, R, G, and B data are received before auto white balance (AWB) correction is performed to determine whether the image is achromatic (step S100). The step of determining whether or not the first achromatic color is to be performed may proceed through the achromatic color sample window of the first achromatic
도 3a 및 도 3b를 참조하여 색 좌표에서 광원의 색온도에 따른 무채색 샘플 분포를 설명하면 다음과 같다. 여기서, x축은 B(Blue)에 대한 G(Green)의 상대적인 색 좌표(G/B)를 나타내고, y축은 R(Red)에 대한 G(Green)의 상대적인 색 좌표(G/R)를 나타낸다. 3A and 3B, an achromatic sample distribution according to a color temperature of a light source in color coordinates will be described below. Here, the x axis represents the relative color coordinate (G / B) of G (Green) with respect to B (Blue) and the y axis represents the relative color coordinate (G / R) of G (Green) with respect to R (Red).
일반적으로 G/R, G/B 좌표에서 저 색온도의 무채색 샘플은 G/R 값이 작고 G/B 값이 높은 위치(왼쪽 상단)에 분포한다. 색 온도가 높아질수록 도 3a의 화살표 방향(오른쪽 하단 방향)으로 샘플이 분포하게 된다. 또한 U, V 좌표에서 저 색온도의 무채색 샘플은 U값이 작고 V값이 높은 위치(왼쪽 상단)에 분포하는 것이 일반적이다. 색온도가 높아질수록 도 3b의 화살표 방향(오른쪽 하단)으로 샘플이 분포하게 된다.Generally, achromatic samples with low color temperature in G / R and G / B coordinates are distributed in a position with a low G / R value and a high G / B value (upper left). As the color temperature increases, the sample is distributed in the direction of the arrow in FIG. 3A (lower right direction). Also, in U and V coordinates, achromatic samples of low color temperature are generally distributed at a position with a low U value and a high V value (upper left). As the color temperature increases, the sample is distributed in the direction of the arrow in FIG. 3B (lower right).
또한, 도 4a 및 도 4b를 참조하여 제 1 무채색 판정부(100)에서의 샘플 윈도우(Sample Window) 설정 방법을 설명하면, 제 1 무채색 판정부(100)의 샘플 윈도우는 G/R, G/B 도메인 또는 U,V 도메인에서 설정할 수 있다. 예를 들어, 제 1 무채색 판정부(100)의 샘플 윈도우는 촬영 장치가 AWB 보정을 실시하여야 하는 모든 광원을 포함하도록 설정한다. 도 4a 및 도 4b와 같이 촬영 장치가 보정을 실시하여야 하는 광원이 A, B, C 광원일 때, A, B, C 광원의 무채색 지점을 모두 포함되도록 샘플 윈도우을 설정한다. 제 1 무채색 판정부(100)의 샘플 윈도우는 레지스터 변수로 두어 사용자가 상황에 맞게 설정할 수 있다. 4A and 4B, a sample window of the first achromatic
또한, 제 1 무채색 판정부(100)의 샘플 윈도우는 도 4a 및 도 4b와 같은 직사각형 형태에 한정하지 않으며, 이외의 다른 형태를 취할 수 있다. In addition, the sample window of the first achromatic
그 다음, 1차 무채색으로 판정된 데이타들을 누적하고, 누적된 데이타들을 통해 1차 AWB 게인을 계산한다(단계 S110). 1차 무채색으로 판정된 데이타들은 제 1 적산부(105)를 통해 누적되며, 제 1 AWB 게인 계산부(110)에서 1차 AWB 게인이 계산된다.Next, the data determined to be the primary achromatic color are accumulated, and the primary AWB gain is calculated through the accumulated data (step S110). The data determined as the first achromatic color are accumulated through the
다음으로, 계산된 제 1 AWB 게인 값으로 1차 AWB 보정을 진행한다(단계 S120). 이후, 1차 AWB 보정이 실시된 데이터에 컬러 보정을 실시한다(단계 S130).Next, the first AWB correction is performed with the calculated first AWB gain value (step S120). Thereafter, the data subjected to the primary AWB correction is subjected to color correction (step S130).
컬러 보정 방법은 아래의 수학식 1과 같다.The color correction method is shown in Equation (1) below.
여기서, cm00 내지 cm22는 레지스터 조절 변수로 두어 사용자가 적정한 값을 설정할 수 있도록 한다. 칼라 보정을 진행하면 사람의 눈으로 보는 값과 유사한 값으로 영상의 색을 구현할 수 있게 된다. 따라서, 칼라 보정을 실시한 데이타로 무채색 판정을 할 경우 좀 더 정밀한 무채색 판정을 실시할 수 있다.Here, cm00 to cm22 are set as register control variables so that the user can set an appropriate value. When color correction is performed, the color of the image can be realized with a value similar to that of the human eye. Therefore, when the achromatic color determination is performed with the data subjected to the color correction, more accurate achromatic color determination can be performed.
그 다음, 컬러 보정이 수행된 데이타와 1차 무채색 판정을 통과한 데이타에 대해 2차 무채색 판정을 진행한다(단계 S140). 2차 무채색 판정은 1차 무채색 판정을 통과한 샘플 안에서만 이루어지며, 색 판정 임계값 조절부(130)로부터 색 판정 임계값을 입력받아 무채색을 판정한다.Then, the secondary achromatic color determination is performed on the data for which the color correction has been performed and the data that has passed the primary achromatic color determination (step S140). The second achromatic color determination is performed only in the sample that has passed the first achromatic color determination, and the color determination threshold value is input from the color determination
도 5를 참조하여 2차 무채색 판정 방법에 대해 설명하면 다음과 같다. 도 5에 도시된 그래프의 X축은 색상을 나타내는 것이며, Y축은 임계값(Threshold)를 나타내는 것이다. 예를들어, 샘플 A, B, C가 있다고 하면, 각 A, B, C 샘플의 min(R, G, B)값이 작은 샘플인 경우 임계값이 작게 설정하고, min(R, G, B)값이 큰 샘플인 경우 임계값이 크게 설정되도록 한다. 여기서, min(R, G, B)값이 작은 샘플은 상대적으로 어두운 색상을 가지며, min(R, G, B)값이 큰 샘플은 상대적으로 밝은 색상을 가진다. 즉, 색 판정 임계값은 어두운 색상으로 갈수록 그 크기가 작도록 설정한다.The second achromatic color determination method will be described with reference to FIG. The X-axis of the graph shown in FIG. 5 represents the color, and the Y-axis represents the threshold value. For example, if there are samples A, B, and C, the threshold is set to a small value for min (R, G, B) ) For larger samples, the threshold value should be set larger. Here, a sample having a small value of min (R, G, B) has a relatively dark color, and a sample having a large value of min (R, G, B) has a relatively bright color. That is, the color determination threshold value is set to be smaller as the color becomes darker.
입력된 샘플의 R, G, B 값 중 최대값과 최소값의 차이가 임계값 이하이면 무채색으로 판정한다. 여기서, 샘플 A와 샘플 B는 최대값과 최소값의 차이가 임계값 이하이므로 무채색으로 판정한다. 한편, 샘플 C는 최대값과 최소값의 차이가 임계값 이상이므로 유채색으로 판정한다. If the difference between the maximum value and the minimum value of the R, G, B values of the input sample is below the threshold value, it is determined as achromatic. Here, since the difference between the maximum value and the minimum value of the sample A and the sample B is equal to or less than the threshold value, it is determined as achromatic. On the other hand, since the difference between the maximum value and the minimum value is equal to or larger than the threshold value, the sample C is determined to be a chromatic color.
다음으로, 2차 무채색 판정을 통과한 샘플 수를 카운팅하여 색 판정 임계값을 조정한다(단계 S145). 2차 무채색 판정을 통과한 샘플 수가 적정 샘플 수 범위보다 많으면 제 2 무채색 판정부(125)에서 사용되는 색 판정 임계값(gth)를 작게 조정하고, 적정 샘플 수 범위보다 적으면 임계값을 크게 조정한다. 이때, 임계값이 커질 수 있는 최대 값을 레지스터 조절 변수로 두어 사용자가 설정하게 하여 임계값이 너무 커져 유채색 샘플이 AWB 보정에 사용되는 것을 방지한다. 또한, 적정 샘플 수도 레지스터 조절 변수로 두어 사용자가 다양한 화소 수에 대응하여 설정할 수 있다.Next, the number of samples that passed the second achromatic color determination is counted to adjust the color determination threshold value (step S145). If the number of samples that pass the second achromatic color determination exceeds the optimum sample number range, the color determination threshold value gth used by the second achromatic
그 다음, 2차로 무채색으로 판정된 데이타들을 누적하고, R, G, B 적산 값을 통해 2차 AWB 게인을 계산한다(단계 S150). Next, the data determined to be achromatic in the second order are accumulated, and the secondary AWB gain is calculated through the R, G, and B integrated values (step S150).
제 1 AWB 게인 계산부(110)에서와 같이 R 게인과 B 게인을 출력하며, R 게인과 B 게인의 계산 방법 또한 제 1 AWB 게인 계산부(110)와 같다. 다만 제 2 AWB 게인 계산부(140)에서 출력되는 R, B 게인 값은 계산된 게인이 한번에 출력되는 것이 아니라 여러 프레임에 나누어 최종 AWB 게인 값에 도달되도록 하는 것이 바람직하다. 이는 AWB 보정 중에 AWB 게인 값이 급격하게 바뀌어 영상이 출렁거리는 것을 방지하고 보다 자연스럽게 AWB 보정을 수행하기 위함이다.The R gain and the B gain are outputted as in the first
다음으로, 2차 AWB 게인 값으로 2차 AWB 보정을 진행한다(단계 S160). Next, the secondary AWB correction is performed with the secondary AWB gain value (step S160).
상술한 바와 같이, 본 발명은 1차 AWB 샘플 윈도우에 의한 무채색 샘플로 1차 AWB 게인을 구한 후 AWB 보정을 한다. 이후, 칼라 보정을 통해 유채색 샘플을 더욱 강조시킨 후 무채색에 가까운 적정 샘플만을 통해 최종 AWB 게인 값을 구하여 AWB 보정을 진행함으로써 보다 정밀한 샘플을 엄선하여 AWB 보정을 수행할 수 있다. 따라서 다른 광원 색의 샘플이 영상에 포함되어 AWB 조정이 제대로 이루어지지 않는 문제를 해결할 수 있는 효과가 있다.As described above, the present invention obtains the primary AWB gain with an achromatic sample by the primary AWB sample window, and performs AWB correction. Thereafter, the chromatic color sample is further emphasized through the color correction, and the final AWB gain value is obtained only through the appropriate sample close to the achromatic color, and the AWB correction is performed, so that more accurate samples can be selected and AWB correction can be performed. Therefore, there is an effect of solving the problem that AWB adjustment is not properly performed because samples of other light source colors are included in the image.
100 : 제 1 무채색 판정부
103 : 제 1 보정부
105 : 제 1 적산부
110 : 제 1 AWB 게인 계산부
115 : 제 1 AWB 보정부
120 : 칼라 보정부
125 : 제 2 무채색 판정부
130 : 색판정 임계값 조절부
133 : 제 2 보정부
135 : 제 2 적산부
140 : 제 2 AWB 게인 계산부
145 : 제 2 AWB 보정부
150 : AWB 보정 후 데이타100: first achromatic color determining unit 103: first correcting unit
105: first integrating unit 110: first AWB gain calculating unit
115: first AWB correction unit 120: color correction unit
125: second achromatic color determination unit 130: color determination threshold value adjustment unit
133: second correction unit 135: second integration unit
140: second AWB gain calculation unit 145: second AWB correction unit
150: AWB corrected data
Claims (7)
상기 제 1 무채색 판정부에서 무채색으로 판정된 데이터를 보정하는 제 1 보정부;
보정된 데이타에 컬러 보정을 진행하는 컬러 보정부;
기 설정된 임계값을 기준으로 상기 제 1 무채색 판정부에서 무채색으로 판정된 데이터 및 칼라 보정이 진행된 데이터의 무채색 여부를 판정하는 제 2 무채색 판정부; 및
상기 제 2 무채색 판정부에서 무채색으로 판정된 데이타를 보정하는 제 2 보정부
를 포함하는 것을 특징으로 하는 자동 화이트 밸런스 조정 시스템.A first achromatic color determining unit that receives R, G, and B data and determines whether the color is achromatic;
A first correcting unit for correcting data determined as achromatic in the first achromatic color determining unit;
A color correction unit for performing color correction on the corrected data;
A second achromatic color determining unit for determining whether achromatic color of the data determined as achromatic color and the color corrected data of the first achromatic color determining unit is based on a predetermined threshold value; And
A second correction unit for correcting data determined to be achromatic in the second achromatic color determining unit,
And an automatic white balance adjustment system.
상기 색 판정 임계값을 생성하는 색 판정 임계값 조절부를 더 포함하는 것을 특징으로 하는 자동 화이트 밸런스 시스템.The method according to claim 1,
And a color judgment threshold value adjuster for generating the color judgment threshold value.
상기 색 판정 임계값 조절부는 2차 무채색 판정을 통과한 샘플 수가 기 설정된 임계값보다 적으면 상기 색 판정 임계값을 크게 조절하고, 상기 2차 무채색 판정을 통과한 샘플 수가 기 설정된 임계값보다 많으면 상기 색 판정 임계값을 작게 조절하는 것을 특징으로 하는 자동 화이트 밸런스 시스템.The method of claim 2,
Wherein the color determination threshold value adjuster adjusts the color determination threshold value to a larger value if the number of samples passed through the second achromatic color determination is smaller than a predetermined threshold value and if the number of samples that pass the second achromatic color determination exceeds a predetermined threshold value, And the color judgment threshold value is adjusted to be small.
상기 제 1 보정부 및 제 2 보정부는 각각
상기 R, G, B 데이타와 상기 제 1 무채색 판정부에서 생성된 무채색 판정 결과를 적산하는 적산부;
상기 적산부에서 적산된 R, G, B 적산 값으로 AWB 게인을 계산하는 AWB 게인(gain) 계산부; 및
상기 AWB 게인 계산 값으로 AWB 보정을 진행하는 AWB 보정부
를 포함하는 것을 특징으로 하는 자동 화이트 밸런스 시스템.The method according to claim 1,
The first correcting unit and the second correcting unit are
An integrating unit for integrating the R, G, and B data and an achromatic color determination result generated by the first achromatic color determining unit;
An AWB gain calculation unit for calculating an AWB gain by integrating the R, G, and B values integrated in the integration unit; And
An AWB correction unit for performing AWB correction using the AWB gain calculation value,
And an automatic white balance system.
상기 1차 무채색 판정부는 무채색 샘플 윈도우를 적용하며, 상기 R, G, B 데이타 값이 샘플 윈도우 내에 위치하면 무채색으로 판정하고, 상기 R, G, B, 데이타 값이 샘플 윈도우 밖에 위치하면 유채색으로 판정하는 것을 특징으로 하는 자동 화이트 밸런스 시스템.The method according to claim 1,
The primary achromatic color determining unit applies an achromatic color sample window. If the R, G, B data values are located in the sample window, the primary achromatic color determining unit determines achromatic color. If the R, G, B data values are located outside the sample window, Wherein the automatic white balance system comprises:
상기 무채색으로 판정된 데이터에 1차 AWB 보정을 진행하는 단계;
보정된 데이타에 컬러 보정을 진행하는 단계;
기 설정된 색 판정 임계값을 기준으로 상기 무채색으로 판정된 데이터 및 칼라 보정이 진행된 데이터의 무채색 여부를 판정하는 단계; 및
상기 무채색으로 판정된 데이타에 2차 AWB 보정을 진행하는 단계
를 포함하는 것을 특징으로 하는 자동 화이트 밸런스 방법.Receiving R, G, and B data and determining whether the color is achromatic;
Performing primary AWB correction on the data determined to be achromatic;
Performing color correction on the corrected data;
Determining whether the data determined as achromatic color and the data subjected to color correction are achromatic based on a predetermined color determination threshold value; And
Performing a secondary AWB correction on the data determined to be achromatic
Wherein the automatic white balance method comprises:
상기 2차 AWB 보정을 진행하는 단계는
2차 무채색으로 판정된 데이타들을 누적하는 단계;
상기 누적된 데이타들을 통해 2차 AWB 게인을 계산하는 단계; 및
상기 계산된 2차 AWB 게인 값으로 AWB 보정을 진행하는 단계
를 더 포함하는 것을 특징으로 하는 자동 화이트 밸런스 방법.The method of claim 6,
The step of performing the secondary AWB correction
Accumulating data determined to be a second achromatic color;
Calculating a second AWB gain through the accumulated data; And
The AWB correction is performed with the calculated second-order AWB gain value
Further comprising the steps of:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140007911A KR101545323B1 (en) | 2014-01-22 | 2014-01-22 | System and method for adjusting auto white balance(AWB) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140007911A KR101545323B1 (en) | 2014-01-22 | 2014-01-22 | System and method for adjusting auto white balance(AWB) |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20150087688A true KR20150087688A (en) | 2015-07-30 |
KR101545323B1 KR101545323B1 (en) | 2015-08-19 |
Family
ID=53876839
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020140007911A KR101545323B1 (en) | 2014-01-22 | 2014-01-22 | System and method for adjusting auto white balance(AWB) |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101545323B1 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100987030B1 (en) | 2008-09-18 | 2010-10-11 | 연세대학교 산학협력단 | Method and apparatus for correcting white balance |
JP2011239067A (en) | 2010-05-07 | 2011-11-24 | Toshiba Corp | Image processor |
KR101178472B1 (en) | 2010-12-16 | 2012-09-06 | 엠텍비젼 주식회사 | Color compensating method and device for maintenance of white balance and correct color |
-
2014
- 2014-01-22 KR KR1020140007911A patent/KR101545323B1/en active IP Right Grant
Also Published As
Publication number | Publication date |
---|---|
KR101545323B1 (en) | 2015-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5148989B2 (en) | Imaging device | |
EP2645705B1 (en) | Image capturing apparatus and control method thereof | |
KR100983037B1 (en) | Method for controlling auto white balance | |
US9077905B2 (en) | Image capturing apparatus and control method thereof | |
US9350905B2 (en) | Image signal processing apparatus, image signal processing method, and image capturing apparatus | |
US9420197B2 (en) | Imaging device, imaging method and imaging program | |
JP2002027491A (en) | Image input unit, white balance adjusting method, and computer readable recording medium storing program for executing the method | |
US20140036106A1 (en) | Image processing apparatus and image processing method | |
US8120670B2 (en) | Apparatus and method for controlling gain of color signal | |
US10091422B2 (en) | Image processing device and recording medium | |
KR20050073423A (en) | Color image processing method, and color imaging apparatus | |
EP3293697A1 (en) | Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device | |
KR101639664B1 (en) | Photographing apparatus and photographing method | |
JP5149055B2 (en) | Imaging device | |
KR20110125154A (en) | Apparatus and method for auto adjusting brightness of image taking device | |
JP2017130836A (en) | Image processing apparatus, image processing method, and program | |
KR101005769B1 (en) | Auto exposure and auto white-balance method for detecting high dynamic range conditions | |
US8957990B2 (en) | Apparatus and method for compensating for back light of image | |
KR101545323B1 (en) | System and method for adjusting auto white balance(AWB) | |
JP4857856B2 (en) | Electronic camera having saturation adjustment function and image processing program | |
JP2008005083A (en) | Imaging apparatus | |
KR101143834B1 (en) | Aparatus and metod for controlling auto white balance | |
TW201634999A (en) | Auto focus method and apparatus using the same method | |
KR20150106775A (en) | Apparatus and method for interpolating white balance | |
US20240037872A1 (en) | Information processing device, head-mounted display device, control method of information processing device, and non-transitory computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20180625 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20190725 Year of fee payment: 5 |