KR102318196B1 - A method for auto white balance of image and an electronic device to process auto white balance method - Google Patents

A method for auto white balance of image and an electronic device to process auto white balance method Download PDF

Info

Publication number
KR102318196B1
KR102318196B1 KR1020200007526A KR20200007526A KR102318196B1 KR 102318196 B1 KR102318196 B1 KR 102318196B1 KR 1020200007526 A KR1020200007526 A KR 1020200007526A KR 20200007526 A KR20200007526 A KR 20200007526A KR 102318196 B1 KR102318196 B1 KR 102318196B1
Authority
KR
South Korea
Prior art keywords
value
pixel
frame
image
algorithm
Prior art date
Application number
KR1020200007526A
Other languages
Korean (ko)
Other versions
KR20210093658A (en
Inventor
손장우
Original Assignee
숭실대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 숭실대학교산학협력단 filed Critical 숭실대학교산학협력단
Priority to KR1020200007526A priority Critical patent/KR102318196B1/en
Publication of KR20210093658A publication Critical patent/KR20210093658A/en
Application granted granted Critical
Publication of KR102318196B1 publication Critical patent/KR102318196B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • 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
    • 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/85Camera processing pipelines; Components thereof for processing colour signals for matrixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/147Scene change detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/67Circuits for processing colour signals for matrixing

Landscapes

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

Abstract

본 발명은 각 프레임마다 자연광에서 회색을 가지는 적어도 하나의 후보 픽셀을 결정하는 단계 및 상기 적어도 하나의 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R(red), G(green), B(blue) 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용하는 단계를 포함하고, 상기 게인 조절 알고리즘은 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용되며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴되는 것을 특징으로 하는 영상 보정 방법을 제공한다.The present invention comprises the steps of determining at least one candidate pixel having a gray color in natural light for each frame, and R (red), G (green), B (blue) for each frame so that the at least one candidate pixel becomes a gray point pixel. A frame including a plurality of frames to which the gain adjustment algorithm is applied, comprising applying a gain adjustment algorithm for adjusting a gain value of a channel, wherein the gain adjustment algorithm is applied to each frame a number of times less than or equal to a predetermined threshold value There is provided an image correction method, characterized in that the parameter value for the channel gain of the sequence converges to a specific value or less.

Description

영상을 자동 백색 보정하기 위한 방법 및 이를 위한 전자 장치{A METHOD FOR AUTO WHITE BALANCE OF IMAGE AND AN ELECTRONIC DEVICE TO PROCESS AUTO WHITE BALANCE METHOD}A METHOD FOR AUTO WHITE BALANCE OF IMAGE AND AN ELECTRONIC DEVICE TO PROCESS AUTO WHITE BALANCE METHOD

본 발명은 영상을 자동 백색 보정하기 위한 방법 및 이를 위한 전자 장치에 관한 것이다.The present invention relates to a method for automatic white correction of an image and an electronic device for the same.

3차원 물체에 대해 이미징 장치에 의해 획득된 이미지는 물체의 고유 특성(반사도; reflectance), 방향, 모양, 광원(light source)의 위치 및 스펙트럼, 이미징 장치의 감광 성질 등에 따라 결정될 수 있다. 인간의 눈은 물체로부터 반사되어 눈으로 인지되는 빛스펙트럼을 조절하므로써 각기 다른 조명 환경에서도 동일한 물체의 색상을 동일하게 인식하는 '컬러 일 정성(color constancy)' 능력을 갖는다. An image obtained by the imaging device for a three-dimensional object may be determined according to intrinsic characteristics (reflectance) of the object, direction, shape, position and spectrum of a light source, light-sensitive properties of the imaging device, and the like. The human eye has 'color constancy' ability to recognize the color of the same object in different lighting environments by adjusting the light spectrum reflected from the object and perceived by the eye.

그러나 이미지 센서는 인간의 눈과 같지 못하다. 따라서 자연광에서 백색으로 보이는 물체의 색이 색온도가 높은 조명 하(예; 형광등)에서는 파란색으로 촬영되거나 색 온도가 낮은 조명(예; 백열전등)하에서는 붉은색으로 촬영될 수 있다. 즉, 이미지 센서에서는 광원에 따라 순백색이 순백색으로 촬영되지 않고 다른 색상 정보를 갖게 촬영되는 백색 왜곡이 발생될 수 있다. However, the image sensor is not like the human eye. Therefore, the color of an object that appears white in natural light may be photographed in blue under lighting with a high color temperature (eg, fluorescent lamp) or may be photographed in red under lighting with a low color temperature (eg, incandescent lamp). That is, in the image sensor, depending on the light source, white distortion may occur in which pure white is photographed with different color information instead of pure white.

따라서 이미지 센서에서 물체의 색이 인간의 눈으로 인지되는 색처럼 자연스럽게 촬영되도록 보정되어야 할 필요가 있다. 표준 광원(보통 D65) 아래에서 원래 흰색인 픽셀들이 광원에 상관없이 원래의 흰색으로 촬영되도록 보정되면 다른 컬러의 픽셀들도 표준 광원 하에서의 컬러로 보정될 수 있다. 이러한 자동 보정 과정을 자동 백색 보정 또는 컬러 일정성이라 하며, 자동 백색 보정(Automatic White Balance; 이하 AWB)은 카메라에서 고품질의 이미지를 얻는 데 중요한 기능이 될 수 있다.Therefore, the color of the object in the image sensor needs to be calibrated so that it is captured as natural as the color perceived by the human eye. When pixels that are originally white under a standard light source (usually D65) are corrected to be photographed with the original white color regardless of the light source, pixels of other colors can also be corrected to the color under the standard light source. This automatic correction process is called automatic white correction or color uniformity, and automatic white balance (hereinafter referred to as AWB) can be an important function to obtain a high-quality image from a camera.

한편, 비디오카메라는 CCTV 카메라, IPTV 카메라 등을 포함할 수 있는데, 이들 카메라는 고정형으로 영상 감시 용도로 많이 사용될 수 있다. 카메라가 고정형인 경우에 배경은 고정되며 하루 중에 조명 변화가 심하지 않다. 물론 전경 객체의 변화는 자주 발생하나 대체적으로 화면의 장면은 배경이 더 많이 차지하므로, 장면의 급격한 변화는 빈번하지 않는 편이다. On the other hand, the video camera may include a CCTV camera, an IPTV camera, etc., these cameras are fixed type and can be widely used for video surveillance purposes. When the camera is stationary, the background is fixed and the lighting does not change significantly during the day. Of course, the change of the foreground object occurs frequently, but generally, the scene on the screen takes up more of the background, so the sudden change of the scene is not frequent.

통상적으로 IP 네트워크 카메라에서는 full frame (30fps) 비디오 스트리밍 처리가 보통 요구되는데, 이 때 주어진 프레임간 시간 (1/30 초) 내에 영상 압축, 영상 전송, 비디오 안정화, 움직임 검출 등을 달성하여야 하기 때문에, Full-HD 해상도 (1920x1080p)의 비디오 스트림의 자동 백색 보정의 실시간 처리는 1/30 초 보다 훨씬 적은 시간 내에 처리되어야 한다.In general, full frame (30fps) video streaming processing is usually required for IP network cameras. At this time, image compression, image transmission, video stabilization, and motion detection must be achieved within a given interframe time (1/30 second). Real-time processing of automatic white correction of a video stream with Full-HD resolution (1920x1080p) should be done in much less than 1/30 second.

앞서 살펴본 바와 같이 카메라에서 고품질의 이미지를 획득하기 위해서는 자동 백색 보정 절차가 필수적으로 요구된다. 그러나, Full-HD Full-frame 비디오 스트리밍 및 다른 영상 처리 요구가 존재하는 IP 네트워크 카메라에서는 데이터 처리에 요구되는 부하로 인해 실시간으로 자동 백색 보정 처리를 수행하기 어려울 수 있다. 따라서 본 발명에서는 카메라로부터 획득되는 고품질의 영상을 자동 백색 보정 처리하기 위한 방법을 제공하고자 한다.As mentioned above, in order to obtain a high-quality image from the camera, an automatic white correction procedure is essential. However, in an IP network camera that requires Full-HD Full-frame video streaming and other image processing requirements, it may be difficult to perform automatic white correction in real time due to a load required for data processing. Accordingly, an object of the present invention is to provide a method for automatic white correction processing of a high-quality image obtained from a camera.

본 발명은 각 프레임마다 자연광에서 회색을 가지는 적어도 하나의 후보 픽셀을 결정하는 단계 및 상기 적어도 하나의 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R(red), G(green), B(blue) 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용하는 단계를 포함하고, 상기 게인 조절 알고리즘은 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용되며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴되는 영상 보정 방법을 제공한다.The present invention comprises the steps of determining at least one candidate pixel having a gray color in natural light for each frame, and R (red), G (green), B (blue) for each frame so that the at least one candidate pixel becomes a gray point pixel. A frame including a plurality of frames to which the gain adjustment algorithm is applied, comprising applying a gain adjustment algorithm for adjusting a gain value of a channel, wherein the gain adjustment algorithm is applied to each frame a number of times less than or equal to a predetermined threshold value It provides an image correction method in which the parameter value for the channel gain of the sequence converges to a specific value or less.

일 실시예에 따르면, 상기 적어도 하나의 후보 픽셀을 결정하는 단계는 각 프레임마다 R값, G값, B값이 모두 동일한 픽셀을 확인하는 단계 및 상기 R값, 상기 G값, 상기 B값이 모두 동일한 픽셀 중에서 U값 또는 V값이 기설정된 문턱값 미만인 픽셀을 후보 픽셀로 결정하는 단계를 포함하고, 상기 U값 및 상기 V값은 상기 R값, 상기 G값, 상기 B값을 YUV(와이유브이) 색계로 변환시켜 획득된 값일 수 있다.According to an embodiment, the determining of the at least one candidate pixel may include identifying pixels having the same R value, G value, and B value for each frame, and the R value, the G value, and the B value are all and determining, among the same pixels, a pixel having a U value or a V value less than a preset threshold as a candidate pixel, wherein the U value and the V value are the R value, the G value, and the B value. V) may be a value obtained by converting to a color system.

일 실시예에 따르면, 각 프레임은 복수개의 윈도우로 분할되고, 각 윈도우는 복수개의 픽셀 블록으로 분할되며, 상기 후보 픽셀 결정 단계와 상기 게인 조절 알고리즘 적용 단계는 상기 복수개의 픽셀 블록 중 일부 픽셀 블록에 대해서만 수행될 수 있다.According to an embodiment, each frame is divided into a plurality of windows, each window is divided into a plurality of pixel blocks, and the step of determining the candidate pixel and the step of applying the gain adjustment algorithm are performed on some pixel blocks among the plurality of pixel blocks. can only be performed for

일 실시예에 따르면, 해상도 1920*1080 사이즈 영상의 경우, 상기 각 프레임은 수평방향으로 63개, 수직방향으로는 35개의 윈도우로 분할되고, 각 윈도우 내에서 상기 후보 픽셀 결정 단계와 상기 게인 조절 알고리즘 적용 단계가 수행되는 픽셀 블록은 4개일 수 있다.According to an embodiment, in the case of an image having a resolution of 1920*1080, each frame is divided into 63 windows in a horizontal direction and 35 windows in a vertical direction, and the candidate pixel determination step and the gain adjustment algorithm within each window The number of pixel blocks in which the application step is performed may be four.

일 실시예에 따르면, 상기 임계값은 상기 전자 장치를 구성하는 데이터 처리 프로세서의 연산 처리 가능량이 클수록 커질 수 있다.According to an embodiment of the present disclosure, the threshold value may increase as the arithmetic processing capability of the data processing processor constituting the electronic device increases.

일 실시예에 따르면, 영상 보정 방법은 영상의 배경 장면이 바뀌었는지 여부를 확인하는 단계 및 영상의 배경 장면이 바뀐 경우, 상기 게인 조절 알고리즘을 초기화하는 단계를 더 포함할 수 있다.According to an embodiment, the image correction method may further include determining whether a background scene of the image is changed, and initializing the gain adjustment algorithm when the background scene of the image is changed.

본 발명은 각 프레임마다 자연광에서 회색을 가지는 적어도 하나의 후보 픽셀을 결정하는 후보 픽셀 결정부 및 상기 적어도 하나의 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R(red), G(green), B(blue) 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용하는 알고리즘 적용부를 포함하고, 상기 알고리즘 적용부는 상기 게인 조절 알고리즘을 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용되며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴되는 전자 장치를 제공한다.The present invention provides a candidate pixel determiner that determines at least one candidate pixel having a gray color in natural light for each frame, and R (red), G (green), and B for each frame so that the at least one candidate pixel becomes a gray point pixel. (blue) comprising an algorithm application unit for applying a gain adjustment algorithm for adjusting the gain value of the channel, wherein the algorithm application unit applies the gain adjustment algorithm to each frame by the number of times less than or equal to a predetermined threshold value, the gain adjustment algorithm is Provided is an electronic device in which a parameter value for a channel gain of a frame sequence including a plurality of applied frames converges to a specific value or less.

일 실시예에 따르면, 상기 후보 픽셀 결정부는 각 프레임마다 R값, G값, B값이 모두 동일한 픽셀을 확인하고, 상기 R값, 상기 G값, 상기 B값이 모두 동일한 픽셀 중에서 U값 또는 V값이 기설정된 문턱값 미만인 픽셀을 후보 픽셀로 결정하며, 상기 U값 및 상기 V값은 상기 R값, 상기 G값, 상기 B값을 YUV(와이유브이) 색계로 변환시켜 획득된 값일 수 있다.According to an embodiment, the candidate pixel determiner identifies a pixel having the same R value, G value, and B value for each frame, and a U value or V value among pixels having the same R value, the G value, and the B value. A pixel whose value is less than a preset threshold is determined as a candidate pixel, and the U value and the V value may be values obtained by converting the R value, the G value, and the B value into a YUV color system. .

일 실시예에 따르면, 각 프레임은 복수개의 윈도우로 분할되고, 각 윈도우는 복수개의 픽셀 블록으로 분할되며, 상기 후보 픽셀 결정부는 상기 복수개의 픽셀 블록 중 일부 픽셀 블록에 대해서만 적어도 하나의 후보 픽셀을 결정하고, 상기 알고리즘 적용부는 상기 복수개의 픽셀 블록 중 일부 픽셀 블록에 대해서만 상기 게인 조절 알고리즘을 적용할 수 있다.According to an embodiment, each frame is divided into a plurality of windows, each window is divided into a plurality of pixel blocks, and the candidate pixel determiner determines at least one candidate pixel only for some pixel blocks among the plurality of pixel blocks. and the algorithm applying unit may apply the gain adjustment algorithm to only some pixel blocks among the plurality of pixel blocks.

일 실시예에 따르면, 상기 임계값은 알고리즘 적용부의 연산 처리 가능량이 클수록 커질 수 있다.According to an embodiment, the threshold value may increase as the amount of computation processing available by the algorithm application unit increases.

일 실시예에 따르면, 상기 알고리즘 적용부는 영상의 배경 장면이 바뀌었는지 여부를 확인하고, 영상의 배경 장면이 바뀐 경우, 상기 게인 조절 알고리즘을 초기화할 수 있다.According to an embodiment, the algorithm application unit may determine whether a background scene of the image is changed, and when the background scene of the image is changed, initialize the gain adjustment algorithm.

본 발명에서 개시하고 있는 일 실시예에 따르면, 백색 보정 처리에 요구되는 연산량을 감소시킴으로써 고품질의 영상에도 효율적으로 백색 처리 보정을 지원할 수 있다.According to an embodiment disclosed in the present invention, it is possible to efficiently support white processing correction even for high-quality images by reducing the amount of computation required for white correction processing.

뿐만 아니라, 실시간 백색 보정이 요구되는 CCTV 카메라, IP 네트워크 카메라 뿐만 아니라 모든 비디오 영상 획득 및 표출이 요구되는 시스템에 본 발명에서 개시하고 있는 영상 보정 방법을 적용할 수 있다.In addition, the image correction method disclosed in the present invention can be applied not only to CCTV cameras and IP network cameras requiring real-time white correction, but also to systems requiring acquisition and display of all video images.

도 1은 본 발명에서 개시하고 있는 일 실시예에 따른 영상 보정 방법에 대한 흐름도이다.
도 2는 본 발명에서 개시하고 있는 일 실시예에 따른 게인 조절 과정을 설명하기 위한 도면이다.
도 3은 본 발명에서 개시하고 있는 일 실시예에 따른 영상 프레임의 구조를 설명하기 위한 도면이다.
도 4는 본 발명에서 개시하고 있는 일 실시예에 따른 백색 보정 방법을 설명하기 위한 도면이다.
도 5는 본 발명에서 개시하고 있는 백색 보정 방법의 효과를 설명하기 위한 도면이다.
도 6은 본 발명에서 개시하고 있는 일 실시예에 따른 영상을 보정하기 위한 전자 장치에 대한 블록도이다.
1 is a flowchart of an image correction method according to an embodiment disclosed in the present invention.
2 is a view for explaining a gain adjustment process according to an embodiment disclosed in the present invention.
3 is a view for explaining the structure of an image frame according to an embodiment disclosed in the present invention.
4 is a view for explaining a white correction method according to an embodiment disclosed in the present invention.
5 is a diagram for explaining the effect of the white correction method disclosed in the present invention.
6 is a block diagram of an electronic device for correcting an image according to an embodiment disclosed in the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면을 참조하여 상세하게 설명하도록 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can have various changes and can have various embodiments, specific embodiments will be described in detail with reference to the drawings. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재 항목들의 조합 또는 복수의 관련된 기재 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. and/or includes a combination of a plurality of related description items or any of a plurality of related description items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급될 때에는 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When a component is referred to as being “connected” or “connected” to another component, it may be directly connected or connected to the other component, but it should be understood that other components may exist in between. something to do. On the other hand, when it is said that a certain element is "directly connected" or "directly connected" to another element, it should be understood that no other element is present in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

명세서 및 청구범위 전체에서, 어떤 부분이 어떤 구성 요소를 포함한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있다는 것을 의미한다. Throughout the specification and claims, when a part includes a certain element, it means that other elements may be further included, rather than excluding other elements, unless otherwise stated.

색 공간 모델(color space model)은 색을 3개 내지 4개의 색 성분으로 표현하는 수학적 모델을 말하며, 색 성분들이 어떻게 해석될 수 있는 가에 대한 정확한 기술과 연관될 때, 결과 되는 색들의 세트를 색공간이라 한다. 표준화된 색 공간 모델에는 RGB, sRGB, HSV, YUV(YCbCr), CMYK, CIE XYZ, CIE RGB, CIE LUV, CIE LAB, LMS 모델들이 있다. sRGB(standard Red Green Blue)는 모니터, 프린터, 인터넷 등에 사용하기 위해서 HP 와 마이크로소프트가 협동하여 규약한 RGB 색 공간 모델로, 이미지 픽셀을 각 채널별로 8비트로 표현하는 경우에 보통 디폴트 색 공간으로 사용된다. A color space model is a mathematical model that expresses a color in terms of three or four color components, and when associated with an accurate description of how the color components can be interpreted, the resulting set of colors It is called color space. Standardized color space models include RGB, sRGB, HSV, YUV (YCbCr), CMYK, CIE XYZ, CIE RGB, CIE LUV, CIE LAB, and LMS models. sRGB (standard Red Green Blue) is an RGB color space model agreed upon by HP and Microsoft for use in monitors, printers, and the Internet, and is usually used as the default color space when image pixels are expressed in 8 bits for each channel. do.

LMS 색 공간 모델은 빛 ("S", 420 nm - 440 nm), middle ("M", 530 nm - 540 nm), and long ("L", 560 nm - 580 nm)장파장("L", 560 nm - 580 nm), 중 파장 ("M", 530 nm - 540 nm), 단파장("S", 420 nm - 440 nm) 등의 스펙트럼에 대한 사람 눈의 원추 시신경 L세포, M세포, S세포의 피크 반응도를 나타내는 색 공간 모델이다. CIE XYZ 색 공간 모델은 평균 시력을 갖는 사람들에게 보이는 모든 색 감응을 아우르고자 한 CIE(국제 조명 협회)의 표준 색 공간 모델이다. CIE XYZ은 장치 독립적인 색 공간 표현으로 다른 색 공간 모델들의 표준 참조 모델이다. CIE XYZ 에서 Y 는 휘도(luminance), Z 는 S 시신경세포의 반응도로 대략 파란색 색상 값을 나타낸다. X 는 L 시신경세포의 반응도로 빨간색 색상 값을 나타낼 수 있다. CIE XYZ에서 색상 표현은 아래 수식 1과 같이 정규화된 3개의 실수(x, y, z)값으로 나타낸다.The LMS color space model is a light ("S", 420 nm - 440 nm), middle ("M", 530 nm - 540 nm), and long ("L", 560 nm - 580 nm) long wavelength ("L", 560 nm - 580 nm), medium-wavelength ("M", 530 nm - 540 nm), short-wavelength ("S", 420 nm - 440 nm) spectra of the human eye cone optic nerve L cells, M cells, S It is a color space model representing the peak reactivity of cells. The CIE XYZ color space model is the standard color space model of the International Lighting Institute (CIE), which aims to encompass all color sensitivities seen by people with average vision. CIE XYZ is a device-independent color space representation and is a standard reference model for other color space models. In CIE XYZ, Y is the luminance, and Z is the reactivity of the S optic nerve cell, which indicates the approximate blue color value. X may represent a red color value as a reactivity of L optic nerve cells. In CIE XYZ, color expression is represented by three normalized real numbers (x, y, z) values as shown in Equation 1 below.

[수식 1][Formula 1]

Figure 112020006547839-pat00001
Figure 112020006547839-pat00001

한편, 물체의 색은 조명광원(illuminant)에 따라 달리 나타날 수 있다. 조명광원(illuminant)은 광원의 색온도(color temperature), 광원의 상대적 분광분포(spectral power distribution), 광원의 화이트 포인트 등의 특징을 포함할 수 있다. 광원의 색온도는 절대온도(케빈; 。K)로 나타내며, 흑체 복사(black body radiation)로 정의될 수 있다. 태양 광원은 보통 5,000。K 에서 6500。K 미만으로 나타난다. Meanwhile, the color of an object may appear differently depending on an illuminant. An illuminant may include characteristics such as a color temperature of the light source, a relative spectral power distribution of the light source, and a white point of the light source. The color temperature of the light source is expressed in absolute temperature (Kevin; °K) and can be defined as black body radiation. Solar light sources usually appear between 5,000°K and less than 6500°K.

높은 색온도(5,000。K 이상 )를 갖는 광원은 차가운 색(푸른 계통 흰색) 광원이라 하며, 형광등이 그 예이며, 낮은 색온도(2,700~3,000K를 갖는 광원은 따듯한 색(빨그스름한 노란계통 흰색) 광원이라 하며 백열등이 그 예이다. 조명광원의 분광 분포는 광원의 색온도(color temperature)로 결정된다. 조명광원의 화이트포인트는 해당 조명광원하의 흰색(화이트) 물체 점의 색도(chromaticity)이며 CIE 1931 또는 CIE 1964 색도도(chromaticity diagram)의 좌표 등과 같은 색도 좌표(chromaticity coordinates)로 지정된다. 화이트 포인트는 색도에만 관계되고, 조명광원의 강도(intensity)에는 영향 받지 않는다. 조명광원이 주어지면 화이트 포인트가 유일하게 결정되나, 주어진 화이트 포인트에 대응하는 조명광원은 여러 개가 있을 수 있다. 표준 조명광원 D 시리즈의 경우는 분광분포는 해당 화이트 포인트의 색도 좌표로부터 수학적으로 유도 가능한 것으로 알려져 있다. A light source with a high color temperature (over 5,000°K) is called a cold color (blue-white) light source, and fluorescent lamps are an example. An example is an incandescent lamp. The spectral distribution of an illumination light source is determined by the color temperature of the light source. The white point of an illumination light source is the chromaticity of a white (white) object point under the illumination light source, and CIE 1931 or CIE 1931 or It is specified in chromaticity coordinates, such as those in the CIE 1964 chromaticity diagram, etc. The white point relates only to the chromaticity and is not affected by the intensity of the illuminating light source. Although it is uniquely determined, there may be several illumination sources corresponding to a given white point In case of the standard illumination light source D series, it is known that the spectral distribution can be mathematically derived from the chromaticity coordinates of the corresponding white point.

일 실시예에 따르면, 백색 보정은 보통 다음과 같은 2단계 작업으로 달성된다. 1) 입력 이미지로부터 여러 가정에 기반 하여 장면 조명광원 컬러(조명광원 색온도 또는 화이트 포인트) 추정 (Illuminant Color Estimation), 2) 추정된 장면 조명광원 컬러를 이용하여 입력 이미지가 표준 광원하의 컬러로 다시 표현되도록 입력 이미지를 색 보정하는 색순응(Chromatic Adaptation). 다양한 실시예에 따르면, 화이트 포인트는 R=G=B를 만족하는 그레이 컬러 포인트 가운데, 각 컬러 채널 값이 (0,1)로 스케일된 경우에, R=G=B=1인 픽셀을 말한다. According to one embodiment, white calibration is usually accomplished in two steps: 1) Estimation of scene illumination light source color (illuminant light source color temperature or white point) based on several assumptions from the input image (Illuminant Color Estimation), 2) Using the estimated scene illumination light source color, the input image is re-expressed in color under standard light source Chromatic Adaptation, which color-corrects the input image as much as possible. According to various embodiments, the white point refers to a pixel in which R=G=B=1 when each color channel value is scaled to (0,1) among gray color points satisfying R=G=B.

일 실시예에 따르면 색순응 변환은 수학적으로는 3x3 행렬로 표현된다. 예를 들어 해당 조명광원에서 물체의 화이트 포인트 LMS 좌표가

Figure 112020006547839-pat00002
로 나타나고, 표준광원 (예; D65) 하에서 화이트 포인트 LMS 좌표 가
Figure 112020006547839-pat00003
라고 하면, LMS 색 공간에서 색순응 변환, MLMS는 다음의 행렬 수식 2로 표현할 수 있다.According to an embodiment, the color adaptive transformation is mathematically expressed as a 3x3 matrix. For example, the LMS coordinates of the white point of an object at that illuminating source are
Figure 112020006547839-pat00002
, and the white point LMS coordinates under a standard light source (eg D65) are
Figure 112020006547839-pat00003
, the color adaptive transformation, M LMS , in the LMS color space can be expressed by the following matrix Equation (2).

[수식 2][Formula 2]

Figure 112020006547839-pat00004
Figure 112020006547839-pat00004

일 실시예에 따르면, CIE XYZ 색 공간에서 LMS 색 공간으로의 변환을 MA라 하면, CIE XYZ 색 공간 모델에서, 주어진 물체 픽셀의 좌표 값 (X,Y,Z) 에 대해, LMS에서의 색 공간 좌표 값

Figure 112020006547839-pat00005
은 아래의 수식 3에 의해 구해질 수 있다.According to an embodiment, if the conversion from the CIE XYZ color space to the LMS color space is M A , then in the CIE XYZ color space model, for the coordinate values (X,Y,Z) of a given object pixel, the color in the LMS is spatial coordinate values
Figure 112020006547839-pat00005
can be obtained by Equation 3 below.

[수식 3][Equation 3]

Figure 112020006547839-pat00006
Figure 112020006547839-pat00006

물체 픽셀의 sRGB(RGB) 색 공간에서의 좌표 값을 (R, G, B), CIE XYZ 색 공간에서의 좌표 값을 (X, Y, Z), 이들 간의 변환을 MX라 하면, 아래의 수식 4가 성립할 수 있다.If the coordinate values in the sRGB (RGB) color space of the object pixel are (R, G, B), the coordinate values in the CIE XYZ color space are (X, Y, Z), and the conversion between them is M X , Equation 4 can be established.

[수식 4][Equation 4]

Figure 112020006547839-pat00007
Figure 112020006547839-pat00007

일 실시예에 따르면, 상기 수식 4에서 MX는 다음과 같을 수 있다.According to an embodiment, M X in Equation 4 may be as follows.

Figure 112020006547839-pat00008
Figure 112020006547839-pat00008

한편, 이제까지의 관련 변환들을 종합하면, sRGB(RGB) 색 공간에서의 색순응 변환 MCAT은 다음 수식 5를 통해 구할 수 있다.Meanwhile, by summarizing the related transformations so far, the color adaptive transformation M CAT in the sRGB (RGB) color space can be obtained through Equation 5 below.

[수식 5][Equation 5]

Figure 112020006547839-pat00009
Figure 112020006547839-pat00009

따라서 해당 광원에서의 물체 포인트의 sRGB(RGB) 색 공간 좌표 값 (Rs, Gs, Bs)은 색순응 변환에 의해, 다음과 같이 백색 보정된 sRGB(RGB) 색 공간의 다음 수식 6과 같이 좌표 값 (Rd, Gd, Bd)로 구해질 수 있다.Therefore, the sRGB(RGB) color space coordinate values (R s , G s , B s ) of the object point in the corresponding light source are obtained by color adaptive transformation, as shown in Equation 6 It can be obtained as a coordinate value (R d , G d , B d ).

[수식 6][Equation 6]

Figure 112020006547839-pat00010
Figure 112020006547839-pat00010

일 실시예에 따르면, 자동 백색 보정 알고리즘들은 크게 3가지 종류로 구분할 수 있다. 하나는 정적인 방법이며 다른 하나는 색역 매핑방법이고 마지막 다른 하나는 학습 기반 방법일 수 있다. 다양한 실시예에 따르면, 정적인 방법(static methods)은 고정된 파라미터 세팅으로 이미지에 적용되는 방법으로 '그레이 월드', '화이트 패치', '그레이 에지' 방법들을 포함할 수 있다.According to an embodiment, the automatic white correction algorithms may be divided into three types. One may be a static method, the other may be a color gamut mapping method, and the last may be a learning-based method. According to various embodiments, static methods are methods applied to an image with fixed parameter settings, and may include 'gray world', 'white patch', and 'gray edge' methods.

일 실시예에 따르면, '그레이 월드' 알고리즘은 백색광(자연광) 아래에서 획득한 장면 이미지의 평균색은 무채색(aromatic ; R=G=B인 색; 흰색, 회색, 검정색) 이라는 가정 하에서 출발한다. 다양한 실시예에 따르면 장면의 평균색이 회색에서 벗어나는 정도는 백색광이 아닌 조명광원의 영향인 것을 암시할 수 있다. 이 가정 하에, 계산된 획득한 영상 프레임의 각 색상 채널별 평균 값을 해당 조명광원에서의 그레이 컬러 포인트로 추정한다. 즉, 아래 수식 7에 기반하여 계산할 수 있다.According to an embodiment, the 'Gray World' algorithm starts under the assumption that the average color of a scene image obtained under white light (natural light) is an achromatic color (R=G=B; white, gray, and black). According to various embodiments, the extent to which the average color of a scene deviates from gray may be implied to be an effect of an illumination light source other than white light. Under this assumption, the calculated average value for each color channel of the acquired image frame is estimated as a gray color point in the corresponding illumination light source. That is, it can be calculated based on Equation 7 below.

[수식 7][Equation 7]

Figure 112020006547839-pat00011
Figure 112020006547839-pat00011

일 실시예에 따르면, 이 후에, 장면의 모든 픽셀에 대해 수식 6을 적용하여 자동 백색 보정을 달성할 수 있다. 다양한 실시예에 따르면, RGB 색 공간 모델은 보통 LMS 색 공간 모델의 근사로 간주할 수 있따. 또한, 그레이 포인트는

Figure 112020006547839-pat00012
로 근사화 될 수 있다. 즉, 그레이 월드 자동 백색 보정은 해당 프레임 픽셀의 Rs, Gs, Bs 값을 다음의 식에 따라서 백색 보정된 픽셀 값, Rd, Gd, Bd 각각은 다음 수식 8과 같을 수 있다.According to one embodiment, after this, Equation 6 may be applied to every pixel in the scene to achieve automatic white correction. According to various embodiments, the RGB color space model may be generally regarded as an approximation of the LMS color space model. Also, the gray point is
Figure 112020006547839-pat00012
can be approximated as That is, in gray world automatic white correction , the R s , G s , B s values of the corresponding frame pixels are white-corrected according to the following equation, and each of R d , G d , B d may be the same as the following Equation 8 .

[수식 8][Equation 8]

Figure 112020006547839-pat00013
Figure 112020006547839-pat00013

도 1은 본 발명에서 개시하고 있는 일 실시예에 따른 영상 보정 방법에 대한 흐름도이다. 일 실시예에 따르면, 도 1에서 도시하고 있는 흐름도는 도 6에서 도시하고 있는 전자 장치에 의해 수행될 수 있다.1 is a flowchart of an image correction method according to an embodiment disclosed in the present invention. According to an embodiment, the flowchart illustrated in FIG. 1 may be performed by the electronic device illustrated in FIG. 6 .

일 실시예에 따르면, S110 단계에서 각 프레임마다 자연광에서 회색을 가지는 적어도 하나의 후보 픽셀을 결정할 수 있다. 다양한 실시예에 따르면, 각 프레임마다 R값, G값, B값이 모두 동일한 픽셀을 확인하고, 상기 R값, 상기 G값, 상기 B값이 모두 동일한 픽셀 중에서 U값 또는 V값이 기설정된 문턱값 미만인 픽셀을 후보 픽셀로 결정할 수 있다. 한편, 상기 U값 및 상기 V값은 상기 R값, 상기 G값, 상기 B값을 YUV 색계로 변환시켜 획득된 값일 수 있다.According to an embodiment, in operation S110 , at least one candidate pixel having a gray color in natural light may be determined for each frame. According to various embodiments, a pixel having the same R value, G value, and B value is identified for each frame, and a U value or V value is a preset threshold among pixels having the same R value, the G value, and the B value. A pixel less than the value may be determined as a candidate pixel. Meanwhile, the U value and the V value may be values obtained by converting the R value, the G value, and the B value into a YUV color system.

일 실시예에 따르면, 후보 픽셀은 R=G=B가 성립할 수 있으며, 이때 다음 수식 9와 같은 YUV 변환을 고려해 볼 수 있다.According to an embodiment, R=G=B may be established for the candidate pixel, and in this case, YUV conversion as shown in Equation 9 may be considered.

[수식 9][Equation 9]

Figure 112020006547839-pat00014
Figure 112020006547839-pat00014

다양한 실시예에 따르면, 수식 9에서 R=G=B인 경우에 U=V=0이 됨을 확인할 수 있다. 즉, 후보 픽셀들은 U=V=0 조건을 만족함을 확인할 수 있다.According to various embodiments, it can be confirmed that U=V=0 when R=G=B in Equation 9. That is, it can be confirmed that the candidate pixels satisfy the condition U=V=0.

일 실시예에 따르면, 자연광이 아닌 다른 조명 하에서 후보 픽셀들은 U=V=0을 만족하지 못하고 색상을 가질 수 있다. 예를 들어 후보 픽셀들은 자연광과 다른 색온도 조명하에서도 U, V 값이 Y값에 비해 상대적으로 매우 작을 수 있다. 따라서 본 발명에서는 다음 수식 10에 근거하여 특정 문턱값(T) 미만인 픽셀을 후보 픽셀로 결정하는 방법을 개시하고 있다.According to an embodiment, under illumination other than natural light, candidate pixels may not satisfy U=V=0 and may have a color. For example, the candidate pixels may have very small U and V values compared to their Y values even under illumination with a color temperature different from natural light. Accordingly, the present invention discloses a method of determining a pixel that is less than a specific threshold value T as a candidate pixel based on Equation 10 below.

[수식 10][Equation 10]

Figure 112020006547839-pat00015
Figure 112020006547839-pat00015

일 실시예에 따르면, S120 단계에서 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R, G, B 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용할 수 있다. 다양한 실시예에 따르면, 상기 게인 조절 알고리즘은 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용될 수 있으며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴될 수 있다.According to an embodiment, in step S120 , a gain adjustment algorithm for adjusting the gain values of the R, G, and B channels for each frame so that the candidate pixel becomes a gray point pixel may be applied. According to various embodiments, the gain control algorithm may be applied to each frame as many times as the number of times less than or equal to a predetermined threshold value, and a parameter value for a channel gain of a frame sequence including a plurality of frames to which the gain control algorithm is applied is a specific value. may converge to the following.

일 실시예에 따르면, S130 단계에서 게인 조절 알고리즘 적용 횟수가 특정 임계값을 초과하는지 여부를 판단할 수 있다. 예를 들어, 임계값이 5인 경우, 각 프레임마다 게인 조절 알고리즘은 최대 5번까지 적용될 수 있다. 다양한 실시예에 따르면, 상기 임계값은 전자 장치를 구성하는 데이터 처리 프로세서의 연산 처리 가능량에 기반하여 결정될 수 있다. 예를 들어, 데이터 처리 프로세서의 연산 처리 가능량이 클수록 상기 임계값은 증가할 수 있다.According to an embodiment, it may be determined whether the number of times of application of the gain adjustment algorithm exceeds a specific threshold in step S130. For example, when the threshold value is 5, the gain adjustment algorithm may be applied up to 5 times for each frame. According to various embodiments, the threshold value may be determined based on an arithmetic processing capability of a data processing processor constituting the electronic device. For example, the threshold value may increase as the arithmetic processing capability of the data processing processor increases.

한편 도시하지는 않았으나, S110 단계 이전에 영상의 배경 장면이 바뀌었는지 여부를 확인하는 단계와 영상의 배경 장면이 바뀐 경우, 게인 조절 알고리즘을 초기화하는 단계를 더 포함할 수 있다. 다양한 실시예에 따르면, 배경 장면이 바뀐 경우 뿐만 아니라, 배경 장면이 시작 장면인 경우 게인 조절 알고리즘이 초기화 될 수 있다.Meanwhile, although not shown, the method may further include a step of checking whether a background scene of the image has been changed before step S110, and initializing a gain adjustment algorithm when the background scene of the image is changed. According to various embodiments, the gain adjustment algorithm may be initialized not only when the background scene is changed but also when the background scene is the start scene.

도 2는 본 발명에서 개시하고 있는 일 실시예에 따른 게인 조절 과정을 설명하기 위한 도면이다. 도 2에서 도시하고 있는 게인 조절 과정은 도 1의 S120 단계에 의해 수행되는 절차일 수 있다.2 is a view for explaining a gain adjustment process according to an embodiment disclosed in the present invention. The gain adjustment process shown in FIG. 2 may be a procedure performed by step S120 of FIG. 1 .

일 실시예에 따르면, Ii는 i번째 반복 때의 입력 픽셀을 의미하며, Oi는 게인 조절된 i번째 반복 때의 출력 픽셀을 의미할 수 있다. 다양한 실시예에 따르면, Gi는 i번째 반복 때의 각 R, G, B 컬러 채널의 게인을 의미할 수 있으며, 이후 i번째 반복 때의 각 R, G, B 컬러 채널의 게인을 각각

Figure 112020006547839-pat00016
로 정의할 수 있다. 따라서 i번째 반복 때의 Ii 및 Oi의 R, G, B 채널 값을 각각
Figure 112020006547839-pat00017
라 하면,
Figure 112020006547839-pat00018
의 관계식이 성립할 수 있다.According to an exemplary embodiment, I i may mean an input pixel at the i-th iteration, and O i may mean an output pixel at the i-th iteration of which the gain is adjusted. According to various embodiments, G i may mean the gain of each R, G, and B color channel at the i-th iteration, and thereafter, the gains of each R, G, and B color channel at the i-th iteration, respectively.
Figure 112020006547839-pat00016
can be defined as Therefore, the R, G, and B channel values of I i and O i at the i-th iteration are respectively
Figure 112020006547839-pat00017
If you say
Figure 112020006547839-pat00018
relationship can be established.

일 실시예에 따르면, Φi는 다음 수식 11과 같이 정의될 수 있다.According to an embodiment, Φi may be defined as in Equation 11 below.

[수식 11][Equation 11]

Figure 112020006547839-pat00019
Figure 112020006547839-pat00019

수식 11에서

Figure 112020006547839-pat00020
Figure 112020006547839-pat00021
는 수식 10에서 구한 후보 픽셀들의 U, V 들의 평균값을 의미할 수 있다. 일 실시예에 따르면, 희망 신호 값 di는 0이 될 수 있으며,
Figure 112020006547839-pat00022
일 수 있다. 다양한 실시예에 따르면, 도 1에서 게인 조절 알고리즘은 다음 수식 12와 같을 수 있다.in formula 11
Figure 112020006547839-pat00020
and
Figure 112020006547839-pat00021
may mean an average value of U and V of the candidate pixels obtained in Equation 10. According to one embodiment, the desired signal value di may be zero,
Figure 112020006547839-pat00022
can be According to various embodiments, the gain adjustment algorithm in FIG. 1 may be as shown in Equation 12 below.

[수식 12][Equation 12]

Figure 112020006547839-pat00023
Figure 112020006547839-pat00023

일 실시예에 따르면, μ는 상수이고 알고리즘의 수렴 속도를 결정하는 파라미터일 수 있다. 다양한 실시예에 따르면,

Figure 112020006547839-pat00024
는 다음 수식 13과 같을 수 있다.According to an embodiment, μ is a constant and may be a parameter that determines the convergence speed of the algorithm. According to various embodiments,
Figure 112020006547839-pat00024
may be as in Equation 13 below.

[수식 13][Equation 13]

Figure 112020006547839-pat00025
Figure 112020006547839-pat00025

일 실시예에 따르면, a=0.8, b=0.15일 수 있으며, 자동 백색 보정을 위한 R, G, B 게인 값 조절은

Figure 112020006547839-pat00026
가 충분히 작아질 때까지 반복적으로 수행(예를 들어 수식 10, 11, 12의 과정이 반복적으로 수행)될 수 있다. According to one embodiment, a=0.8, b=0.15 may be, and R, G, B gain value adjustment for automatic white correction is
Figure 112020006547839-pat00026
It may be iteratively performed (for example, the processes of Equations 10, 11, and 12 are repeatedly performed) until is sufficiently small.

도 3은 본 발명에서 개시하고 있는 일 실시예에 따른 영상 프레임의 구조를 설명하기 위한 도면이다.3 is a view for explaining the structure of an image frame according to an embodiment disclosed in the present invention.

일 실시예에 따르면 입력 영상 프레임은 도 3과 같이 윈도우들로 분할될 수 있다. 다양한 실시예에 따르면, 입력 영상 프레임은 윈도우 사이즈(WINW, WINH), 개수(WINHC*WINVC), 시작 위치(WINSH, WINSV) 등의 파라미터에 기반하여 다양한 사이즈 및 개수의 윈도우로 분할될 수 있다.According to an embodiment, the input image frame may be divided into windows as shown in FIG. 3 . According to various embodiments, the input image frame may be divided into various sizes and numbers of windows based on parameters such as window sizes (WINW, WINH), number (WINHC*WINVC), and start positions (WINSH, WINSV).

일 실시예에 따르면, 각 윈도우는 2*2 픽셀블록들로 서브 샘플링되어 분할될 수 있다. 다양한 실시예에 따르면, AEWINCH, AEWINCV는 각각 2*2 픽셀블록 간의 수평 길이 및 수직 길이를 나타내는 파라미터일 수 있다. 한편, 1920*1080 사이즈 영상의 경우, 영상 프레임의 수평 수직 방향으로는 WINHC=63, WINVC=35개의 윈도우로 나누고 블록 사이의 거리를 각각 AEWINCH=15, AEWINCV=15로 샘플링하면 8820개의 픽셀블록(63*35*4)이 형성될 수 있다.According to an embodiment, each window may be sub-sampled and divided into 2*2 pixel blocks. According to various embodiments, AEWINCH and AEWINCV may be parameters indicating a horizontal length and a vertical length between 2*2 pixel blocks, respectively. On the other hand, in the case of 1920*1080 size video, if the video frame is divided into WINHC=63, WINVC=35 windows in the horizontal and vertical direction and the distance between blocks is sampled with AEWINCH=15 and AEWINCV=15, respectively, 8820 pixel blocks ( 63*35*4) may be formed.

일 실시예에 따르면, 각 프레임에서 일부 픽셀블록에만 자동백생보정 알고리즘을 적용함으로써 자동백색보정 알고리즘에 요구되는 부하를 감소시킬 수 있다. According to an embodiment, the load required for the automatic whiteness correction algorithm may be reduced by applying the automatic whiteness correction algorithm to only some pixel blocks in each frame.

도 4는 본 발명에서 개시하고 있는 일 실시예에 따른 백색 보정 방법을 설명하기 위한 도면이다. 4 is a view for explaining a white correction method according to an embodiment disclosed in the present invention.

일 실시예에 따르면, S410 단계는 자동 백색 보정을 위한 초기화 단계일 수 있다. 다양한 실시예에 따르면, S410 단계에서 시작장면 또는 장면전환 시에 게인 조절 알고리즘 적용을 초기화할 수 있다.According to an embodiment, step S410 may be an initialization step for automatic white correction. According to various embodiments, application of the gain adjustment algorithm may be initialized at the time of a start scene or a scene change in step S410 .

일 실시예에 따르면, S420 단계는 그레이포인트 후보 검출 단계일 수 있다. 다양한 실시예에 따르면, 영상의 매 프레임마다 그레이 포인트 후보를 검출할 수 있다. 예를 들어 초기화 또는 장면 변화 감지 시에 샘플링된 픽셀 블록들의 각 채널 R, G, B의 평균

Figure 112020006547839-pat00027
및 이들 합인
Figure 112020006547839-pat00028
를 구한 후에, 모든 픽셀에 대해 수식 8을 적용할 수 있으며, 샘플링된 각 픽셀 블록의 각 채널 R, G, B값의 합으로부터 이를 각각 Y, U, V로 변환한후에 수식 9를 적용하여 점검한 후에 이를 만족하면 해당 픽셀 블록을 그레이 컬러 포인트 후보 픽셀로 결정할 수 있다.According to an embodiment, step S420 may be a graypoint candidate detection step. According to various embodiments, a gray point candidate may be detected for every frame of an image. Average of each channel R, G, B of pixel blocks sampled, e.g. upon initialization or scene change detection
Figure 112020006547839-pat00027
and their sum
Figure 112020006547839-pat00028
Equation 8 can be applied to all pixels after obtaining If this is satisfied later, the corresponding pixel block may be determined as a gray color point candidate pixel.

일 실시예에 따르면, S430 단계는 그레이포인트 기반 백색 보정 조정 단계일 수 있다. 다양한 실시예에 따르면, 매 프레임마다 그레이 포인트 기반 자동백색 조정을 수행할 수 있다. 예를 들어 S420 단계를 통한 그레이 컬러 포인트 후보 픽셀 블록들의 U, V 들의 평균값들

Figure 112020006547839-pat00029
를 이용하여 수식 11을 적용해 φ를 구할 수 있으며, φ를 이용하여 프레임의 모든 픽셀에 대해 수식 12를 적용할 수 있다.According to an embodiment, step S430 may be a graypoint-based white correction adjustment step. According to various embodiments, gray point-based automatic white adjustment may be performed for every frame. For example, average values of U and V of gray color point candidate pixel blocks through step S420
Figure 112020006547839-pat00029
ϕ can be obtained by applying Equation 11 using

도 5는 본 발명에서 개시하고 있는 백색 보정 방법의 효과를 설명하기 위한 도면이다.5 is a diagram for explaining the effect of the white correction method disclosed in the present invention.

도 5 (a)는 백색 보정 방법이 적용되기 전의 영상을 나타낸 도면이며, 도 5 (b)는 본 발명에서 제안하는 백색 보정 방법이 적용된 영상을 나타낸 도면이다. 한편, 도 5 (c)는 육안으로 보여지는 영상을 나타낸 도면이다. 즉, 본 발명에서 개시하고 있는 실시예에 따른 경우, 육안으로 보여지는 영상과 유사하게 영상이 획득되는 것을 확인할 수 있다. 또한 본 발명의 일 실시예에 따를 경우, 고해상도의 영상에 대해서도 빠른 속도로 효율적으로 백색 보정 처리가 수행됨을 확인할 수 있다.Fig. 5 (a) is a view showing an image before the white correction method is applied, and Fig. 5 (b) is a view showing an image to which the white correction method proposed in the present invention is applied. On the other hand, Figure 5 (c) is a view showing an image seen with the naked eye. That is, according to the embodiment disclosed in the present invention, it can be confirmed that the image is obtained similarly to the image seen with the naked eye. In addition, according to an embodiment of the present invention, it can be confirmed that the white correction process is efficiently performed at a high speed even on a high-resolution image.

도 6은 본 발명에서 개시하고 있는 일 실시예에 따른 영상을 보정하기 위한 전자 장치에 대한 블록도이다.6 is a block diagram of an electronic device for correcting an image according to an embodiment disclosed in the present invention.

일 실시예에 따르면, 전자 장치(600)는 각 프레임마다 자연광에서 회색을 가지는 적어도 하나의 후보 픽셀을 결정하는 후보 픽셀 결정부(610) 및 상기 적어도 하나의 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R(red), G(green), B(blue) 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용하는 알고리즘 적용부(620)를 포함할 수 있다. 다양한 실시예에 따르면, 상기 알고리즘 적용부(620)는 상기 게인 조절 알고리즘을 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용되며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴될 수 있다.According to an embodiment, the electronic device 600 includes a candidate pixel determiner 610 that determines at least one candidate pixel having a gray color in natural light for each frame, and each frame so that the at least one candidate pixel becomes a gray point pixel. Each R (red), G (green), B (blue) may include an algorithm applying unit 620 for applying a gain adjustment algorithm for adjusting the gain value of the channel. According to various embodiments, the algorithm application unit 620 applies the gain adjustment algorithm to each frame by the number of times less than or equal to a preset threshold, and a channel gain of a frame sequence including a plurality of frames to which the gain adjustment algorithm is applied. A parameter value for ? may converge to a specific value or less.

일 실시예에 따르면, 상기 후보 픽셀 결정부(610)는 각 프레임마다 R값, G값, B값이 모두 동일한 픽셀을 확인하고, 상기 R값, 상기 G값, 상기 B값이 모두 동일한 픽셀 중에서 U값 또는 V값이 기설정된 문턱값 미만인 픽셀을 후보 픽셀로 결정하며, 상기 U값 및 상기 V값은 상기 R값, 상기 G값, 상기 B값을 YUV(와이유브이) 색계로 변환시켜 획득된 값일 수 있다.According to an embodiment, the candidate pixel determiner 610 identifies pixels having the same R value, G value, and B value for each frame, and among pixels having the same R value, G value, and B value A pixel having a U value or a V value less than a preset threshold is determined as a candidate pixel, and the U and V values are obtained by converting the R value, the G value, and the B value into a YUV color system. may be a given value.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 사람이라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and various modifications and variations will be possible without departing from the essential characteristics of the present invention by those skilled in the art to which the present invention pertains. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical spirit of the present invention, but to explain, and the scope of the technical spirit of the present invention is not limited by these embodiments. The protection scope of the present invention should be construed by the following claims, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of the present invention.

Claims (11)

전자 장치에 의해 수행되는 영상 보정 방법에 있어서,
각 프레임마다 R값 G값, B값이 모두 동일한 픽셀을 확인하는 단계;
상기 R값, 상기 G값, 상기 B값이 모두 동일한 픽셀 중에서 U값 또는 V값이 기설정된 문턱값 미만인 픽셀을 후보 픽셀로 결정하는 단계; 및
적어도 하나의 상기 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R(red), G(green), B(blue) 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용하는 단계를 포함하고,
상기 게인 조절 알고리즘은 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용되며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴되는 것을 특징으로 하는,
영상 보정 방법.
An image correction method performed by an electronic device, comprising:
checking pixels having the same R value, G value, and B value for each frame;
determining, as a candidate pixel, a pixel having a U value or a V value less than a preset threshold among pixels having the same R value, the G value, and the B value; and
and applying a gain adjustment algorithm for adjusting the gain values of R (red), G (green), and B (blue) channels for each frame so that at least one of the candidate pixels becomes a gray point pixel,
The gain control algorithm is applied to each frame by a number of times less than or equal to a preset threshold, and the parameter value for the channel gain of a frame sequence including a plurality of frames to which the gain control algorithm is applied is converged below a specific value. doing,
How to edit video.
제1항에 있어서,
상기 U값 및 상기 V값은 상기 R값, 상기 G값, 상기 B값을 YUV(와이유브이) 색계로 변환시켜 획득된 값인 것을 특징으로 하는,
영상 보정 방법.
According to claim 1,
The U value and the V value are values obtained by converting the R value, the G value, and the B value into a YUV color system,
How to edit video.
제1항에 있어서,
각 프레임은 복수개의 윈도우로 분할되고, 각 윈도우는 복수개의 픽셀 블록으로 분할되며, 상기 후보 픽셀 결정 단계와 상기 게인 조절 알고리즘 적용 단계는 상기 복수개의 픽셀 블록 중 일부 픽셀 블록에 대해서만 수행되는 것을 특징으로 하는,
영상 보정 방법.
According to claim 1,
Each frame is divided into a plurality of windows, and each window is divided into a plurality of pixel blocks, and the step of determining the candidate pixel and the step of applying the gain adjustment algorithm are performed only for some pixel blocks among the plurality of pixel blocks. doing,
How to edit video.
제3항에 있어서,
해상도 1920*1080 사이즈 영상의 경우, 상기 각 프레임은 수평방향으로 63개, 수직방향으로는 35개의 윈도우로 분할되고, 각 윈도우 내에서 상기 후보 픽셀 결정 단계와 상기 게인 조절 알고리즘 적용 단계가 수행되는 픽셀 블록은 4개인 것을 특징으로 하는,
영상 보정 방법.
4. The method of claim 3,
In the case of a resolution 1920*1080 size image, each frame is divided into 63 windows in the horizontal direction and 35 windows in the vertical direction, and pixels in which the candidate pixel determination step and the gain adjustment algorithm application step are performed within each window. The block is characterized in that there are 4,
How to edit video.
제1항에 있어서,
상기 임계값은 상기 전자 장치를 구성하는 데이터 처리 프로세서의 연산 처리 가능량이 클수록 커지는 것을 특징으로 하는,
영상 보정 방법.
According to claim 1,
The threshold value is characterized in that the larger the arithmetic processing capability of the data processing processor constituting the electronic device, the greater,
How to edit video.
제1항에 있어서,
영상의 배경 장면이 바뀌었는지 여부를 확인하는 단계; 및
영상의 배경 장면이 바뀐 경우, 상기 게인 조절 알고리즘을 초기화하는 단계를 더 포함하는,
영상 보정 방법.
According to claim 1,
determining whether a background scene of the image has been changed; and
When the background scene of the image is changed, further comprising the step of initializing the gain adjustment algorithm,
How to edit video.
영상을 보정하기 위한 전자 장치에 있어서,
각 프레임마다 R값, G값, B값이 모두 동일한 픽셀을 확인하고, 상기 R값, 상기 G값, 상기 B값이 모두 동일한 픽셀 중에서 U값 또는 V값이 기설정된 문턱값 미만인 픽셀을 후보 픽셀로 결정하는 후보 픽셀 결정부; 및
적어도 하나의 상기 후보 픽셀이 회색 포인트 픽셀이 되도록 각 프레임마다 R(red), G(green), B(blue) 채널의 게인값을 조정하는 게인 조절 알고리즘을 적용하는 알고리즘 적용부를 포함하고,
상기 알고리즘 적용부는 상기 게인 조절 알고리즘을 기설정된 임계값 이하의 횟수만큼 각 프레임마다 적용되며, 상기 게인 조절 알고리즘이 적용된 복수개의 프레임을 포함하는 프레임 시퀀스의 채널 게인에 대한 파라미터값은 특정 값 이하로 수렴되는 것을 특징으로 하는,
전자 장치.
An electronic device for correcting an image, comprising:
For each frame, pixels having the same R value, G value, and B value are identified, and among pixels having the same R value, the G value, and the B value, a pixel having a U value or a V value less than a preset threshold is selected as a candidate pixel a candidate pixel determiner that determines and
An algorithm application unit for applying a gain adjustment algorithm for adjusting the gain values of R (red), G (green), and B (blue) channels for each frame so that at least one of the candidate pixels becomes a gray point pixel,
The algorithm applying unit applies the gain adjustment algorithm to each frame by a number of times less than or equal to a predetermined threshold, and the parameter value for the channel gain of a frame sequence including a plurality of frames to which the gain adjustment algorithm is applied converges to a specific value or less. characterized by being
electronic device.
제7항에 있어서,
상기 U값 및 상기 V값은 상기 R값, 상기 G값, 상기 B값을 YUV(와이유브이) 색계로 변환시켜 획득된 값인 것을 특징으로 하는,
전자 장치.
8. The method of claim 7,
The U value and the V value are values obtained by converting the R value, the G value, and the B value into a YUV color system,
electronic device.
제7항에 있어서,
각 프레임은 복수개의 윈도우로 분할되고, 각 윈도우는 복수개의 픽셀 블록으로 분할되며, 상기 후보 픽셀 결정부는 상기 복수개의 픽셀 블록 중 일부 픽셀 블록에 대해서만 적어도 하나의 후보 픽셀을 결정하고, 상기 알고리즘 적용부는 상기 복수개의 픽셀 블록 중 일부 픽셀 블록에 대해서만 상기 게인 조절 알고리즘을 적용하는 것을 특징으로 하는,
전자 장치.
8. The method of claim 7,
Each frame is divided into a plurality of windows, each window is divided into a plurality of pixel blocks, the candidate pixel determining unit determines at least one candidate pixel for only some pixel blocks among the plurality of pixel blocks, and the algorithm applying unit characterized in that the gain adjustment algorithm is applied only to some pixel blocks among the plurality of pixel blocks,
electronic device.
제7항에 있어서,
상기 임계값은 알고리즘 적용부의 연산 처리 가능량이 클수록 커지는 것을 특징으로 하는,
전자 장치.
8. The method of claim 7,
The threshold value is characterized in that the larger the amount of arithmetic processing possible by the algorithm application unit, the larger,
electronic device.
제7항에 있어서,
상기 알고리즘 적용부는 영상의 배경 장면이 바뀌었는지 여부를 확인하고, 영상의 배경 장면이 바뀐 경우, 상기 게인 조절 알고리즘을 초기화하는 것을 특징으로 하는,
전자 장치.
8. The method of claim 7,
The algorithm application unit checks whether the background scene of the image is changed, characterized in that when the background scene of the image is changed, to initialize the gain adjustment algorithm,
electronic device.
KR1020200007526A 2020-01-20 2020-01-20 A method for auto white balance of image and an electronic device to process auto white balance method KR102318196B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200007526A KR102318196B1 (en) 2020-01-20 2020-01-20 A method for auto white balance of image and an electronic device to process auto white balance method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200007526A KR102318196B1 (en) 2020-01-20 2020-01-20 A method for auto white balance of image and an electronic device to process auto white balance method

Publications (2)

Publication Number Publication Date
KR20210093658A KR20210093658A (en) 2021-07-28
KR102318196B1 true KR102318196B1 (en) 2021-10-27

Family

ID=77126296

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200007526A KR102318196B1 (en) 2020-01-20 2020-01-20 A method for auto white balance of image and an electronic device to process auto white balance method

Country Status (1)

Country Link
KR (1) KR102318196B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116189187A (en) * 2022-12-29 2023-05-30 无锡物联网创新中心有限公司 Nameplate color and text integrated detection method applied to factory monitoring scene

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009506700A (en) * 2005-08-30 2009-02-12 ノキア コーポレイション Image processing apparatus with auto white balance

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100712809B1 (en) * 2005-04-29 2007-04-30 매그나칩 반도체 유한회사 Apparatus for auto white balance control and method for control of auto white balance

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009506700A (en) * 2005-08-30 2009-02-12 ノキア コーポレイション Image processing apparatus with auto white balance

Also Published As

Publication number Publication date
KR20210093658A (en) 2021-07-28

Similar Documents

Publication Publication Date Title
US10535125B2 (en) Dynamic global tone mapping with integrated 3D color look-up table
US7969480B2 (en) Method of controlling auto white balance
KR100881028B1 (en) Apparatus and method for calibration of gray data
US8199227B2 (en) Image-signal processing apparatus for performing space-variant image-signal processing
JP5611508B2 (en) Ambient light adaptive color correction apparatus and method
US6995791B2 (en) Automatic white balance for digital imaging
US8229215B2 (en) Image sensor apparatus and method for scene illuminant estimation
US7057768B2 (en) Automatic color balance
US9342872B2 (en) Color correction parameter computation method, color correction parameter computation device, and image output system
US8243164B2 (en) Method, apparatus, and system for selecting pixels for automatic white balance processing
JP2005210526A (en) Image processing apparatus, method, and program, image pickup device, and image data outputting method and program
JP2002245446A (en) Color image processor and its method
WO2009104787A1 (en) Method for processing color image, color processing device and color processing program
US9961236B2 (en) 3D color mapping and tuning in an image processing pipeline
JP2000013626A (en) Image processing method, device and storage medium
US20080056566A1 (en) Video processing
US20020071041A1 (en) Enhanced resolution mode using color image capture device
US8411944B2 (en) Color processing apparatus and method thereof
JP2005210495A (en) Image processing apparatus, method, and program
US20100238317A1 (en) White balance processing apparatus, method for processing white balance, and white balance processing program
KR102318196B1 (en) A method for auto white balance of image and an electronic device to process auto white balance method
US7701462B2 (en) Simple and robust color saturation adjustment for digital images
US6870955B2 (en) Method for deciding semi-S curve for tone process of a digital color image
KR20140122605A (en) Method and apparatus for adjusting brightness of input image
EP3182691B1 (en) Method of encoding raw color coordinates provided by a camera representing colors of a scene having two different illuminations

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant