JP4760433B2 - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP4760433B2 JP4760433B2 JP2006039511A JP2006039511A JP4760433B2 JP 4760433 B2 JP4760433 B2 JP 4760433B2 JP 2006039511 A JP2006039511 A JP 2006039511A JP 2006039511 A JP2006039511 A JP 2006039511A JP 4760433 B2 JP4760433 B2 JP 4760433B2
- Authority
- JP
- Japan
- Prior art keywords
- luminance signal
- luminance
- image
- histogram
- region
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims description 36
- 238000003672 processing method Methods 0.000 title claims description 11
- 238000012937 correction Methods 0.000 claims description 99
- 230000001186 cumulative effect Effects 0.000 claims description 72
- 238000004364 calculation method Methods 0.000 claims description 20
- NJPPVKZQTLUDBO-UHFFFAOYSA-N novaluron Chemical compound C1=C(Cl)C(OC(F)(F)C(OC(F)(F)F)F)=CC=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F NJPPVKZQTLUDBO-UHFFFAOYSA-N 0.000 claims description 13
- 230000001934 delay Effects 0.000 claims description 3
- 230000006870 function Effects 0.000 description 108
- 238000006243 chemical reaction Methods 0.000 description 51
- 238000000034 method Methods 0.000 description 20
- 238000010586 diagram Methods 0.000 description 17
- 239000013256 coordination polymer Substances 0.000 description 15
- 230000008569 process Effects 0.000 description 15
- 238000012935 Averaging Methods 0.000 description 8
- 230000008859 change Effects 0.000 description 7
- 238000001514 detection method Methods 0.000 description 6
- 230000006872 improvement Effects 0.000 description 5
- 238000009825 accumulation Methods 0.000 description 4
- 238000005452 bending Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000006866 deterioration Effects 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 238000010606 normalization Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000001154 acute effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000000116 mitigating effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012887 quadratic function Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Description
本発明は、画像処理装置および画像処理方法、並びにプログラムに関し、特に、画像の輝度信号のヒストグラムに基づいてコントラストを補正する場合に用いて好適な画像処理装置および画像処理方法、並びにプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program, and more particularly, to an image processing apparatus, an image processing method, and a program that are suitable for use when correcting contrast based on a histogram of an image luminance signal.
画像のコントラストを補正する手法として、輝度信号のヒストグラムを用いるヒストグラム法が知られている(例えば、特許文献1参照)。 As a method for correcting the contrast of an image, a histogram method using a histogram of luminance signals is known (see, for example, Patent Document 1).
図1は、ヒストグラム法を適用して画像のコントラストを改善する従来のコントラスト補正装置の構成例を示している。 FIG. 1 shows an example of the configuration of a conventional contrast correction apparatus that improves the contrast of an image by applying a histogram method.
このコントラスト補正装置10は、画像の輝度信号Yiを入力として、補正(改善)後の輝度信号Yoを出力するものであり、ヒストグラムデータ取得部11、累積度数変換部12、正規化ゲイン演算部13、LUT輝度変換部14、およびタイミング制御部15から構成される。
The contrast correction apparatus 10 receives an image luminance signal Yi and outputs a corrected (improved) luminance signal Yo. A histogram
コントラスト補正装置10において、前段から入力される輝度信号Yiは、ヒストグラムデータ取得部11、およびLUT輝度変換部14に入力される。
In the contrast correction apparatus 10, the luminance signal Yi input from the previous stage is input to the histogram
ヒストグラムデータ取得部11は、入力された画像1枚分(1フィールド分または1フレーム分)の輝度信号Yiのヒストグラムデータ、すなわち、各輝度の度数(画素の出現頻度)をカウントして累積度数変換部12に出力する。累積度数変換部12は、ヒストグラムデータ取得部11から入力されたヒストグラムデータを各輝度に対する累積度数、すなわち、輝度の最小値に対する度数から当該輝度に対応する度数までの加算値に変換して正規化ゲイン演算部13に出力する。
The histogram
正規化ゲイン演算部13は、累積度数変換部12から入力された各輝度に対応する累積度数を、輝度の最大値(例えば、輝度が8ビットであるならば、255)で除算することにより正規化し、その結果得られる正規化ゲインカーブをLUT輝度変換部14に出力する。
The normalization
LUT輝度変換部14は、正規化ゲイン演算部13から入力された正規化ゲインカーブをルックアップテーブル(以下、LUTと称する)として保持し、コントラスト補正装置10の前段から入力された輝度信号Yiを、保持するLUTを用いて輝度信号Yoに変換し、後段に出力する。
The LUT
タイミング制御部15は、ヒストグラムデータ取得部11乃至LUT輝度変換部14の動作タイミングを制御する。
The
このコントラスト補正装置10によれば、ヒストグラムデータ取得部11により、例えば、入力画像の画素が720(水平)×480(垂直)であり、その輝度が8ビットであって、図2に示すようなヒスグラムデータが取得された場合、累積度数変換部12により、図3に示すような累積度数に変換され、さらに、正規化ゲイン演算部13により、図4に示すような滑らかな右上がりの正規化ゲインカーブが得られる。この正規化ゲインカーブは、LUT輝度変換部14に保持され、入力輝度信号Yiを出力輝度信号Yoに変換する際に参照される。
According to the contrast correction apparatus 10, the histogram
例えば、図2に示されたヒスグラムデータに対応する輝度信号Yiは、図5に示すヒストグラムの輝度信号Yoに変換される。図5に示されたように、出力輝度信号Yoはそのヒストグラムがダイナミックレンジの全域に亘って分布するので、画像のコントラストが改善される。 For example, the luminance signal Yi corresponding to the histogram data shown in FIG. 2 is converted into the luminance signal Yo of the histogram shown in FIG. As shown in FIG. 5, since the output luminance signal Yo has a histogram distributed over the entire dynamic range, the contrast of the image is improved.
しかしながら、実際にコントラストを改善しようとする画像の輝度信号のヒストグラムは、図2のように滑らかな分布であることは少なく、より複雑な分布を示していることが多い。そのような場合、コントラスト補正装置10の正規化ゲイン演算部13によって得られる正規化ゲインカーブは滑らかな右上がりの曲線とならないので、補正後の画像が劣化し見難くなってしまうことがある。
However, the histogram of the luminance signal of an image that is actually intended to improve contrast is rarely a smooth distribution as shown in FIG. 2 and often shows a more complicated distribution. In such a case, the normalized gain curve obtained by the normalized
例えば、入力される輝度信号Yiのヒストグラムが図6に示されるように複数のピークを有しているような場合、得られる正規化ゲインカーブは、図7に示すように曲線の傾きが急峻である部分L1,L2や傾きの変化が急激である部分L3が生じてしまう。 For example, when the histogram of the input luminance signal Yi has a plurality of peaks as shown in FIG. 6, the obtained normalized gain curve has a steep slope as shown in FIG. Some portions L 1 and L 2 and a portion L 3 where the change in inclination is abrupt occur.
この正規化ゲインカーブに基づいて輝度値を補正すると、傾きが急峻である部分L1,L2に基づく変換では、ゲインが大きくなるのでノイズ成分が強調されて画質が劣化してしまうことになる。また、傾きの変化が急激である部分L3に基づく変換では、当該L3をまたぐ輝度信号の波形に大きな歪を発生するため、階調が不足し(つぶれが生じ)画質が劣化してしまうことになる。 When the luminance value is corrected based on this normalized gain curve, the conversion based on the portions L 1 and L 2 having steep slopes increases the gain, so that the noise component is emphasized and the image quality deteriorates. . Further, in the conversion based on the portion L 3 where the change in inclination is abrupt, a large distortion is generated in the waveform of the luminance signal straddling the L 3 , so that the gradation is insufficient (crushing occurs) and the image quality deteriorates. It will be.
本発明はこのような状況に鑑みてなされたものであり、入力された画像の輝度の分布に拘わらず、コントラストを改善できるようにするものである。 The present invention has been made in view of such a situation, and makes it possible to improve the contrast regardless of the luminance distribution of the input image.
本発明の第1の側面である画像処理装置は、画像のコントラストを補正する画像処理装置において、1画像分の輝度信号のヒストグラムを取得する取得手段と、前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成する作成手段と、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出する算出手段と、算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成する生成手段と、前記輝度信号を前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する補正手段とを含む。 An image processing apparatus according to a first aspect of the present invention is an image processing apparatus that corrects contrast of an image, an acquisition unit that acquires a histogram of luminance signals for one image, and a dynamic range of luminance based on the histogram. A creation means for creating a region frequency distribution indicating the number of pixels belonging to each region by dividing into a predetermined number of regions, and an accumulation assuming a case where luminance signals for one image are evenly distributed in the dynamic range of luminance Calculating means for calculating a deviation at a boundary of the area between a straight line corresponding to the histogram and a curve obtained by combining the straight lines based on the area frequency distribution; and dividing the calculated deviation by the number of gradations of the luminance signal. the normalized using the deviation normalized to the coefficient, Awa set of odd function and even function the curve that combines the line based on the region frequency distribution In approximating the input luminance signal before contrast correction, and generation means for generating a gain function to output a luminance signal after contrast correction, the contrast of the image by correcting on the basis of the luminance signal to the gain function And a correcting means for correcting .
本発明の第1の側面である画像処理装置は、前記取得手段、前記作成手段、前記算出手段、および前記生成手段の処理に要する時間だけ、前記輝度信号を遅延して前記補正手段に供給する遅延手段をさらに含むことができる。 The image processing apparatus according to the first aspect of the present invention delays and supplies the luminance signal to the correction unit for a time required for processing by the acquisition unit, the generation unit, the calculation unit, and the generation unit. Delay means may further be included.
本発明の第1の側面である画像処理装置は、前記生成手段によって生成された前記ゲイン関数の時間方向の変動を緩和して前記補正手段に供給する緩和手段をさらに含むことができる。 The image processing apparatus according to the first aspect of the present invention may further include a mitigation unit that mitigates fluctuations in the time direction of the gain function generated by the generation unit and supplies the fluctuation to the correction unit.
本発明の第1の側面である画像処理方法は、画像のコントラストを補正する画像処理装置の画像処理方法において、1画像分の輝度信号のヒストグラムを取得し、前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、前記輝度信号を前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正するステップを含む。 An image processing method according to a first aspect of the present invention is an image processing method of an image processing apparatus that corrects contrast of an image, acquires a histogram of luminance signals for one image, and based on the histogram, a dynamic range of luminance. Is divided into a predetermined number of regions, a region frequency distribution indicating the number of pixels belonging to each region is created, and a cumulative histogram assuming the case where the luminance signal for one image is evenly distributed in the luminance dynamic range A deviation at a boundary of the region between a corresponding straight line and a curve obtained by combining the straight lines based on the region frequency distribution is calculated, and the calculated deviation is normalized by dividing by the number of gradations of the luminance signal. using phased the deviation coefficient was the curve that combines the line based on the region frequency distribution is approximated by a combination of an odd function and even function, Contra Input bets uncorrected luminance signal to generate a gain function to output a luminance signal after contrast correction, comprising the step of correcting the contrast of the image by correcting on the basis of the luminance signal to the gain function.
本発明の第1の側面であるプログラムは、画像のコントラストを補正するためのプログラムであって、1画像分の輝度信号のヒストグラムを取得し、前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、前記輝度信号を前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正するステップを含む処理をコンピュータに実行させる。 A program according to the first aspect of the present invention is a program for correcting the contrast of an image, obtains a histogram of luminance signals for one image, and sets a dynamic range of luminance to a predetermined number based on the histogram. A region frequency distribution indicating the number of pixels belonging to each region is created, and a straight line corresponding to a cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance, , Calculating a deviation at the boundary of the region with a curve obtained by combining straight lines based on the region frequency distribution , normalizing the deviation by dividing the calculated deviation by the number of gradations of the luminance signal, and normalizing the deviation the use in coefficient approximating the curve that combines the line based on the region frequency distribution with a combination of an odd function and even function, the contrast uncorrected Enter the degrees signal, executes a process including a step of correcting the contrast of the image to the computer by generating a gain function to output a luminance signal after contrast correction is corrected based on the luminance signal to the gain function Let
本発明の第1の側面においては、1画像分の輝度信号のヒストグラムに基づき、輝度のダイナミックレンジが所定の数の領域に分割され、各領域に属する画素数を示す領域度数分布が作成され、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、領域度数分布に基づく直線を結合した曲線との、領域の境界における偏差が算出され、算出された偏差が輝度信号の階調数で除算されることにより正規化され、正規化された偏差を係数に用いる、領域度数分布に基づく直線を結合した前記曲線が奇関数および偶関数の組み合わせで近似された、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数が生成されて、輝度信号をゲイン関数に基づいて補正されることにより画像のコントラストが補正される。 In the first aspect of the present invention, based on a histogram of luminance signals for one image, the luminance dynamic range is divided into a predetermined number of regions, and a region frequency distribution indicating the number of pixels belonging to each region is created. Calculates the deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve combining the straight line based on the region frequency distribution is, calculated deviation is normalized by being divided by the number of gradations of the luminance signal, using the normalized deviation coefficient, the curve odd function that combines the linear region based frequency distribution and even functions approximated by a combination of the input luminance signal before contrast correction, it is generated gain function to output a luminance signal after contrast correction, gain the luminance signal The contrast of the image is corrected by being corrected based on the number.
本発明の第2の側面である画像処理装置は、画像のコントラストを補正する画像処理装置において、1画像分の輝度信号のヒストグラムを取得する取得手段と、前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成する作成手段と、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出する算出手段と、算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成する生成手段と、前記ヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度を黒レベルに決定する決定手段と、前記黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数を生成し、生成した前記黒レベル補償関数に基づいて前記ゲイン関数を修正する修正手段と、前記輝度信号を前記修正手段によって修正された前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する補正手段とを含む。 An image processing apparatus according to a second aspect of the present invention is an image processing apparatus that corrects contrast of an image, an acquisition unit that acquires a histogram of a luminance signal for one image, and a dynamic range of luminance based on the histogram. A creation means for creating a region frequency distribution indicating the number of pixels belonging to each region by dividing into a predetermined number of regions, and an accumulation assuming a case where luminance signals for one image are evenly distributed in the dynamic range of luminance Calculating means for calculating a deviation at a boundary of the area between a straight line corresponding to the histogram and a curve obtained by combining the straight lines based on the area frequency distribution; and dividing the calculated deviation by the number of gradations of the luminance signal. the normalized using the deviation normalized to the coefficient, Awa set of odd function and even function the curve that combines the line based on the region frequency distribution In approximating the input luminance signal before contrast correction, and generation means for generating a gain function to output a luminance signal after contrast correction, based on the histogram, the cumulative frequency from the frequency corresponding to the minimum value of the luminance A determination means for determining a luminance having a predetermined value as a black level, a black level compensation function for converting the luminance signal of the black level into a luminance signal of a predetermined pedestal level, and the generated black level compensation function Correction means for correcting the gain function based on the correction function, and correction means for correcting the contrast of the image by correcting the luminance signal based on the gain function corrected by the correction means.
本発明の第2の側面である画像処理装置は、前記取得手段の前段において前記輝度信号の高周波成分を除去する除去手段をさらに含むことができる。 The image processing apparatus according to the second aspect of the present invention may further include a removing unit that removes a high-frequency component of the luminance signal in a stage preceding the obtaining unit.
本発明の第2の側面である画像処理方法は、画像のコントラストを補正する画像処理装置の画像処理方法において、1画像分の輝度信号のヒストグラムを取得し、前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、前記ヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度を黒レベルに決定し、前記黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数を生成し、生成した前記黒レベル補償関数に基づいて前記ゲイン関数を修正し、前記輝度信号を修正済みの前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正するステップを含む。 An image processing method according to a second aspect of the present invention is an image processing method of an image processing apparatus that corrects the contrast of an image, acquires a histogram of luminance signals for one image, and based on the histogram, a dynamic range of luminance. Is divided into a predetermined number of regions, a region frequency distribution indicating the number of pixels belonging to each region is created, and a cumulative histogram assuming the case where the luminance signal for one image is evenly distributed in the luminance dynamic range A deviation at a boundary of the region between a corresponding straight line and a curve obtained by combining the straight lines based on the region frequency distribution is calculated, and the calculated deviation is normalized by dividing by the number of gradations of the luminance signal. using phased the deviation coefficient was the curve that combines the line based on the region frequency distribution is approximated by a combination of an odd function and even function, Contra Input bets uncorrected luminance signal to generate a gain function to output a luminance signal after contrast correction, based on the histogram, the brightness cumulative frequency from the frequency corresponding to the minimum value of luminance becomes the predetermined value Determining a black level, generating a black level compensation function for converting the black level luminance signal into a predetermined pedestal level luminance signal, correcting the gain function based on the generated black level compensation function, Correcting the contrast of the image by correcting the luminance signal based on the corrected gain function.
本発明の第2の側面であるプログラムは、画像のコントラストを補正するためのプログラムであって、1画像分の輝度信号のヒストグラムを取得し、前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、前記ヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度を黒レベルに決定し、前記黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数を生成し、生成した前記黒レベル補償関数に基づいて前記ゲイン関数を修正し、前記輝度信号を修正済みの前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正するステップを含む処理をコンピュータに実行させる。 A program according to a second aspect of the present invention is a program for correcting the contrast of an image, obtains a histogram of luminance signals for one image, and sets a dynamic range of luminance to a predetermined number based on the histogram. A region frequency distribution indicating the number of pixels belonging to each region is created, and a straight line corresponding to a cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance, , Calculating a deviation at the boundary of the region with a curve obtained by combining straight lines based on the region frequency distribution , normalizing the deviation by dividing the calculated deviation by the number of gradations of the luminance signal, and normalizing the deviation the use in coefficient approximating the curve that combines the line based on the region frequency distribution with a combination of an odd function and even function, the contrast uncorrected Enter the degrees signal to generate a gain function to output a luminance signal after contrast correction, determined on the basis of the histogram, the brightness cumulative frequency from the frequency corresponding to the minimum value of luminance becomes the predetermined value to the black level Generating a black level compensation function for converting the black level luminance signal into a predetermined pedestal level luminance signal, correcting the gain function based on the generated black level compensation function, A computer is caused to execute a process including a step of correcting the contrast of the image by performing correction based on the corrected gain function.
本発明の第2の側面においては、1画像分の輝度信号のヒストグラムに基づき、輝度のダイナミックレンジが所定の数の領域に分割され、各領域に属する画素数を示す領域度数分布が作成され、1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、領域度数分布に基づく直線を結合した曲線との領域の境界における偏差が算出され、算出された偏差が輝度信号の階調数で除算されることにより正規化され、正規化された偏差を係数に用いる、領域度数分布に基づく直線を結合した前記曲線が奇関数および偶関数の組み合わせで近似された、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数が生成される。また、生成されたヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度が黒レベルに決定され、黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数が生成され、生成された黒レベル補償関数に基づいて前記ゲイン関数が修正され、輝度信号が修正済みのゲイン関数に基づいて補正されることにより画像のコントラストが補正される。 In the second aspect of the present invention, based on the histogram of the luminance signal for one image, the luminance dynamic range is divided into a predetermined number of regions, and a region frequency distribution indicating the number of pixels belonging to each region is created, The deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve combining the straight line based on the region frequency distribution is calculated. , the calculated deviations are normalized by being divided by the number of gradations of the luminance signal, using the normalized deviation coefficient, the curve that combines the linear region based frequency distribution of odd function and even function A gain function approximated by the combination and having the luminance signal before contrast correction as input and the luminance signal after contrast correction as output is generated. Also, based on the generated histogram, the luminance at which the cumulative frequency from the frequency corresponding to the minimum luminance value becomes a predetermined value is determined as a black level, and the black level luminance signal is converted into a predetermined pedestal level luminance signal. A black level compensation function is generated, the gain function is corrected based on the generated black level compensation function, and the brightness signal is corrected based on the corrected gain function, thereby correcting the contrast of the image. The
本発明の一側面によれば、入力された画像の輝度の分布に拘わらず、コントラストを改善することが可能となる。 According to one aspect of the present invention, the contrast can be improved regardless of the luminance distribution of the input image.
以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。 Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings.
図8は、本発明の一実施の形態であるコントラスト補正装置の第1の構成例を示している。 FIG. 8 shows a first configuration example of a contrast correction apparatus according to an embodiment of the present invention.
このコントラスト補正装置20は、画像の輝度信号Yiを入力として、補正(改善)後の輝度信号Yoを出力するものであり、ヒストグラムデータ取得部21、3バンド累積度数変換部22、偏差算出部23、ゲイン関数生成部24、LUT輝度変換部25、およびタイミング制御部26から構成される。
This contrast correction device 20 receives the luminance signal Yi of the image and outputs a corrected (improved) luminance signal Yo, and includes a histogram
コントラスト補正装置20において、前段から入力される輝度信号Yiは、ヒストグラムデータ取得部21、およびLUT輝度変換部25に入力される。
In the contrast correction device 20, the luminance signal Yi input from the previous stage is input to the histogram
ヒストグラムデータ取得部21は、入力された画像1枚分(1フィールド分または1フレーム分)の輝度信号Yiのヒストグラムデータ、すなわち、各輝度の度数(画素の出現頻度)をカウントして3バンド累積度数変換部22に出力する。
The histogram
図9は、ヒストグラムデータ取得部21の詳細な第1の構成例を示している。ヒストグラムデータ取得部21の第1の構成例は、タイミング制御部26からの制御に従い、輝度信号の有効区間には前段から入力される輝度信号Yiの値を読み出しアドレスとしてRAM32に出力し、輝度信号の無効区間(垂直ブランキング区間など)にはタイミング制御部26から供給される読み出しアドレスをRAM32に出力するスイッチ31、スイッチ31から入力される読み出しアドレスに保持している値を出力するRAM32、およびRAM32から出力された値に1を加算してRAM32に戻す加算部33から構成される。加算部33からRAM32に戻された値は、RAM32の出力前と同じアドレスに保持される。
FIG. 9 shows a detailed first configuration example of the histogram
なお、ヒストグラムデータ取得部21の第2の構成例については、図35を参照して後述する。
A second configuration example of the histogram
図8に戻る。3バンド累積度数変換部22は、ヒストグラムデータ取得部21から入力されるヒストグラムデータに基づき、輝度のダイナミックレンジを3つの領域A1,A2,A3に分割し、度数領域A1,A2,A3にそれぞれ属する輝度を有する画素数(以下、度数領域A1乃至A3の累積度数と称する)をカウントし、その結果(以下、3バンド累積ヒストグラムと称する)を偏差算出部23に出力する。
Returning to FIG. The 3-band cumulative
偏差算出部23は、3バンド累積度数変換部22から入力される3バンド累積ヒストグラムに基づき、例えば図10に示すように、原点(0,0)および(度数領域A3の最大輝度,累積度数最大値)の2点を結ぶ直線fと、原点(0,0)、(度数領域A1の最大輝度,度数領域A1の累積度数)、(度数領域A2の最大輝度,度数領域A1の累積度数+度数領域A2の累積度数)および(度数領域A3の最大輝度,度数領域A1の累積度数+度数領域A2の累積度数+度数領域A3の累積度数)の4点を結ぶ曲線gとを生成し、度数領域A1の最大輝度における直線fと曲線gの偏差a、度数領域A2の最大輝度における直線fと曲線gの偏差bを算出し、さらにa+bおよびa−bを算出して、これらをさらに累積度数の最大値で除算することにより正規化し、正規化されたa,b,a+bおよびa−bをゲイン関数生成部24に出力する。
Based on the three-band cumulative histogram input from the three-band
ゲイン関数生成部24は、鋭角に曲がる曲線gを、偶関数と奇関数が組み合わされた傾きの滑らかなゲイン関数gc(x)に変換する。具体的には、偶関数にはCOS(x)を、奇関数にはsin(x)を用い、偏差算出部23から入力される正規化されたa,b,a+bおよびa−bに基づいて次式のようにゲイン関数gc(x)を生成する。
gc(x)=x+ks・(a-b)・sin(2π(x-xp)/(xw-xp))
+kc・(a+b)・(1-cos(2π(x-xp)/(xw-xp)))
xp≦x≦xw
gc(x)=x
0≦x<xp,xw<x≦xmax
The gain
gc (x) = x + ks ・ (ab) ・ sin (2π (x-xp) / (xw-xp))
+ kc ・ (a + b) ・ (1-cos (2π (x-xp) / (xw-xp)))
xp ≦ x ≦ xw
gc (x) = x
0 ≦ x <xp, xw <x ≦ x max
ただし、xは入力輝度、ks,kcは任意の係数である。また、xmaxは輝度の最大値、xpは輝度のペデスタルレベル、xwは輝度の白ピークレベルであって、輝度が8ビットである場合、0≦x≦255であってxmax=255であり、このとき、ペデスタルレベルxp=16、白レベルxw=235とすることが一般的である。 Here, x is input luminance, and ks and kc are arbitrary coefficients. Also, x max is the maximum luminance value, xp is the luminance pedestal level, xw is the luminance white peak level, and when the luminance is 8 bits, 0 ≦ x ≦ 255 and x max = 255. In this case, the pedestal level xp = 16 and the white level xw = 235 are generally used.
なお、ゲイン関数生成部24において生成されるゲイン関数gc(x)は、偏差a,bの正負の符号に応じて4パターンの形状が生成される。すなわち、第1のパターンは、図11に示されたような-sin関数をベースとする形状である。第2のパターンは、例えば図12に示すヒストグラムに基づいて図13に示す3バンド累積ヒストグラムが生成され、これに基づいて生成される、図14に示すような+cos関数をベースとする形状である。第3のパターンは、例えば図15に示すヒストグラムに基づいて図16に示す3バンド累積ヒストグラムが生成され、これに基づいて生成される、図17に示すような-cos関数をベースとする形状である。第4のパターンは、例えば図18に示すヒストグラムに基づいて図19に示す3バンド累積ヒストグラムが生成され、これに基づいて生成される、図20に示すような+sin関数をベースとする形状である。
Note that the gain function gc (x) generated by the
図8に戻る。ゲイン関数生成部24は、生成したゲイン関数gc(x)をLUT輝度変換部25に出力する。LUT輝度変換部25は、ゲイン関数生成部24から入力されるゲイン関数gc(x)をルックアップテーブル(以下、LUTと称する)として保持し、コントラスト補正装置20の前段から入力された輝度信号Yiを、保持するLUTを用いて輝度信号Yoに変換し、後段に出力する。タイミング制御部15は、ヒストグラムデータ取得部21乃至LUT輝度変換部25の動作タイミングを制御する。
Returning to FIG. The gain
図21は、LUT輝度変換部25の詳細な構成例を示している。LUT輝度変換部25は、スイッチ41およびLUT42から構成される。スイッチ41は、タイミング制御部26からの制御に従い、輝度信号の有効区間には前段から入力される輝度信号Yiの値を読み出しアドレスとしてLUT21に出力する。また、輝度信号の無効区間(垂直ブランキング区間など)にはタイミング制御部26から供給される書き込みアドレスをLUT42に出力する。LUT42は、例えばRAMによって構成され、スイッチ41を介して入力される書き込みアドレスに従ってゲイン関数生成部24から供給されるゲイン関数gc(x)に最大輝度を乗算した値をルックアップテーブルとして記憶し、スイッチ41から入力される読み出しアドレスに保持している値(すなわち、補正後の輝度信号Yo)を出力するLUT42から構成される。
FIG. 21 shows a detailed configuration example of the LUT
次に、コントラスト補正装置20の動作(以下、コントラスト補正処理と称する)について、図22のフローチャートを参照して説明する。 Next, the operation of the contrast correction apparatus 20 (hereinafter referred to as contrast correction processing) will be described with reference to the flowchart of FIG.
コントラスト補正装置20に対して前段から画像の輝度信号Yiが入力されると、ステップS1において、ヒストグラムデータ取得部21は、入力された画像1枚分(1フィールド分または1フレーム分)の輝度信号Yiに対応するヒストグラムデータを生成して3バンド累積度数変換部22に出力する。ステップS2において、3バンド累積度数変換部22は、ヒストグラムデータ取得部21から入力されたヒストグラムデータに基づき、3バンド累積ヒストグラムを生成して偏差算出部23に出力する。
When the luminance signal Yi of the image is input from the previous stage to the contrast correction device 20, in step S1, the histogram
ステップS3において、偏差算出部23は、3バンド累積度数変換部22から入力された3バンド累積ヒストグラムに基づき、正規化したa,b,a+bおよびa−bを算出してゲイン関数生成部24に出力する。ステップS4において、ゲイン関数生成部24は、偏差算出部23から入力された、正規化されているa,b,a+bおよびa−bに基づいてゲイン関数gc(x)を生成し、LUT輝度変換部25に出力する。
In step S <b> 3, the
ステップS5において、LUT輝度変換部25は、ゲイン関数生成部24から入力されたゲイン関数gc(x)をルックアップテーブルとして保持する。ステップS6において、LUT輝度変換部25は、前段から入力された輝度信号Yiを、保持するLUTを用いて輝度信号Yoに変換し、後段に出力する。
In step S <b> 5, the LUT
以上説明したコントラスト補正装置20のコントラスト補正処理によれば、例えば図6に示されたように、ヒストグラムに複数のピークが出現しているような場合であっても、図23に示す3バンド累積ヒストグラムが生成され、図24に示す滑らかな曲線からなる-sin関数の形状をしたゲイン関数gc(x)が生成され、生成されたゲイン関数gc(x)によって輝度が補正されるので、出力される輝度信号Yoは、ノイズ成分が強調されて画質が劣化してしまったり、階調が不足して画質が劣化してしまったりすることなく、適切にコントラストが改善されたものとなる。 According to the contrast correction processing of the contrast correction device 20 described above, even if a plurality of peaks appear in the histogram as shown in FIG. 6, for example, the three-band accumulation shown in FIG. A histogram is generated, a gain function gc (x) having the shape of a -sin function including a smooth curve shown in FIG. 24 is generated, and the luminance is corrected by the generated gain function gc (x), so that it is output. The luminance signal Yo that has the noise component is emphasized and the contrast is appropriately improved without deterioration of the image quality or deterioration of the image quality due to insufficient gradation.
なお、ステップS1乃至S5の処理は、1画像分の輝度信号Yiが入力される期間に実施されるので、LUT輝度変換部25において補正される輝度信号Yiとその際に用いられるLUTとは1画像分のずれが生ずることになるが、通常、前後する画像の輝度特性に大差はないので、この1画像分のずれは、補正後の画像が劣化してしまうなどの問題とはならない。
Note that the processing in steps S1 to S5 is performed during a period in which the luminance signal Yi for one image is input. Therefore, the luminance signal Yi corrected in the LUT
以上で、コントラスト補正装置20によるコントラスト補正処理の説明を終了する。 Above, description of the contrast correction process by the contrast correction apparatus 20 is complete | finished.
次に、補正される輝度信号Yiとその際に用いられるLUTとの1画像分のずれが問題(例えば、シーンチェンジの場面など)にも対応可能なコントラスト補正装置の構成例(以下、第2の構成例と称する)について説明する。 Next, a configuration example of a contrast correction apparatus (hereinafter referred to as a second example) that can cope with a problem (for example, a scene change scene) of a deviation of one image between the luminance signal Yi to be corrected and the LUT used at that time. Will be described.
図25は、コントラスト補正装置の第2の構成例を示している。このコントラスト補正装置50は、図8に示された第1の構成例であるコントラスト補正装置20に対して、LUT輝度変換部25の前段に遅延部51を追加したものであり、その他の構成要素についてはコントラスト補正装置20と同様であって同一の符号を付与している。
FIG. 25 shows a second configuration example of the contrast correction apparatus. This
遅延部51は、コントラスト補正装置50の前段から入力される輝度信号Yiを1画像周期だけ遅延してLUT輝度変換部25に出力する。したがって、コントラスト補正装置50のLUT輝度変換部25においては、補正される輝度信号Yiとその際に用いられるLUTとは1画像分のずれがないので、コントラスト補正装置50よりもより適切にコントラストを補正することが可能となる。
The
次に、コントラスト補正装置20から順次出力される輝度信号Yoの前後する画像間の変化の緩和が十分ではない場合に対応するコントラスト補正装置の構成例(以下、第3の構成例と称する)について説明する。 Next, a configuration example (hereinafter referred to as a third configuration example) of the contrast correction device corresponding to a case where the change between the images before and after the luminance signal Yo sequentially output from the contrast correction device 20 is not sufficiently relaxed. explain.
図26は、コントラスト補正装置の第3の構成例を示している。このコントラスト補正装置60は、図8に示された第1の構成例であるコントラスト補正装置20に対して、ゲイン関数生成部24とLUT輝度変換部25の間にIIRフィルタ61を追加したものであり、その他の構成要素についてはコントラスト補正装置20と同様であって同一の符号を付与している。
FIG. 26 shows a third configuration example of the contrast correction apparatus. This contrast correction device 60 is obtained by adding an IIR filter 61 between the gain
IIR(Infinite Impulse Response)フィルタ61は、ゲイン関数生成部24からのゲイン関数gc(x)を入力としてフィルタリング結果をLUT輝度変換部25に出力する。したがって、LUT輝度変換部25に供給されるゲイン関数gc(x)の時間軸方向の変動が抑止されるので、LUT輝度変換部25において、より安定した、すなわち変化が緩和な輝度変換が可能となる。
An IIR (Infinite Impulse Response) filter 61 receives the gain function gc (x) from the gain
なお、IIRフィルタ61に、前後する画像間のヒストグラムの差分に基づいてシーンチェンジを検出し、検出結果に従ってIIRフィルタの時定数の設定を変更することにより応答速度を改善する機能を設けるようにしてもよい。 The IIR filter 61 is provided with a function for detecting the scene change based on the difference between the histograms of the preceding and following images and changing the time constant setting of the IIR filter according to the detection result to improve the response speed. Also good.
また、コントラスト補正装置60にも、コントラスト補正装置50と同様に、遅延部51を追加するようにしてもよい。
Further, the
次に、ゲインコントロール特性によってコントラストを補正するだけでなく、輝度信号の黒レベルも補正することによって画素値を向上させるコントラスト補正装置の構成例(以下、第4の構成例と称する)について説明する。なお、黒レベルの補正とは、例えばテレビジョン放送信号では送信される黒レベルが撮影条件や記録機材等の違いにより変動しているが、この黒レベルを受信側(例えば、テレビジョン受像機など)の黒レベルであるペデスタルレベルと一致させることにより、画質を向上させることを意味する。 Next, a configuration example (hereinafter referred to as a fourth configuration example) of a contrast correction apparatus that improves the pixel value by correcting not only the contrast by the gain control characteristic but also the black level of the luminance signal will be described. . The black level correction means that, for example, in a television broadcast signal, the transmitted black level fluctuates due to differences in shooting conditions, recording equipment, etc., but this black level is received on the receiving side (for example, a television receiver). ) Means that the image quality is improved by matching the pedestal level which is the black level.
図27は、コントラスト補正装置の第4の構成例を示している。このコントラスト補正装置70は、図8に示された第1の構成例であるコントラスト補正装置20に対して、ローパスフィルタ71、黒レベル検出部72、黒レベル補償ゲイン計算部73、およびIIRフィルタ74を追加したものであり、その他の構成要素についてはコントラスト補正装置20と同様であって同一の符号を付与している。
FIG. 27 shows a fourth configuration example of the contrast correction apparatus. The contrast correction apparatus 70 is different from the contrast correction apparatus 20 of the first configuration example shown in FIG. 8 in that it includes a low-
ヒストグラムデータ取得部21の前段に設けられるローパスフィルタ71は、コントラスト補正装置70の前段からの輝度信号Yiを入力とし、その高周波成分を除去してヒストグラムデータ取得部21に出力する。ローパスフィルタ71によって高周波成分が除去されたことにより、輝度信号Yiの黒レベル付近の変動が抑止される。ローパスフィルタ71は、例えば次式に示されるような比較的簡易な構成のものでよい。
flpf(Z)=(1+2・Z-1+Z-2)/4
ただし、Z-1は1クロック周期分の遅延を表す。
The low-
flpf (Z) = (1 + 2 · Z −1 + Z −2 ) / 4
However, Z −1 represents a delay of one clock cycle.
ヒストグラムデータ取得部21の後段に設けられる黒レベル検出部72は、ヒストグラムデータ取得部21からのヒストグラムデータを入力とし、輝度=0からの累積度数が所定の値(例えば、総画素数の3%の値)に達した輝度を黒レベルBLに決定し、黒レベルBLを黒レベル補償ゲイン計算部73に出力する。
The black
ゲイン関数生成部24の後段に設けられる黒レベル補償ゲイン計算部73は、黒レベル検出部72から入力される黒レベルBLに対応する黒補償量kaを算出し、黒補償量kaに基づいてゲイン関数生成部24から入力されるゲイン関数gc(x)を修正し、その結果得られる修正済みのゲイン関数gct(x)をIIRフィルタ74に出力する。
A black level compensation
IIRフィルタ74は、黒レベル補償ゲイン計算部73からのゲイン関数gct(x)を入力としてフィルタリング結果をLUT輝度変換部25に出力する。
The IIR filter 74 receives the gain function gct (x) from the black level
次に、コントラスト補正装置70の動作(以下、コントラスト補正処理と称する)について、図28のフローチャートを参照し、図6に示されたヒストグラムの輝度信号Yiが入力される場合を例にして説明する。この黒レベル補正を含むコントラスト補正処理は、図6に示されたヒストグラムのように、輝度が小さい範囲での度数が少なく、いわゆる画像の黒浮きが生じているような場合に効果的である。 Next, the operation of the contrast correction apparatus 70 (hereinafter referred to as contrast correction processing) will be described with reference to the flowchart of FIG. 28, taking as an example the case where the luminance signal Yi of the histogram shown in FIG. 6 is input. . The contrast correction process including the black level correction is effective when the frequency in a low luminance range is small and so-called black floating of the image occurs as in the histogram shown in FIG.
コントラスト補正装置70に対して前段から画像の輝度信号Yiが入力されると、ステップS11において、ローパスフィルタ71は、輝度信号Yiのフィルタリングを行い、その結果得られる高周波成分が除去された輝度信号Yiをヒストグラムデータ取得部21に出力する。ステップ12において、ヒストグラムデータ取得部21は、入力された画像1枚分(1フィールド分または1フレーム分)の輝度信号Yiに対応するヒストグラムデータを生成して3バンド累積度数変換部22および黒レベル検出部72に出力する。
When the luminance signal Yi of the image is input from the previous stage to the contrast correction device 70, in step S11, the low-
ステップS13において、3バンド累積度数変換部22は、ヒストグラムデータ取得部21から入力されたヒストグラムデータに基づき、3バンド累積ヒストグラムを生成して偏差算出部23に出力する。いまの例の場合、図23に示された3バンド累積ヒストグラムが出力される。
In step S <b> 13, the 3-band cumulative
ステップS14において、偏差算出部23は、3バンド累積度数変換部22から入力された3バンド累積ヒストグラムに基づき、正規化したa,b,a+bおよびa−bを算出してゲイン関数生成部24に出力する。ステップS15において、ゲイン関数生成部24は、偏差算出部23から入力された、正規化されているa,b,a+bおよびa−bに基づいてゲイン関数gc(x)を生成し、LUT輝度変換部25に出力する。いまの例の場合、図24に示されたゲイン関数gc(x)が出力される。
In step S <b> 14, the
ステップS16において、黒レベル検出部72は、ヒストグラムデータ取得部72から入力されたヒストグラムデータに基づき、輝度=0からの累積度数が所定の値(例えば、総画素数の3%の値)に達した輝度を黒レベルBLに決定し、黒レベルBLを黒レベル補償ゲイン計算部73に出力する。いまの例の場合、輝度=84が黒レベルBLに決定されたとする。
In step S <b> 16, the black
なお、ステップS13乃至S15の処理とステップS16の処理とは、実際には平行して実行される。 Note that the processes in steps S13 to S15 and the process in step S16 are actually executed in parallel.
ステップS17において、黒レベル補償ゲイン計算部73は、図29に示す黒レベルBLにおけるゲイン関数gc(BL)×255と、ペデスタルレベルxpにおけるゲイン関数gc(xp)×255との差である黒伸長量ΔBを算出する。いまの例の場合、黒伸長量ΔBとして46が算出されたとする。
In step S17, the black level compensation
ステップS18において、黒レベル補償ゲイン計算部73は、図30に示すように、輝度のとり得る値の中間付近に折れ曲がり点CPを設定し、折れ曲がり点CP以上の範囲においては傾き1であり、折れ曲がり点CPにおいて滑らかにつながり、折れ曲がり点CP以下の範囲において輝度信号Yiの2次関数であり、黒レベルBLの輝度信号Yiをペデスタルレベルまで引き込むことができるゲインコントロール特性fauto(x)を算出する。
fauto(x)=x−ka・(x−CP)2 0≦x≦CP
fauto(x)=x CP≦x≦255
In step S18, as shown in FIG. 30, the black level compensation
fauto (x) = x−ka ・ (x−CP) 2 0 ≦ x ≦ CP
fauto (x) = x CP ≦ x ≦ 255
さらに、上式に黒レベルBLにおける関係を代入して黒レベル補償量kaを算出する。
BL−ΔB=BL−ka・(BL−CP)2
ΔB=ka・(BL−CP)2
ka=ΔB/(BL−CP)2
いまの例の場合、黒レベル補償量ka=46/(84−CP)2が算出される。
Further, the black level compensation amount ka is calculated by substituting the relationship at the black level BL into the above equation.
BL−ΔB = BL−ka ・ (BL−CP) 2
ΔB = ka · (BL−CP) 2
ka = ΔB / (BL-CP) 2
In the present example, the black level compensation amount ka = 46 / (84−CP) 2 is calculated.
ステップS19において、黒レベル補償ゲイン計算部73は、黒レベル補償量kaに基づいて、折れ曲がり点CP以下のゲイン関数gc(x)を以下のように修正して、修正後のゲイン関数gct(x)を生成し、IIRフィルタ74を介してLUT輝度変換部25に出力する。
gct(x)=x−ka・(x−CP)2 0≦x<xp
gct(x)=x+ks・(a-b)・sin(2π(x-xp)/(xw-xp))
+kc・(a+b)・(1-cos(2π(x-xp)/(xw-xp)))
−ka・(x−CP)2 xp≦x≦CP
gct(x)=x+ks・(a-b)・sin(2π(x-xp)/(xw-xp))
+kc・(a+b)・(1-cos(2π(x-xp)/(xw-xp))) CP<x≦xw
gct(x)=x xw<x≦xmax
In step S19, the black level compensation
gct (x) = x−ka · (x−CP) 2 0 ≦ x <xp
gct (x) = x + ks ・ (ab) ・ sin (2π (x-xp) / (xw-xp))
+ Kc ・ (a + b) ・ (1-cos (2π (x-xp) / (xw-xp)))
−ka ・ (x−CP) 2 xp ≦ x ≦ CP
gct (x) = x + ks ・ (ab) ・ sin (2π (x-xp) / (xw-xp))
+ Kc ・ (a + b) ・ (1-cos (2π (x-xp) / (xw-xp))) CP <x ≦ xw
gct (x) = x xw <x ≦ x max
いまの例の場合、修正後のゲイン関数gct(x)は図31に示すとおりとなる。すなわち、黒レベルBLの輝度信号Yiをペデスタルレベルまで引き込み、かつ、コントラスト改善の特性も有するものとなる。 In this example, the corrected gain function gct (x) is as shown in FIG. That is, the luminance signal Yi of the black level BL is drawn to the pedestal level and has contrast improvement characteristics.
ステップS20において、LUT輝度変換部25は、IIRフィルタ74を介して入力されたゲイン関数gct(x)をルックアップテーブルとして保持する。ステップS21において、LUT輝度変換部25は、前段から入力された輝度信号Yiを、保持するLUTを用いて輝度信号Yoに変換し、後段に出力する。
In step S20, the LUT
以上説明したコントラスト補正装置70のコントラスト補正処理によれば、コントラスト改善と黒レベル補償による安定した黒レベルの再現が可能となる。特に、コントラスト補正装置70では、IIRフィルタ74によりコントラスト改善と黒レベル補償の変動の緩和に関する時定数を共通化することができるので、より安定した時間応答特性とすることができる。よって、コントラスト改善量の係数と黒レベル補償量をより大きく設定することでき、画質改善効果を従来もより引き出すことが可能となる。 According to the contrast correction processing of the contrast correction apparatus 70 described above, stable black level reproduction can be achieved by contrast improvement and black level compensation. In particular, in the contrast correction device 70, the IIR filter 74 can share the time constant related to the contrast improvement and the relaxation of the black level compensation fluctuation, so that a more stable time response characteristic can be obtained. Accordingly, the coefficient of contrast improvement amount and the black level compensation amount can be set larger, and the image quality improvement effect can be further extracted.
図32は、ゲイン関数gc(x)で変換した場合と、ゲイン関数gct(x)で変換した場合の変換後の輝度信号Yoのヒストグラムを示している。ゲイン関数gc(x)で変換した場合では、一見、輝度の全域に亘って度数が分布してようにではあるが、輝度が50以下の度数がほとんど存在せずに黒浮きの状態となる。これに対して、ゲイン関数gct(x)で変換した場合、輝度が50以下の範囲も含めて全域に度数が分布する。したがって、輝度のダイナミックレンジが十分に使用されてコントラスト改善が行われていることがわかる。 FIG. 32 shows histograms of the luminance signal Yo after conversion when converted with the gain function gc (x) and when converted with the gain function gct (x). In the case of conversion with the gain function gc (x), the frequency appears to be distributed over the entire luminance range, but there is almost no frequency with a luminance of 50 or less, and the state is floated black. On the other hand, when converted by the gain function gct (x), the frequencies are distributed over the entire region including the range where the luminance is 50 or less. Therefore, it can be seen that the luminance dynamic range is sufficiently used to improve the contrast.
以上で、コントラスト補正装置70によるコントラスト補正処理の説明を終了する。 Above, description of the contrast correction process by the contrast correction apparatus 70 is complete | finished.
ところで、例えば図33に示す画像のように一様な背景を有する画像の場合、そのヒストグラムは図34に示すように、背景に対応する輝度(150付近)の度数が被写体に対応する輝度信号の度数よりも突出して高くなることが多い。このようなヒストグラムに基づいてコントラスト補正が行われると、被写体のうち、背景の輝度と同じ輝度を有する部分のコントラストが不必要に補正されてしまい不自然で見苦しい画像となってしまう。 Incidentally, for example, in the case of an image having a uniform background such as the image shown in FIG. 33, the histogram shows the luminance signal corresponding to the subject with a frequency corresponding to the background (around 150) as shown in FIG. Often higher than the frequency. When contrast correction is performed based on such a histogram, the contrast of the portion of the subject having the same luminance as the background luminance is unnecessarily corrected, resulting in an unnatural and unsightly image.
このような背景の問題に対処するため、ヒストグラムデータ取得部21の第2の構成例を提案する。図35は、ヒストグラムデータ取得部21の第2の構成例を示している。このヒストグラムデータ取得部21の第2の構成例は、図9に示された当該第1の構成例に対し、背景判定部101、インバータ102、背景画像カウント部103、平均化部104、および加算部105を追加したものであり、その他の構成要素については当該第1の構成例と同様であって同一の符号を付与している。
In order to deal with such a background problem, a second configuration example of the histogram
背景判定部101は、前段から入力される輝度信号Yiが背景の画素に対応するものであるか否かを判定し、背景の画素に対応するものであると判定した場合には1を、背景の画素に対応するものではないと判定した場合には0をインバータ102および背景画素カウント部103に出力する。
The
図36は、背景判定部101の詳細な構成例を示している。背景判定部101は、ローパスフィルタ111、バンドパスフィルタ112、絶対値変換部113、ローパスフィルタ114、比較部115、連続性判定部116から構成される。
FIG. 36 shows a detailed configuration example of the
ローパスフィルタ111は、前段から入力される輝度信号Yiの高周波成分を除去してバンドパスフィルタ112に出力する。バンドパスフィルタ112は、ローパスフィルタ111の出力のうち、所定の周波数帯域のみを絶対値変換部113に通過させる。
The low-
ローパスフィルタ111とバンドパスフィルタ112の周波数特性の2例を図37に示す。なお、同図の横軸は周波数を示し、縦軸はゲインを示している。またfsはサンプリング周波数であり、fs/2はfsでサンプリングされた信号の最大通過周波数である。同図に示すように、ローパスフィルタ111とバンドパスフィルタ112との総合特性は、信号通過帯域の低域側のバンドパスフィルタ112の通過帯域のうち、低域側を通し、高域側を減衰させるものとなる。これにより、輝度信号Yiの高域のノイズ成分が除去される。
Two examples of frequency characteristics of the low-
このような総合特性は、特に、輝度入力信号Yiが、MPEG等の動画像圧縮技術を使用した信号であるような場合、1画像ごとに高域のノイズ成分量が変動していることがあるが、その変動周期で背景部分の判定度数が変動して、ゲイン特性が変動してしまうことを防止することができる。 Such a comprehensive characteristic is that, particularly when the luminance input signal Yi is a signal using a moving image compression technique such as MPEG, the amount of high frequency noise components may vary for each image. However, it is possible to prevent the gain characteristic from fluctuating due to fluctuation of the determination frequency of the background portion in the fluctuation cycle.
図36に戻る。絶対値変換部113は、バンドパスフィルタ112からの入力の絶対値をローパスフィルタ114に出力する。ローパスフィルタ114は、絶対値変換部113の絶対値変換によって発生する高次周波数を減衰させて平滑化し、比較部115に出力する。比較部115は、ローパスフィルタ114の出力と所定の判定レベルとを比較し、ローパスフィルタ部114の出力が所定の判定レベル以上である場合には1を、ローパスフィルタ部114の出力が所定の判定レベルより小さい場合には0を連続性判定部116に出力する。
Returning to FIG. The absolute
連続性判定部116は、図38に示すように、1ビットの入力を1サンプルクロック分だけ遅延して出力する遅延部(D)121乃至124、およびNOR演算部125から構成され、比較部115の出力が5個連続して0である場合には背景であると判定して1を後段に出力し、その他の時には0を後段に出力する。なお、この遅延部の数を増やすことにより、より輝度の変化が平坦な部分を検出することができる。
As shown in FIG. 38, the
図35に戻る。インバータ102は、背景判定部101からの入力を反転して加算部33に出力する。したがって、背景の画素に対応するものではないときのみ、RAM32において保持される度数がインクリメントされることになる。背景画素カウント部103は、背景判定部101からの入力を順次加算し、1画像分の輝度信号Yiが入力された時点でその加算値(背景カウンタ値)を平均化部104に出力した後、背景カウンタ値を0にリセットする。
Returning to FIG.
平均化部104は、背景画素カウント部103から入力された背景カウンタ値を、輝度のダイナミックレンジの階調数(8ビットの場合、256)で除算し、その商を加算部105に出力する。この除算は、例えば、背景画素カウント部103の出力を、輝度のビット数だけ下位ビットから切り捨てることにより簡単に算出される。例えば輝度が8ビットである場合、背景画素カウント部103の出力の下位8ビットを切り捨てればよい。
The averaging unit 104 divides the background counter value input from the background pixel counting unit 103 by the number of gradations of the dynamic range of luminance (256 in the case of 8 bits), and outputs the quotient to the adding
加算部105は、1画像毎にRAM32から出力される背景以外の部分が反映された各輝度の度数に、平均化部104から入力される値を加算して後段に出力する。したがって、加算部105から後段に出力されるヒストグラムの総度数は1画像分の画素数と同数となる。
The adding
次に、ヒストグラムデータ取得部21の第2の構成例の動作(以下、背景を除去したヒストグラム生成処理と称する)について、図39のフローチャートを参照して説明する。 Next, the operation of the second configuration example of the histogram data acquisition unit 21 (hereinafter referred to as a histogram generation process with the background removed) will be described with reference to the flowchart of FIG.
ステップS31において、背景判定部101は、前段から順次入力される輝度信号Yiの1画素に注目し、ステップS32において、その画素が背景に属する画素であるか否かを判定する。
In step S31, the
ステップS32において、背景に属する画素であると判定された場合、処理はステップS33に進められる。ステップS33において、背景判定部101は1をインバータ102および背景カウント部103に出力する。インバータ102に入力された1は、0に反転されて加算部33に供給される。背景画素カウント部103に入力された1は、それまで保持されている背景カウンタ値に加算される(すなわち、背景カウンタ値は1だけインクリメントされる)。したがって、当該画素の度数は、RAM32には反映されず、背景カウンタ値にのみ反映される。
If it is determined in step S32 that the pixel belongs to the background, the process proceeds to step S33. In step S <b> 33, the
反対にステップS32において、背景に属する画素ではないと判定された場合、処理はステップS34に進められる。ステップS34において、背景判定部101は0をインバータ102および背景カウント部103に出力する。インバータ102に入力された0は、1に反転されて加算部33に供給される。背景画素カウント部103に入力された0は、それまで保持されている背景カウンタ値に加算される。したがって、当該画素の度数は、RAM32に反映され(すなわち、当該画素の輝度信号Yiに対応する度数が1だけインクリメントされ)、背景カウンタ値には実質的には反映されない。
Conversely, if it is determined in step S32 that the pixel does not belong to the background, the process proceeds to step S34. In step S <b> 34, the
ステップS35において、背景判定部101は、前段から順次入力される輝度信号Yiの画素を1画像分注目したか否かを判定し、1画像分の画素を注目した判定するまで、処理はステップS31に戻り、それ以降の処理を繰り返す。そして、ステップS35において、1画像分の画素を注目した判定した場合、処理はステップS36に進められる。
In step S35, the
ステップS36において、背景画素カウント部103は、背景カウンタ値を平均化部104に出力する。平均化部104は、背景画素カウント部103から入力された背景カウンタ値を、輝度のダイナミックレンジの階調数で除算し、その商を加算部105に出力する。
In step S <b> 36, the background pixel count unit 103 outputs the background counter value to the averaging unit 104. The averaging unit 104 divides the background counter value input from the background pixel counting unit 103 by the number of gradations of the luminance dynamic range, and outputs the quotient to the adding
ステップS37において、RAM32は、タイミング制御部26からスイッチ31を介して指定された読み出しアドレスに従い、それまで保持していた値を出力することにより、背景を除く1画像分の各輝度の度数を加算部105に出力する。加算部105は、1画像毎にRAM32から出力された背景以外の部分が反映された各輝度の度数に、平均化部104から入力された値を加算して後段に出力する。
In step S <b> 37, the
加算部105から出力されるヒストグラムは、ヒストグラムデータ取得部21に入力される画像が例えば図33に示されたように一様な背景を有するものであっても、図40に示すように、背景に対応する輝度の度数が突出することなく、背景に対応する輝度の度数を輝度の全域に亘って均等に分散される。したがって、このヒストグラムに基づいてコントラスト補正を行えば、被写体のうち、背景の輝度と同じ輝度の部分のコントラストが不必要に補正されてしまい不自然で見苦しい画像となってしまうようなことを抑止することができる。
As shown in FIG. 40, the histogram output from the adding
上述したように、背景を除去してヒストグラムを生成する方法は、自然画像だけでなく、コンピュータグラフィックやアニメーション画像などの平坦な部分が多い画像に対しても、平坦部分の度数を除去する効果がある。さらに、カラーバーなどのテスト信号などでも、同様に、平坦部分が多く存在し、従来例では不必要なゲイン特性を発生していたが、このような作られた信号にも、効果を発揮することができる。 As described above, the method of generating the histogram by removing the background has the effect of removing the frequency of the flat portion not only for a natural image but also for an image having many flat portions such as a computer graphic or an animation image. is there. Furthermore, test signals such as color bars also have a lot of flat parts in the same way, and unnecessary gain characteristics were generated in the conventional example, but they are also effective for such signals. be able to.
以上で、ヒストグラムデータ取得部21の第2の構成例による、背景を除去したヒストグラム生成処理の説明を終了する。
This is the end of the description of the histogram generation process in which the background is removed according to the second configuration example of the histogram
ところで、上述した一連の処理は、ハードウェアにより実行させることもできるが、ソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば図41に示すように構成された汎用のパーソナルコンピュータなどに、記録媒体からインストールされる。 By the way, the series of processes described above can be executed by hardware, but can also be executed by software. When a series of processing is executed by software, a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a recording medium in a general-purpose personal computer configured as shown in FIG.
このパーソナルコンピュータ200は、CPU(Central Processing Unit)201を内蔵している。CPU201にはバス204を介して、入出力インタフェース205が接続されている。バス204には、ROM(Read Only Memory)202およびRAM(Random Access Memory)203が接続されている。
The
入出力インタフェース205には、ユーザが操作コマンドを入力するキーボード、マウス等の入力デバイスよりなる入力部206、合処理対象の画像などを表示するCRT(Cathode Ray Tube)またはLCD(Liquid Crystal Display)等のディスプレイよりなる出力部207、プログラムや各種データを格納するハードディスクドライブなどよりなる記憶部208、およびモデム、LAN(Local Area Network)アダプタなどよりなり、インタネットに代表されるネットワークを介した通信処理を実行する通信部209が接続されている。また、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory)、DVD(Digital Versatile Disc)を含む)、光磁気ディスク(MD(Mini Disc)を含む)、もしくは半導体メモリなどの記録媒体211に対してデータを読み書きするドライブ210が接続されている。
An input /
このパーソナルコンピュータ200に上述した一連の処理を実行させるプログラムは、記録媒体211に格納された状態でパーソナルコンピュータ200に供給され、ドライブ210によって読み出されて記憶部208に内蔵されるハードディスクドライブにインストールされている。記憶部208にインストールされているプログラムは、入力部206に入力されるユーザからのコマンドに対応するCPU201の指令によって、記憶部208からRAM203にロードされて実行される。
A program for causing the
なお、本明細書において、プログラムに基づいて実行されるステップは、記載された順序に従って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。 In this specification, the steps executed based on the program are executed in parallel or individually even if they are not necessarily processed in time series, as well as processes executed in time series according to the described order. It also includes processing.
また、プログラムは、1台のコンピュータにより処理されるものであってもよいし、複数のコンピュータによって分散処理されるものであってもよい。さらに、プログラムは、遠方のコンピュータに転送されて実行されるものであってもよい。 The program may be processed by a single computer, or may be distributedly processed by a plurality of computers. Furthermore, the program may be transferred to a remote computer and executed.
また、本明細書において、システムとは、複数の装置により構成される装置全体を表すものである。 Further, in this specification, the system represents the entire apparatus constituted by a plurality of apparatuses.
なお、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。 The embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.
20 コントラスト補正装置, 21 ヒストグラムデータ取得部, 22 3バンド累積度数変換部, 23 偏差算出部, 24 ゲイン関数生成部, 25 LUT輝度変換部, 51 遅延部 ,61 IIRフィルタ, 71 ローパスフィルタ, 72 黒レベル検出部, 73 黒レベル補償ゲイン計算部, 74 IIRフィルタ, 101 背景判定部, 102 インバータ, 103 背景画素カウント部, 104 平均化部, 105 加算部, 201 CPU, 211 記録媒体 20 contrast correction device, 21 histogram data acquisition unit, 22 3-band cumulative frequency conversion unit, 23 deviation calculation unit, 24 gain function generation unit, 25 LUT luminance conversion unit, 51 delay unit, 61 IIR filter, 71 low pass filter, 72 black Level detection unit, 73 black level compensation gain calculation unit, 74 IIR filter, 101 background determination unit, 102 inverter, 103 background pixel count unit, 104 averaging unit, 105 addition unit, 201 CPU, 211 recording medium
Claims (9)
1画像分の輝度信号のヒストグラムを取得する取得手段と、
前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成する作成手段と、
1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出する算出手段と、
算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成する生成手段と、
前記輝度信号を前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する補正手段と
を含む画像処理装置。 In an image processing apparatus for correcting the contrast of an image,
Obtaining means for obtaining a histogram of luminance signals for one image;
Based on the histogram, creating means for dividing a dynamic range of luminance into a predetermined number of regions and creating a region frequency distribution indicating the number of pixels belonging to each region;
Deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve obtained by combining the straight line based on the region frequency distribution Calculating means for calculating
The calculated the difference was normalized by dividing by the number of gradations of the luminance signal, using said deviation normalized to the coefficient, the curve that combines the line based on the region the frequency distribution of the odd function and even function in combination Generating means for generating a gain function that receives the luminance signal before contrast correction and outputs the luminance signal after contrast correction , approximated by
An image processing apparatus comprising: correction means for correcting the contrast of the image by correcting the luminance signal based on the gain function.
さらに含む請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising a delay unit that delays the luminance signal and supplies the luminance signal to the correction unit for a time required for processing of the acquisition unit, the generation unit, the calculation unit, and the generation unit. .
さらに含む請求項1に記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising a relaxation unit that relaxes a time-direction variation of the gain function generated by the generation unit and supplies the gain function to the correction unit.
1画像分の輝度信号のヒストグラムを取得し、
前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、
1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、
算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、
前記輝度信号を前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する
ステップを含む画像処理方法。 In the image processing method of the image processing apparatus for correcting the contrast of the image,
Obtain a histogram of the luminance signal for one image,
Based on the histogram, the luminance dynamic range is divided into a predetermined number of regions, creating a region frequency distribution indicating the number of pixels belonging to each region,
Deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve obtained by combining the straight line based on the region frequency distribution To calculate
The calculated the difference was normalized by dividing by the number of gradations of the luminance signal, using said deviation normalized to the coefficient, the curve that combines the line based on the region the frequency distribution of the odd function and even function in combination Generate a gain function that receives the luminance signal before contrast correction and outputs the luminance signal after contrast correction , approximated by
An image processing method comprising: correcting the contrast of the image by correcting the luminance signal based on the gain function.
1画像分の輝度信号のヒストグラムを取得し、
前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、
1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、
算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、
前記輝度信号を前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する
ステップを含む処理をコンピュータに実行させるプログラム。 A program for correcting the contrast of an image,
Obtain a histogram of the luminance signal for one image,
Based on the histogram, the luminance dynamic range is divided into a predetermined number of regions, creating a region frequency distribution indicating the number of pixels belonging to each region,
Deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve obtained by combining the straight line based on the region frequency distribution To calculate
The calculated the difference was normalized by dividing by the number of gradations of the luminance signal, using said deviation normalized to the coefficient, the curve that combines the line based on the region the frequency distribution of the odd function and even function in combination Generate a gain function that receives the luminance signal before contrast correction and outputs the luminance signal after contrast correction , approximated by
A program that causes a computer to execute processing including a step of correcting the contrast of the image by correcting the luminance signal based on the gain function.
1画像分の輝度信号のヒストグラムを取得する取得手段と、
前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成する作成手段と、
1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出する算出手段と、
算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成する生成手段と、
前記ヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度を黒レベルに決定する決定手段と、
前記黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数を生成し、生成した前記黒レベル補償関数に基づいて前記ゲイン関数を修正する修正手段と、
前記輝度信号を前記修正手段によって修正された前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する補正手段と
を含む画像処理装置。 In an image processing apparatus for correcting the contrast of an image,
Obtaining means for obtaining a histogram of luminance signals for one image;
Based on the histogram, creating means for dividing a dynamic range of luminance into a predetermined number of regions and creating a region frequency distribution indicating the number of pixels belonging to each region;
Deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve obtained by combining the straight line based on the region frequency distribution Calculating means for calculating
The calculated the difference was normalized by dividing by the number of gradations of the luminance signal, using said deviation normalized to the coefficient, the curve that combines the line based on the region the frequency distribution of the odd function and even function in combination Generating means for generating a gain function that receives the luminance signal before contrast correction and outputs the luminance signal after contrast correction , approximated by
Determining means for determining, on the basis of the histogram, a luminance at which a cumulative frequency from a frequency corresponding to a minimum luminance value is a predetermined value, as a black level;
Correcting means for generating a black level compensation function for converting the black level luminance signal into a predetermined pedestal level luminance signal, and correcting the gain function based on the generated black level compensation function;
An image processing apparatus comprising: correction means for correcting the contrast of the image by correcting the luminance signal based on the gain function corrected by the correction means.
さらに含む請求項6に記載の画像処理装置。 The image processing apparatus according to claim 6, further comprising a removing unit that removes a high-frequency component of the luminance signal before the obtaining unit.
1画像分の輝度信号のヒストグラムを取得し、
前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、
1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、
算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、
前記ヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度を黒レベルに決定し、
前記黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数を生成し、生成した前記黒レベル補償関数に基づいて前記ゲイン関数を修正し、
前記輝度信号を修正済みの前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する
ステップを含む画像処理方法。 In the image processing method of the image processing apparatus for correcting the contrast of the image,
Obtain a histogram of the luminance signal for one image,
Based on the histogram, the luminance dynamic range is divided into a predetermined number of regions, creating a region frequency distribution indicating the number of pixels belonging to each region,
Deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve obtained by combining the straight line based on the region frequency distribution To calculate
The calculated the difference was normalized by dividing by the number of gradations of the luminance signal, using said deviation normalized to the coefficient, the curve that combines the line based on the region the frequency distribution of the odd function and even function in combination Generate a gain function that receives the luminance signal before contrast correction and outputs the luminance signal after contrast correction , approximated by
Based on the histogram, determine the luminance at which the cumulative frequency from the frequency corresponding to the minimum luminance value is a predetermined value as the black level,
Generating a black level compensation function for converting the black level luminance signal into a predetermined pedestal level luminance signal, and correcting the gain function based on the generated black level compensation function;
An image processing method comprising: correcting the contrast of the image by correcting the luminance signal based on the corrected gain function.
1画像分の輝度信号のヒストグラムを取得し、
前記ヒストグラムに基づき、輝度のダイナミックレンジを所定の数の領域に分割し、各領域に属する画素数を示す領域度数分布を作成し、
1画像分の輝度信号が輝度のダイナミックレンジに均等に分布している場合を想定した累積ヒストグラムに対応する直線と、前記領域度数分布に基づく直線を結合した曲線との、前記領域の境界における偏差を算出し、
算出した前記偏差を前記輝度信号の階調数で除算することにより正規化し、正規化した前記偏差を係数に用いる、前記領域度数分布に基づく直線を結合した前記曲線を奇関数および偶関数の組み合わせで近似した、コントラスト補正前の輝度信号を入力、コントラスト補正後の輝度信号を出力とするゲイン関数を生成し、
前記ヒストグラムに基づき、輝度の最小値に対応する度数からの累積度数が所定の値となる輝度を黒レベルに決定し、
前記黒レベルの輝度信号を所定のペデスタルレベルの輝度信号に変換するための黒レベル補償関数を生成し、生成した前記黒レベル補償関数に基づいて前記ゲイン関数を修正し、
前記輝度信号を修正済みの前記ゲイン関数に基づいて補正することにより前記画像のコントラストを補正する
ステップを含む処理をコンピュータに実行させるプログラム。 A program for correcting the contrast of an image,
Obtain a histogram of the luminance signal for one image,
Based on the histogram, the luminance dynamic range is divided into a predetermined number of regions, creating a region frequency distribution indicating the number of pixels belonging to each region,
Deviation at the boundary of the region between the straight line corresponding to the cumulative histogram assuming that the luminance signal for one image is evenly distributed in the dynamic range of luminance and the curve obtained by combining the straight line based on the region frequency distribution To calculate
The calculated the difference was normalized by dividing by the number of gradations of the luminance signal, using said deviation normalized to the coefficient, the curve that combines the line based on the region the frequency distribution of the odd function and even function in combination Generate a gain function that receives the luminance signal before contrast correction and outputs the luminance signal after contrast correction , approximated by
Based on the histogram, determine the luminance at which the cumulative frequency from the frequency corresponding to the minimum luminance value is a predetermined value as the black level,
Generating a black level compensation function for converting the black level luminance signal into a predetermined pedestal level luminance signal, and correcting the gain function based on the generated black level compensation function;
A program that causes a computer to execute processing including a step of correcting the contrast of the image by correcting the luminance signal based on the corrected gain function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006039511A JP4760433B2 (en) | 2006-02-16 | 2006-02-16 | Image processing apparatus, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006039511A JP4760433B2 (en) | 2006-02-16 | 2006-02-16 | Image processing apparatus, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007221446A JP2007221446A (en) | 2007-08-30 |
JP4760433B2 true JP4760433B2 (en) | 2011-08-31 |
Family
ID=38498214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006039511A Expired - Fee Related JP4760433B2 (en) | 2006-02-16 | 2006-02-16 | Image processing apparatus, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4760433B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009058377A (en) * | 2007-08-31 | 2009-03-19 | Hitachi Kokusai Electric Inc | Inspection apparatus |
JP4700721B2 (en) * | 2008-10-10 | 2011-06-15 | 株式会社沖データ | Image processing device |
JP2011228807A (en) * | 2010-04-15 | 2011-11-10 | Nikon Corp | Image processing program, image processing apparatus, and image processing method |
KR102169870B1 (en) | 2013-12-23 | 2020-10-27 | 삼성디스플레이 주식회사 | Image processing controller, display apparatus and driving method thereof |
US10861137B2 (en) * | 2017-09-15 | 2020-12-08 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003281527A (en) * | 2002-02-26 | 2003-10-03 | Sony Internatl Europ Gmbh | Contrast enhancement method and contrast enhancement device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2964492B2 (en) * | 1989-08-15 | 1999-10-18 | ソニー株式会社 | Image processing apparatus and image processing method |
BE1007777A3 (en) * | 1993-11-23 | 1995-10-17 | Philips Electronics Nv | Non-linear signal. |
-
2006
- 2006-02-16 JP JP2006039511A patent/JP4760433B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003281527A (en) * | 2002-02-26 | 2003-10-03 | Sony Internatl Europ Gmbh | Contrast enhancement method and contrast enhancement device |
Also Published As
Publication number | Publication date |
---|---|
JP2007221446A (en) | 2007-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2497301C2 (en) | Device to improve images, method to improve images, software to improve images and device for signal processing | |
JP4556276B2 (en) | Image processing circuit and image processing method | |
US5848181A (en) | Image processing method, image processing apparatus, noise removing method, and noise removing apparatus | |
JP3003561B2 (en) | Gradation conversion method and circuit, image display method and apparatus, and image signal conversion apparatus | |
US8654221B2 (en) | Image processing device and method, and program | |
JP4214457B2 (en) | Image processing apparatus and method, recording medium, and program | |
US20110150353A1 (en) | Information processing apparatus, information processing method, and program | |
JP4760433B2 (en) | Image processing apparatus, image processing method, and program | |
JP2007281767A (en) | Apparatus, program and method for image processing | |
JP2008017458A (en) | Image processor, image processing method, image processing program, and integrated circuit | |
JP5152203B2 (en) | Image processing apparatus, image processing method, image processing program, and image correction apparatus | |
JP4760434B2 (en) | Image processing apparatus, image processing method, and program | |
JP2002290773A (en) | Image enhancing device and image enhancing program | |
US20070258653A1 (en) | Unit for and Method of Image Conversion | |
JP3192407B2 (en) | Image display method and apparatus | |
JP2008259097A (en) | Video signal processing circuit and video display device | |
JP4632100B2 (en) | Image processing apparatus, image processing method, recording medium, and program | |
JP5349204B2 (en) | Image processing apparatus and method, and image display apparatus and method | |
US8665315B2 (en) | Signal processing device, reproducing device, signal processing method and program | |
JP3803231B2 (en) | Tone correction device | |
JP5396626B1 (en) | Image enhancement device and image enhancement method | |
US8571352B2 (en) | Difference image generation device, difference image generation method, and computer readable media | |
JPH11341307A (en) | Image display method and device thereof | |
JP2004172815A (en) | Video signal processing apparatus | |
JP4483407B2 (en) | Video signal processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090205 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110222 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110411 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110510 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110523 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140617 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140617 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |