KR20140139742A - Method and apparatus for processing image including for area - Google Patents
Method and apparatus for processing image including for area Download PDFInfo
- Publication number
- KR20140139742A KR20140139742A KR20130060159A KR20130060159A KR20140139742A KR 20140139742 A KR20140139742 A KR 20140139742A KR 20130060159 A KR20130060159 A KR 20130060159A KR 20130060159 A KR20130060159 A KR 20130060159A KR 20140139742 A KR20140139742 A KR 20140139742A
- Authority
- KR
- South Korea
- Prior art keywords
- luminance value
- image
- sub
- input image
- histogram
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/44—Receiver circuitry for the reception of television signals according to analogue transmission standards
- H04N5/57—Control of contrast or brightness
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Image Processing (AREA)
Abstract
Description
본 발명은 영상 처리 방법 및 장치에 관한 것으로, 보다 상세하게는 안개 영역을 포함하는 영상을 처리하는 방법 및 장치에 관한 것이다.
The present invention relates to an image processing method and apparatus, and more particularly, to a method and apparatus for processing an image including a fog area.
대기 또는 기후적인 영향에 의한 카메라 영상의 화질 저하는 빛의 산란에 원인이 있다. 대기 입자나 안개 입자에 의해 빛이 산란되면서 발생한 새로운 빛을 대기 산란광(Airlight)이라 한다. 대기 산란광은 카메라의 센서에 입사되는 빛의 휘도에 영향을 주어 영상의 화질 저하를 야기한다. The degradation of the camera image due to atmospheric or climatic influences is caused by light scattering. New light generated by light scattering by atmospheric or fog particles is called air light. The atmospheric scattering light affects the brightness of the light incident on the sensor of the camera, which causes the image quality to deteriorate.
대기 산란 현상에 따른 대기 산란광을 추정하고, 이 결과를 역으로 이용하여 산란되기 전의 휘도를 추정함으로써, 대기 산란광에 의한 안개 왜곡을 보정할 수 있다. 대기 산란광은 밝은 휘도로 구성되고 거리에 따라 달라진다는 특징이 있는데, 이러한 특징을 이용하여 국부 연산을 수행하고, 픽셀 별로 평가를 하여 대기 산란광을 추정한다. 이러한 평가 방법 중 하나는 영상 내의 낮은 휘도를 갖는 픽셀를 평가하여 산란광을 추정하는 암광 확률 분포(Dark prior)방법이다.By estimating the atmospheric scattering light due to the atmospheric scattering phenomenon and using this result in reverse to estimate the brightness before scattering, the fog distortion caused by the atmospheric scattering light can be corrected. The atmospheric scattering light is composed of bright luminance and is characterized by its distance. By using this feature, local calculation is performed and the scattered light of the air is estimated by pixel evaluation. One of these evaluation methods is a dark prior method of estimating scattered light by evaluating pixels having low luminance in the image.
또 다른 평가 방법으로는 반사성분 추정 방법인 레티넥스(Retinex) 방법이 있다. 레티넥스 방법은 영상을 반사 성분(Reflectance)과 조명 성분(Illuminance)으로 분리하는 방법이다. 여기서 대기 산란광을 조명 성분으로 가정하고, 분리된 객체 정보(반사 성분)와 대기 산란광(조명 성분)을 적절히 조절하여 안개 왜곡 보정 영상을 얻는다.Another method of evaluation is the Retinex method, which is a reflection component estimation method. The Retinex method is a method of separating an image into a reflection component and an illumination component. Here, assuming that the atmospheric scattering light is an illumination component, the fog distortion correction image is obtained by appropriately adjusting the separated object information (reflection component) and atmospheric scattering light (illumination component).
한편, 대기 산란광에 의한 화질 저하는 영상의 대비 저하와 유사하기 때문에 영상의 대비를 개선함으로써 안개 영역에 의한 왜곡을 보정할 수 있다. 이러한 대비 개선 방법 중 하나가 히스토그램 평활화(Histogram equalization) 기법이다. 히스토그램 평활화 기법에서는 영상 내의 편향된 휘도 성분들을 적절하게 분배함으로써 영상의 대비 개선을 수행한다. 이러한 기법은 산란광 추정 방법에 비해 단순하고, 자연스러운 영상을 얻을 수 있다는 장점을 갖는다.On the other hand, image degradation due to atmospheric scattering light is similar to contrast degradation of an image, so distortion caused by the fog area can be corrected by improving the contrast of the image. One of these contrast enhancement methods is the histogram equalization technique. The histogram smoothing technique improves the contrast of images by appropriately distributing the deflected luminance components in the image. This technique has the merit of obtaining a simple and natural image compared to the scattered light estimation method.
안개 왜곡 보정을 위한 종래 기술들은 주로 국부 연산을 사용하기 때문에, 하드웨어 구성에 있어서 라인 메모리(line memory)의 사용이 필수적이다. 또한 안개 영역 내의 객체 정보를 과도하게 부각시킴으로 인해 영상이 부자연스럽고, 색상 왜곡 등의 문제가 발생하므로 후처리 기능이 추가적으로 요구된다. Since conventional techniques for fog distortion correction mainly use local operations, the use of line memory in hardware configuration is essential. Also, since the object information in the fog area is excessively emphasized, the image is unnatural, and color distortion and the like are generated. Therefore, a post-processing function is further required.
대비 개선 방법의 경우, 영상 내의 안개의 정도가 전체적으로 비슷한 경우에는 적용이 가능하다. 그러나 영상 내 안개의 정도가 다른 경우, 휘도 표현력이 0~255로 고정적이기 때문에 영상의 밝은 부분과 어두운 부분이 각각 포화, 비포화 상태가 되므로 대비 개선 방법의 적용이 어렵다.
In the case of the contrast improvement method, it is applicable when the degree of fog in the image is generally similar. However, when the degree of fog in the image is different, since the luminance expressive power is fixed from 0 to 255, the bright and dark portions of the image become saturated and unsaturated, respectively.
본 발명은 기존의 대비 개선 방법이 가지고 있는 적응적 적용에 대한 문제점을 해결할 수 있는 영상 처리 방법 및 장치를 제공하는 것을 일 목적으로 한다.It is an object of the present invention to provide an image processing method and apparatus capable of solving the problems of adaptive application of existing contrast improvement methods.
또한 본 발명은 안개 왜곡 보정을 위한 하드웨어 구현에 있어, 라인 메모리를 사용하지 않음으로써 하드웨어 자원 사용 효율을 높일 수 있는 영상 처리 방법 및 장치를 제공하는 것을 다른 목적으로 한다.Another object of the present invention is to provide an image processing method and apparatus capable of increasing hardware resource utilization efficiency by not using a line memory in hardware implementation for fog distortion correction.
또한 본 발명은 안개 왜곡 보정 후에도 후처리 과정 없이 자연스러운 영상을 출력할 수 있는 영상 처리 방법 및 장치를 제공하는 것을 또 다른 목적으로 한다.It is another object of the present invention to provide an image processing method and apparatus capable of outputting a natural image without post-processing even after correction of fog distortion.
본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.
The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention which are not mentioned can be understood by the following description and more clearly understood by the embodiments of the present invention. It will also be readily apparent that the objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.
이러한 목적을 달성하기 위한 본 발명은 영상 처리 방법에 있어서, 입력 영상의 각 픽셀의 휘도를 획득하는 단계, 상기 입력 영상의 휘도 분배를 나타내는 히스토그램을 생성하는 단계, 상기 히스토그램을 복수 개의 서브 영역으로 분할하는 단계, 상기 복수 개의 서브 영역에 포함된 픽셀 수와 상기 입력 영상의 전체 픽셀 수의 비를 이용하여 상기 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정하는 단계, 상기 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용하는 단계; 및 상기 가중치가 적용된 상기 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an image processing method including the steps of: obtaining luminance of each pixel of an input image; generating a histogram representing a luminance distribution of the input image; dividing the histogram into a plurality of sub- Determining an initial redistribution ratio of each of the plurality of sub regions using the ratio of the number of pixels included in the plurality of sub regions to the total number of pixels of the input image; Applying a weight; And determining a final redistribution ratio by applying a minimum luminance value and a maximum luminance value of the output image to the initial redistribution ratio to which the weight is applied.
또한 본 발명은 영상 처리 장치에 있어서, 입력 영상의 각 픽셀의 휘도를 획득하하고 상기 입력 영상의 휘도 분배를 나타내는 히스토그램을 생성하는 히스토그램 생성부, 상기 히스토그램을 복수 개의 서브 영역으로 분할하는 분할부, 상기 복수 개의 서브 영역에 포함된 픽셀 수와 상기 입력 영상의 전체 픽셀 수의 비를 이용하여 상기 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정하는 제1 연산부, 상기 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용하는 제2 연산부; 및 상기 가중치가 적용된 상기 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정하는 제3 연산부를 포함하는 것을 다른 특징으로 한다.
According to another aspect of the present invention, there is provided an image processing apparatus including a histogram generator for obtaining a luminance of each pixel of an input image and generating a histogram representing a luminance distribution of the input image, a divider for dividing the histogram into a plurality of sub- A first calculation unit for determining an initial redistribution ratio of each of the plurality of sub regions using the ratio of the number of pixels included in the plurality of sub regions to the total number of pixels of the input image, A second arithmetic unit for applying the second arithmetic operation unit; And a third calculator for determining a final redistribution ratio by applying a minimum luminance value and a maximum luminance value of the output image to the initial redistribution ratio to which the weight is applied.
전술한 바와 같은 본 발명에 의하면, 기존의 대비 개선 방법이 가지고 있는 적응적 적용에 대한 문제점을 해결할 수 있는 장점이 있다.According to the present invention as described above, it is possible to solve the problem of the adaptive application of the existing contrast improvement method.
또한 본 발명에 의하면, 안개 왜곡 보정을 위한 하드웨어 구현에 있어, 라인 메모리를 사용하지 않음으로써 하드웨어 자원 사용 효율을 높일 수 있는 장점이 있다.According to the present invention, in hardware implementation for fog distortion correction, there is an advantage that the use efficiency of hardware resources can be improved by not using a line memory.
또한 본 발명에 의하면, 안개 왜곡 보정 후에도 후처리 과정 없이 자연스러운 영상을 출력할 수 있는 장점이 있다.
In addition, according to the present invention, it is possible to output a natural image without post-processing even after correcting fog distortion.
도 1은 본 발명의 일 실시예에 따른 영상 처리 방법의 흐름도.
도 2는 본 발명의 일 실시예에서 생성되는 휘도 값의 히스토그램 및 히스토그램을 복수 개의 서브 영역으로 분할한 그래프.
도 3은 본 발명의 일 실시예에서 휘도 값을 재분배하는 과정을 나타내는 그래프.
도 4는 본 발명의 일 실시예에 따른 영상 처리 장치의 구성도.
도 5는 본 발명에 의한 영상 처리 방법이 적용되기 전의 입력 영상.
도 6은 본 발명에 의한 영상 처리 방법이 적용된 후의 출력 영상.1 is a flowchart of an image processing method according to an embodiment of the present invention;
FIG. 2 is a graph in which a histogram and a histogram of luminance values generated in an embodiment of the present invention are divided into a plurality of sub-areas. FIG.
3 is a graph illustrating a process of redistributing brightness values in an embodiment of the present invention.
4 is a configuration diagram of an image processing apparatus according to an embodiment of the present invention.
5 is an input image before the image processing method according to the present invention is applied.
6 is an output image after the image processing method according to the present invention is applied.
전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.
The above and other objects, features, and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, which are not intended to limit the scope of the present invention. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to denote the same or similar elements.
도 1을 참조하면, 본 발명의 일 실시예에 따른 영상 처리 방법은 입력 영상의 각 픽셀의 휘도를 획득하는 단계(S102), 입력 영상의 휘도 분배를 나타내는 히스토그램을 생성하는 단계(S104), 생성된 히스토그램을 복수 개의 서브 영역으로 분할하는 단계(S106), 복수 개의 서브 영역에 포함된 픽셀 수와 입력 영상의 전체 픽셀 수의 비를 이용하여 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정하는 단계(S108), 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용하는 단계(S110), 가중치가 적용된 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정하는 단계(S112), 히스토그램의 분할 위치 및 최종 재분배 비율을 이용하여 입력 영상의 휘도 값을 재분배하는 단계(S114)를 포함할 수 있다.Referring to FIG. 1, an image processing method according to an exemplary embodiment of the present invention includes a step S102 of obtaining luminance of each pixel of an input image, a step S104 of generating a histogram representing luminance distribution of the input image, Dividing the histogram into a plurality of sub regions (S106), determining an initial redistribution ratio of each of the plurality of sub regions by using the ratio of the number of pixels included in the plurality of sub regions to the total number of pixels of the input image A step S110 of applying a weight considering the fog area to an initial redistribution ratio, a step S112 of determining a final redistribution ratio by applying a minimum luminance value and a maximum luminance value of an output image to an initial redistribution ratio to which a weight is applied, , Redistributing the luminance value of the input image using the split position of the histogram and the final redistribution ratio (S114).
이하에서는 도 2, 도 3을 참조하여 도 1에 나타난 각 단계를 설명한다.
Hereinafter, each step shown in FIG. 1 will be described with reference to FIGS. 2 and 3. FIG.
(1) 휘도 획득 단계(S102) 및 히스토그램 생성 단계(S104)(1) the brightness acquisition step (S102) and the histogram generation step (S104)
먼저 입력 영상에 포함된 각 픽셀의 휘도를 획득한다(S102). 이를 위해 본 발명에서는 먼저 입력 영상의 RGB(Red, Green, Blue) 데이터가 HSV(Hue, Saturation, Value) 데이터로 변환될 수 있다. 이렇게 변환된 HSV 데이터로부터 휘도(Value)가 획득된다.First, the luminance of each pixel included in the input image is acquired (S102). To this end, RGB (Red, Green, Blue) data of the input image may be converted into HSV (Hue, Saturation, Value) data. A value is obtained from the HSV data thus converted.
다음으로, 획득된 각 픽셀의 휘도를 이용하여 입력 영상의 휘도 분배를 나타내는 히스토그램을 생성한다(S104). 히스토그램 생성 단계(S104)에서 생성되는 히스토그램은 [수학식 1]과 같이 표현할 수 있다.
Next, a histogram representing the luminance distribution of the input image is generated using the luminance of each pixel obtained (S104). The histogram generated in the histogram generation step (S104) can be expressed as [Equation 1].
(여기서, ni는 휘도 값 i를 갖는 픽셀 수)
(Where n i is the number of pixels having the luminance value i)
도 2에는 히스토그램 생성 단계(S104)에 의해 생성된 히스토그램의 예시(210)가 나타나 있다. 도 2의 히스토그램(210)의 가로 축은 [수학식 1]의 휘도 값 i를 나타내며, 세로 축은 ni를 나타낸다.
FIG. 2 shows an example 210 of the histogram generated by the histogram generation step (S104). The horizontal axis of the
(2) 히스토그램 분할 단계(S106)(2) Histogram splitting step (S106)
다음으로, 생성된 히스토그램을 복수 개의 서브 영역으로 분할한다(S106). 본 발명의 일 실시예에서는, 단계(S104)를 통해 생성된 히스토그램과 평균 휘도 값을 이용하여 히스토그램을 분할한다. 이 때 데이터의 유효성을 위해서, 픽셀 수가 특정값 이상이 되는 데이터만을 유효한 값으로 사용한다.Next, the generated histogram is divided into a plurality of sub-areas (S106). In one embodiment of the present invention, the histogram is divided using the histogram generated through step S104 and the average luminance value. At this time, only valid data is used for data validity.
히스토그램 분할 단계(S106)에서는 입력 영상의 평균 휘도 값, 유효 휘도 최소 값 및 유효 휘도 최대 값을 이용하여 히스토그램의 분할 위치를 결정하고, 결정된 분할 위치에 따라 히스토그램을 복수 개의 서브 영역으로 분할한다.
In the histogram dividing step (S106), the dividing position of the histogram is determined using the average luminance value, the effective luminance minimum value, and the effective luminance maximum value of the input image, and the histogram is divided into a plurality of sub regions according to the determined division positions.
(여기서, DPq는 분할 위치, Sp는 입력 영상의 유효 휘도 최소 값, Ep는 입력 영상의 유효 휘도 최대 값, Mp는 입력 영상의 평균 휘도 값, k는 분할 개수)
(Where, DPq is the division position, Sp is the effective luminance minimum value of the input image, Ep is the maximum effective luminance value of the input image, Mp is the average luminance value of the input image,
[수학식 2]는 히스토그램을 분할할 위치(DPq)를 결정하기 위한 수식이다. 도 2의 히스토그램(210)에서, 최소 휘도 값 0과 최대 휘도 값 255 사이에서 분할할 영역의 개수가 k일 때, [수학식 2]와 같이 k+2개의 분할 위치를 결정한다. 이 때 분할 위치는 입력 영상의 평균 휘도값(Mp)에 의해 변경된다. 입력 영상의 유효 최소 휘도 값(Sp)과 Mp, 입력 영상의 유효 최대 휘도값(Ep)와 Mp사이의 분할 위치는 분할 개수(k)와 Mp에 의해 균등한 비율로 결정된다.Equation (2) is a formula for determining a position (DPq) for dividing the histogram. In the
이와 같이 결정된 분할 위치(DPq)에 따라 도 2의 히스토그램(210)을 분할하면, 도 2의 그래프(220)를 얻을 수 있다. 도 2의 그래프(220)를 참고하면, 히스토그램(210)이 분할 위치(DPq)에 따라 복수의 서브 영역(SDRq)으로 분할된다.
By dividing the
(3) 초기 재분배 비율 결정 단계(S108)(3) Initial redistribution ratio determination step (S108)
도 3은 입력 영상의 히스토그램을 복수의 서브 영역으로 분할한 후, 재분배 비율에 따라 각 서브 영역을 재분배하는 과정을 나타낸다.FIG. 3 illustrates a process of dividing a histogram of an input image into a plurality of sub-regions, and redistributing each sub-region according to a redistribution ratio.
다음으로, 복수 개의 서브 영역에 포함된 픽셀 수와 입력 영상의 전체 픽셀 수의 비를 이용하여 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정한다(S108). 이를 위해서는 먼저 [수학식 3]과 같이 각 서브 영역에 포함되는 픽셀 수가 획득되어야 한다.
Next, the initial redistribution ratio of each of the plurality of sub regions is determined using the ratio of the number of pixels included in the plurality of sub regions to the total number of pixels of the input image (S108). To do this, the number of pixels included in each sub-region must be obtained as in Equation (3).
(여기서, SHstΩ는 각 서브 영역에 포함된 픽셀 수, H(j)는 j번째 휘도 값의 픽셀 수)
(Where SHst is the number of pixels contained in each sub-region, and H (j) is the number of pixels of the jth luminance value)
각 서브 영역에 포함된 픽셀 수가 획득되면, [수학식 4]와 같이 입력 영상의 총 픽셀 수에 대한 각 서브 영역의 픽셀 수의 비율, 즉 초기 재분배 비율을 계산한다.
When the number of pixels included in each sub-region is obtained, the ratio of the number of pixels in each sub-region to the total number of pixels of the input image, i.e., the initial redistribution ratio is calculated as shown in Equation (4).
(여기서, RHstΩ는 초기 재분배 비율, N은 영상의 전체 픽셀 수 )
(Where RHst? Is the initial redistribution ratio and N is the total number of pixels in the image)
(4) 안개 영역을 고려한 가중치 적용 단계(S110)(4) Weight application step considering the fog area (S110)
단계(S108)에서 계산된 초기 재분배 비율을 이용하여 각 서브 영역을 재분배하면 대비 개선 효과를 얻을 수 있으나, 이는 기존의 대비 개선 방법에 비해 더 나은 효과를 기대하기 어렵다. 따라서 본 발명에서는 단계(S108)에서 계산된 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용한다(S110). 이러한 가중치가 적용되면 안개 영역에 해당하는 서브 영역의 대비가 높아지게 되므로 초기 재분배 비율만이 적용될 때 보다 높은 왜곡 보정 결과를 얻을 수 있다.Redistribution of each sub-region using the initial redistribution ratio calculated in step S108 can provide a contrast improvement effect, but it is difficult to expect a better effect than the conventional contrast improvement method. Therefore, in the present invention, a weight considering the fog area is applied to the initial redistribution ratio calculated in step S108 (S110). When such a weight is applied, the contrast of the sub region corresponding to the fog region becomes higher, so that a higher distortion correction result can be obtained when only the initial redistribution ratio is applied.
가중치 적용 단계(S110)에서는 먼저 복수 개의 서브 영역 중 안개 영역에 해당하는 k번째 서브 영역을 선택한다. 안개 현상이 일어나면 빛이 전달될 때 안개에 의해 빛이 산란되며, 산란된 빛이 영상 처리장치에 중첩되어 들어오면서 안개 영역에는 밝은 휘도값이 나타나게 된다. 따라서 분할된 서브 영역 중 상위 영역, 즉 높은 휘도 값을 갖는 영역을 안개 영역으로 판단할 수 있다.In the weight application step (S110), a kth sub-region corresponding to the fog region is first selected among a plurality of sub-regions. When a fog occurs, the light is scattered by the fog when the light is transmitted, and when the scattered light is superimposed on the image processing device, a bright luminance value appears in the fog area. Therefore, an upper region among the divided sub regions, that is, a region having a high luminance value, can be determined as a fog region.
이렇게 선택된 k번째 서브 영역의 재분배 비율을 확장하고, 나머지 서브 영역의 비율은 감소시킨다.
The redistribution ratio of the selected k-th sub-region is expanded, and the ratio of the remaining sub-regions is reduced.
(여기서, RHstΩ는 초기 재분배 비율, RHst'Ω는 가중치가 적용된 초기 재분배 비율, ω는 가중치)
(Where RHst is the initial redistribution ratio, RHst 'is the weighted initial redistribution ratio, and w is the weight)
[수학식 5]에서, 비율을 확장하고자 하는 상위 서브 영역(서브 영역중 k번째 영역)이 입력 영상에서 상대적으로 밝은 부분이기 때문에, k번째 영역의 비율에 가중치(ω)를 부여한다. k번째 영역을 제외한 다른 서브 영역의 경우, 초기 재분배 비율에서 확장된 상위 서브 영역의 비율과 초기 재분배 비율의 곱을 뺌으로써 전체 비율의 합을 1로 유지한다.
In Equation (5), the weight (?) Is given to the ratio of the k-th region since the upper sub-region (k-th region of the sub-region) for which the ratio is to be expanded is a relatively bright portion in the input image. In the case of the other sub-regions except the k-th region, the sum of the total ratios is held at 1 by subtracting the product of the ratio of the expanded upper sub-region and the initial redistribution ratio at the initial redistribution ratio.
(5) 최종 재분배 비율 결정 단계(S112)(5) Final redistribution ratio determination step (S112)
입력 영상이 좁은 표현력을 갖는 경우, 최대 표현력으로 히스토그램을 분배하게 되면 어두운 부분의 휘도값은 0으로, 밝은 부분의 휘도값은 255로 표현되면서 영상이 부자연스러워 진다. 따라서 본 발명에서는 가중치가 적용된 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정한다(S112). 이와 같이 출력 영상의 최소 휘도 값 및 최대 휘도 값이 적용되면, 히스토그램 재분배 과정에서 휘도 표현력이 극단적으로 증대되는 것을 방지하여 자연스러운 출력 영상을 얻을 수 있다.When the input image has a narrow expressive power, if the histogram is distributed with the maximum expressive power, the luminance value of the dark part is expressed as 0, and the luminance value of the bright part is expressed as 255, and the image is unnatural. Accordingly, in the present invention, the final redistribution ratio is determined by applying the minimum luminance value and the maximum luminance value of the output image to the initial redistribution ratio to which the weight is applied (S112). Thus, when the minimum luminance value and the maximum luminance value of the output image are applied, it is possible to prevent the luminance expressive power from being extremely increased in the histogram redistribution process, thereby obtaining a natural output image.
출력 영상의 유효 휘도 최소 값 및 유효 휘도 최대 값은 각각 [수학식 6]과 같이 결정된다. 즉, 입력 영상의 평균 휘도값과 휘도 표현 중앙값(0.5)와 차를 구하여 히스토그램의 편향 정도를 계산하고, 이를 유효 휘도 최소값(Sp), 유효 휘도 최대값(Ep)에 빼거나 더함으로써 출력 영상의 유효 휘도 최소 값 및 유효 휘도 최대 값이 결정된다.
The minimum effective luminance value and the maximum effective luminance value of the output image are determined as shown in Equation (6). That is, by calculating the deviation between the average luminance value of the input image and the luminance representation median (0.5) and the degree of deviation of the histogram, subtracting it from the effective luminance minimum value (S p ) and the effective luminance maximum value (E p ) The minimum effective luminance value and the maximum effective luminance value of the image are determined.
(여기서, Lp는 출력 영상의 최소 휘도 값, Hp는 출력 영상의 최대 휘도 값, Ep는 입력 영상의 유효 휘도 최대 값, Mp는 입력 영상의 평균 휘도 값)
(Where, Lp is the minimum luminance value of the output image, Hp is the maximum luminance value of the output image, Ep is the maximum effective luminance value of the input image, and Mp is the average luminance value of the input image)
출력 영상의 휘도 표현력은 (Hp―Lp)로 정의되며, 이러한 휘도 표현력에 의해 히스토그램 재분배 과정에서 영상의 부자연스러움이 억제된다.
The luminance expressive power of the output image is defined as (Hp-Lp), and the unnaturalness of the image in the histogram redistribution process is suppressed by this luminance expressive power.
이렇게 계산된 출력 영상의 유효 휘도 최소 값(Lp) 및 유효 휘도 최대 값(Hp)을 가중치가 적용된 초기 재분배 비율에 적용하여, [수학식 7]과 같이 최종 재분배 비율을 결정한다(S112). [수학식 7]에서, 처음 재분배 비율과 마지막 재분배 비율은 계산된 휘도 표현력 문턱값에 따라 비율을 할당한다. 이에 따라 최종 재분배 비율()은 휘도 표현력 문턱값에 할당된 비율만큼 감소된 새로운 휘도 표현력 안에서 결정된다. [수학식 7]에서 분모는 정규화를 위한 항이다.
The final redistribution ratio is determined as in Equation (7) by applying the calculated effective luminance minimum value Lp and effective luminance maximum value Hp of the output image to the initial redistribution ratio to which the weight is applied (S112). In Equation (7), the ratio of the first redistribution ratio and the last redistribution ratio is assigned according to the calculated luminance power threshold value. Accordingly, the final redistribution ratio ( ) Is determined in the new luminance expression power reduced by the ratio assigned to the luminance expression threshold value. In Equation (7), the denominator is a term for normalization.
(여기서, 는 최종 재분배 비율, RHst'Ω는 가중치가 적용된 초기 재분배 비율, Lp는 출력 영상의 최소 휘도 값, Hp는 출력 영상의 최대 휘도 값)
(here, Lp is the minimum luminance value of the output image, and Hp is the maximum luminance value of the output image.
(6) 입력 영상의 휘도 값 재분배 단계(S114)(6) Redistributing the luminance value of the input image (S114)
마지막으로, 계산된 최종 재분배 비율에 따라 히스토그램을 재분배한다(S114). 이 단계에서는 입력 영상의 휘도 값이 포함되는 서브 영역을 결정한 후, 계산된 최종 재분배 비율과 해당 서브 영역의 휘도 표현력, 분할 위치를 이용하여 히스토그램을 재분배한다.
Finally, the histogram is redistributed according to the calculated final redistribution ratio (S114). In this step, the sub-region including the luminance value of the input image is determined, and then the histogram is redistributed using the calculated final redistribution ratio, the luminance expressive power of the sub-region, and the divided position.
(여기서, y(n)은 출력 휘도값, x(n)은 입력 휘도값)
(Where, y (n) is an output luminance value, and x (n) is an input luminance value)
도 3은 입력 영상의 히스토그램을 복수의 서브 영역으로 분할한 후, 재분배 비율에 따라 각 서브 영역을 재분배하는 과정을 나타낸다. FIG. 3 illustrates a process of dividing a histogram of an input image into a plurality of sub-regions, and redistributing each sub-region according to a redistribution ratio.
도 3을 참조하면, 먼저 입력 휘도 값(x(n))이 복수의 서브 영역 중 어느 서브 영역에 해당하는지 확인한다(310). 그리고 나서, 해당 서브 영역의 시작 휘도값(DPq)을 입력 휘도 값(x(n))에서 뺌으로써 입력 휘도 값(x(n))을 평행이동 시킨다(320).Referring to FIG. 3, first, it is checked which sub-region of the plurality of sub-regions the input brightness value x (n) corresponds to (310). Then, the input luminance value x (n) is moved in parallel by subtracting the starting luminance value DPq of the corresponding sub region from the input luminance value x (n) (320).
그 다음, 시작 휘도 값만큼 떨어진 입력 휘도 값에 최종 재분배 비율()을 곱하여 새로운 휘도 값을 계산한다(330). 마지막으로, 계산된 새로운 휘도 값에 재분배 되는 영역의 시작 휘도값()을 더해줌으로써 입력 휘도 값을 재분배한다(340).
Then, the input luminance value that is separated by the starting luminance value is added to the final redistribution ratio ( ) To calculate a new luminance value (330). Finally, the starting luminance value of the region redistributed to the calculated new luminance value ( ) To redistribute the input luminance value (340).
전술한 (1) 내지 (6)의 과정을 통해 재분배가 적용된 휘도 데이터(V)는 다시 H(hue)와, S(saturation) 데이터와 함께 RGB 데이터로 변환되고, 이에 따라 안개 영역에 의한 왜곡이 보정된 출력 영상이 생성된다.
The luminance data V to which the redistribution is applied through the above-described processes (1) to (6) is converted into RGB data together with H (hue) and S (saturation) data, A corrected output image is generated.
도 4는 본 발명의 일 실시예에 따른 영상 처리 장치의 구성도를 나타낸다.4 is a block diagram of an image processing apparatus according to an embodiment of the present invention.
도 4를 참고하면, 본 발명의 일 실시예에 따른 영상 처리 장치(402)는 히스토그램 생성부(404), 분할부(406), 제1 연산부(408), 제2 연산부(410), 제3 연산부(412)를 포함한다. 4, an
히스토그램 생성부(404)는 입력 영상의 각 픽셀의 휘도를 획득하고, 상기 입력 영상의 휘도 분배를 나타내는 히스토그램을 생성한다.The
분할부(406)는 생성된 히스토그램을 복수 개의 서브 영역으로 분할한다.The
제1 연산부(408)는 복수 개의 서브 영역에 포함된 픽셀 수와 입력 영상의 전체 픽셀 수의 비를 이용하여, 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정한다.The
제2 연산부(410)는 계산된 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용한다.The
제3 연산부(412)는 가중치가 적용된 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정한다.The
한편, 도 4에는 도시되지 않았으나, 영상 처리 장치(402)는 히스토그램의 분할 위치 및 최종 재분배 비율을 이용하여 입력 영상의 휘도 값을 재분배하는 재분배부를 더 포함할 수 있다.
Although not shown in FIG. 4, the
도 5는 본 발명에 의한 영상 처리 방법이 적용되기 전의 입력 영상을 나타내며, 도 6은 본 발명에 의한 영상 처리 방법이 적용된 후의 출력 영상을 나타낸다.FIG. 5 shows an input image before the image processing method according to the present invention is applied, and FIG. 6 shows an output image after applying the image processing method according to the present invention.
도 5를 참고하면, 입력 영상은 대기 산란광으로 인하여 발생한 안개 영역을 포함한다. 따라서 명암비가 높지 않아 이미지가 선명하지 못하고 객체의 경계선 부분이 자연스럽지 못하여 영상 내 객체의 인식이 어렵다.Referring to FIG. 5, the input image includes a mist region generated due to atmospheric scattering light. Therefore, since the contrast ratio is not high, the image is not clear and the boundary portion of the object is not natural, so that it is difficult to recognize the object in the image.
그러나 본 발명에 의한 영상 처리 방법에 따라 입력 영상을 처리한 결과물인 도 6을 참고하면, 객체의 색과 경계선 표현이 보다 자연스러워지며, 명암비가 보다 향상된다.
However, referring to FIG. 6, which is the result of processing the input image according to the image processing method of the present invention, the color and boundary representation of the object become more natural and the contrast ratio is further improved.
전술한 바와 같은 본 발명에 의한 안개 왜곡 보정 방법은 히스토그램을 이용한 대비 개선 방법을 사용함으로써 라인 메모리를 필요로 하지 않아 하드웨어 구성에서 이점을 가진다.The fog distortion correction method according to the present invention as described above does not require a line memory by using a contrast improvement method using a histogram, which is advantageous in a hardware configuration.
또한 본 발명에 따르면, 대비 개선 방법의 편향 휘도 정보에 의한 다른 휘도 정보의 왜곡을 해결할 수 있다. 또한 본 발명은 서로 다른 안개 영역이 존재하는 영상에도 적용이 가능하며, 휘도 정보만을 사용함으로써 색상 왜곡을 방지하고, 추가적인 후처리 과정 없이도 자연스러운 영상을 얻을 수 있다.
Further, according to the present invention, it is possible to solve distortion of other luminance information by the deflection luminance information of the contrast improvement method. Also, the present invention can be applied to an image in which different fog areas are present. By using only luminance information, color distortion can be prevented and a natural image can be obtained without additional post-processing.
전술한 본 발명은, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니다.While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, But the present invention is not limited thereto.
Claims (10)
상기 입력 영상의 휘도 분배를 나타내는 히스토그램을 생성하는 단계;
상기 히스토그램을 복수 개의 서브 영역으로 분할하는 단계;
상기 복수 개의 서브 영역에 포함된 픽셀 수와 상기 입력 영상의 전체 픽셀 수의 비를 이용하여 상기 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정하는 단계;
상기 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용하는 단계; 및
상기 가중치가 적용된 상기 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정하는 단계를
포함하는 영상 처리 방법.
Obtaining a luminance of each pixel of an input image;
Generating a histogram representing a luminance distribution of the input image;
Dividing the histogram into a plurality of sub-regions;
Determining an initial redistribution ratio of each of the plurality of sub regions using a ratio of the number of pixels included in the plurality of sub regions to the total number of pixels of the input image;
Applying a weight to the initial redistribution ratio in consideration of the fog area; And
Determining a final redistribution ratio by applying a minimum luminance value and a maximum luminance value of the output image to the initial redistribution ratio to which the weight is applied
An image processing method comprising:
상기 히스토그램을 복수 개의 서브 영역으로 분할하는 단계는
상기 입력 영상의 평균 휘도 값, 유효 휘도 최소 값 및 유효 휘도 최대 값을 이용하여 상기 히스토그램의 분할 위치를 결정하는 단계; 및
상기 분할 위치에 따라 상기 히스토그램을 복수 개의 서브 영역으로 분할하는 단계를
포함하는 영상 처리 방법.
The method according to claim 1,
The step of dividing the histogram into a plurality of sub-
Determining a split position of the histogram using an average luminance value, an effective luminance minimum value, and an effective luminance maximum value of the input image; And
Dividing the histogram into a plurality of sub-regions according to the division position
An image processing method comprising:
상기 히스토그램의 분할 위치는 하기 [수학식 1]에 의해 결정되는
영상 처리 방법.
[수학식 1]
(여기서, DPq는 분할 위치, Sp는 입력 영상의 유효 휘도 최소 값, Ep는 입력 영상의 유효 휘도 최대 값, Mp는 입력 영상의 평균 휘도 값, k는 분할 개수)
3. The method of claim 2,
The division position of the histogram is determined by the following equation (1)
Image processing method.
[Equation 1]
(Where, DPq is the division position, Sp is the effective luminance minimum value of the input image, Ep is the maximum effective luminance value of the input image, Mp is the average luminance value of the input image,
상기 초기 재분배 비율은 하기 [수학식 2]에 의해 결정되는
영상 처리 방법.
[수학식 2]
(여기서, SHstΩ는 각 서브 영역에 포함된 픽셀 수, H(j)는 j번째 휘도 값의 픽셀 수, RHstΩ는 초기 재분배 비율, N은 영상의 전체 픽셀 수 )
The method according to claim 1,
The initial redistribution ratio is determined by the following equation (2)
Image processing method.
&Quot; (2) "
(Where SHst is the number of pixels in each sub-region, H (j) is the number of pixels in the jth luminance value, RHst is the initial redistribution ratio, and N is the total number of pixels in the image)
상기 초기 재분배 비율에 가중치를 부여하는 단계는
상기 복수 개의 서브 영역 중 안개 영역에 해당하는 k번째 서브 영역을 선택하는 단계; 및
하기 [수학식 3]에 의해 상기 k번째 서브 영역 및 나머지 서브 영역에 가중치를 부여하는 단계를
포함하는 영상 처리 방법.
[수학식 3]
(여기서, RHstΩ는 초기 재분배 비율, RHst'Ω는 가중치가 적용된 초기 재분배 비율, ω는 가중치)
The method according to claim 1,
The step of weighting the initial redistribution ratio
Selecting a kth sub-region corresponding to a fog region among the plurality of sub-regions; And
The step of assigning weights to the k < th > sub-region and the remaining sub-regions by < EMI ID =
An image processing method comprising:
&Quot; (3) "
(Where RHst is the initial redistribution ratio, RHst 'is the weighted initial redistribution ratio, and w is the weight)
상기 출력 영상의 유효 휘도 최소 값 및 유효 휘도 최대 값은 각각 하기 [수학식 4]에 의해 결정되는
영상 처리 방법.
[수학식 4]
(여기서, Lp는 출력 영상의 최소 휘도 값, Hp는 출력 영상의 최대 휘도 값, Ep는 입력 영상의 유효 휘도 최대 값, Mp는 입력 영상의 평균 휘도 값)
The method according to claim 1,
The minimum effective luminance value and the maximum effective luminance value of the output image are respectively determined by the following equation (4)
Image processing method.
&Quot; (4) "
(Where, Lp is the minimum luminance value of the output image, Hp is the maximum luminance value of the output image, Ep is the maximum effective luminance value of the input image, and Mp is the average luminance value of the input image)
상기 최종 재분배 비율은 하기 [수학식 5]에 의해 결정되는
영상 처리 방법.
[수학식 5]
(여기서, 는 최종 재분배 비율, RHst'Ω는 가중치가 적용된 초기 재분배 비율, Lp는 출력 영상의 최소 휘도 값, Hp는 출력 영상의 최대 휘도 값)
The method according to claim 1,
The final redistribution ratio is determined by the following equation (5)
Image processing method.
&Quot; (5) "
(here, Lp is the minimum luminance value of the output image, and Hp is the maximum luminance value of the output image.
상기 히스토그램의 분할 위치 및 상기 최종 재분배 비율을 이용하여 상기 입력 영상의 휘도 값을 재분배하는 단계를
더 포함하는 영상 처리 방법.
The method according to claim 1,
And redistributing the luminance value of the input image using the split position of the histogram and the final redistribution ratio
Further comprising a video processing method.
상기 입력 영상의 휘도 값을 재분배하는 단계는 하기 [수학식 6]에 의해 이루어지는
영상 처리 방법.
[수학식 6]
(여기서, y(n)은 출력 휘도값, x(n)은 입력 휘도값)
9. The method of claim 8,
The step of redistributing the luminance value of the input image is performed by Equation (6)
Image processing method.
&Quot; (6) "
(Where, y (n) is an output luminance value, and x (n) is an input luminance value)
상기 히스토그램을 복수 개의 서브 영역으로 분할하는 분할부;
상기 복수 개의 서브 영역에 포함된 픽셀 수와 상기 입력 영상의 전체 픽셀 수의 비를 이용하여 상기 복수 개의 서브 영역 각각의 초기 재분배 비율을 결정하는 제1 연산부;
상기 초기 재분배 비율에 안개 영역을 고려한 가중치를 적용하는 제2 연산부; 및
상기 가중치가 적용된 상기 초기 재분배 비율에 출력 영상의 최소 휘도 값 및 최대 휘도 값을 적용하여 최종 재분배 비율을 결정하는 제3 연산부를
포함하는 영상 처리 장치.A histogram generation unit for obtaining a luminance of each pixel of an input image and generating a histogram representing a luminance distribution of the input image;
A divider dividing the histogram into a plurality of sub-regions;
A first calculation unit for determining an initial redistribution ratio of each of the plurality of sub regions using a ratio of the number of pixels included in the plurality of sub regions to the total number of pixels of the input image;
A second calculator for applying a weight considering the fog area to the initial redistribution ratio; And
And a third calculation unit for determining a final redistribution ratio by applying the minimum luminance value and the maximum luminance value of the output image to the initial redistribution ratio to which the weight is applied
Included video processing unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20130060159A KR101490594B1 (en) | 2013-05-28 | 2013-05-28 | Method and apparatus for processing image including for area |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20130060159A KR101490594B1 (en) | 2013-05-28 | 2013-05-28 | Method and apparatus for processing image including for area |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20140139742A true KR20140139742A (en) | 2014-12-08 |
KR101490594B1 KR101490594B1 (en) | 2015-02-05 |
Family
ID=52457884
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR20130060159A KR101490594B1 (en) | 2013-05-28 | 2013-05-28 | Method and apparatus for processing image including for area |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101490594B1 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100900678B1 (en) * | 2008-02-15 | 2009-06-01 | 한양대학교 산학협력단 | Image quality enhancement method using dynamic range segmentation |
KR101518722B1 (en) * | 2008-08-18 | 2015-05-15 | 삼성테크윈 주식회사 | Image enhancement processing method and apparatus for distortion correction by air particle like fog |
KR101292421B1 (en) * | 2011-08-05 | 2013-08-01 | 경희대학교 산학협력단 | Method for improving foggy image by unit image block |
-
2013
- 2013-05-28 KR KR20130060159A patent/KR101490594B1/en active IP Right Grant
Also Published As
Publication number | Publication date |
---|---|
KR101490594B1 (en) | 2015-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107680056B (en) | Image processing method and device | |
WO2020038124A1 (en) | Image contrast enhancement method and apparatus, and device and storage medium | |
KR102567860B1 (en) | Improved inverse tone mapping method and corresponding device | |
KR101518722B1 (en) | Image enhancement processing method and apparatus for distortion correction by air particle like fog | |
EP2624204B1 (en) | Image processing apparatus and method of controlling the same | |
JP6052902B2 (en) | Methods for processing highlight and saturation areas in digital images | |
EP1489855A2 (en) | Automatic color correction for sequences of images | |
JP2009038498A5 (en) | ||
KR100694153B1 (en) | Method and Apparatus for Image Processing based on a Mapping Function | |
US10218953B2 (en) | Image processing apparatus, image processing method, and storage medium | |
KR101113483B1 (en) | Apparatus for enhancing visibility of color image | |
CN111369471A (en) | Image processing method, device, equipment and storage medium | |
CN110175967B (en) | Image defogging processing method, system, computer device and storage medium | |
US9135689B2 (en) | Apparatus and method for performing detail enhancement | |
KR100997159B1 (en) | Apparatus and method for improving contrast | |
JP4539964B2 (en) | Image segmentation | |
KR101065719B1 (en) | Method for enhancing contrast based on adaptive gamma | |
KR101490594B1 (en) | Method and apparatus for processing image including for area | |
JP4359662B2 (en) | Color image exposure compensation method | |
JP6397261B2 (en) | Image processing apparatus and method | |
KR101418521B1 (en) | Image enhancement method and device by brightness-contrast improvement | |
JP7145651B2 (en) | Image processing device and program | |
CN110717862B (en) | Contrast enhancement method based on dynamic range compression and electronic device thereof | |
KR20130002700A (en) | A method of adaptive contrast enhancement using hyperloic tangent curve and image histogram | |
TWI681675B (en) | Contrast enhancement method based on dynamic range compression and electronic apparatus thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20180122 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20200103 Year of fee payment: 6 |