KR101814806B1 - A method of enhancing contrast using bezier curve - Google Patents

A method of enhancing contrast using bezier curve Download PDF

Info

Publication number
KR101814806B1
KR101814806B1 KR1020110063818A KR20110063818A KR101814806B1 KR 101814806 B1 KR101814806 B1 KR 101814806B1 KR 1020110063818 A KR1020110063818 A KR 1020110063818A KR 20110063818 A KR20110063818 A KR 20110063818A KR 101814806 B1 KR101814806 B1 KR 101814806B1
Authority
KR
South Korea
Prior art keywords
image
luminance
pixel count
control point
section
Prior art date
Application number
KR1020110063818A
Other languages
Korean (ko)
Other versions
KR20130002698A (en
Inventor
박수진
케에스 크리슈나
Original Assignee
엘지이노텍 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지이노텍 주식회사 filed Critical 엘지이노텍 주식회사
Priority to KR1020110063818A priority Critical patent/KR101814806B1/en
Publication of KR20130002698A publication Critical patent/KR20130002698A/en
Application granted granted Critical
Publication of KR101814806B1 publication Critical patent/KR101814806B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques

Landscapes

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

Abstract

본 발명은 촬영되거나 또는 저장 매체로 읽어들인 이미지로부터 히스토그램 분포를 산출하고, 상기 이미지를 콘트라스트 상태에 따라 종류 별로 구분하고, 상기 종류별로 3차원 베지어 곡선의 제어점 이동 방향을 결정하고, 상기 히스토그램 분포에 존재하는 휘도값의 개수를 기반으로 3차원 베지어 곡선의 제어점 이동 거리를 계산한다. 결정된 제어점 이동 방향과 제어점 이동 거리를 기반으로 3차원 베지어 곡선의 제어점 2개를 이동시키고, 이동된 제어점 2개와 고정되어 있는 제어점 2개를 사용하여 베지어 곡선을 생성한다. 그리고 나서, 생성된 베지어 곡선을 적용하여 이미지 개선을 수행한다. A histogram distribution is calculated from an image photographed or read into a storage medium, the image is classified according to a contrast state, the control point movement direction of a three-dimensional Bezier curve is determined for each type, and the histogram distribution And calculates the movement distance of the control point of the 3-dimensional Bezier curve based on the number of luminance values existing in the 3-dimensional Bezier curve. Based on the determined control point movement direction and the control point movement distance, two control points of the three-dimensional Bezier curve are moved, and two Bezier curves are generated using two moved control points and two fixed control points. Then, the image is improved by applying the generated Bezier curve.

Description

베지어 곡선을 이용한 콘트라스트 개선 방법{A METHOD OF ENHANCING CONTRAST USING BEZIER CURVE}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contrast enhancement method using a Bezier curve,

본 발명은 이미지의 콘트라스트 개선 방법에 관한 것이다. 보다 구체적으로, 본 발명은 촬영되거나 또는 저장 매체로 읽어들인 이미지로부터 히스토그램 분포를 산출하고, 상기 이미지를 콘트라스트 상태에 따라 종류 별로 구분하고, 상기 종류별로 3차원 베지어 곡선의 제어점 이동 방향을 결정하고, 상기 히스토그램 분포에 존재하는 휘도값의 개수를 기반으로 3차원 베지어 곡선의 제어점 이동 거리를 계산한다. 결정된 제어점 이동 방향과 제어점 이동 거리를 기반으로 3차원 베지어 곡선의 제어점 2개를 이동시키고, 이동된 제어점 2개와 고정되어 있는 제어점 2개를 사용하여 베지어 곡선을 생성한다. 그리고 나서, 생성된 베지어 곡선을 적용하여 이미지 개선을 수행한다. The present invention relates to a method for improving the contrast of an image. More specifically, the present invention calculates a histogram distribution from an image photographed or read into a storage medium, classifies the image according to the contrast state, determines a control point movement direction of the three-dimensional Bezier curve for each type, , The control point shift distance of the 3-dimensional Bezier curve is calculated based on the number of luminance values in the histogram distribution. Based on the determined control point movement direction and the control point movement distance, two control points of the three-dimensional Bezier curve are moved, and two Bezier curves are generated using two moved control points and two fixed control points. Then, the image is improved by applying the generated Bezier curve.

콘트라스트는 인간의 시각적 인지에 있어서 이미지의 품질에 상당한 영향을 갖는다. 이미지 콘트라스트 개선은 기본적으로 인간의 눈을 위한 이미지 정보의 상호번역성 또는 인식성을 개선하고, 다른 자동화된 이미지 처리 기술을 위한 "더 나은" 입력을 제공하는 것이다. 이미지 개선의 주된 목적은 이미지의 속성을 변경하여 주어진 작업 및 특정 관찰자에게 더 적절하게 만드는 것이다. 이러한 처리 과정에서, 이미지의 하나 이상의 속성이 변경된다.Contrast has a significant impact on image quality in human visual perception. Improving image contrast is basically to improve the mutual translability or perception of image information for the human eye and to provide "better" input for other automated image processing techniques. The main purpose of image enhancement is to change the properties of an image to make it more suitable for a given task and a particular observer. In this process, one or more attributes of the image are changed.

통상적으로, 이미지의 콘트라스트는 주어진 이미지에서 가용한 휘도 강도의 범위로 정의된다. 수학적으로, 이미지 콘트라스트는 다음 (식 1)과 같이 표현될 수 있다.Typically, the contrast of an image is defined as the range of intensity intensities available in a given image. Mathematically, the image contrast can be expressed as: " (1) "

콘트라스트 = (Lmax - Lmin) / (Lmax + Lmin) ... (식 1)Contrast = (Lmax - Lmin) / (Lmax + Lmin) (1)

여기서, Lmax 및 Lmin은 각각 주어진 이미지의 최대 휘도값 및 최소 휘도값이다. Here, Lmax and Lmin are the maximum luminance value and the minimum luminance value of a given image, respectively.

콘트라스트 개선은 강도를 정량화하는데 사용되는 비트수에 의해 제공되는 최대 범위의 강도를 사용함으로써, 이미지 피쳐를 보다 명확하게 만드는 프로세스이다. Contrast enhancement is a process that makes the image features more distinct by using the maximum range of intensity provided by the number of bits used to quantify the intensity.

이러한 콘트라스트 개선 방법 중에서도, 사람의 육안에 보다 최적화될 수 있도록 콘트라스트를 개선하는 방법이 요구된다.Among these contrast improvement methods, there is a need for a method of improving the contrast so as to be more optimized for human eyes.

본 발명은 이미지의 타입에 따라, 콘트라스트를 적응적으로 개선하는 공간 영역에서의 콘트라스트 개선 방법을 제공하는 것을 목적으로 한다.It is an object of the present invention to provide a method of improving contrast in a spatial domain that adaptively improves contrast according to the type of an image.

본 발명의 일 실시예에 따라, 베지어 곡선을 이용한 콘트라스트 개선 방법이 제공된다. 상기 방법은, 이미지를 읽어들이는 단계; 상기 이미지의 휘도값 분포를 산출하는 단계; 상기 휘도값의 저휘도, 중휘도, 고휘도 구간별 픽셀 카운트를 산출하는 단계; 상기 구간별 픽셀 카운트를 기반으로 상기 이미지의 타입을 결정하는 단계; 상기 이미지의 타입을 기반으로 제어점 이동 방향을 결정하는 단계; 상기 이미지의 휘도값 분포를 기반으로 상기 제어점의 이동 거리를 계산하는 단계; 상기 제어점 이동 방향과 상기 제어점 이동 거리를 기반으로 제어점을 이동하고 이동된 제어점을 기반으로 3차원 베지어 곡선을 생성하는 단계; 및 상기 생성된 3차원 베지어 곡선을 사용하여 콘트라스트 개선을 수행하는 단계를 포함한다.According to an embodiment of the present invention, a method of improving contrast using a Bezier curve is provided. The method includes: reading an image; Calculating a luminance value distribution of the image; Calculating a pixel count for each of the low luminance, the medium luminance and the high luminance section of the luminance value; Determining a type of the image based on the interval pixel count; Determining a control point movement direction based on the type of the image; Calculating a movement distance of the control point based on a luminance value distribution of the image; Moving a control point based on the control point moving direction and the control point moving distance and generating a three-dimensional Bezier curve based on the moved control point; And performing contrast enhancement using the generated three-dimensional Bezier curve.

본 발명에 따르면, 적은 계산량으로 사람의 육안에 보다 최적화될 수 있도록 콘트라스트를 개선할 수 있다.According to the present invention, it is possible to improve the contrast so that it can be more optimized in the human eye with a small amount of calculation.

도 1은 이미지의 휘도값 히스토그램 분포에 따른 이미지의 타입들을 나타낸다.
도 2는 본 발명의 일 실시예에 따른 이미지의 히스토그램 분포를 나타낸다.
도 3은 본 발명의 일 실시예에 따라 3차원 베지어 곡선의 제어점을 설정하는 방법을 나타낸다.
도 4는 본 발명의 일 실시예에 따라, 이미지 타입 별로 제어점을 이동하는 방법을 나타낸다.
도 5는 본 발명의 일 실시예에 따라, 휘도값 분포에 존재하는 휘도값의 개수 N을 설명하기 위한 도면이다.
도 6은 본 발명의 일 실시예에 따라, 계산된 이동 거리만큼 제어점을 이동하는 방법을 나타낸다.
도 7은 본 발명의 일 실시예에 따라, 최종적으로 얻어진 베지어 곡선을 이용한 참조 곡선이다.
도 8은 본 발명의 일 실시예에 따른, 적응적 콘트라스트 개선 방법을 나타내는 순서도이다.
Figure 1 shows the types of images according to the luminance value histogram distribution of an image.
2 shows a histogram distribution of an image according to an embodiment of the present invention.
FIG. 3 illustrates a method of setting control points of a three-dimensional Bezier curve according to an embodiment of the present invention.
FIG. 4 illustrates a method of moving a control point for each image type according to an embodiment of the present invention.
5 is a diagram for explaining the number N of luminance values present in a luminance value distribution according to an embodiment of the present invention.
Figure 6 illustrates a method of moving a control point by a calculated travel distance, in accordance with an embodiment of the present invention.
7 is a reference curve using the finally obtained Bezier curve according to an embodiment of the present invention.
8 is a flow chart illustrating an adaptive contrast enhancement method, in accordance with an embodiment of the present invention.

이하 도면을 참조하여, 본 발명의 실시예들을 보다 상세히 설명한다.Embodiments of the present invention will now be described in more detail with reference to the drawings.

도 1은 이미지의 휘도값 히스토그램 분포에 따른 이미지의 타입들을 나타낸다. 도 1에 도시된 바와 같이, (a)는 어두운 이미지이고, (b)는 밝은 이미지이고, (c)는 백라이트가 있는 이미지이고, (d)는 로우 콘트라스트 이미지이고, (e)는 하이 콘트라스트 이미지로 분류할 수 있다.Figure 1 shows the types of images according to the luminance value histogram distribution of an image. As shown in Fig. 1, (a) is a dark image, (b) is a bright image, (c) is an image with backlight, (d) is a low contrast image, .

이미지의 히스토그램 분포를 도 2와 같이 3개의 영역, 즉 저휘도(L), 중휘도(M), 및 고휘도(H) 영역으로 구분할 수 있다. 바람직하게는, 저휘도 구간, 중휘도 구간, 고휘도 구간의 구간 길이는 거의 동일하게 설정한다. 즉, 저휘도 구간, 중휘도 구간, 고휘도 구간에 포함되는 휘도값은 총 256개의 이산 휘도값 중 85개, 85개, 86개일 수 있다. The histogram distribution of the image can be divided into three regions as shown in FIG. 2, namely, a low luminance (L), a medium luminance (M), and a high luminance (H) region. Preferably, the section lengths of the low luminance section, the middle luminance section, and the high luminance section are set to be substantially the same. That is, the luminance values included in the low luminance section, the middle luminance section, and the high luminance section may be 85, 85, and 86 out of 256 discrete luminance values in total.

한편, 베지어 곡선은 컴퓨터 그래픽 및 그 관련 분야에서 자주 사용되는 매개 곡선이다. 베지어 곡선은 부드러운 곡선을 모델링하기 위해 컴퓨터 그래픽 분야에서 널리 사용된다. 본 발명에서는 콘트라스트 개선을 위해 3차원 베지어 곡선을 사용한다. On the other hand, Bezier curves are frequently used parameter curves in computer graphics and related fields. Bezier curves are widely used in computer graphics to model smooth curves. In the present invention, a three-dimensional Bezier curve is used to improve the contrast.

3차원 베지어 곡선은 아래 식에 의해 정의될 수 있다. A three-dimensional Bezier curve can be defined by the following equation.

Figure 112011049778269-pat00001
Figure 112011049778269-pat00001

... (식 2)... (Equation 2)

여기서, P0, P1, P2, P3는 3차원 베지어 곡선의 제어점이다.Here, P0, P1, P2, and P3 are the control points of the 3-D Bezier curve.

3차원 베지어 곡선은 장면 또는 이미지 컨텐츠를 기반으로 동적으로 서로 다른 시나리오에 대한 콘트라스트 개선 문제를 모델링하는데 사용될 수 있다. 제어점의 위치를 변경함으로써 콘트라스트 개선을 위해 필요한 모든 필요한 곡선 형태를 얻을 수 있다. 제어점 P0, P1, P2, P3의 위치에 따라, 생성되는 베지어 곡선의 형태가 달라진다.A three-dimensional Bezier curve can be used to model the problem of contrast enhancement for different scenarios dynamically based on scene or image content. By changing the position of the control points, all necessary curve shapes necessary for improving the contrast can be obtained. Depending on the position of the control points P0, P1, P2, and P3, the shape of the Bezier curve to be generated is different.

이하에서는, 본 발명의 일 실시예에 따라, 콘트라스트 개선에 사용할 곡선을 얻기 위해 제어점의 위치를 어떻게 설정하는지에 대해 설명한다. 도 3은 본 발명의 일 실시예에 따라 3차원 베지어 곡선의 제어점을 설정하는 방법을 나타낸다. Hereinafter, how to set the position of the control point to obtain a curve to be used for contrast enhancement will be described according to an embodiment of the present invention. FIG. 3 illustrates a method of setting control points of a three-dimensional Bezier curve according to an embodiment of the present invention.

먼저, 4개의 제어점 P0, P1, P2, P3 중 제어점 P0와 P3는 서로 마주보는 대각선의 방향에 고정된다. 즉, 도 3에서 P0는 (0,0)에, P3는 (1,1)에 고정된다. P1 및 P2는 각각 P0 및 P3와 같은 위치에 있으며, 휘도값 히스토그램 분포의 3개의 영역, 즉, 저휘도, 중휘도, 고휘도 구간의 픽셀 카운트에 따라 결정되는 거리 만큼 P0, P3로부터 멀어지는 방향으로 이동한다. P1,P2가 P0,P3로부터 멀어지는 방향은 이미지의 타입에 따라 달라질 수 있다. First, among the four control points P0, P1, P2, and P3, the control points P0 and P3 are fixed in the diagonal direction facing each other. That is, in Fig. 3, P0 is fixed to (0,0) and P3 is fixed to (1,1). P1 and P2 are located at the same positions as P0 and P3 respectively and move in the direction away from P0 and P3 by a distance determined by the three regions of the luminance value histogram distribution, that is, the pixel counts of low luminance, medium luminance and high luminance section do. The direction in which P1 and P2 move away from P0 and P3 may vary depending on the type of image.

이미지의 타입은 도 1에 도시된 5가지로 분류될 수 있으며, 어느 타입에 속하는지는 휘도값 히스토그램의 각 구간에 속하는 픽셀 카운트에 따라 결정된다. The types of images can be classified into the five types shown in Fig. 1, and the type of image belongs to the pixel count belonging to each section of the luminance value histogram.

N(L)을 저휘도 구간에 속하는 픽셀 카운트, N(M)을 중휘도 구간에 속하는 픽셀 카운트, N(H)를 고휘도 구간에 속하는 픽셀 카운트라 하면 아래와 같이 결정할 수 있다. N (L) is a pixel count belonging to a low luminance section, N (M) is a pixel count belonging to a middle luminance section, and N (H) is a pixel count belonging to a high luminance section.

If ( N(L) > N(M) )&&((N(L) > N(H)) ) then 어두운 이미지;If (N (L)> N (M)) && ((N (L)> N (H))) then dark image;

Else If ( N(H) > N(M) )&&((N(H) > N(L)) ) then 밝은 이미지;Else If (N (H)> N (M)) && ((N (H)> N (L))) then bright image;

Else If ( N(L) > N(M) )&&((N(H) > N(M)) ) then 역광 이미지;Else If (N (L)> N (M)) && (N (H)> N (M))) backlight image;

Else If ( N(M) > N(L) )&&((N(M) > N(H)) ) then 로우 콘트라스트 이미지;Else If (N (M)> N (L)) && ((N (M)> N (H))) then a low contrast image;

Else 하이 콘트라스트 이미지.
Else high contrast image.

바람직하게는, 이미지를 하이 콘트라스트 이미지를 제외한 나머지 타입으로 분류할 때는, N(L), N(M), N(H)의 크기가 많이, 예컨대 이미지의 총 픽셀수의 10% 이상 차이는 경우로 한정한다. N(L), N(M), N(H)의 값에 차이가 존재해서, 산술적으로는 하이 콘트라스트 이외의 다른 타입으로 결정할 수 있으나, 그 차이가 크지 않은 경우에는 모두 하이 콘트라스트 이미지로 분류하는 것이 바람직하기 때문이다. 예컨대, 이미지의 총 픽셀 수가 1780개인 경우에, N(L)=600, N(M)= 590, N(H)=590라면, 위 분류에서는 어두운 이미지로 분류가 되지만, 이것은 구간별 픽셀 카운트 차가 크지 않기 때문에, 그냥 하이 콘트라스트 이미지로 분류할 수 있다. 구간별 픽셀 카운트 차가 총 픽셀수 1780*10% = 178개 이상 차이날 때, 하이 콘트라스트 이미지를 제외한 나머지 타입으로 분류할 수 있다. 위 10% 기준은 각 구간별 픽셀 카운트 차가 큰지를 판단하기 위한 기준으로서, 실시예에 따라 20%, 30% 등으로 그 값이 달라질 수 있다.
Preferably, when the image is classified into other types except for the high contrast image, if the size of N (L), N (M), and N (H) is large, such as 10% or more of the total number of pixels of the image . There is a difference in the values of N (L), N (M), and N (H), so that it can be determined to be a type other than high contrast in terms of arithmetic. However, Is preferable. For example, if the total number of pixels in the image is 1780, then N (L) = 600, N (M) = 590, and N (H) = 590 are classified as dark images in the above classification, Because it is not big, you can just classify it as a high contrast image. When the pixel count difference per section is 1780 * 10% = 178 or more total pixels, it can be classified into other types except for the high contrast image. The above 10% criterion is a criterion for judging whether the pixel count difference is large for each section, and the value may be changed to 20% or 30% depending on the embodiment.

도 4를 참조하면, 이미지가 (a) 어두운 이미지로 분류되면, P2는 고정되어 P3와 동일한 위치에 있고, P1이 위로 이동한다. 그 결과 P0,P1,P2,P3에 의해 베지어 곡선이 생성될 수 있다. Referring to FIG. 4, if the image is classified as (a) dark image, P2 is fixed and is in the same position as P3, and P1 moves up. As a result, Bezier curves can be generated by P0, P1, P2, and P3.

이미지가 (b) 밝은 이미지로 분류되면, P1은 고정되어 P0와 동일한 위치에 있고, P2가 아래방향으로 이동한다. If the image is classified as (b) bright image, P1 is fixed and is at the same position as P0, and P2 moves downward.

이미지가 (c) 역광 이미지로 분류되면, P1은 위로, P2는 아래로 이동한다.If the image is categorized as a backlit image, P1 moves up and P2 moves down.

이미지가 (d) 로우 콘트라스트 이미지로 분류되면, P1은 우측으로, P2은 좌측으로 이동한다. If the image is classified as (d) low contrast image, P1 moves to the right and P2 moves to the left.

이미지가 (e) 하이 콘트라스트 이미지로 분류되면 제어점들은 이동하지 않고, 직선 형태의 베지어 곡선이 생성된다. 직선 형태의 베지어 곡선을 사용하여 콘트라스트 개선을 수행하면 입력값과 개선된 값이 동일하게 되어 실질적으로 이미지에 변화가 없게 된다.
If the image is classified as a (e) high-contrast image, the control points do not move but a straight Bezier curve is generated. When contrast enhancement is performed using a straight-line Bezier curve, the input value and the improved value become equal to each other, so that there is substantially no change in the image.

P1과 P2가 이동하는 거리는 (식 3)의 톤 콘트라스트 비(tonal contrast ratio)에 따라 결정된다.The distance traveled by P1 and P2 is determined by the tonal contrast ratio of (Equation 3).

톤 콘트라스트 비(TC) = TC = N / (Lmax - Lmin +1) ... (식 3)Tone contrast ratio (TC) = TC = N / (Lmax - Lmin + 1)

N은 휘도값 분포에 존재하는 휘도값의 개수이고, Lmax는 상기 휘도값 분포의 최대 휘도값이고, Lmin는 상기 휘도값 분포의 최소 휘도값이다. N is the number of luminance values present in the luminance value distribution, Lmax is the maximum luminance value of the luminance value distribution, and Lmin is the minimum luminance value of the luminance value distribution.

도 5를 참조하여 휘도값 분포에 존재하는 휘도값의 개수 N을 설명한다. 도 5와 같은 히스토그램 분포가 산출되었다고 가정하면, 0~255까지 모든 휘도값에 픽셀 카운트가 존재하는 것이 아니라, 특정 휘도값들에만 픽셀 카운트가 존재할 수 있다. 도 5에서는 9개의 휘도값에 픽셀 카운트가 집중되어 있다. 이 경우 N=9가 된다. 특정 이미지에 대해 N은 1~256의 범위에 있을 수 있다.
The number N of luminance values existing in the luminance value distribution will be described with reference to FIG. Assuming that the histogram distribution as shown in FIG. 5 is calculated, there is no pixel count for all luminance values from 0 to 255, but a pixel count may exist only for specific luminance values. In Fig. 5, pixel counts are concentrated at nine luminance values. In this case, N = 9. For a particular image, N may range from 1 to 256.

제어점 P1, P2의 이동 거리(D)는 (식 4)에 의해 결정된다. The moving distance (D) of the control points P1 and P2 is determined by (Expression 4).

D = (2^N-1)*TC ... (식 4)
D = (2? N-1) * TC (4)

예를 들어, 어떤 이미지의 히스토그램 분포로부터, 이미지의 타입이 역광 이미지로 결정되었고, N=9이고, Lmax=240, Lmin = 5라면 톤 콘트라스트 비(TC)는 다음과 같다.For example, from the histogram distribution of an image, if the type of image is determined as a backlight image, N = 9, Lmax = 240, Lmin = 5, then the tone contrast ratio TC is:

TC = 9 / (240-5+1) = 0.038135TC = 9 / (240-5 + 1) = 0.038135

이미지 타입이 역광 이미지이므로, P1은 위로, P2는 아래로 이동할 것이고, 이동 거리는 다음과 같이 결정된다.Since the image type is a backlit image, P1 will move up and P2 will move down, and the travel distance is determined as follows.

D = (2^9-1)*0.038135 = 9.72457D = (2 9 -1) * 0.038135 = 9.72457

따라서, P1과 P2는 각각 9.72457 유닛 만큼, 즉 9.72457 휘도값 만큼 이동하게 된다. 이 때, 계산량을 줄이기 위해, P1과 P2의 이동량을 반올림하여 정수값으로 결정할 수 있다. 예컨대, 9.72457을 반올림한 10 유닛 만큼 이동시킬 수 있다. Therefore, P1 and P2 are shifted by 9.72457 units, that is, 9.72457 luminance values, respectively. At this time, in order to reduce the calculation amount, the movement amounts of P1 and P2 can be rounded off and determined as an integer value. For example, 9.72457 can be moved by 10 units rounded.

도 6을 참조하면, P1와 P2가 각각 위와 아래로 10 유닛 만큼 이동하는 경우가 도시되어 있다. 도 6에서는 x축과 y축을 [0,255]로 스케일링하여 표시하였다. x축, y축이 [0,1]로 스케일링되어 있는 경우는 계산된 이동 거리를 256으로 나눈 거리 만큼 이동시킬 수 있을 것이다.Referring to FIG. 6, there is shown a case where P1 and P2 move by 10 units respectively up and down. In FIG. 6, the x-axis and the y-axis are scaled by [0, 255]. If the x and y axes are scaled to [0,1], then the computed travel distance will be shifted by the distance divided by 256.

이와 같은 과정을 거쳐 얻어진 제어점 4개로 3차원 베지어 곡선을 생성하면 도 7과 같이 된다. x축은 입력 휘도값이고, y축은 출력 휘도값이다. 주어진 이미지를 도 7과 같은 참조 곡선을 사용하여 새로운 휘도값으로 맵핑함으로써 콘트라스트를 개선할 수 있다. When a three-dimensional Bezier curve is generated with four control points obtained through such a process, as shown in FIG. The x-axis is the input luminance value and the y-axis is the output luminance value. The contrast can be improved by mapping a given image to a new luminance value using the reference curve as shown in Fig.

도 8은 본 발명의 일 실시예에 따른, 적응적 콘트라스트 개선 방법을 나타내는 순서도이다.8 is a flow chart illustrating an adaptive contrast enhancement method, in accordance with an embodiment of the present invention.

단계(S11)에서, 이미지를 읽어들인다. 이미지는 디지털 카메라로 촬영할 수도 있고, 저장 매체에 저장된 이미지 데이터를 읽어들일 수도 있다.In step S11, the image is read. The image can be photographed with a digital camera or image data stored in a storage medium.

단계(S12)에서, 읽어들인 이미지의 RGB 값을 YCbCr로 변환하고, 픽셀별로 휘도 성분인 Y값을 추출한다.In step S12, the RGB value of the read image is converted into YCbCr, and the Y value as the luminance component is extracted for each pixel.

단계(S13)에서, 추출된 픽셀별 Y을 기반으로 저휘도, 중휘도, 고휘도 구간별 픽셀 카운트를 산출한다.In step S13, pixel counts for low luminance, medium luminance, and high luminance sections are calculated based on the extracted Y for each pixel.

단계(S14)에서, 구간별 픽셀 카운트를 기반으로 이미지 타입을 결정한다. 이미지 타입은 전술한 바와 같이 도 4의 5가지 타입 중 하나일 수 있다.In step S14, the image type is determined based on the pixel count for each section. The image type may be one of the five types of FIG. 4 as described above.

단계(S15)에서, 결정된 이미지 타입을 기반으로 제어점의 이동 방향을 결정한다. 전술한 바와 같이, P0, P3은 (0,0)과 (1,1)에 고정되고, P1,P2는 각각 위, 아래, 오른쪽 또는 왼쪽으로 이동된다. In step S15, the direction of movement of the control point is determined based on the determined image type. As described above, P0 and P3 are fixed to (0,0) and (1,1), respectively, and P1 and P2 are moved up, down, right, or left, respectively.

단계(S16)에서, 휘도값의 히스토그램 분포를 기반으로 제어점 P1,P2의 이동 거리를 계산한다. 이 때, 전술한 바와 같이, 휘도값의 히스토그램 분포에서 0~255의 휘도값 중 픽셀 카운트가 존재하는 휘도값들의 수(N)을 추출하여 전술한 바와 같은 방식으로 이동 거리를 계산할 수 있다. In step S16, the movement distance of the control points P1 and P2 is calculated based on the histogram distribution of the luminance values. At this time, as described above, the moving distance can be calculated in the above-described manner by extracting the number N of luminance values in which the pixel count exists among the luminance values of 0 to 255 in the histogram distribution of the luminance values.

단계(S17)에서, 이동된 제어점 P1,P2와 고정된 제어점 P0,P3를 기반으로 3차원 베지어 곡선을 생성한다.In step S17, a three-dimensional Bezier curve is generated based on the moved control points P1 and P2 and the fixed control points P0 and P3.

단계(S18)에서 생성된 베지어 곡선 또는 0~255로 스케일링한 참조 곡선을 사용하여 콘트라스트 개선을 수행한다.The contrast enhancement is performed using the Bezier curve generated in step S18 or the reference curve scaled from 0 to 255. [

Claims (5)

베지어 곡선을 이용한 콘트라스트 개선 방법에 있어서,
이미지를 읽어들이는 단계;
상기 이미지의 휘도값 분포를 산출하는 단계;
상기 휘도값의 저휘도, 중휘도, 고휘도 구간별 픽셀 카운트를 산출하는 단계;
상기 구간별 픽셀 카운트를 기반으로 상기 이미지의 타입을 결정하는 단계;
상기 이미지의 타입을 기반으로 제어점 이동 방향을 결정하는 단계;
상기 이미지의 휘도값 분포를 기반으로 상기 제어점의 이동 거리를 계산하는 단계;
상기 제어점 이동 방향과 상기 제어점 이동 거리를 기반으로 제어점을 이동하고 이동된 제어점을 기반으로 3차원 베지어 곡선을 생성하는 단계; 및
상기 생성된 3차원 베지어 곡선을 사용하여 콘트라스트 개선을 수행하는 단계를 포함하며,
상기 휘도값 분포를 기반으로 제어점의 이동 거리를 계산하는 단계는,
상기 휘도값 분포에 존재하는 휘도값의 개수(N)를 추출하는 단계;
상기 휘도값의 개수를 기반으로 톤 콘트라스트 비(TC)를 계산하는 단계;
상기 톤 콘트라스트 비(TC)를 기반으로 이동 거리를 계산하는 단계를 포함하고,
상기 톤 콘트라스트 비(TC)는,
TC = N / (Lmax - Lmin +1)로 결정되고,
상기 이동 거리(D)는,
D = (2^N-1)*TC로 결정되고,
상기 Lmax는 상기 휘도값 분포의 최대 휘도값이고, Lmin는 상기 휘도값 분포의 최소 휘도값인 콘트라스트 개선 방법.
A method for improving contrast using a Bezier curve,
Reading an image;
Calculating a luminance value distribution of the image;
Calculating a pixel count for each of the low luminance, the medium luminance and the high luminance section of the luminance value;
Determining a type of the image based on the interval pixel count;
Determining a control point movement direction based on the type of the image;
Calculating a movement distance of the control point based on a luminance value distribution of the image;
Moving a control point based on the control point moving direction and the control point moving distance and generating a three-dimensional Bezier curve based on the moved control point; And
And performing contrast enhancement using the generated three-dimensional Bezier curve,
The step of calculating the movement distance of the control point based on the brightness value distribution may include:
Extracting a number N of luminance values existing in the luminance value distribution;
Calculating a tone contrast ratio (TC) based on the number of luminance values;
And calculating a travel distance based on the tone contrast ratio (TC)
The tone contrast ratio (TC)
TC = N / (Lmax - Lmin + 1)
The moving distance (D)
D = (2 " N-1) * TC,
Wherein Lmax is a maximum luminance value of the luminance value distribution, and Lmin is a minimum luminance value of the luminance value distribution.
제1항에 있어서,
상기 이미지 타입은 어두운 이미지, 밝은 이미지, 역광 이미지, 로우 콘트라스트 이미지 또는 하이 콘트라스트 이미지 중 하나인 콘트라스트 개선 방법.
The method according to claim 1,
Wherein the image type is one of a dark image, a bright image, a backlight image, a low contrast image, or a high contrast image.
제1항에 있어서,
상기 구간별 픽셀 카운트를 기반으로 상기 이미지의 타입을 결정하는 단계는,
상기 저휘도 구간의 픽셀 카운트가 상기 중휘도 구간의 픽셀 카운트보다 크고, 상기 저휘도 구간의 픽셀 카운트가 상기 고휘도 구간의 픽셀 카운트보다 크면 어두운 이미지로 결정하고,
상기 고휘도 구간의 픽셀 카운트가 상기 중휘도 구간의 픽셀 카운트보다 크고, 상기 고휘도 구간의 픽셀 카운트보다 크면 밝은 이미지로 결정하고,
상기 저휘도 구간의 픽셀 카운트가 상기 중휘도 구간의 픽셀 카운트보다 크고, 상기 고휘도 구간의 픽셀 카운트가 상기 중휘도 구간의 픽셀 카운트보다 크면 역광 이미지로 결정하고,
상기 중휘도 구간의 픽셀 카운트가 상기 저휘도 구간의 픽셀 카운트보다 크고, 상기 중휘도 구간의 픽셀 카운트가 상기 고휘도 구간의 픽셀 카운트보다 크면 로우 콘트라스트 이미지로 결정하고,
그 외 다른 경우는 하이 콘트라스트 이미지로 결정하는 단계를 포함하는 콘트라스트 개선 방법.
The method according to claim 1,
Wherein determining the type of the image based on the interval pixel count comprises:
Determining a dark image if the pixel count of the low luminance section is greater than the pixel count of the middle luminance section and the pixel count of the low luminance section is greater than the pixel count of the high luminance section,
Determining a bright image if the pixel count of the high luminance section is greater than the pixel count of the middle luminance section and greater than the pixel count of the high luminance section,
Determining a backlight image if a pixel count of the low luminance section is greater than a pixel count of the middle luminance section and a pixel count of the high luminance section is greater than a pixel count of the middle luminance section,
Determining a low contrast image if the pixel count of the medium luminance section is greater than the pixel count of the low luminance section and the pixel count of the medium luminance section is greater than the pixel count of the high luminance section,
And determining the other case as a high contrast image.
삭제delete 제1항에 있어서,
상기 제어점은 상기 계산된 이동 거리(D)를 반올림한 정수만큼 이동되는 콘트라스트 개선 방법.
The method according to claim 1,
Wherein the control point is shifted by an integer rounded by the calculated movement distance (D).
KR1020110063818A 2011-06-29 2011-06-29 A method of enhancing contrast using bezier curve KR101814806B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110063818A KR101814806B1 (en) 2011-06-29 2011-06-29 A method of enhancing contrast using bezier curve

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110063818A KR101814806B1 (en) 2011-06-29 2011-06-29 A method of enhancing contrast using bezier curve

Publications (2)

Publication Number Publication Date
KR20130002698A KR20130002698A (en) 2013-01-08
KR101814806B1 true KR101814806B1 (en) 2018-01-04

Family

ID=47835251

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110063818A KR101814806B1 (en) 2011-06-29 2011-06-29 A method of enhancing contrast using bezier curve

Country Status (1)

Country Link
KR (1) KR101814806B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001134754A (en) * 1999-11-05 2001-05-18 Canon Inc Device and method for processing image
JP2003304396A (en) 2002-04-05 2003-10-24 Noritsu Koki Co Ltd Image processing apparatus and method, program, and recording medium
JP2004282416A (en) 2003-03-17 2004-10-07 Oki Data Corp Method and apparatus for processing image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001134754A (en) * 1999-11-05 2001-05-18 Canon Inc Device and method for processing image
JP2003304396A (en) 2002-04-05 2003-10-24 Noritsu Koki Co Ltd Image processing apparatus and method, program, and recording medium
JP2004282416A (en) 2003-03-17 2004-10-07 Oki Data Corp Method and apparatus for processing image

Also Published As

Publication number Publication date
KR20130002698A (en) 2013-01-08

Similar Documents

Publication Publication Date Title
CN101378514B (en) System and method for enhancing saturation of RGBW image signal
CN101118721B (en) Method, medium, and system compensating shadow areas
US8531484B2 (en) Method and device for generating morphing animation
JP5121294B2 (en) Image processing method, image processing apparatus, program, recording medium, and integrated circuit
JP5859749B2 (en) Contrast improvement method using Bezier curve
CN101360250B (en) Immersion method and system, factor dominating method, content analysis method and parameter prediction method
US20140029841A1 (en) Mapping colors of an image
EP2339533B1 (en) Saliency based video contrast enhancement method
JP2015156607A (en) Image processing method, image processing apparatus, and electronic device
CN103646392B (en) Backlighting detecting and equipment
JP5014274B2 (en) Image processing apparatus, image processing method, image processing system, program, recording medium, and integrated circuit
KR20190113943A (en) Method and apparatus for processing image property map
RU2718423C2 (en) Method of determining depth map for image and device for implementation thereof
CN108876718A (en) The method, apparatus and computer storage medium of image co-registration
CN108876705A (en) Image synthetic method, device and computer storage medium
KR20100059013A (en) Apparautus and method for processing three dimensional image on the multi-layer display
CN106296620A (en) A kind of color rendition method based on rectangular histogram translation
JP2012104098A (en) Contrast enhancement method using hyperbolic tangent curve
Kaur et al. Color image enhancement based on gamma encoding and histogram equalization
KR101814806B1 (en) A method of enhancing contrast using bezier curve
CN109272464A (en) A kind of low-light (level) video real time enhancing method and apparatus based on exponent arithmetic
CN115471413A (en) Image processing method and device, computer readable storage medium and electronic device
CN114266803A (en) Image processing method, image processing device, electronic equipment and storage medium
CN103778658A (en) Visualization method capable of displaying volume data characteristics rapidly
CN113689333A (en) Image enhancement method and device

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