KR20110125154A - Apparatus and method for auto adjusting brightness of image taking device - Google Patents

Apparatus and method for auto adjusting brightness of image taking device Download PDF

Info

Publication number
KR20110125154A
KR20110125154A KR1020100082062A KR20100082062A KR20110125154A KR 20110125154 A KR20110125154 A KR 20110125154A KR 1020100082062 A KR1020100082062 A KR 1020100082062A KR 20100082062 A KR20100082062 A KR 20100082062A KR 20110125154 A KR20110125154 A KR 20110125154A
Authority
KR
South Korea
Prior art keywords
brightness
histogram
image
level
average
Prior art date
Application number
KR1020100082062A
Other languages
Korean (ko)
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 KR1020110039108A priority Critical patent/KR101754425B1/en
Priority to US13/105,512 priority patent/US9113114B2/en
Publication of KR20110125154A publication Critical patent/KR20110125154A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PURPOSE: A device and method for automatically adjusting the brightness of an image photographing device are provided to prevent the phenomena which is photographed dark and saturation due to using brightness data. CONSTITUTION: An image photographing device sets initial values(900). If an image is inputted, the image photographing device calculates a histogram about the image(905,910). After determining the rate of a gray pixel, the image photographing device reset the reference brightness according tot eh rate of the gray pixel, the maximum brightness variable, a minimum brightness variable, a minimum brightness pixel number, and a maximum brightness pixel number(915,920). After correcting a lens shading, the image photographing device performs gamma correction(925,930).

Description

이미지 촬영 장치의 밝기를 자동으로 조절하는 장치 및 방법{APPARATUS AND METHOD FOR AUTO ADJUSTING BRIGHTNESS OF IMAGE TAKING DEVICE}Apparatus and method for automatically adjusting the brightness of an imaging device {APPARATUS AND METHOD FOR AUTO ADJUSTING BRIGHTNESS OF IMAGE TAKING DEVICE}

본 발명은 이미지 촬영 장치의 밝기를 조절하는 장치 및 방법에 관한 것으로, 특히 이미지 촬영 장치의 밝기를 자동으로 조절하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and a method for adjusting the brightness of an image capturing apparatus, and more particularly, to an apparatus and a method for automatically adjusting the brightness of an image capturing apparatus.

최근 들어 영상기기의 급속한 발전으로 이미지 센서가 장착된 카메라, 캠코더 등의 이미지 촬영 장치에 대한 개발이 가속화되고 있다. 이러한 이미지 촬영 장치는 이미지를 촬영하여 기록 매체에 기록함과 동시에, 언제든지 재생시킬 수 있어 사용자가 급속하게 증가하고 있다. 이에 따라 성능 및 기능에 대한 사용자의 요구도 점차 높아지고 있으며, 소형, 경량화, 저전력화와 더불어 고성능화 및 다기능화가 추구되고 있다. Recently, with the rapid development of video devices, development of image capturing devices such as cameras and camcorders equipped with image sensors has been accelerated. Such an image capturing apparatus can record images and record them on a recording medium and reproduce them at any time, and the number of users is increasing rapidly. Accordingly, the user's demand for performance and functionality is gradually increasing, and small size, light weight, low power, high performance and multifunctionality are pursued.

이러한 이미지 촬영 장치에는 이미지의 색의 균형을 조정하여 주는 자동 화이트 밸런스(Auto White Balace: AWB) 기능과 자동으로 초점을 맞춰주는 자동 초점 조절 기능 등의 자동화 기능들이 기본적으로 채택되어 있다. 이러한 자동화 기능들과 더불어 고려되는 것이 이미지 촬영 장치의 밝기 제어이다. 이미지 촬영 장치의 원하는 밝기를 만들기 위해서 이미지 센서에는 노출 시간 및 아날로그 이득이 조정되어 제공된다. 이와 같이 밝기 제어 방식으로는 조리개 개폐량, 셔터 제어량 및 자동 이득 제어량을 조정해보고 궤환된 밝기 데이터를 관측한 후, 원하는 밝기 데이터가 출력될 때까지 제어하는 방식이 일반적이다.The image capturing apparatus basically includes automatic functions such as an auto white balance (AWB) function for adjusting the color balance of an image and an auto focus function for automatically focusing. Along with these automation functions are considered brightness control of the imaging device. To achieve the desired brightness of the imaging device, the image sensor is provided with an adjusted exposure time and analog gain. As such, the brightness control method is generally a method of adjusting the aperture opening, shutter control amount, and automatic gain control amount, observing the returned brightness data, and controlling until the desired brightness data is output.

상기한 바와 같이 종래에는 밝기 제어를 위해 밝기 데이터 즉, Y 데이터만을 이용하기 때문에 특정 환경에서 이미지의 포화 및 촬상/촬영 시 이미지가 어둡게 찍히는 현상이 발생하게 된다. 예를 들어, CMOS(Complimentary Metal Oxide Semiconductor) 이미지 센서를 사용하는 디지털 카메라의 경우 광량이 큰 형광등 등의 피사체를 촬영할 때 영상 신호의 포화로 인해 고스트 이미지가 발생한다. 그러므로, 밝기 데이터를 이용할 경우에 발생하는 포화 및 어둡게 찍히는 현상을 방지하면서도 이미지 센서의 특성에 관계없이 자동으로 밝기를 조절할 수 있는 방법이 요구된다. 또한 만일 R, G, B 데이터를 복합적으로 이용하여 밝기를 조절할 수 있다면 색의 균형을 조정하는 효과를 얻을 수 있어 자동 화이트 밸런스 기능의 성능 향상도 기대할 수 있을 것이다.As described above, since only the brightness data, that is, the Y data is used for the brightness control, a phenomenon in which the image is darkened when the image is saturated and captured / photographed in a specific environment occurs. For example, in a digital camera using a complementary metal oxide semiconductor (CMOS) image sensor, ghost images are generated due to saturation of an image signal when photographing a subject such as a fluorescent lamp having a large amount of light. Therefore, there is a need for a method capable of automatically adjusting brightness regardless of characteristics of an image sensor while preventing saturation and darkening occurring when using brightness data. In addition, if the brightness can be adjusted using a combination of R, G, and B data, the effect of adjusting the color balance can be obtained, and the performance of the automatic white balance function can be expected.

따라서 본 발명은 이미지 촬영 장치의 밝기를 자동으로 조절하기 위한 장치 및 방법을 제공한다.Accordingly, the present invention provides an apparatus and method for automatically adjusting the brightness of an image capturing apparatus.

또한 본 발명은 이미지 센서의 특성에 관계없이 포화 및 어둡게 찍히는 현상을 방지하기 위한 장치 및 방법을 제공한다.The present invention also provides an apparatus and method for preventing saturation and darkening, regardless of the characteristics of the image sensor.

또한 본 발명은 이미지 촬영 장치의 밝기를 미리 지정된 범위 내에서 자동으로 유지하도록 함으로써 화질을 개선하기 위한 장치 및 방법을 제공한다.The present invention also provides an apparatus and method for improving image quality by automatically maintaining the brightness of the image photographing apparatus within a predetermined range.

상기한 바를 달성하기 위한 본 발명은, 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법에 있어서, 상기 이미지에 대한 히스토그램을 계산하는 과정과, 상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구하는 과정과, 제1범위 이내의 히스토그램 분포 개수 및 제2범위 이내의 히스토그램 분포 개수가 미리 정해진 범위 이내에 각각 포함되는지를 판단하는 과정과, 상기 판단 결과 상기 미리 정해진 범위 이내에 각각 포함되는 경우 상기 밝기 평균이 기준 밝기가 되도록 조정하는 과정을 포함함을 특징으로 한다.According to an aspect of the present invention, there is provided a method of automatically adjusting brightness in an image capturing apparatus, the method comprising: calculating a histogram for the image, obtaining a brightness average for the histogram using the histogram, and Determining whether the number of histogram distributions within the first range and the number of histogram distributions within the second range are respectively included within a predetermined range, and when the determination result includes each of the histogram distributions within the predetermined range, the brightness average is the reference brightness. It characterized in that it comprises a process of adjusting to be.

또한 본 발명은, 밝기를 자동으로 조절하기 위한 이미지 촬영 장치에 있어서, 이미지를 입력받는 이미지 센서와, 상기 이미지 센서로부터의 상기 이미지에 대한 히스토그램을 계산하고, 상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구한 후, 제1범위 이내의 히스토그램 분포 개수 및 제2범위 이내의 히스토그램 분포 개수가 미리 정해진 범위 이내에 각각 포함되는지를 판단하는 히스토그램 계산부와, 상기 히스토그램 계산부에 의한 판단 결과 상기 미리 정해진 범위 이내에 각각 포함되는 경우 상기 밝기 평균이 기준 밝기가 되도록 조정하는 자동 밝기 조절부를 포함함을 특징으로 한다.In addition, the present invention, in the image capture device for automatically adjusting the brightness, the image sensor receiving the image, the histogram for the image from the image sensor is calculated, the brightness of the histogram using the histogram After calculating the average, a histogram calculator for determining whether the number of histogram distributions within the first range and the number of histogram distributions within the second range are respectively included within a predetermined range, and the result of the determination by the histogram calculator, the predetermined range. When included within each of the characterized in that it comprises an automatic brightness control unit for adjusting the brightness average to be the reference brightness.

또한 본 발명은, 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법에 있어서, 상기 이미지에 대한 히스토그램을 계산하는 과정과, 상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구하는 과정과, 상기 이미지에 대한 역광 여부를 판단하는 과정과, 상기 역광이 아니라고 판단되면, 상기 히스토그램에서 미리 정해진 히스토그램 누적값을 만족하는 밝기 레벨을 정규화한 값이 하한 밝기 레벨과 상한 밝기 레벨 범위 내인지를 판단하는 과정과, 상기 판단 결과 상기 범위 내인 경우 상기 밝기 평균이 기준 밝기가 되도록 조정하는 과정을 포함함을 특징으로 한다.The present invention also provides a method for automatically adjusting brightness in an image capturing apparatus, the method comprising: calculating a histogram for the image, obtaining a brightness average for the histogram using the histogram, and Determining whether the backlight is backlit; and when it is determined that the backlight is not the backlight, determining whether a value obtained by normalizing a brightness level satisfying a predetermined histogram cumulative value in the histogram is within a range of a lower brightness level and an upper brightness level; And when the determination result is within the range, adjusting the brightness average to be the reference brightness.

본 발명에 따르면, 밝기 데이터를 이용할 경우에 발생하는 포화 및 어둡게 찍히는 현상을 방지할 수 있는 이점이 있다. 또한 본 발명은 정지 영상 및 동영상의 화질을 개선할 수 있을 뿐만 아니라 자동 화이트 밸런스의 성능을 개선할 수 있는 효과가 있다.According to the present invention, there is an advantage that can prevent saturation and darkening occurring when using the brightness data. In addition, the present invention can not only improve the quality of still images and moving images, but also improve the performance of automatic white balance.

도 1은 본 발명의 실시예에 따른 이미지 촬영 장치의 내부 블록 구성도,
도 2는 본 발명의 실시예에 따른 렌즈 쉐이딩 보정 방법을 설명하기 위한 예시도,
도 3은 본 발명의 실시예에 따라 이미지를 M × N 개의 윈도우로 나눈 예시도,
도 4는 상기 도 3의 각 윈도우를 이용하여 밝기 평균을 구하는 방법을 설명하기 위한 도면,
도 5는 상기 도 3의 각 윈도우를 이용하여 가중화된 히스토그램을 구하는 방법을 설명하기 위한 도면,
도 6은 본 발명의 실시예에 따른 Y 히스토그램 예시도,
도 7은 본 발명의 실시예에 따른 Max(A*Rij, B*Gij, C*Bij) 히스토그램 예시도,
도 8은 본 발명의 실시예에 따른 윈도우의 다른 형태를 도시한 도면,
도 9는 본 발명의 실시예에 따른 감마 보정 방법을 설명하기 위한 도면,
도 10 및 도 11은 본 발명에서 이용되는 색상과 채도 간의 관계 그래프,
도 12는 본 발명의 실시예에 따라 노출 제어량(Ev) 또는 그레이 픽셀에 따른 기준 밝기(Y target)의 변경 예를 도시한 도면,
도 13 및 도 14는 본 발명의 일실시예에 따른 자동 밝기 조정을 위한 동작 흐름도,
도 15는 본 발명의 일실시예에 따른 히스토그램 분포 개수를 나타낸 도면,
도 16은 본 발명의 다른 실시예에 따라 역광을 고려한 자동 밝기 조정을 위한 동작 흐름도,
도 17은 본 발명의 다른 실시예에 따른 역광에서의 히스토그램 분포 개수를 나타낸 도면,
도 18은 본 발명의 다른 실시예에 따른 역광 판별을 위한 그래프.
1 is an internal block diagram of an image photographing apparatus according to an embodiment of the present invention;
2 is an exemplary view for explaining a lens shading correction method according to an embodiment of the present invention;
3 is an exemplary diagram of dividing an image into M × N windows according to an embodiment of the present invention;
4 is a diagram for describing a method of obtaining a brightness average using each window of FIG. 3;
FIG. 5 is a diagram for describing a method of obtaining a weighted histogram using each window of FIG. 3; FIG.
6 is a diagram illustrating a Y histogram according to an embodiment of the present invention;
7 is an exemplary histogram of Max (A * R ij , B * G ij , C * B ij ) according to an embodiment of the present invention;
8 is a view showing another form of a window according to an embodiment of the present invention;
9 is a view for explaining a gamma correction method according to an embodiment of the present invention;
10 and 11 are graphs of the relationship between hue and saturation used in the present invention,
FIG. 12 is a diagram illustrating an example of changing a reference brightness Y target according to an exposure control amount Ev or a gray pixel according to an embodiment of the present invention;
13 and 14 are flowcharts illustrating operations for automatically adjusting brightness according to an embodiment of the present invention;
15 is a diagram showing a histogram distribution number according to an embodiment of the present invention;
16 is an operation flowchart for automatic brightness adjustment in consideration of backlight according to another embodiment of the present invention;
17 is a view showing the number of histogram distribution in the backlight according to another embodiment of the present invention,
18 is a graph for backlight discrimination according to another embodiment of the present invention.

이하 본 발명의 바람직한 실시예들을 첨부한 도면을 참조하여 상세히 설명한다. 도면들 중 동일한 구성 요소들은 가능한 한 어느 곳에서든지 동일한 부호들로 나타내고 있음에 유의해야 한다. 또한 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능 및 구성에 대한 상세한 설명은 생략한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. It is to be noted that the same elements among the drawings are denoted by the same reference numerals whenever possible. In addition, detailed descriptions of well-known functions and configurations that may unnecessarily obscure the subject matter of the present invention will be omitted.

도 1은 본 발명의 실시예에 따른 이미지 촬영 장치의 내부블록 구성도이다. 이러한 이미지 촬영 장치에는 카메라, 캠코드, 웹카메라, 감시카메라, 의료용 카메라, 고속 카메라, 3D 카메라와 같은 멀티 카메라 등이 있다. 1 is an internal block diagram of an image capturing apparatus according to an exemplary embodiment of the present invention. Such image capturing devices include cameras, camcodes, web cameras, surveillance cameras, medical cameras, high speed cameras, and multi-cameras such as 3D cameras.

도 1을 참조하면, 이미지 센서(100)는 렌즈를 통해 피사체를 촬영하여 프레임 단위로 그에 따른 영상 신호를 출력한다. 이러한 이미지 센서(100)의 종류는 CMOS(Complimentary Metal Oxide Semiconductor) 센서, CCD(Charge Coupled Device) 센서, 포비언(Foveon) 센서, 보색(Complementary) 이미지 센서 등이 있다.  Referring to FIG. 1, the image sensor 100 photographs a subject through a lens and outputs an image signal according to each frame. The type of the image sensor 100 may be a complementary metal oxide semiconductor (CMOS) sensor, a charge coupled device (CCD) sensor, a foveon sensor, a complementary image sensor, or the like.

블랙 레벨 보정부(black level correction)(105)는 이미지가 가지는 블랙 레벨을 보정하는 역할을 한다. 디지털 이득 조정부(110)는 자동 밝기 조절부(125)의 제어하에 자동 화이트 밸런스 조정을 위해 디지털 이득을 조정한다. 이러한 블랙 레벨 보정(105) 및 디지털 이득 조정부(110)는 입력된 이미지에 대한 사전 처리를 수행하는 구성부로써 동작한다.The black level correction unit 105 corrects the black level of the image. The digital gain adjuster 110 adjusts the digital gain for automatic white balance adjustment under the control of the automatic brightness adjuster 125. The black level correction 105 and the digital gain adjusting unit 110 operate as components for performing preprocessing on the input image.

렌즈 쉐이딩 보정부(115)는 이미지 센서(100)의 특성에 의해 이미지의 중심부보다 이미지의 주변부가 어두운 특징을 가지는 경우 미리 정해진 쉐이딩 보정 곡선에 따라 보정을 수행하는 역할을 한다. 이러한 렌즈 쉐이딩 보정부(115)는 단색 정도에 따라 밝기 보정을 위한 쉐이딩 보정 곡선의 기울기를 선택한다. 이를 도 2를 참조하여 설명하면, 렌즈 쉐이딩 보정 곡선의 기울기를 크거나 작게 함으로써 원본 밝기 대신에 보정 밝기를 가지도록 할 수 있게 된다. 이미지 전체의 밝기를 적절히 보상하기 위해 쉐이딩 보정 곡선은 이미지의 주변부로 향할수록 보상값이 커지는 아래로 볼록한 형태의 곡선(200)이 된다. 이와 달리 이미지의 중심부와 주변부가 밝기 차이가 크게 차이 없으면 보상값이 작아지는 형태의 곡선(210)이 사용된다.The lens shading corrector 115 performs a correction according to a predetermined shading correction curve when the periphery of the image is darker than the center of the image due to the characteristics of the image sensor 100. The lens shading correction unit 115 selects the slope of the shading correction curve for brightness correction according to the degree of monochrome. Referring to FIG. 2, it is possible to have a correction brightness instead of the original brightness by increasing or decreasing the slope of the lens shading correction curve. In order to properly compensate for the brightness of the entire image, the shading correction curve is a downwardly convex curve 200 in which the compensation value increases toward the periphery of the image. On the contrary, if the brightness difference between the center and the periphery of the image is not significantly different, a curve 210 in which the compensation value is reduced is used.

히스토그램 계산부(120)는 프레임 단위로 입력되는 이미지를 복수개의 윈도우로 나눈 후 각 윈도우별 밝기 데이터 및 각 윈도우별 가중치를 이용하여 그 이미지에 대한 밝기 평균 및 그 이미지의 가중된 히스토그램 및 히스토그램 빈도수를 계산한다. 이때, 히스토그램을 위해 이미지 전체가 이용될 수 있으며, 다르게는 서브샘플링과 같은 리사이즈 방식을 통해 일부가 이용될 수도 있다.The histogram calculator 120 divides an image input in units of frames into a plurality of windows, and then uses the brightness data of each window and the weight of each window to calculate the brightness average of the image and the weighted histogram and the histogram frequency of the image. Calculate In this case, the entire image may be used for the histogram, and alternatively, some may be used through a resizing method such as subsampling.

예를 들어, 도 3에서와 같이 하나의 이미지(300)를 M × N 개의 윈도우로 나눈 후, 도 4(a)에서와 같은 윈도우별 가중치(Wij) 즉, 각 윈도우의 노출시간(AE:Auto Exposure) 가중치 및 도 4(b)에서와 같은 윈도우별 밝기 데이터(Yij)를 이용하여, 이미지의 밝기 평균(YA)을 구할 수 있다. 이를 수학식으로 나타내면 하기 수학식 1과 같다. For example, as shown in FIG. 3, after dividing an image 300 into M × N windows, each window's weight W ij as shown in FIG. 4A, that is, the exposure time of each window AE: The brightness average Y A of the image may be obtained using the auto exposure weight and the window-specific brightness data Y ij as shown in FIG. 4B. This is represented by Equation 1 below.

Figure pat00001
Figure pat00001

상기 수학식 1에서 i는 행(row)을 의미하며, j는 열(column)을 의미한다. In Equation 1, i denotes a row, and j denotes a column.

히스토그램 계산부(120)는 상기 수학식 1을 통해 밝기 평균(YA)을 구하게 되면, 이를 자동 밝기 조절부(125)로 제공한다.When the histogram calculator 120 obtains the brightness average Y A through Equation 1, the histogram calculator 120 provides the histogram calculator 120 to the automatic brightness controller 125.

이러한 경우의 히스토그램은 도 6(a)와 같이 나타나게 된다. 도 6(a)에서 8bit 이미지의 경우, 가로축은 밝기정보 Y, red pixel 밝기 R, green pixel 밝기 G, Blue pixel 밝기 B를 사용할 수 있으며, R, G, B의 통계적인 량 Max(R ,G, B)등을 0부터 255까지의 레벨(level) y로 나타내며, 세로축은 y에 대응하는 도수를 나타낸다. 상기 도 6(a)에서의 함수 f(y)(600)는 윈도우 전체의 가중된 히스토그램(weighted histogram)으로써 하기 수학식 2를 통해 구할 수 있다.In this case, the histogram is shown as shown in FIG. In the case of an 8-bit image in FIG. 6 (a), the horizontal axis may use brightness information Y, red pixel brightness R, green pixel brightness G, and blue pixel brightness B, and the statistical amounts of R, G, and B Max (R, G , B), etc., are represented by a level y from 0 to 255, and the vertical axis represents the frequency corresponding to y. The function f (y) 600 in FIG. 6 (a) may be obtained from Equation 2 as a weighted histogram of the entire window.

Figure pat00002
Figure pat00002

상기 수학식 2에서 Lij은 도 5(a)에서와 같은 윈도우별 히스토그램 가중치이며, Hij는 도 5(b)에서와 같은 윈도우별 히스토그램 도수(bin)이다. 상기 수학식 2에서와 같이 f(y)는 각 윈도우에 가중치를 적용한 히스토그램 빈의 합을 나타낸다. 그리고 이미지의 Hij는 레벨 y에 따라 구하지만, 필요에 따라서 Red, Green, Blue 히스토그램은 상수 α,β,γ를 적응적으로 적용하여 y를 K*y로 변형하여 Hij를 구한다. 여기서 K는 α,β,γ이다.In Equation 2, L ij is a histogram weight for each window as shown in FIG. 5 (a), and H ij is a histogram frequency for each window as shown in FIG. 5 (b). As shown in Equation 2, f (y) represents the sum of histogram bins to which weights are applied to each window. The H ij of the image is obtained according to the level y. However, if necessary, the red, green, and blue histograms are adaptively applied to the constants α, β, and γ, and the y is converted into K * y to obtain H ij . Where K is α, β, γ.

히스토그램 계산부(120)는 도 3에서와 같이 이미지에서 복수개의 윈도우를 설정하고, 윈도우별 히스토그램 가중치를 도 5(a)에서와 같이 설정하고, 히스토그램 도수는 도 5(b)에서와 같이 정의된 윈도우를 이용하여 획득한다. 이때, 이미지 센서(100)가 RGB 베이어 센서의 경우, 도 6(a)와 같은 밝기 데이터 Y에 대한 히스토그램 이외에도 Red에 대한 히스토그램, Green에 대한 히스토그램, Blue에 대한 밝기 레벨에 따른 히스토그램이 활용될 수 있다. 또한 WRGB 센서의 경우에는 W, R, G, B, Y 히스토그램을 이용할 수도 있다. 또한 가중된 히스토그램 이외에 윈도우 전체의 통계적 히스토그램으로 Max(A*Rij, B*Gij, C*Bij), Median(A*Rij, B*Gij, C*Bij) 등의 모든 윈도우에서 레벨 RGB의 히스토그램을 이용하는 등 다양한 형식을 이용할 수 있다. 이와 같이 이미지 센서(100)의 종류에 따라 추출되는 히스토그램은 다양한 방법으로 구할 수 있다. 여기서 A, B, C는 상수로 이득을 적응적으로 적용하여 사용할 수 있다.The histogram calculator 120 sets a plurality of windows in the image as shown in FIG. 3, sets the histogram weights for each window as shown in FIG. 5A, and the histogram frequency is defined as shown in FIG. 5B. Acquire using a window. In this case, when the image sensor 100 is an RGB Bayer sensor, a histogram for red, a histogram for green, and a histogram according to the brightness level for blue may be utilized in addition to the histogram for the brightness data Y as shown in FIG. 6 (a). have. In the case of WRGB sensors, the histograms W, R, G, B, and Y may also be used. In addition to the weighted histogram, the statistical histogram of the entire window is used for all windows such as Max (A * R ij , B * G ij , C * B ij ), Median (A * R ij , B * G ij , C * B ij ). There are a variety of formats available, including a histogram of level RGB in. As such, the histogram extracted according to the type of the image sensor 100 may be obtained by various methods. Here, A, B, and C can be used by adaptively applying the gain as a constant.

구체적으로, 히스토그램 계산부(120)는 도 6에서와 같은 Y 히스토그램 이외에 (A*Red + B*Green + C*Blue) 히스토그램, (A*Red + B*Green + C*Blue + D*white)의 히스토그램, (A*Cyan + B*Magenta + C*Yellow)의 히스토그램, (A*Cyan + B*Magenta + C*Yellow + D*Green)의 히스토그램, Max(A*Rij, B*Gij, C*Bij)의 히스토그램, Median(A*Rij, B*Gij, C*Bij)의 히스토그램 등을 이용할 수 있다. 여기서, A, B, C, D는 사용자 정의 상수이다. Specifically, the histogram calculator 120 may include (A * Red + B * Green + C * Blue) histograms and (A * Red + B * Green + C * Blue + D * white) in addition to the Y histogram as shown in FIG. Histogram of, (A * Cyan + B * Magenta + C * Yellow), Histogram of (A * Cyan + B * Magenta + C * Yellow + D * Green), Max (A * R ij , B * G ij , Histogram of C * B ij ), histogram of Median (A * R ij , B * G ij , C * B ij ), and the like. Where A, B, C, and D are user-defined constants.

상기 히스토그램들 중에서 도 7에서는 Max(A*Rij, B*Gij, C*Bij) 히스토그램을 예시하고 있다. 도 7에서의 f(y) = Max(R, G, B)이며, R에 대한 히스토그램, G에 대한 히스토그램, B에 대한 히스토그램 중에서 각 레벨마다 최대값이 선택되는 히스토그램이다. Among the histograms, FIG. 7 illustrates a histogram of Max (A * R ij , B * G ij , C * B ij ). In FIG. 7, f (y) = Max (R, G, B), and is a histogram in which a maximum value is selected for each level among the histogram for R, the histogram for G, and the histogram for B.

또한, 상기 도 3에서 M × N 개의 윈도우 개수 및 그 이미지에서의 시작점과 끝점은 사용자가 정의할 수 있다. 상기 도 3에서는 이미지를 복수개의 동일한 형태의 윈도우로 나누는 경우를 예로 들어 설명하였으나, 도 8에서와 같이 사용자의 필요에 따라 윈도우들(800~815)을 임의의 위치를 기준으로 원하는 개수로 정의할 수 있으며, 윈도우가 서로 중첩되도록 정의될 수도 있음은 물론이다.In addition, in FIG. 3, the number of M × N windows and a start point and an end point in the image may be defined by a user. In FIG. 3, an example of dividing an image into a plurality of windows having the same shape is described as an example. However, as shown in FIG. 8, the windows 800 to 815 may be defined as a desired number based on an arbitrary position as required by a user. Of course, the windows may be defined to overlap each other.

자동 밝기 조절부(125)는 밝기 평균(YA)이 기준 밝기(Y target 즉, YT)와 같아지도록 노출 시간, 아날로그 이득 및 디지털 이득을 조정한다. 이러한 자동 밝기 조절부(125)는 이미지 촬영 장치의 전반적인 동작을 제어하는 제어부로써 동작한다. The automatic brightness controller 125 adjusts the exposure time, the analog gain, and the digital gain so that the brightness average Y A is equal to the reference brightness Y target, that is, Y T. The automatic brightness controller 125 operates as a controller for controlling the overall operation of the image capturing apparatus.

이와 같이 밝기 평균(YA)을 기준 밝기(Y target)로써 일정하게 유지하더라도 그 이미지 내에 미리 정해진 밝은 레벨 이상에 대응하는 픽셀이 존재하지 않을 경우에는 그 이미지는 전반적으로 어둡게 출력될 수 있다. 다르게는 미리 정해진 밝은 레벨 이상에 대응하는 픽셀이 너무 많을 경우에는 이미지가 전반적으로 너무 밝게 출력될 수 있다. As such, even if the brightness average Y A is kept constant as the reference brightness Y target, when there is no pixel corresponding to a predetermined bright level or more in the image, the image may be generally darkened. Alternatively, if there are too many pixels corresponding to the predetermined bright level or more, the image may be output too bright overall.

예를 들어, 도 6(b)에서는 히스토그램을 기준 레벨과 비교해봤을 때 오른쪽이 비어 있는 경우를 예시하고 있는데, 이는 하이키(hi-key)가 부족한 히스토그램이어서 이미지가 전반적으로 어둡게 출력되게 된다. 이러한 경우에는 가중된 히스토그램 f(y)(610)이 615방향으로 옮겨지도록 보정한다면 이미지는 전반적으로 보다 밝게 출력될 것이다. 또한 도 6(c)에서는 기준 레벨과 비교해봤을 때 포화 레벨에 해당하는 픽셀이 많아 하이키가 많아 포화가 발생하는 히스토그램을 예시하고 있다. For example, FIG. 6 (b) illustrates a case in which the right side is empty when the histogram is compared with the reference level, which is a histogram lacking a hi-key, so that the image is generally dark. In this case, if the weighted histogram f (y) 610 is corrected to be shifted in the 615 direction, the image will be output brighter. 6 (c) illustrates a histogram in which saturation occurs due to a large number of pixels corresponding to a saturation level and a large number of high keys when compared with a reference level.

이와 같이 포화 레벨에 해당하는 픽셀이 많을 경우에는 이미지 포화가 발생할 수 있다. 여기서, 포화란 전체 이미지에서 어떤 비율 이상의 픽셀이 미리 정해진 명암 단계 이상을 가질 때를 의미한다. 일반적으로 모든 계조가 풍부한 이미지는 도 6(a)에서와 같이 히스토그램이 넓게 분포되는 형태를 가지는데, 도 6(c)에서는 오른쪽에 많이 분포된 히스토그램 형태를 가지므로, 이미지 계조 표현이 부족하게 된다. 이러한 경우에는 오른쪽에 치우친 히스토그램 분포를 625 방향으로 옮겨지도록 보정한다면 이미지는 모든 계조가 풍부한 이미지로 보정될 것이다. As such, when there are many pixels corresponding to the saturation level, image saturation may occur. Here, saturation means when a certain ratio or more pixels in the entire image have a predetermined contrast level or more. In general, the image rich in all the gradations has a form in which the histogram is widely distributed as shown in FIG. 6 (a). In FIG. 6 (c), since the histogram is distributed in the right side, the image gradation is insufficient. . In this case, if you correct the histogram distribution skewed to the right to be shifted in the 625 direction, the image will be corrected to an image rich in all gradations.

이때, 이미지의 히스토그램 예를 도시한 도 6에서의 가로축 레벨(y)는 밝기 데이터 Y, 레드 픽셀 밝기 R, 그린 픽셀 밝기 G, 블루 픽셀 밝기 B로 대체될 수 있다. 또한, 히스토그램 도수로는 밝기 R, 밝기 G, 밝기 B, 통계적인 량 Max(RHij, GHij, BHij) 등이 사용될 수 있다.At this time, the horizontal axis level y in FIG. 6, which shows an example of the histogram of the image, may be replaced with brightness data Y, red pixel brightness R, green pixel brightness G, and blue pixel brightness B. FIG. In addition, as the histogram frequency, brightness R, brightness G, brightness B, statistical quantities Max (RH ij , GH ij , BH ij ) may be used.

상기한 바와 같이 자동 밝기 조절부(125)에서는 밝기 평균(YA)을 기준 밝기(Y target)로써 일정하게 유지하더라도 도 6(b) 및 도 6(c)에서와 같은 히스토그램 분포가 발생할 수 있다. 이러한 경우를 방지하기 위해 본 발명에서는 히스토그램을 이용한 자동 밝기 조절 방법을 제안한다. 이러한 히스토그램을 이용한 자동 밝기 조절 방법은 하기에서 구체적으로 후술하기로 한다.As described above, the histogram distribution as shown in FIGS. 6 (b) and 6 (c) may occur even though the brightness average Y A is kept constant as the reference brightness Y target. . In order to prevent such a case, the present invention proposes an automatic brightness control method using a histogram. An automatic brightness control method using the histogram will be described later in detail.

이미지 처리부(130)는 레드(Red), 그린(Green), 블루(Blue)로 이루어진 영상 신호에 대한 이미지 처리를 수행한다. The image processor 130 performs image processing on an image signal consisting of red, green, and blue.

감마 보정부(135)는 이미지에 대한 감마 보정을 수행하는데, 일반적으로 감마(gamma)는 콘트라스트 상태를 나타내는 척도로 특성 곡선의 경사도 즉, 농도의 변화/노광량의 변화를 말한다. 본 발명에 따른 감마 보정부(135)는 히스토그램 분포에 따라 오프셋 포인트, 하이라이트 포인트를 변경할 수 있다. 예를 들어, 도 9에서의 오프셋 포인트를 변경함으로써 이미지가 뿌옇게 되는 구간을 줄일 수 있으며, 하이라이트 포인트를 변경함으로써 이미지가 너무 밝아지는 구간도 줄일 수 있게 된다. 여기서, 감마 보정 변환을 필요에 따라 사용자가 독립적으로 정의할 수 있다. 만일 글로벌톤 맵핑(global tone mapping) 또는 로컬톤 맵핑(local tone mapping) 방법을 이용한 WDR(Wide Dynamic Range) / HDR(High Dynamic Range)과 병행하여 사용한다면, 이미지 다이나믹 레인지를 더욱 개선할 수 있다. The gamma correction unit 135 performs gamma correction on an image. In general, gamma refers to a gradient indicating a contrast state, that is, a slope of a characteristic curve, that is, a change in concentration / exposure amount. The gamma correction unit 135 according to the present invention may change the offset point and the highlight point according to the histogram distribution. For example, by changing the offset point in FIG. 9, the section in which the image becomes cloudy can be reduced, and the section in which the image becomes too bright can be reduced by changing the highlight point. Here, the gamma correction transformation may be independently defined by the user as needed. If used in parallel with Wide Dynamic Range (WDR) / High Dynamic Range (HDR) using a global tone mapping or local tone mapping method, the image dynamic range may be further improved.

색상 및 채도(hue & saturation) 판단부(140)는 이미지의 그레이 비율 및 단색 특성을 판단하는 역할을 한다. 이때, 이러한 판단을 위해 이미지 전체 또는 필요에 따라 서브샘플링과 같은 리사이즈 방식이 사용될 수 있다. 색상 및 채도 판단부(140)는 이미지의 그레이 비율 및 단색 특성을 판단하기 위해 도 10 및 도 11에서와 같은 색상과 채도 간의 관계 그래프를 이용한다. The hue and saturation determination unit 140 determines the gray ratio and the monochromatic characteristic of the image. In this case, a resizing method such as subsampling of the entire image or as necessary may be used for this determination. The hue and saturation determination unit 140 uses a graph of the relationship between hue and saturation as shown in FIGS. 10 and 11 to determine the gray ratio and the monochrome characteristic of the image.

또한 이미지 처리에서 얼굴 검출부(Face Detetection)(141)에서와 같은 부가 기능을 이용하여 얼굴 검출 결과를 밝기 조절에 사용할 수도 있다. In addition, in the image processing, the face detection result may be used to adjust the brightness by using an additional function as in the face detection unit 141.

구체적으로 색상 및 채도 판단부(140)는 도 11(a)에서와 같이 색상에 따른 채도, 도 11(b)에서와 같이 색상의 도수 및 도 11(c)에서와 같이 채도 도수를 구하여 사용할 수 있다. 또한 이미지의 그레이 비율은 도 10을 이용하여 판단한다. 이미지 내의 그레이 픽셀의 도수의 개수를 이미지 전체 도수의 개수에 대한 비율 "%"로 정의할 때, 도 10을 이용한다면 그 그레이 픽셀의 비율을 알 수 있게 된다. 예를 들어, 도 10에서 중심쪽은 그레이를 나타내므로, 중심쪽에 픽셀이 많이 분포할수록 이미지는 전반적으로 검은 계열의 색을 많이 가지게 된다. In detail, the hue and saturation determination unit 140 may obtain the saturation according to the color as shown in FIG. 11 (a), the degree of color as shown in FIG. have. In addition, the gray ratio of the image is determined using FIG. 10. When the number of degrees of gray pixels in an image is defined as the ratio "%" to the number of total images, the ratio of the gray pixels can be known using FIG. For example, in FIG. 10, since the center side represents gray, the more pixels are distributed in the center side, the more the image has a black color overall.

여기서, 그레이 픽셀 도수로는 YCbCr 색공간(color space)의 CbCr Plane에서, Ymin ≤ Y ≤ Ymax 범위의 그레이 픽셀을 고려할 수도 있고, 도 12에서와 같은 가중치를 고려하여 도 10의 그레이 존을 만족하는 픽셀만 고려할 수도 있다. 여기서, 단색 정도에 따라 도 12에서와 같이 Y target을 변경할 수 있다. Here, as the gray pixel frequency, in the CbCr Plane of the YCbCr color space, gray pixels in a range of Ymin ≤ Y ≤ Ymax may be considered, and pixels satisfying the gray zone of FIG. 10 in consideration of weights as shown in FIG. 12. You may only consider. Here, the Y target may be changed as shown in FIG. 12 according to the degree of monochrome.

도 12(a)는 노출 제어량(Ev)에 따른 기준 밝기(Y target)의 변경 예를 도시하고 있으며, 도 12(b)는 그레이 픽셀에 따른 Y target의 변경 예를 도시하고 있다. 노출 제어량(Ev)은 그 값이 커질수록 노출량이 적게되어 이미지는 더욱 어두워진다. 반대로 노출 제어량이 작으면 작을수록 노출량이 많아지게 되어 이미지는 더욱 밝아진다. 따라서 도 12(a)에서와 같이 노출 제어량에 따라 Y target을 변경함으로써 밝은 곳의 흰색 이미지의 경우에는 보다 희게 처리된 이미지가 출력되며, 어두운 곳의 흰색 이미지의 경우에는 보다 어둡게 처리된 이미지가 출력되게 된다. 이와 유사하게 도 12(b)에서와 같이 그레이 픽셀에 따라 Y target을 변경함으로써 검은색 이미지의 경우에는 좀 검게 보일 수 있도록 처리된 이미지가 출력되게 된다.12A illustrates an example of changing the reference brightness Y target according to the exposure control amount Ev, and FIG. 12B illustrates an example of changing the Y target according to the gray pixel. The larger the value of the exposure control amount Ev, the smaller the exposure amount, and the darker the image. Conversely, the smaller the exposure control amount, the greater the exposure amount and the brighter the image. Therefore, as shown in FIG. 12 (a), by changing the Y target according to the exposure control amount, a whiter image is output in the case of a bright white image, and a darker image is output in a case of a white image in a dark region. Will be. Similarly, as shown in FIG. 12 (b), by changing the Y target according to the gray pixel, the processed image is outputted so that the black image can be seen as black.

또한, 도 1의 얼굴 검출부(141)에서와 같은 얼굴 검출 알고리즘과 연동하여, 얼굴 검출이 되는 경우 Y target 및 YLOWER, YUPPER를 변경하여 줌으로써 카메라 사용자의 기호에 맞게 이미지 밝기를 변경하여 줄 수도 있다. 그리고 얼굴이 검출되지 않는 경우에는 Y target 및 YLOWER, YUPPER의 초기치 또는 얼굴 검출이 되기 전 Y target 및 YLOWER, YUPPER의 마지막 값으로 복귀를 한다.In addition, in conjunction with a face detection algorithm as shown in the face detection unit 141 of FIG. 1, when the face is detected, the image brightness may be changed according to the preference of the camera user by changing the Y target, Y LOWER , and Y UPPER . have. And If no face is detected, and the target returns to the last value of Y and Y LOWER, before the initial value or the detected face of the target and Y Y Y UPPER LOWER, Y UPPER.

이하, 도 13 및 도 14를 참조하여 이미지 촬영 장치의 밝기를 자동으로 조절하는 과정을 설명하기로 한다. 본 발명에서는 자동 밝기 조절을 위해 각 윈도우에 가중치를 적용한 히스토그램 도수의 합 f(y)를 이용한다. Hereinafter, a process of automatically adjusting the brightness of the image capturing apparatus will be described with reference to FIGS. 13 and 14. In the present invention, the sum f (y) of the histogram counts to which the weight is applied to each window is used for automatic brightness adjustment.

도 13을 참조하면, 이미지 촬영 장치는 우선 900단계에서 기준 밝기 YT, 상한 밝기 변수 YUPPER, 하한 밝기 변수 YLOWER, 하한 밝기 픽셀개수 LT, 상한 밝기 픽셀개수 UT 각각에 대한 초기치를 설정한다. 905단계에서 이미지가 입력되면 910단계에서 이미지에 대한 히스토그램을 계산한다. 이하의 설명에서 도 6의 Y 히스토그램을 예시하여 설명을 하지만 본 발명에서 이용되는 히스토그램은 이에 한정되는 것은 아니다. 즉, 이미지 센서(100)의 종류에 따라 다양한 히스토그램이 구해질 수 있다. 예를 들어, (A*Red + B*Green + C*Blue) 히스토그램, (A*Red + B*Green + C*Blue + D*white)의 히스토그램, (A*Cyan + B*Magenta + C*Yellow)의 히스토그램, (A*Cyan + B*Magenta + C*Yellow + D*Green)의 히스토그램, Max(A*Rij, B*Gij, C*Bij)의 히스토그램, Median(A*Rij, B*Gij, C*Bij)의 히스토그램 중 어느 하나를 계산할 수 있다. Referring to FIG. 13, the image capturing apparatus first sets initial values for the reference brightness Y T , the upper brightness variable Y UPPER , the lower brightness variable Y LOWER , the lower brightness pixel count L T , and the upper brightness pixel count U T in step 900. do. If an image is input in step 905, the histogram of the image is calculated in step 910. In the following description, the Y histogram of FIG. 6 will be described, but the histogram used in the present invention is not limited thereto. That is, various histograms may be obtained according to the type of the image sensor 100. For example, (A * Red + B * Green + C * Blue) histogram, histogram of (A * Red + B * Green + C * Blue + D * white), (A * Cyan + B * Magenta + C * Histogram of Yellow), Histogram of (A * Cyan + B * Magenta + C * Yellow + D * Green), Histogram of Max (A * R ij , B * G ij , C * B ij ), Median (A * R ij , B * G ij , C * B ij ) may be calculated.

또한 히스토그램을 계산하기 이전에 상기 수학식 1에서와 같이 밝기 평균(YA)을 구할 수 있다. 이러한 밝기 평균(YA) 대신에 히스토그램을 계산하게 되면, 그 계산된 히스토그램을 이용하여 그 히스토그램에 대한 밝기 평균(YH)을 구할 수 있다. 이러한 밝기 평균(YH)는 하기 수학식 3을 통해 구할 수 있다. In addition, before calculating the histogram, the brightness average Y A may be obtained as in Equation 1 above. When the histogram is calculated instead of the brightness average Y A , the calculated histogram may be used to obtain a brightness average Y H for the histogram. This brightness average (Y H ) can be obtained through Equation 3 below.

Figure pat00003
Figure pat00003

상기 수학식 3에서 y는 레벨을 나타내며, f(y)는 각 윈도우에 가중치를 적용한 히스토그램 도수의 합을 나타낸다. 이와 같이 밝기 평균(YA) 또는 밝기 평균(YH)은 자동 밝기 조절에 이용된다. 즉, 밝기 평균(YA) 또는 밝기 평균(YH)이 기준 밝기 YT와 같아지도록 함으로써 자동 밝기 조절을 수행한다. 본 발명에서는 이러한 밝기 평균(YA) 또는 밝기 평균(YH)을 이용하는 방법 이외에 추가적으로 히스토그램 제어 방법을 이용함으로써 자동 밝기 조절 방법을 제안하는 것이다. In Equation 3, y represents a level, f (y) represents the sum of the histogram frequency is applied to each window weighted. As such, the brightness average Y A or the brightness average Y H is used for automatic brightness adjustment. That is, automatic brightness adjustment is performed by making the brightness average Y A or the brightness average Y H equal to the reference brightness Y T. The present invention proposes an automatic brightness adjustment method by using a histogram control method in addition to the method using the brightness average Y A or the brightness average Y H.

이를 위해 900단계에서 기준 밝기 YT, 상한 밝기 변수 YUPPER, 하한 밝기 변수 YLOWER, 하한 밝기 픽셀개수 LT, 상한 밝기 픽셀개수 UT 각각에 대한 초기치를 설정하는 것이다. 여기서, 밝기 픽셀개수를 설명하기 위해 도 15를 참조한다. 도 15는 픽셀 개수의 분포 히스토그램을 예시하고 있다. 도 15에서는 히스토그램 하한 레벨변수를 l(705), 상한 레벨 변수를 u(710), 레벨의 최대값을 m(715)이라고 정의한다. 이러한 경우 도 15(a)에서와 같이 하한 레벨변수 l(705)과 레벨의 최대값 m(715) 사이의 밝기 픽셀 개수를 L이라고 할 경우 상기 L은 하기 수학식 4를 통해 구할 수 있다. For this purpose, in step 900, initial values for reference brightness Y T , upper brightness variable Y UPPER , lower brightness variable Y LOWER , lower brightness pixel count L T , and upper brightness pixel count U T are set. Here, reference is made to FIG. 15 to describe the number of brightness pixels. 15 illustrates a distribution histogram of the number of pixels. In FIG. 15, the histogram lower limit level variable is defined as l (705), the upper limit level variable is defined as u (710), and the maximum value of the level is defined as m (715). In this case, when the number of brightness pixels between the lower limit level variable l 705 and the maximum value m 715 of the level is L, as shown in FIG. 15 (a), L may be obtained through Equation 4 below.

Figure pat00004
Figure pat00004

상기 수학식 4와 같이 정의된 L은 도 15(a)에서의 빗금친 면적(700)에 대응한다. 본 발명에서는 하한 레벨변수 l(705)과 상한 레벨 변수 u(710) 사이에서 히스토그램 f(y)에 대한 픽셀 개수를 미리 정해진 범위 이내에 포함되도록 조정함으로써 밝기를 조정할 수 있게 된다. 예를 들어, 하한 레벨변수 l(705)과 상한 레벨 변수 u(710) 사이에서 히스토그램 f(y)에 대한 픽셀 개수가 100일 경우 최소한 150개 이상이 되어야 밝게 조정이 된다고 가정했을 경우 그 픽셀 개수를 150개로 맞추는 것이다. 이와 같은 일정 개수 이상의 밝기 픽셀 개수를 하한 밝기 픽셀개수 LT라고 정의할 수 있다. L defined as in Equation 4 corresponds to the hatched area 700 in FIG. In the present invention, the brightness can be adjusted by adjusting the number of pixels for the histogram f (y) within the predetermined range between the lower limit level variable l 705 and the upper limit level variable u 710. For example, if the number of pixels for the histogram f (y) is 100 between the lower limit level variable l (705) and the upper limit level variable u 710, at least 150 or more pixels are assumed to be brightly adjusted. To 150. The number of brightness pixels above the predetermined number may be defined as the lower limit number of brightness pixels L T.

이와 달리 레벨이 높은 쪽에 많은 픽셀이 몰려있을 경우 도 15(b)에서와 같은 픽셀 개수의 분포 히스토그램이 나타나게 된다. 이러한 경우 상한 레벨 변수 u(710)와 레벨의 최대값 m(715) 사이의 밝기 픽셀 개수를 U라고 할 경우 상기 U는 하기 수학식 5를 통해 구할 수 있다. On the other hand, when many pixels are concentrated at a higher level, a distribution histogram of the number of pixels as shown in FIG. 15 (b) appears. In this case, when the number of brightness pixels between the upper limit level variable u 710 and the maximum value m 715 of the level is U, U can be obtained through Equation 5 below.

Figure pat00005
Figure pat00005

상기 수학식 5와 같이 정의된 U는 도 15(b)에서의 빗금친 면적(720)에 대응한다. 이러한 경우에는 상한 레벨 변수 u(710)와 레벨의 최대값 m(715) 사이의 픽셀 개수 U가 일정 개수 이상일 경우 이미지가 너무 밝게 나타나게 되므로, 이러한 경우에는 그 픽셀 개수를 일정 개수 이하로 줄이는 것이다. 이와 같은 일정 개수 이하의 밝기 픽셀 개수를 UT라고 정의할 수 있다. U defined as in Equation 5 corresponds to the hatched area 720 in FIG. 15 (b). In this case, if the number of pixels U between the upper limit level variable u 710 and the maximum value m 715 of the level is greater than or equal to a certain number, the image appears too bright. In this case, the number of pixels is reduced to less than or equal to a certain number. The number of brightness pixels below the predetermined number may be defined as U T.

상한 밝기 변수 YUPPER 및 하한 밝기 변수 YLOWER는 도 15에서의 상한 레벨 변수 u(710)와 하한 레벨 변수 l(705)를 나타낸다. 이러한 기준 밝기 YT, 상한 밝기 변수 YUPPER, 하한 밝기 변수 YLOWER, 하한 밝기 픽셀개수 LT, 상한 밝기 픽셀개수 UT 각각은 변경 가능함은 물론이다. 본 발명에서와 같이 상기 변수들은 도 12에서와 같이 Ev 또는 Bv, 그레이 픽셀 등에 의해 변경될 수 있다. The upper limit brightness variable Y UPPER and the lower limit brightness variable Y LOWER represent the upper limit level variable u 710 and the lower limit level variable l 705 in FIG. 15. The reference brightness Y T , the upper limit brightness variable Y UPPER , the lower limit brightness variable Y LOWER , the lower limit brightness pixel count L T , and the upper limit brightness pixel count U T can be changed. As in the present invention, the variables may be changed by Ev or Bv, gray pixels, or the like as shown in FIG. 12.

이에 따라 915단계에서 그레이 픽셀의 비율을 판단한 후 920단계에서 그레이 픽셀의 비율에 따라 YT, 상한 밝기 변수 YUPPER, 하한 밝기 변수 YLOWER, 하한 밝기 픽셀개수 LT, 상한 밝기 픽셀개수 UT 각각을 재설정한다. 이러한 변수들의 재설정은 그레이 픽셀 비율과 변수들값 간의 맵핑 관계를 나타낸 미리 정해진 테이블값에 따를 수 있다. 이후, 925단계에서 렌즈 쉐이딩 보정 후 930단계에서 감마 보정을 수행한다. 이러한 렌즈 쉐이딩 보정 및 감마 보정은 이미지의 화질을 개선하는 방법으로써 보다 개선된 화질을 얻고자 하는 경우에 추가적으로 적용될 수 있다. Accordingly, after determining the ratio of gray pixels in step 915, according to the ratio of gray pixels in step 920, Y T , upper brightness variable Y UPPER , lower brightness variable Y LOWER , lower brightness pixel count L T , and upper brightness pixel count U T, respectively. Reset it. The resetting of these variables may be based on a predetermined table value representing the mapping relationship between the gray pixel ratio and the values of the variables. Subsequently, in step 930, gamma correction is performed after lens shading correction. Such lens shading correction and gamma correction may be additionally applied to a case in which a more improved image quality is to be obtained as a method of improving image quality.

이어, 도 14의 931단계로 진행한다. 도 13의 930단계 및 도 14의 931단계가 연결되는 것임을 나타내기 위해 심볼A를 사용하였다. 또한 도 13의 905단계 및 도 14의 985단계가 연결되는 것임을 나타내기 위해 심볼B를 사용하였다.Subsequently, the process proceeds to step 931 of FIG. 14. Symbol A is used to indicate that step 930 of FIG. 13 and step 931 of FIG. 14 are connected. In addition, symbol B is used to indicate that step 905 of FIG. 13 and step 985 of FIG. 14 are connected.

만일 931단계에서 얼굴 검출 알고리즘을 통해 얼굴이 검출이 되는 경우 932단계로 진행하여 Y target 및 YLOWER, YUPPER를 변경한다. 이렇게 함으로써 카메라 사용자의 기호에 맞게 이미지 밝기를 변경하여 줄 수도 있다. 이와 달리 얼굴이 검출되지 않는 경우에는 933단계로 진행하여 Y target 및 YLOWER, YUPPER의 초기치 또는 얼굴 검출이 되기 전 Y target 및 YLOWER, YUPPER의 마지막 값으로 복귀를 한다.If the face is detected through the face detection algorithm in step 931, the process proceeds to step 932 to change the Y target, Y LOWER , and Y UPPER . By doing this, you can change the image brightness to suit the preferences of the camera user. In contrast, if no face is detected, the process proceeds to step 933 and returns to the initial value of the Y target, Y LOWER , and Y UPPER , or to the last value of the Y target, Y LOWER , and Y UPPER before face detection.

상기 수학식 4, 5에서와 같이 히스토그램의 밝기 픽셀 개수 L과 U를 구한 후, 935단계에서 하한 레벨변수 l(705)과 레벨의 최대값 m(715) 사이의 밝기 픽셀 개수 L이 하한 밝기 픽셀개수 LT 보다 크면서, 상한 레벨 변수 u(710)와 레벨의 최대값 m(715) 사이의 픽셀 개수 U가 상한 밝기 픽셀개수 UT보다 작은지를 판단한다. 만일 상기 조건을 만족한다면 픽셀이 고르게 분포하고 있음을 나타내는 것이므로 940단계에서 밝기 평균 Y가 YT가 되도록 밝기를 조정한다. 여기서, 밝기 평균 Y는 밝기 평균(YA) 또는 밝기 평균(YH)을 의미한다. After calculating the number L and U of the brightness pixels of the histogram as shown in Equations 4 and 5, the number L of brightness pixels between the lower limit level variable l 705 and the maximum value m 715 of the level is the lower limit brightness pixel in step 935. Count L T It is determined whether the number of pixels U between the upper limit level variable u 710 and the maximum value m 715 of the level is smaller than the upper limit pixel count U T while being larger. If the above condition is satisfied, it indicates that the pixels are evenly distributed, and thus, the brightness is adjusted to Y T in step 940. Here, the brightness average Y means the brightness average Y A or the brightness average Y H.

이와 달리 상기 조건을 만족하지 않는다면 945단계에서 L이 하한 밝기 픽셀개수 LT 보다 작은지를 판단한다. 만일 L이 하한 밝기 픽셀개수 LT보다 작은 경우 950단계에서 밝기 평균 Y가 하한 밝기 변수 YLOWER보다 작은지를 판단한다. 판단 결과, 밝기 평균 Y가 하한 밝기 변수 YLOWER보다 작지 않은 경우 960단계에서 하한 레벨변수 l(705)과 레벨의 최대값 m(715) 사이의 밝기 픽셀 개수 L를 하한 밝기 픽셀개수 LT로 조정한다. 이는 밝기 평균이 원하는 밝기 조건 범위 이내에 들더라도 포화 및 어둡게 찍히는 현상이 발생할 수 있으므로, 이러한 경우를 방지하기 위해 밝기 픽셀 개수도 조정하는 것이다. 이와 달리 밝기 평균 Y가 하한 밝기 변수 YLOWER보다 작은 경우 밝기 평균 Y를 최소한의 밝기로 맞추어야 하므로 밝기 평균 Y가 하한 밝기 변수 YLOWER가 되도록 제어한다. In contrast, if the condition is not satisfied, L is the lower limit number of pixels L T in step 945. Determine if less than If L is smaller than the lower limit pixel count L T , in step 950, it is determined whether the brightness average Y is smaller than the lower limit brightness variable Y LOWER . If it is determined that the brightness average Y is not smaller than the lower limit brightness variable Y LOWER , the number of brightness pixels L between the lower limit level variable l (705) and the maximum value m (715) of the level is adjusted to the lower limit brightness pixel count L T in step 960. do. This may result in saturation and dimness even if the brightness average is within the desired range of brightness conditions, so that the number of brightness pixels is also adjusted to prevent this. On the other hand, if the brightness average Y is smaller than the lower limit brightness variable Y LOWER , the brightness average Y should be adjusted to the minimum brightness, so the brightness average Y is controlled to be the lower limit brightness variable Y LOWER .

한편, 945단계에서 L이 하한 밝기 픽셀개수 LT보다 작지 않은 경우 965단계에서 U가 상한 밝기 픽셀개수 UT보다 큰지를 판단한다. 만일 U가 상한 밝기 픽셀개수 UT보다 큰 경우 970단계에서 밝기 평균 Y가 상한 밝기 변수 YUPPER보다 큰지를 판단한다. 만일 밝기 평균 Y가 상한 밝기 변수 YUPPER보다 큰 경우 975단계에서 밝기 평균 Y가 상한 밝기 변수 YUPPER가 되도록 제어한다. 즉, 밝기 평균 Y가 너무 크지 않도록 상한 밝기 변수 YUPPER로 줄이는 것이다. 이와 달리 밝기 평균 Y가 상한 밝기 변수 YUPPER보다 크지 않은 경우 980단계에서 U가 상한 밝기 픽셀개수 UT가 되도록 제어한다. 상기한 과정을 수행함으로써 985단계에서 밝기 조정을 위한 AE 기능이 종료되는지를 판단한다. 만일 AE 기능이 종료되지 않는 한 도 13의 B로 되돌아가 프레임 단위로 입력되는 이미지에 대해 전술한 과정을 반복 수행한다.On the other hand, if L is not smaller than the lower limit pixel count L T in step 945, it is determined whether U is greater than the upper limit pixel count U T in step 965. If U is greater than the upper limit pixel number U T , in step 970, it is determined whether the brightness average Y is greater than the upper limit brightness variable Y UPPER . If the average brightness Y is greater than the upper limit of brightness variable Y UPPER and controls so that the brightness at the step 975 the average brightness variable Y is the upper limit Y UPPER. That is, the upper limit brightness variable Y UPPER is reduced so that the brightness average Y is not too large. On the other hand, if the brightness average Y is not greater than the upper brightness variable Y UPPER , the control is performed such that U becomes the upper brightness pixel count U T in step 980. By performing the above process, it is determined in step 985 whether the AE function for adjusting brightness is terminated. If the AE function is not terminated, the process returns to B of FIG. 13 and the above-described process is repeated for the image input in units of frames.

이하, 도 16을 참조하여 본 발명의 다른 실시예에 따라 이미지 촬영 장치의 밝기를 자동으로 조절하는 과정을 설명하기로 한다. 도 16의 1031단계는 도 13의 930단계에 연결되는 것으로, 이를 나타내기 위해 심볼A를 사용하였으며, 도 13의 905단계 및 도 16의 1085단계가 연결되는 것임을 나타내기 위해 심볼B를 사용하였다.Hereinafter, a process of automatically adjusting the brightness of the image capturing apparatus according to another embodiment of the present invention will be described with reference to FIG. 16. Step 1031 of FIG. 16 is connected to step 930 of FIG. 13, and symbol A is used to indicate this, and symbol B is used to indicate that step 905 of FIG. 13 and step 1085 of FIG. 16 are connected.

따라서 도 16에서 이용되는 변수들은 도 13에서 전술한 바와 동일하므로, 구체적인 설명은 생략하기로 한다. 다만, 도 13의 900단계에서의 기준 밝기 YT는 제어를 위한 기준 밝기이며, 그 기준 밝기 YT 이외에 사용자에 의해 기준 밝기 YTO도 설정될 수 있다. 또한, 전술한 본 발명의 일실시예에서 이용되는 LT는 하한 밝기 픽셀개수를 나타내는 것이나, 본 발명의 다른 실시예에 따른 LT는 하한 밝기에 대해 최대로 조정할 수 있는 하한 밝기 레벨을 의미하며, UT는 상한 밝기에 대해 최대로 조정할 수 있는 상한 밝기 레벨을 의미한다.Therefore, since the variables used in FIG. 16 are the same as described above in FIG. 13, detailed descriptions thereof will be omitted. However, in step 900 of FIG. 13, the reference brightness Y T is a reference brightness for control, and in addition to the reference brightness Y T , the reference brightness Y TO may be set by the user. In addition, L T used in the above-described embodiment of the present invention indicates the number of lower limit brightness pixels, but L T according to another embodiment of the present invention means a lower limit brightness level that can be adjusted to the lower limit brightness. , U T means maximum brightness level that can be adjusted to maximum brightness.

또한 본 발명의 다른 실시예에서는 밝기 레벨을 이용한 제어를 수행하기 위해 히스토그램 누적값을 정의한다. 이러한 히스토그램 누적값은 하기 수학식 6과 같다. In another embodiment of the present invention, a histogram accumulation value is defined to perform control using a brightness level. This histogram cumulative value is expressed by Equation 6 below.

Figure pat00006
Figure pat00006

상기 수학식 6에서, KA는 히스토그램 f(y)에서 0에서 특정 레벨 즉, LE까지의 합이 전체의 A%가 되는 지점에서의 히스토그램 누적값을 나타낸다. 이를 구체적으로 설명하기 위해 역광에서의 히스토그램 분포 개수를 나타낸 도 17을 참조한다. 예를 들어, 히스토그램 누적값이 전체의 A%(721)이 되는 지점에서의 밝기 레벨 LE(725)는 상기 수학식 6을 통해 구할 수 있다. 또한, 하한 밝기 레벨 LT(726) 및 상한 밝기 레벨 UT(727)는 도 17에 도시된 바와 같이 나타낼 수 있으며, 920단계에서와 같이 이들은 각각 재설정 가능하다.In Equation 6, K A represents a histogram cumulative value at the point where the sum from 0 to a specific level, that is, LE in the histogram f (y) becomes A% of the total. To specifically illustrate this, reference is made to FIG. 17 which shows the number of histogram distributions in backlight. For example, the brightness level LE 725 at the point where the histogram accumulation value becomes the A% 721 of the whole can be obtained through Equation 6 above. In addition, the lower brightness level L T 726 and the upper brightness level U T 727 may be represented as shown in FIG. 17, and as shown in step 920, they may be reset.

한편, 도 16의 1031단계 내지 1033단계는 도 14의 931단계 내지 933단계에서와 동일하므로 구체적인 설명은 생략하기로 한다. 이어, 본 발명의 다른 실시예에서는 촬영/촬상하고자 하는 피사체보다 월등히 밝은 광원이 피사체 뒤에 있는 역광(Backlit) 환경을 고려한다. 이에 따라 1034단계에서 역광인지를 판단한다. 일반적으로 역광 환경에서는 도 18에 도시된 바와 같이 히스토그램이 로우키 (low-key)와 하이키(hi-key)로 양분되어 분포하게 된다. 이러한 경우 제어 변수 변화가 매우 급격하게 변화하므로 제어가 매우 곤란하게 된다. 이에 따라 본 발명의 다른 실시예에 따라 역광으로 판단되는 경우에는 모든 변수 설정값들을 변경하는 대신 이전 변수 설정값들을 그대로 적용하여 제어를 수행한다. Meanwhile, since steps 1031 to 1033 of FIG. 16 are the same as steps 931 to 933 of FIG. 14, detailed descriptions thereof will be omitted. Next, another embodiment of the present invention considers a backlight environment in which a light source far brighter than a subject to be photographed / photographed is behind the subject. Accordingly, it is determined whether the backlight in step 1034. In general, in a backlight environment, the histogram is divided into low-key and hi-key as shown in FIG. 18. In this case, the control variable changes very rapidly, making control very difficult. Accordingly, when it is determined that the backlight is according to another embodiment of the present invention, instead of changing all the variable setting values, the control is performed by applying the previous variable setting values as they are.

우선, 역광 여부의 판단 과정을 설명하기 위해 도 18을 참조한다. 역광 여부는 히스토그램 누적값이 A%인 KA의 레벨 x(732), 히스토그램 누적값이 A-C%인 KA -C의 레벨 x-p(731), 히스토그램 누적값이 A+C%인 KA +C의 레벨 x+p(733)을 이용한다. 다시 말하면, 역광 여부를 판단하기 위해 미리 정해진 히스토그램 누적값을 만족하는 밝기 레벨, 상기 미리 정해진 히스토그램 누적값에서 제1값을 뺀 누적값을 만족하는 밝기 레벨 및 상기 미리 정해진 히스토그램 누적값에서 제1값을 더한 누적값을 만족하는 밝기 레벨 간의 상호 관계를 이용한다. 예를 들어, 이들의 상호 관계를 KA- KA -C= p라고 하며, KA +C- KA,= q하고 하며, KA +C - KA -C = p+q라고 정의할 경우, p, q, p+q를 각각의 임계치와 비교하여 그 임계치들보다 클 경우 히스토그램이 로우키와 하이키에 양분되어 분포되어 있음을 알 수 있게 된다. 따라서 이러한 상호 관계를 이용하여 역광 여부를 판단하는 것이다. First, referring to FIG. 18 to describe a process of determining whether or not backlighting is performed. A backlight Whether histogram cumulative value of the level A% x (732), a histogram cumulative value of AC% of level xp (731), a histogram cumulative value of A + C% of A K A K A + C -C of K Level x + p 733 is used. In other words, a brightness level that satisfies a predetermined histogram cumulative value, a brightness level that satisfies a cumulative value obtained by subtracting a first value from the predetermined histogram cumulative value, and a first value from the predetermined histogram cumulative value for determining backlighting. Use the correlation between the brightness levels satisfying the cumulative value plus. For example, let's define them as K A -K A -C = p, K A + C -K A , = q, and K A + C -K A -C = p + q. In this case, when p, q, and p + q are compared with the respective thresholds, it can be seen that the histogram is divided into the low key and the high key when they are larger than the thresholds. Therefore, it is determined whether or not the backlight using the mutual relationship.

상기한 과정을 통해 1034단계에서 역광이라고 판단되면, 1083단계로 진행하여 역광이 검출되기 이전에 마지막으로 계산된 제어 변수값을 유지한다. 이와 달리 역광이 아니라고 판단되면, 히스토그램 누적값을 제어에 활용한다. 이때, 상기 수학식 6에서와 같이 정의된 히스토그램 누적값을 제어에 활용하기 위해서는 하기 수학식 7에서와 같은 정규화 과정을 거쳐야 한다. If it is determined through the above process that the backlight is determined in step 1034, the procedure proceeds to step 1083 to maintain the last calculated control variable value before the backlight is detected. On the other hand, if it is determined that the backlight is not backlit, the histogram accumulated value is used for the control. In this case, in order to utilize the histogram cumulative value defined as in Equation 6 for control, the normalization process as in Equation 7 is required.

Figure pat00007
Figure pat00007

상기 수학식 7에서, K'A는 정규화값이며, KA는 히스토그램 누적값이며, YTO는 사용자 기준 밝기이며, YA는 밝기 평균을 나타낸다. In Equation 7, K ' A is a normalization value, K A is a histogram accumulation value, Y TO is a user reference brightness, and Y A represents a brightness average.

상기와 같은 정규화값 K'A를 구하게 되면, 1035단계에서 K'A가 하한 밝기 레벨 LT 보다 크면서, 상한 밝기 레벨 UT보다 작은지를 판단한다. 즉, 도 18과 같은 히스토그램에서 미리 정해진 히스토그램 누적값을 만족하는 밝기 레벨을 정규화한 값이 하한 밝기 레벨 LT 보다 크면서, 상한 밝기 레벨 UT보다 작은지를 판단한다.When the normalization value K ' A is obtained as described above, in step 1035, K' A is the lower limit brightness level L T. It is determined whether it is larger but smaller than the upper brightness level U T. That is, in the histogram as shown in FIG. 18, the value at which the brightness level satisfying the predetermined histogram cumulative value is normalized is the lower limit brightness level L T. It is determined whether it is larger but smaller than the upper brightness level U T.

만일 상기 조건을 만족한다면 픽셀이 고르게 분포하고 있음을 나타내는 것이므로 1040단계에서 제어 밝기 평균 Y가 YT가 되도록 밝기를 조정한다. 여기서, 이미지에서 측정된 밝기 평균 YC 는 밝기 평균(YA) 또는 밝기 평균(YH)을 의미한다. If the above condition is satisfied, it indicates that the pixels are evenly distributed, and in step 1040, the brightness is adjusted so that the control brightness average Y becomes Y T. Here, the brightness average Y C measured in the image means a brightness average Y A or a brightness average Y H.

이와 달리 1035 단계의 조건을 만족하지 않는다면 1045단계에서 K'A이 하한 밝기 레벨 LT 보다 작고, 상한 밝기 레벨 UT 보다 작은 지를 판단한다. 만일 이 조건을 만족하는 경우에는 1047단계에서 KA가 LT가 되도록 관련 제어 변수 계산을 수행한다. 즉, KA가 LT가 되게 하는 레벨을 계산한다. 이렇게 구해진 제어변수가 1050단계에서 현재 이미지에서 측정된 밝기 YC(YA 또는 YH임)가 YC<YLower을 만족하는 경우에는, 1055단계에서 KA = LT가 되도록 제어를 수행한다. On the contrary, if the condition of step 1035 is not satisfied, K ' A is the lower limit brightness level L T in step 1045. Less than, upper brightness level U T Determine if it is smaller. If this condition is satisfied, the control variable calculation is performed such that K A becomes L T in step 1047. In other words, the level at which K A becomes L T is calculated. If the control variable thus obtained satisfies Y C <Y Lower as the brightness Y C (Y A or Y H ) measured in the current image in step 1050, K A in step 1055. Control to make = L T.

이와 달리 1050단계에서 YC<YLower을 만족하지 않는 경우에는 1057단계에서 Y= YLower가 되도록 제어하고, KA가 LT가 되도록 1047단계에서 계산한 제어 변수가 제한치를 벗어나지 않도록 제어 변수를 재설정하여 준다. 이는 이미지에서 측정된 밝기 평균 YC 가 원하는 밝기 조건 범위 이내에 들더라도 포화 및 어둡게 찍히는 현상이 발생할 수 있으므로, 이러한 경우를 방지하기 위해 제어 변수를 조정하는 것이다. On the other hand, if Y C <Y Lower is not satisfied in step 1050, control Y = Y Lower in step 1057, and control variable calculated in step 1047 so that K A becomes L T does not exceed the limit. Reset it. This is because, even if the measured brightness average Y C in the image falls within the desired range of brightness conditions, saturation and dimness can occur.

한편, 1045 단계에서 K'A이 하한 밝기 레벨 LT 보다 작으면서 상한 밝기 레벨 UT 보다 작은 것이 아니라면, 1060단계에서 KA가 UT가 되도록 관련 제어 변수를 계산한다. 그리고나서 1070단계에서 현재 이미지에서 측정된 밝기 YC(YA 또는 YH임)가 상한 밝기 변수 YUPPER보다 큰 경우에는 1075단계에서 KA = UT가 되도록 제어한다. 즉, 이미지에서 측정된 밝기 평균 YC가 너무 크지 않도록 상한 밝기 변수 YUPPER로 줄이는 것이다. 이와 달리 1070단계에서 이미지에서 측정된 밝기 평균 YC가 상한 밝기 변수 YUPPER보다 크지 않은 경우 1080단계에서 밝기 평균 Y = YUpper가 되도록 제어하고, KA = UT가 되도록 하는 제어 변수가 제한치를 벗어나지 않도록 제어 변수를 재설정하여 준다. 상기한 과정을 수행함으로써 1085단계에서 밝기 조정을 위한 AE 기능이 종료되는지를 판단한다. 만일 AE 기능이 종료되지 않는 한 도 13의 B로 되돌아가 프레임 단위로 입력되는 이미지에 대해 전술한 과정을 반복 수행한다.
On the other hand, K ' A is lower limit brightness level L T in step 1045 If smaller and less than the upper brightness level U T , the related control variable is calculated such that K A becomes U T in step 1060. Then, when the brightness Y C (Y A or Y H ) measured in the current image is greater than the upper limit brightness variable Y UPPER in step 1070, the control is performed such that K A = U T in step 1075. In other words, the measured brightness average Y C is reduced to the upper brightness variable Y UPPER so that it is not too large. On the other hand, if the brightness average Y C measured in the image in step 1070 is not greater than the upper brightness variable Y UPPER , the control variable controls the brightness average Y = Y Upper in step 1080 and K A = U T. Reset the control variable so that it does not deviate. By performing the above process, it is determined whether the AE function for brightness adjustment is terminated in step 1085. If the AE function is not terminated, the process returns to B of FIG. 13 and the above-described process is repeated for the image input in units of frames.

Claims (23)

이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법에 있어서,
상기 이미지에 대한 히스토그램을 계산하는 과정과,
상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구하는 과정과,
제1범위 이내의 히스토그램 분포 개수 및 제2범위 이내의 히스토그램 분포 개수가 미리 정해진 범위 이내에 각각 포함되는지를 판단하는 과정과,
상기 판단 결과 상기 미리 정해진 범위 이내에 각각 포함되는 경우 상기 밝기 평균이 기준 밝기가 되도록 조정하는 과정을 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
In the method of automatically adjusting the brightness in the imaging device,
Calculating a histogram for the image,
Obtaining a brightness average of the histogram using the histogram;
Determining whether the number of histogram distributions within the first range and the number of histogram distributions within the second range are respectively included within a predetermined range;
And adjusting the brightness average to be a reference brightness when included in the predetermined range as a result of the determination.
제1항에 있어서, 상기 히스토그램은,
밝기 데이터 Y 히스토그램, 레드(R)에 대한 히스토그램, 그린(G)에 대한 히스토그램, 블루(B)에 대한 히스토그램, 화이트(W)에 대한 히스토그램, Max(R,G,B) 히스토그램, Median(R,G,B) 히스토그램, (A * Red + B * Green + C * Blue) 히스토그램 중 어느 하나인 것을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 1, wherein the histogram,
Brightness data Y histogram, histogram for red (R), histogram for green (G), histogram for blue (B), histogram for white (W), histogram for Max (R, G, B), Median (R , G, B) histogram, or (A * Red + B * Green + C * Blue) histogram.
제1항에 있어서,
상기 이미지를 복수개의 윈도우로 분할하는 과정과,
상기 분할된 각 윈도우의 밝기 데이터와 각 윈도우의 가중치를 이용하여 밝기 평균을 구하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 1,
Dividing the image into a plurality of windows;
And calculating a brightness average by using brightness data of each divided window and weights of the respective windows.
제3항에 있어서, 상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구하는 과정은,
상기 분할된 각 윈도우의 히스토그램 가중치와 각 윈도우의 히스토그램 도수를 이용하여 가중화된 히스토그램을 구하는 과정과,
상기 가중화된 히스토그램과 레벨을 이용하여 상기 히스토그램에 대한 밝기 평균을 구하는 과정을 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 3, wherein the calculating of the brightness average for the histogram using the histogram comprises:
Obtaining a weighted histogram using the histogram weights of the divided windows and the histogram frequency of each window;
And calculating a brightness average of the histogram using the weighted histogram and the level.
제1항에 있어서, 제1범위 이내의 히스토그램 분포 개수 및 제2범위 이내의 히스토그램 분포 개수는,
각각 하한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수 및 상한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수인 것을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The number of histogram distributions within the first range and the number of histogram distributions within the second range are:
And a brightness pixel number between the lower limit brightness level and the maximum brightness level, and a brightness pixel number between the upper limit brightness level and the maximum brightness level, respectively.
제5항에 있어서, 상기 판단하는 과정은,
상기 하한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 하한 밝기 픽셀개수보다 크고, 상기 상한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 상한 밝기 픽셀개수보다 작은지를 판단하는 과정임을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 5, wherein the determining is performed.
Determining whether the number of brightness pixels between the lower limit brightness level and the maximum brightness level is greater than the lower limit brightness pixel number, and whether the number of brightness pixels between the upper limit brightness level and the maximum brightness level is smaller than the upper limit brightness pixel number. How to adjust the brightness automatically on the shooting device.
제6항에 있어서,
상기 하한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 하한 밝기 픽셀개수보다 작은 경우 상기 밝기 평균이 하한 밝기 평균보다 작은지를 판단하는 과정과,
상기 밝기 평균이 하한 밝기 평균보다 작은 경우 상기 밝기 평균이 상기 하한 밝기 평균이 되도록 조정하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 6,
Determining whether the brightness average is smaller than the lower limit brightness average when the number of brightness pixels between the lower limit brightness level and the maximum brightness level is smaller than the lower limit brightness pixel;
And adjusting the brightness average so that the brightness average becomes the lower limit brightness average when the brightness average is smaller than the lower limit brightness average.
제7항에 있어서, 상기 밝기 평균이 상기 하한 밝기 평균보다 큰 경우
상기 하한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 상기 하한 밝기 픽셀개수가 되도록 조정하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 7, wherein the brightness average is greater than the lower limit brightness average
And adjusting the number of brightness pixels between the lower limit brightness level and the maximum brightness level so that the lower limit brightness pixel count is increased.
제6항에 있어서,
상기 상한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 상한 밝기 픽셀개수보다 큰 경우 상기 밝기 평균이 상한 밝기 평균보다 큰지를 판단하는 과정과,
상기 밝기 평균이 상한 밝기 평균보다 큰 경우 상기 밝기 평균이 상기 상한 밝기 평균이 되도록 조정하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 6,
Determining whether the brightness average is greater than the upper limit brightness average when the number of brightness pixels between the upper limit brightness level and the maximum brightness level is greater than the upper limit brightness pixel;
And adjusting the brightness average to be the upper limit brightness average when the brightness average is greater than the upper limit brightness average.
제9항에 있어서, 상기 밝기 평균이 상한 밝기 평균보다 작은 경우
상기 상한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 상기 상한 밝기 픽셀개수가 되도록 조정하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
10. The method of claim 9, wherein the brightness average is less than the upper limit brightness average.
And adjusting the number of brightness pixels between the upper limit brightness level and the maximum brightness level so that the upper limit brightness pixel count is increased.
제1항에 있어서,
상기 이미지의 그레이 비율 및 단색 특성을 판단하는 과정과,
상기 단색 특성에 따라 렌즈 쉐이딩 보정을 수행하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 1,
Determining the gray ratio and the monochrome characteristic of the image;
And performing a lens shading correction according to the monochromatic characteristic.
제11항에 있어서,
상기 이미지의 그레이 비율에 따라 하한 밝기 레벨, 상한 밝기 레벨, 하한 밝기 픽셀개수 및 상한 밝기 픽셀개수를 재설정하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 11,
And resetting the lower limit brightness level, the upper limit brightness level, the lower limit brightness pixel number, and the upper limit brightness pixel number according to the gray ratio of the image.
밝기를 자동으로 조절하기 위한 이미지 촬영 장치에 있어서,
이미지를 입력받는 이미지 센서와,
상기 이미지 센서로부터의 상기 이미지에 대한 히스토그램을 계산하고, 상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구한 후, 제1범위 이내의 히스토그램 분포 개수 및 제2범위 이내의 히스토그램 분포 개수가 미리 정해진 범위 이내에 각각 포함되는지를 판단하는 히스토그램 계산부와,
상기 히스토그램 계산부에 의한 판단 결과 상기 미리 정해진 범위 이내에 각각 포함되는 경우 상기 밝기 평균이 기준 밝기가 되도록 조정하는 자동 밝기 조절부를 포함함을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
In the image capture device for automatically adjusting the brightness,
An image sensor that receives an image,
After calculating a histogram for the image from the image sensor, obtaining a brightness average for the histogram using the histogram, the histogram distribution number within the first range and the histogram distribution number within the second range are predetermined ranges. A histogram calculation unit for determining whether each is included within the;
And an automatic brightness controller configured to adjust the brightness average to be a reference brightness when the histogram calculator determines that the histogram calculator falls within the predetermined range.
제13항에 있어서, 상기 히스토그램은,
밝기 데이터 Y 히스토그램, 레드(R)에 대한 히스토그램, 그린(G)에 대한 히스토그램, 블루(B)에 대한 히스토그램, 화이트(W)에 대한 히스토그램, Max(R,G,B) 히스토그램, Median(R,G,B) 히스토그램, (A * Red + B * Green + C * Blue) 히스토그램 중 어느 하나인 것을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
The method of claim 13, wherein the histogram,
Brightness data Y histogram, histogram for red (R), histogram for green (G), histogram for blue (B), histogram for white (W), histogram for Max (R, G, B), Median (R , G, B) histogram, or (A * Red + B * Green + C * Blue) histogram, the image recording device for automatically adjusting the brightness.
제13항에 있어서, 상기 히스토그램 계산부는,
상기 이미지를 복수개의 윈도우로 분할하고, 상기 분할된 각 윈도우의 밝기 데이터와 각 윈도우의 가중치를 이용하여 밝기 평균을 구함을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
The method of claim 13, wherein the histogram calculator,
And dividing the image into a plurality of windows, and calculating brightness averages using brightness data of each divided window and weights of the respective windows.
제13항에 있어서, 상기 히스토그램 계산부는,
상기 분할된 각 윈도우의 히스토그램 가중치와 각 윈도우의 히스토그램 도수를 이용하여 가중화된 히스토그램을 구한 후, 상기 가중화된 히스토그램과 레벨을 이용하여 상기 히스토그램에 대한 밝기 평균을 구함을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
The method of claim 13, wherein the histogram calculator,
After the weighted histogram is obtained using the histogram weights of the divided windows and the histogram frequency of each window, the brightness average for the histogram is automatically calculated using the weighted histogram and the level. Image capture device for adjustment with
제13항에 있어서, 상기 히스토그램 계산부는,
상기 하한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 하한 밝기 픽셀개수보다 크고, 상기 상한 밝기 레벨과 최대 밝기 레벨 사이의 밝기 픽셀 개수가 상한 밝기 픽셀개수보다 작은지를 판단함을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
The method of claim 13, wherein the histogram calculator,
Determine whether the number of brightness pixels between the lower limit brightness level and the maximum brightness level is greater than the lower limit brightness pixel number, and whether the number of brightness pixels between the upper limit brightness level and the maximum brightness level is smaller than the upper limit brightness pixel number. Image capturing device for automatic adjustment.
제13항에 있어서,
상기 이미지의 그레이 비율 및 단색 특성을 판단하는 색상 및 채도 판단부와,
상기 단색 특성에 따라 렌즈 쉐이딩 보정을 수행하는 렌즈 쉐이딩 보정부와,
상기 히스토그램 분포에 따라 오프셋 포인트 및 하이라이트 포인트를 변경함으로써 밝기를 조정하는 감마 보정부를 더 포함함을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
The method of claim 13,
A color and saturation determination unit to determine the gray ratio and the monochromatic characteristic of the image;
A lens shading correction unit configured to perform lens shading correction according to the monochrome characteristic;
And a gamma corrector for adjusting brightness by changing an offset point and a highlight point according to the histogram distribution.
제13항에 있어서,
상기 이미지에 얼굴 검출 기능을 이용하여 얼굴이 검출되는 경우 상기 기준 밝기, 하한 기준 밝기 및 상한 기준 밝기를 변경함으로써 밝기를 조정하는 얼굴 검출부를 더 포함함을 특징으로 하는 밝기를 자동으로 조절하기 위한 이미지 촬영 장치.
The method of claim 13,
And a face detector configured to adjust brightness by changing the reference brightness, the lower limit reference brightness, and the upper limit reference brightness when a face is detected by using the face detection function in the image. Shooting device.
이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법에 있어서,
상기 이미지에 대한 히스토그램을 계산하는 과정과,
상기 히스토그램을 이용하여 상기 히스토그램에 대한 밝기 평균을 구하는 과정과,
상기 이미지에 대한 역광 여부를 판단하는 과정과,
상기 역광이 아니라고 판단되면, 상기 히스토그램에서 미리 정해진 히스토그램 누적값을 만족하는 밝기 레벨을 정규화한 값이 하한 밝기 레벨과 상한 밝기 레벨 범위 내인지를 판단하는 과정과,
상기 판단 결과 상기 범위 내인 경우 상기 밝기 평균이 기준 밝기가 되도록 조정하는 과정을 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
In the method of automatically adjusting the brightness in the imaging device,
Calculating a histogram for the image,
Obtaining a brightness average of the histogram using the histogram;
Determining whether the image is backlit;
If it is determined that the backlight is not in the backlight, determining whether a value of normalizing a brightness level satisfying a predetermined histogram cumulative value in the histogram is within a range of a lower brightness level and an upper brightness level;
And adjusting the brightness average to be the reference brightness when it is within the range as a result of the determination.
제20항에 있어서, 상기 이미지에 대한 역광 여부는,
미리 정해진 히스토그램 누적값을 만족하는 밝기 레벨, 상기 미리 정해진 히스토그램 누적값에서 제1값을 뺀 누적값을 만족하는 밝기 레벨 및 상기 미리 정해진 히스토그램 누적값에서 제1값을 더한 누적값을 만족하는 밝기 레벨 간의 상호 관계를 이용함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 20, wherein the backlight for the image,
A brightness level that satisfies a predetermined histogram cumulative value, a brightness level that satisfies a cumulative value obtained by subtracting a first value from the predetermined histogram cumulative value, and a brightness level that satisfies a cumulative value obtained by adding a first value to the predetermined histogram cumulative value. A method for automatically adjusting the brightness in an image photographing device, characterized in that it uses mutual relations between the two.
제20항에 있어서,
상기 이미지의 그레이 비율 및 단색 특성을 판단하는 과정과,
상기 단색 특성에 따라 렌즈 쉐이딩 보정을 수행하는 과정과,
상기 이미지의 그레이 비율에 따라 상기 하한 밝기 레벨 및 상기 상한 밝기 레벨을 재설정하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 20,
Determining the gray ratio and the monochrome characteristic of the image;
Performing lens shading correction according to the monochrome characteristic;
And resetting the lower limit brightness level and the upper limit brightness level according to the gray ratio of the image.
제22항에 있어서,
상기 역광이라고 판단되면, 이전에 설정한 상기 하한 밝기 레벨 및 상기 상한 밝기 레벨을 유지하는 과정을 더 포함함을 특징으로 하는 이미지 촬영 장치에서 밝기를 자동으로 조절하는 방법.
The method of claim 22,
And if it is determined that the backlight is configured to maintain the lower limit brightness level and the upper limit brightness level previously set, the method of automatically adjusting the brightness in the image capturing apparatus.
KR1020100082062A 2010-05-12 2010-08-24 Apparatus and method for auto adjusting brightness of image taking device KR20110125154A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020110039108A KR101754425B1 (en) 2010-05-12 2011-04-26 Apparatus and method for auto adjusting brightness of image taking device
US13/105,512 US9113114B2 (en) 2010-05-12 2011-05-11 Apparatus and method for automatically controlling image brightness in image photographing device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20100044344 2010-05-12
KR1020100044344 2010-05-12

Publications (1)

Publication Number Publication Date
KR20110125154A true KR20110125154A (en) 2011-11-18

Family

ID=45394727

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020100082062A KR20110125154A (en) 2010-05-12 2010-08-24 Apparatus and method for auto adjusting brightness of image taking device
KR1020110039108A KR101754425B1 (en) 2010-05-12 2011-04-26 Apparatus and method for auto adjusting brightness of image taking device

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020110039108A KR101754425B1 (en) 2010-05-12 2011-04-26 Apparatus and method for auto adjusting brightness of image taking device

Country Status (1)

Country Link
KR (2) KR20110125154A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170120149A (en) * 2015-03-05 2017-10-30 케이피아이티 테크놀로지스 엘티디. Method and system for detecting ambient light

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6552235B2 (en) * 2015-03-23 2019-07-31 キヤノン株式会社 Image pickup apparatus, control method thereof and program
KR101694621B1 (en) * 2015-05-22 2017-01-09 한국광기술원 Apparatus and method for estimating brightness using image sensor of auto exposure data
KR20210142398A (en) 2020-05-18 2021-11-25 에스케이하이닉스 주식회사 Local tone mapping circuit, image sensing device and operation method thereof
CN112866596B (en) * 2021-01-08 2023-11-21 跨维(深圳)智能数字科技有限公司 Anti-strong light three-dimensional capturing method and system based on CMOS sensor
CN113542615B (en) * 2021-06-24 2022-08-23 横店集团东磁有限公司 Method for improving effect consistency of camera at terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008005365A (en) * 2006-06-26 2008-01-10 Victor Co Of Japan Ltd Imaging device
JP2009177271A (en) * 2008-01-22 2009-08-06 Sony Corp Imaging apparatus, and control method and program thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170120149A (en) * 2015-03-05 2017-10-30 케이피아이티 테크놀로지스 엘티디. Method and system for detecting ambient light

Also Published As

Publication number Publication date
KR20110125170A (en) 2011-11-18
KR101754425B1 (en) 2017-07-05

Similar Documents

Publication Publication Date Title
US9113114B2 (en) Apparatus and method for automatically controlling image brightness in image photographing device
EP2216987B1 (en) Image capturing apparatus and control method thereof
JP5148989B2 (en) Imaging device
KR101352349B1 (en) Exposure control apparatus and image pickup apparatus
US9148561B2 (en) Image capturing apparatus, executable autoexposure bracketing and control method thereof
US9432641B2 (en) Image processing device and program
US8120658B2 (en) Hand jitter reduction system for cameras
CN108616689B (en) Portrait-based high dynamic range image acquisition method, device and equipment
JP5053802B2 (en) Signal processing apparatus and signal processing program
US20060215908A1 (en) Image pickup apparatus and image processing method
JP4694424B2 (en) Authentication device
KR20110125154A (en) Apparatus and method for auto adjusting brightness of image taking device
US9892497B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP5782311B2 (en) Imaging apparatus and control method thereof
JP5149055B2 (en) Imaging device
JP6904788B2 (en) Image processing equipment, image processing methods, and programs
GB2499668A (en) Exposure Controller
JP2019029833A (en) Imaging apparatus
JP5591026B2 (en) Imaging apparatus and control method thereof
US11678060B2 (en) Apparatus, method for controlling apparatus, and storage medium
JP3831934B2 (en) Camera automatic exposure device
JP2009004966A (en) Imaging apparatus
JP2008005083A (en) Imaging apparatus
JP2012191645A (en) Imaging apparatus and control method of the same
JP2019040382A (en) Image processing device