JP5218767B2 - Image processing apparatus, image processing method, program, and recording medium - Google Patents

Image processing apparatus, image processing method, program, and recording medium Download PDF

Info

Publication number
JP5218767B2
JP5218767B2 JP2009004797A JP2009004797A JP5218767B2 JP 5218767 B2 JP5218767 B2 JP 5218767B2 JP 2009004797 A JP2009004797 A JP 2009004797A JP 2009004797 A JP2009004797 A JP 2009004797A JP 5218767 B2 JP5218767 B2 JP 5218767B2
Authority
JP
Japan
Prior art keywords
image
value
threshold value
dark
determined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009004797A
Other languages
Japanese (ja)
Other versions
JP2010166143A (en
Inventor
徳子 宮城
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2009004797A priority Critical patent/JP5218767B2/en
Publication of JP2010166143A publication Critical patent/JP2010166143A/en
Application granted granted Critical
Publication of JP5218767B2 publication Critical patent/JP5218767B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、デジタルカメラやフィルムスキャナ等で撮影された画像に対して階調補正を施す画像処理装置、画像処理方法、プログラムおよび記録媒体に関し、MFP、プリンタ、デジタルカメラの付属ソフトなどに好適な技術に関する。   The present invention relates to an image processing apparatus, an image processing method, a program, and a recording medium that perform gradation correction on an image shot with a digital camera, a film scanner, or the like, and is suitable for an MFP, a printer, software attached to a digital camera, and the like. Regarding technology.

デジタルカメラにより逆光状態で撮影された画像や夜間撮影された画像は、露出不足のため被写体が暗く写され、また物陰に該当する部分を含んでいる場合には、画像の一部分が暗く写されてしまう。そのような画像に対しては、自動で明るさを補正する技術が種々研究され、既に実用化されている。   Images taken backlit by a digital camera or images taken at night are darkly exposed due to underexposure, and if the subject includes a part that corresponds to a shadow, part of the image is darkened. End up. For such an image, various techniques for automatically correcting the brightness have been studied and put into practical use.

例えば、特許文献1は、輝度ヒストグラムの高輝度側と低輝度側で2つのピークがある逆光画像を想定し、輝度ヒストグラムの谷位置に該当する境界値を求め、境界値より低輝度側の重心が目標補正値になるように明るく補正する技術であり、また低輝度側の重心を目標補正値に補正すると同時に、境界値より高輝度側の重心位置により階調補正量を制限するようにした技術も開示されている。階調補正は、低輝度側や高輝度側の重心が各々の目標補正値(高輝度側は階調補正量を制限するための目標補正値)になるように作成した補正テーブルに従って行い、補正テーブルは、低輝度側や高輝度側の重心を折点とする折れ線形状で作成される。   For example, Patent Document 1 assumes a backlight image having two peaks on the high luminance side and the low luminance side of the luminance histogram, obtains a boundary value corresponding to the valley position of the luminance histogram, and calculates the center of gravity on the low luminance side from the boundary value. Is a technology that brightens the image so that the target correction value becomes the target correction value. At the same time, the center of gravity on the low luminance side is corrected to the target correction value, and at the same time, the gradation correction amount is limited by the position of the gravity center on the higher luminance side than the boundary value Technology is also disclosed. Gradation correction is performed according to a correction table created so that the center of gravity on the low-brightness side or the high-brightness side becomes the target correction value (the high-brightness side is the target correction value for limiting the gradation correction amount). The table is created in a polygonal line shape with the centroid on the low luminance side or the high luminance side as the break point.

特許文献2は、主要被写体領域を抽出し、主要被写体領域の中央値の関数として階調補正量を算出し、一方で主要被写体が属さない明度域(主要被写体よりも明るい明度域)を制御領域として階調補正量を制御することにより、過補正を防止する技術であり、主要被写体領域の輝度ヒストグラムの中央値Aと最大値Cを折点とする折れ線形状の輝度補正カーブを作成し、AとCの間の傾きを1にすることで主要被写体領域の階調性を損なわないようにしている。   Patent Document 2 extracts a main subject area, calculates a tone correction amount as a function of a median value of the main subject area, and on the other hand, sets a lightness range (brightness range brighter than the main subject) to which the main subject does not belong to a control region. Is a technique for preventing over-correction by controlling the gradation correction amount, and creating a polygonal line-shaped luminance correction curve with the central value A and the maximum value C of the luminance histogram of the main subject area as a break point. Is set to 1 so that the gradation of the main subject area is not impaired.

ところで、特許文献1の技術では、重心に該当する輝度は最適な補正目標値に補正されるが、画像全体で見て最適な補正が行えるとは限らない。例えば、画像暗部に存在し、目視での識別が困難な複数の被写体オブジェクトが、補正によって十分に識別できるようになる保証はない。また、高輝度側の重心を使って補正量を制限できるが、これも重心の輝度値だけで制限するので、画像全体で見て制限が不十分になる可能性や、必要以上に補正量を制限してしまう可能性がある。特許文献2の技術も同様に、輝度ヒストグラムの中央値の関数として階調補正量を算出しているので、中央値に該当する輝度では最適であっても画像全体で見て最適な補正が行えるとは限らない。   By the way, in the technique of Patent Document 1, the luminance corresponding to the center of gravity is corrected to the optimal correction target value, but the optimal correction cannot always be performed in the entire image. For example, there is no guarantee that a plurality of subject objects that are present in the dark part of an image and are difficult to identify visually can be sufficiently identified by correction. In addition, the correction amount can be limited by using the center of gravity on the high luminance side, but this is also limited only by the luminance value of the center of gravity. There is a possibility of limiting. Similarly, in the technique of Patent Document 2, since the gradation correction amount is calculated as a function of the median value of the luminance histogram, even if the luminance corresponding to the median value is optimal, the optimal correction can be performed by looking at the entire image. Not necessarily.

本発明者は先に、画像の暗部領域を抽出して暗部領域を色差に応じてクラスタリングし、クラスタ数が1の場合は明るさ補正を行わず、クラスタ数が1より大きい場合はクラスタ間色差等に基づいて補正量を決定して明るさ補正することにより、暗部領域に物体が潜んでいる画像に限り、暗部領域の視認性が向上するように階調補正する技術(特願2008−180337号)や、画像中の被写体領域を判定して被写体領域における代表色を抽出し、代表色における補正量上限を設定して代表色における階調補正前後の色差が補正量上限を超えない範囲内で補正量を決定して階調補正する技術(特願2008−227086号)を提案した。   The inventor first extracts a dark area of an image and clusters the dark area according to the color difference. When the number of clusters is 1, brightness correction is not performed. When the number of clusters is greater than 1, the inter-cluster color difference is determined. By correcting the brightness by determining the correction amount based on the above, the technique for correcting the gradation so that the visibility of the dark area is improved only for an image where an object is hidden in the dark area (Japanese Patent Application No. 2008-180337). ) And the subject area in the image is extracted, the representative color in the subject area is extracted, the upper limit of the correction amount in the representative color is set, and the color difference before and after gradation correction in the representative color does not exceed the upper limit of the correction amount Proposed a technique (Japanese Patent Application No. 2008-227086) for determining the correction amount and correcting the gradation.

またハイライト領域の飽和度に基づき補正量を制限する技術も提案し、実施例では、両発明を組み合わせて輝度ヒストグラムから暗部領域、被写体領域、ハイライト領域を抽出し、各領域の閾値を折点とした折れ線形状の階調補正テーブル(補正トーンカーブ)を生成して階調補正を行う例を示した。この実施例では、特許文献1、2のように1〜2点の輝度値に対する補正目標値に基づいて階調補正テーブルを作成する手法とは相違し、暗部領域の視認性向上とノイズ防止、およびハイライト領域における階調つぶれ抑制、および、被写体領域に対して画像の印象を変えすぎないように考慮した補正量設定を行い、画像全体でバランスの取れた最適な明るさに階調を補正することができるが、画像全体でバランスの取れた最適な明るさに階調補正するためには、明るさに応じた少なくとも3つの領域を判定することが必要となる。   In addition, a technique for limiting the correction amount based on the saturation level of the highlight area is also proposed. In the embodiment, the dark area, the subject area, and the highlight area are extracted from the luminance histogram by combining both inventions, and the threshold value of each area is folded. An example is shown in which tone correction is performed by generating a tone correction table (corrected tone curve) having a polygonal line shape as points. In this embodiment, unlike the methods of creating a gradation correction table based on correction target values for one or two luminance values as in Patent Documents 1 and 2, the dark area visibility is improved and noise prevention, In addition, the gradation correction in the highlight area is controlled, and the correction amount is set so that the impression of the image is not changed too much for the subject area, and the gradation is corrected to the optimal brightness that is balanced throughout the image. However, it is necessary to determine at least three areas according to the brightness in order to perform gradation correction to an optimal brightness balanced in the entire image.

本発明は上記した課題に鑑みてなされたもので、
本発明の第一の目的は、画像全体で見て適切な明るさへ階調補正できるように、明るさに応じた少なくとも3つの領域を狙い通りに精度良く判定し、更には、輝度ヒストグラムが極端に偏っている全体的に暗い画像に対しても、画像全体で見て適切な明るさへ階調補正できるように、明るさに応じた少なくとも3つの領域を狙い通り精度良く判定する画像処理装置、画像処理方法、プログラムおよび記録媒体を提供することにある。
The present invention has been made in view of the above problems,
The first object of the present invention is to accurately determine at least three areas according to brightness so that gradation correction can be made to an appropriate brightness as viewed in the entire image, and further, a luminance histogram Image processing that accurately determines at least three areas according to the brightness so that the gradation can be corrected to an appropriate brightness even when the image is extremely biased and dark overall. An apparatus, an image processing method, a program, and a recording medium are provided.

また、従来技術1では、重心を折れ線形状の階調補正テーブルの折点としているが、重心は頻度の高い輝度であることが多いので、頻度の高い輝度部分で、階調性が一様でなく不自然な感じに補正され、また従来技術2も輝度の中央値を折点としているため、同様に不自然に補正されてしまう。   Further, in the prior art 1, the center of gravity is used as a break point in the tone correction table having a polygonal line shape. However, since the center of gravity often has high-frequency luminance, the gradation is uniform in the high-frequency luminance portion. The image is corrected to an unnatural feeling, and the prior art 2 also uses the median value of luminance as a break point, so that it is similarly corrected unnaturally.

そこで、折れ線形状ではなく、曲線形状の階調補正テーブルを用いることで、上記した問題を解消することができるが、補正量を反映した曲線形状の階調補正テーブルを作成すると計算量が多くなったり、あるいは補正量を細かく制御するのが難しいことなどから、必ずしも実用的な手法とはいえず、実際には、折れ線形状の階調補正テーブルが使用されている場合が多い。   Therefore, the above-mentioned problem can be solved by using a curve-shaped gradation correction table instead of a polygonal line shape. However, if a curve-shaped gradation correction table reflecting the correction amount is created, the calculation amount increases. In other words, it is not always a practical method because it is difficult to finely control the correction amount. In practice, a polygonal tone correction table is often used.

本発明の第二の目的は、ヒストグラムの谷位置に該当する第一の閾値と第二の閾値に基づき、明るさに応じた少なくとも3つの領域を判定し、第一の閾値と第二の閾値を領域判定だけでなく、折れ線形状の階調補正テーブルを作成する際に折点として使用することにより、画像処理による不自然な階調性の劣化を防止した画像処理装置、画像処理方法、プログラムおよび記録媒体を提供することにある。   The second object of the present invention is to determine at least three regions according to brightness based on the first threshold value and the second threshold value corresponding to the valley position of the histogram, and the first threshold value and the second threshold value. Image processing apparatus, image processing method, and program in which unnatural deterioration of gradation due to image processing is prevented by using as a break point when creating a polygonal line shape gradation correction table as well as area determination And providing a recording medium.

本発明は、入力画像の輝度ヒストグラムを作成する輝度ヒストグラム作成手段と、前記輝度ヒストグラムの入力値の最小値から最大値までの分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第一の閾値を決定する第一の閾値決定手段と、前記第一の閾値を予め設定した閾値と比較し、前記第一の閾値が前記閾値未満のとき、前記入力画像が全体的に暗い画像であると判定し、前記第一の閾値が前記閾値以上のとき、前記入力画像が全体的に暗い画像ではないと判定する暗画像判定手段と、前記入力画像が全体的に暗い画像でないと判定された場合には、前記輝度ヒストグラムの入力値の最小値から前記第一の閾値までの暗い部分の分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第二の閾値を決定し、前記入力画像が全体的に暗い画像であると判定された場合には、前記輝度ヒストグラムの入力値の前記第一の閾値から最大値までの明るい部分の分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第二の閾値を決定する第二の閾値決定手段と、前記入力画像が全体的に暗い画像であると判定された場合には、前記第一の閾値を明るい値に修正する閾値修正手段と、前記入力画像が全体的に暗い画像ではないと判定された場合には、前記入力画像の輝度が前記第二の閾値未満の画素を暗部領域の画素と判定し、前記入力画像の輝度が前記第一の閾値以上の画素をハイライト領域の画素と判定し、前記暗部領域でも前記ハイライト領域でもない画素を被写体領域の画素と判定し、前記入力画像が全体的に暗い画像であると判定された場合には、前記入力画像の輝度が前記明るい値に修正された第一の閾値未満の画素を暗部領域の画素と判定し、前記入力画像の輝度が前記第二の閾値以上の画素をハイライト領域の画素と判定し、前記暗部領域でもハイライト領域でもない画素を被写体領域の画素と判定することにより、前記入力画像を明るさに応じた少なくとも3つの領域に分割する領域判定を行う領域判定手段と、前記領域判定手段の判定結果に基づいて、前記入力画像に対して階調補正を行う画像処理手段とを備えることを最も主要な特徴とする。 The present invention includes a luminance histogram creating means for creating a luminance histogram of the input image, the analysis range from the minimum value of the input value of the luminance histogram to a maximum value, inter-class variance is large and the intraclass variance is two small classes The first threshold value determining means for determining the first threshold value corresponding to the luminance value to be divided into , the first threshold value is compared with a preset threshold value, and when the first threshold value is less than the threshold value, was determined to be totally dark image input image, when said first threshold is greater than or equal to the threshold value, and the dark image determining unit determines that the input image is not a totally dark image, the input image is If it is determined that the image is not entirely dark, the analysis range of the dark portion from the minimum value of the input value of the luminance histogram to the first threshold is set to have a large interclass variance and an intraclass variance. A second threshold value corresponding to the luminance value to be divided into two classes is determined, and if it is determined that the input image is an overall dark image, the first value of the input value of the luminance histogram A second threshold value determining means for determining a second threshold value corresponding to a luminance value for dividing the analysis range of the bright part from the threshold value to the maximum value into two classes having a large inter-class variance and a small intra-class variance ; When it is determined that the input image is a dark image as a whole, it is determined that the first threshold value is corrected to a bright value and a threshold value correction unit, and the input image is not a dark image as a whole. In this case, a pixel whose luminance is less than the second threshold is determined as a pixel in a dark area, and a pixel whose luminance is higher than the first threshold is determined as a pixel in a highlight region. In the dark area, the A pixel that is not a light region is determined as a pixel in a subject region, and when it is determined that the input image is an overall dark image, a first threshold value in which the luminance of the input image is corrected to the bright value Pixels that are less than the second threshold are determined as pixels in the dark area, pixels in which the luminance of the input image is greater than or equal to the second threshold value are determined as pixels in the highlight area, and pixels that are neither the dark area nor the highlight area are by determining the pixel, and the region determination unit for performing region determination be divided into at least three regions corresponding to the input image to the brightness, on the basis of the determination result of the region determining unit, floor relative to the input image The main feature is to include image processing means for performing tone correction .

本発明によれば、画像全体で見て適切な明るさへ階調補正できるように、明るさに応じた少なくとも3つの領域を狙い通りに精度良く判定することができ、さらには、輝度ヒストグラムが極端に偏っている全体的に暗い画像に対しても、画像全体で見て適切な明るさへ階調補正できるように、明るさに応じた少なくとも3つの領域を狙い通りに精度良く判定することができる。   According to the present invention, it is possible to accurately determine at least three areas according to brightness so that gradation correction can be performed to an appropriate brightness as viewed in the entire image. To accurately determine at least three areas according to the brightness, so that the gradation can be corrected to an appropriate brightness even when the image is extremely biased and dark overall. Can do.

本発明の実施例1の構成を示す。The structure of Example 1 of this invention is shown. ヒストグラム例と、画像を領域判定した結果の一例を示す。An example of a histogram and an example of a result of area determination of an image are shown. 閾値決定部の構成を示す。The structure of a threshold value determination part is shown. 入力画像が暗画像でない場合の分析範囲1、分析範囲2、決定される閾値を示す。The analysis range 1 and the analysis range 2 when the input image is not a dark image, and the threshold value to be determined are shown. 入力画像が暗画像である場合の分析範囲1、分析範囲2、決定される閾値を示す。The analysis range 1, analysis range 2, and threshold value to be determined when the input image is a dark image are shown. 本発明により作成される補正テーブルの形状を示す。The shape of the correction table created by the present invention is shown. 領域面積率計算部の構成を示す。The structure of an area area ratio calculation part is shown. 第一の補正量生成部の構成を示す。The structure of the 1st correction amount production | generation part is shown. クラスタリング部の構成を示す。The structure of a clustering part is shown. 予備クラスタリング部の処理フローチャートである。It is a process flowchart of a preliminary | backup clustering part. クラスタ統合部の処理フローチャートである。It is a process flowchart of a cluster integration part. クラスタリング結果の例を示す。An example of the clustering result is shown. クラスタリング結果の他の例を示す。The other example of a clustering result is shown. 第1の補正量決定部の構成を示す。The structure of the 1st correction amount determination part is shown. 補正量算出部の構成を示す。The structure of a correction amount calculation unit is shown. 最暗クラスタの補正量制限を説明する図である。It is a figure explaining the correction amount restriction | limiting of the darkest cluster. 第二の補正量生成部の構成を示す。The structure of the 2nd correction amount production | generation part is shown. 仮補正テーブル作成部により作成される補正テーブルを示す。The correction table created by the temporary correction table creation unit is shown. 被写体代表色抽出部の構成を示す。2 shows a configuration of a subject representative color extraction unit. 第三の補正量生成部の構成を示す。The structure of the 3rd correction amount production | generation part is shown. 補正量決定部の構成を示す。The structure of the correction amount determination part is shown. 本発明の実施例2の構成を示す。The structure of Example 2 of this invention is shown. 実施例2における第一の補正量生成部の構成を示す。The structure of the 1st correction amount production | generation part in Example 2 is shown. 実施例2における第二の補正量生成部の構成を示す。The structure of the 2nd correction amount production | generation part in Example 2 is shown.

以下、発明の実施の形態について図面により詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の実施例1の構成を示す。輝度変換部10は、ビットマップ形式の入力画像データの各画素のRGB値を、次式で輝度Yに変換する。
Y=0.30×R+0.59×G+0.11×B
ヒストグラム作成部11は、輝度Yのヒストグラムを作成する。RGBが0〜255の各8bitの値を持つ場合で説明すると、Yも0〜255の値を持つことになる。
FIG. 1 shows the configuration of Embodiment 1 of the present invention. The luminance conversion unit 10 converts the RGB value of each pixel of the input image data in the bitmap format into luminance Y by the following equation.
Y = 0.30 × R + 0.59 × G + 0.11 × B
The histogram creation unit 11 creates a brightness Y histogram. In the case where RGB has a value of 8 bits each of 0 to 255, Y also has a value of 0 to 255.

閾値決定部12は、作成したヒストグラムに基づき、画像内における被写体領域、暗部領域、ハイライト領域を判定するための閾値th1,th2を求める。図2(a)は、ヒストグラムの例を示す。閾値th1はハイライト領域と被写体領域の境界に該当する閾値、閾値th2は被写体領域内における暗部領域とその他の領域の境界に該当する閾値である。図2(b)は、画像を領域判定した結果の一例を示す。上空部分がハイライト領域、被写体である建築物の影領域であって、何が写っているか視認困難な部分が暗部領域、それ以外の被写体部分が暗部領域以外の被写体領域として領域判定されている。閾値決定部12では、このような領域判定を行うための閾値th1,th2を決定する。   The threshold value determination unit 12 obtains threshold values th1 and th2 for determining a subject area, a dark area, and a highlight area in the image based on the created histogram. FIG. 2A shows an example of a histogram. The threshold th1 is a threshold corresponding to the boundary between the highlight area and the subject area, and the threshold th2 is a threshold corresponding to the boundary between the dark area and the other area in the subject area. FIG. 2B shows an example of the result of determining the area of the image. The sky is the highlight area, the shadow area of the building that is the subject, the part that is difficult to see what is reflected is the dark area, and the other subject areas are determined as the subject areas other than the dark area . The threshold value determination unit 12 determines threshold values th1 and th2 for performing such area determination.

図3(a)は、閾値決定部12の構成を示す。図3(a)の120が第一の閾値決定部、121が第二の閾値決定部に該当する。ヒストグラム形状から適応的に背景と対象物を分離する二値化閾値を求める判別分析法を2回使用して閾値を決定する。   FIG. 3A shows the configuration of the threshold value determination unit 12. In FIG. 3A, 120 corresponds to the first threshold value determination unit, and 121 corresponds to the second threshold value determination unit. The threshold value is determined using twice a discriminant analysis method for obtaining a binarization threshold value that adaptively separates the background and the object from the histogram shape.

図3(b)は、判別分析法を説明する図である。簡単に説明すると、ヒストグラムの入力の最小値st〜閾値Tまでを一つのクラス、閾値T〜入力の最大値enまでを一つのクラスとして、判別分析法の評価値である(クラス間分散/クラス内分散)が最大になる閾値Tを求めることで、背景と対象物がよく分離され(即ちクラス間分散が大きい)、かつ、背景内および対象物内がよくまとまっている(即ちクラス内分散が小さい)二値化閾値を求める方法である。
ここで、「輝度ヒストグラムの所定範囲をクラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値」を谷位置と定義する。
FIG. 3B illustrates the discriminant analysis method. Briefly, it is an evaluation value of the discriminant analysis method with one class from the minimum value st to the threshold value T of the histogram and one class from the threshold value T to the maximum value en of the input (inter-class variance / class By obtaining a threshold value T that maximizes (internal variance), the background and the object are well separated (ie, the variance between classes is large), and the inside of the background and the object are well organized (ie, the variance within the class is This is a method of obtaining a (small) binarization threshold.
Here, “a luminance value that divides a predetermined range of the luminance histogram into two classes having a large inter-class variance and a small intra-class variance” is defined as a valley position.

判別分析法を用いることにより、分析範囲内における(局所的ではなく大局的な)谷位置を探すことができる。なお、判別分析法は、谷位置に該当する閾値を探すための手段として適切であるため、本実施例では判別分析法を使用した例を提示するが、判別分析法に近い精度で画像に対して適応的に谷位置を探すことができる方法であれば他の方法でも構わない。   By using the discriminant analysis method, it is possible to find a valley position (not local but global) within the analysis range. Note that the discriminant analysis method is suitable as a means for searching for the threshold value corresponding to the valley position, so in this embodiment, an example using the discriminant analysis method is presented. Any other method may be used as long as it can adaptively search for the valley position.

判別分析法1201では、ヒストグラムの入力値の最小値から最大値までを分析範囲として(分析範囲1)判別分析法を適用し、二値化閾値TH1を求める。   In the discriminant analysis method 1201, the discriminant analysis method is applied with the analysis range from the minimum value to the maximum value of the input values of the histogram (analysis range 1), and the binarization threshold TH1 is obtained.

暗画像判定部122では、閾値TH1を予め設定した閾値と比較することにより、入力画像が全体的に暗い画像であるか否かを判定する。ヒストグラムの入力輝度値が0〜255である場合、暗画像判定の閾値は50くらいの値に設定するのが経験上妥当である。   The dark image determination unit 122 determines whether or not the input image is an overall dark image by comparing the threshold value TH1 with a preset threshold value. When the input luminance value of the histogram is 0 to 255, it is empirically appropriate to set the threshold value for dark image determination to a value of about 50.

TH1<50の場合は、全体的に暗い画像(暗画像)であると判定し、TH1≧50の場合は、全体的に暗い画像ではないと判定する。なお、ここではTH1を使って判定する例を示したが、暗画像を判定する他の手法として、例えば、ヒストグラムを暗い側から加算して、全体の10%に該当する入力輝度値を求め、全体の10%に該当する入力輝度値が予め設定した閾値よりも暗い側にあれば暗画像であると判定しても良い。   When TH1 <50, it is determined that the image is entirely dark (dark image). When TH1 ≧ 50, it is determined that the image is not entirely dark. In addition, although the example which determines using TH1 was shown here, as another method of determining a dark image, for example, a histogram is added from the dark side to obtain an input luminance value corresponding to 10% of the whole, If an input luminance value corresponding to 10% of the whole is on a darker side than a preset threshold value, it may be determined that the image is a dark image.

分析範囲2の設定部1211では、暗画像でない場合は、ヒストグラムの入力値のうち最小値から閾値TH1までの暗い側を分析範囲2として設定し、暗画像である場合は、ヒストグラムの入力値のうち閾値TH1から最大値までの明るい側を分析範囲2として設定する。   The analysis range 2 setting unit 1211 sets the dark side from the minimum value to the threshold value TH1 among the input values of the histogram as the analysis range 2 when the image is not a dark image, and sets the input value of the histogram when the image is a dark image. The bright side from the threshold value TH1 to the maximum value is set as the analysis range 2.

判別分析法1212では、設定した分析範囲2に対して判別分析法を適用し、閾値TH2を求める。閾値修正部1202は、暗画像である場合に、閾値TH1をTH1よりも明るい値TH1’に修正する。修正方法に関しては後述する。暗画像でない場合はTH1’=TH1として修正は行わない。   In the discriminant analysis method 1212, the discriminant analysis method is applied to the set analysis range 2 to obtain the threshold value TH2. The threshold value correction unit 1202 corrects the threshold value TH1 to a value TH1 'brighter than TH1 when the image is a dark image. The correction method will be described later. If it is not a dark image, TH1 '= TH1 and correction is not performed.

3値化閾値決定部123では、暗画像でない場合は、th1=TH1’(=TH1)、th2=TH2として閾値th1,th2を決定し、暗画像である場合は、th1=TH2、th2=TH1’として閾値th1,th2を決定する。   The ternary threshold determination unit 123 determines the thresholds th1 and th2 as th1 = TH1 ′ (= TH1) and th2 = TH2 when the image is not a dark image, and th1 = TH2 and th2 = TH1 when the image is a dark image. The thresholds th1 and th2 are determined as'.

図4は、入力画像が暗画像でない場合の例であり、(a)はヒストグラム、(b)は分析範囲1に対するクラス間分散とクラス内分散、(c)は分析範囲1に対する判別分析法の評価値のグラフである。(b)と(c)の横軸は判別分析法の閾値Tである。分析範囲1と分析範囲2、および、決定される閾値は図示したとおりである。TH1よりも暗い側を分析範囲2として設定し、TH2を求めている。   FIG. 4 is an example in the case where the input image is not a dark image, (a) is a histogram, (b) is an interclass variance and intraclass variance for the analysis range 1, and (c) is a discriminant analysis method for the analysis range 1. It is a graph of an evaluation value. The horizontal axes of (b) and (c) are the threshold value T for discriminant analysis. The analysis range 1 and the analysis range 2 and the threshold values to be determined are as illustrated. The darker side than TH1 is set as analysis range 2, and TH2 is obtained.

図5は、入力画像が暗画像である場合の例であり、(a)はヒストグラム、(b)は分析範囲1に対するクラス間分散とクラス内分散、(c)は分析範囲1に対する判別分析法の評価値のグラフである。分析範囲1と分析範囲2、および、決定される閾値は図示したとおりである。TH1よりも明るい側を分析範囲2として設定し、TH2を求めている。   FIG. 5 is an example in the case where the input image is a dark image, where (a) is a histogram, (b) is inter-class variance and intra-class variance for analysis range 1, and (c) is a discriminant analysis method for analysis range 1. It is a graph of evaluation value of. The analysis range 1 and the analysis range 2 and the threshold values to be determined are as illustrated. The side brighter than TH1 is set as analysis range 2, and TH2 is obtained.

暗画像の場合、ハイライト側に山がないヒストグラム形状になっているため、第一の閾値決定部120で決定する谷位置に該当する閾値が、本来暗部領域として判定したい領域内における谷位置に設定されてしまう(そのためTH1が50未満の明らかに本来の暗部領域内であるはずの値になる)。これに対して暗画像か否かを区別せずに暗画像でない画像と同様の処理を行ってしまうと、次に決定される閾値TH2はTH1よりも更に暗い値に設定されてしまい、本来の暗部領域内で閾値th1,th2が決定され狙い通りの領域判定ができない。   In the case of a dark image, since it has a histogram shape with no peaks on the highlight side, the threshold value corresponding to the valley position determined by the first threshold value determination unit 120 is the valley position in the area originally determined as the dark area. (Thus, TH1 is less than 50, which is a value that should be clearly in the original dark area). On the other hand, if the same processing as that for an image that is not a dark image is performed without distinguishing whether the image is a dark image, the threshold value TH2 to be determined next is set to a darker value than TH1. The thresholds th1 and th2 are determined in the dark area, and the targeted area cannot be determined.

そこで、暗画像である場合には、分析範囲2をTH1よりも明るい側に設定してTH2が本来の暗部領域内の値でなく、それよりも明るい値に設定されるようにしている。その場合、TH1とTH2の大小関係が暗画像でない場合とは逆になるので、3値化閾値決定部123では、TH1とTH2の対応関係を逆転させてTH2の方をハイライト領域と被写体領域の境界に該当する閾値th1としている。   Therefore, in the case of a dark image, the analysis range 2 is set to be brighter than TH1, so that TH2 is set to a value brighter than that in the original dark area. In this case, since the magnitude relationship between TH1 and TH2 is opposite to that in the case of not a dark image, the ternary threshold determination unit 123 reverses the correspondence relationship between TH1 and TH2 so that TH2 is the highlight area and the subject area. Threshold value th1 corresponding to the boundary of.

また、閾値TH1も前述の通り、本来の暗部領域内で設定されてしまっているので、閾値修正部1202では、ヒストグラム形状から見て、本来の暗部領域とその他の領域の境界付近と判断されるTH1’へ修正している。   Since the threshold value TH1 is also set in the original dark part region as described above, the threshold value correcting unit 1202 determines that it is near the boundary between the original dark part region and the other regions as seen from the histogram shape. It is corrected to TH1 '.

閾値修正部1202におけるTH1’の求め方について説明する。図5の例では、本来暗部領域以外の画素はごく僅かで殆どが暗部領域の画素なので、図5(a)のヒストグラムでは、画素が集中している暗い側の輝度と、山が存在しない明るい側の輝度との境界付近(ヒストグラムの立下り位置)にTH1’を設定し直したい。図5(a)のヒストグラムと図5(c)の判別分析法の評価値を見比べると、ヒストグラムの立ち下がり位置は(c)のグラフをハイライト側から見ていった時に最初に出現する評価値の変曲点と対応している。図5の例だけでなく、他の暗画像のヒストグラムおよび判別分析法の評価値でも同じ対応関係が成り立つ。   A method for obtaining TH1 'in the threshold correction unit 1202 will be described. In the example of FIG. 5, the number of pixels other than the dark area is essentially very small and most of them are in the dark area. Therefore, in the histogram of FIG. I want to reset TH1 'near the boundary with the luminance on the side (the falling position of the histogram). Comparing the histogram of FIG. 5A and the evaluation value of the discriminant analysis method of FIG. 5C, the falling position of the histogram is the evaluation that appears first when the graph of FIG. 5C is viewed from the highlight side. Corresponds to the inflection point of the value. In addition to the example of FIG. 5, the same correspondence holds for the histograms of other dark images and the evaluation values of the discriminant analysis method.

そこで、ハイライト側に最初に出現する変曲点の位置を求めて、閾値TH1の修正後の閾値TH1’とする。(c)の変曲点は、閾値TH1と分析範囲1の最大値の位置における評価値グラフを直線で結び(図5(c)のAとB結んだ点線)、TH1よりも明るい範囲内でAとB結んだ点線と評価値グラフの実線との距離が最大になる入力輝度値を見つけてそれをTH1’とすることで求める。   Therefore, the position of the inflection point that first appears on the highlight side is obtained and set as the threshold TH1 'after the correction of the threshold TH1. The inflection point in (c) is obtained by connecting the threshold value TH1 and the evaluation value graph at the position of the maximum value in the analysis range 1 with a straight line (dotted line connecting A and B in FIG. 5C), and in a range brighter than TH1. The input luminance value that maximizes the distance between the dotted line connecting A and B and the solid line of the evaluation value graph is found and determined as TH1 ′.

画像サンプリング部30は、画像が所定サイズよりも大きい場合には、画像を平均値でサンプリングする。使用する画像データの画素数が大きすぎると処理に時間がかかり、また性能面でも解像度が高すぎるとノイズの影響から階調補正のための補正量が正確に求められないことがあるので、画像が所定サイズよりも大きい場合には、画像を平均値でサンプリングする。例えば、長辺が640画素よりも大きい場合に、サンプリングを実施し、長辺の画素数が640の3倍の画像が入力された場合には、3×3画素毎に平均値を求めてサンプリング画像の画素値とする。   When the image is larger than a predetermined size, the image sampling unit 30 samples the image with an average value. If the number of pixels in the image data to be used is too large, processing takes time, and if the resolution is too high in terms of performance, the correction amount for gradation correction may not be obtained accurately due to the influence of noise. If is larger than a predetermined size, the image is sampled with an average value. For example, when the long side is larger than 640 pixels, sampling is performed, and when an image whose number of long side pixels is three times 640 is input, an average value is obtained every 3 × 3 pixels and sampling is performed. The pixel value of the image.

領域判定部40は、サンプリング画像の各画素が暗部領域に属するか否か、ハイライト領域に属するか否かを、閾値th1,th2に基づき判定する。サンプリング画像のRGB値から輝度Yを求め、輝度Yを閾値th1,th2と比較する。
・Y<th2、かつ、Max(R,G,B)−Min(R,G,B)<50ならば、暗部領域の画素であると判定する。
・Y≧th1ならば、ハイライト領域の画素であると判定する。
The region determination unit 40 determines whether each pixel of the sampling image belongs to the dark region or whether it belongs to the highlight region based on the threshold values th1 and th2. The luminance Y is obtained from the RGB values of the sampled image, and the luminance Y is compared with threshold values th1 and th2.
If Y <th2 and Max (R, G, B) −Min (R, G, B) <50, it is determined that the pixel is in the dark area.
If Y ≧ th1, it is determined that the pixel is in the highlight area.

暗部領域の画素の判定条件に、Max(R,G,B)−Min(R,G,B)<50を加えているのは、彩度が比較的高く、視認可能な領域を暗部から除外して判定するためである。暗部領域とハイライト領域を判定することにより、どちらにも属さない画素は暗部領域以外の被写体領域に属する画素であることが自明であるので、図2(b)のように画像を明るさに応じた3つの領域に分割する領域判定を行っていることになる。領域判定結果は2ビットで表し、最初の1ビットが暗部領域の画素であるか否かを表し、次の2ビットがハイライト領域の画素であるかを表すものとする。   The reason for adding Max (R, G, B) −Min (R, G, B) <50 to the determination condition of the pixel in the dark area is that the area having relatively high saturation and visible is excluded from the dark area. This is to make a determination. By determining the dark area and the highlight area, it is obvious that a pixel that does not belong to any one belongs to a subject area other than the dark area, so that the image is brightened as shown in FIG. Thus, the region determination to be divided into the three regions is performed. The region determination result is expressed by 2 bits, and the first 1 bit indicates whether or not the pixel is in the dark region, and the next 2 bits indicate whether or not the pixel is in the highlight region.

階調補正テーブル生成部19は、補正量決定部18が決定した最終的な補正量Δに応じて階調補正テーブルを生成する。入力画像データや抽出した色情報等に基づき、第一の補正量生成部15は、暗部領域の視認性向上に着目した補正量を生成し、第二の補正量生成部16は、ハイライト領域の階調つぶれ抑制に着目した補正量を生成し、第三の補正量生成部17は、補正前後で画像の印象を大きく変えないことに着目した補正量を生成し、補正量決定18は、最終的な補正量Δを決定する。   The gradation correction table generation unit 19 generates a gradation correction table according to the final correction amount Δ determined by the correction amount determination unit 18. Based on the input image data, the extracted color information, and the like, the first correction amount generation unit 15 generates a correction amount focused on improving the visibility of the dark region, and the second correction amount generation unit 16 selects the highlight region. The third correction amount generation unit 17 generates a correction amount focusing on not changing the impression of the image before and after correction, and the correction amount determination 18 The final correction amount Δ is determined.

図6は、最終的に作成する補正テーブルの形状を示したものである。補正テーブルは輝度Yの変換テーブルとする。制御点は、始点0と終点255以外では、入力Y=th1,th2,Yaの3点であり、各区間内では直線形状とする。制御点th1とth2は前述の閾値決定部12から出力される閾値であり、制御点Yaは後述の第一の補正量生成部15から出力される暗部領域内の制御点である。補正量Δは、制御点Yaにおける入力Yに対する出力Yの増加分を表したものである。暗部領域における0≦入力Y<Yaの傾きα1は、YaとΔにより決まる。制約条件として、暗部領域以外の被写体領域に該当するth2≦入力Y<th1で、傾きα3を1にして階調性を保存し、Ya≦入力Y<th2は区間境界で傾きが急激に変化することを防止するため傾きα2を傾きα1とα3の中間とする。これにより、3つの制御点と補正量Δが決まれば、補正テーブル全体が決まる。また、3つの制御点が決まっていれば、もう一つの情報は補正量Δでなくα4であっても、あるいは補正テーブルが通るどこか一点の入力と出力のデータセットであっても、上記制約条件から補正テーブル全体を決定することが可能である。   FIG. 6 shows the shape of the correction table to be finally created. The correction table is a luminance Y conversion table. The control points are input Y = th1, th2, and Ya except for the start point 0 and the end point 255, and have a linear shape in each section. The control points th1 and th2 are threshold values output from the above-described threshold value determination unit 12, and the control point Ya is a control point in the dark area output from the first correction amount generation unit 15 described later. The correction amount Δ represents an increase in the output Y with respect to the input Y at the control point Ya. The slope α1 of 0 ≦ input Y <Ya in the dark region is determined by Ya and Δ. As a constraint, th2 ≦ input Y <th1 corresponding to the subject area other than the dark area, and the gradient α3 is saved by setting the gradient α3 to 1. The gradient of Ya ≦ input Y <th2 changes abruptly at the section boundary. In order to prevent this, the inclination α2 is set between the inclinations α1 and α3. As a result, when the three control points and the correction amount Δ are determined, the entire correction table is determined. Further, if three control points are determined, the other information may be α4 instead of the correction amount Δ, or the input and output data set at some point that passes through the correction table. It is possible to determine the entire correction table from the conditions.

階調補正部20は、生成した補正テーブルを基に、入力画像データの各画素に対して階調補正を施す。RGBから輝度変換により輝度Yを算出し、算出した輝度Yを入力として補正テーブルを参照して出力Yを求め、RGBの各信号に対して(出力Y/入力Y)を乗算したものを階調補正後のRGBとする。   The gradation correction unit 20 performs gradation correction on each pixel of the input image data based on the generated correction table. The luminance Y is calculated from the RGB by luminance conversion, the output Y is obtained by referring to the correction table using the calculated luminance Y as an input, and each RGB signal multiplied by (output Y / input Y) is a gradation. Let it be RGB after correction.

領域面積率計算部13は、第一の補正量生成部15で使用する暗部面積率Pdと、第二の補正量生成部16で使用するハイライト面積率Phを求めておく。   The area area ratio calculation unit 13 obtains the dark area ratio Pd used by the first correction amount generation unit 15 and the highlight area ratio Ph used by the second correction amount generation unit 16.

図7は、領域面積率計算部13の構成を示す。図2(a)のヒストグラムと閾値th1から、ハイライト/被写体画素数計数部130は、被写体領域の画素数Naとハイライト領域の画素数Nbを計数する。被写体領域の画素数はヒストグラムにおける0≦Y<th1の画素数を全て足し合わせることで求められ、ハイライト領域の画素数はヒストグラムにおけるth1≦Y≦255の画素数を全て足し合わせることで求められる。同様に、ヒストグラムと閾値th2から、暗部画素数計数部132は、暗部領域の画素数Ncを計数する。暗部領域の画素数はヒストグラムにおける0≦Y<th2の画素数を全て足し合わせることにより求められる。   FIG. 7 shows the configuration of the area area ratio calculation unit 13. From the histogram of FIG. 2A and the threshold th1, the highlight / subject pixel number counting unit 130 counts the pixel number Na of the subject region and the pixel number Nb of the highlight region. The number of pixels in the subject area is obtained by adding all the pixels of 0 ≦ Y <th1 in the histogram, and the number of pixels in the highlight area is obtained by adding all the pixels of th1 ≦ Y ≦ 255 in the histogram. . Similarly, the dark part pixel number counting unit 132 counts the number of pixels Nc in the dark part region from the histogram and the threshold value th2. The number of pixels in the dark area is obtained by adding all the numbers of pixels of 0 ≦ Y <th2 in the histogram.

ハイライト面積率計算部131では、画像内におけるハイライト領域の面積率Phを次式で求める。
Ph=Nb/(Na+Nb)
暗部面積率計算部133では、被写体領域における暗部領域の面積率Pdを次式で求める。
Pd=Nc/Na
The highlight area ratio calculation unit 131 obtains the area ratio Ph of the highlight area in the image by the following equation.
Ph = Nb / (Na + Nb)
The dark area ratio calculation unit 133 obtains the area ratio Pd of the dark area in the subject area by the following equation.
Pd = Nc / Na

図8は、第一の補正量生成部15の構成を示す。クラスタリング部153は、領域判定結果から暗部領域の画素であるか否かの情報を取得し、色変換部152でLabに変換したサンプリング画像データを入力として、クラスタリングを行う。   FIG. 8 shows a configuration of the first correction amount generation unit 15. The clustering unit 153 acquires information on whether or not the pixel is in the dark region from the region determination result, and performs the clustering using the sampled image data converted into Lab by the color conversion unit 152 as an input.

図9は、クラスタリング部153の構成を示す。予備クラスタリング部156は、色差に応じて暗部領域判定結果を、1つ以上のクラスタに分割した後、クラスタ統合部157では、画素数の少ないクラスタを他のクラスタに統合する。   FIG. 9 shows the configuration of the clustering unit 153. The preliminary clustering unit 156 divides the dark region determination result into one or more clusters according to the color difference, and then the cluster integration unit 157 integrates the cluster with a small number of pixels into another cluster.

図10は、予備クラスタリング部156の処理フローチャートである。注目画素のLabを順次入力し(ステップ1561)、クラスタリングを行う。画像先端からスタートして初めて暗部領域の画素が入力された時点では、クラスタ数Nが初期化されてN=0にセットされた状態であるため(ステップ1560)、色差による条件分岐(ステップ1565)で“No”の方に進んでクラスタ1を新規クラスタとして追加し、クラスタ数をN=1に設定、クラスタ1の画素数をn(1)=0に設定、クラスタ1の平均Labに注目画素のLab値が設定される(ステップ1568,1569)。   FIG. 10 is a processing flowchart of the preliminary clustering unit 156. The Lab of the pixel of interest is sequentially input (step 1561), and clustering is performed. When the pixels in the dark area are input for the first time from the beginning of the image, since the number of clusters N is initialized and N = 0 is set (step 1560), conditional branching due to color difference (step 1565). To go to “No” and add cluster 1 as a new cluster, set the number of clusters to N = 1, set the number of pixels in cluster 1 to n (1) = 0, and focus on the average Lab of cluster 1 Lab values are set (steps 1568 and 1569).

その後は、順次入力される注目画素のLab値に対して、暗部領域の画素であれば(ステップ1570)、各クラスタの平均Labとの色差を求め(ステップ1563)、その中で色差最小のクラスタ番号jと色差dE_minの組を抽出する(ステップ1564)。色差による条件分岐(ステップ1565)で色差dE_minが予め設定された閾値dE_th以下であれば“Yes”の方に進んでクラスタjに注目画素を追加し、平均Labを再計算する(ステップ1566,1567)。クラスタjの画素数n(j)を+1して、L*a*b*の平均値を以下の式に従い再計算する。
(再計算後の平均L)=((再計算前の平均L)×(n(j)−1)+(注目画素のL))/n(j)
(再計算後の平均a)=((再計算前の平均a)×(n(j)−1)+(注目画素のa))/n(j)
(再計算後の平均b)=((再計算前の平均b)×(n(j)−1)+(注目画素のb))/n(j)
色差による条件分岐(ステップ1565)で色差dE_minが予め設定された閾値dE_thより大きければ“No”の方に進んで新規クラスタを追加し、クラスタ数Nをカウントアップして新規クラスタの画素数を0に設定し、平均Labに注目画素のLabを設定する(ステップ1568,1569)。新規クラスタを追加するか否かの境界色差を表しているのがdE_thであり、暗部の何が写っているかはっきり視認できない領域を対象としていることを考慮してdE_th=3くらいの小さい値に設定しておくのが適当である。画像後端まで到達して入力するLabデータが無くなった時点で、クラスタリング終了となる。
Thereafter, if the Lab value of the pixel of interest that is sequentially input is a pixel in the dark area (step 1570), the color difference from the average Lab of each cluster is obtained (step 1563), and the cluster having the smallest color difference among them is determined. A set of the number j and the color difference dE_min is extracted (step 1564). If the color difference dE_min is less than or equal to a preset threshold value dE_th in the conditional branch by color difference (step 1565), the process proceeds to “Yes” to add the pixel of interest to the cluster j and recalculate the average Lab (steps 1566 and 1567). ). The number of pixels n (j) in cluster j is incremented by 1, and the average value of L * a * b * is recalculated according to the following equation.
(Average L after recalculation) = ((Average L before recalculation) × (n (j) −1) + (L of target pixel)) / n (j)
(Average a after recalculation) = ((Average a before recalculation) × (n (j) −1) + (a of target pixel)) / n (j)
(Average b after recalculation) = ((Average b before recalculation) × (n (j) −1) + (b of target pixel)) / n (j)
If the color difference dE_min is larger than the preset threshold value dE_th in the conditional branch by color difference (step 1565), the process proceeds to “No”, a new cluster is added, the number of clusters N is counted up, and the number of pixels of the new cluster is reduced to 0. And the Lab of the pixel of interest is set to the average Lab (steps 1568 and 1569). DE_th represents the boundary color difference whether or not to add a new cluster, and is set to a small value such as dE_th = 3 in consideration of the fact that the area where the dark part is not clearly visible is targeted. It is appropriate to keep it. Clustering ends when the Lab data reaches the rear end of the image and there is no more Lab data to input.

予備クラスタリング部156で分割されたクラスタのうち、ある程度画素数が少ないクラスタはノイズ成分に反応して発生したクラスタであることが多く、いずれにしても被写体を有意な塊単位で抽出する際に、不要または重要性が低いクラスタである。   Of the clusters divided by the preliminary clustering unit 156, a cluster having a small number of pixels is often a cluster generated in response to a noise component, and in any case, when extracting a subject in significant chunks, Unnecessary or less important cluster.

図11は、クラスタ統合部157の処理フローチャートである。各クラスタを順次見ていき、クラスタの画素数が所定閾値n_thより小さいか否かを判定し(ステップ1575)、小さい場合は注目クラスタiの平均Labと他のクラスタの平均Labとの色差を求め(ステップ1576)、他のクラスタ全てに対して求めた色差のうち最小のものに該当するクラスタ番号jを抽出し(ステップ1577)、クラスタiをクラスタjに統合する(ステップ1578)。クラスタjの画素数にクラスタiの画素数を加算し、クラスタiの画素数を0に変更する。統合するクラスタの画素数境界である閾値n_thは、暗部領域の画素数に対して例えば15%(10%〜20%程度に設定するのが適当)の画素数に相当する値を画像毎に求めて、それを閾値とする。   FIG. 11 is a process flowchart of the cluster integration unit 157. Each cluster is sequentially viewed, and it is determined whether or not the number of pixels in the cluster is smaller than a predetermined threshold n_th (step 1575). If smaller, the color difference between the average Lab of the cluster i of interest and the average Lab of other clusters is obtained. (Step 1576), the cluster number j corresponding to the smallest color difference obtained for all other clusters is extracted (Step 1577), and the cluster i is integrated into the cluster j (Step 1578). The number of pixels in cluster i is added to the number of pixels in cluster j, and the number of pixels in cluster i is changed to zero. The threshold value n_th, which is the boundary of the number of pixels of the cluster to be integrated, is obtained for each image, for example, a value corresponding to the number of pixels of 15% (suitably set to about 10% to 20%) with respect to the number of pixels in the dark area. That is the threshold value.

図8に戻り、判断部154は、クラスタ数に応じて階調補正を行うか否か判断する。図12、図13(a)、(c)はクラスタリング結果の例である。図12(a)は、夜空を背景に花火を撮影した画像であり、暗部領域をクラスタリングした結果、暗部は全て一つのクラスタ(クラスタ1)になり、クラスタ数は1である。図12(b)は、夜間にライトアップされた建築物を撮影した画像であり、暗部領域をクラスタリングした結果、背景と建物が別々のクラスタに分割され、クラスタ数は2である。図13(a)は、人物を逆光で撮影した画像であり、暗部は5つのクラスタに分割されている。図13(b)は花を撮影した画像であり、葉が重なり合って影になった暗部領域が存在する画像である。これをクラスタリングした結果が図13(c)であり、影に隠れた葉と葉脈が概ね別クラスタに分割され、クラスタ数は2である。   Returning to FIG. 8, the determination unit 154 determines whether or not to perform gradation correction according to the number of clusters. FIGS. 12, 13A, and 13C are examples of clustering results. FIG. 12A is an image obtained by shooting fireworks against the background of the night sky. As a result of clustering the dark area, all the dark areas become one cluster (cluster 1), and the number of clusters is 1. FIG. 12B is an image of a building illuminated at night. As a result of clustering the dark area, the background and the building are divided into separate clusters, and the number of clusters is two. FIG. 13A is an image obtained by photographing a person with backlight, and the dark portion is divided into five clusters. FIG. 13B is an image obtained by photographing a flower, and is an image in which a dark part region in which a leaf overlaps and becomes a shadow exists. The result of clustering this is shown in FIG. 13C. The leaves and veins hidden in the shadow are roughly divided into different clusters, and the number of clusters is two.

判断部154では、クラスタ数が1であれば階調補正を行わないと判断し、クラスタ数が1以外であれば階調補正を行うと判断する。これにより、夜空を背景に花火を撮影した画像のように暗部に該当する夜空に何もオブジェクトが潜んでおらず、明るく補正する必要がない画像が入力された場合に、階調補正を行わないと判断して処理することができる。   The determination unit 154 determines that gradation correction is not performed if the number of clusters is 1, and determines that gradation correction is performed if the number of clusters is other than one. As a result, tone correction is not performed when an image that does not need to be brightly corrected is input when there is no object in the night sky corresponding to the dark area, such as an image of fireworks shot against the night sky. Can be processed.

図14は、第1の補正量決定部155の構成を示す。判断部154が階調補正を行わないと判断した場合は、選択部159はΔ1b=0を選択して、Δ1=Δ1aを補正量として出力することにより、実質的に階調補正を無効にする。判断部154が階調補正を行うと判断した場合は、補正量算出部158が算出した補正量Δ1bを選択して、Δ1=Δ1bを補正量として出力する。   FIG. 14 shows a configuration of the first correction amount determination unit 155. When the determination unit 154 determines not to perform gradation correction, the selection unit 159 selects Δ1b = 0 and outputs Δ1 = Δ1a as the correction amount, thereby substantially invalidating the gradation correction. . When the determination unit 154 determines to perform gradation correction, the correction amount Δ1b calculated by the correction amount calculation unit 158 is selected and Δ1 = Δ1b is output as the correction amount.

図15は、補正量算出部158の構成を示す。第一のクラスタ抽出1580は、各クラスタの画素数を比較して画素数が最も多いクラスタとその次に多いクラスタを抽出する。2つのクラスタのうち明度が高い方をクラスタA、明度が低い方をクラスタBと表記する。色差計算部1582では、クラスタAとクラスタBの補正前の平均Lab同士の色差dE1を計算しておく。補正量生成部1592は補正量Δ1bを設定して、仮補正テーブル生成部1591は補正量に応じた仮補正テーブルを作成する。階調補正部1585は仮補正テーブルを用いた階調補正を、クラスタAの平均Labを色変換部1584でRGBに変換したRGB_aと、クラスタBの平均Labを同じくRGBに変換したRGB_bに対して行い、補正後の値を色変換部1586で再度Lab信号に変換する。色差計算部1587では、クラスタAとクラスタBの補正後の平均Lab同士の色差dE2を計算する。色差比計算部1588では、補正前の色差dE1と補正後の色差dE2の比率を計算して求める。   FIG. 15 shows a configuration of the correction amount calculation unit 158. The first cluster extraction 1580 compares the number of pixels of each cluster and extracts the cluster with the largest number of pixels and the cluster with the next largest number. Of the two clusters, the higher brightness is expressed as cluster A, and the lower brightness is expressed as cluster B. The color difference calculation unit 1582 calculates the color difference dE1 between the average Lab before correction of the cluster A and the cluster B. The correction amount generation unit 1592 sets the correction amount Δ1b, and the temporary correction table generation unit 1591 creates a temporary correction table corresponding to the correction amount. The gradation correction unit 1585 performs gradation correction using the temporary correction table for RGB_a obtained by converting the average Lab of cluster A into RGB by the color conversion unit 1584 and RGB_b obtained by converting the average Lab of cluster B into RGB similarly. Then, the corrected value is converted again into a Lab signal by the color conversion unit 1586. The color difference calculation unit 1587 calculates the color difference dE2 between the average Lab after correction of the cluster A and the cluster B. The color difference ratio calculation unit 1588 calculates and obtains the ratio of the color difference dE1 before correction and the color difference dE2 after correction.

第二のクラスタ抽出部1581では、最も暗いクラスタを抽出する。最も暗いクラスタをクラスタCと表記する。ちなみに、画像によってはクラスタBとクラスタCが同じクラスタを指すこともあるが、それでも構わない。階調補正部1585では、仮補正テーブルを用いた階調補正を、クラスタCの平均Labを色変換部1584でRGBに変換したRGB_cに対して行い、補正後の値を色変換部1586で再度Lab信号に変換する。   The second cluster extraction unit 1581 extracts the darkest cluster. The darkest cluster is denoted as cluster C. Incidentally, although the cluster B and the cluster C may point to the same cluster depending on the image, it does not matter. In the gradation correction unit 1585, gradation correction using the temporary correction table is performed on RGB_c obtained by converting the average Lab of the cluster C into RGB by the color conversion unit 1584, and the value after correction is again performed by the color conversion unit 1586. Convert to Lab signal.

暗部補正量判定部1589では、以下の終了条件1または終了条件2を満たせば、その時点での補正量Δ1bを出力して終了する。どちらの終了条件も満たさなければ、補正量生成部1592では、変更した補正量を発生させ、終了条件を満足するまで処理を繰り返す。
[終了条件1]クラスタAとクラスタBの補正前後の色差比が、色差比目標値設定部1583に設定された目標値Xd以上である。
[終了条件2]クラスタCの補正後の平均Lが、最暗クラスタの明度上限設定部1590に設定された上限値Lc_th以上である。
If the following end condition 1 or end condition 2 is satisfied, the dark part correction amount determination unit 1589 outputs the correction amount Δ1b at that time and ends. If neither end condition is satisfied, the correction amount generation unit 1592 generates a changed correction amount and repeats the process until the end condition is satisfied.
[End Condition 1] The color difference ratios before and after the correction of cluster A and cluster B are equal to or greater than the target value Xd set in the color difference ratio target value setting unit 1583.
[End Condition 2] The average L after correction of the cluster C is equal to or greater than the upper limit value Lc_th set in the brightness upper limit setting unit 1590 of the darkest cluster.

画素数が最も大きいクラスタと次に大きいクラスタの色差が補正前のX倍になるように補正するということは、他の面積の狭いクラスタ同士の色差比に着目して補正するよりも視認性が向上したことが観察者に認識されやすく、非常に効果的である。また、最も暗いクラスタが明るく補正されすぎないように補正量を制限することは、暗部ノイズが目立つ副作用を防止するのに有効である。   The correction so that the color difference between the cluster having the largest number of pixels and the next largest cluster is X times before correction is more visible than the correction by paying attention to the color difference ratio between other clusters having a small area. The improvement is easily recognized by the observer and is very effective. Further, limiting the correction amount so that the darkest cluster is not corrected too brightly is effective in preventing a side effect in which dark part noise is conspicuous.

図16は、最暗クラスタの補正量制限を説明する図である。(a)は暗部を示し、(b)は暗部を拡大した図である。YcとYc_thは、最暗クラスタの補正量制限をわかりやすく表現したものであり、YcがクラスタCの補正後の輝度を表しており、Yc_thは上限値を輝度で表している。   FIG. 16 is a diagram for explaining the correction amount limitation of the darkest cluster. (A) shows a dark part, (b) is the figure which expanded the dark part. Yc and Yc_th express the correction amount limitation of the darkest cluster in an easy-to-understand manner, Yc represents the luminance after correction of the cluster C, and Yc_th represents the upper limit value by luminance.

図15の補正量生成部1592は、Δ1b=0を初期値として、補正量生成の要求がある度に、Δ1bに+1したものを次の補正量として発生させる。仮補正テーブル生成部1591では、RGB_aを輝度変換して求めた輝度Yaを制御点として、図16のような補正テーブルを作成する。制御点YaはクラスタA(面積が大きい2つのクラスタのうち明るい方)の輝度に該当する。制御点Yaにおける出力がYa+Δ1bになるように補正テーブルを作成し、暗部領域以外は第一の補正量生成部15で使用されず、どのように設定してもよいので、図16のように、Ya≦入力Y<255は直線で結んでおけば良い。   The correction amount generation unit 1592 in FIG. 15 sets Δ1b = 0 as an initial value, and generates a value obtained by adding 1 to Δ1b as the next correction amount every time a correction amount generation is requested. The temporary correction table generation unit 1591 creates a correction table as shown in FIG. 16 using the luminance Ya obtained by luminance conversion of RGB_a as a control point. The control point Ya corresponds to the luminance of cluster A (the brighter of the two clusters having a large area). A correction table is created so that the output at the control point Ya becomes Ya + Δ1b, and the first correction amount generation unit 15 other than the dark region is not used by the first correction amount generation unit 15 and may be set in any way, as shown in FIG. Ya ≦ input Y <255 may be connected by a straight line.

色差比目標値設定部1583では、暗部面積率Pdに応じて色差比の目標値Xd=3.5×Pdを算出する。算出式は数十枚のサンプル画像を用意してどのくらいに設定すれば、ほぼ全ての画像(少なくとも用意したサンプルの8割)で適正な明るさに補正されるかを主観評価結果から導出したものである。被写体における暗部領域の占める割合が大きいほど暗部の視認性向上を重視した方が高評価を得る傾向があり、暗部領域の占める割合が小さいほど暗部以外の被写体画質を重視した方が高評価が得られ、暗部の視認性向上に対する要求レベルが下がる傾向があった。   The color difference ratio target value setting unit 1583 calculates a color difference ratio target value Xd = 3.5 × Pd according to the dark area ratio Pd. The calculation formula is derived from the subjective evaluation results to prepare dozens of sample images and how much to set them so that almost all images (at least 80% of the prepared samples) can be corrected to appropriate brightness It is. The higher the proportion of the dark area in the subject, the higher the tendency to obtain higher evaluation when the dark area visibility is emphasized, and the lower the proportion of the dark area, the higher the evaluation is given to the subject image quality other than the dark portion. Therefore, there is a tendency that the required level for improving the visibility of dark parts is lowered.

最暗クラスタの明度上限設定部1590では、Lc_thが15くらいの値(10〜18の間)に設定されるのが適当である。これは予め決めておいた固定値でよい。   In the darkest cluster lightness upper limit setting unit 1590, it is appropriate that Lc_th is set to a value of about 15 (between 10 and 18). This may be a predetermined fixed value.

図17は、第二の補正量生成部16の構成を示す。第二の補正量生成部では、補正テーブルのハイライト領域における傾きα4’を補正量として求め、出力する。   FIG. 17 shows a configuration of the second correction amount generation unit 16. The second correction amount generation unit obtains and outputs the inclination α4 ′ in the highlight area of the correction table as the correction amount.

ハイライト対象領域判定部1605では、領域判定結果からハイライト領域の画素であるか否かの情報を取得し、サンプリング画像のRGB値が全て255であるか否かを判定して、RGB値が全て255である画素(白画素)を除外したハイライト領域を対象領域とする。   The highlight target area determination unit 1605 acquires information on whether or not the pixel is a highlight area pixel from the area determination result, determines whether or not the RGB values of the sampling image are all 255, and the RGB value is A highlight area excluding pixels (white pixels) that are all 255 is set as a target area.

傾きα4’下限設定部1600は、ハイライト面積率Phに応じてα4’の下限値Z=1/(−1.4×Ph+2.4)を算出し、補正量生成部1601は、補正量の初期値としてZを出力する。この算出式も主観評価結果から導出したものであり、画像内におけるハイライト対象領域の占める割合が大きいほどハイライトの階調つぶれ(白に飛んでしまうことも含む)が評価を下げる要因となる傾向があり、ハイライト対象領域の占める割合が小さいほどハイライトの階調つぶれよりも被写体画質が優先される傾向があった。補正量生成部1601では、以降要求がある度にα4’に+0.03したものを次の補正量として発生させる。   The slope α4 ′ lower limit setting unit 1600 calculates the lower limit value Z = 1 / (− 1.4 × Ph + 2.4) of α4 ′ according to the highlight area ratio Ph, and the correction amount generation unit 1601 calculates the correction amount. Z is output as an initial value. This calculation formula is also derived from the subjective evaluation results. As the ratio of the highlight target area in the image increases, the gradation of the highlight (including the fact that it jumps to white) becomes a factor that lowers the evaluation. There is a tendency, and as the proportion of the highlight target area is smaller, the subject image quality tends to be prioritized over the highlight gradation loss. The correction amount generation unit 1601 generates a value obtained by adding +0.03 to α4 ′ as the next correction amount every time there is a subsequent request.

仮補正テーブル生成部1602では、th1を制御点として、図18のような補正テーブルを作成する。ハイライト領域であるth1≦入力Y≦255で、傾きがα4’になるように補正テーブルを作成し、ハイライト領域以外は第二の補正量生成部16で使用されず、どのように設定してもよいので、図18のように0≦入力Y<th1を直線で結んでおけば良い。   The temporary correction table generation unit 1602 creates a correction table as shown in FIG. 18 using th1 as a control point. A correction table is created so that the slope is α4 ′ when th1 ≦ input Y ≦ 255, which is a highlight area, and the area other than the highlight area is not used by the second correction amount generation unit 16 and how it is set. Therefore, it is sufficient to connect 0 ≦ input Y <th1 with a straight line as shown in FIG.

階調補正部1603は、作成した仮補正テーブルに基づき階調補正を行い、飽和画素判定部1606は、上記した対象領域であり、かつ、階調補正によって飽和したと判断された場合に、飽和画素であると判定する。階調補正によって飽和したかどうかは補正前後のRGB値を参照して判断する。RGBの3信号のうち補正後の値が(255−x1)以上に飽和した信号数が、補正前に255に飽和している信号数よりも多ければ、階調補正によって飽和した画素であると判断する。x1は飽和の判断を人の目視での判断に近づけるため、完全に255に飽和していないが飽和に近い画素も含めて飽和したと判定するためのパラメータであり、x1=20くらいの値に設定しておくのが適当である。   The gradation correction unit 1603 performs gradation correction based on the created temporary correction table, and the saturated pixel determination unit 1606 is saturated when it is determined that the region is the target region described above and is saturated by the gradation correction. It is determined that it is a pixel. Whether or not the image is saturated by the gradation correction is determined with reference to the RGB values before and after the correction. Of the three RGB signals, if the number of signals saturated after correction is greater than (255−x1) is greater than the number of signals saturated at 255 before correction, the pixel is saturated by gradation correction. to decide. x1 is a parameter for determining that saturation is included in pixels that are not completely saturated to 255 but close to saturation in order to make the determination of saturation close to human visual judgment, and the value is about x1 = 20 It is appropriate to set.

飽和画素数計数部1607は、飽和したと判断された画素数Ndを計数し、対象画素数計数部1608は、対象領域の画素数Neを計数する。飽和度算出部1609では、飽和度Pwとして対象領域に対する飽和画素の割合を次式で求める。
Pw=Nd/Ne
The saturated pixel number counting unit 1607 counts the number of pixels Nd determined to be saturated, and the target pixel number counting unit 1608 counts the pixel number Ne of the target region. The saturation calculation unit 1609 obtains the ratio of saturated pixels with respect to the target region as the saturation Pw by the following equation.
Pw = Nd / Ne

ハイライト補正量判定部1610では、飽和度が飽和度上限設定部1611に設定された上限値Xh以下になることを終了条件とし、終了条件を満たした時点でのα4’を補正量として出力して終了する。終了条件を満たさないうちは、補正量生成部1601は変更した補正量を発生させ、終了条件を満足するまで処理を繰り返す。   The highlight correction amount determination unit 1610 outputs a saturation amount that is equal to or lower than the upper limit value Xh set in the saturation upper limit setting unit 1611 as an end condition, and outputs α4 ′ when the end condition is satisfied as a correction amount. To finish. As long as the end condition is not satisfied, the correction amount generation unit 1601 generates the changed correction amount and repeats the process until the end condition is satisfied.

飽和度上限設定部1611では、Xhが0.15くらいの値(0.1〜0.2の間)に設定しておくのが適当である。予め決めておいた固定値でよい。   In the saturation upper limit setting unit 1611, it is appropriate to set Xh to a value of about 0.15 (between 0.1 and 0.2). A predetermined fixed value may be used.

図19(a)は、被写体代表色抽出部14の構成を示す。被写体中央値抽出部146は、ヒストグラムから図19(b)に示す被写体領域における中央値Ymを求める。Y=0から画素数を順に加算し、被写体領域の画素数の1/2以上になった時点での輝度値がYmである。次に、Ymに対応するLab値を求める。サンプリング画像データの中から輝度値がYmに等しいものを中央値判定部148が抽出し、RGB毎の加算演算部149では、輝度値がYmの画素の画素値をRGB毎に加算し、画像全体のRGB毎の加算が終了したら、RGB平均値算出部1400はRGB毎の加算値を中央値Ymの画素数で割って輝度値がYmの画素のRGB平均値を算出し、色変換部1401ではLabに変換したものを被写体の代表色Lab_dとして出力する。   FIG. 19A shows the configuration of the subject representative color extraction unit 14. The subject median value extraction unit 146 obtains the median value Ym in the subject region shown in FIG. 19B from the histogram. The number of pixels is added in order from Y = 0, and the luminance value at the time when the number of pixels in the subject area becomes ½ or more is Ym. Next, the Lab value corresponding to Ym is obtained. The median value determination unit 148 extracts the sampled image data whose luminance value is equal to Ym, and the addition calculation unit 149 for each RGB adds the pixel values of the pixels having the luminance value Ym for each RGB, thereby obtaining the entire image. When the addition for each RGB is completed, the RGB average value calculation unit 1400 divides the addition value for each RGB by the number of pixels of the median Ym to calculate the RGB average value of the pixels having the luminance value Ym, and the color conversion unit 1401 The image converted into Lab is output as the representative color Lab_d of the subject.

図20(a)は、第三の補正量生成部17の構成を示す。第三の補正量生成部では、図20(b)に示すように、被写体の代表色Lab_dに対応する輝度Ydにおける補正後の値をYd+βとして増加分βを補正量として求め、出力する。   FIG. 20A shows the configuration of the third correction amount generation unit 17. As shown in FIG. 20B, the third correction amount generation unit calculates and outputs an increase β as a correction amount with the corrected value in the luminance Yd corresponding to the representative color Lab_d of the subject as Yd + β.

色変換部170は、代表色Lab_dをRGBに変換し、階調補正部173では、補正量生成部172で生成される補正量βに応じてRGB値を階調補正し、色変換部174は補正後の値をLabに変換する。色差計算部175では、代表色の補正前後の色差を計算する。   The color conversion unit 170 converts the representative color Lab_d into RGB, the gradation correction unit 173 performs gradation correction of the RGB value according to the correction amount β generated by the correction amount generation unit 172, and the color conversion unit 174 The corrected value is converted to Lab. The color difference calculation unit 175 calculates the color difference before and after correcting the representative color.

被写体代表色補正量判定部176では、代表色の補正前後の色差が代表色補正量閾値設定部177に設定された閾値Xm以上になることを終了条件とし、終了条件を満たした時点でのβを補正量としてYdとセットで出力して終了する。終了条件を満たさないうちは、補正量生成部172は変更した補正量を発生させ、終了条件を満足するまで処理を繰り返す。   The subject representative color correction amount determination unit 176 uses an end condition that the color difference before and after correction of the representative color is equal to or greater than the threshold value Xm set in the representative color correction amount threshold setting unit 177, and β when the end condition is satisfied. Is output as a correction amount together with Yd, and the process ends. As long as the end condition is not satisfied, the correction amount generation unit 172 generates the changed correction amount and repeats the process until the end condition is satisfied.

補正量生成部172は、β=0を初期値として、補正量生成の要求がある度に、βに+1したものを次の補正量として発生させる。   The correction amount generation unit 172 sets β = 0 as an initial value, and generates a value obtained by adding 1 to β as the next correction amount every time a correction amount generation is requested.

代表色補正量閾値設定部177では、予め決めておいた固定値を用いる場合、Xmが15くらいの値に設定するが、この値は、画像の過補正を防止して、印象を大きく変えない上限値(閾値)設定として適当である。   In the representative color correction amount threshold setting unit 177, when a predetermined fixed value is used, Xm is set to a value of about 15 but this value prevents overcorrection of the image and does not change the impression greatly. It is suitable as an upper limit (threshold) setting.

図21は、補正量決定部18の構成を示す。補正量Δ2算出部180では、図6に示した関係を使って、ハイライトの傾きがα4’である場合の補正量Δを求め、それをΔ2として出力する。補正量Δ3算出部181では、図6に示した関係を使って、補正テーブルが入力Yd、出力Yd+βの点を通る場合の補正量Δを求め、それをΔ3として出力する。ここで、Δ2およびΔ3の算出には、図6より制御点Ya,th1,th2のデータが必要であるので、補正量Δ2算出部180および補正量Δ3算出部181にYa,th1,th2を入力している。第一の補正量生成部15で生成された補正量Δ1と、補正量Δ2算出部180で生成された補正量Δ2と、補正量Δ3算出部181で生成された補正量Δ3を参照して、最小値選択部182では、最小のものを選択して出力する(Δ=min(Δ1,Δ2,Δ3))。   FIG. 21 shows the configuration of the correction amount determination unit 18. The correction amount Δ2 calculation unit 180 calculates the correction amount Δ when the highlight slope is α4 ′ using the relationship shown in FIG. 6 and outputs it as Δ2. Using the relationship shown in FIG. 6, the correction amount Δ3 calculation unit 181 obtains a correction amount Δ when the correction table passes through the points of the input Yd and the output Yd + β, and outputs it as Δ3. Here, since the data of the control points Ya, th1, and th2 are required from FIG. 6 to calculate Δ2 and Δ3, Ya, th1, and th2 are input to the correction amount Δ2 calculation unit 180 and the correction amount Δ3 calculation unit 181. doing. With reference to the correction amount Δ1 generated by the first correction amount generation unit 15, the correction amount Δ2 generated by the correction amount Δ2 calculation unit 180, and the correction amount Δ3 generated by the correction amount Δ3 calculation unit 181, The minimum value selection unit 182 selects and outputs the minimum one (Δ = min (Δ1, Δ2, Δ3)).

以上、本実施例によれば、分析範囲を変えて判別分析法を2度適用し、ヒストグラムの谷位置を閾値として決定することにより、明るさに応じた領域判定のための閾値決定を適切に行うことができる。暗画像であるか否かを判定し、2回目の判別分析法(第二の閾値決定)の分析範囲を暗画像でない場合はTH1よりも暗い側、暗画像である場合にはTH1よりも明るい側に設定していることにより、いずれの場合も狙い通りの閾値設定を行うことができる。また、領域判定のための2つの閾値を折点とする折れ線形状の階調補正テーブルを作成し、折れ線形状の階調補正テーブルを使用して階調補正を行うため、画像処理による不自然な階調性劣化を防ぐことができる。   As described above, according to the present embodiment, the discriminant analysis method is applied twice while changing the analysis range, and the valley position of the histogram is determined as the threshold value, thereby appropriately determining the threshold value for the region determination according to the brightness. It can be carried out. It is determined whether the image is a dark image, and the analysis range of the second discriminant analysis method (second threshold determination) is darker than TH1 when the image is not a dark image, and brighter than TH1 when the image is a dark image. By setting to the side, the threshold value can be set as intended in any case. In addition, a polygonal line-shaped gradation correction table having two threshold values for area determination as a breakpoint is created, and gradation correction is performed using the polygonal line-shaped gradation correction table. It is possible to prevent gradation deterioration.

本発明によれば、入力画像のヒストグラムを作成し、前記ヒストグラムを分析して、ヒストグラムの谷位置に該当する第一の閾値を決定し、入力画像が全体的に暗い画像でない場合には、前記ヒストグラムのうち第一の閾値よりも暗い部分のヒストグラムを分析して、ヒストグラムの谷位置に該当する第二の閾値を決定し、第一の閾値および第二の閾値に基づき、入力画像を明るさに応じた少なくとも3つの領域に分割する領域判定を行い、領域判定の判定結果に基づき、入力画像に対して画像処理を行うため、入力画像を少なくとも暗部領域とハイライト領域とその他の領域の領域に分割し、各領域の特徴に基づいて適切な画像処理パラメータ(例えば階調補正テーブル)を設定し、好適な画像処理を行うことがきる。   According to the present invention, a histogram of an input image is created, the histogram is analyzed, a first threshold value corresponding to a valley position of the histogram is determined, and when the input image is not an overall dark image, The histogram of the portion darker than the first threshold is analyzed to determine a second threshold corresponding to the valley position of the histogram, and the input image is brightened based on the first threshold and the second threshold. In order to perform area determination to be divided into at least three areas according to the area and perform image processing on the input image based on the determination result of the area determination, the input image is at least a dark area, a highlight area, and other areas And appropriate image processing parameters (for example, a gradation correction table) are set on the basis of the characteristics of each region, and suitable image processing can be performed.

また、本発明によれば、入力画像が全体的に暗い画像である場合には、第二の閾値決定手段は、前記ヒストグラムのうち第一の閾値よりも明るい部分のヒストグラムを分析して、ヒストグラムの谷位置に該当する第二の閾値を決定するため、入力画像が暗画像である場合も、領域判定のための閾値決定を狙い通りに行うことができる。   Further, according to the present invention, when the input image is a dark image as a whole, the second threshold value determining means analyzes a histogram of a portion brighter than the first threshold value in the histogram, and Since the second threshold value corresponding to the valley position is determined, even when the input image is a dark image, the threshold value determination for region determination can be performed as intended.

また、本発明によれば、入力画像が全体的に暗い画像である場合には、第一の閾値を明るい値に修正するため、本来は暗部領域である領域内に設定されてしまった第一の閾値を適切な値に設定し直すことができ、入力画像が暗画像である場合も、領域判定のための閾値決定を狙い通りに行うことができる。   Further, according to the present invention, when the input image is a dark image as a whole, the first threshold value is corrected to a bright value. Can be reset to an appropriate value, and even when the input image is a dark image, threshold determination for region determination can be performed as intended.

さらに、本発明によれば、前記第一の閾値または明るい値に修正された第一の閾値および前記第二の閾値を折点とする折れ線形状の階調補正テーブルを作成し、前記階調補正テーブルに従って入力画像の階調を補正するため、画像処理による不自然な階調性劣化を防ぐことができる。   Furthermore, according to the present invention, the first threshold value or the first threshold value corrected to a bright value and the second threshold value are created as a polygonal line-shaped gradation correction table, and the gradation correction is performed. Since the gradation of the input image is corrected according to the table, unnatural gradation deterioration due to image processing can be prevented.

実施例1では、領域判定部40が明るさに応じて画像をハイライト領域と暗部領域とその他(暗部領域以外の被写体領域)の3つに分割する領域判定を行い、領域判定結果を第一の補正量生成部15と第二の補正量生成部16が参照する例を示したが、第一の補正量生成部15が参照するのは暗部領域か否かの情報のみであるし、第二の補正量生成部16が参照するのはハイライト領域か否かの情報のみであり、必ずしも1つの処理ブロックで全ての領域判定を完了させて領域判定結果を後段の処理ブロックに渡す必要はない。   In the first embodiment, the area determination unit 40 performs area determination that divides an image into three areas, that is, a highlight area, a dark area, and other areas (subject areas other than the dark area) according to brightness, and the area determination result is set to the first area determination result. The correction amount generation unit 15 and the second correction amount generation unit 16 refer to the example, but the first correction amount generation unit 15 refers only to information on whether or not it is a dark area, and The second correction amount generation unit 16 refers only to information about whether or not it is a highlight area, and it is not always necessary to complete all area determinations in one processing block and to pass the area determination result to a subsequent processing block. Absent.

図22は、本発明の実施例2の構成を示す。本実施例では、予め全ての領域判定を完了させて後段に渡すのではなく、領域判定に必要な閾値を渡して第一の補正量生成部15の内部で暗部領域であるか否かの判定を行い、第二の補正量生成部16の内部でハイライト領域であるか否かの判定を行う。   FIG. 22 shows a configuration of the second embodiment of the present invention. In this embodiment, not all the region determination is completed in advance and passed to the subsequent stage, but a threshold necessary for region determination is passed to determine whether or not it is a dark region within the first correction amount generation unit 15. It is determined whether or not it is a highlight area inside the second correction amount generation unit 16.

図23は、実施例2における第一の補正量生成部15の構成を示す。サンプリング画像のRGB値を輝度変換部150で輝度値Yに変換し、暗部領域判定部151では、Y<th2、かつ、Max(R,G,B)−Min(R,G,B)<50ならば、暗部領域の画素であると判定する。クラスタリング部153は、暗部領域判定結果と、色変換部152でLabに変換したサンプリング画像データを入力として、クラスタリングを行う。   FIG. 23 shows a configuration of the first correction amount generation unit 15 in the second embodiment. The RGB value of the sampled image is converted into a luminance value Y by the luminance conversion unit 150, and the dark region determination unit 151 converts Y <th2 and Max (R, G, B) −Min (R, G, B) <50. Then, it is determined that the pixel is in the dark area. The clustering unit 153 performs clustering using the dark region determination result and the sampled image data converted into Lab by the color conversion unit 152 as inputs.

図24は、実施例2における第二の補正量生成部16の構成を示す。サンプリング画像のRGB値を輝度変換部1604で輝度値に変換し、ハイライト対象領域判定部1605では、th1≦Y<255であればハイライト対象領域の画素であると判定する。ここではY=255である画素(白画素)をハイライト領域から除外した領域を対象領域とする。後の処理は実施例1と同様である。   FIG. 24 illustrates a configuration of the second correction amount generation unit 16 in the second embodiment. The RGB value of the sampled image is converted into a luminance value by the luminance conversion unit 1604, and the highlight target region determination unit 1605 determines that the pixel is the highlight target region if th1 ≦ Y <255. Here, an area excluding a pixel (white pixel) with Y = 255 from the highlight area is set as a target area. The subsequent processing is the same as in the first embodiment.

本実施例では、実施例1とは異なり、1つの処理ブロックで全ての領域判定が完了しているわけではなく、第一の補正量生成部15の内部における暗部領域判定部151と第二の補正量生成部16の内部におけるハイライト対象領域判定部1605に分散して暗部領域か否か、ハイライト領域か否かの領域判定を行っているが、結果として得られる領域判定結果は、実質的には実施例1と同じであり、階調補正量および補正画像も実施例1と同じものが得られる。つまり、領域判定の処理ブロックが分散していても、全体としてみて、明るさに応じて画像を実質的に3つに分割する領域判定を行い、各領域の画像特徴に基づいて補正量を生成し、明るさに応じて画像を3つに領域分割する領域判定部を実質的に有していると言える。領域判定結果ではなく、閾値th1,th2を各補正量生成部15、16に渡すことにより、画像全体の領域判定結果を保持するための記憶領域が不要になり、低コストで実現することが出来るメリットがある。   In the present embodiment, unlike the first embodiment, not all the area determinations are completed in one processing block. The dark area determination section 151 and the second area determination section 151 in the first correction amount generation section 15 are not the same. In the correction amount generation unit 16, the area determination unit 1605 distributes the area to determine whether it is a dark area or a highlight area, and the area determination result obtained as a result is substantially This is the same as in the first embodiment, and the same tone correction amount and corrected image as in the first embodiment can be obtained. In other words, even if the area determination processing blocks are dispersed, the area determination is performed so that the image is substantially divided into three according to the brightness as a whole, and the correction amount is generated based on the image characteristics of each area. In addition, it can be said that the image processing apparatus substantially includes an area determination unit that divides an image into three areas according to brightness. By passing the threshold values th1 and th2 instead of the area determination result to the correction amount generation units 15 and 16, a storage area for holding the area determination result of the entire image becomes unnecessary, which can be realized at low cost. There are benefits.

以上、本実施例によれば、領域判定の処理ブロックを分散させて実装することにより、画像全体の領域判定結果を保持するための記憶領域が不要になり、低コストで実現できる。   As described above, according to the present embodiment, by distributing the area determination processing blocks, a storage area for holding the area determination result of the entire image becomes unnecessary, and can be realized at low cost.

本発明は、前述した実施例の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(CPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても達成される。この場合、記憶媒体から読出されたプログラムコード自体が前述した各実施例の機能を実現することになる。プログラムコードを供給するための記憶媒体としては、例えば、ハードディスク、光ディスク、光磁気ディスク、不揮発性のメモリカード、ROMなどを用いることができる。また、コンピュータが読出したプログラムコードを実行することにより、前述した実施例の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した各実施例の機能が実現される場合も含まれる。さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した各実施例の機能が実現される場合も含まれる。また、本発明の実施例の機能等を実現するためのプログラムは、ネットワークを介した通信によってサーバから提供されるものでも良い。   According to the present invention, a storage medium in which a program code of software for realizing the functions of the above-described embodiments is recorded is supplied to a system or apparatus, and a computer (CPU or MPU) of the system or apparatus is stored in the storage medium. This is also achieved by reading and executing the code. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments. As a storage medium for supplying the program code, for example, a hard disk, an optical disk, a magneto-optical disk, a nonvolatile memory card, a ROM, or the like can be used. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on an instruction of the program code. A case where part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included. Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. This includes the case where the CPU or the like provided in the board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing. Further, the program for realizing the functions and the like of the embodiments of the present invention may be provided from a server by communication via a network.

10 輝度変換部
11 ヒストグラム作成部
12 閾値決定部
13 領域面積率計算部
14 被写体代表色抽出部
15 第一の補正量生成部
16 第二の補正量生成部
17 第三の補正量生成部
18 補正量決定部
19 階調補正テーブル作成部
20 階調補正部
30 画像サンプリング部
40 領域判定部
DESCRIPTION OF SYMBOLS 10 Brightness conversion part 11 Histogram creation part 12 Threshold value determination part 13 Area | region area ratio calculation part 14 Subject representative color extraction part 15 First correction amount generation part 16 Second correction amount generation part 17 Third correction amount generation part 18 Correction Amount determining unit 19 Gradation correction table creation unit 20 Gradation correction unit 30 Image sampling unit 40 Area determination unit

特開2003−69825号公報JP 2003-69825 A 特開2003−69822号公報JP 2003-69822 A

Claims (5)

入力画像の輝度ヒストグラムを作成する輝度ヒストグラム作成手段と、
前記輝度ヒストグラムの入力値の最小値から最大値までの分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第一の閾値を決定する第一の閾値決定手段と、
前記第一の閾値を予め設定した閾値と比較し、前記第一の閾値が前記閾値未満のとき、前記入力画像が全体的に暗い画像であると判定し、前記第一の閾値が前記閾値以上のとき、
前記入力画像が全体的に暗い画像ではないと判定する暗画像判定手段と、
前記入力画像が全体的に暗い画像でないと判定された場合には、前記輝度ヒストグラムの入力値の最小値から前記第一の閾値までの暗い部分の分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第二の閾値を決定し、前記入力画像が全体的に暗い画像であると判定された場合には、前記輝度ヒストグラムの入力値の前記第一の閾値から最大値までの明るい部分の分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第二の閾値を決定する第二の閾値決定手段と、
前記入力画像が全体的に暗い画像であると判定された場合には、前記第一の閾値を明るい値に修正する閾値修正手段と、
前記入力画像が全体的に暗い画像ではないと判定された場合には、前記入力画像の輝度が前記第二の閾値未満の画素を暗部領域の画素と判定し、前記入力画像の輝度が前記第一の閾値以上の画素をハイライト領域の画素と判定し、前記暗部領域でも前記ハイライト領域でもない画素を被写体領域の画素と判定し、
前記入力画像が全体的に暗い画像であると判定された場合には、前記入力画像の輝度が前記明るい値に修正された第一の閾値未満の画素を暗部領域の画素と判定し、前記入力画像の輝度が前記第二の閾値以上の画素をハイライト領域の画素と判定し、前記暗部領域でもハイライト領域でもない画素を被写体領域の画素と判定することにより、前記入力画像を明るさに応じた少なくとも3つの領域に分割する領域判定を行う領域判定手段と、
前記領域判定手段の判定結果に基づいて、前記入力画像に対して階調補正を行う画像処理手段とを備えることを特徴とする画像処理装置。
A luminance histogram creating means for creating a luminance histogram of the input image,
A first threshold for determining a first threshold value corresponding to a luminance value for dividing the analysis range from the minimum value to the maximum value of the input value of the luminance histogram into two classes having a large inter-class variance and a small intra-class variance . Threshold determination means;
The first threshold value is compared with a preset threshold value, and when the first threshold value is less than the threshold value, it is determined that the input image is an overall dark image, and the first threshold value is equal to or greater than the threshold value. When,
Dark image determination means for determining that the input image is not entirely dark ,
When it is determined that the input image is not a dark image as a whole, the analysis range of the dark portion from the minimum value of the input value of the luminance histogram to the first threshold is set to have a large inter-class variance and within the class. A second threshold value corresponding to a luminance value to be divided into two classes with small variance is determined, and if it is determined that the input image is an overall dark image, the second value of the input value of the luminance histogram is determined. A second threshold value determining means for determining a second threshold value corresponding to a luminance value for dividing an analysis range of a bright portion from one threshold value to a maximum value into two classes having a large inter-class variance and a small intra-class variance. When,
A threshold value correcting means for correcting the first threshold value to a bright value when it is determined that the input image is an overall dark image ;
When it is determined that the input image is not an entirely dark image, a pixel whose luminance is lower than the second threshold is determined as a pixel in a dark area, and the luminance of the input image is the first luminance. A pixel that is equal to or greater than one threshold is determined as a pixel in the highlight area, a pixel that is neither the dark area nor the highlight area is determined as a pixel in the subject area,
If it is determined that the input image is an overall dark image, the input image is determined to be a pixel in a dark area region, where the luminance of the input image is less than the first threshold value corrected to the bright value, and the input A pixel whose image brightness is equal to or higher than the second threshold is determined as a pixel in the highlight area, and a pixel that is neither the dark area nor the highlight area is determined as a pixel in the subject area. Region determining means for performing region determination to divide into at least three regions according to,
An image processing apparatus comprising: an image processing unit that performs gradation correction on the input image based on a determination result of the region determination unit.
前記画像処理手段は、前記入力画像の階調を補正する階調補正手段であり、前記第一の閾値または修正された第一の閾値および前記第二の閾値を折点とする折れ線形状の階調補正テーブルを作成する階調補正テーブル作成手段を備え、前記階調補正テーブルに従って前記入力画像の階調を補正することを特徴とする請求項1記載の画像処理装置。   The image processing means is a gradation correction means for correcting the gradation of the input image, and the first threshold value or the modified first threshold value and the second threshold value are broken line-shaped floors. The image processing apparatus according to claim 1, further comprising a gradation correction table creating unit configured to create a tone correction table, wherein the gradation of the input image is corrected according to the gradation correction table. 入力画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、
前記輝度ヒストグラムの入力値の最小値から最大値までの分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第一の閾値を決定する第一の閾値決定工程と、
前記第一の閾値を予め設定した閾値と比較し、前記第一の閾値が前記閾値未満のとき、前記入力画像が全体的に暗い画像であると判定し、前記第一の閾値が前記閾値以上のとき、前記入力画像が全体的に暗い画像ではないと判定する暗画像判定工程と、
前記入力画像が全体的に暗い画像でないと判定された場合には、前記輝度ヒストグラムの入力値の最小値から前記第一の閾値までの暗い部分の分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第二の閾値を決定し、前記入力画像が全体的に暗い画像であると判定された場合には、前記輝度ヒストグラムの入力値の前記第一の閾値から最大値までの明るい部分の分析範囲を、クラス間分散が大きくかつクラス内分散が小さい2つのクラスに分割する輝度値に該当する第二の閾値を決定する第二の閾値決定工程と、
前記入力画像が全体的に暗い画像であると判定された場合には、前記第一の閾値を明るい値に修正する閾値修正工程と、
前記入力画像が全体的に暗い画像ではないと判定された場合には、前記入力画像の輝度が前記第二の閾値未満の画素を暗部領域の画素と判定し、前記入力画像の輝度が前記第一の閾値以上の画素をハイライト領域の画素と判定し、前記暗部領域でも前記ハイライト領域でもない画素を被写体領域の画素と判定し、
前記入力画像が全体的に暗い画像であると判定された場合には、前記入力画像の輝度が前記明るい値に修正された第一の閾値未満の画素を暗部領域の画素と判定し、前記入力画像の輝度が前記第二の閾値以上の画素をハイライト領域の画素と判定し、前記暗部領域でもハイライト領域でもない画素を被写体領域の画素と判定することにより、前記入力画像を明るさに応じた少なくとも3つの領域に分割する領域判定を行う領域判定工程と、
前記領域判定工程の判定結果に基づいて、前記入力画像に対して階調補正を行う画像処理工程とを備えることを特徴とする画像処理方法。
A luminance histogram generation step of generating a luminance histogram of the input image,
A first threshold for determining a first threshold value corresponding to a luminance value for dividing the analysis range from the minimum value to the maximum value of the input value of the luminance histogram into two classes having a large inter-class variance and a small intra-class variance . A threshold determination step;
The first threshold value is compared with a preset threshold value, and when the first threshold value is less than the threshold value, it is determined that the input image is an overall dark image, and the first threshold value is equal to or greater than the threshold value. A dark image determination step of determining that the input image is not a dark image as a whole ;
When it is determined that the input image is not a dark image as a whole, the analysis range of the dark portion from the minimum value of the input value of the luminance histogram to the first threshold is set to have a large inter-class variance and within the class. A second threshold value corresponding to a luminance value to be divided into two classes with small variance is determined, and if it is determined that the input image is an overall dark image, the second value of the input value of the luminance histogram is determined. A second threshold value determining step for determining a second threshold value corresponding to a luminance value for dividing an analysis range of a bright portion from one threshold value to a maximum value into two classes having a large inter-class variance and a small intra-class variance. When,
A threshold value correcting step of correcting the first threshold value to a bright value when it is determined that the input image is an overall dark image ;
When it is determined that the input image is not an entirely dark image, a pixel whose luminance is lower than the second threshold is determined as a pixel in a dark area, and the luminance of the input image is the first luminance. A pixel that is equal to or greater than one threshold is determined as a pixel in the highlight area, a pixel that is neither the dark area nor the highlight area is determined as a pixel in the subject area,
If it is determined that the input image is an overall dark image, the input image is determined to be a pixel in a dark area region, where the luminance of the input image is less than the first threshold value corrected to the bright value, and the input A pixel whose image brightness is equal to or higher than the second threshold is determined as a pixel in the highlight area, and a pixel that is neither the dark area nor the highlight area is determined as a pixel in the subject area. An area determination step for determining an area to be divided into at least three areas according to
An image processing method comprising: an image processing step of performing gradation correction on the input image based on a determination result of the region determination step.
請求項記載の画像処理方法をコンピュータに実現させるためのプログラム。 A program for causing a computer to realize the image processing method according to claim 3 . 請求項記載の画像処理方法をコンピュータに実現させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。
A computer-readable recording medium recording a program for causing a computer to implement the image processing method according to claim 3 .
JP2009004797A 2009-01-13 2009-01-13 Image processing apparatus, image processing method, program, and recording medium Expired - Fee Related JP5218767B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009004797A JP5218767B2 (en) 2009-01-13 2009-01-13 Image processing apparatus, image processing method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009004797A JP5218767B2 (en) 2009-01-13 2009-01-13 Image processing apparatus, image processing method, program, and recording medium

Publications (2)

Publication Number Publication Date
JP2010166143A JP2010166143A (en) 2010-07-29
JP5218767B2 true JP5218767B2 (en) 2013-06-26

Family

ID=42581998

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009004797A Expired - Fee Related JP5218767B2 (en) 2009-01-13 2009-01-13 Image processing apparatus, image processing method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP5218767B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413283B (en) 2011-10-25 2013-08-14 广州飒特红外股份有限公司 Infrared chart digital signal processing system and method
JP6150576B2 (en) * 2013-03-25 2017-06-21 キヤノン株式会社 Image processing apparatus and control method thereof
EP3142355B1 (en) * 2015-09-08 2017-10-25 Axis AB Method and apparatus for enhancing local contrast in a thermal image
CN110660065B (en) * 2019-09-29 2023-10-20 云南电网有限责任公司电力科学研究院 Infrared fault detection and identification algorithm
CN111565261B (en) * 2020-06-02 2022-05-31 厦门美图之家科技有限公司 Image processing method and device and electronic equipment
CN115760653B (en) * 2023-01-09 2023-05-09 武汉中导光电设备有限公司 Image correction method, device, equipment and readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000134467A (en) * 1998-10-26 2000-05-12 Canon Inc Image processing method, unit and storage medium
JP4797666B2 (en) * 2006-02-03 2011-10-19 Nkワークス株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP2010166143A (en) 2010-07-29

Similar Documents

Publication Publication Date Title
US7480421B2 (en) Rendering of high dynamic range images
JP5218767B2 (en) Image processing apparatus, image processing method, program, and recording medium
US8554010B2 (en) Image processing apparatus combining plural sets of image data and method for controlling the same
KR101787788B1 (en) Parameters interpolation for high dynamic range video tone mapping
CN110033418B (en) Image processing method, image processing device, storage medium and electronic equipment
JP6193721B2 (en) Image processing apparatus, image processing method, program, and storage medium
EP1703436A2 (en) Image processing system, image processing apparatus and method, recording medium, and program
JP6818463B2 (en) Image processing equipment, image processing methods and programs
CN104349070A (en) High dynamic range image exposure time control method
JP2015156615A (en) Image processing system, image processing method, control program, and recording medium
JP2015156600A (en) Image signal processor, image signal processing method, and imaging apparatus
KR20120086088A (en) Method and Apparatus for Processing Image
CN110047060B (en) Image processing method, image processing device, storage medium and electronic equipment
KR100768035B1 (en) Apparatus and method for adaptive image enhancement
US11115637B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
JP2010130150A (en) Gray level correction apparatus and imaging apparatus
JP2010062919A (en) Image processing apparatus and method, program, and recording medium
JP5004305B2 (en) Image processing apparatus, image processing method, program, and recording medium
CN110111280B (en) Low-illumination image enhancement method for multi-scale gradient domain guided filtering
JP4289225B2 (en) Image processing apparatus and image processing method
JP4979090B2 (en) Image processing apparatus, image processing method, program, and recording medium
JP2004078652A (en) Image processor and its method
JP2001144962A (en) Image processing unit
JP2010183416A (en) Image processing apparatus and method, program, and recording medium
US20150117771A1 (en) Image processing apparatus, image processing method, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111226

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120615

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130109

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: 20130206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130219

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

Free format text: PAYMENT UNTIL: 20160315

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20160315

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees