JP2007184887A - Image pickup device, image processor, image processing method and image processing program - Google Patents
Image pickup device, image processor, image processing method and image processing program Download PDFInfo
- Publication number
- JP2007184887A JP2007184887A JP2006062444A JP2006062444A JP2007184887A JP 2007184887 A JP2007184887 A JP 2007184887A JP 2006062444 A JP2006062444 A JP 2006062444A JP 2006062444 A JP2006062444 A JP 2006062444A JP 2007184887 A JP2007184887 A JP 2007184887A
- Authority
- JP
- Japan
- Prior art keywords
- image
- index
- calculating
- processing
- gradation
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 357
- 238000006243 chemical reaction Methods 0.000 claims description 164
- 238000004364 calculation method Methods 0.000 claims description 151
- 238000000034 method Methods 0.000 claims description 132
- 230000008569 process Effects 0.000 claims description 90
- 238000003384 imaging method Methods 0.000 claims description 72
- 238000012937 correction Methods 0.000 abstract description 58
- 230000006870 function Effects 0.000 description 67
- 230000014509 gene expression Effects 0.000 description 37
- 230000003287 optical effect Effects 0.000 description 13
- 238000012546 transfer Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 7
- 230000001186 cumulative effect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 238000010606 normalization Methods 0.000 description 6
- 238000009825 accumulation Methods 0.000 description 5
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 230000035945 sensitivity Effects 0.000 description 4
- 230000001629 suppression Effects 0.000 description 3
- 239000000428 dust Substances 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 235000012736 patent blue V Nutrition 0.000 description 2
- 238000005375 photometry Methods 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 241000723369 Cocculus trilobus Species 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000005549 size reduction Methods 0.000 description 1
- 230000000087 stabilizing effect Effects 0.000 description 1
- 229920003002 synthetic resin Polymers 0.000 description 1
- 239000000057 synthetic resin Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Facsimile Image Signal Circuits (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、撮影画像の画像処理を行う撮像装置、画像処理装置、画像処理方法、及び画像処理プログラムに関する。 The present invention relates to an imaging apparatus, an image processing apparatus, an image processing method, and an image processing program that perform image processing of a captured image.
近年デジタルスチルカメラ(携帯電話やラップトップパソコン等の機器に組み込まれたものも含み、以下DSCと略称する)が広く普及し、従来のカラー写真フィルムのシステムと同様に、ハードコピー画像として出力したり、CRT等の媒体に表示したり、CD−R(CD−Recordable)等の記録媒体に記録するシステムが広く利用されている。 In recent years, digital still cameras (including those incorporated in devices such as mobile phones and laptop computers, hereinafter abbreviated as DSC) have become widespread, and, as with conventional color photographic film systems, output as hard copy images. In addition, systems that display on a medium such as a CRT or record on a recording medium such as a CD-R (CD-Recordable) are widely used.
しかし、DSCなどで撮影された画像を、上記のように種々の媒体を通じて画像として鑑賞するに当たっては、撮影時の露出調整の不備等により、一般的にそのままでは鑑賞用画像として適切な画像を得ることはできない場合が多い。つまり、適正な鑑賞用の画像とするためには、撮影時の露出の過不足を補うために、適当な画像の階調補正処理が行われることが望ましい。 However, when an image taken with a DSC or the like is viewed as an image through various media as described above, an image suitable for viewing is generally obtained as it is due to inadequate exposure adjustment at the time of shooting. There are many cases where this is not possible. That is, in order to obtain an appropriate appreciation image, it is desirable that an appropriate image gradation correction process is performed in order to compensate for overexposure or underexposure during shooting.
またそれ以外にも、例えば、逆光状態での撮影や、フラッシュを使用した近接撮影など、撮影時の光源状態の影響で、画像内で大きな輝度の偏りが生じている場合には、そのままでは鑑賞目的として適切な画像とはいえず、何らかの補正処理を行うことが望ましい。 In addition, if there is a large luminance bias in the image due to the influence of the light source state at the time of shooting, for example, shooting in a backlit state or close-up shooting using a flash, the image can be viewed as it is. It cannot be said that the image is suitable for the purpose, and it is desirable to perform some correction processing.
このような問題点を解決するために、従来より階調変換処理などの補正処理が行われており、その補正処理を決める方法については種々の提案がなされている(例えば、特許文献1、及び2参照)。 In order to solve such problems, correction processing such as gradation conversion processing has been performed conventionally, and various proposals have been made regarding methods for determining the correction processing (for example, Patent Document 1 and 2).
例えば特許文献1には、プリンタでのDSC撮影画像出力の際、画像データを解析することにより画像のシーンを判別し、画像シーンに応じて最適な画像処理を自動的に施す方法が記載されている。 For example, Patent Document 1 describes a method of discriminating an image scene by analyzing image data when a DSC photographed image is output by a printer, and automatically performing optimum image processing according to the image scene. Yes.
また特許文献2には、DSC撮影時に分割測光結果から画面内コントラストの強弱や輝度分布状態などの被写体情報を得て、この被写体情報に応じてDSC内での撮影画像データの階調補正を決める方法が記載されている。
特許文献1、及び特許文献2記載の方法は、撮影された画像の輝度とその分布からシーン判別する、あるいは直接補正方法を求めるなどの処理を行うことで、自動的に撮影画像の補正を行うことができる。しかしながらいずれの場合も、撮影時のユーザ(撮影者)の意図は補正処理に反映されていない。
The methods described in Patent Literature 1 and
例えば夜景シーンなどの撮影画像の場合、上記のような方法では結果的に露出アンダーの画像と判定され、強い補正が行われてしまい、撮影者の意図を反映した画像を得ることができない。またオートブラケットで撮影された画像についても、露出のアンダー、あるいはオーバーの画像に対して補正がおこなわれてしまい、撮影者が意図した露出差の画像を得ることができない。 For example, in the case of a photographed image such as a night scene, the above-described method results in an underexposed image, and strong correction is performed, so that an image reflecting the photographer's intention cannot be obtained. In addition, an image taken with auto bracketing is also corrected for an underexposed or overexposed image, and an image with an exposure difference intended by the photographer cannot be obtained.
このように、上記のような方法では、撮影時の撮影者の意図を反映することができず、かえって好ましくない画像を得ることになる
また撮影時のISO感度設定が高い画像では、上記の様な方法で補正が行われた場合、撮影したDSCの性能、撮像素子(CCDやCMOSセンサー)の性能によっては、補正後の画像のノイズが目立ってしまい、むしろ好ましい画像とならない場合もある。
As described above, the method as described above cannot reflect the intention of the photographer at the time of shooting, and an unfavorable image is obtained. On the other hand, when the ISO sensitivity setting at the time of shooting is high, When the correction is performed by such a method, depending on the performance of the photographed DSC and the performance of the image pickup device (CCD or CMOS sensor), the noise of the corrected image may be conspicuous and may not be a preferable image.
本発明の目的は、撮影された画像の撮影シーンを判別することによって、自動的に適切な補正処理条件を設定するとともに、さらに撮影時のユーザ(撮影者)の意図をも反映することで、より適切な補正画像を得ることのできる撮像装置、画像処理装置、画像処理方法、及び画像処理プログラムを提供することである。 An object of the present invention is to automatically set an appropriate correction processing condition by discriminating a photographing scene of a photographed image and further reflect the intention of a user (photographer) at the time of photographing. To provide an imaging apparatus, an image processing apparatus, an image processing method, and an image processing program capable of obtaining a more appropriate corrected image.
本発明は上記の課題を解決するために、以下の特徴を有するものである。 The present invention has the following features in order to solve the above problems.
1. 撮影により取得された第1の画像から画像サイズを縮小した第2の画像を取得する第2の画像取得手段と、前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得手段と、前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理手段と、前記シーン判別処理手段によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定手段と、を有し、前記階調処理条件設定手段は、前記撮影条件取得手段により取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、ことを特徴とする撮像装置。 1. Second image acquisition means for acquiring a second image obtained by reducing the image size from the first image acquired by shooting, and shooting condition acquisition means for acquiring a shooting condition set at the time of shooting the first image And a scene discrimination processing means for performing a scene discrimination process based on the second image, and a gradation processing condition for the first image based on the scene discrimination result obtained by the scene discrimination processing means. Gradation processing condition setting means, and the gradation processing condition setting means corrects the setting of the gradation processing condition based on the scene discrimination result based on the shooting condition acquired by the shooting condition acquisition means. An imaging apparatus characterized by that.
2. 前記撮影条件取得手段は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む撮影条件を取得する、ことを特徴とする1に記載の撮像装置。 2. 2. The imaging apparatus according to 1, wherein the imaging condition acquisition unit acquires imaging conditions including at least “ISO speed rate”, “exposure mode”, or “imaging type”.
3. 前記シーン判別処理手段は、前記第2の画像の画像データについて色情報を取得し、取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、前記取得された色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出手段と、前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出手段と、前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出手段と、少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出手段と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出手段と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出手段と、前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別手段と、を有する、ことを特徴とする1または2に記載の撮像装置。
3. The scene determination processing unit acquires color information for the image data of the second image, and classifies the image data into a class composed of a combination of predetermined brightness and hue based on the acquired color information, For each classified class, a first occupancy ratio calculating unit that calculates a first occupancy ratio indicating a ratio of the entire image data, and the image data is displayed on the screen based on the acquired color information. A second occupancy rate calculating means for classifying into a class composed of a combination of distance and brightness from the outer edge, and calculating a second occupancy ratio indicating the ratio of the entire image data for each classified class; and By multiplying the first occupancy by a preset first coefficient, a first index calculating means for calculating index 1 and the first occupancy multiplied by a second coefficient preset By finger Second index calculating means for calculating 2; third index calculating means for calculating
4. 前記階調処理条件設定手段は、前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出手段と、算出された前記階調調整パラメータを、前記撮影条件取得手段により取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出手段と、を有し、前記シーン判別処理手段によるシーン判別結果と前記階調変換量算出手段により算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、ことを特徴とする1乃至3の何れか1項に記載の撮像装置。 4). The gradation processing condition setting means is obtained by a gradation adjustment parameter calculating means for calculating a gradation adjustment parameter based on the second image, and the calculated gradation adjustment parameter is acquired by the photographing condition acquisition means. A gradation conversion amount calculating unit that corrects based on shooting conditions and calculates a gradation conversion amount, and the gradation determined by the scene determination processing unit and the gradation calculated by the gradation conversion amount calculating unit The imaging apparatus according to any one of claims 1 to 3, wherein a gradation processing condition for the first image is set based on a conversion amount.
5. 前記階調処理条件設定手段により設定された階調処理条件に基づき、前記第1の画像に対する階調変換処理を行う階調変換処理手段を有する、ことを特徴とする1乃至4の何れか1項に記載の撮像装置。 5. Any one of 1 to 4, further comprising gradation conversion processing means for performing gradation conversion processing on the first image based on the gradation processing conditions set by the gradation processing condition setting means. The imaging device according to item.
6. 撮影された画像を取得した第1の画像に基づき、画像サイズを縮小した第2の画像を取得する第2の画像取得手段と、前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得手段と、前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理手段と、前記シーン判別処理手段によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定手段と、を有し、前記階調処理条件設定手段は、前記撮影条件取得手段により取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、ことを特徴とする画像処理装置。 6). Based on the first image obtained from the photographed image, second image obtaining means for obtaining a second image with a reduced image size and photographing conditions set at the time of photographing the first image are obtained. A shooting condition acquisition unit, a scene determination processing unit that performs a shooting scene determination process based on the second image, and a gradation process for the first image based on a scene determination result obtained by the scene determination processing unit Gradation processing condition setting means for setting a condition, wherein the gradation processing condition setting means sets the gradation processing condition based on the scene discrimination result based on the shooting condition acquired by the shooting condition acquisition means. An image processing apparatus characterized by correcting the above.
7. 前記撮影条件取得手段は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む撮影条件を取得する、ことを特徴とする6に記載の画像処理装置。 7). 7. The image processing apparatus according to 6, wherein the imaging condition acquisition unit acquires imaging conditions including at least “ISO speed rate”, “exposure mode”, or “imaging type”.
8. 前記シーン判別処理手段は、前記第2の画像の画像データについて色情報を取得し、取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、前記取得された色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出手段と、前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出手段と、前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出手段と、少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出手段と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出手段と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出手段と、前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別手段と、を有する、ことを特徴とする6または7に記載の画像処理装置。
8). The scene determination processing unit acquires color information for the image data of the second image, and classifies the image data into a class composed of a combination of predetermined brightness and hue based on the acquired color information, For each classified class, a first occupancy ratio calculating unit that calculates a first occupancy ratio indicating a ratio of the entire image data, and the image data is displayed on the screen based on the acquired color information. A second occupancy rate calculating means for classifying into a class composed of a combination of distance and brightness from the outer edge, and calculating a second occupancy ratio indicating the ratio of the entire image data for each classified class; and By multiplying the first occupancy by a preset first coefficient, a first index calculating means for calculating index 1 and the first occupancy multiplied by a second coefficient preset By finger Second index calculating means for calculating 2; third index calculating means for calculating
9. 前記階調処理条件設定手段は、前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出手段と、算出された前記階調調整パラメータを、前記撮影条件取得手段により取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出手段と、を有し、前記シーン判別処理手段によるシーン判別結果と前記階調変換量算出手段により算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、ことを特徴とする6乃至8の何れか1項に記載の画像処理装置。
9. The gradation processing condition setting means is obtained by a gradation adjustment parameter calculating means for calculating a gradation adjustment parameter based on the second image, and the calculated gradation adjustment parameter is acquired by the photographing condition acquisition means. A gradation conversion amount calculating unit that corrects based on shooting conditions and calculates a gradation conversion amount, and the gradation determined by the scene determination processing unit and the gradation calculated by the gradation conversion amount calculating unit The image processing apparatus according to any one of
10. 前記階調処理条件設定手段により設定された階調処理条件に基づき、前記第1の画像に対する階調変換処理を行う階調変換処理手段を有する、ことを特徴とする6乃至9の何れか1項に記載の画像処理装置。 10. Any one of 6 to 9, further comprising gradation conversion processing means for performing gradation conversion processing on the first image based on the gradation processing conditions set by the gradation processing condition setting means. The image processing apparatus according to item.
11. 撮影された画像を取得した第1の画像に基づき、画像サイズを縮小した第2の画像を取得する第2の画像取得工程と、前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得工程と、前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理工程と、前記シーン判別処理工程によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定工程と、を備え、前記階調処理条件設定工程では、前記撮影条件取得工程において取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、ことを特徴とする画像処理方法。 11. Based on the first image obtained from the photographed image, a second image obtaining step for obtaining a second image with a reduced image size, and a photographing condition set at the time of photographing the first image are obtained. A shooting condition acquisition step, a scene determination processing step for performing a shooting scene determination process based on the second image, and a gradation process for the first image based on the scene determination result obtained by the scene determination processing step A gradation processing condition setting step for setting conditions, wherein the gradation processing condition setting step sets the gradation processing condition based on the scene discrimination result based on the photographing condition acquired in the photographing condition acquisition step. An image processing method characterized by correcting.
12. 前記撮影条件取得工程において取得される撮影条件は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む、
ことを特徴とする11に記載の画像処理方法。
12 The shooting conditions acquired in the shooting condition acquisition step include at least “ISO speed rate”, “exposure mode”, or “shooting type”.
12. The image processing method according to 11, wherein
13. 前記シーン判別処理工程は、前記第2の画像の画像データについて色情報を取得し、取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出工程と、前記取得された色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出工程と、前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出工程と、前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出工程と、前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出工程と、少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出工程と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出工程と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出工程と、前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別工程と、を備える、ことを特徴とする11または12に記載の画像処理方法。
13. The scene determination processing step acquires color information for the image data of the second image, and classifies the image data into a class composed of a combination of predetermined brightness and hue based on the acquired color information, For each classified class, a first occupancy ratio calculating step for calculating a first occupancy ratio indicating a ratio of the entire image data, and the image data on the screen based on the acquired color information. A second occupancy ratio calculating step for classifying into a class composed of a combination of the distance from the outer edge and the brightness, and calculating a second occupancy ratio indicating the ratio of the entire image data for each classified class; A first index calculation step for calculating index 1 by multiplying the first occupancy by a first coefficient set in advance, and a second coefficient set in advance for the first occupancy By finger A second index calculating step of calculating 2; a third index calculating step of calculating
14. 前記階調処理条件設定工程は、前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出工程と、算出された前記階調調整パラメータを、前記撮影条件取得工程において取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出工程と、を備え、前記シーン判別処理工程におけるシーン判別結果と前記階調変換量算出工程において算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、ことを特徴とする11乃至13の何れか1項に記載の画像処理方法。
14 In the gradation processing condition setting step, a gradation adjustment parameter calculation step for calculating a gradation adjustment parameter based on the second image, and the calculated gradation adjustment parameter are acquired in the photographing condition acquisition step. A gradation conversion amount calculation step that corrects based on shooting conditions and calculates a gradation conversion amount, and the gradation conversion calculated in the scene determination result and the gradation conversion amount calculation step in the scene determination processing step The image processing method according to any one of
15. 前記階調処理条件設定工程において設定された階調処理条件に基づき、前記第1の画像に対する階調変換処理を行う階調変換処理工程を備える、ことを特徴とする11乃至14の何れか1項に記載の画像処理方法。 15. Any one of 11 to 14, further comprising a gradation conversion processing step for performing gradation conversion processing on the first image based on the gradation processing conditions set in the gradation processing condition setting step. The image processing method according to item.
16. コンピュータに画像処理を実行させるための画像処理プログラムであって、撮影された画像を取得した第1の画像に基づき、画像サイズを縮小した第2の画像を取得する第2の画像取得機能と、前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得機能と、前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理機能と、前記シーン判別処理機能によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定機能と、を有し、前記階調処理条件設定機能は、前記撮影条件取得機能により取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、ことを特徴とする画像処理プログラム。 16. An image processing program for causing a computer to execute image processing, a second image acquisition function for acquiring a second image with a reduced image size based on the first image obtained by acquiring a captured image; Obtained by a shooting condition acquisition function for acquiring shooting conditions set at the time of shooting the first image, a scene determination processing function for determining a shooting scene based on the second image, and the scene determination processing function A gradation processing condition setting function for setting a gradation processing condition for the first image based on the scene discrimination result, the gradation processing condition setting function acquired by the photographing condition acquisition function. An image processing program for correcting a setting of a gradation processing condition based on the scene discrimination result based on a photographing condition.
17. 前記撮影条件取得機能は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む撮影条件を取得する、ことを特徴とする16に記載の画像処理プログラム。 17. 17. The image processing program according to 16, wherein the shooting condition acquisition function acquires shooting conditions including at least “ISO speed rate”, “exposure mode”, or “shooting type”.
18. 前記シーン判別処理機能は、前記第2の画像の画像データについて色情報を取得し、取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出機能と、取得された前記色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出機能と、前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出機能と、前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出機能と、前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出機能と、少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出機能と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出機能と、前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出機能と、前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別機能と、を有する、ことを特徴とする16または17に記載の画像処理プログラム。 18. The scene determination processing function acquires color information for the image data of the second image, and classifies the image data into a class composed of a combination of predetermined brightness and hue based on the acquired color information, For each classified class, based on the first occupancy ratio calculation function for calculating the first occupancy ratio indicating the ratio of the entire image data, and the acquired color information, the image data is displayed on the screen. A second occupancy ratio calculating function for classifying into a class composed of a combination of distance from the outer edge and brightness, and calculating a second occupancy ratio indicating the ratio of the entire image data for each classified class; Multiplying a first index calculation function for calculating index 1 by multiplying the first occupancy by a first coefficient set in advance, and a second coefficient preset for the first occupancy By finger A second index calculating function for calculating 2; a third index calculating function for calculating index 3 by multiplying the second occupancy by a preset third coefficient; and at least the image data A fourth index calculation function for calculating the index 4 by multiplying the average brightness of the skin color in the center of the screen by a preset fourth coefficient, the index 1, the index 2, and the index 3 A fifth index calculation function for calculating the index 5 by multiplying at least one of the indices by a preset fifth coefficient, and the index 1, the index 2, and the index 3 Based on a sixth index calculation function for calculating the index 6 by multiplying at least one index by a preset sixth coefficient, the index 4, the index 5, and the index 6, Specialized image data scene Scene discrimination has features and, the image processing program according to 16 or 17, characterized by.
19. 前記階調処理条件設定機能は、前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出機能と、算出された前記階調調整パラメータを、前記撮影条件取得機能により取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出機能と、を有し、前記シーン判別処理機能によるシーン判別結果と前記階調変換量算出機能により算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、ことを特徴とする16乃至18の何れか1項に記載の画像処理プログラム。
19. The gradation processing condition setting function is obtained by the gradation adjustment parameter calculation function for calculating a gradation adjustment parameter based on the second image, and the calculated gradation adjustment parameter is acquired by the imaging condition acquisition function. A gradation conversion amount calculation function that corrects based on shooting conditions and calculates a gradation conversion amount, and the gradation calculated by the scene determination result by the scene determination processing function and the gradation conversion amount calculation function The image processing program according to any one of
20. 前記階調処理条件設定機能により設定された階調処理条件に基づき、前記第1の画像に対する階調変換処理を行う階調変換処理機能を有する、ことを特徴とする16乃至19の何れか1項に記載の画像処理プログラム。 20. Any one of 16 to 19 having a gradation conversion processing function for performing gradation conversion processing on the first image based on the gradation processing conditions set by the gradation processing condition setting function. The image processing program according to item.
本発明によれば、撮影された画像の撮影シーンを判別することによって、自動的に適切な補正処理条件を設定するに当たり、撮影時のユーザ(撮影者)の意図を表現する要素として、撮影時の撮影条件を用いて、撮影画像の補正処理を抑制する度合いを制御することにより、例えば、夜景シーンやオートブラケット撮影等の撮影者の意図を反映しつつ、特定の撮影意図がなく撮影された画像については補正を施し適正な画像を得ることができ、また撮影時のISO感度設定が高い画像でも、過度にノイズを増加させることがなく、より適切な補正画像を得ることのできる撮像装置、画像処理装置、画像処理方法、及び画像処理プログラムが提供できる。 According to the present invention, when setting an appropriate correction processing condition automatically by determining a photographing scene of a photographed image, as an element expressing the intention of a user (photographer) at the time of photographing, By using this shooting condition, the degree to which the correction processing of the shot image is suppressed is controlled, for example, reflecting a photographer's intention such as a night view scene or auto bracket shooting, and has been shot without a specific shooting intention. An imaging device capable of obtaining an appropriate image by performing correction on the image, and capable of obtaining a more appropriate corrected image without excessively increasing noise even in an image having a high ISO sensitivity setting at the time of shooting, An image processing apparatus, an image processing method, and an image processing program can be provided.
以下、図面を参照して、本発明の実施形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施形態)
まず、本発明に係る第1の実施形態(撮像装置)における構成について説明する。
(First embodiment)
First, the configuration of the first embodiment (imaging device) according to the present invention will be described.
(撮像装置1の構成)
図1(a)に、本発明の実施形態に係る撮像装置1の前面図を示し、図1(b)に、撮像装置1の背面図を示す。撮像装置1は、例えば、デジタルカメラであり、金属または合成樹脂等の材料で構成された筐体21の内部または表面に、十字キー22、撮影光学系23、フラッシュ24、ファインダ25、電源スイッチ26、表示部27、レリーズボタン28が設けられている。
(Configuration of the imaging device 1)
FIG. 1A shows a front view of the imaging apparatus 1 according to the embodiment of the present invention, and FIG. 1B shows a rear view of the imaging apparatus 1. The imaging device 1 is a digital camera, for example, and has a cross key 22, a photographing
図2に、撮像装置1の内部構成を示す。撮像装置1は、図2に示すように、プロセッサ31、メモリ32、CCD(Charge Coupled Device)等の撮像素子33、撮影光学系23、タイミングジェネレータ41、シャッタユニット42、絞りユニット43、フォーカスユニット44、表示部27、操作部38、画像データ出力部37により構成される。またプロセッサ31には、撮影制御や撮影画像の処理を行う撮影処理部20と画像処理を行う画像処理部10がある。
FIG. 2 shows an internal configuration of the imaging apparatus 1. As shown in FIG. 2, the image pickup apparatus 1 includes a
十字キー22は、上下左右の4方向のボタンからなり、ユーザが種々のモードを選択または設定するためのものである。 The cross key 22 is made up of buttons in four directions, up, down, left and right, and is used by the user to select or set various modes.
撮影光学系23は、複数のレンズ、鏡胴等によって構成され、ズーム機能を有している。撮影光学系23は、レンズが受光した光を撮像素子33に結像させる。フラッシュ24は、被写体輝度が低い時に、プロセッサ31からの制御信号により補助光を照射する。
The photographing
ファインダ25は、ユーザが接眼して撮影対象及び撮影領域を確認するためのものである。電源スイッチ26は、撮像装置1における動作のON/OFFを操作するためのスイッチである。
The
表示部27は、液晶パネルにより構成され、プロセッサ31から入力される表示制御信号に従って、撮像素子33に現在写っている画像、過去に撮影した画像、メニュー画面、設定画面等を表示する。
The
レリーズボタン28は、筐体21の上面に設けられており、ユーザによる半押し状態(予備撮影)と全押し状態(本撮影)とを区別して検出可能な2段階押し込みスイッチである。
The
メモリ32は、撮影によって得られた画像データを記憶(保存)する。また、メモリ32は、撮像装置1において実行される各種処理プログラム及び当該処理プログラムで利用されるデータ等を記憶する。
The
画像データ出力部37は、保存用の記録媒体(SDメモリカードまたはマルチメディアカード(MMC)等)にメモリ32内の画像データを転送、記録する、あるいは外部装置へ転送する。画像データ出力部37はプロセッサ31により制御される。
The image
撮像素子33は、結像された光を電荷に変換する。これにより、例えば、図12(a)に示すような画像データが得られる。この画像には、撮像範囲(撮影範囲)にある物、すなわち、撮影対象物(撮影の目標物)とそれ以外の物(背景)とが含まれている。この全体画像の各画素のRGB値は、例えば、256階調で表される。
The
シャッタユニット42は、レリーズボタン28によって検出された状態(半押し状態または全押し状態)に基づいて撮像素子33をリセットするタイミング及び電荷変換を行うタイミングなどを制御する。タイミングの制御はタイミングジェネレータ41により行われる。シャッタユニット42による露光量制御については後述する。
The
撮像素子33が受光する光量の調節は、絞りユニット43及び/またはシャッタユニット42によって行われる。フォーカスユニット44は、撮影光学系23を駆動させ撮影被写体に対して焦点を合わせる制御動作を実行する。フォーカスユニット44による合焦点制御については後述する。
Adjustment of the amount of light received by the
(撮影処理部20の内部構成)
図3に、撮影処理部20の内部構成を示す。撮影処理部20は、撮影時に撮影条件に関わる制御や、撮影された画像の処理を行う。図3を用いて、撮影処理部20の内部構成を説明する。
(Internal configuration of the imaging processing unit 20)
FIG. 3 shows an internal configuration of the
図3に示すように、撮影処理部20は、撮影条件に関わるAE制御部51、AF制御部52、そして撮影された画像に対して画像処理を行う画素補間部53、AWB制御部54、ガンマ補正部55などにより構成される。
As shown in FIG. 3, the
AE制御部51は、画像撮影時にその露光量の自動制御を行う。通常、撮影待機時の露光量制御は、絞り開放でシャッタ速度を制御することによって行われ、撮影時の露光量は絞りとシャッタ速度とで制御される。
The
AE制御部51における撮影待機時の露光量制御は、例えば以下のように行われる(図4(a)のフローチャート参照)。
For example, the exposure amount control during shooting standby in the
まず絞りユニット43により、絞りが開放固定絞りに設定される(ステップS111)。AE制御部51により、撮像素子33によって得られた画像データから所定の測光エリアのデータが読み出され(ステップS112)、輝度値に相当する情報が取得される(ステップS113)。この輝度値に相当する情報は、AE制御のための情報として用いられ、簡易的にRGB3色成分のうちのG値が用いられることが多い(以下これを輝度情報Gと呼ぶ)。この輝度情報Gに応じて撮像素子33の次のフレームにおける電荷蓄積時間が設定され(ステップS114)、タイミングジェネレータ41により、所定の輝度レベルとなるように、次のフレームにおける電荷蓄積時間が制御される(ステップS117)。これがシャッタ速度の制御であり、電荷が蓄積される様子を図5に示す。すなわち、取得した輝度レベルが大きい(明るい)ときは電荷蓄積時間が短くなり、輝度レベルが小さい(暗い)ときは電荷蓄積時間が長くなることで、露光量を安定させる。
First, the
このように撮影待機時の露光量制御が行われることで、撮影者は液晶などの表示部27で露光量制御されたライブビュー画像を観察することができる。
By performing exposure amount control during shooting standby in this way, a photographer can observe a live view image whose exposure amount is controlled on the
AE制御部51における実際の撮影時の露光量制御は、上記のシャッタ速度制御に加えて、絞りの制御も行われる(図4(b)のフローチャート参照)。上記同様(ステップS112、S113)に得られた測光エリアの輝度情報Gに応じて、絞りユニット43が制御され、絞り値が設定される(ステップS116)。すなわち、取得した輝度レベルが大きい(明るい)ときは絞り値を小さくし、輝度レベルが小さい(暗い)ときは絞り値を大きくすることで、露光量を安定させる。シャッタ速度と組み合わせての調節レベルは、予め定められたプログラム線図のデータに基づき、例えば、撮像素子33の電荷蓄積時間が絞り値に応じて調整されるなどの制御が行われる(ステップS115、S117)。
In the exposure control at the time of actual photographing in the
このように撮影時に露光量制御が行われることで、撮影者は任意の、あるいは既定の、絞り値とシャッタ速度の組み合わせで、撮影画像に対する露光量設定を自動的に行うことができる。 As described above, the exposure amount control is performed at the time of photographing, so that the photographer can automatically set the exposure amount with respect to the photographed image by using an arbitrary or predetermined combination of the aperture value and the shutter speed.
AF制御部52は、画像撮影時に画像の焦点を合わせる自動制御を行う。この合焦点制御は、例えば以下のように撮影光学系を駆動することで合焦点位置を検知し、その位置に合わせて停止させることで行われる(図6のフローチャート参照)。
The
撮影光学系23の駆動が開始されると(ステップS121)、その駆動に伴い逐次、AF制御部52は、撮像素子33によって得られた画像データから所定の測距エリアのデータを読み出し(ステップS122)、このデータに応じてコントラスト情報を取得する(ステップS123)。これは、合焦点位置に達したかどうかを検知するためであり、次のように判定される。すなわち、コントラスト情報は、測距エリアのデータの各隣接画素間の差を取ることにより、エッジ部のシャープさに依存するように設定、算出されるものであり、測距エリア全体での総和が最大に達した状態が合焦点と判断される(ステップS124、S125)。合焦点位置でないと判断された場合は、撮影光学系の移動が継続される(ステップS126)。
When driving of the photographic
撮影光学系23の移動に伴うコントラスト情報の変化と合焦点位置検出の様子を図7に示す。上記動作は、光学系を駆動しながら逐次コントラスト情報を取得して、合焦点位置を求めるという測距演算が行われたものであり、その焦点距離に合わせて撮影光学系23は停止される(ステップS127)。
FIG. 7 shows a change in contrast information accompanying the movement of the photographic
このようなAF制御により、撮影時に常に自動的にピントのあった撮影画像を得ることができる。 With such AF control, it is possible to obtain a captured image that is always in focus automatically during shooting.
画素補間部53は、撮像素子33におけるRGB各色成分を分散配置したCCD配列に対して、各色成分ごとに画素間の補間を行い、同一画素位置で各色成分値が得られるように画像データを処理する(図8のフローチャート参照)。
The
画素補間部53は、撮像素子33によって得られたRGB画像データ(ステップS141)をRGBの各画素フィルタパターンでマスキングし(ステップS142、S144、S146)、その後で平均補間(画素補間ともいう)を行う(ステップS143、S145、S147)。このうち、高帯域にまで画素を有するGの画素フィルタパターンは、周辺4画素の中間2値の平均値に置換して平均補間を行うメディアン(中間値)フィルタであり、RとBの画素フィルタパターンは、周辺9画素から同色に対して平均補間を行うものである。
The
AWB制御部54は、撮影画像におけるホワイトバランスを自動的に調整する。撮影された画像は、その中にRGBのカラーバランスがとれている(総和すればホワイト)被写体領域があるものという想定で、その領域のホワイトバランスを達成するように、画像のRGBの各成分値に対するレベル調整を行う。このホワイトバランス処理は、例えば以下のように行われる(図9のフローチャート参照)。
The
AWB制御部54は、撮像素子33によって得られた画像データの輝度や彩度のデータから(ステップS131)、本来ホワイトであると思われる領域を推測する(ステップS132)。その領域について、RGB各成分値の平均強度、及びG/R比、G/B比を求め、G値に対するR値、B値の補正ゲインを算出する(ステップS133、S134)。これに基づき、画像全体における各色成分に対するゲインの補正を行う(ステップS135)。
The
このようなAWB制御により、撮影時に生ずる画面全体のカラーバランスの崩れを自動的に補正することができ、実際の被写体の照明状態に拘わらず、安定した色調の画像を得ることができる。 By such AWB control, it is possible to automatically correct the collapse of the color balance of the entire screen that occurs during shooting, and an image with a stable color tone can be obtained regardless of the actual illumination state of the subject.
ガンマ補正部55は、撮影画像の階調性を出力機器の特性に適するように変換する処理を行う。
The
ガンマ特性とは階調特性のことであり、入力階調に対してどのように出力階調を設定するかを補正値あるいは補正曲線などで示すものである。図10に入力値に対して、補正した出力値を示す補正曲線の例を示す。ガンマ補正は、この補正値あるいは補正曲線などに従い、入力値に対する出力値への変換を行う変換処理となる。出力機器によってこの階調特性は異なるため、その出力機器に適した階調とするために、このガンマ特性の補正を行う必要がある。これにより撮影されたリニア画像はノンリニア画像に変換されることになる。 The gamma characteristic is a gradation characteristic and indicates how to set an output gradation with respect to an input gradation by a correction value or a correction curve. FIG. 10 shows an example of a correction curve indicating an output value corrected for the input value. The gamma correction is a conversion process for converting an input value into an output value according to the correction value or the correction curve. Since this gradation characteristic varies depending on the output device, it is necessary to correct this gamma characteristic in order to obtain a gradation suitable for the output device. As a result, the captured linear image is converted into a non-linear image.
出力機器としては一般的にはモニタが設定され、一般的なモニタのガンマ特性に合うように撮影画像のガンマ補正は行われる。 A monitor is generally set as the output device, and gamma correction of the captured image is performed so as to match the gamma characteristic of a general monitor.
(画像処理部10の内部構成)
図11に、画像処理部10の内部構成を示す。画像処理部10は、撮像装置1における撮影画像に対して、シーン判別に基づく階調の補正動作を制御するものであり、撮影処理部20での処理後に、あるいはその処理とは独立して、画像取得、シーン判別、階調処理条件設定などの一連の処理を実行する。図11を用いて、画像処理部10の内部構成を説明する。
(Internal configuration of the image processing unit 10)
FIG. 11 shows an internal configuration of the
図11に示すように、画像処理部10は、第1画像取得部101、第2画像取得部102、占有率算出部103、指標算出部104、シーン判別部105、階調処理条件設定部107、そして階調変換処理部108により構成される。
As shown in FIG. 11, the
第1画像取得部101は、レリーズボタン28が全押しされたタイミングで、撮像素子33に写った最新の画像の画像データを第1の画像として取得する。また撮影時における撮影条件も合わせて取得する。すなわち、第1画像取得部101は撮影条件取得手段として機能する。本実施形態では取得する撮影条件は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む。取得した第1の画像の画像データ、及び撮影条件はメモリ32に保持される。
The first
第2画像取得部102は、取得した第1の画像を、N×M個の矩形の領域(垂直方向にM個及び水平方向にN個に分割された領域)に分割する。図12(a)に、第1の画像の一例を示し、図12(b)に、当該第1の画像が22×14個の領域に分割された例を示す。なお、分割領域の数は特に限定されない。本実施形態では、分割された各領域を画像データの「画素」と見なし、分割された画像を実質的にサイズが縮小された画像として扱う。この縮小された画像が、第2の画像であり、上記操作により第2の画像を取得することになる。従って第2画像取得部102は、第2の画像取得手段として機能する。
The second
占有率算出部103は、第2の画像の画像データ、すなわち画像を構成する各画素に対して、色情報を取得する。取得された色情報に基づいて、画像の各画素を、明度と色相の組み合わせからなる所定の階級に分類し(図16参照)、分類された階級毎に、当該階級に属する画素が画像全体に占める割合を示す第1の占有率を算出する。すなわち、占有率算出部103は第1の占有率算出手段として機能する。
The occupation
また、占有率算出部103は、各画素を、第2の画像の画面の外縁からの距離と明度の組み合わせからなる所定の階級に分類し(図17参照)、分類された階級毎に、当該階級に属する画素が画像全体に占める割合を示す第2の占有率を算出する。すなわち、占有率算出部103は第2の占有率算出手段としても機能する。
Further, the occupation
占有率算出部103において実行される占有率算出処理については、後に図15を参照して詳細に説明する。
The occupation rate calculation process executed in the occupation
指標算出部104は、占有率算出部103で算出された第1の占有率に、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標1、及び指標2を算出する。すなわち、指標算出部104は第1の指標算出手段、及び第2の指標算出手段として機能する。
The
また、指標算出部104は、占有率算出部103で算出された第2の占有率に、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標3を算出する。すなわち、指標算出部104は第3の指標算出手段としても機能する。
In addition, the
さらに、指標算出部104は、第2の画像の画面中央部における平均輝度値と、最大輝度値と平均輝度値との差分値のそれぞれに、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標4を算出する。すなわち、指標算出部104は第4の指標算出手段として機能する。
Further, the
また、指標算出部104は、第2の画像の画面中央部における肌色領域の平均輝度値(指標7とする)と、指標1及び指標3に、それぞれ、撮影条件に応じて予め設定された係数を乗算して和をとることにより、新たな指標5を算出する。すなわち、指標算出部104は第5の指標算出手段として機能する。
In addition, the
また、指標算出部104は、当該平均輝度値と、指標2及び指標3に、それぞれ、撮影条件に応じて予め設定された係数を乗算して和をとることにより、新たな指標6を算出する。すなわち、指標算出部104は第6の指標算出手段として機能する。
Further, the
指標算出部104において実行される指標算出処理については、後に図18を参照して詳細に説明する。
The index calculation process executed in the
シーン判別部105は、指標算出部104で算出された各指標に基づいて、第1の画像の撮影シーンを判別する。すなわち、シーン判別部105はシーン判別手段として機能する。ここで、撮影シーンとは、順光、逆光、近接フラッシュ等の被写体を撮影する時の光源条件を示しており、主要被写体(主に人物のことを指すが、これに限るものではない)のオーバー度、アンダー度などもこれに含まれる。撮影シーン判別の方法については、後に詳細に説明する。
The
以上のように、占有率算出部、指標算出部、そしてシーン判別部がシーン判別処理手段として機能する。 As described above, the occupation rate calculation unit, the index calculation unit, and the scene determination unit function as a scene determination processing unit.
階調処理条件設定部107は、階調処理条件設定手段として機能し、シーン判別部105で判別された撮影シーンに基づいて、第1の画像に対する階調処理条件(図25参照)を設定する。
The gradation processing condition setting unit 107 functions as a gradation processing condition setting unit, and sets gradation processing conditions (see FIG. 25) for the first image based on the shooting scene determined by the
また、階調処理条件設定部107は、指標算出部104で算出された各指標に基づいて、第1の画像に対する階調調整のための階調調整パラメータを算出し、さらに階調変換量を決定する。従って、上記階調処理条件設定部107は、階調調整パラメータ算出手段、及び階調変換量算出手段として機能する。階調処理条件の設定については、後に図24を参照して詳細に説明する。
Further, the gradation processing condition setting unit 107 calculates a gradation adjustment parameter for gradation adjustment for the first image based on each index calculated by the
階調変換処理部108は、階調変換処理手段として機能し、上記階調処理条件設定部107において設定された階調処理条件に従い、第1の画像に対する階調変換処理を実行する。 The gradation conversion processing unit 108 functions as a gradation conversion processing unit, and executes gradation conversion processing for the first image in accordance with the gradation processing conditions set in the gradation processing condition setting unit 107.
プロセッサ31は、上記画像処理部10で行われる処理以外に、公知技術に基づいて、自動ホワイトバランス処理、ガンマ変換処理などの撮影処理部20での処理や、またその他画像処理、画像フォーマット変換、画像データの記録などの処理動作を制御する機能を有する。
In addition to the processing performed in the
またプロセッサ31における各部の処理は、基本的にハードウエア処理によって行われるが、一部についてはメモリ32に記憶(保存)されているプログラムを実行するなどしてソフトウェア処理によって行われる。
The processing of each unit in the
(撮像装置1の動作フロー)
次に、本実施形態における撮像装置1の動作について説明する。
(Operation Flow of Imaging Device 1)
Next, the operation of the imaging device 1 in the present embodiment will be described.
以下では、撮影対象物を「主要被写体」と呼ぶことにする。 Hereinafter, the photographing object is referred to as “main subject”.
まず、図13のフローチャートを参照して、撮像装置1で実行される処理の全体の流れを説明する。なお、これらの処理はプログラムを用いてコンピュータに実行させることができる。以下で説明する各工程は、画像処理プログラムの各機能としても同様の説明ができる。 First, the overall flow of processing executed by the imaging apparatus 1 will be described with reference to the flowchart of FIG. These processes can be executed by a computer using a program. Each process described below can be similarly described as each function of the image processing program.
まず、電源スイッチ26がONに操作されると(電源が投入されると)、メモリ32のリセット等の前処理が行われる(ステップS1)。ユーザは、主要被写体が撮像装置1の被写界に入るように撮像装置1をその主要被写体の方に向け、撮影のための操作を開始する。レリーズボタン28が押されて撮影が行われる(ステップS2)。撮像素子33に結像した画像は電気信号として取り込まれ、CCD配列に基づく補間処理が行われる(ステップS4)。ステップS5では、撮影画像として、第1の画像が取得され、メモリ32に保持される。第1の画像はリニア画像であり、RAW画像と呼称される。
First, when the
一方、撮影が行われると、撮影条件取得工程であるステップS3では、撮影条件の取り込みが行われる。撮影条件は、後で撮影画像がExif形式(Exchangeable_Image_File_Format)形式で記録される際に、合わせて記録されるものであり、ここで取得する撮影条件は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む。取得した撮影条件はメモリ32に保持される。
On the other hand, when shooting is performed, shooting conditions are captured in step S3, which is a shooting condition acquisition step. The shooting conditions are recorded together when the shot image is recorded in the Exif format (Exchangeable_Image_File_Format) format later. The shooting conditions acquired here are at least “ISO speed rate” and “exposure mode”. Or “shooting type”. The acquired shooting conditions are held in the
撮影により取得された第1の画像は、AWB(自動ホワイトバランス)の処理を施される(ステップS6)。これは以下に述べる第2の画像の取得が行われてから、第1の画像と第2の画像とに対して別途処理されてもよい。 The first image acquired by shooting is subjected to AWB (automatic white balance) processing (step S6). This may be processed separately for the first image and the second image after the second image described below is acquired.
AWB処理の後、第1の画像の画像データは、一方で複数の分割領域からなる分割画像、すなわち第2の画像として取得される(ステップS7)。分割画像の各分割領域は第2の画像の画素であり、第2の画像は第1の画像のサイズを縮小した画像となる。図12(a)に、第1の画像の一例を示し、図12(b)に、当該第1の画像が22×14個のセルに分割された例を示す。各セルが第2の画像の一画素に相当する。実際の画像データのサイズ縮小方法は、単純平均やバイリニア法やバイキュービック法など公知の技術を用いることができる。ステップS7は第2の画像取得工程として機能する。 After the AWB process, the image data of the first image is acquired as a divided image composed of a plurality of divided regions, that is, a second image (step S7). Each divided region of the divided image is a pixel of the second image, and the second image is an image obtained by reducing the size of the first image. FIG. 12A shows an example of the first image, and FIG. 12B shows an example in which the first image is divided into 22 × 14 cells. Each cell corresponds to one pixel of the second image. As an actual image data size reduction method, a known technique such as a simple average, a bilinear method, or a bicubic method can be used. Step S7 functions as a second image acquisition process.
次いで、シーン判別処理工程であるステップS8では、取得された第2の画像の画像データに基づいて、撮影シーンを判別するシーン判別処理が行われる。ステップS8における撮影シーン判別処理については、後に図14を参照して説明する。 Next, in step S8, which is a scene determination processing step, a scene determination process for determining a shooting scene is performed based on the acquired image data of the second image. The shooting scene determination process in step S8 will be described later with reference to FIG.
次いで、階調処理条件設定工程であるステップS9では、ステップS8のシーン判別処理で得られた各指標及び撮影シーンの判別結果に基づいて、第1の画像の階調変換処理のために必要な条件を設定する処理が行われる。またここで撮影条件取得工程で取得した撮影条件による階調変換量の調整が行われる。ステップS7の階調処理条件設定処理については、後に図24を参照して説明する。 Next, in step S9 which is a gradation processing condition setting step, it is necessary for the gradation conversion processing of the first image based on each index obtained in the scene determination processing in step S8 and the determination result of the shooting scene. Processing for setting conditions is performed. Here, the gradation conversion amount is adjusted according to the photographing conditions acquired in the photographing condition acquisition step. The gradation processing condition setting process in step S7 will be described later with reference to FIG.
一方、AWB処理後の第1の画像については、ガンマ変換処理が行われ、ノンリニア画像に変換される(ステップS10)。但し、ガンマ変換処理は階調の変換処理であり、次に述べるステップS11の階調変換処理と合わせて行ってもよい。 On the other hand, the first image after the AWB process is subjected to a gamma conversion process and converted to a non-linear image (step S10). However, the gamma conversion process is a gradation conversion process, and may be performed together with the gradation conversion process in step S11 described below.
階調変換処理工程であるステップS11では、第2の画像に基づいて設定された階調処理条件に基づいて、撮影画像である第1の画像の画像データに対する階調変換処理が行われる。ガンマ変換は視覚に合わせてノンリニアの階調に変換したが、ステップS11の階調変換は撮影シーンの光源条件などによる階調への影響を補正するものであり、ステップS8でのシーン判別結果によりステップS9で設定した処理条件に基づき階調変換処理を行う。 In step S11, which is a gradation conversion processing step, gradation conversion processing is performed on the image data of the first image, which is a captured image, based on the gradation processing conditions set based on the second image. The gamma conversion is converted into a non-linear gradation in accordance with the visual sense. However, the gradation conversion in step S11 is to correct the influence on the gradation due to the light source condition of the shooting scene, and the scene determination result in step S8. A gradation conversion process is performed based on the processing conditions set in step S9.
次いで、画像記録のため、画像フォーマットの変換が行われる(ステップS12)。一般的にはJPEG形式の画像に変換処理される。その後JPEG形式の画像データが、保存用の記録媒体(SDメモリカードまたはマルチメディアカード(MMC)等)に記録される(ステップS13)。次の撮影に移るか、あるいは電源スイッチ26がOFFに操作されると、撮像装置1における動作は終了する。
Next, the image format is converted for image recording (step S12). Generally, it is converted into an image in JPEG format. Thereafter, the image data in the JPEG format is recorded on a storage medium for storage (such as an SD memory card or a multimedia card (MMC)) (step S13). When the next shooting is started or the
(シーン判別処理1のフロー)
次に、図14のフローチャート及び図15〜図23を参照して、撮像装置1でのシーン判別処理1(図13のステップS8)について説明する。
(Scene discrimination process 1 flow)
Next, with reference to the flowchart of FIG. 14 and FIGS. 15 to 23, the scene determination process 1 (step S8 of FIG. 13) in the imaging apparatus 1 will be described.
シーン判別処理は、図14に示すように、色空問変換処理(ステップS20)、占有率算出処理(ステップS21)、指標算出処理(ステップS22)、シーン判別(ステップS23)の各処理により構成される。以下、図15〜図23を参照して、図14に示す各処理について詳細に説明する。 As shown in FIG. 14, the scene discrimination process is configured by each process of a color space conversion process (step S20), an occupation rate calculation process (step S21), an index calculation process (step S22), and a scene discrimination (step S23). Is done. Hereinafter, with reference to FIGS. 15 to 23, each process illustrated in FIG. 14 will be described in detail.
まず、図14のステップS20において、色空間変換処理が行われる。 First, in step S20 of FIG. 14, a color space conversion process is performed.
まず、撮影された第1の画像から得られた第2の画像の各画素のRGB値、輝度値及びホワイトバランスを示す情報が取得される。なお、輝度値としては、RGB値を公知の変換式に代入して算出した値を用いてもよい。次いで、取得されたRGB値がHSV表色系に変換され、画像の色情報が取得される。HSV表色系とは、画像データを色相(Hue)、彩度(Saturation)、明度(ValueまたはBrightness)の3つの要素で表すものであり、マンセルにより提案された表色体系を元にして考案されたものである。HSV表色系への変換は、HSV変換プログラム等を用いて行われ、通常、入力であるR、G、Bに対して、算出された色相値Hは、スケールを0〜360と定義し、彩度値S、明度値Vは、単位を0〜255と定義している。 First, information indicating the RGB value, luminance value, and white balance of each pixel of the second image obtained from the photographed first image is acquired. As the luminance value, a value calculated by substituting RGB values into a known conversion formula may be used. Next, the acquired RGB values are converted into the HSV color system, and the color information of the image is acquired. The HSV color system represents image data with three elements of hue (Hue), saturation (Saturation), and lightness (Value or Brightness), and was devised based on the color system proposed by Munsell. It has been done. The conversion to the HSV color system is performed using an HSV conversion program or the like. Usually, the calculated hue value H is defined as 0 to 360 for the input R, G, B, The unit of saturation value S and brightness value V is defined as 0-255.
なお、本実施形態において、「明度」は特に注釈を設けない限り一般に用いられる「明るさ」の意昧である。以下の記載において、HSV表色系のV(0〜255)を「明度」として用いるが、他の如何なる表色系の明るさを表す単位系を用いてもよい。その際、本実施形態で記載する各種係数等の数値を、改めて算出し直すことは言うまでもない。 In the present embodiment, “brightness” means “brightness” which is generally used unless otherwise noted. In the following description, V (0 to 255) of the HSV color system is used as “brightness”, but a unit system representing the brightness of any other color system may be used. At that time, it goes without saying that numerical values such as various coefficients described in the present embodiment are recalculated.
また、本実施形態において、「色相」は特に注釈を設けない限り一般に用いられる「色」の意味である。以下の記載において、HSV表色系のH(0〜360)を「色相」として用いるが、例えば赤色差値(Cr)や青色差値(Cb)によって表現される色を用いてもよい。その際、本実施形態で記載する各種係数等の数値を、改めて算出し直すことは言うまでもない。ステップS20では、上記のようにして求められたH、S、Vの値が色情報として取得される。
<占有率算出処理1>
次に、ステップS21では、占有率算出処理が行われる。図15のフローチャートを参照して、占有率算出処理について説明する。
In the present embodiment, “hue” means “color” that is generally used unless otherwise noted. In the following description, H (0 to 360) of the HSV color system is used as “hue”, but for example, a color represented by a red difference value (Cr) or a blue difference value (Cb) may be used. At that time, it goes without saying that numerical values such as various coefficients described in the present embodiment are recalculated. In step S20, the values of H, S, and V obtained as described above are acquired as color information.
<Occupancy rate calculation process 1>
Next, in step S21, an occupation ratio calculation process is performed. The occupation rate calculation process will be described with reference to the flowchart of FIG.
まず、色空問変換処理で算出されたHSV値に基づいて、第2の画像の各画素が、色相と明度の組み合わせからなる所定の階級に分類され、分類された階級毎に累積画素数を算出することによって2次元ヒストグラムが作成される(ステップS30)。 First, each pixel of the second image is classified into a predetermined class composed of a combination of hue and lightness based on the HSV value calculated by the color sky conversion process, and the cumulative number of pixels for each classified class is calculated. A two-dimensional histogram is created by calculation (step S30).
図16に、明度と色相の組み合わせからなる階級を示す。ステップS30では、明度(V)は、明度値が0〜5(v1)、6〜12(v2)、13〜24(v3)、25〜76(v4)、77〜109(v5)、110〜149(v6)、150〜255(v7)の7つの階級に分割される。図16に示すように、最も低明度の階級における明度の範囲よりも、最も高明度の階級における明度の範囲の方が広い。 FIG. 16 shows a class composed of combinations of brightness and hue. In step S30, the lightness (V) is 0-5 (v1), 6-12 (v2), 13-24 (v3), 25-76 (v4), 77-109 (v5), 110-110. It is divided into seven classes of 149 (v6) and 150 to 255 (v7). As shown in FIG. 16, the brightness range in the highest brightness class is wider than the brightness range in the lowest brightness class.
色相(H)は、色相値が0〜39、330〜359の肌色色相領域(H1及びH2)、色相値が40〜160の緑色色相領域(H3)、色相値が161〜250の青色色相領域(H4)、赤色色相領域(H5)の4つの領域に分割される。なお、赤色色相領域(H5)は、撮影シーンの判別への寄与が少ないとの知見から、以下の計算では用いていない。肌色色相領域は、さらに、肌色領域(H1)と、それ以外の領域(H2)に分割される。以下、肌色色相領域(H=0〜39、330〜359)のうち、下記の式(1)を満たす色相’(H)を肌色領域(H1)とし、式(1)を満たさない領域を(H2)とする。
Hue (H) is a skin hue hue area (H1 and H2) with
10<彩度(S)<175;
色相’(H)=色相(H)+60 (0≦色相(H)<300のとき);
色相’(H)=色相(H)−300 (300≦色相(H)<360のとき).
輝度(Y)=R×0.30+G×0.59+B×0.11 (A)
として、
色相’(H)/輝度(Y)<3.0×(彩度(S)/255)+0.7 (1)
従って、第2の画像における階級の数は4×7=28個となる。また、最大の明度値(255)の1割の値以内に、少なくとも3つの階級(v1、v2、v3)を有する。なお、式(A)及び式(1)において明度(V)を用いることも可能である。
10 <saturation (S) <175;
Hue '(H) = Hue (H) +60 (when 0 ≦ hue (H) <300);
Hue ′ (H) = Hue (H) −300 (when 300 ≦ hue (H) <360).
Luminance (Y) = R × 0.30 + G × 0.59 + B × 0.11 (A)
As
Hue '(H) / Luminance (Y) <3.0 × (Saturation (S) / 255) +0.7 (1)
Therefore, the number of classes in the second image is 4 × 7 = 28. Moreover, it has at least three classes (v1, v2, v3) within 10% of the maximum brightness value (255). In addition, it is also possible to use lightness (V) in Formula (A) and Formula (1).
ステップS30の後、第2の画像の各画素が、画面の外縁からの距離と明度の組み合わせからなる所定の階級に分類され、分類された階級毎に累積画素数を算出することによって2次元ヒストグラムが作成される(ステップS31)。 After step S30, each pixel of the second image is classified into a predetermined class consisting of a combination of the distance from the outer edge of the screen and the brightness, and a two-dimensional histogram is calculated by calculating the cumulative number of pixels for each classified class. Is created (step S31).
図17(a)に、ステップS31において、第2の画像の画面の外縁からの距離に応じて分割された3つの領域n1〜n3を示す。領域n1が外枠であり、領域n2が外枠の内側の領域であり.領域n3が第2の画像の中央部の領域である。ここでn1〜n3は略同等の画素数となるように分割することが好ましい。また本実施形態においては3つの分割としたがこれに限定されるものではない。また、ステップS31において、明度は、上述のようにv1〜v7の7つの領域に分割するものとする。図17(b)に、3つの領域n1〜n3と明度の組み合わせからなる階級を示す。図17(b)に示すように、第2の画像を画面の外縁からの距離と明度の組み合わせからなる階級に分類した場合の階級の数は3×7=21個となる。 FIG. 17A shows three regions n1 to n3 divided in step S31 according to the distance from the outer edge of the screen of the second image. Region n1 is the outer frame, region n2 is the inner region of the outer frame,. A region n3 is a central region of the second image. Here, it is preferable that n1 to n3 are divided so as to have substantially the same number of pixels. In the present embodiment, three divisions are used, but the present invention is not limited to this. In step S31, the brightness is divided into seven areas v1 to v7 as described above. FIG. 17B shows a class composed of combinations of three regions n1 to n3 and brightness. As shown in FIG. 17B, the number of classes when the second image is classified into classes composed of combinations of the distance from the outer edge of the screen and the brightness is 3 × 7 = 21.
ステップS30において2次元ヒストグラムが作成されると、明度と色相の組み合わせからなる所定の階級毎に算出された累積画素数の全画素数(N×M個)に占める割合を示す第1の占有率が算出される(ステップS32)。すなわちステップS30とステップS32は第1の占有率算出工程として機能する。 When a two-dimensional histogram is created in step S30, a first occupancy ratio indicating a ratio of the cumulative number of pixels calculated for each predetermined class composed of a combination of brightness and hue to the total number of pixels (N × M) Is calculated (step S32). That is, step S30 and step S32 function as a first occupancy rate calculation step.
明度領域vi、色相領域Hjの組み合わせからなる階級において算出された第1の占有率をRijとすると、各階級における第1の占有率は表1のように表される。 Assuming that the first occupancy calculated in the class composed of the combination of the lightness area vi and the hue area Hj is Rij, the first occupancy in each class is expressed as shown in Table 1.
ステップS31において2次元ヒストグラムが作成されると、画面の外縁からの距離と明度の組み合わせからなる所定の階級毎に算出された累積画素数の全画素数に占める割合を示す第2の占有率が算出され(ステップS33)、本占有率算出処理が終了する。すなわちステップS31とステップS33は第2の占有率算出工程として機能する。 When the two-dimensional histogram is created in step S31, the second occupancy ratio indicating the ratio of the cumulative number of pixels calculated for each predetermined class composed of a combination of the distance from the outer edge of the screen and the brightness to the total number of pixels is obtained. Calculation is performed (step S33), and the occupancy rate calculation process ends. That is, step S31 and step S33 function as a second occupancy rate calculating step.
明度領域vi、画面領域njの組み合わせからなる各階級において算出された第2の占有率をQijとすると、各階級における第2の占有率は表2のように表される。 When the second occupancy calculated in each class composed of the combination of the brightness area vi and the screen area nj is Qij, the second occupancy in each class is expressed as shown in Table 2.
なお、各画素を画面の外縁からの距離、明度及び色相からなる階級に分類し、分類された階級毎に累積画素数を算出することによって3次元ヒストグラムを作成してもよい。以下では、2次元ヒストグラムを用いる方式を採用するものとする。
<指標算出処理1>
次に、図18のフローチャートを参照して、指標算出処理(図14のステップS22)について説明する。
Note that a three-dimensional histogram may be created by classifying each pixel into a class consisting of a distance from the outer edge of the screen, brightness, and hue, and calculating the cumulative number of pixels for each class. Hereinafter, a method using a two-dimensional histogram is adopted.
<Indicator calculation process 1>
Next, the index calculation process (step S22 in FIG. 14) will be described with reference to the flowchart in FIG.
まず、第1の指標算出工程であるステップS40では、占有率算出処理において階級毎に算出された第1の占有率に、撮影条件に応じて予め設定された係数(第1の係数)を乗算して和をとることにより、撮影シーンを特定するための指標1が算出される。指標1は、主要被写体のオーバー度を表す指標であり、「主要被写体がオーバー」と判別されるべき画像のみを他の撮影シーンから分離するためのものである。 First, in step S40, which is a first index calculation step, the first occupancy calculated for each class in the occupancy ratio calculation process is multiplied by a coefficient (first coefficient) set in advance according to the shooting conditions. As a result, the index 1 for specifying the shooting scene is calculated. The index 1 is an index representing the degree of overshoot of the main subject, and is for separating only the image that should be determined as “the main subject is over” from other shooting scenes.
次いで、第2の指標算出工程であるステップS41では、同じく階級毎に算出された第2の占有率に、撮影条件に応じて予め設定された第1の係数とは異なる係数(第2の係数)を乗算して和をとることにより、撮影シーンを特定するための指標2が算出される。指標2は、空色高明度、顔色低明度等の逆光撮影時の特徴を複合的に表す指標であり、「逆光」、「主要被写体がアンダー」と判別されるべき画像のみを他の撮影シーンから分離するためのものである。
Next, in step S41, which is a second index calculation step, a coefficient different from the first coefficient set in advance according to the shooting conditions (second coefficient) is similarly calculated for the second occupation ratio calculated for each class. ) To obtain the sum, the
以下、指標1及び指標2の算出方法について詳細に説明する。
Hereinafter, the calculation method of the index 1 and the
表3に、指標1を算出するために必要な第1の係数を階級別に示す。表3に示された各階級の係数は、表1に示した各階級の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。 Table 3 shows the first coefficient necessary for calculating the index 1 by class. The coefficient of each class shown in Table 3 is a weighting coefficient by which the first occupation ratio Rij of each class shown in Table 1 is multiplied, and is set in advance according to the shooting conditions.
表3によると、高明度(v6)の肌色色相領域(H1)に分布する領域から算出される第1の占有率には、正(+)の係数が用いられ、それ以外の色相である青色色相領域から算出される第1の占有率には、負(−)の係数が用いられる。図19は、肌色領域(H1)における第1の係数と、その他の領域(緑色色相領域(H3))における第1の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表3及び図19によると、高明度(V=77〜150)の領域では、肌色領域(H1)における第1の係数の符号は正(+)であり、その他の領域(例えば、緑色色相領域(H3))における第1の係数の符号は負(−)であり、両者の符号が異なっていることがわかる。 According to Table 3, a positive (+) coefficient is used for the first occupancy calculated from the region distributed in the skin color hue region (H1) of high brightness (v6), and the other hue is blue. A negative (−) coefficient is used for the first occupancy calculated from the hue region. FIG. 19 shows a curve (coefficient curve) in which the first coefficient in the skin color region (H1) and the first coefficient in the other region (green hue region (H3)) continuously change over the entire brightness. It is shown. According to Table 3 and FIG. 19, in the region of high brightness (V = 77 to 150), the sign of the first coefficient in the skin color region (H1) is positive (+), and other regions (for example, the green hue region) The sign of the first coefficient in (H3)) is negative (-), and it can be seen that the signs of both are different.
明度領域vi、色相領域Hjにおける第1の係数をCijとすると、指標1を算出するためのHk領域の和は、式(2)のように定義される。 If the first coefficient in the lightness region vi and the hue region Hj is Cij, the sum of the Hk regions for calculating the index 1 is defined as in Expression (2).
従って、H1〜H4領域の和は、下記の式(2−1)〜(2−4)のように表される。 Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (2-1) to (2-4).
H1領域の和=R11×0+R21×0+(中略)…+R71×(−8) (2−1)
H2領域の和=R12×(−2)+R22×(−1)+(中略)
…+R72×(−10) (2−2)
H3領域の和=R13×5+R23×(−2)+(中略)…+R73×(−12)
(2−3)
H4領域の和=R14×0+R24×(−1)+(中略)…+R74×(−12)
(2−4)
指標1は、式(2−1)〜(2−4)で示されたH1〜H4領域の和を用いて、式(3)のように定義される。
H1 region sum = R11 × 0 + R21 × 0 + (omitted)... + R71 × (−8) (2-1)
Sum of H2 regions = R12 × (−2) + R22 × (−1) + (omitted)
... + R72 x (-10) (2-2)
Sum of H3 regions = R13 × 5 + R23 × (−2) + (omitted)... + R73 × (−12)
(2-3)
Sum of H4 region = R14 × 0 + R24 × (−1) + (omitted)... + R74 × (−12)
(2-4)
The index 1 is defined as in Expression (3) using the sum of the H1 to H4 regions shown in Expressions (2-1) to (2-4).
指標1=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.5 (3)
表4に、指標2を算出するために必要な第2の係数を階級別に示す。表4に示された各階級の係数は、表1に示した各階級の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。
Index 1 = sum of H1 region + sum of H2 region + sum of H3 region + sum of H4 region + 1.5 (3)
Table 4 shows the second coefficient necessary for calculating the
表4によると、肌色色相領域(H1)の中間明度に分布する領域(v4、v5)から算出される占有率には負(−)の係数が用いられ、肌色色相嶺域(H1)の低明度(シャドー)領域(v2、v3)から算出される占有率には係数0が用いられる。図20は、肌色領域(H1)における第2の係数を、明度全体にわたって連続的に変化する曲線(係数曲線)として示したものである。表4及び図20によると、肌色色相領域の、明度値が25〜150の中間明度領域の第2の係数の符号は負(−)であり、明度値6〜24の低明度(シャドー)領域の第2の係数は0であり、両領域での係数に大きな違いがあることがわかる。
According to Table 4, a negative (-) coefficient is used for the occupancy calculated from the areas (v4, v5) distributed in the intermediate brightness of the flesh-color hue area (H1), and the flesh-color hue range (H1) is low. A
明度領域vi、色相領域Hjにおける第2の係数をDijとすると、指標2を算出するためのHk領域の和は、式(4)のように定義される。
When the second coefficient in the lightness area vi and the hue area Hj is Dij, the sum of the Hk areas for calculating the
従って、H1〜H4領域の和は、下記の式(4−1)〜(4−4)のように表される。 Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (4-1) to (4-4).
H1領域の和=R11×0+R21×0+(中略)…+R71×2 (4−1)
H2領域の和=R12×(−2)+R22×(−1)+(中略)…+R72×2
(4−2)
H3領域の和=R13×2+R23×1+(中略)…+R73×3 (4−3)
H4領域の和=R14×0+R24×(−1)+(中略)…+R74×3 (4−4)
指標2は、式(4−1)〜(4−4)で示されたH1〜H4領域の和を用いて、式(5)のように定義される。
Sum of H1 regions = R11 × 0 + R21 × 0 + (omitted)... + R71 × 2 (4-1)
Sum of H2 region = R12 × (−2) + R22 × (−1) + (omitted)... + R72 × 2
(4-2)
Sum of H3 regions = R13 × 2 + R23 × 1 + (omitted)... + R73 × 3 (4-3)
Sum of H4 region = R14 × 0 + R24 × (−1) + (omitted)... + R74 × 3 (4-4)
The
指標2=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.7 (5)
指標1及び指標2は、第2の画像の明度と色相の分布量に基づいて算出されるため、画像がカラー画像である場合の撮影シーンの判別に有効である。
Since the index 1 and the
指標1及び指標2が算出されると、第3の指標算出工程であるステップS42で、占有率算出処理において階級毎に算出された第2の占有率に、撮影条件に応じて予め設定された第3の係数(第1の係数、第2の係数とは異なる係数)を乗算して和をとることにより、撮影シーンを特定するための指標3が算出される。指標3は、主要被写体がアンダーな逆光と主要被写体がオーバーな画像間における、画像データの画面の中心と外側の明暗関係の差異を示すものである。
When the index 1 and the
以下、指標3の算出方法について説明する。
Hereinafter, a method for calculating the
表5に、指標3を算出するために必要な第3の係数を階級別に示す。表5に示された各階級の係数は、表2に示した各階級の第2の占有率Qijに乗算する重み係数であり、撮影条件に応じて予め設定されている。
Table 5 shows the third coefficient necessary for calculating the
図21は、画面領域n1〜n3における第3の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。 FIG. 21 shows the third coefficient in the screen areas n1 to n3 as a curve (coefficient curve) that continuously changes over the entire brightness.
明度領域vi、画面領域njにおける第3の係数をEijとすると、指標3を算出するためのnk領域(画面領域nk)の和は、式(6)のように定義される。
When the third coefficient in the brightness area vi and the screen area nj is Eij, the sum of the nk area (screen area nk) for calculating the
従って、n1〜n3領域の和は、下記の式(6−1)〜(6−3)のように表される。 Accordingly, the sum of the n1 to n3 regions is represented by the following formulas (6-1) to (6-3).
n1領域の和=Q11×12+Q21×10+(中略)…+Q71×0 (6−1)
n2領域の和=Q12×5+Q22×3+(中略)…+Q72×0 (6−2)
n3領域の和=Q13×(−1)+Q23×(−4)+(中略)…+Q73×(−8)
(6−3)
指標3は、式(6−1)〜(6−3)で示されたn1〜n3領域の和を用いて、式(7)のように定義される。
Sum of n1 region = Q11 × 12 + Q21 × 10 + (omitted)... + Q71 × 0 (6-1)
Sum of n2 regions = Q12 × 5 + Q22 × 3 + (omitted)... + Q72 × 0 (6-2)
Sum of n3 regions = Q13 × (−1) + Q23 × (−4) + (omitted)... + Q73 × (−8)
(6-3)
The
指標3=n1領域の和+n2領域の和+n3領域の和+0.7 (7)
指標3は、第2の画像の明度の分布位置による構図的な特徴(全体画像の画面の外縁からの距離)に基づいて算出されるため、カラー画像だけでなくモノクロ画像の撮影シーンを判別するのにも有効である。
Since the
また、例えば公知の方法によって検出された焦点検出領域に応じて、画面の外縁からの距離と明度の所定の階級から算出される第2占有率に対して乗算される第3の係数の重みを変えることで、より高精度にシーンを判別する指標を算出することが可能である。 Further, for example, according to the focus detection area detected by a known method, the weight of the third coefficient multiplied by the second occupancy calculated from the distance from the outer edge of the screen and the predetermined class of brightness is set. By changing, it is possible to calculate an index for discriminating a scene with higher accuracy.
指標1〜3が算出されると、第4の指標算出工程であるステップS43で、第2の画像の画面中央部における肌色の平均輝度値と、第2の画像の最大輝度値と平均輝度値との差分値のそれぞれに、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標4が算出される。 When the indices 1 to 3 are calculated, the average brightness value of the skin color at the center of the screen of the second image, the maximum brightness value, and the average brightness value of the second image are obtained in step S43, which is the fourth index calculation step. The index 4 for specifying the shooting scene is calculated by multiplying each of the difference values by a coefficient set in advance according to the shooting conditions.
以下、図22のフローチャートを参照して、指標4の算出処理について詳細に説明する。 Hereinafter, the calculation process of the index 4 will be described in detail with reference to the flowchart of FIG.
まず、第2の画像のRGB(Red、Green、Blue)値から、式(A)を用いて輝度Yが算出される。次いで、第2の画像の画面中央部における肌色領域の平均輝度値x1が算出される(ステップS50)。ここで、画面中央部とは、例えば図17(a)に示した領域n3により構成される領域である。次いで、第2の画像の最大輝度値と平均輝度値との差分値x2=最大輝度値−平均輝度値が算出される(ステップS51)。 First, the luminance Y is calculated from the RGB (Red, Green, Blue) values of the second image using Expression (A). Next, the average luminance value x1 of the skin color area at the center of the screen of the second image is calculated (step S50). Here, the center of the screen is an area constituted by, for example, the area n3 shown in FIG. Next, a difference value x2 between the maximum luminance value and the average luminance value of the second image is calculated (maximum luminance value−average luminance value) (step S51).
次いで、第2の画像の輝度の標準偏差x3が算出され(ステップS52)、画面中央部における平均輝度値x4が算出される(ステップS53)。次いで、第2の画像における肌色領域の最大輝度値Yskin_maxと最小輝度値Yskin_minの差分値と、肌色領域の平均輝度値Yskin_aveとの比較値x5が算出される(ステップS54)。この比較値x5は、下記の式(8−1)のように表される。 Next, the standard deviation x3 of the luminance of the second image is calculated (step S52), and the average luminance value x4 at the center of the screen is calculated (step S53). Next, a comparison value x5 between the difference value between the maximum luminance value Yskin_max and the minimum luminance value Yskin_min of the skin color area in the second image and the average luminance value Yskin_ave of the skin color area is calculated (step S54). This comparison value x5 is expressed as the following formula (8-1).
x5=(Yskin_max−Yskin_min)/2−Yskin_ave
(8−1)
次いで、ステップS50〜S54で算出された値x1〜x5の値の各々に、撮影条件に応じて予め設定された第4の係数を乗算して和をとることにより、指標4が算出され(ステップS55)、指標4算出処理が終了する。指標4は、下記の式(8−2)のように定義される。
x5 = (Yskin_max−Yskin_min) / 2−Yskin_ave
(8-1)
Next, the index 4 is calculated by multiplying each of the values x1 to x5 calculated in steps S50 to S54 by a fourth coefficient that is set in advance according to the shooting conditions to obtain a sum (step 4). S55), the index 4 calculation process ends. The index 4 is defined as the following formula (8-2).
指標4=0.05×x1+1.41×x2+(−0.01)×x3+(−0.01)
×x4+0.01×x5−5.34 (8−2)
この指標4は、第2の画像の画面の構図的な特徴だけでなく、輝度ヒストグラム分布情報を持ち合わせており、特に、主要被写体がオーバーである撮影シーンとアンダー撮影シーンの判別に有効である。
Index 4 = 0.05 × x1 + 1.41 × x2 + (− 0.01) × x3 + (− 0.01)
× x4 + 0.01 × x5−5.34 (8-2)
This index 4 has not only the compositional characteristics of the screen of the second image but also the luminance histogram distribution information, and is particularly effective for discriminating the shooting scene from which the main subject is over and the under shooting scene.
指標4が算出されると、第5の指標算出工程であるステップS44(図18参照)で、指標1、3及び第2の画像の画面中央部における肌色領域の平均輝度値に、撮影条件に応じて予め設定された重み係数を乗算することにより、指標5が算出される。
When the index 4 is calculated, in step S44 (see FIG. 18), which is the fifth index calculation step, the average brightness value of the skin color area in the center of the screen of the
さらに第6の指標算出工程であるステップS45で、指標2、3及び第2の画像の画面中央部における肌色領域の平均輝度値に、撮影条件に応じて予め設定された重み係数を乗算することにより、指標6が算出され、本指標算出処理が終了する。
Further, in step S45, which is the sixth index calculation step, the average luminance value of the skin color area in the center of the screen of the
以下、指標5及び指標6の算出方法について詳細に説明する。
Hereinafter, the calculation method of the index 5 and the
第2の画像の画面中央部における肌色領域の平均輝度値を指標7とする。ここでの画面中央部とは、例えば、図17(a)の領域n2及び領域n3から構成される領域である。このとき、指標5は、指標1、指標3、指標7を用いて式(9)のように定義され、指標6は、指標2、指標3、指標7を用いて式(10)のように定義される。
The average luminance value of the skin color area at the center of the screen of the second image is taken as index 7. Here, the center of the screen is, for example, an area composed of the area n2 and the area n3 in FIG. At this time, the index 5 is defined as in Expression (9) using the index 1,
指標5=0.54×指標1+0.50×指標3+0.01×指標7−0.65 (9)
指標6=0.83×指標2+0.23×指標3+0.01×指標7−1.17(10)
なお、図22における平均輝度値(例えば、全体平均輝度値)の算出方法としては、撮像装置1の各受光部から得られた個別輝度データの単純な加算平均値を求めてもよいし、撮像装置1の測光方式としてよく用いられる中央重点平均測光に類似した、画面中心付近の受光部より得られた輝度データに重み付けを高く、画面の周辺付近の受光部より得られた輝度データに重み付けを低くして加算平均値を求める手法を用いてもよい。また、焦点検出領域に対応した受光部付近より得られた輝度データに重み付けを高くし、焦点検出位置から離れた受光部より得られた輝度データに重み付けを低くして加算平均値を求める手法等を用いてもよい。
<シーン判別1>
図14に戻って、シーン判別を説明する。
Index 5 = 0.54 × Index 1 + 0.50 ×
Note that, as a method of calculating the average luminance value (for example, the overall average luminance value) in FIG. 22, a simple addition average value of the individual luminance data obtained from each light receiving unit of the imaging device 1 may be obtained, or imaging is performed. Similar to the center-weighted average metering that is often used as the metering method of the apparatus 1, the luminance data obtained from the light receiving unit near the center of the screen is highly weighted, and the luminance data obtained from the light receiving unit near the periphery of the screen is weighted. A method of obtaining the average value by lowering may be used. In addition, the luminance data obtained from the vicinity of the light receiving unit corresponding to the focus detection area is increased in weight, and the luminance data obtained from the light receiving unit distant from the focus detection position is reduced in weight to obtain an average value, etc. May be used.
<Scene discrimination 1>
Returning to FIG. 14, the scene discrimination will be described.
指標4〜6が算出されると、これらの指標の値に基づいて撮影シーンが判別される(ステップS23)。表6に、指標4、指標5及び指標6の値による撮影シーンの判別内容を示す。
When the indices 4 to 6 are calculated, the shooting scene is determined based on the values of these indices (step S23). Table 6 shows the details of the shooting scene discrimination based on the values of index 4, index 5, and
図23は、表6に示した判別内容を、指標4〜6の座標系を用いて表した判別マップである。 FIG. 23 is a discrimination map representing the discrimination contents shown in Table 6 using the coordinate system of the indices 4-6.
(階調処理条件設定のフロー)
次に、図24のフローチャートを参照して、第1の画像のガンマ変換処理後の画像に対する階調処理条件設定(図13のステップS9)について説明する。
<階調調整方法選択>
まず、判別された撮影シーンに応じて、ステップS70で第1の画像データのガンマ変換処理後に対する階調調整の方法が決定され、ステップS71で階調調整パラメータが算出されると、ステップS72でそれらのパラメータに応じて補正された階調変換量が算出され、ステップS73で階調処理条件(階調変換曲線)が決定される。なお、本実施形態では、ステップS70とステップS73とにおいて階調調整方法と階調変換量の双方を決定する場合を示すが、階調変換量のみであってもよい。
(Flow of gradation processing condition setting)
Next, the gradation processing condition setting (step S9 in FIG. 13) for the first image after the gamma conversion processing will be described with reference to the flowchart in FIG.
<Tone adjustment method selection>
First, according to the determined shooting scene, a gradation adjustment method for the first image data after the gamma conversion process is determined in step S70, and when a gradation adjustment parameter is calculated in step S71, in step S72. A gradation conversion amount corrected according to these parameters is calculated, and a gradation processing condition (gradation conversion curve) is determined in step S73. In this embodiment, the case where both the gradation adjustment method and the gradation conversion amount are determined in steps S70 and S73 is shown, but only the gradation conversion amount may be used.
ステップS70で階調調整方法を決定する場合、図25に示すように、撮影シーンが順光である場合は階調調整方法A(図25(a))が選択され、逆光である場合は階調調整方法B(図25(b))が選択され、主要被写体がオーバーである場合は階調調整方法C(図25(c))が選択され、アンダーである場合は、階調調整方法B(図25(b))が選択される。 When determining the gradation adjustment method in step S70, as shown in FIG. 25, the gradation adjustment method A (FIG. 25 (a)) is selected when the shooting scene is front light, and when it is back light, the floor is adjusted. When the tone adjustment method B (FIG. 25B) is selected and the main subject is over, the tone adjustment method C (FIG. 25C) is selected, and when it is under, the tone adjustment method B is selected. (FIG. 25B) is selected.
なお本実施形態においては、第1の画像のガンマ変換後の画像へ適用する階調変換曲線を決定する方法を示したが、階調変換工程をガンマ変換の前に実施する場合には、図25の階調変換曲線に対して、ガンマ変換の逆変換を施した曲線で階調変換が行われる。
<階調調整パラメータ算出>
階調調整方法が決定されると、ステップS71では、指標算出処理で算出された各指標に基づいて、階調調整に必要なパラメータが算出される。すなわち、ステップS71は階調調整パラメータ算出工程として機能する。以下、階調調整パラメータの算出方法について説明する。なお、以下では、8bitの撮影画像データは16bitへと事前に変換されているものとし、撮影画像データの値の単位は16bitであるものとする。
In the present embodiment, the method for determining the gradation conversion curve to be applied to the image after the gamma conversion of the first image has been described. However, when the gradation conversion process is performed before the gamma conversion, FIG. The gradation conversion is performed on a curve obtained by performing inverse conversion of gamma conversion on the 25 gradation conversion curves.
<Calculation of gradation adjustment parameters>
When the gradation adjustment method is determined, in step S71, parameters necessary for gradation adjustment are calculated based on each index calculated in the index calculation process. That is, step S71 functions as a gradation adjustment parameter calculation step. Hereinafter, a method for calculating the gradation adjustment parameter will be described. In the following description, it is assumed that the 8-bit captured image data is converted into 16 bits in advance, and the unit of the value of the captured image data is 16 bits.
階調調整に必要なパラメータ(階調調整パラメータ)として、下記のP1〜P9のパラメータが算出される。 As parameters necessary for gradation adjustment (gradation adjustment parameters), the following parameters P1 to P9 are calculated.
P1:撮影画面全体の平均輝度
P2:ブロック分割平均輝度
P3:肌色領域(H1)の平均輝度
P4:輝度補正値1=P1−P2
P5:再現目標修正値=輝度再現目標値(30360)−P4
P6:オフセット値1=P5−P1
P7:キー補正値
P7’:キー補正値2
P8:輝度補正値2
P9:オフセット値2=P5−P8−P1
ここで、図26及び図27を参照して、パラメータP2(ブロック分割平均輝度)の算出方法について説明する。
P1: Average luminance of the entire photographing screen P2: Block division average luminance P3: Average luminance of the skin color area (H1) P4: Luminance correction value 1 = P1-P2
P5: Reproduction target correction value = luminance reproduction target value (30360) -P4
P6: Offset value 1 = P5-P1
P7: Key correction value P7 ':
P8:
P9: Offset
Here, a method for calculating the parameter P2 (block division average luminance) will be described with reference to FIGS.
まず、画像データを正規化するために、CDF(累積密度関数)を作成する。次いで、得られたCDFから最大値と最小値を決定する。この最大値と最小値は、RGB毎に求める。ここで、求められたRGB毎の最大値と最小値を、それぞれ、Rmax、Rmin、Gmax、Gmin、Bmax、Bminとする。 First, in order to normalize image data, a CDF (cumulative density function) is created. Next, the maximum value and the minimum value are determined from the obtained CDF. The maximum value and the minimum value are obtained for each RGB. Here, the maximum value and the minimum value obtained for each RGB are Rmax, Rmin, Gmax, Gmin, Bmax, and Bmin, respectively.
次いで、画像データの任意の画素(Rx、Gx、Bx)に対する正規化画像データを算出する。RプレーンにおけるRxの正規化データをRpoint、GプレーンにおけるGxの正規化データをGpoint、BプレーンにおけるBxの正規化データをBpointとすると、正規化データRpoint、Gpoint、Bpointは、それぞれ、式(11)〜式(13)のように表される。 Next, normalized image data for any pixel (Rx, Gx, Bx) of the image data is calculated. Assuming that Rx normalization data in the R plane is Rpoint, Gx normalization data in the G plane is Gpoint, and Bx normalization data in the B plane is Bpoint, the normalization data Rpoint, Gpoint, and Bpoint are expressed by the following equation (11), respectively. ) To Expression (13).
Rpoint={(Rx−Rmin)/(Rmax−Rmin)}×65535
(11);
Gpoint={(Gx−Gmin)/(Gmax−Gmin)}×65535
(12);
Bpoint={(Bx−Bmin)/(Bmax−Bmin)}×65535
(13).
次いで、式(14)により画素(Rx、Gx、Bx)の輝度Npointを算出する。
Rpoint = {(Rx−Rmin) / (Rmax−Rmin)} × 65535
(11);
Gpoint = {(Gx−Gmin) / (Gmax−Gmin)} × 65535
(12);
Bpoint = {(Bx−Bmin) / (Bmax−Bmin)} × 65535
(13).
Next, the luminance Npoint of the pixel (Rx, Gx, Bx) is calculated by Expression (14).
Npoint=(Bpoint+Gpoint+Rpoint)/3 (14)
図26(a)は、正規化する前のRGB画素の輝度の度数分布(ヒストグラム)である。図26(a)において、横軸は輝度、縦軸は画素の頻度である。このヒストグラムは、RGB毎に作成する。輝度のヒストグラムが作成されると、式(11)〜式(13)により、画像データに対し、プレーン毎に正規化を行う。図26(b)は、式(14)により算出された輝度のヒストグラムを示す。撮影画像データが65535で正規化されているため、各画素は、最大値が65535で最小値が0の間で任意の値をとる。
Npoint = (Bpoint + Gpoint + Rpoint) / 3 (14)
FIG. 26A shows a frequency distribution (histogram) of luminance of RGB pixels before normalization. In FIG. 26A, the horizontal axis represents luminance, and the vertical axis represents pixel frequency. This histogram is created for each RGB. When the luminance histogram is created, normalization is performed for each plane with respect to the image data by Expressions (11) to (13). FIG. 26B shows a histogram of luminance calculated by the equation (14). Since the captured image data is normalized by 65535, each pixel takes an arbitrary value between the maximum value of 65535 and the minimum value of 0.
図26(b)に示す輝度ヒストグラムを所定の範囲で区切ってブロックに分割すると、図26(c)に示すような度数分布が得られる。図26(c)において、横軸はブロック番号(輝度)、縦軸は頻度である。 When the luminance histogram shown in FIG. 26B is divided into blocks divided by a predetermined range, a frequency distribution as shown in FIG. 26C is obtained. In FIG. 26C, the horizontal axis is the block number (luminance), and the vertical axis is the frequency.
次いで、図26(c)に示された輝度ヒストグラムから、ハイライト、シャドー領域を削除する処理を行う。これは、白壁や雪上シーンでは、平均輝度が非常に高くなり、暗闇のシーンでは平均輝度は非常に低くなっているため、ハイライト、シャドー領域は、平均輝度制御に悪影響を与えてしまうことによる。そこで、図26(c)に示した輝度ヒストグラムのハイライト領域、シャドー領域を制限することによって、両領域の影響を減少させる。図27(a)(または図26(c))に示す輝度ヒストグラムにおいて、高輝度領域(ハイライト領域)及び低輝度領域(シャドー領域)を削除すると、図27(b)のようになる。 Next, a process of deleting highlight and shadow areas is performed from the luminance histogram shown in FIG. This is because the average brightness is very high in white walls and snow scenes, and the average brightness is very low in dark scenes, so highlights and shadow areas adversely affect average brightness control. . Therefore, by limiting the highlight area and the shadow area of the luminance histogram shown in FIG. 26C, the influence of both areas is reduced. When the high luminance region (highlight region) and the low luminance region (shadow region) are deleted from the luminance histogram shown in FIG. 27A (or FIG. 26C), the result is as shown in FIG.
次いで、図27(c)に示すように、輝度ヒストグラムにおいて、頻度が所定の閾値より大きい領域を削除する。これは、頻度が極端に多い部分が存在すると、この部分のデータが、撮影画像全体の平均輝度に強く影響を与えてしまうため、誤補正が生じやすいことによる。そこで、図27(c)に示すように、輝度ヒストグラムにおいて、閾値以上の画素数を制限する。図27(d)は、画素数の制限処理を行った後の輝度ヒストグラムである。 Next, as shown in FIG. 27C, an area having a frequency greater than a predetermined threshold is deleted from the luminance histogram. This is because if there is a part having an extremely high frequency, the data in this part strongly affects the average luminance of the entire captured image, and thus erroneous correction is likely to occur. Therefore, as shown in FIG. 27C, the number of pixels equal to or greater than the threshold is limited in the luminance histogram. FIG. 27D is a luminance histogram after the pixel number limiting process is performed.
正規化された輝度ヒストグラムから、高輝度領域及び低輝度領域を削除し、さらに、累積画素数を制限することによって得られた輝度ヒストグラム(図27(d))の各ブロック番号と、それぞれの頻度に基づいて、輝度の平均値を算出したものがパラメータP2である。 Each block number of the luminance histogram (FIG. 27 (d)) obtained by deleting the high luminance region and the low luminance region from the normalized luminance histogram and further limiting the number of accumulated pixels, and the respective frequencies The parameter P2 is obtained by calculating the average luminance based on the above.
パラメータP1は、画像データ全体の輝度の平均値であり、パラメータP3は、画像データのうち肌色領域(H1)の輝度の平均値である。パラメータP7のキー補正値、パラメータP7’のキー補正値2、パラメータP8の輝度補正値2は、それぞれ、式(15)、式(16)、式(17)のように定義される。
The parameter P1 is an average value of luminance of the entire image data, and the parameter P3 is an average value of luminance of the skin color area (H1) in the image data. The key correction value of the parameter P7, the
P7(キー補正値)={P3−((指標6/6)×18000+22000)}
/24.78 (15)
P7’(キー補正値2)={P3−((指標4/6)×10000+30000)}
/24.78 (16)
P8(輝度補正値2)=(指標5/6)×17500 (17)
図24に戻り、階調調整パラメータが算出されると、ステップS73では、その算出された階調調整パラメータに基づいて、撮影画像データに対する階調変換曲線の決定、すなわち階調処理条件が設定される。しかしながらステップS73で階調変換曲線を決定する前に、ステップS72で撮影条件に基づく階調変換量を算出し、階調調整の抑制を行う。
P7 (key correction value) = {P3-((
/24.78 (15)
P7 ′ (key correction value 2) = {P3-((index 4/6) × 10000 + 30000)}
/24.78 (16)
P8 (Luminance correction value 2) = (Index 5/6) × 17500 (17)
Returning to FIG. 24, when the tone adjustment parameter is calculated, in step S73, determination of the tone conversion curve for the photographed image data, that is, tone processing conditions are set based on the calculated tone adjustment parameter. The However, before determining the gradation conversion curve in step S73, the gradation conversion amount based on the shooting conditions is calculated in step S72 to suppress gradation adjustment.
具体的には、既に判別されたシーンに応じて、階調調整パラメータから第1階調変換量Xが選択され、撮影条件に基づき第2階調変換量Yが算出される(ステップS72)。すなわち、ステップS72は階調変換量算出工程として機能する。撮影条件に基づく第2階調変換量Yの算出については、後述する。 Specifically, the first gradation conversion amount X is selected from the gradation adjustment parameters according to the already determined scene, and the second gradation conversion amount Y is calculated based on the shooting conditions (step S72). That is, step S72 functions as a gradation conversion amount calculation step. The calculation of the second gradation conversion amount Y based on the shooting conditions will be described later.
次いで、既に決定された階調調整方法に対応して予め設定された複数の階調変換曲線の中から、算出された第2階調変換量Yに対応する階調変換曲線が選択(決定)される(ステップS73)。あるいは、第2階調変換量Yに基づいて、階調変換曲線を算出するようにしてもよい。 Next, a gradation conversion curve corresponding to the calculated second gradation conversion amount Y is selected (determined) from a plurality of gradation conversion curves set in advance corresponding to the already determined gradation adjustment method. (Step S73). Alternatively, the gradation conversion curve may be calculated based on the second gradation conversion amount Y.
階調変換曲線が決定されると、階調処理条件設定は終了する。
<階調変換量算出>
次に撮影条件に応じた階調変換量の抑制処理(ステップS72での階調変換量の算出)について説明する。撮影シーンに応じた階調調整パラメータからの第1の階調変換量Xの選択については、後で述べる。ここでは既に第1の階調変換量Xが選択されたものとして説明する。
When the gradation conversion curve is determined, the gradation processing condition setting ends.
<Calculation of gradation conversion amount>
Next, the gradation conversion amount suppression processing according to the shooting conditions (calculation of the gradation conversion amount in step S72) will be described. The selection of the first gradation conversion amount X from the gradation adjustment parameter corresponding to the shooting scene will be described later. Here, it is assumed that the first gradation conversion amount X has already been selected.
撮影条件としては、既に少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」が取得されている。ここで画像の状態のみに基づいて階調変換処理が決定されると、ユーザの意図に沿わない画像が得られる恐れがある。例えば、「露出モード」でオートブラケット撮影が選ばれている場合や、「撮影タイプ」で夜景の撮影が選ばれている場合など、ユーザの意図に合わせて自動的な階調の補正は控えめにした方がよい。 As imaging conditions, at least “ISO speed rate”, “exposure mode”, or “imaging type” has already been acquired. Here, if the gradation conversion process is determined based only on the state of the image, there is a possibility that an image that does not match the user's intention may be obtained. For example, when auto bracketing is selected in “Exposure Mode”, or when shooting night scenes is selected in “Shooting Type”, automatic gradation correction to the user's intention is conservative. You should do it.
また「ISOスピードレイト」が高感度の設定になっている場合は、過度にノイズが増加することのないように階調の補正を控えめにした方がよい。 In addition, when “ISO speed rate” is set to high sensitivity, it is better to conserve gradation correction so that noise does not increase excessively.
具体的な階調変換処理による補正の抑制方法としては、選択された第1の階調変換量Xに対して、第2の階調変換量Yを次の(18)式によって算出する。 As a specific method of suppressing correction by gradation conversion processing, the second gradation conversion amount Y is calculated by the following equation (18) for the selected first gradation conversion amount X.
Y=0 (|X|<|b|)
Y=a×(X−|b|) (|X|>|b|,X>0)
Y=a×(X+|b|) (|X|>|b|,X<0) (18)
|b|は変換量閾値、aは1以下の係数であり、いずれも予め定められた定数である。
Y = 0 (| X | <| b |)
Y = a × (X− | b |) (| X |> | b |, X> 0)
Y = a × (X + | b |) (| X |> | b |, X <0) (18)
| B | is a conversion amount threshold, a is a coefficient of 1 or less, and both are predetermined constants.
aとbの値を適切に定めておくことにより、階調変換処理の抑制の程度を制御することができる。すなわち、階調変換量Yを小さくするほど補正量が小さくなり、ゼロで補正なしとなる。 By appropriately determining the values of a and b, the degree of suppression of gradation conversion processing can be controlled. That is, the smaller the gradation conversion amount Y, the smaller the correction amount, and zero means no correction.
例えば「露出モード」でオートブラケット撮影が選ばれている場合には、階調変換量を実質的に0に近くなるよう設定することが好ましい。また「露出モード」でマニュアルが選ばれている場合や、「撮影タイプ」で夜景の撮影が選ばれている場合などには、適切な補正量となるように上の(18)式のa、bの値を設定する。 For example, when auto bracket shooting is selected in the “exposure mode”, it is preferable to set the gradation conversion amount to be substantially close to zero. In addition, when “Manual” is selected in “Exposure Mode”, or when shooting a night scene is selected in “Shooting Type”, a, Set the value of b.
また「ISOスピードレイト」については、その設定値により(18)式のa、bの値が変わって変換量が調整されるような設定が好ましい。例えば、ISOスピードレイトが高くなるにつれて、|b|の値を大きくするか、またはaの値を0に近づける、あるいはその両方を行うことが望ましい。 The “ISO speed rate” is preferably set so that the conversion amount is adjusted by changing the values of a and b in the equation (18) according to the set value. For example, it is desirable to increase the value of | b | and / or to bring the value of a closer to 0 as the ISO speed rate increases.
また、「ISOスピードレイト」、「露出モード」、「撮影タイプ」ともに補正を抑制する方向の設定であった場合、そのうち最大の抑制量となるような階調変換量Yが算出されることが望ましい。 In addition, when the “ISO speed rate”, “exposure mode”, and “shooting type” are set to suppress correction, the gradation conversion amount Y that is the maximum suppression amount may be calculated. desirable.
また、Exif情報としては、他にも撮影者の意図を反映した情報として、「露出プログラム」、「測光方式」、「ホワイトバランス」、「ゲイン制御」、「撮影コントラスト」、「撮影彩度」、「撮影シャープネス」などから、適宜、撮影条件を取得し、第2変換量算出に反映させてもよい。 The Exif information includes other information reflecting the photographer's intentions, such as “exposure program”, “photometry”, “white balance”, “gain control”, “shooting contrast”, and “shooting saturation”. From the “shooting sharpness”, the shooting conditions may be acquired as appropriate and reflected in the calculation of the second conversion amount.
このように、撮影条件に基づいて、選択された第1の階調変換量Xから抑制された第2の階調変換量Yを算出し、次の階調処理条件の決定に移る。
<シーンごとの階調処理条件設定>
以下、各撮影シーン(光源条件及び露出条件)ごとに、階調変換曲線の決定方法(ステップS73での階調処理条件の決定)について説明する。
In this way, the second gradation conversion amount Y suppressed from the selected first gradation conversion amount X is calculated based on the shooting conditions, and the process proceeds to determination of the next gradation processing condition.
<Setting gradation processing conditions for each scene>
Hereinafter, a method for determining a gradation conversion curve (determination of gradation processing conditions in step S73) for each shooting scene (light source condition and exposure condition) will be described.
〈順光の場合〉
撮影シーンが順光である場合、パラメータP6を第1の階調変換量Xとして選択する。パラメータP6=P1−P5なので、X=P6とするということは、第2の階調変換量Y=Xであれば、P1をP5と一致させるオフセット補正(8bit値の平行シフト)を下記の式(19)により行うことである。
<For direct light>
If the photographic scene is front light, the parameter P6 is selected as the first gradation conversion amount X. Since the parameter P6 = P1-P5, X = P6 means that if the second gradation conversion amount Y = X, offset correction (parallel shift of 8-bit value) for matching P1 with P5 is performed as follows: (19).
出力画像のRGB値=入力画像のRGB値+Y (19)
但し、撮影条件によりYがXでなく抑制されている場合であれば、補正量はY=P6の場合よりも小さめとなる。
RGB value of output image = RGB value of input image + Y (19)
However, if Y is not X but is controlled by the shooting conditions, the correction amount is smaller than that when Y = P6.
従って、撮影シーンが順光の場合、図25(a)に示す複数の階調変換曲線の中から、式(19)に対応する階調変換曲線が選択される。または、式(19)に基づいて階調変換曲線を算出(決定)してもよい。 Therefore, when the photographic scene is front light, a gradation conversion curve corresponding to Expression (19) is selected from a plurality of gradation conversion curves shown in FIG. Alternatively, the gradation conversion curve may be calculated (determined) based on Expression (19).
〈逆光の場合〉
撮影シーンが逆光である場合、パラメータP7(キー補正値)を第1の階調変換量Xとして選択する。従ってXから算出した第2の階調変換量Yに基づいて、図25(b)に示す複数の階調変換曲線の中から、式(18)に示すYに対応する階調変換曲線が選択される。図25(b)の階調変換曲線の具体例を図28に示す。Yの値と、選択される階調変換曲線の対応関係を以下に示す。
<Backlight>
When the shooting scene is backlit, the parameter P7 (key correction value) is selected as the first gradation conversion amount X. Therefore, based on the second gradation conversion amount Y calculated from X, the gradation conversion curve corresponding to Y shown in Expression (18) is selected from the plurality of gradation conversion curves shown in FIG. Is done. A specific example of the gradation conversion curve in FIG. 25B is shown in FIG. The correspondence between the Y value and the selected gradation conversion curve is shown below.
−50<Y<+50 の場合→L3
+50≦Y<+150 の場合→L4
+150≦Y<+250 の場合→L5
−150<Y≦−50 の場合→L2
−250<Y≦−150 の場合→L1
なお、撮影シーンが逆光の場合、この階調変換処理とともに、覆い焼き処理を併せて行うことが好ましい。この場合、逆光度を示す指標6に応じて覆い焼き処理の程度も調整されることが望ましい。
When −50 <Y <+ 50 → L3
When + 50 ≦ Y <+ 150 → L4
When + 150 ≦ Y <+ 250 → L5
When −150 <Y ≦ −50 → L2
When −250 <Y ≦ −150 → L1
When the shooting scene is backlit, it is preferable to perform a dodging process together with the gradation conversion process. In this case, it is desirable to adjust the degree of dodging processing according to the
〈アンダーの場合〉
撮影シーンがアンダーである場合、パラメータP7’(キー補正値2)を第1の階調変換量Xとして選択する。従ってXから算出した第2の階調変換量Yに基づいて、図25(b)に示す複数の階調変換曲線の中から、式(18)に示すYに対応する階調変換曲線が選択される。具体的には、撮影シーンが逆光の場合の階調変換曲線の選択方法と同様に、図28に示す階調変換曲線の中から、Yの値に対応した階調変換曲線が選択される。なお、撮影シーンがアンダーである場合は、逆光の場合に示したような覆い焼き処理は行わない。
<In case of under>
When the shooting scene is under, the parameter P7 ′ (key correction value 2) is selected as the first gradation conversion amount X. Therefore, based on the second gradation conversion amount Y calculated from X, the gradation conversion curve corresponding to Y shown in Expression (18) is selected from the plurality of gradation conversion curves shown in FIG. Is done. Specifically, the gradation conversion curve corresponding to the Y value is selected from the gradation conversion curves shown in FIG. 28 in the same manner as the method for selecting the gradation conversion curve when the shooting scene is backlit. When the shooting scene is under, the dodging process as shown in the case of backlight is not performed.
〈主要被写体がオーパーの場合〉
主要被写体がオーパーである場合、パラメータP9を第1の階調変換量Xとして選択する。従ってXから算出した第2の階調変換量Yに基づいて、オフセット補正(8bit値の平行シフト)を式(20)により行う。
<When main subject is over>
If the main subject is over, the parameter P9 is selected as the first gradation conversion amount X. Therefore, based on the second gradation conversion amount Y calculated from X, offset correction (parallel shift of 8-bit value) is performed by Expression (20).
出力画像のRGB値=入力画像のRGB値十Y (20)
従って、主要被写体がオーパーの場合、図25(c)に示す複数の階調変換曲線の中から、式(18)に示すYに対応する階調変換曲線が選択される。または、式(20)に基づいて階調変換曲線を算出(決定)してもよい。なお、式(20)のYの値が、予め設定された所定値αを上回った場合、図32に示す曲線L1〜L5の中から、キー補正値がY−αに対応する曲線が選択される。
RGB value of output image = RGB value of input image + Y (20)
Therefore, when the main subject is an over, a gradation conversion curve corresponding to Y shown in Expression (18) is selected from a plurality of gradation conversion curves shown in FIG. Alternatively, the gradation conversion curve may be calculated (determined) based on Expression (20). When the value Y in Expression (20) exceeds a preset value α, a curve corresponding to the key correction value Y−α is selected from the curves L1 to L5 shown in FIG. The
なお、本実施形熊では、実際に撮影画像データに対して階調変換処理を施す場合、上述の階調変換処理条件を16bitから8bitへ変更するものとする。 In the present embodiment bear, when the gradation conversion process is actually performed on the captured image data, the above-described gradation conversion process condition is changed from 16 bits to 8 bits.
(第2の実施形態)
次に、本発明に係る第2の実施形態(画像処理装置)における構成について説明する。
(Second Embodiment)
Next, the configuration of the second embodiment (image processing apparatus) according to the present invention will be described.
図29には、本実施形態に係る画像処理装置2の外観構成の一例を示す。また図30には、画像処理装置2の概略構成をブロック図で示す。
FIG. 29 shows an example of the external configuration of the
(画像処理装置2の外観構成)
図29において、画像処理装置2は、筐体11の一側面に感光材料を装填する装填部13を備えている。筐体11の内部には、感光材料に露光する露光処理部86と、露光された感光材料を現像処理してプリントを作成するプリント作成部16を備えている。筐体11の他側面には、プリント作成部16で作成されたプリントを排出するトレー17を備えている。
(External configuration of image processing apparatus 2)
In FIG. 29, the
筐体11の上部には、表示装置としてのCRT(CathodeRayTube)85、透過原稿を読み込む装置であるフィルムスキャナ部81、反射原稿入力装置82、操作部71を備えている。さらに筐体11には、各種デジタル記録媒体に記録された画像情報を読み取り可能な画像読み込み部14、各種デジタル記録媒体に画像信号を書き込み可能な画像書き込み部15を備え、また筐体11の内部には、これらの各部を制御する制御部72を備えている。画像読み込み部14は後述の画像転送手段83を含み、画像書き込み部15は後述の画像搬送部88を含んでいる。
At the top of the
これらの各構成要素はすべてが必要なわけではなく、また一体的に備えられた構造になっている必要もない。何れか一つ以上を画像処理装置2と別体として切り離す、あるいは外部装置として接続するようにしてもよい。
Not all of these components are required, and it is not necessary to have an integrally provided structure. Any one or more may be separated from the
(画像処理装置2の構成)
図30には、本発明の実施形態に係る画像処理装置2の概略構成を示す。画像処理装置2は、図30に示すように、操作部71、制御部72、画像処理部10、フィルムスキャンデータ処理部73、反射原稿スキャンデータ処理部74、画像データ書式解読処理部75、CRT固有処理部76、プリンタ固有処理部A77、プリンタ固有処理部B78、画像データ書式作成処理部79により構成される。
(Configuration of the image processing apparatus 2)
FIG. 30 shows a schematic configuration of the
フィルムスキャンデータ処理部73は、フィルムスキャナ部81から入力された画像データに対し、フィルムスキャナ部81固有の校正操作、ネガポジ反転(ネガ原稿の場合)、ゴミキズ除去、コントラスト調整、粒状ノイズ除去、鮮鋭化強調等の処理を施し、処理済の画像データを画像処理部10に出力する。また、フィルムサイズ、ネガポジ種別、フィルムに光学的あるいは磁気的に記録された主要被写体に関わる情報、撮影条件に関する情報(例えば、APSの記載情報内容)等も併せて画像処理部10に出力する。
The film scan
反射原稿スキャンデータ処理部74は、反射原稿入力装置82から入力された画像データに対し、反射原稿入力装置82固有の校正操作、ネガポジ反転(ネガ原稿の場合)、ゴミキズ除去、コントラスト調整、ノイズ除去、鮮鋭化強調等の処理を施し、処理済の画像データを画像処理部10に出力する。
The reflection document scan
画像データ書式解読処理部75は、画像転送手段83及び/または通信手段(入力)84から入力された画像データに対し、その画像データのデータ書式に従って、必要に応じて圧縮符号の復元、色データの表現方法の変換等の処理を施し、画像処理部10内の演算に適したデータ形式に変換し、画像処理部10に出力する。
The image data format
また、画像データ書式解読処理部75は、操作部71、通信手段(入力)84、画像転送手段83の何れかから出力画像の条件が指定された場合、その指定された情報を検出し、画像処理部10に出力する。なお、画像転送手段83により指定される出力画像の条件についての情報は、画像転送手段83が取得した画像データのヘッダ情報、タグ情報に埋め込まれている。
In addition, when an output image condition is specified from any of the operation unit 71, the communication unit (input) 84, and the image transfer unit 83, the image data format
画像処理部10は、操作部71または制御部72の指令に基づいて、フィルムスキャナ部81、反射原稿入力装置82、画像転送手段83、通信手段(入力)84の何れかから受け取った画像データに対し、後述の画像処理(図14、図15、図18及び図24参照)を施して、出力媒体上での鑑賞に最適化された画像形成用のデジタル画像データを生成し、CRT固有処理部76、プリンタ固有処理部A77、プリンタ固有処理部B78、画像データ書式作成処理部79の何れかに出力する。
Based on an instruction from the operation unit 71 or the
画像処理部10の内部構成については、後で図11を用いて説明する。
The internal configuration of the
CRT固有処理部76は、画像処理部10から入力された画像データに対して、必要に応じて画素数変更やカラーマッチング等の処理を施し、制御情報等表示が必要な情報と合成した表示用の画像データをCRT85に出力する。
The CRT
プリンタ固有処理部A77は、必要に応じてプリンタ固有の校正処理、カラーマッチング、画素数変更等の処理を行い、処理済の画像データを露光処理部86に出力する。
The printer-specific processing unit A77 performs printer-specific calibration processing, color matching, and pixel number change processing as necessary, and outputs processed image data to the
本発明の画像処理装置2に、外部プリンタ87が接続可能な場合には、接続するプリンタ装置毎にプリンタ固有処理部B78が備えられている。このプリンタ固有処理部B78は、プリンタ固有の校正処理、カラーマッチング、画素数変更等の処理を施し、処理済の画像データを外部プリンタ87に出力する。
When an external printer 87 can be connected to the
画像データ書式作成処理部79は、画像処理部10から入力された画像データに対して、必要に応じてJPEG、TIFF、ビットマップ等に代表される各種の汎用画像フォーマットへの変換を施し、処理済の画像データを画像搬送部88や通信手段(出力)89に出力する。
The image data format
なお、図30に示したフィルムスキャンデータ処理部73、反射原稿スキャンデータ処理部74、画像データ書式解読処理部75、画像処理部10、CRT固有処理部76、プリンタ固有処理部A77、プリンタ固有処理部B78、画像データ書式作成処理部79、という区分は、画像処理装置2の機能の理解を助けるために設けた区分であり、必ずしも物理的に独立したデバイスとして実現される必要はなく、例えば、単一のCPUによるソフトウエア処理の種類の区分として実現されてもよい。
Note that the film scan
(画像処理部10の内部構成)
図11に、画像処理部10の内部構成を示す。画像処理部10は、画像処理装置2の入力画像に対して、シーン判別に基づく階調の補正動作を制御するものであり、画像取得、シーン判別、階調処理条件設定などの一連の処理を実行する。本実施形態では入力画像が撮影画像データであるとし、図11を用いて、画像処理部10の内部構成を説明する。
(Internal configuration of the image processing unit 10)
FIG. 11 shows an internal configuration of the
図11に示すように、画像処理部10は、第1画像取得部101、第2画像取得部102、占有率算出部103、指標算出部104、シーン判別部105、階調処理条件設定部107、そして階調変換処理部108により構成される。
As shown in FIG. 11, the
第1画像取得部101は、各入力データ処理部からの入力画像データを取得する。入力画像は撮影画像データであるので、例えば画像転送手段83あるいは通信手段84を経て画像データ書式解読処理部75に入力された撮影画像データが、その画像データのデータ書式に従って、必要に応じて圧縮符号の復元、データの表現方法の変換等の処理が施され、画像処理部10によって第1の画像として取得される。撮影画像データは通常撮影時にJPEG画像形式などのノンリニア画像に変換され、記録されている。ここではノンリニア画像に変換後の画像を第1の画像として取得したものとする。もちろん、撮影時のリニア画像(RAW画像)を取得してもかまわない。
The first
また第1画像取得部101は、入力画像から、例えば撮影時に記録されるExif情報などを読み出し、撮影時における撮影条件も合わせて取得する。すなわち、第1画像取得部101は撮影条件取得手段としても機能する。本実施形態では取得する撮影条件は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む。取得した第1の画像の画像データ、及び撮影条件は画像処理部10内のメモリ(不図示)に保持される。
Further, the first
第2画像取得部102は、第1の実施形態の場合と同様に第2の画像取得手段として機能する。取得した第1の画像から、実質的に縮小された第2の画像を取得することになるのも同様であり、説明は省略する。
The second
以下、第1の実施形態(撮像装置の場合)と同様の機能を有する構成要素については、説明を簡略にする。 Hereinafter, description of the components having the same functions as those of the first embodiment (in the case of the imaging apparatus) will be simplified.
占有率算出部103は、第1の占有率算出手段として機能し、第2の画像の画像データに対して取得した色情報に基づいて、画像を明度と色相の組み合わせからなる所定の階級に分類し、分類された階級毎に各階級に属する画素が画像全体に占める割合を示す第1の占有率を算出する。
The occupancy
また、占有率算出部103は、第2の占有率算出手段としても機能し、同じく画像を画面の外縁からの距離と明度の組み合わせからなる所定の階級に分類し、各階級毎に第2の占有率を算出する。
The occupancy
占有率算出部103において実行される占有率算出処理について、第1の実施形態と異なるところは、後に図15を参照して説明する。
The occupancy rate calculation process executed in the occupancy
指標算出部104は、第1の指標算出手段、及び第2の指標算出手段として機能する。すなわち、算出された第1の占有率から指標1、及び指標2を算出する。
The
また、指標算出部104は、第3の指標算出手段としても機能する。すなわち、算出された第2の占有率から指標3を算出する。
The
さらに、指標算出部104は、第4の指標算出手段としても機能する。第2の画像の画面中央部における平均輝度値と、最大輝度値と平均輝度値との差分値から指標4を算出する。
Furthermore, the
また、指標算出部104は、第5の指標算出手段として機能する。すなわち、第2の画像の画面中央部における肌色領域の平均輝度値(指標7)と、指標1及び指標3から新たな指標5を算出する。
In addition, the
また、指標算出部104は、第6の指標算出手段として機能する。当該平均輝度値と、指標2及び指標3から新たな指標6を算出する。
In addition, the
指標算出部104において実行される指標算出処理について第1の実施形態の場合と異なるところは、後に図18を参照して詳細に説明する。
The difference between the index calculation process executed in the
シーン判別部105は、指標算出部104で算出された各指標に基づいて、第1の画像の撮影シーンを判別する。すなわち、シーン判別手段として機能する。ここで、撮影シーンとは、順光、逆光、近接フラッシュ等の被写体を撮影する時の光源条件を示しており、主要被写体(主に人物のことを指すが、これに限るものではない)のオーバー度、アンダー度などもこれに含まれる。
The
以上のように、占有率算出部、指標算出部、そしてシーン判別部がシーン判別処理手段として機能するのも、第1の実施形態の場合と同じである。 As described above, the occupation rate calculation unit, the index calculation unit, and the scene determination unit function as scene determination processing means as in the case of the first embodiment.
階調処理条件設定部107は、階調処理条件設定手段として機能する。シーン判別部105で判別された撮影シーンに基づいて階調処理条件の設定を行う。その設定方法は、第1の実施形態の場合と同様である。
The gradation processing condition setting unit 107 functions as a gradation processing condition setting unit. The gradation processing conditions are set based on the shooting scene determined by the
階調変換処理部108は、階調変換処理手段として機能し、上記階調処理条件設定部107において設定された階調処理条件に従い、第1の画像に対する階調変換処理を実行する。 The gradation conversion processing unit 108 functions as a gradation conversion processing unit, and executes gradation conversion processing for the first image in accordance with the gradation processing conditions set in the gradation processing condition setting unit 107.
(画像処理装置2の動作フロー)
次に、本実施形態における画像処理装置2の動作について説明する。
(Operation flow of the image processing apparatus 2)
Next, the operation of the
以下では、撮影画像を対象とし、その撮影対象物を「主要被写体」と呼ぶことにする。 Hereinafter, a captured image is targeted, and the captured object is referred to as a “main subject”.
まず、図31のフローチャートを参照して、画像処理装置2で実行される処理の全体の流れを説明する。なお、これらの処理はプログラムを用いてコンピュータに実行させることができる。以下で説明する各工程は、画像処理プログラムの各機能としても同様の説明ができる。
First, the overall flow of processing executed by the
まず、画像処理装置2への入力操作が行われると、各入力処理部73〜75の何れかで入力処理が行われる(ステップS101)。撮影画像に対しては、画像データ書式解読処理部75での処理を経て、画像処理部10に送られる。ステップS102では、画像処理部10において、撮影画像として第1の画像が取得される。第1の画像はノンリニア画像であり、JPEG画像であるとする。
First, when an input operation to the
一方、撮影条件取得工程であるステップS103では、取得した第1の画像に付加されたExif情報が読み出され、撮影条件の取り込みが行われる。取得する撮影条件は、少なくとも「ISOスピードレイト」、「露出モード」、または「撮影タイプ」を含む。取得した撮影条件はメモリに保持される。 On the other hand, in step S103, which is a shooting condition acquisition step, Exif information added to the acquired first image is read, and shooting conditions are captured. The acquired imaging condition includes at least “ISO speed rate”, “exposure mode”, or “imaging type”. The acquired shooting conditions are held in the memory.
その後、第1の画像の画像データは、一方で複数の分割領域からなる分割画像、すなわち第2の画像として取得される(ステップS104)。第2の画像が第1の画像のサイズを縮小した画像となるのは第1の実施形態の場合と同様であり、ステップS104は第2の画像取得工程として機能する。 Thereafter, the image data of the first image is acquired as a divided image composed of a plurality of divided regions, that is, a second image (step S104). The second image becomes an image obtained by reducing the size of the first image, as in the first embodiment, and step S104 functions as a second image acquisition step.
次いで、シーン判別処理工程であるステップS105では、取得された第2の画像の画像データに基づいて、撮影シーンを判別するシーン判別処理が行われる。ステップS105におけるシーン判別処理については、後に図14を参照して、第1の実施形態の場合と異なるところを説明する。 Next, in step S105, which is a scene determination processing step, a scene determination process for determining a shooting scene is performed based on the acquired image data of the second image. The scene discrimination processing in step S105 will be described later with reference to FIG. 14 where it differs from the case of the first embodiment.
次いで、階調処理条件設定工程であるステップS106では、ステップS105の撮影シーン判別処理で得られた各指標及び撮影シーンの判別結果に基づいて、第1の画像の階調変換処理のために必要な条件を設定する階調処理条件設定処理が行われる。 Next, in step S106, which is a gradation processing condition setting step, it is necessary for the gradation conversion processing of the first image based on each index obtained in the shooting scene determination processing in step S105 and the shooting scene determination result. A gradation processing condition setting process for setting various conditions is performed.
階調変換処理工程であるステップS107では、第2の画像に基づいて設定された階調処理条件に基づいて、撮影画像である第1の画像の画像データに対する階調変換処理が行われる。ステップS107の階調変換は撮影シーンの光源条件などによる階調への影響を補正するものであり、ステップS105でのシーン判別結果によりステップS106で設定した条件に基づき階調変換処理を行う。 In step S107, which is a gradation conversion processing step, gradation conversion processing is performed on the image data of the first image, which is a captured image, based on the gradation processing conditions set based on the second image. The gradation conversion in step S107 is to correct the influence on the gradation due to the light source condition of the shooting scene, and the gradation conversion processing is performed based on the condition set in step S106 based on the scene discrimination result in step S105.
次いで、その他の画像処理(ノイズ処理やシャープネス処理など)が適宜行われる(ステップS108)。その後画像データは、各出力処理部76〜79で処理され、出力される。あるいは、保存用の記録媒体(SDメモリカードまたはマルチメディアカード(MMC)等)に記録される(ステップS109)。出力、あるいは記録が終わると、画像処理装置2における動作は終了する。
Next, other image processing (noise processing, sharpness processing, etc.) is appropriately performed (step S108). Thereafter, the image data is processed and output by the
(シーン判別処理2のフロー)
次に、図14のフローチャート及び図15、18、22及び32〜35を参照して、画像処理装置2でのシーン判別処理2(図31のステップS105)について説明する。第1の実施形態(撮像装置1)と異なるところを説明し、同じところは適宜省略する。
(Flow of scene discrimination process 2)
Next, the scene discrimination process 2 (step S105 in FIG. 31) in the
シーン判別処理は、第1の実施形態と同様、図14に示すように、色空問変換処理(ステップS20)、占有率算出処理(ステップS21)、指標算出処理(ステップS22)、シーン判別(ステップS23)の各処理により構成される。以下、適宜上記図面を参照して、図14に示す各処理について説明する。 As in the first embodiment, the scene discrimination process includes a color space conversion process (step S20), an occupation rate calculation process (step S21), an index calculation process (step S22), and a scene discrimination (step S20), as shown in FIG. It is comprised by each process of step S23). Each process shown in FIG. 14 will be described below with reference to the above drawings as appropriate.
まず、図14のステップS20において、色空間変換処理が行われる。処理内容は第1の実施形態の場合と同様であり、説明は省略する。 First, in step S20 of FIG. 14, a color space conversion process is performed. The processing contents are the same as those in the first embodiment, and a description thereof will be omitted.
<占有率算出処理2>
次に、ステップS21では、占有率算出処理が行われる。図15のフローチャートを参照して、占有率算出処理について説明する。
<Occupancy
Next, in step S21, an occupation ratio calculation process is performed. The occupation rate calculation process will be described with reference to the flowchart of FIG.
まず、色空問変換処理で算出されたHSV値に基づいて、第2の画像の各画素が、色相と明度の組み合わせからなる所定の階級に分類され、分類された階級毎に累積画素数を算出することによって2次元ヒストグラムが作成される(ステップS30)。 First, each pixel of the second image is classified into a predetermined class composed of a combination of hue and lightness based on the HSV value calculated by the color sky conversion process, and the cumulative number of pixels for each classified class is calculated. A two-dimensional histogram is created by calculation (step S30).
明度の分割については、第1の実施形態の場合と異なる。これはリニア画像とノンリニア画像との違いによるものである。ステップS30では、明度(V)は、明度値が0〜25(v1)、26〜50(v2)、51〜84(v3)、85〜169(v4)、170〜199(v5)、200〜224(v6)、225〜255(v7)の7つの階級に分割される。 The lightness division is different from that in the first embodiment. This is due to the difference between a linear image and a non-linear image. In step S30, the brightness (V) is 0-25 (v1), 26-50 (v2), 51-84 (v3), 85-169 (v4), 170-199 (v5), 200- It is divided into seven classes of 224 (v6) and 225 to 255 (v7).
色相(H)は、色相値が0〜39、330〜359の肌色色相領域(H1及びH2)、色相値が40〜160の緑色色相領域(H3)、色相値が161〜250の青色色相領域(H4)、赤色色相領域(H5)の4つの領域に分割される。これらは第1の実施形態の場合と同様である。また、肌色色相領域が、さらに、肌色領域(H1)と、それ以外の領域(H2)に分割されるのも同様である。 Hue (H) is a flesh color hue region (H1 and H2) having a hue value of 0 to 39 and 330 to 359, a green hue region (H3) having a hue value of 40 to 160, and a blue hue region having a hue value of 161 to 250. It is divided into four areas (H4) and a red hue area (H5). These are the same as in the case of the first embodiment. Similarly, the skin color hue region is further divided into a skin color region (H1) and another region (H2).
ステップS31の2次元ヒストグラム作成も第1の実施形態の場合と同様である。 The two-dimensional histogram creation in step S31 is the same as in the first embodiment.
図32に、ステップS31において、第2の画像の画面の外縁からの距離に応じて分割された4つの領域n1〜n4を示す。領域n1が外枠であり、領域n2が外枠の内側の領域であり.領域n3が領域n2のさらに内側の領域であり、領域n4が第2の画像の中央部の領域である。また、ステップS31において、明度は、上述のようにv1〜v7の7つの領域に分割するものとする。従って、第2の画像を画面の外縁からの距離と明度の組み合わせからなる階級に分類した場合の階級の数は4×7=28個となる。 FIG. 32 shows four regions n1 to n4 divided in step S31 according to the distance from the outer edge of the screen of the second image. Region n1 is the outer frame, region n2 is the inner region of the outer frame,. The region n3 is a region further inside the region n2, and the region n4 is a central region of the second image. In step S31, the brightness is divided into seven areas v1 to v7 as described above. Therefore, the number of classes when the second image is classified into classes composed of combinations of the distance from the outer edge of the screen and the brightness is 4 × 7 = 28.
ステップS32が、ステップS30とともに、第1の占有率算出工程として機能し、第1の占有率が算出されるのは第1の実施形態の場合と同様である。 Step S32, together with step S30, functions as a first occupancy rate calculation step, and the first occupancy rate is calculated in the same manner as in the first embodiment.
明度領域vi、色相領域Hjの組み合わせからなる階級において算出された第1の占有率をRijとすると、各階級における第1の占有率は表7のように表される。 If the first occupancy calculated in the class composed of the combination of the lightness area vi and the hue area Hj is Rij, the first occupancy in each class is expressed as shown in Table 7.
ステップS33が、ステップS31とともに、第2の占有率算出工程として機能し、第2の占有率が算出されるのも第1の実施形態の場合と同様である。 Step S33, together with step S31, functions as a second occupancy rate calculation step, and the second occupancy rate is calculated as in the case of the first embodiment.
明度領域vi、画面領域njの組み合わせからなる各階級において算出された第2の占有率をQijとすると、各階級における第2の占有率は表8のように表される。 If the second occupancy calculated in each class composed of the combination of the brightness area vi and the screen area nj is Qij, the second occupancy in each class is expressed as shown in Table 8.
<指標算出処理2>
次に、図18のフローチャートを参照して、指標算出処理(図14のステップS22)について説明する。
<
Next, the index calculation process (step S22 in FIG. 14) will be described with reference to the flowchart in FIG.
まず、第1の指標算出工程であるステップS40では、第1の占有率に予め設定された第1の係数を乗算して和をとることにより、指標1が算出され、次いで、第2の指標算出工程であるステップS41では、同じく第2の占有率に予め設定された第2の係数を乗算して和をとることにより、指標2が算出されるのは、第1の実施形態の場合と同様である。
First, in step S40, which is the first index calculation step, index 1 is calculated by multiplying the first occupancy by a preset first coefficient to obtain the sum, and then the second index is calculated. In step S41, which is a calculation process, the
指標1は、主要被写体のオーバー度を表す指標であり、「主要被写体がオーバー」と判別されるべき画像のみを他の撮影シーンから分離するためのものである。指標2は、空色高明度、顔色低明度等の逆光撮影時の特徴を複合的に表す指標であり、「逆光」、「主要被写体がアンダー」と判別されるべき画像のみを他の撮影シーンから分離するためのものである。
The index 1 is an index representing the degree of overshoot of the main subject, and is for separating only the image that should be determined as “the main subject is over” from other shooting scenes. The
以下、指標1及び指標2の算出方法について説明する。
Hereinafter, a method for calculating the index 1 and the
表9に、指標1を算出するために必要な第1の係数を階級別に示す。表9に示された各階級の係数は、表1に示した各階級の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。 Table 9 shows the first coefficient necessary for calculating the index 1 by class. The coefficient of each class shown in Table 9 is a weighting coefficient by which the first occupancy rate Rij of each class shown in Table 1 is multiplied, and is set in advance according to the shooting conditions.
表9によると、高明度(v5、v6)の肌色色相領域(H1)に分布する領域から算出される第1の占有率には、正(+)の係数が用いられ、それ以外の色相である青色色相領域から算出される第1の占有率には、負(−)の係数が用いられる。図33は、肌色領域(H1)における第1の係数と、その他の領域(緑色色相領域(H3))における第1の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表9及び図33によると、高明度(V=170〜224)の領域では、肌色領域(H1)における第1の係数の符号は正(+)であり、その他の領域(例えば、緑色色相領域(H3))における第1の係数の符号は負(−)であり、両者の符号が異なっていることがわかる。 According to Table 9, a positive (+) coefficient is used for the first occupancy calculated from the region distributed in the skin color hue region (H1) of high brightness (v5, v6), A negative (−) coefficient is used for the first occupation ratio calculated from a certain blue hue region. FIG. 33 shows a curve (coefficient curve) in which the first coefficient in the skin color area (H1) and the first coefficient in the other areas (green hue area (H3)) change continuously over the entire brightness. It is shown. According to Table 9 and FIG. 33, in the region of high brightness (V = 170 to 224), the sign of the first coefficient in the skin color region (H1) is positive (+), and other regions (for example, the green hue region) The sign of the first coefficient in (H3)) is negative (-), and it can be seen that the signs of both are different.
明度領域vi、色相領域Hjにおける第1の係数をCijとすると、指標1を算出するためのHk領域の和は、式(2)のように定義される。 If the first coefficient in the lightness region vi and the hue region Hj is Cij, the sum of the Hk regions for calculating the index 1 is defined as in Expression (2).
従って、H1〜H4領域の和は、下記の式(2−5)〜(2−8)のように表される。 Accordingly, the sum of the H1 to H4 regions is represented by the following formulas (2-5) to (2-8).
H1領域の和=R11×(−44)+R21×(−16)+(中略)
…+R71×(−11.3) (2−5)
H2領域の和=R12×0+R22×8.6+(中略)…+R72×(−11.1)
(2−6)
H3領域の和=R13×0+R23×(−6.3)+(中略)…+R73×(−10)
(2−7)
H4領域の和=R14×0+R24×(−1.8)+(中略)
…+R74×(−14.6) (2−8)
指標1は、式(2−5)〜(2−8)で示されたH1〜H4領域の和を用いて、式(21)のように定義される。
Sum of H1 region = R11 × (−44) + R21 × (−16) + (omitted)
... + R71 × (-11.3) (2-5)
Sum of H2 regions = R12 × 0 + R22 × 8.6 + (omitted)... + R72 × (−11.1)
(2-6)
Sum of H3 regions = R13 × 0 + R23 × (−6.3) + (omitted)... + R73 × (−10)
(2-7)
H4 region sum = R14 × 0 + R24 × (−1.8) + (omitted)
... + R74 × (-14.6) (2-8)
The index 1 is defined as in Expression (21) using the sum of the H1 to H4 regions shown in Expressions (2-5) to (2-8).
指標1=H1領域の和+H2領域の和+H3領域の和+H4領域の和+4.424
(21)
表10に、指標2を算出するために必要な第2の係数を階級別に示す。表10に示された各階級の係数は、表1に示した各階級の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。
Index 1 = sum of H1 region + sum of H2 region + sum of H3 region + sum of H4 region + 4.424
(21)
Table 10 shows the second coefficient necessary for calculating the
表10によると、肌色色相領域(H1)の中間明度に分布する領域(v4)から算出される占有率には負(−)の係数が用いられ、肌色色相嶺域(H1)の低明度(シャドー)領域(v2、v3)から算出される占有率には正(+)の係数が用いられる。図34は、肌色領域(H1)における第2の係数を、明度全体にわたって連続的に変化する曲線(係数曲線)として示したものである。表10及び図34によると、肌色色相領域の、明度値が26〜84の低明度(シャドー)領域の第2の係数の符号は正(+)であり、明度値が85〜169の中間明度領域及びその他の領域での第2の係数の符号は負(−)であり、両領域での係数の符号が異なっていることがわかる。 According to Table 10, a negative (−) coefficient is used for the occupation ratio calculated from the region (v4) distributed in the intermediate lightness of the flesh color hue region (H1), and the low lightness of the flesh color hue region (H1) ( A positive (+) coefficient is used for the occupation ratio calculated from the shadow area (v2, v3). FIG. 34 shows the second coefficient in the skin color region (H1) as a curve (coefficient curve) that continuously changes over the entire brightness. According to Table 10 and FIG. 34, the sign of the second coefficient of the low brightness (shadow) area of the flesh color hue area having a brightness value of 26 to 84 is positive (+), and the intermediate brightness of the brightness value of 85 to 169 is shown. It can be seen that the sign of the second coefficient in the region and other regions is negative (−), and the sign of the coefficient in both regions is different.
明度領域vi、色相領域Hjにおける第2の係数をDijとすると、指標2を算出するためのHk領域の和は、式(4)のように定義される。
When the second coefficient in the lightness area vi and the hue area Hj is Dij, the sum of the Hk areas for calculating the
従って、H1〜H4領域の和は、下記の式(4−5)〜(4−8)のように表される。 Accordingly, the sum of the H1 to H4 regions is represented by the following formulas (4-5) to (4-8).
H1領域の和=R11×(−27)+R21×4.5+(中略)
…+R71×(−24) (4−5)
H2領域の和=R12×0+R22×4.7+(中略)…+R72×(−8.5)
(4−6)
H3領域の和=R13×0+R23×0+(中略)…+R73×0 (4−7)
H4領域の和=R14×0+R24×(−5.1)+(中略)
…+R74×7.2 (4−8)
指標2は、式(4−5)〜(4−8)で示されたH1〜H4領域の和を用いて、式(22)のように定義される。
H1 region sum = R11 × (−27) + R21 × 4.5 + (omitted)
... + R71 × (−24) (4-5)
Sum of H2 regions = R12 × 0 + R22 × 4.7 + (omitted)... + R72 × (−8.5)
(4-6)
Sum of H3 regions = R13 × 0 + R23 × 0 + (omitted)... + R73 × 0 (4-7)
H4 region sum = R14 × 0 + R24 × (−5.1) + (omitted)
... + R74 × 7.2 (4-8)
The
指標2=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.554
(22)
指標1及び指標2は、第2の画像の明度と色相の分布量に基づいて算出されるため、画像がカラー画像である場合の撮影シーンの判別に有効である。
(22)
Since the index 1 and the
指標1及び指標2が算出されると、第3の指標算出工程であるステップS42で、第2の占有率に、予め設定された第3の係数を乗算して和をとることにより、指標3が算出される。指標3は、主要被写体がアンダーな逆光と主要被写体がオーバーな画像間における、画像データの画面の中心と外側の明暗関係の差異を示すものである。
When the index 1 and the
以下、指標3の算出方法について説明する。
Hereinafter, a method for calculating the
表11に、指標3を算出するために必要な第3の係数を階級別に示す。表11に示された各階級の係数は、表2に示した各階級の第2の占有率Qijに乗算する重み係数であり、撮影条件に応じて予め設定されている。
Table 11 shows the third coefficient necessary for calculating the
図35は、画面領域n1〜n4における第3の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。 FIG. 35 shows the third coefficient in the screen areas n1 to n4 as a curve (coefficient curve) that continuously changes over the entire brightness.
明度領域vi、画面領域njにおける第3の係数をEijとすると、指標3を算出するためのnk領域(画面領域nk)の和は、式(6)のように定義される。
If the third coefficient in the brightness area vi and the screen area nj is Eij, the sum of the nk area (screen area nk) for calculating the
従って、n1〜n4領域の和は、下記の式(6−5)〜(6−8)のように表される。 Therefore, the sum of the n1 to n4 regions is expressed by the following formulas (6-5) to (6-8).
n1領域の和=Q11×40.1+Q21×37+(中略)…+Q71×22
(6−5)
n2領域の和=Q12×(−14.8)+Q22×(−10.5)+(中略)
…+Q72×0 (6−6)
n3領域の和=Q13×24.6+Q23×12.1+(中略)…+Q73×10.1
(6−7)
n4領域の和=Q14×1.5+Q24×(−32.9)+(中略)
…+Q74×(−52.2) (6−8)
指標3は、式(6−5)〜(6−8)で示されたn1〜n4領域の和を用いて、式(23)のように定義される。
Sum of n1 region = Q11 × 40.1 + Q21 × 37 + (omitted)... + Q71 × 22
(6-5)
Sum of n2 regions = Q12 × (−14.8) + Q22 × (−10.5) + (omitted)
... + Q72 × 0 (6-6)
Sum of n3 regions = Q13 × 24.6 + Q23 × 12.1 + (omitted) ... + Q73 × 10.1
(6-7)
Sum of n4 regions = Q14 × 1.5 + Q24 × (−32.9) + (omitted)
... + Q74 × (−52.2) (6-8)
The
指標3=n1領域の和+n2領域の和+n3領域の和+n4領域の和+12.6201
(23)
指標3は、第2の画像の明度の分布位置による構図的な特徴(全体画像の画面の外縁からの距離)に基づいて算出されるため、カラー画像だけでなくモノクロ画像の撮影シーンを判別するのにも有効である。
(23)
Since the
指標1〜3が算出されると、第4の指標算出工程であるステップS43で、第2の画像の画面中央部における肌色の平均輝度値と、最大輝度値と平均輝度値との差分値のそれぞれに、予め設定された係数を乗算することにより、指標4が算出される。 When the indices 1 to 3 are calculated, the difference value between the average luminance value of the skin color and the maximum luminance value and the average luminance value in the screen center portion of the second image is calculated in step S43 which is a fourth index calculating step. The index 4 is calculated by multiplying each by a preset coefficient.
以下、図22のフローチャートを参照して、指標4の算出処理について説明する。 Hereinafter, the calculation process of the index 4 will be described with reference to the flowchart of FIG.
まず、ステップS50からステップS54に至る、第2の画像の画面中央部における肌色領域の平均輝度値x1、第2の画像の最大輝度値と平均輝度値との差分値x2=最大輝度値−平均輝度値、第2の画像の輝度の標準偏差x3、画面中央部における平均輝度値x4、そして第2の画像における肌色領域の最大輝度値Yskin_maxと最小輝度値Yskin_minの差分値と、肌色領域の平均輝度値Yskin_aveとの比較値x5を算出する処理については、第1の実施形態の場合と同様であり、説明を省略する。 First, from step S50 to step S54, the average luminance value x1 of the skin color region in the center of the screen of the second image, the difference value x2 between the maximum luminance value and the average luminance value of the second image = maximum luminance value-average The luminance value, the standard deviation x3 of the luminance of the second image, the average luminance value x4 in the center of the screen, the difference value between the maximum luminance value Yskin_max and the minimum luminance value Yskin_min of the skin color region in the second image, and the average of the skin color region The process of calculating the comparison value x5 with the luminance value Yskin_ave is the same as in the case of the first embodiment, and a description thereof will be omitted.
次いで、ステップS50〜S54で算出された値x1〜x5の値の各々に、撮影条件に応じて予め設定された第4の係数を乗算して和をとることにより、指標4が算出され(ステップS55)、指標4算出処理が終了する。指標4は、下記の式(8−3)のように定義される。 Next, the index 4 is calculated by multiplying each of the values x1 to x5 calculated in steps S50 to S54 by a fourth coefficient that is set in advance according to the shooting conditions to obtain a sum (step 4). S55), the index 4 calculation process ends. The index 4 is defined as the following formula (8-3).
指標4=0.06×x1+1.13×x2+0.02×x3+(−0.01)
×x4+0.03×x5−6.50 (8−3)
この指標4は、第2の画像の画面の構図的な特徴だけでなく、輝度ヒストグラム分布情報を持ち合わせており、特に、主要被写体がオーバーである撮影シーンとアンダー撮影シーンの判別に有効である。
Index 4 = 0.06 × x1 + 1.13 × x2 + 0.02 × x3 + (− 0.01)
* X4 + 0.03 * x5-6.50 (8-3)
This index 4 has not only the compositional characteristics of the screen of the second image but also the luminance histogram distribution information, and is particularly effective for discriminating the shooting scene from which the main subject is over and the under shooting scene.
指標4が算出されると、第5の指標算出工程であるステップS44で、指標1、3及び第2の画像の画面中央部における肌色領域の平均輝度値に、撮影条件に応じて予め設定された重み係数を乗算することにより、指標5が算出される。
When the index 4 is calculated, in step S44, which is the fifth index calculation step, the average luminance value of the skin color area in the center of the screen of the
さらに第6の指標算出工程であるステップS45で、指標2、3及び第2の画像の画面中央部における肌色領域の平均輝度値に、撮影条件に応じて予め設定された重み係数を乗算することにより、指標6が算出され、本指標算出処理が終了する。
Further, in step S45, which is the sixth index calculation step, the average luminance value of the skin color area in the center of the screen of the
以下、指標5及び指標6の算出方法について説明する。
Hereinafter, a method for calculating the index 5 and the
第2の画像の画面中央部における肌色領域の平均輝度値を指標7とする。ここでの画面中央部とは、例えば、図32の領域n2、領域n3及び領域n4から構成される領域である。このとき、指標5は、指標1、指標3、指標7を用いて式(24)のように定義され、指標6は、指標2、指標3、指標7を用いて式(25)のように定義される。
The average luminance value of the skin color area at the center of the screen of the second image is taken as index 7. Here, the central portion of the screen is, for example, a region composed of region n2, region n3, and region n4 in FIG. At this time, the index 5 is defined as in Expression (24) using the index 1,
指標5=0.46×指標1+0.61×指標3+0.01×指標7−0.79(24)
指標6=0.58×指標2+0.18×指標3+(−0.03)×指標7+3.34
(25)
<シーン判別2>
図14のステップS23(シーン判別)に戻る。
Index 5 = 0.46 × index 1 + 0.61 ×
(25)
<
Returning to step S23 (scene discrimination) in FIG.
指標4〜6が算出されると、これらの指標の値に基づいて撮影シーンが判別されるが、シーン判別方法は第1の実施形態の場合と同様であり、説明は省略する。 When the indices 4 to 6 are calculated, the photographic scene is determined based on the values of these indices, but the scene determination method is the same as in the first embodiment, and a description thereof is omitted.
(階調処理条件設定のフロー)
次に、第1の画像に対する階調処理条件設定(図31のステップS106)は、第1の実施形態の場合と同様であり、図24のフローチャートを用いて説明したとおりである。よって説明は省略する。
(Flow of gradation processing condition setting)
Next, the gradation processing condition setting for the first image (step S106 in FIG. 31) is the same as that in the first embodiment and is as described with reference to the flowchart in FIG. Therefore, explanation is omitted.
以上のように、上記第1の実施形態、第2の実施形態によれば、撮影された画像の撮影シーンを判別することによって、自動的に適切な補正処理条件を設定するに当たり、撮影時のユーザ(撮影者)の意図を表現する要素として、撮影時の撮影条件を用いて、撮影画像の補正処理を抑制する度合いを制御することにより、より適切な補正画像を得ることができる。例えば、順光や逆光、露光がアンダーやオーバーなどのシーンを判別し、自動的に階調補正処理を実施するとともに、夜景シーンやオートブラケット撮影等の撮影者の意図を反映した適正な補正に調整することができ、また撮影時のISO感度設定が高い画像でも、過度にノイズを増加させることがなく、より適切な補正画像を得ることができる。 As described above, according to the first embodiment and the second embodiment described above, it is possible to automatically set an appropriate correction processing condition by determining a shooting scene of a shot image. As an element expressing the intention of the user (photographer), a more appropriate corrected image can be obtained by controlling the degree of suppressing the correction processing of the captured image using the imaging conditions at the time of imaging. For example, scenes with forward light, backlight, underexposure and underexposure are identified, and gradation correction processing is performed automatically, and appropriate corrections that reflect the photographer's intentions such as night scenes and auto bracket shooting Even if the image can be adjusted and the ISO sensitivity setting at the time of shooting is high, a more appropriate corrected image can be obtained without excessively increasing noise.
なお本発明の実施形態は、上記の実施形態に限定されるものではなく、本発明の趣旨に則る限り、様々な変更された形態もその範囲に含まれるものである。 The embodiment of the present invention is not limited to the above-described embodiment, and various modified forms are also included in the scope thereof as long as the gist of the present invention is met.
1 撮像装置
2 画像処理装置
10 画像処理部
11 筐体
13 装填部
14 画像読み込み部
15 画像書き込み部
16 プリント作成部
17 トレー
20 撮像処理部
21 筐体
22 十字キー
23 撮影光学系
24 フラッシュ
25 ファインダ
26 電源スイッチ
27 表示部
28 レリーズボタン
31 プロセッサ
32 メモリ
33 撮像素子
37 画像データ出力部
38 操作部
41 タイミングジェネレータ
42 シャッタユニット
43 絞りユニット
44 フォーカスユニット
51 AE制御部
52 AF制御部
53 画素補間部
54 AWB制御部
55 ガンマ補正部
71 操作部
72 制御部
73 フィルムスキャンデータ処理部
74 反射原稿スキャンデータ処理部
75 画像データ書式解読処理部
76 CRT固有処理部
77 プリンタ固有処理部A
78 プリンタ固有処理部B
79 画像データ書式作成処理部
81 フィルムスキャナ部
82 反射原稿入力装置
83 画像転送手段
84 通信手段(入力)
85 CRT
86 露光処理部
87 外部プリンタ
88 画像搬送部
89 通信手段(出力)
101 第1画像取得部
102 第2画像取得部
103 占有率算出部
104 指標算出部
105 シーン判別部
107 階調処理条件設定部
108 階調変換処理部
DESCRIPTION OF SYMBOLS 1
78 Printer Specific Processing Unit B
79 Image data format
85 CRT
86 Exposure processing unit 87 External printer 88
DESCRIPTION OF
Claims (20)
前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得手段と、
前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理手段と、
前記シーン判別処理手段によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定手段と、を有し、
前記階調処理条件設定手段は、
前記撮影条件取得手段により取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、
ことを特徴とする撮像装置。 Second image acquisition means for acquiring a second image obtained by reducing the image size from the first image acquired by photographing;
Shooting condition acquisition means for acquiring shooting conditions set at the time of shooting the first image;
Scene discrimination processing means for performing processing for discriminating a shooting scene based on the second image;
Gradation processing condition setting means for setting gradation processing conditions for the first image based on a scene determination result obtained by the scene determination processing means,
The gradation processing condition setting means includes:
Based on the shooting condition acquired by the shooting condition acquisition unit, the setting of the gradation processing condition based on the scene determination result is corrected,
An imaging apparatus characterized by that.
ことを特徴とする請求項1に記載の撮像装置。 The shooting condition acquisition means acquires shooting conditions including at least “ISO speed rate”, “exposure mode”, or “shooting type”.
The imaging apparatus according to claim 1.
前記第2の画像の画像データについて色情報を取得し、
取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、
前記取得された色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出手段と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出手段と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出手段と、
少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出手段と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出手段と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出手段と、
前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別手段と、を有する、
ことを特徴とする請求項1または2に記載の撮像装置。 The scene discrimination processing means includes
Obtaining color information for the image data of the second image;
Based on the acquired color information, the image data is classified into a class composed of a combination of a predetermined brightness and hue, and a first occupancy ratio indicating a proportion of the entire image data for each classified class First occupancy rate calculating means for calculating
Based on the acquired color information, the image data is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and a second ratio indicating the proportion of the entire image data for each classified class. Second occupancy rate calculating means for calculating the occupancy rate of
First index calculating means for calculating index 1 by multiplying the first occupancy by a preset first coefficient;
A second index calculating means for calculating index 2 by multiplying the first occupancy by a preset second coefficient;
A third index calculating means for calculating index 3 by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating means for calculating index 4 by multiplying an average brightness of the skin color at least in the center of the screen of the image data by a preset fourth coefficient;
A fifth index calculating means for calculating index 5 by multiplying at least one of the index 1, index 2, and index 3 by a preset fifth coefficient;
A sixth index calculating means for calculating index 6 by multiplying at least one of the index 1, index 2, and index 3 by a preset sixth coefficient;
Scene discrimination means for specifying a scene of the image data based on the index 4, the index 5, and the index 6.
The imaging apparatus according to claim 1 or 2, wherein
前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出手段と、
算出された前記階調調整パラメータを、前記撮影条件取得手段により取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出手段と、を有し、
前記シーン判別処理手段によるシーン判別結果と前記階調変換量算出手段により算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、
ことを特徴とする請求項1乃至3の何れか1項に記載の撮像装置。 The gradation processing condition setting means includes:
Gradation adjustment parameter calculation means for calculating a gradation adjustment parameter based on the second image;
A gradation conversion amount calculation unit that corrects the calculated gradation adjustment parameter based on the imaging condition acquired by the imaging condition acquisition unit and calculates a gradation conversion amount;
Setting a gradation processing condition for the first image based on a scene determination result by the scene determination processing unit and the gradation conversion amount calculated by the gradation conversion amount calculating unit;
The image pickup apparatus according to claim 1, wherein the image pickup apparatus is an image pickup apparatus.
ことを特徴とする請求項1乃至4の何れか1項に記載の撮像装置。 Gradation conversion processing means for performing gradation conversion processing on the first image based on the gradation processing conditions set by the gradation processing condition setting means;
The image pickup apparatus according to claim 1, wherein the image pickup apparatus is an image pickup apparatus.
前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得手段と、
前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理手段と、
前記シーン判別処理手段によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定手段と、を有し、
前記階調処理条件設定手段は、
前記撮影条件取得手段により取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、
ことを特徴とする画像処理装置。 Second image acquisition means for acquiring a second image with a reduced image size based on the first image acquired from the photographed image;
Shooting condition acquisition means for acquiring shooting conditions set at the time of shooting the first image;
Scene discrimination processing means for performing processing for discriminating a shooting scene based on the second image;
Gradation processing condition setting means for setting gradation processing conditions for the first image based on a scene determination result obtained by the scene determination processing means,
The gradation processing condition setting means includes:
Based on the shooting condition acquired by the shooting condition acquisition unit, the setting of the gradation processing condition based on the scene determination result is corrected,
An image processing apparatus.
ことを特徴とする請求項6に記載の画像処理装置。 The shooting condition acquisition means acquires shooting conditions including at least “ISO speed rate”, “exposure mode”, or “shooting type”.
The image processing apparatus according to claim 6.
前記第2の画像の画像データについて色情報を取得し、
取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、
前記取得された色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出手段と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出手段と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出手段と、
少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出手段と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出手段と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出手段と、
前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別手段と、を有する、
ことを特徴とする請求項6または7に記載の画像処理装置。 The scene discrimination processing means includes
Obtaining color information for the image data of the second image;
Based on the acquired color information, the image data is classified into a class composed of a combination of a predetermined brightness and hue, and a first occupancy ratio indicating a proportion of the entire image data for each classified class First occupancy rate calculating means for calculating
Based on the acquired color information, the image data is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and a second ratio indicating the proportion of the entire image data for each classified class. Second occupancy rate calculating means for calculating the occupancy rate of
First index calculating means for calculating index 1 by multiplying the first occupancy by a preset first coefficient;
A second index calculating means for calculating index 2 by multiplying the first occupancy by a preset second coefficient;
A third index calculating means for calculating index 3 by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating means for calculating index 4 by multiplying an average brightness of the skin color at least in the center of the screen of the image data by a preset fourth coefficient;
A fifth index calculating means for calculating index 5 by multiplying at least one of the index 1, index 2, and index 3 by a preset fifth coefficient;
A sixth index calculating means for calculating index 6 by multiplying at least one of the index 1, index 2, and index 3 by a preset sixth coefficient;
Scene discrimination means for specifying a scene of the image data based on the index 4, the index 5, and the index 6.
The image processing apparatus according to claim 6, wherein the image processing apparatus is an image processing apparatus.
前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出手段と、
算出された前記階調調整パラメータを、前記撮影条件取得手段により取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出手段と、を有し、
前記シーン判別処理手段によるシーン判別結果と前記階調変換量算出手段により算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、
ことを特徴とする請求項6乃至8の何れか1項に記載の画像処理装置。 The gradation processing condition setting means includes:
Gradation adjustment parameter calculation means for calculating a gradation adjustment parameter based on the second image;
A gradation conversion amount calculation unit that corrects the calculated gradation adjustment parameter based on the imaging condition acquired by the imaging condition acquisition unit and calculates a gradation conversion amount;
Setting a gradation processing condition for the first image based on a scene determination result by the scene determination processing unit and the gradation conversion amount calculated by the gradation conversion amount calculating unit;
The image processing apparatus according to claim 6, wherein the image processing apparatus is an image processing apparatus.
ことを特徴とする請求項6乃至9の何れか1項に記載の画像処理装置。 Gradation conversion processing means for performing gradation conversion processing on the first image based on the gradation processing conditions set by the gradation processing condition setting means;
The image processing apparatus according to claim 6, wherein the image processing apparatus is an image processing apparatus.
前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得工程と、
前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理工程と、
前記シーン判別処理工程によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定工程と、を備え、
前記階調処理条件設定工程では、
前記撮影条件取得工程において取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、
ことを特徴とする画像処理方法。 A second image acquisition step of acquiring a second image having a reduced image size based on the first image acquired from the photographed image;
A shooting condition acquisition step of acquiring a shooting condition set at the time of shooting the first image;
A scene determination processing step of performing a shooting scene determination process based on the second image;
A gradation processing condition setting step for setting a gradation processing condition for the first image based on the scene determination result obtained by the scene determination processing step;
In the gradation processing condition setting step,
Based on the shooting condition acquired in the shooting condition acquisition step, the setting of the gradation processing condition based on the scene determination result is corrected.
An image processing method.
ことを特徴とする請求項11に記載の画像処理方法。 The shooting conditions acquired in the shooting condition acquisition step include at least “ISO speed rate”, “exposure mode”, or “shooting type”.
The image processing method according to claim 11.
前記第2の画像の画像データについて色情報を取得し、
取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出工程と、
前記取得された色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出工程と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出工程と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出工程と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出工程と、
少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出工程と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出工程と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出工程と、
前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別工程と、を備える、
ことを特徴とする請求項11または12に記載の画像処理方法。 The scene discrimination processing step includes
Obtaining color information for the image data of the second image;
Based on the acquired color information, the image data is classified into a class composed of a combination of a predetermined brightness and hue, and a first occupancy ratio indicating a proportion of the entire image data for each classified class A first occupancy ratio calculating step for calculating
Based on the acquired color information, the image data is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and a second ratio indicating the proportion of the entire image data for each classified class. A second occupancy rate calculating step for calculating the occupancy rate of
A first index calculation step of calculating index 1 by multiplying the first occupancy by a preset first coefficient;
A second index calculating step of calculating index 2 by multiplying the first occupancy by a preset second coefficient;
A third index calculating step of calculating index 3 by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating step of calculating index 4 by multiplying an average brightness of the skin color at least in the center of the screen of the image data by a preset fourth coefficient;
A fifth index calculation step of calculating index 5 by multiplying at least one of the index 1, index 2 and index 3 by a preset fifth coefficient;
A sixth index calculation step of calculating index 6 by multiplying at least one of the index 1, index 2, and index 3 by a preset sixth coefficient;
A scene determination step for identifying a scene of the image data based on the index 4, the index 5, and the index 6.
The image processing method according to claim 11 or 12, characterized in that:
前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出工程と、
算出された前記階調調整パラメータを、前記撮影条件取得工程において取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出工程と、を備え、
前記シーン判別処理工程におけるシーン判別結果と前記階調変換量算出工程において算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、
ことを特徴とする請求項11乃至13の何れか1項に記載の画像処理方法。 The gradation processing condition setting step includes
A gradation adjustment parameter calculation step of calculating a gradation adjustment parameter based on the second image;
A gradation conversion amount calculation step of correcting the calculated gradation adjustment parameter based on the imaging condition acquired in the imaging condition acquisition step and calculating a gradation conversion amount; and
Setting a gradation processing condition for the first image based on a scene determination result in the scene determination processing step and the gradation conversion amount calculated in the gradation conversion amount calculating step;
The image processing method according to claim 11, wherein:
ことを特徴とする請求項11乃至14の何れか1項に記載の画像処理方法。 A gradation conversion processing step of performing gradation conversion processing on the first image based on the gradation processing conditions set in the gradation processing condition setting step;
The image processing method according to claim 11, wherein:
撮影された画像を取得した第1の画像に基づき、画像サイズを縮小した第2の画像を取得する第2の画像取得機能と、
前記第1の画像の撮影時に設定された撮影条件を取得する撮影条件取得機能と、
前記第2の画像に基づき撮影シーンの判別処理を行うシーン判別処理機能と、
前記シーン判別処理機能によって得られたシーン判別結果に基づき、前記第1の画像に対する階調処理条件を設定する階調処理条件設定機能と、を有し、
前記階調処理条件設定機能は、
前記撮影条件取得機能により取得された撮影条件に基づき、前記シーン判別結果による階調処理条件の設定を補正する、
ことを特徴とする画像処理プログラム。 An image processing program for causing a computer to execute image processing,
A second image acquisition function for acquiring a second image obtained by reducing the image size based on the first image obtained by acquiring the photographed image;
A shooting condition acquisition function for acquiring shooting conditions set at the time of shooting the first image;
A scene determination processing function for performing a shooting scene determination process based on the second image;
A gradation processing condition setting function for setting a gradation processing condition for the first image based on a scene determination result obtained by the scene determination processing function;
The gradation processing condition setting function is
Based on the shooting condition acquired by the shooting condition acquisition function, the setting of the gradation processing condition based on the scene determination result is corrected.
An image processing program characterized by that.
ことを特徴とする請求項16に記載の画像処理プログラム。 The shooting condition acquisition function acquires shooting conditions including at least “ISO speed rate”, “exposure mode”, or “shooting type”.
The image processing program according to claim 16.
前記第2の画像の画像データについて色情報を取得し、
取得された前記色情報に基づいて、前記画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出機能と、
取得された前記色情報に基づいて、前記画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級ごとに、前記画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出機能と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、指標1を算出する第1の指標算出機能と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、指標2を算出する第2の指標算出機能と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、指標3を算出する第3の指標算出機能と、
少なくとも前記画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、指標4を算出する第4の指標算出機能と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、指標5を算出する第5の指標算出機能と、
前記指標1、前記指標2、及び前記指標3のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、指標6を算出する第6の指標算出機能と、
前記指標4、前記指標5、及び前記指標6に基づき、前記画像データのシーンを特定するシーン判別機能と、を有する、
ことを特徴とする請求項16または17に記載の画像処理プログラム。 The scene discrimination processing function is
Obtaining color information for the image data of the second image;
Based on the acquired color information, the image data is classified into a class composed of a combination of a predetermined brightness and hue, and a first occupancy ratio indicating a proportion of the entire image data for each classified class A first occupancy ratio calculating function for calculating
Based on the acquired color information, the image data is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and a second ratio indicating the proportion of the image data in each classified class A second occupancy ratio calculating function for calculating the occupancy ratio of
A first index calculation function for calculating index 1 by multiplying the first occupancy by a preset first coefficient;
A second index calculation function for calculating index 2 by multiplying the first occupancy by a preset second coefficient;
A third index calculation function for calculating index 3 by multiplying the second occupancy by a preset third coefficient;
A fourth index calculation function for calculating index 4 by multiplying an average brightness of the skin color at least in the center of the screen of the image data by a preset fourth coefficient;
A fifth index calculation function for calculating the index 5 by multiplying at least one of the index 1, the index 2 and the index 3 by a preset fifth coefficient;
A sixth index calculation function for calculating the index 6 by multiplying at least one of the index 1, the index 2 and the index 3 by a preset sixth coefficient;
A scene discrimination function for specifying a scene of the image data based on the index 4, the index 5, and the index 6.
The image processing program according to claim 16 or 17,
前記第2の画像に基づき階調調整パラメータを算出する階調調整パラメータ算出機能と、
算出された前記階調調整パラメータを、前記撮影条件取得機能により取得された撮影条件に基づき補正し、階調変換量を算出する階調変換量算出機能と、を有し、
前記シーン判別処理機能によるシーン判別結果と前記階調変換量算出機能により算出された前記階調変換量とに基づき、前記第1の画像に対する階調処理条件を設定する、
ことを特徴とする請求項16乃至18の何れか1項に記載の画像処理プログラム。 The gradation processing condition setting function is
A gradation adjustment parameter calculation function for calculating a gradation adjustment parameter based on the second image;
A gradation conversion amount calculation function for correcting the calculated gradation adjustment parameter based on the shooting condition acquired by the shooting condition acquisition function and calculating a gradation conversion amount;
Setting a gradation processing condition for the first image based on a scene determination result by the scene determination processing function and the gradation conversion amount calculated by the gradation conversion amount calculation function;
19. The image processing program according to claim 16, wherein the image processing program is any one of claims 16 to 18.
ことを特徴とする請求項16乃至19の何れか1項に記載の画像処理プログラム。 Having a gradation conversion processing function for performing gradation conversion processing on the first image based on the gradation processing conditions set by the gradation processing condition setting function;
20. The image processing program according to claim 16, wherein the image processing program is any one of claims 16 to 19.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006062444A JP2007184887A (en) | 2005-12-05 | 2006-03-08 | Image pickup device, image processor, image processing method and image processing program |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005350476 | 2005-12-05 | ||
JP2006062444A JP2007184887A (en) | 2005-12-05 | 2006-03-08 | Image pickup device, image processor, image processing method and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007184887A true JP2007184887A (en) | 2007-07-19 |
Family
ID=38340566
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006062444A Pending JP2007184887A (en) | 2005-12-05 | 2006-03-08 | Image pickup device, image processor, image processing method and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007184887A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010237878A (en) * | 2009-03-30 | 2010-10-21 | Fujitsu Ltd | Range correction program, range correction method and range correction device |
CN102595035A (en) * | 2011-01-17 | 2012-07-18 | 奥林巴斯映像株式会社 | Image pickup apparatus |
US9491358B2 (en) | 2013-12-20 | 2016-11-08 | Panasonic Intellectual Property Management Co., Ltd. | Imaging device for performing image processing based on photographing direction |
-
2006
- 2006-03-08 JP JP2006062444A patent/JP2007184887A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010237878A (en) * | 2009-03-30 | 2010-10-21 | Fujitsu Ltd | Range correction program, range correction method and range correction device |
CN102595035A (en) * | 2011-01-17 | 2012-07-18 | 奥林巴斯映像株式会社 | Image pickup apparatus |
US8982230B2 (en) | 2011-01-17 | 2015-03-17 | Olympus Imaging Corp. | Image pickup apparatus including image adjustment processing for improving an appearance of an image, the image adjustment processing to be applied when it is determined that an imaging scene is finalized |
US9491358B2 (en) | 2013-12-20 | 2016-11-08 | Panasonic Intellectual Property Management Co., Ltd. | Imaging device for performing image processing based on photographing direction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10412296B2 (en) | Camera using preview image to select exposure | |
US8797423B2 (en) | System for and method of controlling a parameter used for detecting an objective body in an image and computer program | |
EP2608527B1 (en) | Image pickup apparatus, control method for image pickup apparatus, and storage medium | |
JP2007184888A (en) | Imaging apparatus, image processor, image processing method, and image processing program | |
JP2006325015A (en) | Image processing method, image processing apparatus, imaging apparatus, and image processing program | |
JP2006333205A (en) | Imaging apparatus, image processing method and image processing program | |
CN111434104B (en) | Image processing apparatus, image capturing apparatus, image processing method, and recording medium | |
JP2007228221A (en) | Imaging apparatus, image processing apparatus, image processing method and image processing program | |
JP2007243542A (en) | Imaging apparatus, image processing apparatus, image processing method, and image processing program | |
JP2007311895A (en) | Imaging apparatus, image processor, image processing method and image processing program | |
JP2007184887A (en) | Image pickup device, image processor, image processing method and image processing program | |
JP2007293686A (en) | Imaging apparatus, image processing apparatus, image processing method and image processing program | |
JP2007221678A (en) | Imaging apparatus, image processor, image processing method and image processing program | |
JP2007312294A (en) | Imaging apparatus, image processor, method for processing image, and image processing program | |
JP2007288245A (en) | Imaging apparatus, image processing method, and image processing program | |
JP2007235369A (en) | Imaging apparatus, and unit, method, and program for processing image | |
JP2007243556A (en) | Imaging apparatus, image processing method, and image processing program | |
JP2007201679A (en) | Imaging apparatus, image processing method, and image processing program | |
JP2006197460A (en) | Image processing method, image processor, image processing program and image pickup device | |
JP2007188464A (en) | Imaging apparatus, image processor, image processing method, and image processing program | |
JP2007228132A (en) | Imaging apparatus, image processing apparatus, image processing method and image processing program | |
JP2007293528A (en) | Imaging device, image processing device, image processing method and image processing program | |
JP2006190154A (en) | Image processing method, image processor, image processing program and imaging device | |
JP2007235204A (en) | Imaging apparatus, image processing apparatus, image processing method and image processing program | |
JP2007300348A (en) | Imaging apparatus, and image processing method, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20070827 |