JP2011061419A - Image processor and image processing method - Google Patents
Image processor and image processing method Download PDFInfo
- Publication number
- JP2011061419A JP2011061419A JP2009207948A JP2009207948A JP2011061419A JP 2011061419 A JP2011061419 A JP 2011061419A JP 2009207948 A JP2009207948 A JP 2009207948A JP 2009207948 A JP2009207948 A JP 2009207948A JP 2011061419 A JP2011061419 A JP 2011061419A
- Authority
- JP
- Japan
- Prior art keywords
- gradation
- value
- gradation value
- image
- curve
- 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
Links
- 238000003672 processing method Methods 0.000 title claims description 9
- 238000006243 chemical reaction Methods 0.000 claims abstract description 28
- 238000001514 detection method Methods 0.000 claims abstract description 9
- 238000000034 method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 6
- 238000007796 conventional method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000012447 hatching Effects 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Record Information Processing For Printing (AREA)
- Color, Gradation (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、画像処理装置及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method.
従来、入力された画像(入力画像;入力画像信号)の特徴に応じて適応的にγ変換処理を実行する画像処理方法がある。以下、このような画像処理方法をダイナミックγ処理と表記する。
ダイナミックγ処理の方法として、例えば、入力画像の輝度ヒストグラムからピークとなる階調値を検出し、その階調値の度数に応じて適応的にγ変換処理を実行する方法がある(特許文献1参照)。また、検出された階調値の度数を用いて基準値を設定し、該基準値に応じて適応的にγ変換処理を行う方法がある(特許文献2参照)。
Conventionally, there is an image processing method that adaptively executes γ conversion processing according to the characteristics of an input image (input image; input image signal). Hereinafter, such an image processing method is referred to as dynamic γ processing.
As a method of dynamic γ processing, for example, there is a method of detecting a peak gradation value from a luminance histogram of an input image and adaptively executing γ conversion processing according to the frequency of the gradation value (Patent Document 1). reference). Further, there is a method in which a reference value is set using the frequency of the detected gradation value, and γ conversion processing is adaptively performed according to the reference value (see Patent Document 2).
しかしながら、従来のダイナミックγ処理では、以下に述べるように、適切な変換結果が得られないことがあった。
例えば、図2に示すような画像が入力されたとする。図2において、領域Aは、高い階調値を主な階調値とする物体の領域(明るい領域)であり、領域Bは、低い階調値を主な階調値とする平坦な背景の領域(暗い領域)である。このような画像から生成される輝度ヒストグラムの一例を、図10に示す。
図10に示すように、図2に示す画像から得られる輝度ヒストグラムでは、物体の主な階調値a付近、及び、背景の主な階調値b付近に度数が集中する(階調値aと階調値bにピークが現れる)。
ここで、図2に示す画像において、領域Bの面積の方が領域Aの面積よりも大きいため、図10の輝度ヒストグラムでは、階調値bのピークの方が階調値aのピークよりも高くなる。そのため、従来の方法では、階調値bが集中階調(注目すべき領域の階調値)として扱われ、ガンマ変換処理に用いるγカーブとして、図11の実線で示すように、階調値b及びその近傍の階調性を高めるγカーブが設定される。図11の点線は、入力信号をリニアに変換して出力信号とする場合の変換直線である。
これにより、図2の画像における背景の領域Bを図12に示すように明るく表示することができる(暗い領域の視認性を向上することができる)。
However, in the conventional dynamic γ processing, as described below, an appropriate conversion result may not be obtained.
For example, assume that an image as shown in FIG. 2 is input. In FIG. 2, an area A is an object area (bright area) having a high gradation value as a main gradation value, and an area B is a flat background having a low gradation value as a main gradation value. It is an area (dark area). An example of a luminance histogram generated from such an image is shown in FIG.
As shown in FIG. 10, in the luminance histogram obtained from the image shown in FIG. 2, the frequencies are concentrated near the main gradation value a of the object and the main gradation value b of the background (tone value a And a peak appears in the gradation value b).
Here, in the image shown in FIG. 2, the area of the region B is larger than the area of the region A. Therefore, in the luminance histogram of FIG. 10, the peak of the gradation value b is more than the peak of the gradation value a. Get higher. Therefore, in the conventional method, the gradation value b is treated as a concentrated gradation (a gradation value of a region to be noted), and the gradation value is represented as a γ curve used for the gamma conversion process as indicated by a solid line in FIG. A γ curve that enhances the gradation of b and the vicinity thereof is set. A dotted line in FIG. 11 is a conversion straight line when the input signal is linearly converted into an output signal.
As a result, the background region B in the image of FIG. 2 can be displayed brightly as shown in FIG. 12 (the visibility of dark regions can be improved).
しかしながら、領域Bは平坦な背景の領域であり、注目すべき領域ではない。そのため、図11の実線に示すようなγカーブを用いてγ変換処理を行うと、物体と背景の明暗差が小さくなり、画像のコントラスト感が損なわれてしまう。
本来、図2に示すような画像が入力された場合には、図6の実線に示すように、階調値b及びその近傍の階調性を低くするγカーブを設定することが好ましい。それにより、図7に示すように物体と背景の明暗差を大きくして良好なコントラスト感を表現することができる。図6の点線は、入力信号をリニアに変換して出力信号とする場合の変換直線である。
However, the region B is a flat background region and is not a notable region. Therefore, when γ conversion processing is performed using a γ curve as shown by the solid line in FIG. 11, the contrast between the object and the background is reduced, and the contrast of the image is impaired.
Originally, when an image as shown in FIG. 2 is input, as shown by the solid line in FIG. 6, it is preferable to set a γ curve that lowers the gradation value b and the gradation in the vicinity thereof. Thereby, as shown in FIG. 7, the contrast between the object and the background can be increased to express a good contrast. A dotted line in FIG. 6 is a conversion straight line when the input signal is linearly converted into an output signal.
そこで本発明では、度数の集中する階調値が注目すべき領域の階調値なのか背景の階調
値なのかを簡易に判定することができ、適切なγカーブを用いたγ変換処理を行うことのできる技術を提供することを目的とする。
Therefore, in the present invention, it is possible to easily determine whether the gradation value where the frequency is concentrated is the gradation value of the region to be noticed or the gradation value of the background, and γ conversion processing using an appropriate γ curve is performed. The purpose is to provide technology that can be performed.
本発明の画像処理装置は、入力された画像から階調ヒストグラムを生成する生成手段と、階調ヒストグラムから、度数の集中する階調値を検出し、第1階調値として出力する検出手段と、階調ヒストグラムにおける、第1階調値を含む所定階調分の階調範囲である近傍階調範囲内の度数の総和を算出し、分布量として出力する算出手段と、分布量が所定の閾値以下である場合に、第1階調値をそのまま出力し、分布量が所定の閾値より大きい場合に、第1階調値を補正して出力する補正手段と、補正手段が出力する階調値に応じてγカーブを決定する決定手段と、決定されたγカーブを用いて画像の階調を変換するγ変換手段と、を有し、補正後の第1階調値に応じて決定されるγカーブは、補正前の第1階調値に応じて決定されるγカーブを用いて階調が変換された画像に比べ、近傍階調範囲の階調性の低い画像を得るためのγカーブであることを特徴とする。 An image processing apparatus according to the present invention includes a generation unit that generates a gradation histogram from an input image, a detection unit that detects a gradation value in which frequencies are concentrated from the gradation histogram, and outputs the gradation value as a first gradation value. Calculating means for calculating the sum of the frequencies in the vicinity gradation range that is the gradation range for the predetermined gradation including the first gradation value in the gradation histogram, and outputting the distribution amount as a distribution amount; The first gradation value is output as it is when it is equal to or less than the threshold value, and the correction means for correcting and outputting the first gradation value when the distribution amount is larger than the predetermined threshold value, and the gradation output by the correction means A determining unit that determines a γ curve according to the value, and a γ converting unit that converts the gradation of the image using the determined γ curve, and is determined according to the corrected first gradation value The γ curve that is determined according to the first gradation value before correction is used. And a γ curve for obtaining an image having a low gradation in the vicinity gradation range as compared with an image whose gradation has been converted.
本発明の画像処理方法は、入力された画像から階調ヒストグラムを生成する生成ステップと、階調ヒストグラムから、度数の集中する階調値を検出し、第1階調値として出力する検出ステップと、階調ヒストグラムにおける、第1階調値を含む所定階調分の階調範囲である近傍階調範囲内の度数の総和を算出し、分布量として出力する算出ステップと、分布量が所定の閾値以下である場合に、第1階調値をそのまま出力し、分布量が所定の閾値より大きい場合に、第1階調値を補正して出力する補正ステップと、補正ステップで出力される階調値に応じてγカーブを決定する決定ステップと、決定されたγカーブを用いて画像の階調を変換するγ変換ステップと、を有し、補正後の第1階調値に応じて決定されるγカーブは、補正前の第1階調値に応じて決定されるγカーブを用いて階調が変換された画像に比べ、近傍階調範囲の階調性の低い画像を得るためのγカーブであることを特徴とする。 The image processing method of the present invention includes a generation step of generating a gradation histogram from an input image, a detection step of detecting a gradation value at which frequencies are concentrated from the gradation histogram, and outputting the detected gradation value as a first gradation value. Calculating a total sum of frequencies in a neighboring gradation range that is a gradation range for a predetermined gradation including the first gradation value in the gradation histogram, and outputting the distribution amount as a distribution amount; When the value is equal to or smaller than the threshold value, the first gradation value is output as it is, and when the distribution amount is larger than the predetermined threshold value, a correction step for correcting and outputting the first gradation value, and a floor output in the correction step A determination step for determining a γ curve according to the tone value, and a γ conversion step for converting the gradation of the image using the determined γ curve, which is determined according to the corrected first gradation value Γ curve is the first gradation before correction Compared to the image gradation is transformed using γ curve is determined according to, characterized in that it is a γ curve for obtaining a gray scale having a low image near tonal range.
本発明によれば、度数の集中する階調値が注目すべき領域の階調値なのか背景の階調値なのかを簡易に判定することができ、適切なγカーブを用いたγ変換処理を行うことができる。 According to the present invention, it is possible to easily determine whether the gradation value where the frequency is concentrated is the gradation value of the region of interest or the gradation value of the background, and γ conversion processing using an appropriate γ curve It can be performed.
<実施例1>
(全体構成)
以下、本発明の実施例1に係る画像処理装置及び画像処理方法について説明する。図1
は、本実施例に係る画像処理装置の機能構成の一例を示すブロック図である。
図1に示す画像処理装置100は、階調ヒストグラム生成部101、集中階調検出部102、分布量算出部103、階調値補正部104、γカーブ決定部105、γ変換部106、入力端子107、出力端子108などを有する。以下、図2に示す画像が入力された場合を例に、画像処理装置100の各機能について詳しく説明する。
図2において、領域Aは、高い階調値を主な階調値とする物体の領域(明るい領域)であり、領域Bは、低い階調値を主な階調値とする平坦な背景の領域(暗い領域)である。なお、本実施例では、画像のサイズを1920画素×1080画素とする。
<Example 1>
(overall structure)
Hereinafter, an image processing apparatus and an image processing method according to
These are block diagrams which show an example of a function structure of the image processing apparatus which concerns on a present Example.
An
In FIG. 2, an area A is an object area (bright area) having a high gradation value as a main gradation value, and an area B is a flat background having a low gradation value as a main gradation value. It is an area (dark area). In the present embodiment, the size of the image is 1920 pixels × 1080 pixels.
階調ヒストグラム生成部101は、入力された画像(入力画像;入力画像信号)から階調ヒストグラムを生成する。
本実施例では、階調ヒストグラム生成部101は、階調ヒストグラムとして、入力画像の輝度信号の階調ヒストグラム(輝度ヒストグラム)を生成する。また、本実施例では、図3に示すように、階調値が0〜255の256カテゴリの輝度ヒストグラムが生成される。横軸は階調値を示しており、縦軸は度数を示している。なお、階調数やカテゴリ数はこれに限らない。例えば、階調数を128とし、カテゴリ数を64(1カテゴリあたり2階調)としてもよい。
The gradation
In this embodiment, the gradation
集中階調検出部102は、階調ヒストグラム生成部101で生成された階調ヒストグラムから、度数の集中する階調値(集中階調)を検出し、第1階調値P1として出力する。
本実施例では、集中階調検出部102は、集中階調として、最も度数の多い階調値を検出する。より具体的には、階調値0〜63の範囲において最も度数の多い階調値を、第1階調値P1とする。なお、第1階調値P1は、最も度数の多い階調値に限らない。第1階調値P1は、度数の集中する階調値であればよい。例えば、全階調範囲を複数の階調範囲(部分階調範囲)に区分し、最も度数の多い部分階調範囲を度数の集中する階調範囲として検出し、その中心の階調値を第1階調値P1としてもよい。本実施例では、図3に示すように、階調値32が第1階調値P1とされたとする。
The concentrated
In this embodiment, the concentrated
分布量算出部103は、階調ヒストグラム生成部101で生成された階調ヒストグラムにおける、第1階調値P1を含む所定階調分の階調範囲である近傍階調範囲内の度数の総和を算出し、分布量S1として出力する。具体的には、第1階調値P1、及び、第1階調値P1の前M階調及び後ろN階調分の度数の総和を分布量S1とする(本実施例では図3のハッチング箇所のようにM=N=2とする)。なお、MやNの値は2に限らない(例えば、M=N=5,10などであってもよいし、MとNとで値を異ならせてもよい)。また、第1階調値P1を含む上記部分階調範囲を近傍階調範囲としてもよい。近傍階調範囲は、目的等に応じて適宜設定されるものであり、どのように設定してもよい。本実施例では、分布量S1として入力画像の全画素数の70%の値(1920×1080×0.7=1451520)が得られたとする。
The distribution
階調値補正部104は、分布量S1が所定の閾値以下である場合に、第1階調値P1をそのまま出力し、分布量S1が所定の閾値より大きい場合に、第1階調値P1を補正して出力する。階調値補正部104の詳細については後で詳しく説明する。
The gradation
γカーブ決定部105は、階調値補正部104が出力する階調値に応じてγカーブを決定する。
本実施例では、γカーブ決定部105には、複数のγカーブが、それぞれ、階調値と対応付けて記憶されている。具体的には、図5に示すように、階調値0〜63にそれぞれ対応する64本のγカーブ(カーブナンバーB0〜B63のγカーブ)が記憶されている。そして、γカーブ決定部105は、記憶されているγカーブから、階調値に対応するγカーブ(階調値と同じカーブナンバーのγカーブ)を選択(決定)する。記憶されているγ
カーブは、カーブナンバーが小さいほど低階調側の階調性を高くし、大きいほど低階調側の階調性を低くするγカーブである。また、γカーブは、対応する階調値を含む上記所定階調分の階調範囲(対応する階調値及びその近傍の階調範囲)の階調性を高めるγカーブである。図5の点線は、入力信号をリニアに変換して出力信号とする場合の変換直線である。なお、γカーブ決定部105で決定されるγカーブは、これらに限らない。階調値に応じたγカーブ(例えば、対応する階調値を含む上記所定階調分の階調範囲の階調性を高めるγカーブ)であればどのようなγカーブであってもよい。
γ変換部106は、γカーブ決定部105で決定されたγカーブを用いて入力画像の階調を変換する(γ変換処理を行う)。そして、γ変換処理された画像(出力画像;出力画像信号)を出力する。
The γ
In this embodiment, the γ
The curve is a γ curve that increases the gradation on the low gradation side as the curve number is small and decreases the gradation on the low gradation side as the curve number is large. The γ curve is a γ curve that enhances the gradation of the gradation range for the predetermined gradation including the corresponding gradation value (the corresponding gradation value and the gradation range in the vicinity thereof). A dotted line in FIG. 5 is a conversion straight line when the input signal is linearly converted into an output signal. The γ curve determined by the γ
The
(階調値補正部104の詳細)
以下、階調値補正部104について詳しく説明する。
分布量S1の値が大きい場合には、第1階調値P1は平坦で面積の大きい領域(典型的には背景)の階調値、即ち、注目すべき領域の階調値でない可能性が高い。そのため、そのような場合には、第1階調値P1に応じてγカーブ(第1階調値P1を含む所定階調分の階調範囲(近傍階調範囲)の階調性を高くするγカーブ)を決定することは好ましくない。具体的には、そのような場合には、第1階調値P1に応じて決定されるγカーブを用いて階調が変換された画像に比べ、上記近傍階調範囲の階調性の低い画像を得るためのγカーブを設定することが望ましい。そのようなγカーブを設定することにより、第1階調値P1を主な階調値とする領域と他の領域との明暗の差が大きくなり、良好なコントラスト感を表現することができる。
一方、分布量S1の値が小さい場合には、第1階調値P1は注目すべき領域の階調値である可能性が高い(分布量S1の値が小さくても、第1階調値P1は度数の集中する階調値であるため)。そのため、そのような場合には、第1階調値P1に応じてγカーブを決定すればよい。それにより、注目すべき領域の階調性(視認性)を高めることができる。
(Details of gradation value correction unit 104)
Hereinafter, the gradation
When the value of the distribution amount S1 is large, the first gradation value P1 may not be a gradation value of a flat area with a large area (typically a background), that is, a gradation value of an area to be noted. high. Therefore, in such a case, the gradation property of the γ curve (the gradation range (near gradation range) for the predetermined gradation including the first gradation value P1) is increased according to the first gradation value P1. It is not preferable to determine (γ curve). Specifically, in such a case, the gradation characteristics in the vicinity gradation range are low compared to an image in which gradation is converted using a γ curve determined according to the first gradation value P1. It is desirable to set a γ curve for obtaining an image. By setting such a γ curve, the difference in brightness between the area having the first gradation value P1 as the main gradation value and the other areas becomes large, and a good contrast feeling can be expressed.
On the other hand, when the value of the distribution amount S1 is small, the first gradation value P1 is likely to be a gradation value of a region to be noted (even if the value of the distribution amount S1 is small, the first gradation value P1). (Because P1 is a gradation value with concentrated frequencies). Therefore, in such a case, the γ curve may be determined according to the first gradation value P1. Thereby, the gradation (visibility) of the region to be noted can be improved.
そこで、本実施例では、階調値補正部104において、分布量S1が所定の閾値以下である場合に、第1階調値P1が注目すべき領域の階調値であると判断し、第1階調値P1をそのまま出力する。分布量S1が所定の閾値より大きい場合には、第1階調値P1が注目すべき領域の階調値でないと判断し、第1階調値P1を補正して、第2階調値P2として出力する。具体的には、補正後の第1階調値に応じて決定されるγカーブが、補正前の第1階調値に応じて決定されるγカーブを用いて階調が変換された画像に比べ、上記近傍階調範囲の階調性の低い画像を得るためのγカーブとなるように、第1階調値を補正する。なお、本実施例では、入力画像の全画素数の50%の値(1920×1080×0.5=1036800)を所定の閾値とする。但し、所定の閾値は、この値に限らない。所定の閾値は、目的(例えば、どの程度までを注目すべき領域とするか)に応じて適宜設定すればよく、どのように設定してもよい。所定の閾値は、例えば、近傍階調範囲の広さに応じて設定すればよい。
Therefore, in this embodiment, the gradation
図4を用いて階調値補正部104の具体的な構成の一例を説明する。図4は階調値補正部104の機能構成の一例を示すブロック図である。
An example of a specific configuration of the gradation
オフセット処理部109は、分布量S1から所定のオフセット値f(所定の閾値)を減算し、オフセット分布量S2として出力する。また、オフセット処理部109は、減算結果が負値の場合には、オフセット分布量S2として0を出力する。本実施例では、オフセット値f(所定の閾値)は、入力画像の全画素数の50%の値(1920×1080×0.5=1036800)であるため、オフセット分布量S2の値として、(S1−f=1451520−1036800=)414720が得られる。
The offset
ゲイン処理部110は、オフセット分布量S2に所定のゲイン値を乗算し、ゲイン分布量S3として出力する。本実施例では、所定の値(本実施例では100)を入力画像の全画素数で除算した値をゲイン値とする。そのため、本実施例では、ゲイン分布量S3の値として、(414720×100÷(1920×1080)=)20が得られる。
The
加算処理部111は、ゲイン分布量S3を第1階調値P1に加算して、第2階調値P2として出力する。また、加算処理部111は、加算結果が64以上の場合には、第2階調値として63を出力する。そのため、本実施例では、第2階調値P2として、(32+20=)52が得られる。これにより、図6の実線に示すように、カーブナンバーB52のγカーブ(カーブナンバーB32のγカーブを用いて階調が変換された画像に比べ、階調値32を含む所定階調分の階調範囲の階調性の低い画像を得るためのγカーブ)が選択される。その結果、図7に示すように、注目すべき領域でない領域Bの階調性を低くする(領域Bを暗くする)ことができ、領域Aと領域Bとの明暗の差が大きくなり、良好なコントラスト感を表現することができる。
また、分布量S1の値が所定の閾値より大きいほど、第1階調値P1は注目すべきでない領域の階調値である可能性が高い。本実施例では、分布量S1の値が所定の閾値より大きいほど、第1階調値P1を含む所定階調分の階調範囲の階調性のより低い画像を得るためのγカーブが決定(選択)されるように、第1階調値P1が補正される。そのため、分布量S1の値に応じてより適切なγ変換処理を行うことができる。
更に、本実施例によれば、入力画像の全画素数の50%の値をオフセット値fとしたため、分布量S1が入力画像の全画素数の50%の値以下となる場合には、ゲイン分布量S3の値は0となる。そのため、そのような場合には、第1階調値P1は、注目すべき領域の階調値として、そのまま出力されることになる。その結果、注目すべき領域の階調性(視認性)を高めることができる。
The
Further, as the value of the distribution amount S1 is larger than the predetermined threshold value, the first gradation value P1 is more likely to be a gradation value in a region that should not be noted. In the present embodiment, as the value of the distribution amount S1 is larger than a predetermined threshold, a γ curve for obtaining an image having a lower gradation in the gradation range for the predetermined gradation including the first gradation value P1 is determined. The first gradation value P1 is corrected so as to be selected. Therefore, more appropriate γ conversion processing can be performed according to the value of the distribution amount S1.
Further, according to the present embodiment, since the value of 50% of the total number of pixels of the input image is set as the offset value f, the gain is obtained when the distribution amount S1 is equal to or less than the value of 50% of the total number of pixels of the input image. The value of the distribution amount S3 is 0. Therefore, in such a case, the first gradation value P1 is output as it is as the gradation value of the region to be noted. As a result, the gradation (visibility) of a region to be noted can be improved.
以上述べたように、本実施例によれば、度数の集中する階調値(集中階調)が注目すべき領域の階調値なのか背景の階調値なのかを、分布量S1と所定の閾値とを比較する、という簡易な方法で判定することができる。その結果、適切なγカーブを用いたγ変換処理を行うことができる。
具体的には、集中階調が注目すべき領域の階調値である場合には、集中階調に応じたγカーブによるγ変換処理が行われるため、注目すべき領域の階調性(視認性)を高めることができる。また、集中階調が注目すべき領域の階調値でない場合には、該集中階調に応じて決定されるγカーブを用いて階調が変換された画像に比べ、集中階調を含む所定階調分の階調範囲の階調性の低い画像を得るためのγカーブを用いてγ変換処理が行われる。そのため、集中階調を主な階調値とする領域と他の領域との明暗の差が大きくなり、良好なコントラスト感を表現することができる。
As described above, according to the present embodiment, the distribution amount S1 and the predetermined gradation value are used to determine whether the tone value (concentrated tone) where the frequency is concentrated is the tone value of the region to be noted or the background tone value. It is possible to make a determination by a simple method of comparing with the threshold value. As a result, γ conversion processing using an appropriate γ curve can be performed.
Specifically, when the concentrated gradation is a gradation value of a region to be noted, γ conversion processing is performed by a γ curve corresponding to the concentrated gradation, so that the gradation property (visual recognition) of the region to be noted is visually recognized. Property). Further, when the concentrated gradation is not the gradation value of the region to be noted, a predetermined value including the concentrated gradation is compared with an image in which the gradation is converted using a γ curve determined according to the concentrated gradation. A γ conversion process is performed using a γ curve for obtaining an image with a low gradation in the gradation range corresponding to the gradation. For this reason, the difference in brightness between the area having the concentrated gradation as the main gradation value and the other areas becomes large, and a good contrast feeling can be expressed.
なお、第1階調値P1の補正方法は上記方法に限らない。補正前の第1階調値P1に応じて決定されるγカーブを用いて階調が変換された画像に比べ、第1階調値P1を含む所定階調分の階調範囲の階調性の低い画像を得るためのγカーブが決定されるように、第1階調値P1が補正されればよい。例えば、第1階調値P1に所定の値を加算して、補正後の第1階調値としてもよい(第1階調値P1に、分布量S1の値が大きいほど大きな値を加算してもよい)。また、オフセット処理やゲイン処理は上記方法に限らない。例えば、分布量S1が所定の閾値より大きいほどオフセット分布量S2やゲイン分布量S3の値が小さくなるように処理してもよい。その場合には、ゲイン分布量S3の値が小さいほど第2階調値P2が大きくなるように処理すればよい。
なお、本実施例では、集中階調の探索範囲を階調値0〜63の範囲としたが、探索範囲はこれに限らない。例えば、階調値0〜127を探索範囲としてもよい。また、低階調側の階調範囲(低階調領域)に限らず、階調値32〜95のような中間階調領域や、階調値128〜255のような高階調領域(高階調側の階調範囲)を探索範囲としてもよい。
なお、本実施例では、階調ヒストグラムが輝度ヒストグラムである場合について説明したが、階調ヒストグラムは入力画像のRGB信号の階調ヒストグラムであってもよいし、他の信号フォーマットにおけるヒストグラムであってもよい。
Note that the correction method of the first gradation value P1 is not limited to the above method. Compared to an image whose gradation is converted using a γ curve determined according to the first gradation value P1 before correction, the gradation characteristics of a gradation range for a predetermined gradation including the first gradation value P1 The first gradation value P1 may be corrected so that a γ curve for obtaining an image with a low image quality is determined. For example, a predetermined value may be added to the first gradation value P1 to obtain a corrected first gradation value (the larger the distribution amount S1 is, the larger the value is added to the first gradation value P1). May be) Further, the offset processing and gain processing are not limited to the above methods. For example, processing may be performed so that the values of the offset distribution amount S2 and the gain distribution amount S3 become smaller as the distribution amount S1 is larger than a predetermined threshold. In that case, the second gradation value P2 may be increased as the value of the gain distribution amount S3 is decreased.
In this embodiment, the search range of the concentrated gradation is set to the range of gradation values 0 to 63, but the search range is not limited to this. For example, gradation values 0 to 127 may be used as the search range. In addition, the gradation range (low gradation region) on the low gradation side is not limited, and an intermediate gradation region such as gradation values 32 to 95 or a high gradation region (high gradation regions) such as gradation values 128 to 255 is used. The side gradation range) may be used as the search range.
In this embodiment, the case where the gradation histogram is a luminance histogram has been described. However, the gradation histogram may be a gradation histogram of RGB signals of an input image, or a histogram in another signal format. Also good.
<実施例2>
以下、本発明の実施例2に係る画像処理装置及び画像処理方法について説明する。なお、実施例1と同様の機能等については説明を省略する。図8は、本実施例に係る画像処理装置200の機能構成を示すブロック図である。図8において、実施例1の図1と同様の機能(構成要素)には同じ番号を付している。
本実施例に係る画像処理装置200は、実施例1に係る画像処理装置100が有する機能の他に、分割階調ヒストグラム生成部201を更に有する。
<Example 2>
Hereinafter, an image processing apparatus and an image processing method according to Embodiment 2 of the present invention will be described. Note that description of functions and the like similar to those of the first embodiment is omitted. FIG. 8 is a block diagram illustrating a functional configuration of the
The
分割階調ヒストグラム生成部201は、入力画像を複数の領域(分割領域)に分割し、分割領域毎に階調ヒストグラムを生成する。本実施例では、図9に示すように入力画像を4×4(領域1〜16)の分割領域に分割して、分割領域毎に階調ヒストグラムを生成する。なお、分割数は4×4に限らない。例えば、入力画像を3×3の分割領域に分割してもよいし、6×6,3×4,4×3などの分割領域に分割してもよい。
The divided gradation
集中階調検出部102は、領域毎の階調ヒストグラムのそれぞれから、度数の集中する階調値(集中階調)を検出し、領域毎に検出された階調値のいずれかを第1階調値P1として出力する。
本実施例では、集中階調検出部102は、低階調側の階調範囲(低階調領域;例えば、階調値0〜63の範囲)と、高階調側の階調範囲(高階調領域;例えば、階調値128〜255の範囲)のそれぞれから集中階調を検出する。そして、低階調領域から検出された領域毎の階調値のうち最も低階調側の階調値、高階調領域から検出された領域毎の階調値のうち最も高階調側の階調値を、それぞれ、第1階調値P1−1,P1−2として出力する。
The concentrated
In this embodiment, the concentrated
分布量算出部103は、入力画像の1画面分の階調ヒストグラムにおける、第1階調値P1を含む所定階調分の階調範囲(近傍階調範囲)内の度数の総和を算出し、分布量S1として出力する。
本実施例では、分布量算出部103は、第1階調値P1−1を含む所定階調分の階調範囲内の度数の総和を算出し、分布量S1−1として出力する。また、第1階調値P1−2を含む所定階調分の階調範囲内の度数の総和を算出し、分布量S1−2として出力する。
また、本実施例では、分布量S1を算出する際に、階調ヒストグラム生成部101で生成された1画面分の階調ヒストグラムを用いる。これにより領域毎の階調ヒストグラムを用いて演算するよりも演算量を低減することができる。
The distribution
In the present embodiment, the distribution
Further, in this embodiment, when calculating the distribution amount S1, the gradation histogram for one screen generated by the gradation
その他の機能は実施例1と同様である。具体的には、第1階調値P1−1,P1−2のそれぞれについて、実施例1と同様の処理(階調値補正部104による処理)が行われる。そして、階調値補正部104から出力される階調値に応じてγカーブが決定され、決定されたγカーブを用いて画像にγ変換処理が施される。
Other functions are the same as those in the first embodiment. Specifically, the same processing as the first embodiment (processing by the tone value correcting unit 104) is performed for each of the first tone values P1-1 and P1-2. Then, a γ curve is determined according to the gradation value output from the gradation
本実施例によれば、分割領域毎に集中階調が検出され、それらのいずれかを第1階調値とすることにより、第1階調値が注目すべき領域の階調値なのか否かをより精度良く判定することが可能となる。例えば、部分領域内では度数がピークとならない階調値が、画像全体でカウントすることによりピークとなり、集中階調として誤検出されることを防ぐことができる。また、集中階調が注目すべき領域の階調値である場合には、集中階調に応じたγカーブによるγ変換処理が行われるため、注目すべき領域の階調性(視認性)を高めることができる。また、集中階調が注目すべき領域の階調値でない場合には、該集中階調
に応じて決定されるγカーブを用いて階調が変換された画像に比べ、集中階調を含む所定階調分の階調範囲の階調性の低い画像を得るためのγカーブを用いてγ変換処理が行われる。そのため、集中階調を主な階調値とする領域と他の領域との明暗の差が大きくなり、良好なコントラスト感を表現することができる。
According to the present embodiment, a concentrated gradation is detected for each divided region, and any one of them is set as the first gradation value, so that the first gradation value is the gradation value of the region to be noted. It becomes possible to determine more accurately. For example, it is possible to prevent a gradation value whose frequency is not peaked in the partial area from being peaked by counting the entire image and being erroneously detected as a concentrated gradation. In addition, when the concentrated gradation is the gradation value of the region to be noticed, the γ conversion processing by the γ curve corresponding to the concentrated gradation is performed, so the gradation property (visibility) of the region to be noted is reduced. Can be increased. Further, when the concentrated gradation is not the gradation value of the region to be noted, a predetermined value including the concentrated gradation is compared with an image in which the gradation is converted using a γ curve determined according to the concentrated gradation. A γ conversion process is performed using a γ curve for obtaining an image with a low gradation in the gradation range corresponding to the gradation. For this reason, the difference in brightness between the area having the concentrated gradation as the main gradation value and the other areas becomes large, and a good contrast feeling can be expressed.
なお、本実施例では、最も低階調側の集中階調と最も高階調側の集中階調の両方を第1階調値としたが、第1階調値はこれに限らない。最も低階調側の集中階調と最も高階調側の集中階調のいずれかを第1階調値としてもよい。少なくとも最も低階調側の集中階調を第1階調値とすれば、第1階調値が注目すべき領域の階調値である場合に、黒つぶれを抑制することができる。また、少なくとも最も高階調側の集中階調を第1階調値とすれば、第1階調値が注目すべき領域の階調値である場合に、白とびを抑制することができる。 In this embodiment, both the lowest gradation side concentrated gradation and the highest gradation side concentrated gradation are set as the first gradation value, but the first gradation value is not limited to this. Either the lowest gradation side concentrated gradation or the highest gradation side concentrated gradation may be set as the first gradation value. If at least the lowest gradation side concentrated gradation is the first gradation value, blackout can be suppressed when the first gradation value is a gradation value of a region to be noted. Further, if at least the concentrated gradation on the highest gradation side is the first gradation value, overexposure can be suppressed when the first gradation value is a gradation value of a region to be noted.
<その他の実施例>
本発明は、画像処理装置の各ブロックをハードウェアにより実施する場合や、コンピュータを用いたソフトウェア処理にて実施する場合にも適用することができ、同様の効果を得ることが可能である。コンピュータが供給されたプログラムコードを実行する場合には、上記ソフトウェアのプログラムコード自体が上述の実施の形態で示した機能を実現することになる。そして、そのプログラムコード自体、およびそのプログラムコードをコンピュータに供給するための手段、例えばかかるプログラムコードを格納した記憶媒体が本発明を構成することとなる。かかるプログラムコードを記憶する記憶媒体としては、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
<Other examples>
The present invention can be applied to a case where each block of the image processing apparatus is implemented by hardware or a software process using a computer, and similar effects can be obtained. When the computer executes the supplied program code, the software program code itself realizes the functions described in the above embodiments. The program code itself and means for supplying the program code to a computer, for example, a storage medium storing the program code constitute the present invention. As a storage medium for storing the program code, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
また、本発明は、そのプログラムコードがコンピュータにおいて稼働しているOS(オペレーティングシステム)或いは他のアプリケーションソフト等と共同して上述の実施の形態で示した機能が実現される場合にも適用することができる。その場合にも、かかるプログラムコードが本発明の実施形態に含まれる。
また、供給されたプログラムコードがコンピュータの機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに格納されてもよい。そして、そのプログラムコードの指示に基づいてその機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって上述の実施の形態で示した機能が実現されてもよい。その場合にも、かかるプログラムコードが本発明の実施形態に含まれる。
The present invention is also applicable to the case where the functions described in the above embodiments are realized in cooperation with an OS (operating system) or other application software running on the computer. Can do. Even in such a case, such a program code is included in the embodiment of the present invention.
The supplied program code may be stored in a memory provided in a function expansion board of a computer or a function expansion unit connected to the computer. The CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing based on the instruction of the program code, and the functions described in the above embodiments are realized by the processing. Also good. Even in such a case, such a program code is included in the embodiment of the present invention.
100 画像処理装置
101 階調ヒストグラム生成部
102 集中階調検出部
103 分布量算出部
104 階調値補正部
105 γカーブ決定部
106 γ変換部
DESCRIPTION OF
Claims (9)
前記階調ヒストグラムから、度数の集中する階調値を検出し、第1階調値として出力する検出手段と、
前記階調ヒストグラムにおける、前記第1階調値を含む所定階調分の階調範囲である近傍階調範囲内の度数の総和を算出し、分布量として出力する算出手段と、
前記分布量が所定の閾値以下である場合に、前記第1階調値をそのまま出力し、前記分布量が所定の閾値より大きい場合に、前記第1階調値を補正して出力する補正手段と、
前記補正手段が出力する階調値に応じてγカーブを決定する決定手段と、
前記決定されたγカーブを用いて前記画像の階調を変換するγ変換手段と、
を有し、
補正後の第1階調値に応じて決定されるγカーブは、補正前の第1階調値に応じて決定されるγカーブを用いて階調が変換された画像に比べ、前記近傍階調範囲の階調性の低い画像を得るためのγカーブである
ことを特徴とする画像処理装置。 Generating means for generating a gradation histogram from the input image;
Detecting means for detecting a gradation value at which the frequency is concentrated from the gradation histogram and outputting it as a first gradation value;
Calculating means for calculating the sum of the frequencies in the vicinity gradation range which is a gradation range for the predetermined gradation including the first gradation value in the gradation histogram, and outputting as a distribution amount;
A correction unit that outputs the first gradation value as it is when the distribution amount is equal to or smaller than a predetermined threshold value, and corrects and outputs the first gradation value when the distribution amount is larger than the predetermined threshold value. When,
Determining means for determining a γ curve according to the gradation value output by the correcting means;
Γ conversion means for converting the gradation of the image using the determined γ curve;
Have
The γ curve determined according to the first gradation value after correction is compared with the neighborhood floor compared to the image whose gradation is converted using the γ curve determined according to the first gradation value before correction. An image processing apparatus having a γ curve for obtaining an image having a low gradation property in a gradation range.
ことを特徴とする請求項1に記載の画像処理装置。 The correction means corrects the first gradation value so that a γ curve for obtaining an image having a lower gradation property in the neighboring gradation range is determined as the distribution amount is larger than a predetermined threshold value. The image processing apparatus according to claim 1, wherein:
前記検出手段は、前記領域毎の階調ヒストグラムのそれぞれから、度数の集中する階調値を検出し、領域毎に検出された階調値のいずれかを前記第1階調値として出力し、
前記算出手段は、前記画像の1画面分の階調ヒストグラムにおける、前記近傍階調範囲内の度数の総和を算出し、分布量として出力する
ことを特徴とする請求項1〜3のいずれか1項に記載の画像処理装置。 The generation unit divides the image into a plurality of regions, generates a gradation histogram for each region,
The detecting means detects a gradation value in which the frequency is concentrated from each of the gradation histograms for each region, and outputs any of the gradation values detected for each region as the first gradation value,
The calculation means calculates a total sum of frequencies in the neighboring gradation range in a gradation histogram for one screen of the image and outputs it as a distribution amount. The image processing apparatus according to item.
ことを特徴とする請求項4に記載の画像処理装置。 The image processing according to claim 4, wherein the detection unit outputs a gradation value on the lowest gradation side among gradation values detected for each region as the first gradation value. apparatus.
ことを特徴とする請求項4に記載の画像処理装置。 The image processing apparatus according to claim 4, wherein the detection unit outputs a gradation value on a highest gradation side among gradation values detected for each region as the first gradation value. .
前記階調ヒストグラムから、度数の集中する階調値を検出し、第1階調値として出力す
る検出ステップと、
前記階調ヒストグラムにおける、前記第1階調値を含む所定階調分の階調範囲である近傍階調範囲内の度数の総和を算出し、分布量として出力する算出ステップと、
前記分布量が所定の閾値以下である場合に、前記第1階調値をそのまま出力し、前記分布量が所定の閾値より大きい場合に、前記第1階調値を補正して出力する補正ステップと、
前記補正ステップで出力される階調値に応じてγカーブを決定する決定ステップと、
前記決定されたγカーブを用いて前記画像の階調を変換するγ変換ステップと、
を有し、
補正後の第1階調値に応じて決定されるγカーブは、補正前の第1階調値に応じて決定されるγカーブを用いて階調が変換された画像に比べ、前記近傍階調範囲の階調性の低い画像を得るためのγカーブである
ことを特徴とする画像処理方法。 A generation step for generating a gradation histogram from the input image;
A detection step of detecting a gradation value in which the frequency is concentrated from the gradation histogram and outputting it as a first gradation value;
A calculation step of calculating a sum of the frequencies in a neighboring gradation range that is a gradation range for a predetermined gradation including the first gradation value in the gradation histogram, and outputting as a distribution amount;
A correction step of outputting the first gradation value as it is when the distribution amount is equal to or less than a predetermined threshold, and correcting and outputting the first gradation value when the distribution amount is larger than the predetermined threshold. When,
A determination step of determining a γ curve according to the gradation value output in the correction step;
A γ conversion step of converting the gradation of the image using the determined γ curve;
Have
The γ curve determined according to the first gradation value after correction is compared with the neighborhood floor compared to the image whose gradation is converted using the γ curve determined according to the first gradation value before correction. An image processing method, wherein the image processing method is a γ curve for obtaining an image with a low gradation in a gradation range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009207948A JP5361624B2 (en) | 2009-09-09 | 2009-09-09 | Image processing apparatus, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009207948A JP5361624B2 (en) | 2009-09-09 | 2009-09-09 | Image processing apparatus, image processing method, and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2011061419A true JP2011061419A (en) | 2011-03-24 |
JP2011061419A5 JP2011061419A5 (en) | 2012-10-18 |
JP5361624B2 JP5361624B2 (en) | 2013-12-04 |
Family
ID=43948569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009207948A Expired - Fee Related JP5361624B2 (en) | 2009-09-09 | 2009-09-09 | Image processing apparatus, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5361624B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116823730A (en) * | 2023-06-01 | 2023-09-29 | 上海嘉岩供应链管理股份有限公司 | Detection method of precision bearing ring |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07222006A (en) * | 1993-10-07 | 1995-08-18 | Xerox Corp | Method for improvement of image contrast |
JPH10164368A (en) * | 1996-11-28 | 1998-06-19 | Toshiba Corp | Image processing method and image processing unit |
JPH10341341A (en) * | 1997-06-06 | 1998-12-22 | Minolta Co Ltd | Image processor |
JP2000354167A (en) * | 1999-04-09 | 2000-12-19 | Sharp Corp | Image processing unit, image forming device provided with it and image processing method |
JP2009060400A (en) * | 2007-08-31 | 2009-03-19 | Victor Co Of Japan Ltd | Imaging apparatus |
JP4795473B2 (en) * | 2009-06-29 | 2011-10-19 | キヤノン株式会社 | Image processing apparatus and control method thereof |
JP5089797B2 (en) * | 2009-06-29 | 2012-12-05 | キヤノン株式会社 | Image processing apparatus and control method thereof |
-
2009
- 2009-09-09 JP JP2009207948A patent/JP5361624B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07222006A (en) * | 1993-10-07 | 1995-08-18 | Xerox Corp | Method for improvement of image contrast |
JPH10164368A (en) * | 1996-11-28 | 1998-06-19 | Toshiba Corp | Image processing method and image processing unit |
JPH10341341A (en) * | 1997-06-06 | 1998-12-22 | Minolta Co Ltd | Image processor |
JP2000354167A (en) * | 1999-04-09 | 2000-12-19 | Sharp Corp | Image processing unit, image forming device provided with it and image processing method |
JP2009060400A (en) * | 2007-08-31 | 2009-03-19 | Victor Co Of Japan Ltd | Imaging apparatus |
JP4795473B2 (en) * | 2009-06-29 | 2011-10-19 | キヤノン株式会社 | Image processing apparatus and control method thereof |
JP5089797B2 (en) * | 2009-06-29 | 2012-12-05 | キヤノン株式会社 | Image processing apparatus and control method thereof |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116823730A (en) * | 2023-06-01 | 2023-09-29 | 上海嘉岩供应链管理股份有限公司 | Detection method of precision bearing ring |
CN116823730B (en) * | 2023-06-01 | 2024-04-05 | 上海嘉岩供应链管理股份有限公司 | Detection method of precision bearing ring |
Also Published As
Publication number | Publication date |
---|---|
JP5361624B2 (en) | 2013-12-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6443857B2 (en) | Image processing apparatus, image processing method, and program | |
JP5855224B2 (en) | Image processing apparatus and method | |
JP2010537223A5 (en) | ||
JPWO2012017946A1 (en) | Image processing method, image processing apparatus, and image processing program | |
JP2011239446A (en) | Brightness conversion curve creation device, and method, as well as brightness conversion curve creation program | |
JP2011030191A (en) | Image processing apparatus and control method therefor | |
US20140348428A1 (en) | Dynamic range-adjustment apparatuses and methods | |
JPWO2016157838A1 (en) | Signal processing device, display device, signal processing method, and program | |
JPWO2009072207A1 (en) | Image correction apparatus, image correction program, and image correction method | |
JPWO2010061493A1 (en) | Video processing apparatus and video processing method | |
JP5152203B2 (en) | Image processing apparatus, image processing method, image processing program, and image correction apparatus | |
US7471336B2 (en) | Global motion adaptive system with motion values correction with respect to luminance level | |
JP4900373B2 (en) | Image output apparatus, image output method and program | |
JP2014010776A (en) | Image processing apparatus, image processing method, and program | |
JP5361624B2 (en) | Image processing apparatus, image processing method, and program | |
US8538190B2 (en) | Apparatus, method, and recording medium for reduced noise image processing | |
JP2008059374A (en) | Image processor and method therefor | |
US8351729B2 (en) | Apparatus, method, and program for image correction | |
US8411985B2 (en) | Image processing device, image processing method and non-transitory computer readable medium recording image processing program | |
JP5312171B2 (en) | Image processing apparatus and method | |
JP5159647B2 (en) | Image processing apparatus and image processing method | |
JP2008048031A (en) | Image processor and image processing method | |
JP2010026690A (en) | Image processing device | |
JP5447614B2 (en) | Image processing apparatus and image processing program | |
JP2010288040A (en) | Method and device for correcting contour |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120830 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120830 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130717 |
|
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: 20130806 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130903 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5361624 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |