JP2011205714A - Image processing apparatus and control method of the same - Google Patents

Image processing apparatus and control method of the same Download PDF

Info

Publication number
JP2011205714A
JP2011205714A JP2011158153A JP2011158153A JP2011205714A JP 2011205714 A JP2011205714 A JP 2011205714A JP 2011158153 A JP2011158153 A JP 2011158153A JP 2011158153 A JP2011158153 A JP 2011158153A JP 2011205714 A JP2011205714 A JP 2011205714A
Authority
JP
Japan
Prior art keywords
gradation
value
frequency
histogram
correction parameter
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.)
Granted
Application number
JP2011158153A
Other languages
Japanese (ja)
Other versions
JP5089797B2 (en
Inventor
Yuki Shindo
裕紀 進藤
Izumi Kanai
泉 金井
Tetsuji Saito
哲二 齊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2011158153A priority Critical patent/JP5089797B2/en
Publication of JP2011205714A publication Critical patent/JP2011205714A/en
Application granted granted Critical
Publication of JP5089797B2 publication Critical patent/JP5089797B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technology which can generate a gradation correction parameter for improving a gradation characteristic in a gradation range around a gradation value even when the frequency of the gradation value with which the gradation characteristic should be improved is lower than the frequency of other gradation values.SOLUTION: An image processing apparatus includes: a histogram generation means for generating a histogram from an input image; a detection means for detecting a gradation of interest from the histogram; a gradation correction parameter generation means for generating a gradation correction parameter for improving the gradation characteristic in the gradation range around the gradation of interest; and a correction means for correcting the gradation of the image using the gradation correction parameter. The detection means detects, as the gradation of interest, the gradation value of which the frequency is equal to or more than a predetermined threshold and the maximum value, and which has a variation of the frequency within a predetermined range including the gradation value to be smaller than a predetermined standard in the histogram.

Description

本発明は、画像処理装置及びその制御方法に関する。   The present invention relates to an image processing apparatus and a control method thereof.

従来、入力画像信号の特徴に応じて階調変換処理(例えば、γ変換処理)を実行する画像処理方法がある(以後、このようなγ変換処理をダイナミックγ処理と表記する)。そのような方法は、例えば、特許文献1〜3に開示されている。   Conventionally, there is an image processing method for executing gradation conversion processing (for example, γ conversion processing) in accordance with the characteristics of an input image signal (hereinafter, such γ conversion processing is referred to as dynamic γ processing). Such a method is disclosed in Patent Documents 1 to 3, for example.

具体的には、特許文献1には、1フレーム分の輝度ヒストグラムから累積ヒストグラムを作成し、累積ヒストグラムからγカーブを生成してダイナミックγ処理を行う方法が開示されている。特許文献2,3には、入力画像信号の輝度ヒストグラムにおける低階調側と高階調側のピーク値(極大値となる度数)から暗部と明部の基準値を設定し、設定した基準値に応じたダイナミックγ処理を行う方法が開示されている。特許文献4には、輝度ヒストグラムにおいて度数が所定の上限値以上となる階調値、所定の下限値以下となる階調値に対し、それぞれ、度数を上限値、下限値として階調補正を行う手法が開示されている。   Specifically, Patent Document 1 discloses a method of creating a cumulative histogram from a luminance histogram for one frame, generating a γ curve from the cumulative histogram, and performing dynamic γ processing. In Patent Documents 2 and 3, the reference values of the dark part and the bright part are set from the peak values (frequency that is the maximum value) on the low gradation side and the high gradation side in the luminance histogram of the input image signal, and the set reference values are set. A method of performing the corresponding dynamic γ processing is disclosed. In Patent Document 4, gradation correction is performed using a frequency as an upper limit value and a lower limit value for a gradation value whose frequency is equal to or higher than a predetermined upper limit value and a gradation value where the frequency is equal to or lower than a predetermined lower limit value, respectively. A technique is disclosed.

特開平03−126377号公報Japanese Unexamined Patent Publication No. 03-126377 特開平08−204963号公報Japanese Patent Laid-Open No. 08-204963 特開平06−350873号公報Japanese Patent Laid-Open No. 06-350873 特開2001−125535号公報JP 2001-125535 A

しかしながら、累積ヒストグラムからγカーブを生成する従来の方法では、度数が多い階調値周辺の階調範囲の階調性が高められる。そのため、階調性を高めることが望ましい階調値(画像内の物体の階調値)であっても、当該階調値の度数が他の階調値の度数に比べて少ない場合には階調性をあまり高めることができない虞がある。
具体的には、図18(a)のように、主な階調値が階調値aであるレターボックス、主な階調値が階調値bである物体B、主な階調値が階調値cである物体Cを含む画像(入力画像信号)が入力されたとする。輝度ヒストグラムにおける階調値aの度数が、階調値b,cの度数よりもはるかに多い場合には、階調値a周辺で累積度数が大きく変化し、階調値b,c周辺では累積度数があまり変化しないような累積ヒストグラムが作成される。そのような累積ヒストグラムからγカーブを生成すると、階調値a周辺の階調範囲の階調性が高められ、階調値b,c周辺の階調範囲の階調性はあまり高められない。
However, in the conventional method of generating the γ curve from the cumulative histogram, the gradation property of the gradation range around the gradation value having a high frequency is improved. For this reason, even if the gradation value (the gradation value of the object in the image) for which it is desirable to improve the gradation property is used, if the frequency of the gradation value is smaller than the frequencies of the other gradation values, There is a possibility that the tonality cannot be improved so much.
Specifically, as shown in FIG. 18A, a letterbox whose main gradation value is the gradation value a, an object B whose main gradation value is the gradation value b, and the main gradation value are It is assumed that an image (input image signal) including the object C having the gradation value c is input. When the frequency of the gradation value a in the luminance histogram is much higher than the frequencies of the gradation values b and c, the accumulated frequency changes greatly around the gradation value a and is accumulated around the gradation values b and c. A cumulative histogram is created so that the frequency does not change much. When the γ curve is generated from such a cumulative histogram, the gradation property of the gradation range around the gradation value a is enhanced, and the gradation property of the gradation range around the gradation values b and c is not so enhanced.

低階調側と高階調側のピーク値から暗部と明部の基準値を設定する方法においても同様である。例えば、画像が同一色の領域(例えば、レターボックスや、データ放送などの図形や文字)を含む場合に、輝度ヒストグラムにおいてその領域の階調値の度数が大きくなってしまう(そのような階調値は大きなピーク値を示す)。そのため、最適な基準値を設定すること、ひいては、最適なγカーブを生成することができず、小さいピーク値を示す階調値周辺の階調範囲の階調性を高めることができない。   The same applies to the method of setting the dark and bright reference values from the low and high gradation peak values. For example, when an image includes an area of the same color (for example, a letterbox or a graphic or character such as data broadcasting), the frequency of the gradation value of that area becomes large in the luminance histogram (such gradation The value shows a large peak value). For this reason, it is not possible to set an optimal reference value, and hence it is impossible to generate an optimal γ curve, and it is not possible to improve the gradation of the gradation range around the gradation value indicating a small peak value.

輝度ヒストグラムにおいて度数を所定の値に制限して階調補正を行う手法においても同様である。例えば、図18(a)のような画像が入力されたとする。図18(b)に示す
ように、そのような画像から得られた輝度ヒストグラムにおいて、レターボックスの階調値aの度数が予め定められた制限値を上回っていた場合には、階調値aの度数は予め定められた制限値に補正される。その結果、図18(c)のような累積ヒストグラム(輝度ヒストグラムの低階調側から高階調側へ向かって度数を累積して作成したヒストグラム)が得られる。階調値cの度数は階調値bよりも比較的多い。そのため、階調値aの度数を制限値にしたことにより、階調値a周辺の階調範囲と階調値c周辺の階調範囲の階調性を高めるγカーブを生成することが可能となる。しかしながら、このような方法を用いたとしても、比較的度数が多い階調値周辺の階調範囲の階調性を高めるγカーブが生成されるため、比較的度数の少ない階調値周辺の階調範囲の階調性はあまり高められない。例えば、図18の例では、階調値b周辺の階調範囲の階調性はあまり高められない。
The same applies to the technique of performing gradation correction by limiting the frequency to a predetermined value in the luminance histogram. For example, assume that an image as shown in FIG. As shown in FIG. 18B, in the luminance histogram obtained from such an image, when the frequency of the letterbox tone value a exceeds a predetermined limit value, the tone value a The frequency is corrected to a predetermined limit value. As a result, a cumulative histogram (a histogram created by accumulating frequencies from the low gradation side to the high gradation side of the luminance histogram) as shown in FIG. 18C is obtained. The frequency of the gradation value c is relatively higher than the gradation value b. Therefore, by setting the frequency of the gradation value a as a limit value, it is possible to generate a γ curve that enhances the gradation of the gradation range around the gradation value a and the gradation range around the gradation value c. Become. However, even when such a method is used, a γ curve is generated that enhances the gradation of the gradation range around the gradation value having a relatively high frequency, and therefore the gradation around the gradation value having a relatively low frequency is generated. The gradation of the gradation range cannot be improved so much. For example, in the example of FIG. 18, the gradation of the gradation range around the gradation value b is not so improved.

そこで、本発明は、階調性を高めることが望ましい階調値の度数が他の階調値の度数に比べて少ない場合であっても、その階調値周辺の階調範囲の階調性を高める階調補正パラメータを生成することのできる技術を提供することを目的とする。   In view of the above, the present invention provides a gradation property in the gradation range around the gradation value even when the frequency of the gradation value for which the gradation property is desirable is smaller than the frequency of the other gradation values. It is an object of the present invention to provide a technique capable of generating a tone correction parameter that enhances image quality.

本発明の画像処理装置は、入力された画像からヒストグラムを作成するヒストグラム作成手段と、ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値を注目階調として検出する検出手段と、注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成する階調補正パラメータ生成手段と、階調補正パラメータを用いて画像の階調を補正する補正手段と、を有し、検出手段は、ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値との条件を満たす階調値が複数存在する場合に、条件を満たす複数の階調値のうち少なくとも最も低階調側の階調値および最も高階調側の階調値を注目階調とする。   An image processing apparatus according to the present invention includes a histogram creation unit that creates a histogram from an input image, and a gradation value that has a frequency that is greater than or equal to a predetermined threshold and a maximum value in the histogram, and includes a predetermined value that includes the gradation value. Detection means for detecting a gradation value whose amount of variation in frequency within a range is smaller than a predetermined reference as an attention gradation, and input / output gradation conversion for improving gradation characteristics of a predetermined gradation range including the attention gradation A gradation correction parameter generation unit that generates a gradation correction parameter having characteristics; and a correction unit that corrects the gradation of an image using the gradation correction parameter. The detection unit has a predetermined frequency in the histogram. There are multiple tone values that satisfy the condition of a tone value that is equal to or greater than the threshold value and that has a maximum value and that has a frequency variation within a predetermined range including the tone value that is smaller than a predetermined reference value. When to , And at least most gradation value of low gradation side and the most high tone gradation value of the target gradation of satisfying plurality of tone values.

本発明の画像処理装置の制御方法は、入力された画像からヒストグラムを作成するヒストグラム作成ステップと、ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値を注目階調として検出する検出ステップと、注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成する階調補正パラメータ生成ステップと、階調補正パラメータを用いて画像の階調を補正する補正ステップと、を有し、検出ステップでは、ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値との条件を満たす階調値が複数存在する場合に、条件を満たす複数の階調値のうち少なくとも最も低階調側の階調値および最も高階調側の階調値が注目階調とされる。   The control method of the image processing apparatus according to the present invention includes a histogram creation step of creating a histogram from an input image, and a gradation value in which the frequency is equal to or greater than a predetermined threshold and has a maximum value, Detecting step for detecting a gradation value whose amount of variation in frequency within a predetermined range including an attention level is smaller than a predetermined reference as an attention gradation, and input / output for improving the gradation of a predetermined gradation range including the attention gradation A gradation correction parameter generating step for generating a gradation correction parameter having gradation conversion characteristics; and a correction step for correcting the gradation of the image using the gradation correction parameter. In the detection step, A condition in which the frequency is a gradation value that is equal to or greater than a predetermined threshold and has a maximum value, and the variation amount of the frequency within a predetermined range including the gradation value is smaller than a predetermined reference value When the tone value satisfying there are multiple tone value of at least most gradation value of low gradation side and the most high gradation side is a target gradation of satisfying plurality of tone values.

本発明によれば、階調性を高めることが望ましい階調値の度数が他の階調値の度数に比べて少ない場合であっても、その階調値周辺の階調範囲の階調性を高める階調補正パラメータを生成することのできる技術を提供することができる。   According to the present invention, even when the frequency of the gradation value for which it is desirable to improve the gradation is smaller than the frequency of the other gradation values, the gradation of the gradation range around the gradation value It is possible to provide a technique capable of generating a tone correction parameter that enhances the image quality.

実施例1に係る画像処理装置の機能構成を示すブロック図。1 is a block diagram showing a functional configuration of an image processing apparatus according to Embodiment 1. FIG. 入力された画像と分割された領域の一例を示す図。The figure which shows an example of the area | region divided | segmented into the input image. 暗部注目階調を検出する際の処理の流れの一例を示すフローチャート。The flowchart which shows an example of the flow of a process at the time of detecting a dark part attention gradation. 輝度ヒストグラムの一例を示す図。The figure which shows an example of a brightness | luminance histogram. 図4の輝度ヒストグラムにおける各階調値と度数を示す表。The table | surface which shows each gradation value and frequency in the brightness | luminance histogram of FIG. 明部注目階調を検出する際の処理の流れの一例を示すフローチャート。The flowchart which shows an example of the flow of a process at the time of detecting a bright part attention gradation. 各領域の暗部注目階調と明部注目階調の一例を示す図。The figure which shows an example of the dark part attention gradation of each area | region, and a bright part attention gradation. 実施例1において生成されるγカーブの一例を示す図。FIG. 5 is a diagram illustrating an example of a γ curve generated in the first embodiment. 実施例2に係る画像処理装置の機能構成を示すブロック図。FIG. 4 is a block diagram illustrating a functional configuration of an image processing apparatus according to a second embodiment. 実施例2における輝度値の補正方法を説明するための図。FIG. 10 is a diagram for explaining a luminance value correction method according to the second embodiment. 実施例3に係る画像処理装置の機能構成を示すブロック図。FIG. 9 is a block diagram illustrating a functional configuration of an image processing apparatus according to a third embodiment. 注目階調が検出されない画像の輝度ヒストグラムの一例を示す図。The figure which shows an example of the brightness | luminance histogram of the image from which attention gradation is not detected. 実施例3における暗部γカーブ選択処理の一例を示すフローチャート。10 is a flowchart illustrating an example of dark portion γ curve selection processing according to the third embodiment. 予め記憶されている階調補正パラメータの一例を示す図。The figure which shows an example of the gradation correction parameter memorize | stored beforehand. 階調値0の度数が多い画像の輝度ヒストグラムの一例を示す図。The figure which shows an example of the brightness | luminance histogram of an image with much frequency of gradation value 0. FIG. 実施例4に係る画像処理装置の機能構成を示すブロック図。FIG. 10 is a block diagram illustrating a functional configuration of an image processing apparatus according to a fourth embodiment. ヒストグラム前処理部による処理前後のヒストグラムの一例を示す図。The figure which shows an example of the histogram before and behind the process by a histogram pre-processing part. 従来技術を説明する図。The figure explaining a prior art.

<実施例1>
以下、本発明の実施形態に係る画像処理装置及びその制御方法の具体的な実施例1について説明する。
図1は本実施例に係る画像処理装置の機能構成を示すブロック図である。図1に示すように、本実施例に係る画像処理装置100は、ヒストグラム作成部101、注目階調検出部102、γカーブ生成部103、γ変換部104、入力端子105、出力端子106を有する。
<Example 1>
Hereinafter, a specific example 1 of the image processing apparatus and the control method thereof according to the embodiment of the present invention will be described.
FIG. 1 is a block diagram illustrating a functional configuration of the image processing apparatus according to the present embodiment. As illustrated in FIG. 1, the image processing apparatus 100 according to the present embodiment includes a histogram creation unit 101, a target tone detection unit 102, a γ curve generation unit 103, a γ conversion unit 104, an input terminal 105, and an output terminal 106. .

ヒストグラム作成部101は、入力された画像(入力画像信号)から輝度ヒストグラムを作成する(ヒストグラム作成手段)。本実施例では、ヒストグラム作成部101は、入力された画像を複数の領域に分割し、領域毎の輝度ヒストグラムを作成するものとする。具体的には、1920×1080の画像が入力され、当該画像が、図2に示すように、4×4の領域(互いに大きさの等しい16の領域)に分割されるものとする。また、図2に示すように、ヒストグラム作成部101は、各領域を識別情報(番号など;図中blk1〜blk16)により区別することができるものとする。   The histogram creation unit 101 creates a luminance histogram from the input image (input image signal) (histogram creation means). In this embodiment, the histogram creation unit 101 divides an input image into a plurality of regions, and creates a luminance histogram for each region. Specifically, a 1920 × 1080 image is input, and the image is divided into 4 × 4 regions (16 regions having the same size) as shown in FIG. Further, as shown in FIG. 2, the histogram creation unit 101 can distinguish each region by identification information (number or the like; blk1 to blk16 in the figure).

なお、本実施例では、作成される輝度ヒストグラムにおいて、階調は、階調値0〜255の256カテゴリに分類されているものとする。但し、カテゴリの数はこれに限らず、例えば128や512であってもよい。また、図2の例では入力された画像を16の領域に分割する場合について示しているが、領域の数はこれに限らない。例えば、入力された画像を10×5や5×3の領域に分割してもよいし、分割しなくてもよい。   In the present embodiment, it is assumed that the gradation is classified into 256 categories of gradation values 0 to 255 in the created luminance histogram. However, the number of categories is not limited to this, and may be 128 or 512, for example. Moreover, although the example of FIG. 2 shows the case where the input image is divided into 16 areas, the number of areas is not limited to this. For example, the input image may be divided into 10 × 5 and 5 × 3 regions, or may not be divided.

注目階調検出部102は、ヒストグラム作成部101で作成された輝度ヒストグラムから注目階調を検出する(検出手段)。具体的には、領域毎の輝度ヒストグラムからそれぞれ注目階調を検出する。注目階調とは、階調性を高めることが望ましい階調値であり、輝度ヒストグラムにおいて以下の条件を満たす階調値である。
条件1.度数が所定の閾値以上である。
条件2.度数が極大値(ピーク値)である。
条件3.その階調値(注目階調か否かの判断の対象とする階調値)を含む所定範囲内の度数の変動量(局所的な度数の変化量)が所定の基準よりも小さい。
The target gradation detection unit 102 detects the target gradation from the luminance histogram created by the histogram creation unit 101 (detection means). Specifically, the target gradation is detected from the luminance histogram for each region. The target gradation is a gradation value for which it is desirable to improve gradation, and is a gradation value that satisfies the following conditions in the luminance histogram.
Condition 1. The frequency is greater than or equal to a predetermined threshold.
Condition 2. The frequency is a maximum value (peak value).
Condition 3. The frequency variation amount (local frequency variation amount) within a predetermined range including the gradation value (the gradation value to be determined whether or not it is the target gradation) is smaller than a predetermined reference.

条件1は、度数が極めて少ない階調値をノイズとして除外するための条件である。
階調性を高めることが望ましい階調値では、輝度ヒストグラムにおいて度数がピークとして現れる。条件2は、そのような階調値を検出するための条件である。度数が極大値か否かは、例えば、注目階調か否かの対象とする階調値の度数と、その前後それぞれm個の
階調値(mは1以上の整数)の度数とを比較することにより判断すればよい。なお、対象とする階調値の前後それぞれm個の階調値とは、対象とする階調値よりも小さなm個の階調値と、対象とする階調値よりも大きなm個の階調値を意味する。
また、画像が同一色(同一の階調値)の領域(例えば、レターボックスや、データ放送などの図形や文字)を含む場合に、そのような領域の階調値の度数は、その階調値の前後の階調値の度数に比べ極端に多くなる。即ち、その階調値を含む所定範囲内の度数の変動量が大きくなる(前の階調値や後の階調値からの度数の変化が急峻となる)。そのような領域(そのような領域の階調値)は、階調性を高める必要が無いため、除外する必要がある。条件3はそのような領域を除外するための条件である(即ち、所定の基準とは、同一色の領域を除外するための基準である)。条件3を満たすか否かは、例えば、注目階調とするか否かの判断の対象とする階調値の度数と、その階調値を除く前後それぞれn個の階調値(nは1以上の整数)の度数の総和に所定値を乗算した値とを比較することにより判断すればよい。
Condition 1 is a condition for excluding a gradation value having an extremely low frequency as noise.
In a gradation value where it is desirable to improve gradation, the frequency appears as a peak in the luminance histogram. Condition 2 is a condition for detecting such a gradation value. Whether or not the frequency is a maximum value is compared, for example, by comparing the frequency of the target gradation value whether or not it is the target gradation and the frequency of m gradation values (m is an integer of 1 or more) before and after that. It is sufficient to judge by doing so. Note that m tone values before and after the target tone value are m tone values smaller than the target tone value and m levels larger than the target tone value. Means the key value.
In addition, when an image includes an area of the same color (same gradation value) (for example, a letterbox or a graphic or character such as data broadcast), the frequency of the gradation value of such area is the gradation. It becomes extremely larger than the frequency of the gradation values before and after the value. That is, the fluctuation amount of the frequency within a predetermined range including the gradation value becomes large (the change in the frequency from the previous gradation value and the subsequent gradation value becomes steep). Such a region (the gradation value of such a region) needs to be excluded because it is not necessary to improve the gradation. Condition 3 is a condition for excluding such an area (that is, the predetermined standard is a standard for excluding an area of the same color). Whether or not the condition 3 is satisfied depends on, for example, the frequency of the gradation value to be determined as to whether or not it is the target gradation and n gradation values before and after the gradation value (n is 1). It may be determined by comparing a value obtained by multiplying the sum of the frequencies of the above integers) by a predetermined value.

例えば、注目階調か否かの判断の対象とする階調値をi、階調値iの度数をh(i)、所定の閾値をth、mをra1、nをra2、所定値をkとすると、条件1〜3は、それぞれ、以下の式1〜3のように表すことができる。

Figure 2011205714
Figure 2011205714
Figure 2011205714
For example, i is the gradation value to be determined as to whether or not it is the target gradation, h (i) is the frequency of the gradation value i, th is the predetermined threshold, m is ra1, n is ra2, and the predetermined value is k. Then, the conditions 1 to 3 can be expressed as the following formulas 1 to 3, respectively.
Figure 2011205714
Figure 2011205714
Figure 2011205714

閾値thは、例えば、1つの輝度ヒストグラムの総度数(即ち、1つの領域内の総画素数)の1%の値である。本実施例では、1920×1080の画像を互いに大きさの等しい16の領域に分割しているため、閾値thを1920×1080÷16×0.01=1296とする。なお、閾値thは、総度数の1%に限らず、階調性を高めることが望ましい階調値を検出することができれば、どのような値であってもよい(例えば、総度数の3%や5%など)。   The threshold th is, for example, a value of 1% of the total frequency of one luminance histogram (that is, the total number of pixels in one area). In this embodiment, since the 1920 × 1080 image is divided into 16 regions having the same size, the threshold th is set to 1920 × 1080 ÷ 16 × 0.01 = 1296. Note that the threshold th is not limited to 1% of the total frequency, and may be any value as long as it is possible to detect a gradation value for which it is desirable to improve gradation (for example, 3% of the total frequency). And 5%).

式2において、本実施例では、ra1を2とする。即ち、度数h(i)と、その前後それぞれ2つの階調値の度数h(i−2),h(i−1),h(i+1),h(i+2)とを比較し、度数h(i)が最も大きかった場合に階調値iが条件2を満たすものとする(度数h(i)を極大値とみなす)。なお、ra1は2に限らず、度数h(i)が極大値であるか否か判断することができれば、どのような値であってもよい(例えば、3や5など)。   In Expression 2, ra1 is set to 2 in this embodiment. That is, the frequency h (i) is compared with the frequencies h (i−2), h (i−1), h (i + 1), and h (i + 2) of the two gradation values before and after the frequency h (i). It is assumed that the gradation value i satisfies the condition 2 when i) is the largest (the frequency h (i) is regarded as the maximum value). Note that ra1 is not limited to 2, but may be any value as long as it can be determined whether the frequency h (i) is a maximum value (for example, 3 or 5).

式3において、本実施例では、ra2を2、kを1.2とする。即ち、度数h(i)が、階調値iを除く前後それぞれ2つの階調値の度数の総和の1.2倍(=1.2×(h(i−2)+h(i−1)+h(i+1)+h(i+2)))より小さい場合に階調値iが条件3を満たすものとする(階調値iを含む所定範囲内の度数の変動量が所定の基準よりも小さいものとみなす)。なお、ra2やkはこの値に限らず、同一色の領域の階調を除外することができれば、どのような値であってもよい(例えば、ra2=3や5、k=1.5や2など)。なお、本実施例では、度数h(i)と、階調値iを除く前後それぞれn個の階調値の度数の総和に所定値kを乗算した値とを比較するものとしたが、度数h(i
)と、階調値iを含む前後それぞれn個の階調値の度数の総和に所定値kを乗算した値とを比較してもよい。同一色の領域の階調値を除外することができれば、どのように判断してもよい。
In Equation 3, in this embodiment, ra2 is 2 and k is 1.2. That is, the frequency h (i) is 1.2 times the sum of the frequencies of the two gradation values before and after the gradation value i is excluded (= 1.2 × (h (i−2) + h (i−1)). + H (i + 1) + h (i + 2))), the gradation value i satisfies the condition 3 (the fluctuation amount of the frequency within the predetermined range including the gradation value i is smaller than the predetermined reference) I reckon). Note that ra2 and k are not limited to these values, and may be any values as long as gradations of the same color region can be excluded (for example, ra2 = 3 or 5, k = 1.5 or 2). In this embodiment, the frequency h (i) is compared with the value obtained by multiplying the sum of the frequencies of n gradation values before and after the gradation value i by a predetermined value k. h (i
) And a value obtained by multiplying the sum of the frequencies of n gradation values before and after the gradation value i by a predetermined value k. Any method may be used as long as the gradation value of the region of the same color can be excluded.

また、本実施例では、注目階調検出部102は、階調を暗部と明部に分けて、暗部の注目階調(暗部注目階調)と明部の注目階調(明部注目階調)を検出するものとする。具体的には、階調2〜126を暗部とする。暗部の低階調側から条件1〜3を満たす階調値を探索し、最初に検出された条件1〜3を満たす階調値を暗部注目階調とする。即ち、条件1〜3を満たす階調値が複数存在する場合には、最も低階調側の階調値を暗部注目階調とする。また、階調2〜126の中に条件1〜3を満たす階調値が無い場合には、注目階調検出部102は階調128を暗部注目階調とする。なお、本実施例では、前後それぞれ2つの階調値の度数を注目階調の検出に用いるため、階調値0,1を探索範囲から除いている。   In the present embodiment, the attention gradation detection unit 102 divides the gradation into a dark part and a light part, and the dark part attention gradation (dark part attention gradation) and the bright part attention gradation (bright part attention gradation). ) Shall be detected. Specifically, gradations 2 to 126 are dark portions. A gradation value satisfying conditions 1 to 3 is searched from the low gradation side of the dark part, and a gradation value satisfying conditions 1 to 3 detected first is set as a dark part attention gradation. That is, when there are a plurality of gradation values satisfying the conditions 1 to 3, the lowest gradation value is set as the dark part attention gradation. Further, when there are no gradation values satisfying the conditions 1 to 3 in the gradations 2 to 126, the attention gradation detecting unit 102 sets the gradation 128 as the dark part attention gradation. In the present embodiment, the gradation values 0 and 1 are excluded from the search range because the frequencies of the two gradation values before and after are used for detecting the attention gradation.

そして、階調値130〜253を明部とする。明部の高階調側から条件1〜3を満たす階調値を探索し、最初に検出された条件1〜3を満たす階調値を明部注目階調とする。即ち、条件1〜3を満たす階調値が複数存在する場合には、最も高階調側の階調値を明部注目階調とする。また、階調値130〜253の中に条件1〜3を満たす階調値が無い場合には、注目階調検出部102は階調値128を明部注目階調とする。なお、本実施例では、前後それぞれ2つの階調値の度数を注目階調の検出に用いるため、階調値254,255を探索範囲から除いている。   The gradation values 130 to 253 are set as bright portions. A gradation value satisfying conditions 1 to 3 is searched from the high gradation side of the bright part, and a gradation value satisfying conditions 1 to 3 detected first is set as a bright part attention gradation. That is, when there are a plurality of gradation values satisfying the conditions 1 to 3, the gradation value on the highest gradation side is set as the bright part attention gradation. In addition, when there are no gradation values satisfying the conditions 1 to 3 among the gradation values 130 to 253, the attention gradation detection unit 102 sets the gradation value 128 as the bright part attention gradation. In the present embodiment, the gradation values 254 and 255 are excluded from the search range because the frequencies of the two gradation values before and after are used for detecting the attention gradation.

以下、暗部注目階調を検出する際の処理の流れについて、図3〜5を用いて説明する。図3は暗部注目階調を検出する際の処理の流れの一例を示すフローチャートである。図4は輝度ヒストグラムの一例を示す図であり、以下では、図4の輝度ヒストグラムから注目階調を検出する場合について説明する。図5は、図4の輝度ヒストグラムにおける各階調値と度数を示す表である。上述したように、本実施例では暗部注目階調を検出する際に、低階調側(階調値2)から順に処理対象の階調値iとする。なお、図5において省略されている階調値2〜13は条件1〜3を満たしていないものとし、以下では階調値14以降に対する処理について詳しく説明する。   Hereinafter, the flow of processing when detecting a dark part attention gradation will be described with reference to FIGS. FIG. 3 is a flowchart showing an example of the flow of processing when detecting dark part attention gradations. FIG. 4 is a diagram illustrating an example of a luminance histogram. Hereinafter, a case where a target gradation is detected from the luminance histogram of FIG. 4 will be described. FIG. 5 is a table showing each gradation value and frequency in the luminance histogram of FIG. As described above, in this embodiment, when the dark part attention gradation is detected, the gradation value i to be processed is sequentially set from the low gradation side (gradation value 2). Note that the gradation values 2 to 13 omitted in FIG. 5 do not satisfy the conditions 1 to 3, and the processing for the gradation value 14 and later will be described in detail below.

まず、ステップS11では、注目階調検出部102が階調値iが階調値127か否かを判定する。階調値iが階調値127である場合には(ステップS11:YES)、注目階調検出部102は階調値128を注目階調とし、処理を終了する。階調値14は階調値127ではないため(ステップS11:NO)、ステップS12に進む。ステップS12では、注目階調検出部102が階調値iが条件1(式1)を満たすか否かを判定する。階調値14の度数は500(<1296)であり、階調値14は条件1を満たしていないため(ステップS12:NO)、ステップS11へ戻る。また、ステップS11へ戻る際に、注目階調検出部102はiに1を加算する。即ち、階調値14の次には、階調値15が処理対象の階調値とされる。   First, in step S11, the target gradation detection unit 102 determines whether the gradation value i is the gradation value 127 or not. When the gradation value i is the gradation value 127 (step S11: YES), the attention gradation detection unit 102 sets the gradation value 128 as the attention gradation and ends the processing. Since the gradation value 14 is not the gradation value 127 (step S11: NO), the process proceeds to step S12. In step S12, the target gradation detection unit 102 determines whether the gradation value i satisfies the condition 1 (Equation 1). The frequency of the gradation value 14 is 500 (<1296). Since the gradation value 14 does not satisfy the condition 1 (step S12: NO), the process returns to step S11. Further, when returning to step S11, the target gradation detecting unit 102 adds 1 to i. That is, after the gradation value 14, the gradation value 15 is the gradation value to be processed.

ステップS11において、階調値15は階調値127ではないと判定されるため、ステップS12に進む。ステップS12において、階調値15の度数は2500であり、階調値15は条件1を満たしているため(ステップS12:YES)、ステップS13に進む。ステップS13では、注目階調検出部102が階調値iが条件2(式2)を満たすか否かを判定する。階調値15の度数2500は階調値16の度数12000より小さく、階調値15は条件2を満たしていないため(ステップS13:NO)、注目階調検出部102がiに1を加算し、ステップS11へ戻る。   In step S11, since it is determined that the gradation value 15 is not the gradation value 127, the process proceeds to step S12. In step S12, the frequency of the gradation value 15 is 2500, and the gradation value 15 satisfies the condition 1 (step S12: YES), so the process proceeds to step S13. In step S13, the target gradation detection unit 102 determines whether or not the gradation value i satisfies the condition 2 (Equation 2). Since the frequency 2500 of the gradation value 15 is smaller than the frequency 12000 of the gradation value 16 and the gradation value 15 does not satisfy the condition 2 (step S13: NO), the target gradation detection unit 102 adds 1 to i. Return to step S11.

ステップS11において、階調値16は階調値127ではないと判定されるため、ステ
ップS12に進む。階調値16は条件1,2を満たしているため(ステップS12,13:YES)、ステップS14に進む。ステップS14では、注目階調検出部102が階調値iが条件3(式3)を満たすか否かを判定する。階調値14,15,17,18の度数の総和は6000であり、この値に1.2を乗算した値は7200である。階調値16の度数は7200より大きく、階調値16は条件3を満たしていないため(ステップS14:NO)、注目階調検出部102がiに1を加算し、ステップS11へ戻る。
In step S11, since it is determined that the gradation value 16 is not the gradation value 127, the process proceeds to step S12. Since the gradation value 16 satisfies the conditions 1 and 2 (steps S12 and 13: YES), the process proceeds to step S14. In step S14, the target gradation detection unit 102 determines whether or not the gradation value i satisfies the condition 3 (Equation 3). The sum of the frequencies of the gradation values 14, 15, 17, and 18 is 6000, and a value obtained by multiplying this value by 1.2 is 7200. Since the frequency of the gradation value 16 is greater than 7200 and the gradation value 16 does not satisfy the condition 3 (step S14: NO), the attention gradation detection unit 102 adds 1 to i, and the process returns to step S11.

このように条件1〜3を満たしている(度数が式1〜3を満たしている)階調が探索される。図4,5に示す輝度ヒストグラムの場合には、条件1〜3を満たす階調として、最初に階調値32が検出される。そのため、階調値32が暗部注目階調とされる。   In this way, the gradation that satisfies the conditions 1 to 3 (the frequency satisfies the expressions 1 to 3) is searched. In the case of the luminance histograms shown in FIGS. 4 and 5, the gradation value 32 is first detected as the gradation satisfying the conditions 1 to 3. Therefore, the gradation value 32 is set as the dark part attention gradation.

次に、明部注目階調を検出する際の処理の流れについて、図6を用いて説明する。図6は明部注目階調を検出する際の処理の流れの一例を示すフローチャートである。上述したように、本実施例では明部注目階調を検出する際に、高階調側(階調値253)から順に処理対象の階調値iとする。   Next, the flow of processing when detecting a bright part attention gradation will be described with reference to FIG. FIG. 6 is a flowchart illustrating an example of a processing flow when detecting a bright part attention gradation. As described above, in this embodiment, when the bright part attention gradation is detected, the gradation value i to be processed is sequentially set from the high gradation side (gradation value 253).

まず、注目階調検出部102が階調値iが階調値129か否かを判定する(ステップS21)。階調値iが階調値129である場合には(ステップS21:YES)、注目階調検出部102は階調値128を注目階調とし、処理を終了する。処理対象の階調値iが階調129でない場合には、ステップS22へ進む。ステップS22〜S24の処理は、それぞれ、図3のステップS12〜S14の処理と同様のため、説明は省略する。階調値iが条件1〜3の少なくともいずれか1つを満たさない場合には、注目階調検出部102がiから1を減算し、ステップS21へ戻る。   First, the target gradation detection unit 102 determines whether or not the gradation value i is the gradation value 129 (step S21). When the gradation value i is the gradation value 129 (step S21: YES), the attention gradation detection unit 102 sets the gradation value 128 as the attention gradation and ends the processing. If the gradation value i to be processed is not the gradation 129, the process proceeds to step S22. The processes in steps S22 to S24 are the same as the processes in steps S12 to S14 in FIG. When the gradation value i does not satisfy at least one of the conditions 1 to 3, the attention gradation detection unit 102 subtracts 1 from i, and the process returns to step S21.

以上述べた方法で、各領域の暗部注目階調及び明部注目階調が検出される。
本実施例では、各領域の暗部注目階調が図7(a)のように検出され、明部注目階調が図7(b)のように検出されたとする。
By the method described above, the dark part attention gradation and the bright part attention gradation of each region are detected.
In this embodiment, it is assumed that the dark part attention gradation of each region is detected as shown in FIG. 7A and the bright part attention gradation is detected as shown in FIG. 7B.

γカーブ生成部103は、注目階調周辺の階調範囲の階調性を高めるための階調補正パラメータ(γカーブ)を生成する(階調補正パラメータ生成手段)。本実施例では、入力された画像について、1つのγカーブを生成する。具体的には、領域毎に検出された複数の暗部注目階調のうち、最も低階調側の階調周辺の階調範囲、及び、領域毎に検出された複数の明部注目階調のうち、最も高階調側の階調周辺の階調範囲の階調性を高めるためのγカーブが生成されるものとする。それにより、黒つぶれや白とびを抑制することが可能となる。   The γ curve generation unit 103 generates a gradation correction parameter (γ curve) for enhancing the gradation of the gradation range around the target gradation (gradation correction parameter generation means). In this embodiment, one γ curve is generated for the input image. Specifically, among a plurality of dark part attention gradations detected for each area, a gradation range around the lowest gradation side gradation and a plurality of bright part attention gradations detected for each area. Of these, a γ curve is generated for enhancing the gradation of the gradation range around the gradation on the highest gradation side. Thereby, it is possible to suppress blackout and overexposure.

本実施例では、図7(a)に示すように、最も低階調側の暗部注目階調(暗部注目階調の最小値)は、領域blk6の階調値25である。また、図7(b)に示すように、最も高階調側の明部注目階調(明部注目階調の最大値)は、領域blk2の階調値230である。そのため、図8に示すように、暗部に対しては階調値25周辺の階調範囲の階調性を高くし、明部に対しては階調値230周辺の階調範囲の階調性を高めるためのγカーブが生成される(図8の実線)。なお、図8の破線は、入力された画像をそのまま出力する場合のγカーブ(変換直線)である。ここでは、中間階調値127付近におけるγカーブを直線的なγカーブとする例を示している。ただし、中間階調値127付近におけるγカーブは、直線的なγカーブではなく、中間階調値127付近の度数に応じたγカーブであってもよい。例えば、図4に示したように中間階調値127付近の度数が大きい場合(度数が所定の閾値よりも大きく、かつピーク値となっている場合)は、中間階調値127周辺の階調範囲の階調性を高めるようなγカーブとしてもよい。   In this embodiment, as shown in FIG. 7A, the dark part attention gradation on the lowest gradation side (the minimum value of the dark part attention gradation) is the gradation value 25 of the region blk6. Further, as shown in FIG. 7B, the bright part attention gradation (the maximum value of the bright part attention gradation) on the highest gradation side is the gradation value 230 of the region blk2. Therefore, as shown in FIG. 8, the gradation property of the gradation range around the gradation value 25 is increased for the dark portion, and the gradation property of the gradation range around the gradation value 230 for the bright portion. A γ curve is generated to increase the value (solid line in FIG. 8). The broken line in FIG. 8 is a γ curve (conversion straight line) when the input image is output as it is. Here, an example in which the γ curve near the intermediate gradation value 127 is a linear γ curve is shown. However, the γ curve in the vicinity of the intermediate gradation value 127 may not be a linear γ curve, but may be a γ curve corresponding to the frequency in the vicinity of the intermediate gradation value 127. For example, as shown in FIG. 4, when the frequency near the intermediate gradation value 127 is large (when the frequency is larger than a predetermined threshold and has a peak value), the gradation around the intermediate gradation value 127 is obtained. It may be a γ curve that enhances the gradation of the range.

γ変換部104は、階調補正パラメータを用いて、入力された画像の階調を補正する(
補正手段)。そして、補正後の信号(画像信号)を表示装置(不図示)に出力する。表示装置は、例えば、複数の電子放出素子を備えるディスプレイ、プラズマディスプレイ、液晶ディスプレイ、有機ELディスプレイなどである。なお、図1では、画像処理装置100と表示装置とが別体の構成を例示したが、画像処理装置100と表示装置とが一体型の構成であってもよい。
The γ conversion unit 104 corrects the gradation of the input image using the gradation correction parameter (
Correction means). Then, the corrected signal (image signal) is output to a display device (not shown). Examples of the display device include a display including a plurality of electron-emitting devices, a plasma display, a liquid crystal display, and an organic EL display. In FIG. 1, the configuration in which the image processing apparatus 100 and the display apparatus are separated is illustrated, but the image processing apparatus 100 and the display apparatus may be integrated.

以上述べたように、本実施例によれば、階調性を高めることが望ましい階調値(条件1〜3を満たす階調値)の度数が他の階調の度数に比べて少ない場合であっても、その階調値周辺の階調範囲の階調性を高めるための階調補正パラメータを生成することができる。また、同一色の領域の階調値は条件3を満たさないため、注目階調から除外される。それにより、良好なコントラストで入力された画像を表示することができる。   As described above, according to the present embodiment, in the case where the frequency of the gradation value (gradation value satisfying the conditions 1 to 3) for which it is desirable to improve the gradation is less than the frequency of the other gradations. Even if it exists, the gradation correction parameter for improving the gradation property of the gradation range around the gradation value can be generated. Further, the gradation value of the same color region does not satisfy the condition 3, and is excluded from the attention gradation. Thereby, an input image can be displayed with a good contrast.

また、本実施例では、暗部注目階調周辺の階調範囲と明部注目階調周辺の階調範囲の階調性を高める階調補正パラメータを生成することにより、暗部や明部の微妙なコントラスト(陰影などのコントラスト)を良好に表現することができる。さらに、本実施例では、入力された画像を複数の領域に分割して領域毎に注目階調を検出するため、コントラストを表現する必要がある領域が画像内の一部であったとしても、その部分のコントラストを良好に表現することができる。   Further, in this embodiment, by generating a gradation correction parameter that enhances the gradation of the gradation range around the dark part attention gradation and the gradation range around the bright part attention gradation, the subtlety of the dark part and the bright part is generated. The contrast (contrast such as shadow) can be expressed well. Further, in the present embodiment, the input image is divided into a plurality of regions and the target gradation is detected for each region. Therefore, even if the region where the contrast needs to be expressed is a part of the image, The contrast of the portion can be expressed well.

なお、本実施例では、領域毎に検出された複数の注目階調の内、最も低階調側の注目階調周辺の階調範囲および最も高階調側の注目階調周辺の階調範囲の階調性を高めるための階調補正パラメータを生成する構成とした。しかしながら、階調補正パラメータの生成方法はこれに限らない。領域毎に検出された複数の注目階調の内、少なくとも最も低階調側の注目階調周辺の階調範囲の階調性を高めるための階調補正パラメータを生成すれば、黒つぶれを抑制することができる。領域毎に検出された複数の注目階調の内、少なくとも最も高階調側の注目階調周辺の階調範囲の階調性を高めるための階調補正パラメータを生成すれば、白とびを抑制することができる。入力された画像を複数の領域に分割しない場合には、入力された画像の輝度ヒストグラムにおいて、条件1〜3を満たす複数の階調値の内、少なくとも最も低階調側の階調値や最も高階調側の階調値を注目階調とすればよい。それにより黒つぶれや白とびを抑制することができる。また、最も低階調側の階調値や最も高階調側の階調値に限らず、条件1〜3を満たす階調値を注目階調とすれば、従来階調性を高めることができなかった階調値(階調性を高めることが望ましい階調値)周辺の階調範囲の階調性を高めることができる。
また、本実施例では、ヒストグラム作成部101が輝度ヒストグラムを生成する場合について説明したが、これに限定されるものではない。例えば、横軸を輝度値の階調ではなく、R(赤)画素値とG(緑)画素値とB(青)画素値の平均値の階調としたヒストグラムや、R(赤)画素値とG(緑)画素値とB(青)画素値のうちの最大値の階調としたヒストグラムであってもよい。また、横軸をG(緑)画素値の階調としたヒストグラム等、R(赤)画素値とG(緑)画素値とB(青)画素値のうちのいずれかの画素値の階調としたヒストグラムであってもよい。このような画像の特徴を表すヒストグラムであれば、本実施例を適用可能である。
In the present embodiment, among the plurality of target gradations detected for each region, the gradation range around the attention gradation on the lowest gradation side and the gradation range around the attention gradation on the highest gradation side. A gradation correction parameter for enhancing gradation is generated. However, the gradation correction parameter generation method is not limited to this. Blackening can be suppressed by generating gradation correction parameters to improve the gradation of the gradation range around the attention gradation on the lowest gradation side among multiple attention gradations detected for each region. can do. If a gradation correction parameter is generated to improve the gradation of the gradation range around the attention gradation on the highest gradation side among a plurality of attention gradations detected for each region, overexposure is suppressed. be able to. When the input image is not divided into a plurality of regions, in the luminance histogram of the input image, among the plurality of gradation values satisfying the conditions 1 to 3, at least the gradation value on the lowest gradation side or the most The gradation value on the high gradation side may be set as the attention gradation. Thereby, it is possible to suppress blackout and overexposure. Further, not only the gradation value on the lowest gradation side and the gradation value on the highest gradation side, but if the gradation value satisfying conditions 1 to 3 is set as the attention gradation, the conventional gradation can be improved. It is possible to improve the gradation in the gradation range around the gradation value that has not been present (a gradation value for which it is desirable to improve the gradation).
In the present embodiment, the case where the histogram creation unit 101 generates a luminance histogram has been described, but the present invention is not limited to this. For example, a histogram in which the horizontal axis is not a gradation of luminance values, but a gradation of an average value of R (red) pixel values, G (green) pixel values, and B (blue) pixel values, or an R (red) pixel value Alternatively, it may be a histogram having the maximum gradation of the G (green) pixel value and the B (blue) pixel value. Also, the gradation of one of the pixel values of the R (red) pixel value, the G (green) pixel value, and the B (blue) pixel value, such as a histogram with the horizontal axis representing the gradation of the G (green) pixel value A histogram may be used. The present embodiment can be applied to any histogram representing such image characteristics.

<実施例2>
以下、本発明の実施形態に係る画像処理装置及びその制御方法の具体的な実施例2について説明する。
図9は本実施例に係る画像処理装置の機能構成を示すブロック図である。図9に示すように、本実施例に係る画像処理装置200は、ヒストグラム作成部101、注目階調検出部102、領域γカーブ生成部201、補間部202、入力端子105、出力端子106を有する。なお、実施例1と同様の機能には同じ符号を付し、その説明は省略する。
<Example 2>
A specific example 2 of the image processing apparatus and the control method thereof according to the embodiment of the present invention will be described below.
FIG. 9 is a block diagram illustrating a functional configuration of the image processing apparatus according to the present embodiment. As illustrated in FIG. 9, the image processing apparatus 200 according to the present embodiment includes a histogram creation unit 101, a target gradation detection unit 102, a region γ curve generation unit 201, an interpolation unit 202, an input terminal 105, and an output terminal 106. . In addition, the same code | symbol is attached | subjected to the function similar to Example 1, and the description is abbreviate | omitted.

領域γカーブ生成部201は、領域毎に、その領域の注目階調周辺の階調範囲の階調性を高めるための階調補正パラメータを生成する(階調補正パラメータ生成手段)。例えば、図7(a),(b)に示すように、領域blk1では階調値100が暗部注目階調とされ、階調128が明部注目階調とされる。そのため、領域blk1に対しては、階調値100周辺の階調範囲と階調値128周辺の階調範囲の階調性を高めるためのγカーブが生成される。同様に領域blk2〜blk16の夫々に対してγカーブが生成される(即ち、合計16のγカーブが生成される)。   The area γ curve generation unit 201 generates, for each area, a gradation correction parameter for enhancing the gradation of the gradation range around the target gradation in the area (gradation correction parameter generation unit). For example, as shown in FIGS. 7A and 7B, in the region blk1, the gradation value 100 is the dark part attention gradation, and the gradation 128 is the bright part attention gradation. Therefore, for the region blk1, a γ curve is generated for enhancing the gradation of the gradation range around the gradation value 100 and the gradation range around the gradation value 128. Similarly, γ curves are generated for each of the regions blk2 to blk16 (that is, a total of 16 γ curves are generated).

補間部202は、入力された画像の画素毎に、第1の輝度値と第2の輝度値とを合成し、合成された輝度値をその画素の最終的な輝度値とすることにより、入力された画像の階調を補正する。第1の輝度値は、処理対象の画素の属する領域(第1の領域)に対して生成された階調補正パラメータを用いて算出された輝度値である。第2の輝度値は、第1の領域に隣接する領域(第2の領域)に対して生成された階調補正パラメータを用いて算出された輝度値である。そして、補間部202は、第1の輝度値と第2の輝度値を、その画素と、第1の領域及び第2の領域との位置関係に基づいた重みで合成する。処理対象の画素の輝度値をその画素の属する領域に対して生成された階調補正パラメータで補正すると、即ち、領域毎に異なるγカーブで輝度値を補正すると、隣接する2つの領域間で輝度値の不連続による境界線が生じる虞がある。本実施例では、上述した方法で輝度値を補正することにより、そのような境界線の発生を抑制することができる。   The interpolation unit 202 combines the first luminance value and the second luminance value for each pixel of the input image, and uses the combined luminance value as the final luminance value of the pixel, thereby The gradation of the image is corrected. The first luminance value is a luminance value calculated using the gradation correction parameter generated for the region (first region) to which the pixel to be processed belongs. The second luminance value is a luminance value calculated using a gradation correction parameter generated for a region (second region) adjacent to the first region. Then, the interpolation unit 202 combines the first luminance value and the second luminance value with weights based on the positional relationship between the pixel, the first region, and the second region. If the luminance value of the pixel to be processed is corrected with the tone correction parameter generated for the region to which the pixel belongs, that is, if the luminance value is corrected with a γ curve that differs for each region, the luminance between the two adjacent regions There may be a boundary line due to discontinuity of values. In this embodiment, the generation of such a boundary line can be suppressed by correcting the luminance value by the method described above.

なお、第2の領域は1つであってもよいし複数であってもよい。本実施例では、第1の領域に隣接する全ての領域を第2の領域とする。即ち、領域blk1が第1の領域である場合には、領域blk2,blk5,blk6が第2の領域とされる。また、領域blk6が第1の領域である場合には、領域blk1,blk2,blk3,blk5,blk7,blk9,blk10,blk11が第2の領域とされる。   The second area may be one or plural. In this embodiment, all the areas adjacent to the first area are set as the second area. That is, when the region blk1 is the first region, the regions blk2, blk5, and blk6 are set as the second region. When the region blk6 is the first region, the regions blk1, blk2, blk3, blk5, blk7, blk9, blk10, and blk11 are the second regions.

以下、具体例について、図10を用いて説明する。
図10のように領域blk1に属する画素Pの輝度値は、領域blk1とその周囲の領域blk2,blk5,blk6にそれぞれ対応する4つのγカーブを用いて補正される。具体的には、領域blk1の中心座標から画素Pの位置までの横方向の距離x、縦方向の距離yを用いて、それらのγカーブにより得られる輝度値を重み付けし、合成する。距離x=x1のときの合成率を0.7、距離y=y1のときの合成率を0.6とする。領域blk1,blk2,blk5,blk6に対して、各領域の中心座標から画素Pの位置までの距離を用いて生成されたγカーブを、それぞれ、γ1,γ2,γ5,γ6とする。そして、それぞれのγカーブで画素Pの輝度値を補正したときの、補正後の輝度値をOP1,OP2,OP5,OP6とすると、画素Pの最終的な輝度値OPは式4で表される。

Figure 2011205714
なお、上述した合成率はテーブルや数式から得られるものとする。 Hereinafter, a specific example will be described with reference to FIG.
As shown in FIG. 10, the luminance value of the pixel P belonging to the region blk1 is corrected by using four γ curves respectively corresponding to the region blk1 and the surrounding regions blk2, blk5, blk6. Specifically, using the horizontal distance x and the vertical distance y from the center coordinate of the region blk1 to the position of the pixel P, the luminance values obtained from these γ curves are weighted and synthesized. The composite rate when the distance x = x1 is 0.7, and the composite rate when the distance y = y1 is 0.6. For the regions blk1, blk2, blk5 and blk6, the γ curves generated using the distances from the center coordinates of each region to the position of the pixel P are denoted by γ1, γ2, γ5 and γ6, respectively. When the luminance values after correction when the luminance value of the pixel P is corrected by each γ curve are OP1, OP2, OP5, and OP6, the final luminance value OP of the pixel P is expressed by Expression 4. .
Figure 2011205714
Note that the above-described synthesis rate is obtained from a table or a mathematical expression.

以上述べたように、本実施例によれば、領域毎に階調補正パラメータが生成されるため、領域毎の特徴に応じた階調補正(ダイナミックγ処理)を行うことができる。つまり、暗部に注目階調がある領域に対しては暗部の階調性を高め、暗部に注目階調がない領域に対しては暗部を沈めることで良好なコントラストを表現することができる。明部に注目階調がある領域に対しては明部の階調性を高め、明部に注目階調がない領域に対しては明部を浮かせることで良好なコントラストを表現することをできる。また、本実施例では、上述した第1の輝度値と第2の輝度値とを合成して最終的な輝度値を得る、即ち、隣接領域の階調補正パラメータを考慮した輝度値を得ることにより、隣接する2つの領域間での境界線の発生を抑制することができる。   As described above, according to the present embodiment, tone correction parameters are generated for each region, so that tone correction (dynamic γ processing) according to the feature of each region can be performed. In other words, it is possible to express a good contrast by enhancing the gradation of the dark portion for the region having the attention gradation in the dark portion and sinking the dark portion for the region having no attention gradation in the dark portion. It is possible to express a good contrast by enhancing the gradation of the bright part for the area with the attention gradation in the bright part and floating the bright part for the area without the attention gradation in the bright part. . In this embodiment, the first luminance value and the second luminance value described above are combined to obtain a final luminance value, that is, a luminance value in consideration of the gradation correction parameter of the adjacent region is obtained. Thus, it is possible to suppress the generation of a boundary line between two adjacent regions.

なお、本実施例では、第1の領域に隣接する全ての領域を第2の領域とするものとしたが、第2の領域の選択方法はこれに限らない。第1の領域の上下左右に隣接する4つの領域を第2の領域としてもよい。それによっても上述した効果を得ることができる。また、第1の領域の上下左右のいずれかに隣接する1つの領域を第2の領域としてもよい。少なくとも、第1の領域の上下左右のいずれかに隣接する1つの領域を第2の領域とすれば、1方向に隣接する2つの領域間での境界線の発生を抑制することができる。   In this embodiment, all the areas adjacent to the first area are set as the second area. However, the method for selecting the second area is not limited to this. Four regions adjacent to the first region in the vertical and horizontal directions may be used as the second region. The effect mentioned above can be acquired also by it. Also, one region adjacent to the first region in any of the upper, lower, left and right directions may be set as the second region. If at least one region adjacent to any one of the upper, lower, left, and right sides of the first region is set as the second region, the generation of a boundary line between the two regions adjacent in one direction can be suppressed.

また、第1の領域に隣接する領域の内、処理対象の画素に近い領域の階調補正パラメータを考慮すれば、境界線の発生は抑制できる。例えば、処理対象の画素の第1の領域内での位置に応じて、第2の領域を選択してもよい。具体的には、第1の領域を2×2の4つの領域に区分し、処理対象の画素が当該4つの領域のうち、右下の領域に属する場合には、第1の領域の右、下、右下に隣接する領域を第2の領域としてもよい。
また、輝度ヒストグラムを用いる場合を例示したが、横軸を輝度値以外の画素値の階調としたヒストグラム等、画像の特徴を表すヒストグラムであれば、本実施例を適用可能である。輝度値以外の画素値を用いる場合、補間部202は輝度値の代わりに画素値を補正する。なお、画素値とは、R(赤)画素値、G(緑)画素値、B(青)画素値の他、R(赤)画素値とG(緑)画素値とB(青)画素値の平均値、輝度値等、画素の色や輝度を表す値を包含するものとする。
Moreover, the occurrence of a boundary line can be suppressed by considering the tone correction parameter in the region close to the pixel to be processed among the regions adjacent to the first region. For example, the second region may be selected according to the position of the pixel to be processed in the first region. Specifically, when the first region is divided into four 2 × 2 regions, and the pixel to be processed belongs to the lower right region of the four regions, the right of the first region, The area adjacent to the lower and lower right may be the second area.
Further, although the case of using a luminance histogram has been illustrated, the present embodiment can be applied to any histogram that represents image characteristics, such as a histogram in which the horizontal axis is a gradation of pixel values other than the luminance value. When a pixel value other than the luminance value is used, the interpolation unit 202 corrects the pixel value instead of the luminance value. The pixel values are R (red) pixel values, G (green) pixel values, B (blue) pixel values, R (red) pixel values, G (green) pixel values, and B (blue) pixel values. Values representing the color and luminance of the pixels, such as the average value and luminance value of the pixel.

<実施例3>
以下、本発明の実施形態に係る画像処理装置及びその制御方法の具体的な実施例3について説明する。具体的には、実施例1で説明した条件1〜3を満たす階調値(注目階調)が検出できない画像が入力された場合であっても、その画像に適した階調補正パラメータを設定する方法について説明する。
<Example 3>
A specific example 3 of the image processing apparatus and its control method according to the embodiment of the present invention will be described below. Specifically, even when an image in which a gradation value (attention gradation) satisfying the conditions 1 to 3 described in the first embodiment cannot be detected, a gradation correction parameter suitable for the image is set. How to do will be described.

まず、注目階調が検出できない画像について説明する。そのような画像は、例えば、アニメーションのように同一色の領域の組み合わせで構成されている画像である。そのような画像では、図12に示すような輝度ヒストグラムが得られる。このような輝度ヒストグラムでは、(画像が同一色の領域の組み合わせで構成されているため、)前後の階調値からピークの階調値までの度数の変動が激しくなる(図12の矢印)。即ち、そのような画像では、条件3を満たす階調値が存在しないため、注目階調は検出されないことになる。その結果、暗い画像であっても、暗部の階調性を高めることができず、黒つぶれが生じてしまう。また、明るい画像であっても、明部の階調性を高めることができず、白とびが生じてしまう。   First, an image in which the target gradation cannot be detected will be described. Such an image is, for example, an image composed of a combination of regions of the same color as an animation. In such an image, a luminance histogram as shown in FIG. 12 is obtained. In such a luminance histogram, since the image is composed of a combination of regions of the same color, the frequency variation from the preceding and following gradation values to the peak gradation value becomes severe (arrows in FIG. 12). In other words, in such an image, there is no gradation value satisfying the condition 3, so that the attention gradation is not detected. As a result, even in the case of a dark image, the gradation of the dark part cannot be improved and blackout occurs. Further, even in a bright image, the gradation of the bright part cannot be improved, and whiteout occurs.

図11は本実施例に係る画像処理装置の機能構成を示すブロック図である。図11に示すように、本実施例に係る画像処理装置300は、ヒストグラム作成部101、注目階調検出部102、度数算出部301、領域γカーブ選択部302、補間部202を有する。なお、実施例1や実施例2と同様の機能には同じ符号を付し、その説明は省略する。   FIG. 11 is a block diagram illustrating a functional configuration of the image processing apparatus according to the present embodiment. As illustrated in FIG. 11, the image processing apparatus 300 according to the present embodiment includes a histogram creation unit 101, a target gradation detection unit 102, a frequency calculation unit 301, a region γ curve selection unit 302, and an interpolation unit 202. In addition, the same code | symbol is attached | subjected to the function similar to Example 1 and Example 2, and the description is abbreviate | omitted.

度数算出部301は、輝度ヒストグラムの最小階調値から所定の階調値までの度数の総和を低階調側(暗部)の度数(暗部度数)として算出する(算出手段)。また、輝度ヒストグラムの所定の階調値から最大階調値までの度数の総和を高階調側(明部)の度数(明部度数)として算出する。本実施例では、図12に示すように、階調値0〜階調値127までの度数の積分値aを暗部度数とし、階調値128〜階調値255までの度数の積分値bを明部度数とする。   The frequency calculation unit 301 calculates the sum of the frequencies from the minimum gradation value of the luminance histogram to a predetermined gradation value as the frequency (dark part frequency) on the low gradation side (dark part) (calculation unit). Further, the sum of the frequencies from the predetermined gradation value to the maximum gradation value of the luminance histogram is calculated as the frequency (bright portion frequency) on the high gradation side (bright portion). In this embodiment, as shown in FIG. 12, the integrated value a of the frequency from the gradation value 0 to the gradation value 127 is set as the dark portion frequency, and the integrated value b of the frequency from the gradation value 128 to the gradation value 255 is set. Brightness frequency.

領域γカーブ選択部302は、実施例2の領域γカーブ生成部201の機能のほかに、不図示の記憶部(記憶手段)に記憶された複数の階調補正パラメータのいずれかを選択す
る機能を有する。具体的には、領域γカーブ選択部302は、注目階調検出部102で注目階調が検出されなかった場合に、暗部度数や明部度数に応じて記憶されている複数の階調補正パラメータのいずれかを選択する。なお、本実施例では、実施例2と同様に領域毎に階調補正パラメータが決定されるものとする。
そして、補間部202は、注目階調検出部102で注目階調が検出されなかった場合に、上記選択された階調補正パラメータを用いて、入力された画像の階調を補正する。なお、本実施例での階調の補正方法は実施例2と同様とする。
The region γ curve selection unit 302 has a function of selecting any one of a plurality of gradation correction parameters stored in a storage unit (storage unit) (not shown) in addition to the function of the region γ curve generation unit 201 of the second embodiment. Have Specifically, the area γ curve selection unit 302 has a plurality of gradation correction parameters stored according to the dark part frequency and the bright part frequency when the target gradation detection unit 102 does not detect the target gradation. Select one of the following. In the present embodiment, it is assumed that the tone correction parameter is determined for each region as in the second embodiment.
The interpolation unit 202 corrects the tone of the input image using the selected tone correction parameter when the target tone detection unit 102 does not detect the target tone. Note that the gradation correction method in this embodiment is the same as that in the second embodiment.

記憶部に記憶されている複数の階調補正パラメータは、例えば、暗部度数や明部度数に応じた複数の階調補正パラメータである。本実施例では、図14に示すように階調値0から階調値128の暗部γカーブB(0)〜B(4)、階調値192から階調値255の明部γカーブW(0)〜W(4)が記憶されているものとする。図14の例では、低階調側の階調性を高くする順に、暗部γカーブB(4),B(3),B(2),B(1),B(0)が設定されている。また、高階調側の階調性を高くする順に、明部γカーブW(4),W(3),W(2),W(1),W(0)が設定されている。領域γカーブ選択部302は、暗部γカーブと明部γカーブをそれぞれ選択する。階調値128から階調値191までのγカーブは、暗部γカーブと明部γカーブを直線で繋ぐことにより生成してもよいし、階調値128,191で不連続にならないような関数で暗部γカーブと明部γカーブを繋ぐことにより生成してもよい。それにより、最終的に1つのγカーブが生成される。   The plurality of gradation correction parameters stored in the storage unit are, for example, a plurality of gradation correction parameters corresponding to the dark part frequency and the light part frequency. In this embodiment, as shown in FIG. 14, dark portion γ curves B (0) to B (4) with gradation values 0 to 128, and bright portion γ curves W (with gradation values 192 to 255). It is assumed that 0) to W (4) are stored. In the example of FIG. 14, dark portion γ curves B (4), B (3), B (2), B (1), and B (0) are set in order of increasing gradation on the low gradation side. Yes. In addition, bright portion γ curves W (4), W (3), W (2), W (1), and W (0) are set in order of increasing gradation on the high gradation side. The region γ curve selection unit 302 selects a dark part γ curve and a bright part γ curve, respectively. The γ curve from the gradation value 128 to the gradation value 191 may be generated by connecting the dark portion γ curve and the bright portion γ curve with a straight line, or a function that does not become discontinuous at the gradation values 128 and 191. May be generated by connecting the dark portion γ curve and the bright portion γ curve. Thereby, one γ curve is finally generated.

以下、領域γカーブ選択部302で行われる処理について詳しく説明する。特に、暗部γカーブを選択する処理(暗部γカーブ選択処理)について詳しく説明する。図13は、領域γカーブ選択部302が暗部γカーブを選択するまでの処理の流れの一例を示すフローチャートである。   Hereinafter, the process performed by the region γ curve selection unit 302 will be described in detail. In particular, a process for selecting a dark part γ curve (dark part γ curve selection process) will be described in detail. FIG. 13 is a flowchart illustrating an example of a processing flow until the region γ curve selection unit 302 selects a dark portion γ curve.

まず、領域γカーブ選択部302は、注目階調検出部102で注目階調が検出されたか否かを判断する(ステップS31)。注目階調が検出された場合には(ステップS31:YES)、ステップS33へ進む。注目階調が検出されなかった場合には(ステップS31:NO)、ステップS32へ進む。ステップS33では、実施例2と同様に階調補正パラメータを生成し、処理を終了する。ステップS32では、領域γカーブ選択部302が、度数算出部301で算出された暗部度数と閾値Bthを比較する。即ち、分割された領域の画像がどれくらい暗い画像であるかを判断する。   First, the region γ curve selection unit 302 determines whether or not a target gradation is detected by the target gradation detection unit 102 (step S31). If the target gradation is detected (step S31: YES), the process proceeds to step S33. When the target gradation is not detected (step S31: NO), the process proceeds to step S32. In step S33, a tone correction parameter is generated as in the second embodiment, and the process is terminated. In step S <b> 32, the region γ curve selection unit 302 compares the dark portion frequency calculated by the frequency calculation unit 301 with the threshold Bth. That is, it is determined how dark the image of the divided area is.

本実施例では、この閾値Bthは領域内の総画素数の16分の1とする。本実施例では実施例1や実施例2と同様に、1920×1080を16分割しているので、分割された1つの領域内の総画素数は(1920×1080)÷16=129600画素である。この総画素数の16分の1、即ち、8100が閾値Bthの値となる。暗部度数が閾値Bth以上(例えば、暗部度数が10000)であった場合には(ステップS32:Yes)、領域γカーブ選択部302は、処理対象の領域の画像が暗い画像であると判断する。そのため、領域γカーブ選択部302は、低階調側の階調性を高めるための暗部γカーブB(1)を選択し、処理を終了する(ステップS34)。暗部度数が閾値Bth未満(例えば、暗部度数が1000)であった場合には(ステップS32:NO)、領域γカーブ選択部302は、処理対象の領域の画像が暗い画像でないと判断する。そのため、領域γカーブ選択部302は、低階調側の階調性をあまり高くしない暗部γカーブB(0)を選択し、処理を終了する(ステップS35)。   In this embodiment, the threshold value Bth is set to 1/16 of the total number of pixels in the region. In the present embodiment, 1920 × 1080 is divided into 16 as in Embodiment 1 and Embodiment 2, so the total number of pixels in one divided area is (1920 × 1080) ÷ 16 = 129600 pixels. . 1/16 of the total number of pixels, that is, 8100 is the threshold value Bth. When the dark part frequency is equal to or greater than the threshold Bth (for example, the dark part frequency is 10,000) (step S32: Yes), the region γ curve selection unit 302 determines that the image of the processing target region is a dark image. Therefore, the region γ curve selection unit 302 selects the dark part γ curve B (1) for improving the gradation property on the low gradation side, and ends the processing (step S34). When the dark area frequency is less than the threshold Bth (for example, the dark area frequency is 1000) (step S32: NO), the region γ curve selection unit 302 determines that the image of the region to be processed is not a dark image. Therefore, the region γ curve selection unit 302 selects the dark part γ curve B (0) that does not increase the gradation on the low gradation side so much, and ends the process (step S35).

明部γカーブを選択する処理は、暗部γカーブを選択するのと同様である。具体的には、注目階調検出部102で注目階調が検出されていた場合には、実施例2と同様に階調補正パラメータを生成する。そして、注目階調検出部102で注目階調が検出されなかった場合には、明部度数と閾値を比較する。明部度数が閾値以上である場合には、処理対象の
領域の画像が明るい画像であると判断され、白とびしないように高階調側の階調性を高めるための明部γカーブ(例えば明部γカーブW(4))が選択される。明部度数が閾値未満であれば、処理対象の領域の画像が明るい画像ではないと判断され、高階調側の階調性をあまり高くしない明部γカーブ(例えば、明部γカーブW(2))が選択される。
そして、補間部202では実施例2のように領域ごとのγカーブから出力される輝度値を補間する。
The process of selecting the bright part γ curve is the same as selecting the dark part γ curve. Specifically, when the target gradation detection unit 102 detects the target gradation, a gradation correction parameter is generated as in the second embodiment. When the target gradation detection unit 102 does not detect the target gradation, the bright part frequency is compared with the threshold value. When the bright part frequency is equal to or greater than the threshold value, it is determined that the image in the processing target area is a bright image, and a bright part γ curve (for example, a bright part) for improving the gradation on the high gradation side so as not to be overexposed Part γ curve W (4)) is selected. If the bright part frequency is less than the threshold value, it is determined that the image in the processing target area is not a bright image, and the bright part γ curve (for example, the bright part γ curve W (2 )) Is selected.
Then, the interpolation unit 202 interpolates the luminance value output from the γ curve for each region as in the second embodiment.

以上述べたように、本実施例によれば、アニメのような同一色の領域の組み合わせで構成された画像など、注目階調が検出できない画像が入力された場合でも、暗部度数や明部度数に応じてγカーブが決定されるため、良好なコントラストを表現することができる。   As described above, according to the present embodiment, even when an image in which a target gradation cannot be detected, such as an image composed of a combination of regions of the same color such as animation, is input, Since the γ curve is determined according to the above, good contrast can be expressed.

なお、本実施例では、実施例1や実施例2と同様に入力された画像が複数の領域に分割されている場合について説明したが、入力された画像が分割されていなくても本実施例の構成を適用することができる。具体的には、画像全体の暗部度数や明部度数に応じて階調補正パラメータを選択すればよい。
また、本実施例では、階調の補正方法として実施例2の方法を適用して説明したが、階調は実施例1の方法で補正してもよい。
In the present embodiment, the case where the input image is divided into a plurality of regions in the same manner as in the first and second embodiments has been described. However, even if the input image is not divided, the present embodiment. The configuration can be applied. Specifically, the gradation correction parameter may be selected according to the dark part frequency and the light part frequency of the entire image.
In this embodiment, the method of the second embodiment is applied as the gradation correction method. However, the gradation may be corrected by the method of the first embodiment.

なお、本実施例では、暗部度数に応じて暗部γカーブB(1),B(0)、明部度数に応じて明部γカーブW(4),W(2)を選択する構成としたが、選択するγカーブはこれに限らない。暗部度数に応じて予め記憶されている複数の暗部γカーブのいずれかを選択すればよいし、明部度数に応じて予め記憶されている複数の明部γカーブのいずれかを選択すればよい。また、本実施例では、暗部γカーブと明部γカーブがそれぞれ5つずつ記憶されているものとしたが、それらの数はこれに限らない。暗部γカーブと明部γカーブがそれぞれ3つや10個ずつ記憶されていてもよい。暗部γカーブと明部γカーブの数は同じでなくてもよい。γカーブは暗部と明部に分けて記憶されていなくてもよい。   In this embodiment, the dark portion γ curves B (1) and B (0) are selected according to the dark portion frequency, and the bright portion γ curves W (4) and W (2) are selected according to the light portion frequency. However, the γ curve to be selected is not limited to this. Any one of a plurality of dark part γ curves stored in advance according to the dark part frequency may be selected, or any one of a plurality of bright part γ curves stored in advance may be selected according to the light part frequency. . In this embodiment, five dark part γ curves and five bright part γ curves are stored, but the number is not limited to this. Three or ten dark portion γ curves and light portion γ curves may be stored. The number of dark part γ curves and bright part γ curves may not be the same. The γ curve may not be stored separately for the dark part and the bright part.

また、本実施例では、暗部度数と明部度数のそれぞれに応じて2つのγカーブを選択するものとしたが、そのような構成でなくてもよい。少なくとも、暗部度数または明部度数に応じてγカーブを選択すればよい。暗部度数に応じてγカーブを選択すれば、暗部のコントラストを良好に表現することができる。明部度数に応じてγカーブを選択すれば、暗部のコントラストを良好に表現することができる。
また、輝度ヒストグラムを用いる場合を例示したが、横軸を輝度値以外の画素値の階調としたヒストグラム等、画像の特徴を表すヒストグラムであれば、本実施例を適用可能である。
In this embodiment, two γ curves are selected in accordance with the dark part frequency and the bright part frequency, but such a configuration is not necessary. The γ curve may be selected according to at least the dark part frequency or the bright part frequency. If the γ curve is selected according to the dark area frequency, the contrast of the dark area can be expressed well. If the γ curve is selected according to the brightness of the bright part, the contrast of the dark part can be expressed well.
Further, although the case of using a luminance histogram has been illustrated, the present embodiment can be applied to any histogram that represents image characteristics, such as a histogram in which the horizontal axis is a gradation of pixel values other than the luminance value.

<実施例4>
以下、本発明の実施形態に係る画像処理装置及びその制御方法の具体的な実施例4について説明する。具体的には、8ビット(256)階調で階調値0や階調値255の度数が多い画像が入力された場合であっても、その画像に適した階調補正パラメータを設定する方法について説明する。
<Example 4>
A specific example 4 of the image processing apparatus and the control method thereof according to the embodiment of the present invention will be described below. Specifically, even when an image having an 8-bit (256) gradation and a large gradation value of 0 or gradation value 255 is input, a gradation correction parameter suitable for the image is set. Will be described.

例えば、デジタルカメラで夜景を撮影した場合、階調値0の度数が多い画像となり、図15に示すような輝度ヒストグラムが得られる場合がある。実施例1や実施例2で説明した方法では、暗部の注目階調を探索する際に階調値0,1は探索範囲から除かれる。そのため、このように階調値0に度数のピークがある輝度ヒストグラムでは、暗部注目階調として階調値0(またはその付近の階調)が検出されないため、黒つぶれが生じてしまう。また、明るい画像(階調値255に度数のピークがある画像)であっても明部の階調性(階調値255周辺の階調性)を高めることができず、白とびが生じてしまう。   For example, when a night scene is shot with a digital camera, an image with a high gradation value of 0 may be obtained, and a luminance histogram as shown in FIG. 15 may be obtained. In the method described in the first and second embodiments, the gradation values 0 and 1 are excluded from the search range when searching for the target gradation in the dark portion. For this reason, in the luminance histogram having the frequency peak at the gradation value 0 as described above, the gradation value 0 (or a gradation in the vicinity thereof) is not detected as the dark part attention gradation, and blackout occurs. Further, even in a bright image (an image having a frequency peak at the gradation value 255), the gradation property of the bright portion (gradation property around the gradation value 255) cannot be improved, and whiteout occurs. End up.

図16は、本実施例に係る画像処理装置の機能構成を示すブロック図である。図16に示すように、本実施例に係る画像処理装置400は、ヒストグラム作成部101、ヒストグラム前処理部401、注目階調検出部102、γカーブ生成部103、γ変換部104、入力端子105、出力端子106を有する。なお、実施例1と同様の機能には同じ符号を付し、その説明は省略する。   FIG. 16 is a block diagram illustrating a functional configuration of the image processing apparatus according to the present embodiment. As illustrated in FIG. 16, the image processing apparatus 400 according to the present embodiment includes a histogram creation unit 101, a histogram preprocessing unit 401, a target tone detection unit 102, a γ curve generation unit 103, a γ conversion unit 104, and an input terminal 105. And an output terminal 106. In addition, the same code | symbol is attached | subjected to the function similar to Example 1, and the description is abbreviate | omitted.

ヒストグラム前処理部401は、ヒストグラム作成部101で作成された輝度ヒストグラムを解析し、階調値0または階調値255の度数が多い場合には輝度ヒストグラムのデータを書き換えて出力する(ヒストグラム前処理手段)。注目階調検出部102は、ヒストグラム前処理部401から出力された輝度ヒストグラムのデータから注目階調を検出する。注目階調検出部102は、実施例1で説明したように、階調を暗部と明部に分けて、暗部の注目階調(暗部注目階調)と明部の注目階調(明部注目階調)を検出する。   The histogram preprocessing unit 401 analyzes the luminance histogram created by the histogram creation unit 101, and rewrites and outputs the luminance histogram data when the frequency of the gradation value 0 or the gradation value 255 is large (histogram preprocessing). means). The target gradation detection unit 102 detects the target gradation from the luminance histogram data output from the histogram preprocessing unit 401. As described in the first exemplary embodiment, the target gradation detection unit 102 divides the gradation into a dark part and a bright part, and the dark part attention gradation (dark part attention gradation) and the bright part attention gradation (bright part attention). ) Is detected.

以下、輝度ヒストグラムの暗部の階調に対する書き換え処理の流れについて具体的に説明する。図17(a)は、図15に示した輝度ヒストグラムにおける各階調値の度数を示す図である。ヒストグラム前処理部401は、階調値0の度数が階調値2の度数よりも多いか否かを判定する。図17(a)に示すように、階調値0の度数(3500)が階調値2の度数(2300)よりも多い場合は、階調値2の度数(2300)を階調値0の度数(3500)に書き換える。図17(b)は、ヒストグラム前処理部401により書き換えられた後の輝度ヒストグラムのデータを示す図である。なお、ヒストグラム前処理部401は、階調値0の度数が階調値2の度数よりも少ない場合は、階調値2の度数を書き換える処理は行わない。   Hereinafter, the flow of the rewriting process for the gradation of the dark part of the luminance histogram will be specifically described. FIG. 17A shows the frequency of each gradation value in the luminance histogram shown in FIG. The histogram preprocessing unit 401 determines whether or not the frequency with the gradation value 0 is larger than the frequency with the gradation value 2. As shown in FIG. 17A, when the frequency of gradation value 0 (3500) is higher than the frequency of gradation value 2 (2300), the frequency of gradation value 2 (2300) is set to the gradation value 0. Rewrite to frequency (3500). FIG. 17B is a diagram illustrating data of the luminance histogram after being rewritten by the histogram preprocessing unit 401. Note that the histogram preprocessing unit 401 does not perform the process of rewriting the frequency of the gradation value 2 when the frequency of the gradation value 0 is smaller than the frequency of the gradation value 2.

同様に、ヒストグラム前処理部401は、輝度ヒストグラムの暗部の階調に対する書き換え処理を行う。具体的には、階調値255の度数が階調値253の度数よりも多いか否かを判定し、階調値255の度数が階調値253の度数よりも多い場合は、階調値253の度数を階調値255の度数に書き換える。なお、ヒストグラム前処理部401は、階調値255の度数が階調値253の度数よりも多くない場合は、階調値253の度数を書き換える処理は行わない。   Similarly, the histogram preprocessing unit 401 performs a rewriting process on the gradation of the dark part of the luminance histogram. Specifically, it is determined whether or not the frequency of the gradation value 255 is greater than the frequency of the gradation value 253. If the frequency of the gradation value 255 is greater than the frequency of the gradation value 253, the gradation value The frequency of 253 is rewritten to the frequency of the gradation value 255. Note that when the frequency of the gradation value 255 is not higher than the frequency of the gradation value 253, the histogram preprocessing unit 401 does not perform the process of rewriting the frequency of the gradation value 253.

注目階調検出部102は、ヒストグラム前処理部401により書き換えられた輝度ヒストグラムから注目階調を検出する処理を行う。このため、階調値0や階調値255に度数のピークがある画像が入力された場合であっても、注目階調検出部102は、階調値2や階調値253を注目階調として検出することができるようになる。   The target gradation detection unit 102 performs processing for detecting the target gradation from the luminance histogram rewritten by the histogram preprocessing unit 401. Therefore, even when an image having a frequency peak at the gradation value 0 or the gradation value 255 is input, the attention gradation detection unit 102 converts the gradation value 2 or gradation value 253 to the attention gradation. Can be detected as.

以上述べたように、本実施例によれば、8ビット階調で階調値0(最小階調値)や階調値255(最大階調値)の度数が多い画像が入力された場合であっても、適切なγカーブ(階調値2や階調値253を注目階調としたγカーブ)を決定することができる。このため、画像に適した階調補正パラメータを適用することができ、良好なコントラストを実現することができる。なお、入力画像が8ビット階調の場合を例に挙げて説明したが、入力画像が何ビットの階調であっても適用可能である。また、ここでは注目階調検出部102が、対象とする階調値の度数と、その階調値を除く前後それぞれ2個の階調値の度数とを比較する場合について説明したが、これに限定されるものではない。つまり、対象とする階調値の度数と、その階調値を除く前後それぞれn個の階調値(nは1以上の整数)の度数とを比較する場合も適用可能である。ヒストグラム前処理部401は、最小階調値(階調値0)の度数が最小階調値+nの階調値の度数よりも多い場合は、最小階調値+nの階調値の度数を最小階調値の度数に書き換えればよい。また、最大階調値(8ビット階調の場合は階調値255)の度数が最大階調値−nの階調値の度数よりも多い場合は、最大階調値−nの階調値の度数を最大階調値の度数に書き換えればよい。なお、本実施例では、階調の補正方法として実施例1の方法を適用して説明したが、階調は実施例2の方法で補
正してもよい。また、入力された画像を複数の領域に分割して領域毎の輝度ヒストグラムを作成する場合であっても、入力された画像を複数の領域に分割しないで画像全体の輝度ヒストグラムを作成する場合であっても、本実施例は適用可能である。分割しない場合は、画像全体の輝度ヒストグラムに応じて階調補正パラメータを決定すればよい。
また、輝度ヒストグラムを用いる場合を例示したが、横軸を輝度値以外の画素値の階調としたヒストグラム等、画像の特徴を表すヒストグラムであれば、本実施例を適用可能である。
また、ヒストグラム前処理部401により輝度ヒストグラムのデータを書き換える機能を使用するかしないかを設定可能な構成としてもよい。ヒストグラム前処理部401の機能を使用しない設定とした場合は、実施例1で説明したように、ヒストグラム作成部101で生成されたヒストグラムがそのまま注目階調検出部102に入力される。
As described above, according to the present embodiment, when an image having an 8-bit gradation and a large number of gradation values 0 (minimum gradation value) and gradation value 255 (maximum gradation value) is input. Even so, it is possible to determine an appropriate γ curve (a γ curve having the gradation value 2 or the gradation value 253 as the target gradation). For this reason, it is possible to apply a tone correction parameter suitable for an image, and to realize a good contrast. Note that the case where the input image has an 8-bit gradation has been described as an example, but the present invention can be applied regardless of how many bits the input image has. Here, the case where the target gradation detection unit 102 compares the frequency of the target gradation value with the frequencies of the two gradation values before and after removing the gradation value has been described. It is not limited. That is, the present invention can be applied to the case where the frequency of the target gradation value is compared with the frequency of n gradation values (n is an integer of 1 or more) before and after the gradation value is excluded. If the frequency of the minimum gradation value (gradation value 0) is greater than the frequency of the gradation value of the minimum gradation value + n, the histogram preprocessing unit 401 minimizes the frequency of the gradation value of the minimum gradation value + n. What is necessary is just to rewrite to the frequency of a gradation value. When the frequency of the maximum gradation value (gradation value 255 in the case of 8-bit gradation) is greater than the frequency of the gradation value of maximum gradation value-n, the gradation value of maximum gradation value-n May be rewritten to the frequency of the maximum gradation value. In this embodiment, the method of the first embodiment is applied as the gradation correction method. However, the gradation may be corrected by the method of the second embodiment. In addition, even when the input image is divided into a plurality of regions and a luminance histogram for each region is created, the input image is not divided into a plurality of regions and the entire image is created with a luminance histogram. Even if it exists, a present Example is applicable. When the image is not divided, the gradation correction parameter may be determined according to the luminance histogram of the entire image.
Further, although the case of using a luminance histogram has been illustrated, the present embodiment can be applied to any histogram that represents image characteristics, such as a histogram in which the horizontal axis is a gradation of pixel values other than the luminance value.
The histogram pre-processing unit 401 may be configured to set whether or not to use a function of rewriting luminance histogram data. When the setting is made so that the function of the histogram preprocessing unit 401 is not used, as described in the first embodiment, the histogram generated by the histogram creation unit 101 is input to the target gradation detection unit 102 as it is.

以上述べたように、上記実施例1〜4に係る画像処理装置及びその制御方法によれば、階調性を高めることが望ましい階調値を注目階調として検出することができる。それにより、注目階調の度数が他の階調値の度数に比べて少ない場合であっても、注目階調周辺の階調範囲の階調性を高める階調補正パラメータを生成することができる。
なお、上記実施例1〜4は組み合わせ可能である。
As described above, according to the image processing apparatus and the control method thereof according to the first to fourth embodiments, it is possible to detect a gradation value for which it is desirable to improve gradation as the attention gradation. Thereby, even when the frequency of the target gradation is smaller than the frequency of other gradation values, it is possible to generate a gradation correction parameter that improves the gradation of the gradation range around the target gradation. .
In addition, the said Examples 1-4 can be combined.

100 画像処理装置
101 ヒストグラム作成部
102 注目階調検出部
103 γカーブ生成部
104 γ変換部
DESCRIPTION OF SYMBOLS 100 Image processing apparatus 101 Histogram creation part 102 Attention gradation detection part 103 γ curve generation part 104 γ conversion part

Claims (18)

入力された画像からヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値を注目階調として検出する検出手段と、
前記注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成する階調補正パラメータ生成手段と、
前記階調補正パラメータを用いて前記画像の階調を補正する補正手段と、
を有し、
前記検出手段は、前記ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値との条件を満たす階調値が複数存在する場合に、前記条件を満たす複数の階調値のうち少なくとも最も低階調側の階調値および最も高階調側の階調値を前記注目階調とすることを特徴とする画像処理装置。
A histogram creating means for creating a histogram from the input image;
In the histogram, a gradation value whose frequency is equal to or greater than a predetermined threshold and has a maximum value, and whose variation amount of the frequency within a predetermined range including the gradation value is smaller than a predetermined reference is a target gradation value. Detecting means for detecting as,
A gradation correction parameter generating means for generating a gradation correction parameter having an input / output gradation conversion characteristic that enhances the gradation of a predetermined gradation range including the target gradation;
Correction means for correcting the gradation of the image using the gradation correction parameter;
Have
In the histogram, the detection means has a gradation value whose frequency is equal to or greater than a predetermined threshold and has a maximum value, and a variation amount of the frequency within a predetermined range including the gradation value is smaller than a predetermined reference. When there are a plurality of gradation values that satisfy the condition, the at least the lowest gradation value and the highest gradation value among the plurality of gradation values satisfying the condition are An image processing apparatus characterized by having a key.
前記検出手段は、注目階調とするか否かの判断の対象とする階調値の度数が、その階調値を除く前後それぞれn個の階調値(nは1以上の整数)の度数の総和に所定値を乗算した値よりも小さい場合に、前記所定範囲内の度数の変動量が所定の基準よりも小さいものとみなす
ことを特徴とする請求項1に記載の画像処理装置。
The detection means is a frequency of n gradation values (n is an integer greater than or equal to 1) before and after the gradation value that is the target of determination as to whether or not to select the target gradation. 2. The image processing apparatus according to claim 1, wherein the amount of variation in the frequency within the predetermined range is considered to be smaller than a predetermined reference when the sum is less than a value obtained by multiplying the total by a predetermined value.
前記ヒストグラム作成手段により作成されたヒストグラムを解析し、最小階調値の度数が最小階調値+nの階調値の度数よりも多い場合は、最小階調値+nの階調値の度数を最小階調値の度数に書き換え、最大階調値の度数が最大階調値−nの階調値の度数よりも多い場合は、最大階調値−nの階調値の度数を最大階調値の度数に書き換えるヒストグラム前処理手段
をさらに備える請求項2に記載の画像処理装置。
When the histogram created by the histogram creating means is analyzed and the frequency of the minimum gradation value is larger than the frequency of the gradation value of the minimum gradation value + n, the frequency of the gradation value of the minimum gradation value + n is minimized. When the frequency of the maximum gradation value is larger than the frequency of the gradation value of the maximum gradation value-n, the frequency of the gradation value of the maximum gradation value-n is changed to the maximum gradation value. The image processing apparatus according to claim 2, further comprising a histogram preprocessing unit that rewrites the frequency to
前記階調補正パラメータ生成手段は、前記注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有するγカーブを、前記階調補正パラメータとして生成する
ことを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。
The gradation correction parameter generation means generates, as the gradation correction parameter, a γ curve having an input / output gradation conversion characteristic that enhances gradation of a predetermined gradation range including the target gradation. The image processing apparatus according to claim 1.
前記ヒストグラム作成手段は、前記画像を複数の領域に分割し、領域毎のヒストグラムを作成し、
前記検出手段は、前記領域毎のヒストグラムからそれぞれ注目階調を検出し、
前記階調補正パラメータ生成手段は、前記領域毎に、その領域の注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成し、
前記補正手段は、画素毎に、その画素の属する第1の領域に対して生成された階調補正パラメータを用いて算出された画素値と、前記第1の領域に隣接する第2の領域に対して生成された階調補正パラメータを用いて算出された画素値とを、その画素と、前記第1の領域及び前記第2の領域との位置関係に基づいた重みで合成し、合成された画素値をその画素の最終的な画素値とすることにより、前記画像の階調を補正する
ことを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。
The histogram creating means divides the image into a plurality of regions, creates a histogram for each region,
The detecting means detects a target gradation from the histogram for each region,
The gradation correction parameter generating means generates a gradation correction parameter having an input / output gradation conversion characteristic for improving the gradation of a predetermined gradation range including a target gradation of the area for each area,
For each pixel, the correction means calculates a pixel value calculated using a tone correction parameter generated for the first region to which the pixel belongs, and a second region adjacent to the first region. The pixel value calculated using the tone correction parameter generated for the pixel is synthesized with a weight based on the positional relationship between the pixel and the first region and the second region. The image processing apparatus according to claim 1, wherein a gradation of the image is corrected by setting a pixel value as a final pixel value of the pixel.
前記ヒストグラム作成手段は、前記画像を複数の領域に分割し、領域毎のヒストグラムを作成し、
前記検出手段は、前記領域毎のヒストグラムからそれぞれ注目階調を検出し、
前記階調補正パラメータ生成手段は、前記画像について、前記領域毎に検出された複数の注目階調のうち、少なくとも最も低階調側の注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成する
ことを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。
The histogram creating means divides the image into a plurality of regions, creates a histogram for each region,
The detecting means detects a target gradation from the histogram for each region,
The gradation correction parameter generation unit is configured to perform gradation characteristics of a predetermined gradation range including at least the attention gradation on the lowest gradation side among the plurality of attention gradations detected for each region for the image. The image processing apparatus according to claim 1, wherein a gradation correction parameter having an input / output gradation conversion characteristic that enhances the image quality is generated.
前記ヒストグラム作成手段は、前記画像を複数の領域に分割し、領域毎のヒストグラムを作成し、
前記検出手段は、前記領域毎のヒストグラムからそれぞれ注目階調を検出し、
前記階調補正パラメータ生成手段は、前記画像について、前記領域毎に検出された複数の注目階調のうち、少なくとも最も高階調側の注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成する
ことを特徴とする請求項1〜4のいずれか1項に記載の画像処理装置。
The histogram creating means divides the image into a plurality of regions, creates a histogram for each region,
The detecting means detects a target gradation from the histogram for each region,
The gradation correction parameter generation means has a gradation property of a predetermined gradation range including at least the attention gradation on the highest gradation side among the plurality of attention gradations detected for each region for the image. The image processing apparatus according to claim 1, wherein a gradation correction parameter having enhanced input / output gradation conversion characteristics is generated.
予め定められた複数の階調補正パラメータを記憶する記憶手段と、
前記ヒストグラムの最小階調値から所定の階調値までの度数の総和を低階調側の度数として算出する算出手段を更に有し、
前記検出手段によって前記注目階調が検出されなかった場合に、
前記階調補正パラメータ生成手段は、前記低階調側の度数に応じて前記複数の階調補正パラメータのいずれかを選択し、
前記補正手段は、選択された階調補正パラメータを用いて前記画像の階調を補正する
ことを特徴とする請求項1〜7のいずれか1項に記載の画像処理装置。
Storage means for storing a plurality of predetermined gradation correction parameters;
A calculation means for calculating the sum of the frequencies from the minimum gradation value of the histogram to the predetermined gradation value as the frequency on the low gradation side;
When the target gradation is not detected by the detection means,
The gradation correction parameter generation means selects one of the plurality of gradation correction parameters according to the frequency on the low gradation side;
The image processing apparatus according to claim 1, wherein the correction unit corrects the gradation of the image using the selected gradation correction parameter.
予め定められた複数の階調補正パラメータを記憶する記憶手段と、
前記ヒストグラムの所定の階調値から最大階調値までの度数の総和を高階調側の度数として算出する算出手段を更に有し、
前記検出手段によって前記注目階調が検出されなかった場合に、
前記階調補正パラメータ生成手段は、前記高階調側の度数に応じて前記複数の階調補正パラメータのいずれかを選択し、
前記補正手段は、選択された階調補正パラメータを用いて前記画像の階調を補正する
ことを特徴とする請求項1〜7のいずれか1項に記載の画像処理装置。
Storage means for storing a plurality of predetermined gradation correction parameters;
A calculation means for calculating the sum of the frequencies from the predetermined gradation value to the maximum gradation value of the histogram as the frequency on the high gradation side;
When the target gradation is not detected by the detection means,
The gradation correction parameter generation means selects any of the plurality of gradation correction parameters according to the frequency on the high gradation side,
The image processing apparatus according to claim 1, wherein the correction unit corrects the gradation of the image using the selected gradation correction parameter.
入力された画像からヒストグラムを作成するヒストグラム作成ステップと、
前記ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値を注目階調として検出する検出ステップと、
前記注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータを生成する階調補正パラメータ生成ステップと、
前記階調補正パラメータを用いて前記画像の階調を補正する補正ステップと、
を有し、
前記検出ステップでは、前記ヒストグラムにおいて、度数が所定の閾値以上かつ極大値である階調値であって、当該階調値を含む所定範囲内の度数の変動量が所定の基準よりも小さい階調値との条件を満たす階調値が複数存在する場合に、前記条件を満たす複数の階調値のうち少なくとも最も低階調側の階調値および最も高階調側の階調値が前記注目階調とされる
ことを特徴とする画像処理装置の制御方法。
A histogram creation step for creating a histogram from the input image;
In the histogram, a gradation value whose frequency is equal to or greater than a predetermined threshold and has a maximum value, and whose variation amount of the frequency within a predetermined range including the gradation value is smaller than a predetermined reference is a target gradation value. Detecting step to detect as,
A gradation correction parameter generation step of generating a gradation correction parameter having an input / output gradation conversion characteristic that enhances gradation of a predetermined gradation range including the target gradation;
A correction step of correcting the gradation of the image using the gradation correction parameter;
Have
In the detection step, in the histogram, a gradation value whose frequency is equal to or greater than a predetermined threshold and has a maximum value, and a variation amount of the frequency within a predetermined range including the gradation value is smaller than a predetermined reference When there are a plurality of gradation values that satisfy the condition, the lowest gradation value and the highest gradation value among the plurality of gradation values satisfying the condition are the attention floor. A method for controlling an image processing apparatus, characterized by comprising:
前記検出ステップでは、注目階調とするか否かの判断の対象とする階調値の度数が、その階調値を除く前後それぞれn個の階調値(nは1以上の整数)の度数の総和に所定値を乗算した値よりも小さい場合に、前記所定範囲内の度数の変動量が所定の基準よりも小さいものとみなされる
ことを特徴とする請求項10に記載の画像処理装置の制御方法。
In the detection step, the frequency of the gradation value to be determined as to whether or not to be the target gradation is a frequency of n gradation values (n is an integer of 1 or more) before and after the gradation value is excluded. The image processing apparatus according to claim 10, wherein when the sum is less than a value obtained by multiplying a sum by a predetermined value, a variation amount of the frequency within the predetermined range is regarded as being smaller than a predetermined reference. Control method.
前記ヒストグラム作成ステップにより作成されたヒストグラムを解析し、最小階調値の度数が最小階調値+nの階調値の度数よりも多い場合は、最小階調値+nの階調値の度数を最小階調値の度数に書き換え、最大階調値の度数が最大階調値−nの階調値の度数よりも多い場合は、最大階調値−nの階調値の度数を最大階調値の度数に書き換えるヒストグラム前処理ステップ
をさらに有する請求項11に記載の画像処理装置の制御方法。
When the histogram created by the histogram creating step is analyzed and the frequency of the minimum gradation value is larger than the frequency of the gradation value of the minimum gradation value + n, the frequency of the gradation value of the minimum gradation value + n is minimized. When the frequency of the maximum gradation value is larger than the frequency of the gradation value of the maximum gradation value-n, the frequency of the gradation value of the maximum gradation value-n is changed to the maximum gradation value. The method of controlling an image processing apparatus according to claim 11, further comprising a histogram preprocessing step of rewriting to a frequency of.
前記階調補正パラメータ生成ステップでは、前記注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有するγカーブが、前記階調補正パラメータとして生成される
ことを特徴とする請求項10〜12のいずれか1項に記載の画像処理装置の制御方法。
In the gradation correction parameter generation step, a γ curve having an input / output gradation conversion characteristic that enhances the gradation of a predetermined gradation range including the target gradation is generated as the gradation correction parameter. The method for controlling an image processing apparatus according to claim 10, wherein the image processing apparatus has a control method.
前記ヒストグラム作成ステップでは、前記画像が複数の領域に分割され、領域毎のヒストグラムが作成され、
前記検出ステップでは、前記領域毎のヒストグラムからそれぞれ注目階調が検出され、
前記階調補正パラメータ生成ステップでは、前記領域毎に、その領域の注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータが生成され、
前記補正ステップでは、画素毎に、その画素の属する第1の領域に対して生成された階調補正パラメータを用いて算出された画素値と、前記第1の領域に隣接する第2の領域に対して生成された階調補正パラメータを用いて算出された画素値とが、その画素と、前記第1の領域及び前記第2の領域との位置関係に基づいた重みで合成され、合成された画素値がその画素の最終的な画素値とされることにより、前記画像の階調が補正される
ことを特徴とする請求項10〜13のいずれか1項に記載の画像処理装置の制御方法。
In the histogram creation step, the image is divided into a plurality of regions, and a histogram for each region is created.
In the detection step, a target gradation is detected from the histogram for each region,
In the gradation correction parameter generation step, for each area, a gradation correction parameter having an input / output gradation conversion characteristic that enhances the gradation of a predetermined gradation range including a target gradation of the area is generated;
In the correction step, for each pixel, a pixel value calculated using the gradation correction parameter generated for the first region to which the pixel belongs and a second region adjacent to the first region The pixel value calculated using the tone correction parameter generated for the pixel is synthesized with a weight based on the positional relationship between the pixel and the first region and the second region, and synthesized. The method of controlling an image processing apparatus according to claim 10, wherein a gradation of the image is corrected by setting a pixel value to a final pixel value of the pixel. .
前記ヒストグラム作成ステップでは、前記画像が複数の領域に分割され、領域毎のヒストグラムが作成され、
前記検出ステップでは、前記領域毎のヒストグラムからそれぞれ注目階調が検出され、
前記階調補正パラメータ生成ステップでは、前記画像について、前記領域毎に検出された複数の注目階調のうち、少なくとも最も低階調側の注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータが生成される
ことを特徴とする請求項10〜13のいずれか1項に記載の画像処理装置の制御方法。
In the histogram creation step, the image is divided into a plurality of regions, and a histogram for each region is created.
In the detection step, a target gradation is detected from the histogram for each region,
In the gradation correction parameter generation step, gradation characteristics of a predetermined gradation range including at least the attention gradation on the lowest gradation side among the plurality of attention gradations detected for each region in the image 14. The method of controlling an image processing apparatus according to claim 10, wherein a gradation correction parameter having an input / output gradation conversion characteristic that enhances image quality is generated.
前記ヒストグラム作成ステップでは、前記画像が複数の領域に分割され、領域毎のヒストグラムが作成され、
前記検出ステップでは、前記領域毎のヒストグラムからそれぞれ注目階調が検出され、
前記階調補正パラメータ生成ステップでは、前記画像について、前記領域毎に検出された複数の注目階調のうち、少なくとも最も高階調側の注目階調を含む予め定められる階調範囲の階調性を高める入出力階調変換特性を有する階調補正パラメータが生成される
ことを特徴とする請求項10〜13のいずれか1項に記載の画像処理装置の制御方法。
In the histogram creation step, the image is divided into a plurality of regions, and a histogram for each region is created.
In the detection step, a target gradation is detected from the histogram for each region,
In the gradation correction parameter generation step, the gradation of a predetermined gradation range including at least the attention gradation on the highest gradation side among the plurality of attention gradations detected for each region is obtained for the image. The method of controlling an image processing apparatus according to claim 10, wherein a gradation correction parameter having enhanced input / output gradation conversion characteristics is generated.
前記ヒストグラムの最小階調値から所定の階調値までの度数の総和を低階調側の度数として算出する算出ステップを更に有し、
前記検出ステップによって前記注目階調が検出されなかった場合に、
前記階調補正パラメータ生成ステップでは、前記低階調側の度数に応じて、記憶部が記憶している予め定められた複数の階調補正パラメータのいずれかが選択され、
前記補正ステップでは、選択された階調補正パラメータを用いて前記画像の階調が補正される
ことを特徴とする請求項10〜16のいずれか1項に記載の画像処理装置の制御方法。
A calculation step of calculating the sum of the frequencies from the minimum gradation value of the histogram to a predetermined gradation value as the frequency on the low gradation side;
When the target gradation is not detected by the detection step,
In the gradation correction parameter generation step, one of a plurality of predetermined gradation correction parameters stored in the storage unit is selected according to the frequency on the low gradation side,
The image processing apparatus control method according to claim 10, wherein in the correction step, the gradation of the image is corrected using the selected gradation correction parameter.
前記ヒストグラムの所定の階調値から最大階調値までの度数の総和を高階調側の度数として算出する算出ステップを更に有し、
前記検出ステップによって前記注目階調が検出されなかった場合に、
前記階調補正パラメータ生成ステップでは、前記高階調側の度数に応じて、記憶部が記憶している予め定められた複数の階調補正パラメータのいずれかが選択され、
前記補正ステップでは、選択された階調補正パラメータを用いて前記画像の階調が補正される
ことを特徴とする請求項10〜16のいずれか1項に記載の画像処理装置の制御方法。
A calculation step of calculating the sum of the frequencies from the predetermined gradation value to the maximum gradation value of the histogram as the frequency on the high gradation side;
When the target gradation is not detected by the detection step,
In the gradation correction parameter generation step, one of a plurality of predetermined gradation correction parameters stored in the storage unit is selected according to the frequency on the high gradation side,
The image processing apparatus control method according to claim 10, wherein in the correction step, the gradation of the image is corrected using the selected gradation correction parameter.
JP2011158153A 2009-06-29 2011-07-19 Image processing apparatus and control method thereof Active JP5089797B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011158153A JP5089797B2 (en) 2009-06-29 2011-07-19 Image processing apparatus and control method thereof

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2009154139 2009-06-29
JP2009154139 2009-06-29
JP2011158153A JP5089797B2 (en) 2009-06-29 2011-07-19 Image processing apparatus and control method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2010057700A Division JP4795473B2 (en) 2009-06-29 2010-03-15 Image processing apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2011205714A true JP2011205714A (en) 2011-10-13
JP5089797B2 JP5089797B2 (en) 2012-12-05

Family

ID=44881752

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011158153A Active JP5089797B2 (en) 2009-06-29 2011-07-19 Image processing apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP5089797B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014002689A1 (en) * 2012-06-28 2014-01-03 シャープ株式会社 Image processing device and recording medium
WO2017170726A1 (en) * 2016-03-31 2017-10-05 株式会社ニコン Image pickup device and electronic apparatus
WO2017170725A1 (en) * 2016-03-31 2017-10-05 株式会社ニコン Imaging device, imaging subject detection apparatus, and electronic device
CN113870761A (en) * 2021-09-27 2021-12-31 惠州华星光电显示有限公司 Display device driving method and display device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5361624B2 (en) * 2009-09-09 2013-12-04 キヤノン株式会社 Image processing apparatus, image processing method, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001243463A (en) * 2000-02-28 2001-09-07 Minolta Co Ltd Recording medium and device and method for image processing
JP2005108208A (en) * 2003-09-11 2005-04-21 Matsushita Electric Ind Co Ltd Image quality correcting device and image quality correction method
JP2007208399A (en) * 2006-01-31 2007-08-16 Sony Corp Image processing unit, image processing method, program thereof, and recording medium for recording the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001243463A (en) * 2000-02-28 2001-09-07 Minolta Co Ltd Recording medium and device and method for image processing
JP2005108208A (en) * 2003-09-11 2005-04-21 Matsushita Electric Ind Co Ltd Image quality correcting device and image quality correction method
JP2007208399A (en) * 2006-01-31 2007-08-16 Sony Corp Image processing unit, image processing method, program thereof, and recording medium for recording the same

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014002689A1 (en) * 2012-06-28 2014-01-03 シャープ株式会社 Image processing device and recording medium
JP2014010576A (en) * 2012-06-28 2014-01-20 Sharp Corp Image processing device, program, and recording medium
US9497355B2 (en) 2012-06-28 2016-11-15 Sharp Kabushiki Kaisha Image processing apparatus and recording medium for correcting a captured image
WO2017170726A1 (en) * 2016-03-31 2017-10-05 株式会社ニコン Image pickup device and electronic apparatus
WO2017170725A1 (en) * 2016-03-31 2017-10-05 株式会社ニコン Imaging device, imaging subject detection apparatus, and electronic device
CN113870761A (en) * 2021-09-27 2021-12-31 惠州华星光电显示有限公司 Display device driving method and display device

Also Published As

Publication number Publication date
JP5089797B2 (en) 2012-12-05

Similar Documents

Publication Publication Date Title
JP4795473B2 (en) Image processing apparatus and control method thereof
JP4616749B2 (en) Improved adaptive contrast
JP5889431B2 (en) Image processing apparatus and image processing method
EP2003614B1 (en) Method and apparatus for contrast enhancement
JP5159208B2 (en) Image correction method and apparatus
JP5201038B2 (en) Video signal processing method and video signal processing apparatus
JP5089797B2 (en) Image processing apparatus and control method thereof
TWI553604B (en) Adaptive contrast enhancement apparatus and method
JP2006197584A (en) Black/white stretching system using rgb information in image
JP2012213224A (en) Luminance conversion curve creation device and method, and luminance conversion curve creation program
JP2013070359A (en) Image processor and image processing method
US20080151080A1 (en) Image processing device
JP2007249436A (en) Image signal processor and processing method
JP2012175310A (en) Image processing apparatus and image processing method
JP2006331172A (en) Gradation correction apparatus
US7289666B2 (en) Image processing utilizing local color correction and cumulative histograms
JP3801179B2 (en) Frame cyclic noise reduction method
JP2000102033A (en) Automatic gradation correction method
JP2006165828A (en) Gradation correcting device
JP4499095B2 (en) Method for selectively smoothing pixels of an image to reduce bleed-through
JP5312171B2 (en) Image processing apparatus and method
JP2008042448A (en) Gradation improving circuit and display system
US7773824B2 (en) Signal processing device and method, recording medium, and program
JP2006180267A (en) Picture quality correcting circuit
JP6126054B2 (en) Image signal processing method and image signal processing apparatus

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110719

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110801

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120814

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120911

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150921

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5089797

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150921

Year of fee payment: 3