KR102315200B1 - Image processing apparatus for auto white balance and processing method therefor - Google Patents
Image processing apparatus for auto white balance and processing method therefor Download PDFInfo
- Publication number
- KR102315200B1 KR102315200B1 KR1020190103438A KR20190103438A KR102315200B1 KR 102315200 B1 KR102315200 B1 KR 102315200B1 KR 1020190103438 A KR1020190103438 A KR 1020190103438A KR 20190103438 A KR20190103438 A KR 20190103438A KR 102315200 B1 KR102315200 B1 KR 102315200B1
- Authority
- KR
- South Korea
- Prior art keywords
- value
- frame
- sum
- average
- color difference
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/144—Movement detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/646—Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/67—Circuits for processing colour signals for matrixing
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
영상 처리 장치는, 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호를 산출하는 색차 신호 산출부; 현재 단계의 프레임의 다수의 분할 영역 중 적어도 일부를 제 1 유효 그룹으로 추출하는 제 1 유효 그룹 추출부; 및 상기 색차 신호 산출부에서 산출된 평균 색차 신호 및 상기 제 1 유효 그룹 추출부로부터 추출된 제 1 유효 그룹을 이용하여, 보정된 색보정 매트릭스를 산출하는 색보정 매트릭스 보정부;를 포함한다.The image processing apparatus includes: a color difference signal calculator configured to calculate an average color difference signal for an entire region of a current frame and each of a plurality of divided regions; a first valid group extracting unit for extracting at least a portion of a plurality of divided regions of a frame of a current stage as a first valid group; and a color correction matrix correcting unit for calculating a corrected color correction matrix by using the average color difference signal calculated by the color difference signal calculating unit and the first effective group extracted from the first effective group extracting unit.
Description
본 발명은 자동 화이트 밸런스를 위한 처리 방법 및 그 처리 장치에 관한 것이다.The present invention relates to a processing method for automatic white balance and a processing apparatus therefor.
자동 화이트 밸런스(Auto White Balance, AWB)는 카메라 등에 있어서 촬영하고자 하는 피사체의 색상을 자동으로 검출하여, 촬영자의 눈으로 색상을 재현하는데 중요한 요소이다. 촬영하고자 하는 물체의 색은 주위의 색온도에 따라 다르게 보이고, 동일한 물체를 태양광과 형광등 아래에서 보았을때 색온도의 차이에 의해 서로 다른 색으로 나타난다. 이와 같은 색온도의 차이에서 발생하는 색상의 차이를 보정하는 것이 자동 화이트 밸런스이다.Auto White Balance (AWB) is an important factor in automatically detecting the color of a subject to be photographed in a camera, etc., and reproducing the color with the eyes of the photographer. The color of the object to be photographed looks different depending on the surrounding color temperature, and when the same object is viewed under sunlight and fluorescent light, it appears as different colors due to the difference in color temperature. The automatic white balance is to compensate for the color difference caused by the color temperature difference.
국내공개특허 제10-2008-0006397호(이하 '종래 기술'이라 한다.)에는 AWB 방법 및 이를 적용한 촬영장치가 개시되어 있다. 종래 기술에서는 영상에 대한 AWB 수행에 이용될 데이터의 전송시간을 감축시키고, 데이터의 색차적분을 계산하는데 소요되는 연산량을 감소시키기 하나의 영상을 구성하는 복수의 윈도우들 중 일보의 윈도우들을 선택하고, 이 선택된 일부의 윈도우들에 대한 색차 신호를 기초로, 영상에 대한 자동 화이트 밸런스를 수행한다.Korean Patent Publication No. 10-2008-0006397 (hereinafter referred to as 'prior art') discloses an AWB method and a photographing apparatus to which the same is applied. In the prior art, one window is selected from among a plurality of windows constituting one image in order to reduce the transmission time of data to be used for performing AWB on the image and reduce the amount of computation required to calculate the chrominance integral of the data, Based on the color difference signals for the selected partial windows, automatic white balance of the image is performed.
다만, 종래 기술과 같이, 일부 윈도우들의 선택에 있어 해당 윈도우가 선택되기에 적절한 지에 대한 별도의 판단이 이루어지고 있지 않다.However, as in the prior art, in the selection of some windows, a separate determination is not made as to whether a corresponding window is appropriate to be selected.
본 발명은 전술한 바와 같은 기술적 과제를 해결하는 데 목적이 있는 발명으로서, 움직임이 있는 분할 영역을 제외한 일부의 분할 영역을 이용하는 것에 의해 자동 화이트 밸런스의 안정성을 도모할 수 있는 영상 처리 장치 및 그 처리 방법을 제공하는 것에 그 목적이 있다.The present invention aims to solve the technical problem as described above, and an image processing apparatus capable of achieving stability of automatic white balance by using a partial divided area except for a moving divided area, and its processing The purpose is to provide a method.
본 발명의 영상 처리 장치는, 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호를 산출하는 색차 신호 산출부; 현재 단계의 프레임의 다수의 분할 영역 중 적어도 일부를 제 1 유효 그룹으로 추출하는 제 1 유효 그룹 추출부; 및 상기 색차 신호 산출부에서 산출된 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호 및 상기 제 1 유효 그룹 추출부로부터 추출된 제 1 유효 그룹을 이용하여, 보정된 색보정 매트릭스를 산출하는 색보정 매트릭스 보정부;를 포함한다.An image processing apparatus according to the present invention includes: a color difference signal calculator configured to calculate an average color difference signal for an entire region of a current frame and each of a plurality of divided regions; a first valid group extracting unit for extracting at least a portion of a plurality of divided regions of a frame of a current stage as a first valid group; and using the average color difference signal for the entire region and each of the plurality of divided regions of the current frame calculated by the color difference signal calculating unit and the first effective group extracted from the first effective group extracting unit, corrected color correction and a color correction matrix correction unit that calculates a matrix.
상기 제 1 유효 그룹 추출부는, 현재 단계의 프레임의 다수의 분할 영역 또는 이전 단계의 프레임의 다수의 분할 영역에서의 움직임 정보를 이용하여, 상기 제 1 유효 그룹을 추출하는 것을 특징으로 한다. 구체적으로, 상기 제 1 유효 그룹 추출부는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에서의 해당 움직임의 대상이 현재 단계의 프레임의 해당 분할 영역에서 계속 존재하는 것으로 판단된 경우, 해당 분할 영역을 제 1 무효 그룹으로 추출하는 제 1 무효 그룹 추출기; 및 현재 단계의 프레임에서 움직임이 감지된 분할 영역의 경우, 해당 분할 영역을 제 2 무효 그룹으로 추출하는 제 2 무효 그룹 추출기;를 포함하는 것을 특징으로 한다.The first valid group extracting unit may extract the first valid group by using motion information in a plurality of divided regions of a frame of a current stage or a plurality of divided regions of a frame of a previous stage. Specifically, when it is determined that the object of the corresponding motion in the divided area in which the motion is detected in the frame of the previous step continues to exist in the corresponding divided area of the frame of the current step, the first valid group extracting unit selects the divided area a first invalid group extractor for extracting into a first invalid group; and a second invalid group extractor for extracting the divided region as a second invalid group in the case of a divided region in which motion is detected in the frame of the current stage.
바람직하게는, 상기 제 1 무효 그룹 추출기는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우; 또는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우; 해당 분할 영역을, 상기 제 1 무효 그룹으로 추출하는 것을 특징으로 한다.Preferably, the first invalid group extractor, for the divided region in which motion is detected in the frame of the previous stage, is an average color difference of the divided region of the frame of the current stage from the average color difference signal of the divided region of the frame of the previous stage When the signal shows a difference of less than a certain distance; Alternatively, in the case in which, with respect to the divided region in which motion is detected in the frame of the previous stage, no motion is detected to move out of the corresponding divided region of the frame of the current stage; It is characterized in that the divided area is extracted as the first invalid group.
구체적으로 상기 제 1 유효 그룹 추출부는, 현재 단계의 프레임의 다수의 분할 영역으로부터 상기 제 1 무효 그룹 및 상기 제 2 무효 그룹을 제외한 분할 영역을, 상기 제 1 유효 그룹으로 추출하는 제 1 유효 그룹 추출기;를 더 포함하는 것이 바람직하다.Specifically, the first valid group extractor is configured to extract, as the first valid group, a partitioned area excluding the first invalid group and the second invalid group from a plurality of partitioned areas of a frame of a current stage. It is preferable to further include;
아울러, 상기 색보정 매트릭스 보정부는, 상기 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 1 평균값을 산출하는, 제 1 평균값 산출기; 및 상기 제 1 유효 그룹 중, 상기 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 2 평균값을 산출하는, 제 2 평균값 산출기;를 포함하는 것을 특징으로 한다. In addition, the color correction matrix corrector may include, among the first effective group, an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a first distance from the average color difference signal of the current frame. a first average value calculator for calculating a first average value of ; and calculating a second average value, which is an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a second distance from the first average value, among the first effective group. It is characterized in that it includes;
또한, 상기 색보정 매트릭스 보정부는, 상기 제 2 평균값을 이용하여 미리 저장된 다수의 색보정 매트릭스 중 하나를 선택하고, 상기 제 1 평균값으로부터 상기 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 산출하는 합산기; 및 상기 R 합산값, 상기 B 합산값 및 상기 G 합산값으로부터, R 픽셀의 보정을 위한 R 보정값, G 픽셀의 보정을 위한 G 보정값 및 B 픽셀의 보정을 위한 B 보정값을 산출하고, 상기 R 보정값, 상기 G 보정값 및 상기 B 보정값을 이용하여 선택된 색보정 매트릭스를 보정하는 색보정 매트릭스 보정기;를 더 포함하는 것이 바람직하다.In addition, the color correction matrix correcting unit selects one of a plurality of pre-stored color correction matrices using the second average value, and applies to all divided regions having an average color difference signal within the second distance from the first average value. a summer for calculating an R sum value that is a sum of R pixel values after applying the selected color correction matrix, a G sum value that is a sum of G pixel values, and a B sum value that is a sum of B pixel values; and calculating an R correction value for correcting the R pixel, a G correction value for correcting the G pixel, and a B correction value for correcting the B pixel from the R summation value, the B summation value, and the G summation value, Preferably, it further includes a color correction matrix corrector for correcting a selected color correction matrix using the R correction value, the G correction value, and the B correction value.
구체적으로, 상기 R 보정값은, 상기 G 합산값으로 상기 R 합산값을 나눈 값이고, 상기 B 보정값은, 상기 G 합산값으로 상기 B 합산값을 나눈 값인 것을 특징으로 한다.Specifically, the R correction value is a value obtained by dividing the R sum value by the G sum value, and the B correction value is a value obtained by dividing the B sum value by the G sum value.
아울러, 본 발명의 영상 처리 장치는, 상기 색보정 매트릭스 보정부에 의해 보정된 색보정 매트릭스를 현재 단계의 프레임에 적용한 영상을 출력하는 영상 출력부;를 더 포함하는 것을 특징으로 한다.In addition, the image processing apparatus of the present invention may further include an image output unit configured to output an image obtained by applying the color correction matrix corrected by the color correction matrix correcting unit to a frame of a current stage.
본 발명의 영상 처리 방법은, (a) 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호를 산출하는 단계; (b) 현재 단계의 프레임의 다수의 분할 영역 중 적어도 일부를 제 1 유효 그룹으로 추출하는 단계; 및 (c) 상기 (a) 단계에서 산출된 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호 및 상기 (b) 단계로부터 추출된 제 1 유효 그룹을 이용하여, 보정된 색보정 매트릭스를 산출하는 단계;를 포함한다.An image processing method of the present invention includes the steps of: (a) calculating an average color difference signal for an entire region and a plurality of divided regions of a current frame; (b) extracting at least a portion of a plurality of divided regions of the frame of the current stage as a first valid group; and (c) the color corrected using the average color difference signal for the entire region of the current frame and each of the plurality of divided regions calculated in the step (a) and the first effective group extracted from the step (b). and calculating a correction matrix.
아울러, 상기 (b) 단계는, 현재 단계의 프레임의 다수의 분할 영역 또는 이전 단계의 프레임의 다수의 분할 영역에서의 움직임 정보를 이용하여, 상기 제 1 유효 그룹을 추출하는 것이 바람직하다. In addition, in step (b), it is preferable to extract the first valid group by using motion information in a plurality of divided regions of a frame of the current stage or a plurality of divided regions of a frame of a previous stage.
구체적으로, 상기 (b) 단계는, (b-1) 이전 단계의 프레임에서 움직임이 감지된 분할 영역에서의 해당 움직임의 대상이 현재 단계의 프레임의 해당 분할 영역에서 계속 존재하는 것으로 판단된 경우, 해당 분할 영역을 제 1 무효 그룹으로 추출하는 단계; 및 (b-2) 현재 단계의 프레임에서 움직임이 감지된 분할 영역의 경우, 해당 분할 영역을 제 2 무효 그룹으로 추출하는 단계;를 포함하는 것을 특징으로 한다.Specifically, in step (b), (b-1) when it is determined that the object of the corresponding motion in the divided area in which the motion is detected in the frame of the previous step continues to exist in the corresponding divided area of the frame of the current step, extracting the corresponding partitioned area as a first invalid group; and (b-2) extracting the divided region as a second invalid group in the case of a divided region in which motion is detected in the frame of the current stage.
바람직하게는, 상기 (b-1) 단계는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우; 또는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우; 해당 분할 영역을, 상기 제 1 무효 그룹으로 추출하는 것을 특징으로 한다.Preferably, in step (b-1), for the divided region in which motion is detected in the frame of the previous stage, the average of the corresponding divided region of the current frame from the average color difference signal of the divided region of the frame of the previous stage When the color difference signal shows a difference of less than a certain distance; Alternatively, in the case in which, with respect to the divided region in which motion is detected in the frame of the previous stage, no motion is detected to move out of the corresponding divided region of the frame of the current stage; It is characterized in that the divided area is extracted as the first invalid group.
아울러, 상기 (b) 단계는, (b-3) 현재 단계의 프레임의 다수의 분할 영역으로부터 상기 제 1 무효 그룹 및 상기 제 2 무효 그룹을 제외한 분할 영역을, 상기 제 1 유효 그룹으로 추출하는 단계;를 더 포함하는 것이 바람직하다.In addition, the step (b) includes: (b-3) extracting, as the first valid group, a partitioned area excluding the first invalid group and the second invalid group from a plurality of partitioned areas of the frame of the current step It is preferable to further include;
또한, 상기 (c) 단계는, (c-1) 상기 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 1 평균값을 산출하는 단계; (c-2) 상기 제 1 유효 그룹 중, 상기 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 2 평균값을 산출하는 단계; (c-3) 상기 제 2 평균값을 이용하여 미리 저장된 다수의 색보정 매트릭스 중 하나를 선택하고, 상기 제 1 평균값으로부터 상기 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 산출하는 단계; 및 (c-4) 상기 R 합산값, 상기 B 합산값 및 상기 G 합산값으로부터, R 픽셀의 보정을 위한 R 보정값, G 픽셀의 보정을 위한 G 보정값 및 B 픽셀의 보정을 위한 B 보정값을 산출하고, 상기 R 보정값, 상기 G 보정값 및 상기 B 보정값을 이용하여 선택된 색보정 매트릭스를 보정하는 단계;를 포함하는 것을 특징으로 한다.Also, in step (c), (c-1) all pixels included in at least one divided area having an average color difference signal within a first distance from the average color difference signal of the frame of the current stage, among the first effective group calculating a first average value that is an average value of color difference signals of ; (c-2) calculating a second average value that is an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a second distance from the first average value among the first effective group; ; (c-3) one of a plurality of color correction matrices stored in advance using the second average value is selected, and the color correction matrix selected for all divided regions having an average color difference signal within the second distance from the first average value calculating an R sum value that is a sum of R pixel values, a G sum value that is a sum of G pixel values, and a B sum value that is a sum value of the B pixel values; and (c-4) from the R summation value, the B summation value, and the G summation value, an R correction value for correcting the R pixel, a G correction value for correcting the G pixel, and a B correction for correcting the B pixel. calculating a value, and correcting the selected color correction matrix using the R correction value, the G correction value, and the B correction value.
구체적으로, 상기 R 보정값은, 상기 G 합산값으로 상기 R 합산값을 나눈 값이고, 상기 B 보정값은, 상기 G 합산값으로 상기 B 합산값을 나눈 값인 것을 특징으로 한다.Specifically, the R correction value is a value obtained by dividing the R sum value by the G sum value, and the B correction value is a value obtained by dividing the B sum value by the G sum value.
아울러, 본 발명의 영상 처리 방법은, (d) 상기 (c) 단계에 의해 보정된 색보정 매트릭스를 현재 단계의 프레임에 적용한 영상을 출력하는 단계;를 더 포함하는 것이 바람직하다.In addition, the image processing method of the present invention preferably further includes (d) outputting an image in which the color correction matrix corrected by the step (c) is applied to the frame of the current stage.
본 발명의 자동 화이트 밸런스를 위한 처리 방법 및 그 처리 장치에 따르면, 은 움직임이 있는 분할 영역을 제외한 일부의 분할 영역을 이용하는 것에 의해 자동 화이트 밸런스의 안정성을 도모할 수 있다.According to the processing method for automatic white balance and the processing apparatus of the present invention, the stability of automatic white balance can be achieved by using a part of the divided area except for the divided area with silver movement.
도 1은 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 장치의 구성도.
도 2는 제 1 평균값 산출기 및 제 2 평균값 산출기의 동작 설명도.
도 3은 본 발명에서 제 1 유효 그룹, 제 1 평균값 및 제 2 평균값에 의한 영역의 최종 선택 과정에 대한 설명도.
도 4는 하나의 프레임의 영상에 대한 색차 신호의 컬러맵 상의 분포도.
도 5는 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 방법의 흐름도.1 is a block diagram of an image processing apparatus for automatic white balance according to a preferred embodiment of the present invention;
Fig. 2 is an explanatory diagram of the operation of a first average value calculator and a second average value calculator;
3 is an explanatory diagram of a final selection process of a region by a first effective group, a first average value, and a second average value in the present invention;
4 is a distribution diagram of a color difference signal for an image of one frame on a color map;
5 is a flowchart of an image processing method for automatic white balance according to an exemplary embodiment of the present invention.
이하, 첨부된 도면을 참조하면서 본 발명의 실시예들에 따른 자동 화이트 밸런스를 위한 영상 처리 장치 및 그 처리 방법에 대해 상세히 설명하기로 한다. 본 발명의 하기의 실시예들은 본 발명을 구체화하기 위한 것일 뿐 본 발명의 권리 범위를 제한하거나 한정하는 것이 아님은 물론이다. 본 발명의 상세한 설명 및 실시예들로부터 본 발명이 속하는 기술 분야의 전문가가 용이하게 유추할 수 있는 것은 본 발명의 권리 범위에 속하는 것으로 해석된다.Hereinafter, an image processing apparatus for automatic white balance and a processing method thereof according to embodiments of the present invention will be described in detail with reference to the accompanying drawings. Of course, the following examples of the present invention are not intended to limit or limit the scope of the present invention only to embody the present invention. What an expert in the technical field to which the present invention pertains can easily infer from the detailed description and embodiments of the present invention is construed as belonging to the scope of the present invention.
먼저, 도 1은 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 장치(100)의 구성도를 나타낸다. 본 발명의 자동 화이트 밸런스를 위한 영상 처리 장치(100)는, 프로세서를 포함한 컴퓨팅 장치의 형태로 구현될 수 있다.First, FIG. 1 is a block diagram of an
도 1로부터 알 수 있는 바와 같이 본 발명의 자동 화이트 밸런스를 위한 영상 처리 장치(100)는, 색차 신호 산출부(10), 제 1 유효 그룹 추출부(20), 색보정 매트릭스 보정부(30) 및 영상 출력부(40)를 포함한다.As can be seen from FIG. 1 , the
색차 신호 산출부(10)는, 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호를 산출하는 역할을 한다. 구체적으로, 색차 신호 산출부(10)는 현재 단계의 프레임의 전체 영역을 구성하는 화소들의 색차 신호의 평균값을 산출하고, 다수의 분할 영역 각각에 대해 각 분할 영역을 구성하는 화소들의 색차 신호의 평균값을 산출하는 것이 바람직하다. 분할 영역이라는 것은, 하나의 프레임을 전체 영역이라고 할 때, 하나의 프레임을 일정한 크기로 나눈 각각의 영역을 이른다.The color difference
YCbCr 좌표계를 사용할 경우, 휘도 신호(Y)와 색차 신호(Cr, Cb) 두 개로 구성된 영상 신호가 출력된다. 본 발명에서의 색차 신호는, 두개의 색차 신호(Cr, Cb)의 원점으로부터의 좌표에 의해 나타낼 수 있다.When the YCbCr coordinate system is used, an image signal composed of two luminance signals (Y) and color difference signals (Cr, Cb) is output. The color difference signal in the present invention can be expressed by coordinates from the origin of the two color difference signals Cr and Cb.
아울러, 제 1 유효 그룹 추출부(20)는, 현재 단계의 프레임의 다수의 분할 영역 중 적어도 일부를 제 1 유효 그룹으로 추출하는 역할을 한다. In addition, the first valid
색보정 매트릭스 보정부(30)는, 색차 신호 산출부(10)에서 산출된 평균 색차 신호 및 제 1 유효 그룹 추출부(20)로부터 추출된 제 1 유효 그룹을 이용하여, 보정된 색보정 매트릭스를 산출한다. The color correction
또한, 영상 출력부(40)는, 색보정 매트릭스 보정부(30)에 의해 보정된 색보정 매트릭스를 현재 단계의 프레임에 적용한 영상을 출력하는 역할을 한다.In addition, the
하기에 제 1 유효 그룹 추출부(20)에 대해 구체적으로 설명하기로 한다.Hereinafter, the first effective
제 1 유효 그룹 추출부(20)는, 현재 단계의 프레임의 다수의 분할 영역 또는 이전 단계의 프레임의 다수의 분할 영역에서의 움직임 정보를 이용하여, 제 1 유효 그룹을 추출하는 역할을 한다. 이를 위해 제 1 유효 그룹 추출부(20)는, 제 1 무효 그룹 추출기(21), 제 2 무효 그룹 추출기(22) 및 제 1 유효 그룹 추출기(23)를 포함하여 구성되는 것이 바람직하다.The first valid
제 1 무효 그룹 추출기(21)는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에서의 해당 움직임의 대상이 현재 단계의 프레임의 해당 분할 영역에서 계속 존재하는 것으로 판단된 경우, 해당 분할 영역을 제 1 무효 그룹으로 추출한다. 구체적으로, 제 1 무효 그룹 추출기(21)는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우; 또는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우; 해당 분할 영역을, 제 1 무효 그룹으로 추출하는 것이 특징으로 한다.The first
이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우에서, 일정 거리는 '0' 인 것이 바람직하다. 즉, 제 1 무효 그룹 추출기(21)는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 동일한 경우; 또는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우; 해당 분할 영역을, 제 1 무효 그룹으로 추출하는 것이 바람직하다.When the average chrominance signal of the divided region of the frame of the previous stage shows a difference of less than a predetermined distance from the average chrominance signal of the divided region of the frame of the current stage, the predetermined distance is preferably '0'. That is, the first
제 2 무효 그룹 추출기(22)는, 현재 단계의 프레임에서 움직임이 감지된 분할 영역의 경우, 해당 분할 영역을 제 2 무효 그룹으로 추출하는 역할을 한다.The second
제 1 유효 그룹 추출기(23)는, 현재 단계의 프레임의 다수의 분할 영역으로부터 제 1 무효 그룹 및 제 2 무효 그룹을 제외한 분할 영역을 제 1 유효 그룹으로 추출하는 역할을 한다. 제 1 무효 그룹 및 제 2 무효 그룹은 0개 이상의 분할 영역을 포함할 수 있고, 제 1 유효 그룹은 1개 이상의 분할 영역을 포함할 수 있다.The first
하기에 색보정 매트릭스 보정부(30)에 대해 구체적으로 설명하기로 한다.Hereinafter, the color
색보정 매트릭스 보정부(30)는, 제 1 평균값 산출기(31), 제 2 평균값 산출기(32), 합산기(33) 및 색보정 매트릭스 보정기(34)를 포함하여 구성되는 것이 바람직하다.The color
도 2는 제 1 평균값 산출기(31) 및 제 2 평균값 산출기(32)의 동작 설명도이다. 2 is an explanatory diagram of the operation of the first
도 2로부터 알 수 있는 바와 같이, 제 1 평균값 산출기(31)는, 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 1 평균값을 산출하는 역할을 한다. 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 분할 영역의 그룹을 제 2 유효 그룹이라 하자. 이때, 제 1 평균값 산출기(31)는, 제 2 유효 그룹에 포함된 분할 영역이 다수 존재하면, 다수의 분할 영역에 포함된 모든 픽셀의 색차 신호의 평균값을 제 1 평균값으로서 산출한다. 제 2 유효 그룹은 1개 이상의 분할 영역을 포함할 수 있다.As can be seen from FIG. 2 , the first
아울러, 제 2 평균값 산출기(32)는, 제 1 유효 그룹 중, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 2 평균값을 산출하는 역할을 한다. 제 1 유효 그룹 중, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역을 제 3 유효 그룹이라 하자. 이때, 제 2 평균값 산출기(32)는, 제 3 유효 그룹에 포함된 분할 영역이 다수 존재하면, 다수의 분할 영역에 포함된 모든 픽셀의 색차 신호의 평균값을 제 2 평균값으로서 산출한다. 제 3 유효 그룹은 1개 이상의 분할 영역을 포함할 수 있다.In addition, the second
예를 들면 제 1 거리는 {(전체 분할 영역의 평균 색차 신호 중 최대 평균 색차 신호) - (전체 분할 영역의 평균 색차 신호 중 최소 평균 색차 신호)}의 10%로 정해질 수 있고, 제 2 거리는 {(전체 분할 영역의 평균 색차 신호 중 최대 평균 색차 신호) - (전체 분할 영역의 평균 색차 신호 중 최소 평균 색차 신호)}의 5%로 정해질 수 있을 것이다.For example, the first distance may be set to 10% of {(maximum average color difference signal among average color difference signals of all divided areas) - (minimum average color difference signal among average color difference signals of all divided areas)}, and the second distance may be { (maximum average chrominance signal among average chrominance signals of all divided regions) - (minimum average chrominance signal among average chrominance signals of all divided regions)}.
제 1 평균값 및 제 2 평균값과 같이, 평균 색차 신호를 구하는 이유는 이 정보가 색보정 매트릭스를 찾는 지표로 활용되기 때문이다. 따라서 적합한 색차 신호를 구하면 현 영상에 적합한 색보정 매트릭스를 찾을 수 있고, 최종적으로 색 재현성이 높아진다. 이를 위해 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 분할 영역을 1차 군집화한 제 2 유효 그룹으로부터 제 1 평균값을 산출하고, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 분할 영역을 2차 군집화한 제 3 유효 그룹으로부터 제 2 평균값을 산출하는 것이다.Like the first average value and the second average value, the reason for obtaining the average color difference signal is that this information is used as an index for finding the color correction matrix. Therefore, if a suitable color difference signal is obtained, a color correction matrix suitable for the current image can be found, and finally, color reproducibility is improved. To this end, a first average value is calculated from a second effective group obtained by first clustering divided regions having an average color difference signal within a first distance from the average color difference signal of the current frame, and an average within a second distance from the first average value. A second average value is calculated from a third effective group obtained by secondary clustering of the divided regions having the color difference signal.
또한, 합산기(33)는, 제 2 평균값을 이용하여 미리 저장된 다수의 색보정 매트릭스 중 하나를 선택한다. 즉, 합산기(33)는, 제 2 평균값의 값에 따라 매칭되는 색보정 매트릭스를 선택할 수 있다. Also, the
색보정 매트릭스를 라고 할때, 입력된 R(Red) 픽셀(Rin), G(Green) 픽셀(Gin) 및 B(Blue) 픽셀(Bin)은 다음의 [수학식 1]과 같이 출력(Rout, Gout, Bout)될 수 있다.color correction matrix , the input R (Red) pixel (Rin), G (Green) pixel (Gin), and B (Blue) pixel (Bin) are output (Rout, Gout, Bout) as in the following [Equation 1] can be
아울러, 합산기(33)는, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 각각 산출하는 역할을 한다. 즉, 합산기(33)는, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후, 모든 분할 영역의 R 픽셀값, G 픽셀값 및 B 픽셀값을 합산한다. In addition, the
R 합산값, G 합산값, B 합산값을 산출하는 이유는 자동 화이트 밸런스의 궁극적인 목표인 백색을 재현하기 위해서, R 픽셀, G 픽셀, B 픽셀에 대해 보정의 정도를 균일화하기 위한 목적이다. The reason for calculating the sum of R, G, and B is to equalize the degree of correction for R, G, and B pixels in order to reproduce white, which is the ultimate goal of automatic white balance.
색보정 매트릭스 보정기(34)는, R 합산값, B 합산값 및 G 합산값으로부터, R 픽셀의 보정을 위한 R 보정값, G 픽셀의 보정을 위한 G 보정값 및 B 픽셀의 보정을 위한 B 보정값을 산출한다. 아울러, 색보정 매트릭스 보정기(34)는, R 보정값, G 보정값 및 B 보정값을 이용하여 선택된 색보정 매트릭스를 보정하는 역할을 한다. 구체적으로, R 보정값은, G 합산값으로 R 합산값을 나눈 값이다, 아울러, G 보정값은, G 합산값으로 G 합산값을 나눈 값으로 '1'이 된다. 또한, B 보정값은, G 합산값으로 B 합산값을 나눈 값이다. 아울러, R 보정값, G 보정값 및 B 보정값은, 색보정 매트릭스의 보정 계수로서 이용되게 된다. The color
도 3은 본 발명에서 제 1 유효 그룹, 제 1 평균값 및 제 2 평균값에 의한 영역의 최종 선택 과정에 대한 설명도이다.3 is an explanatory diagram of a final selection process of a region by a first effective group, a first average value, and a second average value in the present invention.
도 3에 의해 본 발명의 영상 처리 장치(100)의 전체적인 동작에 대해 설명하기로 한다.An overall operation of the
일단 전체 영역에서 제 1 유효 그룹 추출부(20)에서 추출된 제 1 무효 그룹 및 제 2 무효 그룹을 제외하여 1차적으로 제 1 유효 그룹을 추출한다. 다음으로, 제 1 유효 그룹 중 제 1 평균값 및 제 2 평균값에 의해 최종 분할 영역인 제 3 유효 그룹을 선정하게 된다.First, the first valid group is primarily extracted from the entire area except for the first invalid group and the second invalid group extracted by the first valid
색보정 매트릭스 보정기(34)는, 제 3 유효 그룹의 모든 분할 영역에 대해 각각 색보정 매트릭스를 적용하고, 색보정 매트릭스의 적용후의 제 3 유효 그룹의 모든 분할 영역의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 산출하게 된다. 다음으로, R 합산값, B 합산값 및 G 합산값을 이용하여, R 보정값, G 보정값 및 B 보정값을 산출하게 된다.The color
만약 색보정 매트릭스를 라고 하고, R 보정값, G 보정값 및 B 보정값을 각각 Ra, Ga 및 Ba라고 할때, 최종적으로 보정된 매트릭스는 로 나타낼 수 있다. If the color correction matrix When the R correction value, G correction value, and B correction value are Ra, Ga and Ba, respectively, the finally corrected matrix is can be expressed as
여기서, K11, K12, K13는 R 픽셀을 위한 계수이고, K21, K22, K23는 G 픽셀을 위한 계수이고, K31, K32, K33는 B 픽셀을 위한 계수이다.Here, K 11 , K 12 , and K 13 are coefficients for the R pixel, K 21 , K 22 , and K 23 are coefficients for the G pixel, and K 31 , K 32 , and K 33 are coefficients for the B pixel.
도 4는 하나의 프레임의 영상에 대한 색차 신호의 컬러맵 상의 분포도를 나타낸다.4 is a diagram illustrating a distribution on a color map of a color difference signal for an image of one frame.
도 4의 분포도로부터 알 수 있는 바와 같이, 하나의 프레임에 포함된 전체 분할 영역의 평균 색차 신호는 큰 분산을 나타내는 데, 이중 제 1 무효 그룹 및 제 2 무효 그룹에 속한 분할 영역이 제외되고, 1차 군집화 및 2차 군집화를 실시하고, 2차 군집화에 의한 제 3 유효 그룹에 의해 제 2 평균값을 산출하게 된다.As can be seen from the distribution diagram of FIG. 4 , the average color difference signal of all divided regions included in one frame shows a large variance, of which divided regions belonging to the first invalid group and the second invalid group are excluded, and 1 Secondary clustering and secondary clustering are performed, and a second average value is calculated based on the third effective group by secondary clustering.
도 5는 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 방법의 흐름도를 나타낸다. 도 5의 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 방법은, 상술한 본 발명의 자동 화이트 밸런스를 위한 영상 처리 장치(100)를 이용하므로, 별도의 설명이 없더라도 본 발명의 자동 화이트 밸런스를 위한 영상 처리 장치(100)의 모든 특징을 포함하고 있음은 물론이다.5 is a flowchart of an image processing method for automatic white balance according to an exemplary embodiment of the present invention. The image processing method for automatic white balance according to the preferred embodiment of the present invention shown in FIG. 5 uses the
구체적으로 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 방법은 프로세서에 의해 실시되는 컴퓨터 프로그램의 형태로 구현될 수 있다.Specifically, the image processing method for automatic white balance according to an exemplary embodiment of the present invention may be implemented in the form of a computer program executed by a processor.
도 5로부터 알 수 있는 바와 같이, 본 발명의 바람직한 일실시예에 따른 자동 화이트 밸런스를 위한 영상 처리 방법은, 현재 단계의 프레임의 전체 영역 및 다수의 분할 영역 각각에 대한 평균 색차 신호를 산출하는 단계(S10); 현재 단계의 프레임의 다수의 분할 영역 중 적어도 일부를 제 1 유효 그룹으로 추출하는 단계(S20); S10 단계에서 산출된 평균 색차 신호 및 S20 단계로부터 추출된 제 1 유효 그룹을 이용하여, 보정된 색보정 매트릭스를 산출하는 단계(S30); 및 S30 단계에 의해 보정된 색보정 매트릭스를 현재 단계의 프레임에 적용한 영상을 출력하는 단계(S40);를 포함한다.As can be seen from FIG. 5 , the image processing method for automatic white balance according to an exemplary embodiment of the present invention includes calculating an average color difference signal for the entire region of the current frame and each of a plurality of divided regions. (S10); extracting at least a portion of a plurality of divided regions of the frame of the current stage as a first valid group (S20); calculating a corrected color correction matrix using the average color difference signal calculated in step S10 and the first effective group extracted from step S20 (S30); and outputting an image in which the color correction matrix corrected in step S30 is applied to the frame of the current step (S40).
S20 단계는, 현재 단계의 프레임의 다수의 분할 영역 또는 이전 단계의 프레임의 다수의 분할 영역에서의 움직임 정보를 이용하여, 제 1 유효 그룹을 추출하는 것을 특징으로 한다.Step S20 is characterized in that the first valid group is extracted by using motion information in the plurality of divided regions of the frame of the current stage or the plurality of divided regions of the frame of the previous stage.
구체적으로 S20 단계는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에서의 해당 움직임의 대상이 현재 단계의 프레임의 해당 분할 영역에서 계속 존재하는 것으로 판단된 경우, 해당 분할 영역을 제 1 무효 그룹으로 추출하는 단계(S21); 현재 단계의 프레임에서 움직임이 감지된 분할 영역의 경우, 해당 분할 영역을 제 2 무효 그룹으로 추출하는 단계(S22); 및 현재 단계의 프레임의 다수의 분할 영역으로부터 제 1 무효 그룹 및 제 2 무효 그룹을 제외한 분할 영역을 제 1 유효 그룹으로 추출하는 단계(S23);를 포함한다.Specifically, in step S20, when it is determined that the object of the corresponding motion in the divided area in which the motion is detected in the frame of the previous step continues to exist in the corresponding divided area of the frame of the current step, the divided area is set to the first invalid group. extracting (S21); In the case of a divided region in which motion is detected in the frame of the current stage, extracting the divided region as a second invalid group (S22); and extracting, as a first valid group, a partitioned area excluding the first invalid group and the second invalid group from the plurality of partitioned areas of the frame of the current stage (S23).
또한, S21 단계는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우; 또는, 이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우; 해당 분할 영역을, 제 1 무효 그룹으로 추출하는 것이 바람직하다.Also, in step S21, for the divided region in which motion is detected in the frame of the previous stage, the average color difference signal of the divided region of the current frame is less than a certain distance from the average color difference signal of the divided region of the frame of the previous stage. If a difference is indicated; Alternatively, in the case in which, with respect to the divided region in which motion is detected in the frame of the previous stage, no motion is detected to move out of the corresponding divided region of the frame of the current stage; It is preferable to extract the divided area as the first invalid group.
아울러 S30 단계는, 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 1 평균값을 산출하는 단계(S31); 제 1 유효 그룹 중, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 2 평균값을 산출하는 단계(S32); 제 2 평균값을 이용하여 미리 저장된 다수의 색보정 매트릭스 중 하나를 선택하고, 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 산출하는 단계(S33); 및 R 합산값, B 합산값 및 G 합산값으로부터, R 픽셀의 보정을 위한 R 보정값, G 픽셀의 보정을 위한 G 보정값 및 B 픽셀의 보정을 위한 B 보정값을 산출하고, R 보정값, G 보정값 및 B 보정값을 이용하여 선택된 색보정 매트릭스를 보정하는 단계(S34);를 포함하는 것을 특징으로 한다.In addition, in step S30, a first average value, which is an average value of color difference signals of all pixels included in at least one divided area having an average color difference signal within a first distance from the average color difference signal of the frame of the current stage, among the first valid group, is obtained. calculating (S31); calculating a second average value that is an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a second distance from the first average value among the first effective group (S32); The sum of R pixel values after selecting one of a plurality of pre-stored color correction matrices using the second average value, and applying the selected color correction matrix to all divided regions having an average color difference signal within a second distance from the first average value calculating a sum of R as a value, a G sum as a sum of G pixel values, and a B sum as a sum of B pixel values (S33); and an R correction value for correcting the R pixel, a G correction value for correcting the G pixel, and a B correction value for correcting the B pixel from the R summation value, the B summation value and the G sum value, and calculating the R correction value , correcting the selected color correction matrix using the G correction value and the B correction value (S34).
구체적으로, 구체적으로, R 보정값은, G 합산값으로 R 합산값을 나눈 값이다, 아울러, G 보정값은, G 합산값으로 G 합산값을 나눈 값으로 '1'이 된다. 또한, B 보정값은, G 합산값으로 B 합산값을 나눈 값이다. 아울러, R 보정값, G 보정값 및 B 보정값은, 색보정 매트릭스의 보정 계수로서 이용되게 된다. Specifically, specifically, the R correction value is a value obtained by dividing the R sum value by the G sum value. In addition, the G correction value is a value obtained by dividing the G sum value by the G sum value and becomes '1'. In addition, the B correction value is the value which divided the B summation value by the G summation value. In addition, the R correction value, the G correction value, and the B correction value are used as correction coefficients of the color correction matrix.
본 발명의 자동 화이트 밸런스를 위한 처리 방법 및 그 처리 장치에 따르면, 은 움직임이 있는 분할 영역을 제외한 일부의 분할 영역을 이용하는 것에 의해 자동 화이트 밸런스의 안정성이 확보될 수 있음을 알 수 있다.It can be seen that, according to the processing method for automatic white balance and the processing apparatus of the present invention, the stability of the automatic white balance can be secured by using a partial divided area except for the divided area in which silver is moved.
100 : 영상 처리 장치
10 : 색차 신호 산출부 20 : 제 1 유효 그룹 추출부
30 : 색보정 매트릭스 보정부 40 : 영상 출력부
21 : 제 1 무효 그룹 추출기 22 : 제 2 무효 그룹 추출기
23 : 제 1 유효 그룹 추출기 31 : 제 1 평균값 산출기
32 : 제 2 평균값 산출기 33 : 합산기
34 : 색보정 매트릭스 보정기100: image processing device
10: color difference signal calculation unit 20: first effective group extraction unit
30: color correction matrix correction unit 40: image output unit
21: first invalid group extractor 22: second invalid group extractor
23: first effective group extractor 31: first average value calculator
32: second average value calculator 33: summer
34: color correction matrix corrector
Claims (18)
이전 단계의 프레임에서 움직임이 감지된 분할 영역에서의 해당 움직임의 대상이 현재 단계의 프레임의 해당 분할 영역에서 계속 존재하는 것으로 판단된 경우, 해당 분할 영역을 제 1 무효 그룹으로 추출하는 제 1 무효 그룹 추출기;
현재 단계의 프레임에서 움직임이 감지된 분할 영역의 경우, 해당 분할 영역을 제 2 무효 그룹으로 추출하는 제 2 무효 그룹 추출기;
현재 단계의 프레임의 다수의 분할 영역으로부터 상기 제 1 무효 그룹 및 상기 제 2 무효 그룹을 제외한 분할 영역을, 제 1 유효 그룹으로 추출하는 제 1 유효 그룹 추출기;
상기 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 1 평균값을 산출하는, 제 1 평균값 산출기;
상기 제 1 유효 그룹 중, 상기 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 2 평균값을 산출하는, 제 2 평균값 산출기;
상기 제 2 평균값을 이용하여 미리 저장된 다수의 색보정 매트릭스 중 하나를 선택하고, 상기 제 1 평균값으로부터 상기 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 산출하는 합산기;
상기 R 합산값, 상기 B 합산값 및 상기 G 합산값으로부터, R 픽셀의 보정을 위한 R 보정값, G 픽셀의 보정을 위한 G 보정값 및 B 픽셀의 보정을 위한 B 보정값을 산출하고, 상기 R 보정값, 상기 G 보정값 및 상기 B 보정값을 이용하여 선택된 색보정 매트릭스를 보정하는 색보정 매트릭스 보정기; 및
상기 색보정 매트릭스 보정기에 의해 보정된 색보정 매트릭스를 현재 단계의 프레임에 적용한 영상을 출력하는 영상 출력부;를 포함하는 것을 특징으로 하는 영상 처리 장치.In the image processing apparatus,
When it is determined that the object of the corresponding motion in the divided area in which the motion is detected in the frame of the previous step continues to exist in the corresponding divided area of the frame of the current step, the first invalid group extracts the divided area as the first invalid group extractor;
a second invalid group extractor for extracting the divided region as a second invalid group in the case of a divided region in which motion is detected in the frame of the current stage;
a first valid group extractor for extracting, as a first valid group, a partitioned area excluding the first invalid group and the second invalid group from a plurality of partitioned areas of the frame of the current stage;
calculating a first average value, which is an average value of color difference signals of all pixels included in at least one divided area having an average color difference signal within a first distance from the average color difference signal of a frame of a current stage, among the first effective group; 1 averaging calculator;
a second average value calculator configured to calculate a second average value that is an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a second distance from the first average value among the first effective group ;
R pixel after selecting one of a plurality of color correction matrices stored in advance using the second average value and applying the selected color correction matrix to all divided regions having an average color difference signal within the second distance from the first average value a summer for calculating an R sum value that is a sum of values, a G sum value that is a sum of G pixel values, and a B sum value that is a sum of the B pixel values;
calculating an R correction value for correcting the R pixel, a G correction value for correcting the G pixel, and a B correction value for correcting the B pixel from the R sum value, the B sum value, and the G sum value; a color correction matrix corrector for correcting a selected color correction matrix using the R correction value, the G correction value, and the B correction value; and
and an image output unit outputting an image obtained by applying the color correction matrix corrected by the color correction matrix corrector to the frame of the current stage.
상기 제 1 무효 그룹 추출기는,
이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우; 또는,
이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우;
해당 분할 영역을, 상기 제 1 무효 그룹으로 추출하는 것을 특징으로 하는 영상 처리 장치.4. The method of claim 3,
The first invalid group extractor,
When the average color difference signal of the divided region of the current frame shows a difference of less than a certain distance from the average color difference signal of the corresponding divided region of the frame of the previous stage with respect to the divided region in which motion is detected in the frame of the previous stage; or,
When no motion is detected with respect to the divided region in which motion is detected in the frame of the previous stage, moving out of the corresponding divided region of the frame of the current stage;
The image processing apparatus, characterized in that the divided region is extracted as the first invalid group.
상기 R 보정값은,
상기 G 합산값으로 상기 R 합산값을 나눈 값이고,
상기 B 보정값은,
상기 G 합산값으로 상기 B 합산값을 나눈 값인 것을 특징으로 하는 영상 처리 장치.4. The method of claim 3,
The R correction value is,
It is a value obtained by dividing the sum of R by the sum of G,
The B correction value is,
The image processing apparatus, characterized in that it is a value obtained by dividing the sum of B by the sum of G.
(b-1) 이전 단계의 프레임에서 움직임이 감지된 분할 영역에서의 해당 움직임의 대상이 현재 단계의 프레임의 해당 분할 영역에서 계속 존재하는 것으로 판단된 경우, 해당 분할 영역을 제 1 무효 그룹으로 추출하는 단계;
(b-2) 현재 단계의 프레임에서 움직임이 감지된 분할 영역의 경우, 해당 분할 영역을 제 2 무효 그룹으로 추출하는 단계;
(b-3) 현재 단계의 프레임의 다수의 분할 영역으로부터 상기 제 1 무효 그룹 및 상기 제 2 무효 그룹을 제외한 분할 영역을, 제 1 유효 그룹으로 추출하는 단계;
(c-1) 상기 제 1 유효 그룹 중, 현재 단계의 프레임의 평균 색차 신호로부터 제 1 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 1 평균값을 산출하는 단계;
(c-2) 상기 제 1 유효 그룹 중, 상기 제 1 평균값으로부터 제 2 거리 이내의 평균 색차 신호를 갖는 적어도 하나의 분할 영역에 포함된 모든 화소의 색차 신호의 평균값인 제 2 평균값을 산출하는 단계;
(c-3) 상기 제 2 평균값을 이용하여 미리 저장된 다수의 색보정 매트릭스 중 하나를 선택하고, 상기 제 1 평균값으로부터 상기 제 2 거리 이내의 평균 색차 신호를 갖는 모든 분할 영역에 대해 선택된 색보정 매트릭스를 적용한 후의 R 픽셀값의 합산값인 R 합산값, G 픽셀값의 합산값인 G 합산값 및 B 픽셀값의 합산값인 B 합산값을 산출하는 단계;
(c-4) 상기 R 합산값, 상기 B 합산값 및 상기 G 합산값으로부터, R 픽셀의 보정을 위한 R 보정값, G 픽셀의 보정을 위한 G 보정값 및 B 픽셀의 보정을 위한 B 보정값을 산출하고, 상기 R 보정값, 상기 G 보정값 및 상기 B 보정값을 이용하여 선택된 색보정 매트릭스를 보정하는 단계;
(d) 상기 (c-4) 단계에 의해 보정된 색보정 매트릭스를 현재 단계의 프레임에 적용한 영상을 출력하는 단계;를 포함하는 것을 특징으로 하는 영상 처리 방법.In the image processing method,
(b-1) When it is determined that the object of the corresponding motion in the divided area in which the motion is detected in the frame of the previous step continues to exist in the corresponding divided area of the frame of the current step, the divided area is extracted as the first invalid group to do;
(b-2) in the case of a divided region in which motion is detected in the frame of the current stage, extracting the divided region as a second invalid group;
(b-3) extracting, as a first valid group, a partitioned area excluding the first invalid group and the second invalid group from a plurality of partitioned areas of the frame of the current stage;
(c-1) a first average value that is an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a first distance from the average color difference signal of the frame of the current stage, among the first effective group calculating ;
(c-2) calculating a second average value, which is an average value of color difference signals of all pixels included in at least one divided region having an average color difference signal within a second distance from the first average value, among the first effective group; ;
(c-3) selecting one of a plurality of pre-stored color correction matrices using the second average value, and selecting the color correction matrix for all divided regions having an average color difference signal within the second distance from the first average value calculating an R sum value that is a sum of R pixel values, a G sum value that is a sum of G pixel values, and a B sum value that is a sum value of the B pixel values;
(c-4) from the R summation value, the B summation value, and the G summation value, an R correction value for correcting the R pixel, a G correction value for correcting the G pixel, and a B correction value for correcting the B pixel calculating and correcting a selected color correction matrix using the R correction value, the G correction value, and the B correction value;
(d) outputting an image obtained by applying the color correction matrix corrected in the step (c-4) to the frame of the current stage;
상기 (b-1) 단계는,
이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 이전 단계의 프레임의 해당 분할 영역의 평균 색차 신호로부터 현재 단계의 프레임의 해당 분할 영역의 평균 색차 신호가 일정 거리 이하의 차이를 나타낸 경우; 또는,
이전 단계의 프레임에서 움직임이 감지된 분할 영역에 대해, 현재 단계의 프레임의 해당 분할 영역 밖으로 이동하는 움직임이 감지되지 않은 경우;
해당 분할 영역을, 상기 제 1 무효 그룹으로 추출하는 것을 특징으로 하는 영상 처리 방법.13. The method of claim 12,
The step (b-1) is,
When the average color difference signal of the divided region of the current frame shows a difference of less than a certain distance from the average color difference signal of the corresponding divided region of the frame of the previous stage with respect to the divided region in which motion is detected in the frame of the previous stage; or,
When no motion is detected with respect to the divided region in which motion is detected in the frame of the previous stage, moving out of the corresponding divided region of the frame of the current stage;
The image processing method, characterized in that the divided region is extracted as the first invalid group.
상기 R 보정값은,
상기 G 합산값으로 상기 R 합산값을 나눈 값이고,
상기 B 보정값은,
상기 G 합산값으로 상기 B 합산값을 나눈 값인 것을 특징으로 하는 영상 처리 방법.13. The method of claim 12,
The R correction value is,
It is a value obtained by dividing the sum of R by the sum of G,
The B correction value is,
The image processing method, characterized in that it is a value obtained by dividing the sum of B by the sum of G.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190103438A KR102315200B1 (en) | 2019-08-23 | 2019-08-23 | Image processing apparatus for auto white balance and processing method therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190103438A KR102315200B1 (en) | 2019-08-23 | 2019-08-23 | Image processing apparatus for auto white balance and processing method therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20210023349A KR20210023349A (en) | 2021-03-04 |
KR102315200B1 true KR102315200B1 (en) | 2021-10-22 |
Family
ID=75174540
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190103438A KR102315200B1 (en) | 2019-08-23 | 2019-08-23 | Image processing apparatus for auto white balance and processing method therefor |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102315200B1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009010814A (en) * | 2007-06-29 | 2009-01-15 | Fujifilm Corp | Image processing device and method, and program, and imaging apparatus and method, and program |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100855470B1 (en) * | 2006-09-28 | 2008-09-01 | 삼성전자주식회사 | Method and apparatus for estimating illuminant of an image |
-
2019
- 2019-08-23 KR KR1020190103438A patent/KR102315200B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009010814A (en) * | 2007-06-29 | 2009-01-15 | Fujifilm Corp | Image processing device and method, and program, and imaging apparatus and method, and program |
Also Published As
Publication number | Publication date |
---|---|
KR20210023349A (en) | 2021-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8164649B2 (en) | White balance adjusting device, imaging apparatus, and recording medium storing white balance adjusting program | |
KR100983037B1 (en) | Method for controlling auto white balance | |
CN112752023B (en) | Image adjusting method and device, electronic equipment and storage medium | |
US20070047803A1 (en) | Image processing device with automatic white balance | |
JP5205007B2 (en) | Light source estimation method and apparatus | |
US10521887B2 (en) | Image processing device and image processing method | |
CN107341767B (en) | Image correction method and device | |
KR20070113890A (en) | Method and apparatus for auto white balancing | |
CN112887693B (en) | Image purple border elimination method, equipment and storage medium | |
CN111163301B (en) | Color adjustment method, device and computer readable storage medium | |
US8482630B2 (en) | Apparatus and method for adjusting automatic white balance by detecting effective area | |
KR101854432B1 (en) | Method and apparatus for detecting and compensating back light frame | |
CN108833875B (en) | Automatic white balance correction method | |
JP5378282B2 (en) | Purple fringe correction device, control method thereof, and program for correcting purple fringe | |
JP3510040B2 (en) | Image processing method | |
US20100150439A1 (en) | Apparatus and method for adjusting auto white balance using effective area | |
KR102315200B1 (en) | Image processing apparatus for auto white balance and processing method therefor | |
CN113099191B (en) | Image processing method and device | |
KR20110017274A (en) | Method for correcting image | |
KR102301924B1 (en) | Shadow reconstruction method using multi-scale gamma correction | |
CN114511461A (en) | Image processing method, electronic device, and computer-readable storage medium | |
KR101131109B1 (en) | Auto white balance setting method by white detection considering sensor characteristic | |
KR101143834B1 (en) | Aparatus and metod for controlling auto white balance | |
CN112637573A (en) | Multi-lens switching display method and system, intelligent terminal and storage medium | |
EP2209298A1 (en) | Method for adjusting white balance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E90F | Notification of reason for final refusal | ||
E701 | Decision to grant or registration of patent right |