JP2007288245A - Imaging apparatus, image processing method, and image processing program - Google Patents

Imaging apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP2007288245A
JP2007288245A JP2006109766A JP2006109766A JP2007288245A JP 2007288245 A JP2007288245 A JP 2007288245A JP 2006109766 A JP2006109766 A JP 2006109766A JP 2006109766 A JP2006109766 A JP 2006109766A JP 2007288245 A JP2007288245 A JP 2007288245A
Authority
JP
Japan
Prior art keywords
image
index
calculating
image data
coefficient
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
Application number
JP2006109766A
Other languages
Japanese (ja)
Inventor
Jo Nakajima
丈 中嶋
Daisuke Sato
大輔 佐藤
Hiroaki Takano
博明 高野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Konica Minolta Photo Imaging Inc
Original Assignee
Konica Minolta Photo Imaging Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Konica Minolta Photo Imaging Inc filed Critical Konica Minolta Photo Imaging Inc
Priority to JP2006109766A priority Critical patent/JP2007288245A/en
Publication of JP2007288245A publication Critical patent/JP2007288245A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology of applying proper image processing respectively to a live view display image and a recording image. <P>SOLUTION: An imaging apparatus 100 disclosed herein wherein an imaging element 33a acquires a first image for live view display and an imaging element 33b acquires a second image for recording, discriminates a photographing scene on the basis of image data of the first image and applies gradation conversion processing in response to the photographing scene to the first image, and discriminates a photographing scene on the basis of image data of the second image and applies gradation conversion processing in response to the photographing scene to the second image. Moreover, the imaging apparatus 100 calculates an exposure adjustment amount on the basis of a result of the discrimination of the photographing scene of the first image and controls the exposure when acquiring the first image for the live view display and acquiring the second image for the recording on the basis of the exposure adjustment amount. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、カラー画像を取得する撮像装置、画像処理方法及び画像処理プログラムに関する。   The present invention relates to an imaging apparatus that acquires a color image, an image processing method, and an image processing program.

近年、デジタルスチルカメラ(携帯電話機やラップトップパソコン等の機器に組み込まれたものを含む。以下、DSCと略称する。)の普及とともに、DSCで撮影された画像をハードコピー画像として出力したり、CRT等の媒体やDSCに付属の表示装置に表示したりして鑑賞する機会が増えてきている。   In recent years, with the widespread use of digital still cameras (including those incorporated in devices such as mobile phones and laptop computers; hereinafter abbreviated as DSC), images taken with DSC are output as hard copy images, Opportunities for viewing on a medium such as a CRT or a display device attached to a DSC are increasing.

一般的に、DSCで撮影された画像は、撮影時の露出調整の不備等により、そのままでは鑑賞用画像として適切でない場合が多い。   In general, an image photographed by DSC is often not suitable as an image for viewing due to inadequate exposure adjustment at the time of photographing.

そこで、例えば、撮影範囲を複数の領域に分割し、分割領域毎の輝度情報を行方向及び列方向のうち少なくとも一方に平均化した複数の平均輝度情報を得るとともに、撮影範囲内の明るさ変化の傾向を算出することで逆光判別を行い、撮影範囲内の平均輝度値の傾きから露出補正量を算出する方法(特許文献1参照)や、DSCの撮影時に、分割測光結果から画面内コントラストの強弱や輝度分布状態等の被写体情報を得て、この被写体情報から画像データの階調変換特性を適正化する方法(特許文献2参照)が提案されている。
特開2002−296635号公報 特開2001−54014号公報
Therefore, for example, the shooting range is divided into a plurality of areas, and brightness information for each divided area is averaged in at least one of the row direction and the column direction to obtain a plurality of average brightness information, and the brightness change in the shooting range Calculating the exposure compensation amount based on the gradient of the average luminance value within the shooting range (see Patent Document 1), or when taking a DSC image, the in-screen contrast is calculated from the divided photometry results. There has been proposed a method (see Patent Document 2) in which subject information such as intensity and luminance distribution state is obtained and tone conversion characteristics of image data are optimized from the subject information.
JP 2002-296635 A JP 2001-54014 A

しかしながら、特許文献1に記載された方法では、典型的な逆光撮影の場合には正しく逆光を判定することができるが、輝度情報のみを用いているため、典型的な構図に当てはまらない場合には正しく撮影シーンを判別できないという問題があった。また、特許文献1では、平均輝度値の傾きから露出補正量を算出しているが、必ずしも主要被写体の明るさを考慮したものではなく、撮影シーンを定量的に表したものではないという問題があった。また、特許文献2では、コントラストの強弱によって階調変換特性を変更しているが、撮影シーンを高精度に判別することができないため、撮影シーンに応じて適切な階調を選択することができないという問題があった。   However, in the method described in Patent Document 1, it is possible to correctly determine backlight in the case of typical backlight photography. However, since only luminance information is used, when the typical composition does not apply. There was a problem that the shooting scene could not be correctly identified. In Patent Document 1, the exposure correction amount is calculated from the slope of the average luminance value, but it does not necessarily take into account the brightness of the main subject and does not quantitatively represent the shooting scene. there were. In Patent Document 2, the gradation conversion characteristics are changed depending on the contrast level. However, since the shooting scene cannot be determined with high accuracy, an appropriate gradation cannot be selected according to the shooting scene. There was a problem.

また、近年、ライブビュー表示用の撮像素子と、記録用の撮像素子とを別々に持つ一眼レフレックス方式のDSCが提案されている。このようなDSCにおいても、撮影時の露出調整の不備等により、そのままではライブビューで鑑賞する画像及び記録用の画像として最適な画像を得ることができない場合が多い。   In recent years, a single-lens reflex type DSC having an image sensor for live view display and an image sensor for recording has been proposed. Even in such a DSC, due to inadequate exposure adjustment at the time of shooting, it is often impossible to obtain an optimal image as an image to be viewed in live view and an image for recording.

一般的に、このようなDSCでは、記録用の撮像素子は高解像度でノイズの少ないものが用いられ、ライブビュー表示用の撮像素子はコストダウンのため低解像度のものが用いられるので、同一対象を撮像した場合でも異なる画像データとなる。記録用、ライブビュー表示用の画像として最適なものとするためには、それぞれの画像データに対して個別に適正な画像処理を行うことが重要である。   In general, such a DSC uses a recording image sensor with high resolution and low noise, and an image sensor for live view display uses a low-resolution image sensor for cost reduction. Even when an image is captured, different image data is obtained. In order to optimize the image for recording and live view display, it is important to appropriately perform appropriate image processing on each image data.

本発明は、上記の従来技術における問題に鑑みてなされたものであって、ライブビュー表示用の画像と記録用の画像それぞれに対して、適正な画像処理を行うことを課題とする。   The present invention has been made in view of the above problems in the prior art, and an object of the present invention is to perform appropriate image processing on each of the live view display image and the recording image.

上記課題を解決するために、請求項1に記載の撮像装置は、第1の撮像素子により、ライブビュー表示用の第1の画像を取得する第1の撮像手段と、第2の撮像素子により、記録用の第2の画像を取得する第2の撮像手段と、前記第1の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別し、前記第2の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別するシーン判別処理手段と、を備えたことを特徴とする。   In order to solve the above-described problem, an imaging apparatus according to claim 1 includes a first imaging unit that acquires a first image for live view display using a first imaging element, and a second imaging element. A second imaging means for acquiring a second image for recording; and a scene of the first image is determined based on the image data of the first image; and the image data of the second image And a scene discrimination processing means for discriminating a shooting scene of the second image.

請求項2に記載の発明は、請求項1に記載の撮像装置において、前記シーン判別処理手段による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の画像に対する階調処理条件を設定する第1の階調処理条件設定手段を備えたことを特徴とする。   According to a second aspect of the present invention, in the imaging device according to the first aspect, a gradation processing condition for the first image is based on a determination result of a shooting scene of the first image by the scene determination processing unit. The first gradation processing condition setting means for setting is provided.

請求項3に記載の発明は、請求項1又は2に記載の撮像装置において、前記シーン判別処理手段による前記第2の画像の撮影シーンの判別結果に基づいて、前記第2の画像に対する階調処理条件を設定する第2の階調処理条件設定手段を備えたことを特徴とする。   According to a third aspect of the present invention, in the imaging device according to the first or second aspect, a gradation for the second image is determined based on a determination result of a shooting scene of the second image by the scene determination processing unit. A second gradation processing condition setting means for setting a processing condition is provided.

請求項4に記載の発明は、請求項1〜3の何れか一項に記載の撮像装置において、前記シーン判別処理手段による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の撮像手段の露出調整量を算出する露出調整量算出手段と、前記露出調整量算出手段により算出された露出調整量に基づいて、前記第1の撮像手段の露出を制御する第1の露出制御手段と、を備えたことを特徴とする。   According to a fourth aspect of the present invention, in the imaging device according to any one of the first to third aspects, the first scene is based on a discrimination result of a shooting scene of the first image by the scene discrimination processing unit. An exposure adjustment amount calculating means for calculating an exposure adjustment amount of the imaging means, and a first exposure control for controlling the exposure of the first imaging means based on the exposure adjustment amount calculated by the exposure adjustment amount calculating means. Means.

請求項5に記載の発明は、請求項4に記載の撮像装置において、前記第2の撮像手段により前記第2の画像を取得する直前に算出された前記露出調整量に基づいて、前記第2の撮像手段の露出を制御する第2の露出制御手段を備えたことを特徴とする。   According to a fifth aspect of the present invention, in the imaging apparatus according to the fourth aspect, the second imaging unit is configured to perform the second adjustment based on the exposure adjustment amount calculated immediately before the second imaging unit acquires the second image. The second exposure control means for controlling the exposure of the imaging means is provided.

請求項6に記載の発明は、請求項1〜5の何れか一項に記載の撮像装置において、前記第1の撮像手段により取得された第1の画像から画像サイズを縮小した第3の画像を取得する第3の画像取得手段を備え、前記シーン判別処理手段は、前記第3の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別することを特徴とする。   According to a sixth aspect of the present invention, in the imaging apparatus according to any one of the first to fifth aspects, a third image obtained by reducing the image size from the first image acquired by the first imaging means. And a scene discrimination processing unit for discriminating a shooting scene of the first image based on image data of the third image.

請求項7に記載の発明は、請求項1〜6の何れか一項に記載の撮像装置において、前記第2の撮像手段により取得された第2の画像から画像サイズを縮小した第4の画像を取得する第4の画像取得手段を備え、前記シーン判別処理手段は、前記第4の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別することを特徴とする。   A seventh aspect of the present invention is the imaging apparatus according to any one of the first to sixth aspects, wherein the image size is reduced from the second image acquired by the second imaging unit. And a scene determination processing unit for determining a shooting scene of the second image based on image data of the fourth image.

請求項8に記載の発明は、請求項6に記載の撮像装置において、前記シーン判別処理手段は、前記第3の画像の画像データから色情報を取得する色情報取得手段と、前記取得された色情報に基づいて、前記第3の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、前記取得された色情報に基づいて、前記第3の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出手段と、前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出手段と、前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出手段と、少なくとも前記第3の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出手段と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出手段と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出手段と、前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第1の画像の撮影シーンを特定するシーン判別手段と、を備えたことを特徴とする。   According to an eighth aspect of the present invention, in the imaging apparatus according to the sixth aspect, the scene determination processing unit includes a color information acquisition unit that acquires color information from image data of the third image, and the acquired Based on the color information, the image data of the third image is classified into a class composed of a combination of predetermined brightness and hue, and the ratio of the third image to the entire image data is classified for each classified class. A first occupancy ratio calculating means for calculating a first occupancy ratio to be displayed, and a class composed of a combination of the distance from the outer edge of the screen and the brightness based on the acquired color information. Second occupancy ratio calculating means for calculating a second occupancy ratio indicating the ratio of the third image to the entire image data for each of the classified classes, and the first occupancy ratio Multiply by preset first coefficient The first index calculating means for calculating the first index and the second index for calculating the second index by multiplying the first occupancy by a second coefficient set in advance. A calculation means; a third index calculation means for calculating a third index by multiplying the second occupancy by a preset third coefficient; and at least the image data of the third image. A fourth index calculating means for calculating a fourth index by multiplying the average luminance of the skin color in the center of the screen by a preset fourth coefficient; the first index; and the second index. And a fifth index calculating means for calculating a fifth index by multiplying at least one of the third indices by a preset fifth coefficient, the first index, At least one of the second index and the third index The sixth index calculating means for calculating the sixth index by multiplying the index by a preset sixth coefficient, the fourth index, the fifth index, and the sixth index. And a scene discriminating unit for identifying a shooting scene of the first image.

請求項9に記載の発明は、請求項7に記載の撮像装置において、前記シーン判別処理手段は、前記第4の画像の画像データから色情報を取得する色情報取得手段と、前記取得された色情報に基づいて、前記第4の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、前記取得された色情報に基づいて、前記第4の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出手段と、前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出手段と、前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出手段と、少なくとも前記第4の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出手段と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出手段と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出手段と、前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第2の画像の撮影シーンを特定するシーン判別手段と、を備えたことを特徴とする。   According to a ninth aspect of the present invention, in the imaging device according to the seventh aspect, the scene discrimination processing means includes color information acquisition means for acquiring color information from image data of the fourth image, and the acquired Based on the color information, the image data of the fourth image is classified into a class composed of a combination of a predetermined brightness and hue, and the ratio of the fourth image to the entire image data for each classified class. A first occupancy ratio calculating means for calculating a first occupancy ratio to be displayed, and a class composed of a combination of the distance from the outer edge of the screen and the brightness based on the acquired color information. Second occupancy ratio calculating means for calculating a second occupancy ratio indicating the ratio of the fourth image to the entire image data for each of the classified classes, and the first occupancy ratio Multiply with a preset first coefficient The first index calculating means for calculating the first index and the second index for calculating the second index by multiplying the first occupancy by a second coefficient set in advance. A calculating means; a third index calculating means for calculating a third index by multiplying the second occupancy by a preset third coefficient; and at least image data of the fourth image. A fourth index calculating means for calculating a fourth index by multiplying the average luminance of the skin color in the center of the screen by a preset fourth coefficient; the first index; and the second index. And a fifth index calculating means for calculating a fifth index by multiplying at least one of the third indices by a preset fifth coefficient, the first index, At least one of the second index and the third index The sixth index calculating means for calculating the sixth index by multiplying the index by a preset sixth coefficient, the fourth index, the fifth index, and the sixth index. And a scene discriminating unit for specifying a shooting scene of the second image.

請求項10に記載の画像処理方法は、第1の撮像素子により、ライブビュー表示用の第1の画像を取得する第1の撮像工程と、第2の撮像素子により、記録用の第2の画像を取得する第2の撮像工程と、前記第1の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別し、前記第2の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別するシーン判別処理工程と、を含むことを特徴とする。   The image processing method according to claim 10 is a first imaging step of acquiring a first image for live view display by the first imaging element, and a second recording element by the second imaging element. A shooting scene of the first image is determined based on a second imaging step of acquiring an image and image data of the first image, and the second image processing is performed based on the image data of the second image. And a scene discrimination processing step for discriminating a shooting scene of the image.

請求項11に記載の発明は、請求項10に記載の画像処理方法において、前記シーン判別処理工程における前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の画像に対する階調処理条件を設定する第1の階調処理条件設定工程を含むことを特徴とする。   According to an eleventh aspect of the present invention, in the image processing method according to the tenth aspect, a gradation process for the first image is performed based on a determination result of a shooting scene of the first image in the scene determination processing step. A first gradation processing condition setting step for setting conditions is included.

請求項12に記載の発明は、請求項10又は11に記載の画像処理方法において、前記シーン判別処理工程における前記第2の画像の撮影シーンの判別結果に基づいて、前記第2の画像に対する階調処理条件を設定する第2の階調処理条件設定工程を含むことを特徴とする。   According to a twelfth aspect of the present invention, in the image processing method according to the tenth or eleventh aspect of the present invention, a floor for the second image is determined based on a determination result of a shooting scene of the second image in the scene determination processing step. A second gradation processing condition setting step for setting the tone processing conditions is included.

請求項13に記載の発明は、請求項10〜12の何れか一項に記載の画像処理方法において、前記シーン判別処理工程における前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の撮像工程における露出調整量を算出する露出調整量算出工程と、前記露出調整量算出工程において算出された露出調整量に基づいて、前記第1の撮像工程における露出を制御する第1の露出制御工程と、を含むことを特徴とする。   According to a thirteenth aspect of the present invention, in the image processing method according to any one of the tenth to twelfth aspects of the present invention, the first scene is based on a determination result of a shooting scene of the first image in the scene determination processing step. An exposure adjustment amount calculating step for calculating an exposure adjustment amount in one imaging step, and a first exposure for controlling exposure in the first imaging step based on the exposure adjustment amount calculated in the exposure adjustment amount calculating step. And a control step.

請求項14に記載の発明は、請求項13に記載の画像処理方法において、前記第2の撮像工程において前記第2の画像を取得する直前に算出された前記露出調整量に基づいて、前記第2の撮像工程における露出を制御する第2の露出制御工程を含むことを特徴とする。   According to a fourteenth aspect of the present invention, in the image processing method according to the thirteenth aspect, based on the exposure adjustment amount calculated immediately before obtaining the second image in the second imaging step. And a second exposure control step for controlling exposure in the second imaging step.

請求項15に記載の発明は、請求項10〜14の何れか一項に記載の画像処理方法において、前記第1の撮像工程において取得された第1の画像から画像サイズを縮小した第3の画像を取得する第3の画像取得工程を含み、前記シーン判別処理工程では、前記第3の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別することを特徴とする。   A fifteenth aspect of the present invention is the image processing method according to any one of the tenth to fourteenth aspects, wherein a third image size is reduced from the first image acquired in the first imaging step. A third image acquisition step of acquiring an image, wherein the scene determination processing step determines a shooting scene of the first image based on image data of the third image;

請求項16に記載の発明は、請求項10〜15の何れか一項に記載の画像処理方法において、前記第2の撮像工程において取得された第2の画像から画像サイズを縮小した第4の画像を取得する第4の画像取得工程を含み、前記シーン判別処理工程では、前記第4の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別することを特徴とする。   According to a sixteenth aspect of the present invention, in the image processing method according to any one of the tenth to fifteenth aspects, the fourth image size is reduced from the second image acquired in the second imaging step. Including a fourth image acquisition step of acquiring an image, wherein the scene determination processing step determines a shooting scene of the second image based on image data of the fourth image.

請求項17に記載の発明は、請求項15に記載の画像処理方法において、前記シーン判別処理工程は、前記第3の画像の画像データから色情報を取得する色情報取得工程と、前記取得された色情報に基づいて、前記第3の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出工程と、前記取得された色情報に基づいて、前記第3の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出工程と、前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出工程と、前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出工程と、前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出工程と、少なくとも前記第3の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出工程と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出工程と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出工程と、前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第1の画像の撮影シーンを特定するシーン判別工程と、を含むことを特徴とする。   According to a seventeenth aspect of the present invention, in the image processing method according to the fifteenth aspect, the scene determination processing step includes a color information acquisition step of acquiring color information from image data of the third image, and the acquired information. Based on the color information, the image data of the third image is classified into a class composed of a combination of a predetermined brightness and hue, and the ratio of the classified image to the entire image data of the third image A first occupancy ratio calculating step for calculating a first occupancy ratio indicating the image data of the third image based on the acquired color information and a combination of the distance from the outer edge of the screen and the brightness. A second occupancy ratio calculating step for classifying into a class and calculating a second occupancy ratio indicating the ratio of the third image to the entire image data for each of the classified classes; and the first occupancy ratio The first coefficient preset in A first index calculating step for calculating the first index by calculating, and a second index for calculating the second index by multiplying the first occupancy by a preset second coefficient. Index calculation step, a third index calculation step of calculating a third index by multiplying the second occupancy by a preset third coefficient, and an image of at least the third image A fourth index calculating step of calculating a fourth index by multiplying the average brightness of the skin color in the central portion of the screen of data by a preset fourth coefficient; the first index; and the second index A fifth index calculating step of calculating a fifth index by multiplying at least one of the third index and the third index by a preset fifth coefficient; and the first index At least of the indicator, the second indicator, and the third indicator A sixth index calculation step of calculating a sixth index by multiplying one or more indices by a preset sixth coefficient, the fourth index, the fifth index, and the sixth index And a scene determination step for specifying a shooting scene of the first image based on the index.

請求項18に記載の発明は、請求項16に記載の画像処理方法において、前記シーン判別処理工程は、前記第4の画像の画像データから色情報を取得する色情報取得工程と、前記取得された色情報に基づいて、前記第4の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出工程と、前記取得された色情報に基づいて、前記第4の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出工程と、前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出工程と、前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出工程と、前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出工程と、少なくとも前記第4の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出工程と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出工程と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出工程と、前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第2の画像の撮影シーンを特定するシーン判別工程と、を含むことを特徴とする。   According to an eighteenth aspect of the present invention, in the image processing method according to the sixteenth aspect, the scene determination processing step includes a color information acquisition step of acquiring color information from image data of the fourth image, and the acquired information. Based on the obtained color information, the image data of the fourth image is classified into a class composed of a combination of a predetermined lightness and hue, and a ratio of the classified image class to the entire image data of the fourth image A first occupancy ratio calculating step for calculating a first occupancy ratio indicating the image data of the fourth image based on the acquired color information and a combination of the distance from the outer edge of the screen and the brightness. A second occupancy ratio calculating step for classifying into a class and calculating a second occupancy ratio indicating the ratio of the fourth image to the entire image data for each of the classified classes; and the first occupancy ratio The first coefficient preset in A first index calculating step for calculating the first index by calculating, and a second index for calculating the second index by multiplying the first occupancy by a preset second coefficient. Index calculation step, a third index calculation step of calculating a third index by multiplying the second occupancy by a preset third coefficient, and an image of at least the fourth image A fourth index calculating step of calculating a fourth index by multiplying the average brightness of the skin color in the central portion of the screen of data by a preset fourth coefficient; the first index; and the second index A fifth index calculating step of calculating a fifth index by multiplying at least one of the third index and the third index by a preset fifth coefficient; and the first index At least of the indicator, the second indicator, and the third indicator A sixth index calculation step of calculating a sixth index by multiplying one or more indices by a preset sixth coefficient, the fourth index, the fifth index, and the sixth index And a scene determination step for specifying a shooting scene of the second image based on the index.

請求項19に記載の発明は、コンピュータに、第1の撮像素子により、ライブビュー表示用の第1の画像を取得する第1の撮像機能と、第2の撮像素子により、記録用の第2の画像を取得する第2の撮像機能と、前記第1の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別し、前記第2の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別するシーン判別処理機能と、を実現させるための画像処理プログラムである。   According to a nineteenth aspect of the present invention, a first image capturing function for acquiring a first image for live view display by a first image sensor and a second image sensor for recording by a second image sensor. A shooting scene of the first image is determined based on the second imaging function for acquiring the image of the first image and the image data of the first image, and the first scene is determined based on the image data of the second image. 2 is an image processing program for realizing a scene discrimination processing function for discriminating a shooting scene of the second image.

請求項20に記載の発明は、請求項19に記載の画像処理プログラムにおいて、前記コンピュータに、さらに、前記シーン判別処理機能による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の画像に対する階調処理条件を設定する第1の階調処理条件設定機能を実現させることを特徴とする。   According to a twentieth aspect of the present invention, in the image processing program according to the nineteenth aspect of the present invention, the computer further includes the first image based on a determination result of a shooting scene of the first image by the scene determination processing function. A first gradation processing condition setting function for setting gradation processing conditions for the image is realized.

請求項21に記載の発明は、請求項19又は20に記載の画像処理プログラムにおいて、前記コンピュータに、さらに、前記シーン判別処理機能による前記第2の画像の撮影シーンの判別結果に基づいて、前記第2の画像に対する階調処理条件を設定する第2の階調処理条件設定機能を実現させることを特徴とする。   According to a twenty-first aspect of the present invention, in the image processing program according to the nineteenth or twentieth aspect, the computer further includes a determination result of a shooting scene of the second image by the scene determination processing function. A second gradation processing condition setting function for setting a gradation processing condition for the second image is realized.

請求項22に記載の発明は、請求項19〜21の何れか一項に記載の画像処理プログラムにおいて、前記コンピュータに、さらに、前記シーン判別処理機能による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の撮像機能における露出調整量を算出する露出調整量算出機能と、前記露出調整量算出機能により算出された露出調整量に基づいて、前記第1の撮像機能における露出を制御する第1の露出制御機能と、を実現させることを特徴とする。   According to a twenty-second aspect of the present invention, in the image processing program according to any one of the nineteenth to twenty-first aspects, the computer further includes a discrimination result of the shooting scene of the first image by the scene discrimination processing function. Based on the exposure adjustment amount calculation function for calculating the exposure adjustment amount in the first imaging function, and the exposure adjustment amount calculated by the exposure adjustment amount calculation function, the exposure in the first imaging function is calculated. And a first exposure control function to be controlled.

請求項23に記載の発明は、請求項22に記載の画像処理プログラムにおいて、前記コンピュータに、さらに、前記第2の撮像機能により前記第2の画像を取得する直前に算出された前記露出調整量に基づいて、前記第2の撮像機能における露出を制御する第2の露出制御機能を実現させることを特徴とする。   According to a twenty-third aspect of the present invention, in the image processing program according to the twenty-second aspect, the exposure adjustment amount calculated immediately before the computer further acquires the second image by the second imaging function. And a second exposure control function for controlling exposure in the second imaging function.

請求項24に記載の発明は、請求項19〜23の何れか一項に記載の画像処理プログラムにおいて、前記コンピュータに、さらに、前記第1の撮像機能により取得された第1の画像から画像サイズを縮小した第3の画像を取得する第3の画像取得機能を実現させ、前記シーン判別処理機能は、前記第3の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別することを特徴とする。   According to a twenty-fourth aspect of the present invention, in the image processing program according to any one of the nineteenth to twenty-third aspects, an image size is further calculated from the first image acquired by the first imaging function in the computer. A third image acquisition function for acquiring a reduced third image, and the scene determination processing function determines a shooting scene of the first image based on image data of the third image It is characterized by that.

請求項25に記載の発明は、請求項19〜24の何れか一項に記載の画像処理プログラムにおいて、前記コンピュータに、さらに、前記第2の撮像機能により取得された第2の画像から画像サイズを縮小した第4の画像を取得する第4の画像取得機能を実現させ、前記シーン判別処理機能は、前記第4の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別することを特徴とする。   The invention according to claim 25 is the image processing program according to any one of claims 19 to 24, wherein the image size is further calculated from the second image acquired by the second imaging function in the computer. A fourth image acquisition function for acquiring a reduced fourth image, and the scene determination processing function determines a shooting scene of the second image based on image data of the fourth image It is characterized by that.

請求項26に記載の発明は、請求項24に記載の画像処理プログラムにおいて、前記シーン判別処理機能は、前記第3の画像の画像データから色情報を取得する色情報取得機能と、前記取得された色情報に基づいて、前記第3の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出機能と、前記取得された色情報に基づいて、前記第3の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出機能と、前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出機能と、前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出機能と、前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出機能と、少なくとも前記第3の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出機能と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出機能と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出機能と、前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第1の画像の撮影シーンを特定するシーン判別機能と、を含むことを特徴とする。   According to a twenty-sixth aspect of the present invention, in the image processing program according to the twenty-fourth aspect, the scene determination processing function includes a color information acquisition function for acquiring color information from image data of the third image, and the acquired information. Based on the color information, the image data of the third image is classified into a class composed of a combination of a predetermined brightness and hue, and the ratio of the classified image to the entire image data of the third image A first occupancy ratio calculation function for calculating a first occupancy ratio indicating the image data of the third image based on the acquired color information and a combination of the distance from the outer edge of the screen and the brightness. A second occupancy ratio calculation function for classifying the class into a class and calculating a second occupancy ratio indicating the ratio of the third image to the entire image data for each of the classified classes; and the first occupancy ratio The first preset to A second index is calculated by multiplying the first index calculation function for calculating the first index by multiplying the number and a second coefficient set in advance to the first occupation ratio. A second index calculating function; a third index calculating function for calculating a third index by multiplying the second occupancy by a preset third coefficient; and at least the third image. A fourth index calculation function for calculating a fourth index by multiplying the average brightness of the skin color in the center of the screen of the image data by a preset fourth coefficient, the first index, A fifth index calculation function for calculating a fifth index by multiplying at least one of the second index and the third index by a preset fifth coefficient; Less than 1 index, 2nd index and 3rd index A sixth index calculation function for calculating a sixth index by multiplying at least one index by a preset sixth coefficient, the fourth index, the fifth index, and the And a scene discrimination function for specifying a shooting scene of the first image based on a sixth index.

請求項27に記載の発明は、請求項25に記載の画像処理プログラムにおいて、前記シーン判別処理機能は、前記第4の画像の画像データから色情報を取得する色情報取得機能と、前記取得された色情報に基づいて、前記第4の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出機能と、前記取得された色情報に基づいて、前記第4の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出機能と、前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出機能と、前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出機能と、前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出機能と、少なくとも前記第4の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出機能と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出機能と、前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出機能と、前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第2の画像の撮影シーンを特定するシーン判別機能と、を含むことを特徴とする。   According to a twenty-seventh aspect of the present invention, in the image processing program according to the twenty-fifth aspect, the scene determination processing function includes a color information acquisition function for acquiring color information from image data of the fourth image, and the acquired information. Based on the obtained color information, the image data of the fourth image is classified into a class composed of a combination of a predetermined lightness and hue, and a ratio of the classified image class to the entire image data of the fourth image A first occupancy ratio calculating function for calculating a first occupancy ratio indicating the image data of the fourth image based on the acquired color information and a combination of the distance from the outer edge of the screen and the brightness. A second occupancy ratio calculation function that classifies the class and calculates a second occupancy ratio indicating the ratio of the fourth image to the entire image data for each of the classified classes; and the first occupancy ratio The first preset to A second index is calculated by multiplying the first index calculation function for calculating the first index by multiplying the number and a second coefficient set in advance to the first occupation ratio. A second index calculating function; a third index calculating function for calculating a third index by multiplying the second occupancy by a preset third coefficient; and at least the fourth image. A fourth index calculation function for calculating a fourth index by multiplying the average brightness of the skin color in the center of the screen of the image data by a preset fourth coefficient, the first index, A fifth index calculation function for calculating a fifth index by multiplying at least one of the second index and the third index by a preset fifth coefficient; Less than 1 index, 2nd index and 3rd index A sixth index calculation function for calculating a sixth index by multiplying at least one index by a preset sixth coefficient, the fourth index, the fifth index, and the And a scene determination function for specifying a shooting scene of the second image based on a sixth index.

請求項1、10、19に記載の発明によれば、ライブビュー表示用の第1の画像と記録用の第2の画像の撮影シーンをそれぞれ判別するので、第1の画像と第2の画像それぞれに対して、適正な画像処理を行うことができる。   According to the first, tenth, and nineteenth aspects, the first scene and the second image are determined because the shooting scenes of the first image for live view display and the second image for recording are determined. Appropriate image processing can be performed on each of them.

請求項2、11、20に記載の発明によれば、第1の画像の撮影シーンに応じた階調処理条件を設定するので、第1の画像に対して、適正な階調変換処理を行うことができる。   According to the second, eleventh and twentieth aspects of the present invention, the gradation processing conditions corresponding to the shooting scene of the first image are set, so that appropriate gradation conversion processing is performed on the first image. be able to.

請求項3、12、21に記載の発明によれば、第2の画像の撮影シーンに応じた階調処理条件を設定するので、第2の画像に対して、適正な階調変換処理を行うことができる。   According to the third, twelfth, and twenty-first aspects of the present invention, since the gradation processing condition is set according to the shooting scene of the second image, an appropriate gradation conversion process is performed on the second image. be able to.

請求項4、13、22に記載の発明によれば、第1の画像の撮影シーンに応じた露出調整量に基づいて、第1の画像を取得する際の露出を制御するので、適正な露出制御を行うことができる。   According to the invention described in claims 4, 13 and 22, the exposure at the time of acquiring the first image is controlled based on the exposure adjustment amount according to the shooting scene of the first image. Control can be performed.

請求項5、14、23に記載の発明によれば、第1の画像の撮影シーンに応じた露出調整量に基づいて、第2の画像を取得する際の露出を制御するので、適正な露出制御を行うことができる。   According to the invention described in claims 5, 14, and 23, since the exposure at the time of acquiring the second image is controlled based on the exposure adjustment amount according to the shooting scene of the first image, the appropriate exposure is achieved. Control can be performed.

請求項6、7、15、16、24、25に記載の発明によれば、画像サイズを縮小した画像の画像データに基づいて、撮影シーンを判別するので、処理の高速化を図ることができる。   According to the sixth, seventh, fifteenth, sixteenth, twenty-fourth and twenty-fifth aspects of the present invention, the shooting scene is determined based on the image data of the image whose image size is reduced, so that the processing speed can be increased. .

請求項8、9、17、18、26、27に記載の発明によれば、撮影シーンを正確に特定することができる。   According to the invention described in claims 8, 9, 17, 18, 26, and 27, it is possible to accurately specify the shooting scene.

(撮像装置100の構成)
まず、本発明の実施形態における撮像装置100の構成について説明する。
図1(a)は、撮像装置100の前面図であり、図1(b)は、撮像装置100の背面図である。撮像装置100は、デジタルカメラであり、金属又は合成樹脂等の材料で構成された筐体1の内部又は表面に、方向選択キー2、撮影光学系3、フラッシュ4、ファインダ5、電源スイッチ6、表示部7、レリーズボタン8が設けられている。
(Configuration of Imaging Device 100)
First, the configuration of the imaging apparatus 100 according to the embodiment of the present invention will be described.
1A is a front view of the imaging apparatus 100, and FIG. 1B is a rear view of the imaging apparatus 100. The imaging device 100 is a digital camera, and has a direction selection key 2, a photographing optical system 3, a flash 4, a finder 5, a power switch 6, on the inside or the surface of a housing 1 made of a material such as metal or synthetic resin. A display unit 7 and a release button 8 are provided.

図2に、撮像装置100の内部構成を示す。撮像装置100は、図2に示すように、プロセッサ31、メモリ32、ライブビュー表示用の撮像素子33a、記録用の撮像素子33b、撮影光学系3、画像データ出力部34、操作部35、タイミングジェネレータ36、シャッタユニット37、絞りユニット38、フォーカスユニット39、表示部7により構成される。プロセッサ31は、画像処理を行う画像処理部10と、撮影制御や撮影画像の処理を行う撮影処理部20とを含む。   FIG. 2 shows an internal configuration of the imaging apparatus 100. As shown in FIG. 2, the imaging apparatus 100 includes a processor 31, a memory 32, an image sensor 33a for live view display, an image sensor 33b for recording, an imaging optical system 3, an image data output unit 34, an operation unit 35, timing. The generator 36, the shutter unit 37, the aperture unit 38, the focus unit 39, and the display unit 7 are configured. The processor 31 includes an image processing unit 10 that performs image processing, and a photographing processing unit 20 that performs photographing control and processing of photographed images.

方向選択キー2は、上下左右の4方向を選択可能なキーであり、ユーザが種々のモードを選択又は設定するためのものである。   The direction selection key 2 is a key that can select four directions, up, down, left, and right, and is used by the user to select or set various modes.

撮影光学系3は、複数のレンズ、鏡胴等によって構成され、ズーム機能を有している。撮影光学系3は、レンズが受光した光をCCD(Charge Coupled Device)等の撮像素子33a,33bに結像させる。フラッシュ4は、被写体輝度が低い時に、プロセッサ31からの制御信号により補助光を照射する。   The photographing optical system 3 includes a plurality of lenses, a lens barrel, and the like, and has a zoom function. The photographing optical system 3 forms an image of light received by the lens on imaging elements 33a and 33b such as a CCD (Charge Coupled Device). The flash 4 emits auxiliary light according to a control signal from the processor 31 when the subject brightness is low.

ファインダ5は、ユーザが接眼して撮影対象及び撮影領域を確認するための接眼式のファインダである。撮影光学系3のレンズを介して入射した光(被写体像)は、図示しないハーフミラー及びプリズム等を介して、ファインダ5に到達する。すなわち、ファインダ5は光学式ファインダである。   The viewfinder 5 is an eyepiece type viewfinder for allowing the user to check his / her shooting target and shooting area by eyepiece. The light (subject image) incident through the lens of the photographing optical system 3 reaches the finder 5 through a half mirror and a prism (not shown). That is, the finder 5 is an optical finder.

電源スイッチ6は、撮像装置100における動作のON/OFFを操作するためのスイッチである。   The power switch 6 is a switch for operating ON / OFF of the operation in the imaging apparatus 100.

表示部7は、液晶パネルにより構成され、プロセッサ31から入力される表示制御信号に従って、撮像素子33aに現在写っている画像、撮像素子33bで記録した画像、メニュー画面、設定画面等を表示する。   The display unit 7 is configured by a liquid crystal panel, and displays an image currently captured on the image sensor 33a, an image recorded by the image sensor 33b, a menu screen, a setting screen, and the like according to a display control signal input from the processor 31.

表示部7は、撮影待機状態において、撮像素子33aにて所定時間毎に取得される画像を表示(ライブビュー表示)し、被写体像をユーザに確認させるビューファインダとして機能する。すなわち、表示部7は電子式ファインダである。また、表示部7は、ファインダ5とは異なり、眼を離した状態でその表示内容を視認するための非接眼式のファインダである。   The display unit 7 functions as a view finder that displays an image (live view display) acquired every predetermined time by the image sensor 33a in a shooting standby state and allows the user to check the subject image. That is, the display unit 7 is an electronic finder. Further, unlike the finder 5, the display unit 7 is a non-ocular finder for visually recognizing the display content while keeping the eyes away.

レリーズボタン8は、ユーザによる半押し状態(予備撮影)と全押し状態(本撮影)とを区別して検出可能な2段階押し込みスイッチである。   The release button 8 is a two-step push switch that can be detected by distinguishing between a half-pressed state (preliminary shooting) and a fully-pressed state (main shooting) by the user.

メモリ32は、撮影によって得られた画像データを記憶(保存)する。また、メモリ32は、撮像装置100において実行される各種処理プログラム及び当該処理プログラムで利用されるデータ等を記憶する。   The memory 32 stores (saves) image data obtained by photographing. Further, the memory 32 stores various processing programs executed in the imaging apparatus 100, data used by the processing programs, and the like.

画像データ出力部34は、保存用の記録媒体(SDメモリカード又はマルチメディアカード(MMC)等)にメモリ32内の画像データを転送し、記録する。あるいは外部装置へ転送する。画像データ出力部34はプロセッサ31により制御される。   The image data output unit 34 transfers and records the image data in the memory 32 to a storage medium for storage (such as an SD memory card or a multimedia card (MMC)). Alternatively, it is transferred to an external device. The image data output unit 34 is controlled by the processor 31.

撮像素子33a,33bは、結像された光を電荷に変換する。これにより、例えば、図12(a)に示すような画像データが得られる。この画像には、撮像範囲(撮影範囲)にある物、すなわち、撮影対象物(撮影の目標物)とそれ以外の物(背景)とが含まれている。この全体画像の各画素のRGB値は、例えば、256階調で表される。撮像素子33aは、ライブビュー表示用の画像(第1の画像)を取得するための撮像素子であり、撮像素子33bは、記録用の画像(第2の画像)を取得するための撮像素子である。   The imaging elements 33a and 33b convert the imaged light into electric charges. Thereby, for example, image data as shown in FIG. This image includes an object in the imaging range (imaging range), that is, an imaging object (imaging target) and other objects (background). The RGB value of each pixel of the entire image is represented by, for example, 256 gradations. The image sensor 33a is an image sensor for acquiring an image for live view display (first image), and the image sensor 33b is an image sensor for acquiring an image for recording (second image). is there.

シャッタユニット37は、レリーズボタン8によって検出された状態(半押し状態又は全押し状態)に基づいて撮像素子33bをリセットするタイミング及び電荷変換を行うタイミング等を制御する。タイミングの制御はタイミングジェネレータ36により行われる。   The shutter unit 37 controls the timing of resetting the image sensor 33b and the timing of charge conversion based on the state (half-pressed state or fully-pressed state) detected by the release button 8. Timing control is performed by the timing generator 36.

撮像素子33a,33bが受光する光量の調節は、絞りユニット38及び/又はシャッタユニット37によって行われる。フォーカスユニット39は、撮影光学系3を駆動させ撮影被写体に対して焦点を合わせる制御動作を実行する。   The diaphragm unit 38 and / or the shutter unit 37 adjust the amount of light received by the imaging elements 33a and 33b. The focus unit 39 drives the photographic optical system 3 to execute a control operation for focusing on the photographic subject.

(撮影処理部20の内部構成)
図3に、撮影処理部20の内部構成を示す。撮影処理部20は、撮影時に撮影条件に関わる制御や、撮影された画像の処理を行う。
(Internal configuration of the imaging processing unit 20)
FIG. 3 shows an internal configuration of the imaging processing unit 20. The shooting processing unit 20 performs control related to shooting conditions during shooting and processing of shot images.

図3に示すように、撮影処理部20は、撮影条件に関わるAE制御部21、AF制御部22、画素補間部23、AWB制御部24、ガンマ補正部25等により構成される。   As shown in FIG. 3, the imaging processing unit 20 includes an AE control unit 21, an AF control unit 22, a pixel interpolation unit 23, an AWB control unit 24, a gamma correction unit 25, and the like related to imaging conditions.

AE制御部21は、画像撮影時にその露出量の自動制御を行う。通常、撮影待機時の露出量制御は、絞り開放でシャッタ速度を制御することによって行われ、撮影時の露出量は絞りとシャッタ速度とで制御される。   The AE control unit 21 automatically controls the exposure amount at the time of image shooting. Normally, the exposure amount control during shooting standby is performed by controlling the shutter speed with the aperture open, and the exposure amount during shooting is controlled by the aperture and shutter speed.

図4(a)のフローチャートを参照して、AE制御部21におけるライブビュー画像を取得する際の露出量制御例を説明する。   With reference to the flowchart of FIG. 4A, an example of exposure amount control when the AE control unit 21 acquires a live view image will be described.

まず、絞りユニット38により、絞りが開放固定絞りに設定される(ステップS111)。AE制御部21により、撮像素子33aによって得られた画像データから所定の測光エリアのデータが読み出され(ステップS112)、輝度値に相当する情報が取得される(ステップS113)。この輝度値に相当する情報としては、簡易的にRGB3色成分のうちのG値が用いられることが多い(以下、これを輝度値データGと呼ぶ)。   First, the diaphragm unit 38 sets the diaphragm to an open fixed diaphragm (step S111). The AE control unit 21 reads data in a predetermined photometric area from the image data obtained by the image sensor 33a (step S112), and acquires information corresponding to the luminance value (step S113). As information corresponding to the luminance value, the G value of the RGB three-color components is often used simply (hereinafter referred to as luminance value data G).

次いで、シーン判別結果より算出された露出調整量が取得される(ステップS114)。ここで取得される露出調整量は、1回前の画像データに基づいて算出された露出調整量である。なお、処理負荷軽減のために、画像データを取得する毎に露出量を算出するのではなく、画像データの取得について複数回毎に1回、露出調整量を算出することとしてもよい。露出調整量の算出については後で述べる。   Next, the exposure adjustment amount calculated from the scene discrimination result is acquired (step S114). The exposure adjustment amount acquired here is an exposure adjustment amount calculated based on the previous image data. In order to reduce the processing load, instead of calculating the exposure amount every time image data is acquired, the exposure adjustment amount may be calculated once every plural times for acquiring image data. The calculation of the exposure adjustment amount will be described later.

次に、輝度値データG及び露出調整量に応じて撮像素子33aの次のフレームにおける電荷蓄積時間が設定され(ステップS115)、タイミングジェネレータ36により、所定の輝度レベルとなるように、次のフレームにおける電荷蓄積時間が制御される(ステップS118)。これがシャッタ速度の制御であり、電荷が蓄積される様子を図5に示す。具体的には、取得した輝度レベルが大きい(明るい)ときは電荷蓄積時間を短くし、輝度レベルが小さい(暗い)ときは電荷蓄積時間を長くし、さらに、シーン判別結果により調整することで、露出量を安定させる。   Next, the charge accumulation time in the next frame of the image sensor 33a is set according to the luminance value data G and the exposure adjustment amount (step S115), and the next frame is set by the timing generator 36 so that the predetermined luminance level is obtained. The charge accumulation time at is controlled (step S118). This is control of the shutter speed, and FIG. 5 shows how charges are accumulated. Specifically, when the acquired luminance level is large (bright), the charge accumulation time is shortened, when the luminance level is small (dark), the charge accumulation time is lengthened. Stabilize exposure.

このように、ライブビュー画像用の露出量制御が行われ、さらに、後に述べる階調変換処理が行われることにより、撮影者は表示部7で最適なライブビュー画像を見ることができる。   As described above, the exposure amount control for the live view image is performed, and further, the gradation conversion process described later is performed, so that the photographer can view the optimum live view image on the display unit 7.

記録用画像の撮影時の露出量制御は、上記のシャッタ速度制御に加えて、絞りの制御も行われる(図4(b)のフローチャート参照)。上記同様に、測光エリアの輝度値データGが取得され(ステップS112、S113)、シーン判別結果より算出された露出調整量が取得される(ステップS114)。ここで取得される露出調整量は、記録用画像の撮影直前に撮像素子33aにより取得された画像データに基づいて算出された露出調整量である。   In addition to the shutter speed control described above, the aperture control is also performed in the exposure amount control during recording image recording (see the flowchart in FIG. 4B). Similarly to the above, the luminance value data G of the photometric area is acquired (steps S112 and S113), and the exposure adjustment amount calculated from the scene discrimination result is acquired (step S114). The exposure adjustment amount acquired here is an exposure adjustment amount calculated based on the image data acquired by the image sensor 33a immediately before the recording image is captured.

次いで、予め定められたプログラム線図のデータに基づいて、輝度値データG及び露出調整量に応じて、絞り値とシャッタ速度(電荷蓄積時間)の組み合わせが設定される(ステップS116)。そして、絞り値に応じて絞りユニット38が制御され(ステップS117)、タイミングジェネレータ36により、所定の輝度レベルとなるように、次のフレームにおける電荷蓄積時間が制御される(ステップS118)。具体的には、取得した輝度レベルが大きい(明るい)ときは絞り値を小さくし、輝度レベルが小さい(暗い)ときは絞り値を大きくし、さらに、シーン判別結果により調整することで、露出量を安定させる。   Next, a combination of the aperture value and the shutter speed (charge accumulation time) is set according to the luminance value data G and the exposure adjustment amount based on data of a predetermined program diagram (step S116). Then, the aperture unit 38 is controlled in accordance with the aperture value (step S117), and the charge accumulation time in the next frame is controlled by the timing generator 36 so as to obtain a predetermined luminance level (step S118). Specifically, when the acquired brightness level is large (bright), the aperture value is decreased, when the acquired brightness level is small (dark), the aperture value is increased. To stabilize.

このように、記録用画像の撮影時に露出量制御が行われ、さらに、後に述べる階調変換処理が行われることにより、撮影者は任意の、あるいは既定の、絞り値とシャッタ速度の組み合わせで、撮影画像に対する露出量設定を自動的に行うことができ、最適な記録用画像を得ることができる。   As described above, the exposure amount control is performed at the time of shooting the recording image, and further, the gradation conversion process described later is performed, so that the photographer can arbitrarily or defaultly combine the aperture value and the shutter speed. It is possible to automatically set the exposure amount for the photographed image and obtain an optimum recording image.

AF制御部22は、画像撮影時に画像の焦点を合わせる自動制御を行う。この合焦点制御は、例えば、図6のフローチャートに示すように、撮影光学系3を駆動することで合焦点位置を検知し、その位置に合わせて停止させることで行われる。   The AF control unit 22 performs automatic control for focusing an image when taking an image. For example, as shown in the flowchart of FIG. 6, this in-focus control is performed by detecting the in-focus position by driving the photographing optical system 3 and stopping it according to the position.

撮影光学系3の駆動が開始されると(ステップS121)、その駆動に伴い逐次、AF制御部22により、撮像素子33aによって得られた画像データから所定の測距エリアのデータが読み出され(ステップS122)、このデータに応じてコントラスト情報が取得される(ステップS123)。これは、合焦点位置に達したかどうかを検知するためであり、次のように判定される。すなわち、コントラスト情報は、測距エリアのデータの各隣接画素間の差を取ることにより、エッジ部のシャープさに依存するように設定、算出されるものであり、測距エリア全体での総和が最大に達した状態が合焦点と判断される(ステップS124、S125)。合焦点位置でないと判断された場合は(ステップS125;No)、撮影光学系3の駆動が継続される(ステップS126)。   When driving of the photographic optical system 3 is started (step S121), data of a predetermined distance measuring area is sequentially read out from the image data obtained by the image sensor 33a by the AF control unit 22 along with the driving (step S121). In step S122, contrast information is acquired according to this data (step S123). This is for detecting whether or not the in-focus position has been reached, and is determined as follows. That is, the contrast information is set and calculated so as to depend on the sharpness of the edge portion by taking the difference between adjacent pixels in the distance measurement area data. The state that has reached the maximum is determined to be the focal point (steps S124 and S125). If it is determined that the focus position is not reached (step S125; No), the driving of the photographing optical system 3 is continued (step S126).

撮影光学系3の移動に伴うコントラスト情報の変化と合焦点位置検出の様子を図7に示す。上記動作は、光学系を駆動しながら逐次コントラスト情報を取得して、合焦点位置を求めるという測距演算が行われたものであり、その焦点距離に合わせて撮影光学系3は停止される(ステップS127)。   FIG. 7 shows changes in contrast information accompanying the movement of the photographic optical system 3 and how the in-focus position is detected. In the above operation, a distance measurement calculation is performed in which contrast information is sequentially acquired while driving the optical system to obtain a focal position, and the photographing optical system 3 is stopped in accordance with the focal length ( Step S127).

このようなAF制御により、撮影時に常に自動的にピントの合った撮影画像を得ることができる。   With such AF control, it is possible to automatically obtain a captured image that is always in focus during shooting.

画素補間部23は、撮像素子33a,33bにおけるRGB各色成分を分散配置したCCD配列に対して、各色成分毎に画素間の補間を行い、同一画素位置で各色成分値が得られるように画像データを処理する。   The pixel interpolation unit 23 performs inter-pixel interpolation for each color component with respect to the CCD array in which the RGB color components in the image pickup devices 33a and 33b are dispersedly arranged, and image data so that each color component value is obtained at the same pixel position. Process.

図8のフローチャートに示すように、画素補間部23は、撮像素子33a,33bによって得られたRGB画像データ(ステップS131)をRGBの各画素フィルタパターンでマスキングし(ステップS132、S134、S136)、その後で平均補間(画素補間ともいう)を行う(ステップS133、S135、S137)。このうち、高帯域にまで画素を有するGの画素フィルタパターンは、周辺4画素の中間2値の平均値に置換して平均補間を行うメディアン(中間値)フィルタであり、RとBの画素フィルタパターンは、周辺9画素から同色に対して平均補間を行うものである。   As shown in the flowchart of FIG. 8, the pixel interpolation unit 23 masks the RGB image data (step S131) obtained by the image sensors 33a and 33b with RGB pixel filter patterns (steps S132, S134, and S136). Thereafter, average interpolation (also referred to as pixel interpolation) is performed (steps S133, S135, and S137). Among these, the G pixel filter pattern having pixels up to a high band is a median filter that performs average interpolation by substituting the average value of the intermediate binary values of the surrounding four pixels, and the R and B pixel filters The pattern performs average interpolation with respect to the same color from 9 neighboring pixels.

AWB制御部24は、撮影画像におけるホワイトバランスを自動的に調整する。撮影された画像は、その中にRGBのカラーバランスがとれている(総和すればホワイト)被写体領域があるものという想定で、その領域のホワイトバランスを達成するように、画像のRGBの各成分値に対するレベル調整を行う。このホワイトバランス処理は、例えば以下のように行われる。   The AWB control unit 24 automatically adjusts the white balance in the captured image. Assuming that the photographed image has a subject area in which RGB color balance is achieved (white when summed up), each component value of RGB of the image is achieved so as to achieve white balance in that area. Adjust the level for. This white balance processing is performed as follows, for example.

図9のフローチャートに示すように、AWB制御部24は、撮像素子33a,33bによって得られた画像データの輝度や彩度のデータから(ステップS141)、本来ホワイトであると思われる領域を推測する(ステップS142)。その領域について、RGB各成分値の平均強度、及びG/R比、G/B比を求め、G値に対するR値、B値の補正ゲインを算出する(ステップS143、S144)。これに基づき、画像全体における各色成分に対するゲインの補正を行う(ステップS145)。   As shown in the flowchart of FIG. 9, the AWB control unit 24 estimates a region that is supposed to be white originally from the luminance and saturation data of the image data obtained by the imaging elements 33a and 33b (step S141). (Step S142). For that region, the average intensity, G / R ratio, and G / B ratio of each RGB component value are obtained, and the R value and B value correction gains for the G value are calculated (steps S143 and S144). Based on this, gain correction for each color component in the entire image is performed (step S145).

このような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.

ガンマ補正部25は、撮影画像の階調性を出力機器のガンマ特性に適するように変換する処理を行う。   The gamma correction unit 25 performs processing for converting the gradation of the captured image so as to be suitable for the gamma characteristic of the output device.

ガンマ特性とは階調特性のことであり、入力階調に対してどのように出力階調を設定するかを補正値あるいは補正曲線等で示すものである。図10に、入力値に対して、補正した出力値を示す補正曲線の例を示す。ガンマ補正は、この補正値あるいは補正曲線等に従い、入力値に対する出力値への変換を行う変換処理である。出力機器によってこの階調特性は異なるため、その出力機器に適した階調とするために、このガンマ特性の補正を行う必要がある。これにより撮影されたリニア画像はノンリニア画像に変換されることになる。   The gamma characteristic is a gradation characteristic, and indicates how an output gradation is set with respect to an input gradation by a correction value or a correction curve. FIG. 10 shows an example of a correction curve indicating the 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.

(画像処理部10の内部構成)
図11に、画像処理部10の内部構成を示す。画像処理部10は、撮像装置100における撮影画像に対して、シーン判別に基づく階調の補正動作を制御するものであり、撮影処理部20での処理後に、あるいはその処理とは独立して、画像取得、シーン判別、階調処理条件設定等の一連の処理を実行する。
(Internal configuration of the image processing unit 10)
FIG. 11 shows an internal configuration of the image processing unit 10. The image processing unit 10 controls a gradation correction operation based on scene discrimination for a captured image in the imaging apparatus 100. After the processing in the imaging processing unit 20, or independently of the processing, A series of processes such as image acquisition, scene discrimination, and gradation processing condition setting are executed.

図11に示すように、画像処理部10は、第1画像取得部11a、第2画像取得部11b、第3画像取得部12a、第4画像取得部12b、占有率算出部13、指標算出部14、シーン判別部15、階調処理条件設定部16、階調変換処理部17、露出調整量算出部18により構成される。   As shown in FIG. 11, the image processing unit 10 includes a first image acquisition unit 11a, a second image acquisition unit 11b, a third image acquisition unit 12a, a fourth image acquisition unit 12b, an occupancy rate calculation unit 13, and an index calculation unit. 14, a scene determination unit 15, a gradation processing condition setting unit 16, a gradation conversion processing unit 17, and an exposure adjustment amount calculation unit 18.

第1画像取得部11aは、撮像素子33aに写った最新の画像の画像データを第1の画像として取得する。また、撮影時における撮影条件も合わせて取得する。取得した第1の画像の画像データ及び撮影条件はメモリ32に保持される。   The first image acquisition unit 11a acquires the image data of the latest image captured on the image sensor 33a as the first image. In addition, the shooting conditions at the time of shooting are also acquired. The acquired image data and shooting conditions of the first image are held in the memory 32.

第3画像取得部12aは、取得した第1の画像を、N×M個の矩形の領域(垂直方向にM個及び水平方向にN個に分割された領域)に分割する。図12(a)に、第1の画像の一例を示し、図12(b)に、当該第1の画像が22×14個の領域に分割された例を示す。なお、分割領域の数は特に限定されない。分割された各領域が第3の画像の画像データの1画素に相当する。すなわち、第3の画像は、実質的に第1の画像の画像サイズが縮小された画像となる。この縮小された画像が第3の画像であり、上記操作により第3の画像を取得することになる。   The third image acquisition unit 12a divides the acquired first image into N × M rectangular regions (regions divided into M pieces in the vertical direction and N pieces in the horizontal direction). 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 regions. The number of divided areas is not particularly limited. Each divided area corresponds to one pixel of image data of the third image. That is, the third image is an image obtained by substantially reducing the image size of the first image. This reduced image is the third image, and the third image is acquired by the above operation.

第2画像取得部11bは、レリーズボタン8が全押しされたタイミングで、撮像素子33bに写った画像の画像データを第2の画像として取得する。また、撮影時における撮影条件も合わせて取得する。取得した第2の画像の画像データ及び撮影条件はメモリ32に保持される。   The second image acquisition unit 11b acquires the image data of the image captured on the image sensor 33b as the second image when the release button 8 is fully pressed. In addition, the shooting conditions at the time of shooting are also acquired. The acquired image data and shooting conditions of the second image are held in the memory 32.

第4画像取得部12bは、取得した第2の画像を、N×M個の矩形の領域(垂直方向にM個及び水平方向にN個に分割された領域)に分割する。分割された各領域が第4の画像の画像データの1画素に相当する。すなわち、第4の画像は、実質的に第2の画像の画像サイズが縮小された画像となる。この縮小された画像が第4の画像であり、上記操作により第4の画像を取得することになる。   The fourth image acquisition unit 12b divides the acquired second image into N × M rectangular regions (regions divided into M pieces in the vertical direction and N pieces in the horizontal direction). Each divided area corresponds to one pixel of the image data of the fourth image. That is, the fourth image is an image obtained by substantially reducing the image size of the second image. This reduced image is the fourth image, and the fourth image is acquired by the above operation.

占有率算出部13は、第3の画像の画像データ又は第4の画像の画像データ、すなわち、縮小された画像を構成する各画素から色情報を取得する。取得された色情報に基づいて、画像の各画素を、明度と色相の組み合わせからなる所定の階級に分類し(図17参照)、分類された階級毎に、当該階級に属する画素が画像全体に占める割合を示す第1の占有率を算出する。   The occupation ratio calculation unit 13 acquires color information from the image data of the third image or the image data of the fourth image, that is, each pixel constituting the reduced image. Based on the acquired color information, each pixel of the image is classified into a predetermined class composed of a combination of lightness and hue (see FIG. 17), and for each classified class, the pixels belonging to the class are included in the entire image. A first occupation ratio indicating the occupation ratio is calculated.

また、占有率算出部13は、各画素を、第3の画像又は第4の画像の画面の外縁からの距離と明度の組み合わせからなる所定の階級に分類し(図18参照)、分類された階級毎に、当該階級に属する画素が画像全体に占める割合を示す第2の占有率を算出する。   Further, the occupancy rate calculation unit 13 classifies each pixel into a predetermined class composed of a combination of the distance from the outer edge of the screen of the third image or the fourth image and the brightness (see FIG. 18), and is classified. For each class, a second occupancy ratio indicating the ratio of pixels belonging to the class to the entire image is calculated.

占有率算出部13において実行される占有率算出処理については、後に図16を参照して詳細に説明する。   The occupation rate calculation process executed in the occupation rate calculation unit 13 will be described in detail later with reference to FIG.

指標算出部14は、占有率算出部13で算出された第1の占有率に、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標1及び指標2を算出する。すなわち、指標算出部14は、第1の指標算出手段及び第2の指標算出手段として機能する。   The index calculation unit 14 multiplies the first occupancy calculated by the occupancy calculation unit 13 by a coefficient set in advance according to the shooting conditions, thereby specifying an index 1 and an index 2 for specifying a shooting scene. Is calculated. That is, the index calculation unit 14 functions as a first index calculation unit and a second index calculation unit.

また、指標算出部14は、占有率算出部13で算出された第2の占有率に、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標3を算出する。すなわち、指標算出部14は、第3の指標算出手段として機能する。   Also, the index calculation unit 14 multiplies the second occupancy calculated by the occupancy rate calculation unit 13 by a coefficient set in advance according to the shooting conditions, thereby obtaining an index 3 for specifying the shooting scene. calculate. That is, the index calculation unit 14 functions as a third index calculation unit.

さらに、指標算出部14は、第3の画像又は第4の画像の画面中央部における肌色領域の平均輝度値(指標7とする)、最大輝度値と平均輝度値との差分値等に、撮影条件に応じて予め設定された係数を乗算することにより、撮影シーンを特定するための指標4を算出する。すなわち、指標算出部14は、第4の指標算出手段として機能する。   Further, the index calculation unit 14 captures the average brightness value (referred to as index 7) of the skin color area in the center of the screen of the third image or the fourth image, the difference value between the maximum brightness value and the average brightness value, and the like. By multiplying a coefficient set in advance according to the condition, an index 4 for specifying the shooting scene is calculated. That is, the index calculation unit 14 functions as a fourth index calculation unit.

また、指標算出部14は、第3の画像又は第4の画像の画面中央部における肌色領域の平均輝度値と、指標1及び指標3に、それぞれ、撮影条件に応じて予め設定された係数を乗算して和をとることにより、新たな指標5を算出する。すなわち、指標算出部14は、第5の指標算出手段として機能する。   In addition, the index calculation unit 14 sets a coefficient set in advance for each of the average luminance value of the skin color area in the center of the screen of the third image or the fourth image, and the index 1 and the index 3, depending on the shooting conditions. A new index 5 is calculated by multiplying and taking the sum. That is, the index calculation unit 14 functions as a fifth index calculation unit.

また、指標算出部14は、第3の画像又は第4の画像の画面中央部における肌色領域の平均輝度値と、指標2及び指標3に、それぞれ、撮影条件に応じて予め設定された係数を乗算して和をとることにより、新たな指標6を算出する。すなわち、指標算出部14は、第6の指標算出手段として機能する。   In addition, the index calculation unit 14 sets coefficients set in advance for the average luminance value of the skin color area in the center of the screen of the third image or the fourth image, and the index 2 and the index 3 according to the shooting conditions. A new index 6 is calculated by multiplying and taking the sum. That is, the index calculation unit 14 functions as a sixth index calculation unit.

指標算出部14において実行される指標算出処理については、後に図19を参照して詳細に説明する。   The index calculation process executed in the index calculation unit 14 will be described in detail later with reference to FIG.

シーン判別部15は、第3の画像の画像データに基づいて算出された各指標に基づいて、第1の画像の撮影シーンを特定し、第4の画像の画像データに基づいて算出された各指標に基づいて、第2の画像の撮影シーンを特定する。ここで、撮影シーンとは、順光、逆光、近接フラッシュ等の被写体を撮影する時の光源条件を示しており、主要被写体(主に人物のことを指すが、これに限るものではない)のオーバー度、アンダー度等もこれに含まれる。撮影シーンの判別方法については、後に詳細に説明する。   The scene determination unit 15 identifies the shooting scene of the first image based on each index calculated based on the image data of the third image, and calculates each of the calculated scenes based on the image data of the fourth image. Based on the index, the shooting scene of the second image is specified. Here, the shooting scene indicates a light source condition when shooting a subject such as a front light, a backlight, a proximity flash, etc., and is a main subject (mainly a person, but is not limited to this). This includes the over and under degrees. The method for determining the shooting scene will be described in detail later.

以上のように、占有率算出部13、指標算出部14、そしてシーン判別部15がシーン判別処理手段として機能する。   As described above, the occupation rate calculation unit 13, the index calculation unit 14, and the scene determination unit 15 function as a scene determination processing unit.

階調処理条件設定部16は、シーン判別部15で判別された第1の画像の撮影シーンに基づいて、第1の画像に対する階調処理条件を設定し、シーン判別部15で判別された第2の画像の撮影シーンに基づいて、第2の画像に対する階調処理条件を設定する。   The gradation processing condition setting unit 16 sets gradation processing conditions for the first image based on the shooting scene of the first image determined by the scene determination unit 15, and the first determination determined by the scene determination unit 15. The gradation processing condition for the second image is set based on the shooting scene of the second image.

階調処理条件設定部16は、まず、指標算出部14で算出された各指標に基づいて、第1の画像又は第2の画像に対する階調調整のための階調調整パラメータを算出し、階調調整パラメータに基づいて、第1の画像又は第2の画像に対する階調処理条件を設定する。階調処理条件の設定については、後に図26を参照して詳細に説明する。   The gradation processing condition setting unit 16 first calculates a gradation adjustment parameter for gradation adjustment for the first image or the second image based on each index calculated by the index calculation unit 14. A gradation processing condition for the first image or the second image is set based on the tone adjustment parameter. The setting of the gradation processing conditions will be described in detail later with reference to FIG.

階調変換処理部17は、階調処理条件設定部16において設定された階調処理条件に基づいて、第1の画像又は第2の画像に対して階調変換処理を行う。   The gradation conversion processing unit 17 performs gradation conversion processing on the first image or the second image based on the gradation processing conditions set by the gradation processing condition setting unit 16.

露出調整量算出部18は、シーン判別部15による第1の画像の撮影シーンの判別結果に基づいて、第1の画像を取得する際の露出調整量を算出する。   The exposure adjustment amount calculation unit 18 calculates an exposure adjustment amount when acquiring the first image based on the result of determining the shooting scene of the first image by the scene determination unit 15.

プロセッサ31は、画像処理部10で行われる処理以外に、公知技術に基づいて、自動ホワイトバランス処理、ガンマ変換処理等の撮影処理部20での処理や、その他の画像処理、画像フォーマット変換、画像データの記録等の処理動作を制御する機能を有する。   In addition to the processing performed in the image processing unit 10, the processor 31 performs processing in the photographing processing unit 20 such as automatic white balance processing and gamma conversion processing, other image processing, image format conversion, image processing, and the like based on known techniques. It has a function of controlling processing operations such as data recording.

またプロセッサ31における各部の処理は、基本的にハードウェア処理によって行われるが、一部についてはメモリ32に記憶(保存)されているプログラムを実行する等してソフトウェア処理によって行われる。   The processing of each unit in the processor 31 is basically performed by hardware processing, but a part thereof is performed by software processing such as executing a program stored (saved) in the memory 32.

(撮像装置100の動作)
次に、本実施形態における撮像装置100の動作について説明する。以下では、撮影対象物を「主要被写体」と呼ぶことにする。
(Operation of Imaging Device 100)
Next, the operation of the imaging apparatus 100 in this embodiment will be described. Hereinafter, the photographing object is referred to as “main subject”.

まず、図13のフローチャートを参照して、撮像装置100において実行されるライブビュー表示処理を説明する。   First, a live view display process executed in the imaging apparatus 100 will be described with reference to a flowchart of FIG.

まず、電源スイッチ6がONに操作されると(電源が投入されると)、メモリ32のリセット等の前処理が行われる。ユーザは、主要被写体が撮像装置100の被写界に入るように撮像装置100をその主要被写体の方に向け、撮影のための操作を関始する。   First, when the power switch 6 is turned on (when the power is turned on), preprocessing such as resetting of the memory 32 is performed. The user starts an operation for shooting by directing the imaging device 100 toward the main subject so that the main subject enters the field of the imaging device 100.

図13に示すように、まず、AE制御部21により、撮像素子33aによって得られた画像データの輝度値データGに基づいて、AE露出量が算出される(ステップS151)。   As shown in FIG. 13, first, the AE control unit 21 calculates the AE exposure amount based on the luminance value data G of the image data obtained by the image sensor 33a (step S151).

次に、ステップS156において算出された露出調整量が取得される(ステップS152)。この露出調整量の取得は、図4(a)のステップS114に相当する。そして、輝度値データGと露出調整量に基づいて露出が制御され(図4(a)のステップS118)、第1画像取得部11aにより、撮像素子33aからの画像データがライブビュー表示用の第1の画像として取得され、メモリ32に保持される(ステップS153)。第1の画像はリニア画像(RAW画像)である。   Next, the exposure adjustment amount calculated in step S156 is acquired (step S152). The acquisition of the exposure adjustment amount corresponds to step S114 in FIG. Then, the exposure is controlled based on the luminance value data G and the exposure adjustment amount (step S118 in FIG. 4A), and the first image acquisition unit 11a converts the image data from the image sensor 33a into the live view display first. 1 is acquired and stored in the memory 32 (step S153). The first image is a linear image (RAW image).

また、第1画像取得部11aにより、撮影条件も合わせて取得され、取得した撮影条件はメモリ32に保持される。   Further, the first image acquisition unit 11 a acquires the shooting conditions together, and the acquired shooting conditions are held in the memory 32.

次に、第3画像取得部12aにより、第1の画像の画像データの画像サイズが縮小され、第3の画像として取得される(ステップS154)。実際の画像データのサイズ縮小方法は、単純平均やバイリニア法やバイキュービック法等の公知の技術を用いることができる。   Next, the image size of the image data of the first image is reduced and acquired as a third image by the third image acquisition unit 12a (step S154). 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.

次に、取得された第3の画像の画像データに基づいて、撮影シーンを判別するシーン判別処理が行われる(ステップS155)。シーン判別処理については、後に図15を参照して説明する。   Next, based on the acquired image data of the third image, a scene discrimination process for discriminating a shooting scene is performed (step S155). The scene discrimination process will be described later with reference to FIG.

次に、シーン判別処理で得られた各指標及び撮影シーンの判別結果に基づいて、露出調整量算出処理が行われる(ステップS156)。露出調整量算出処理については、後に図25を参照して説明する。   Next, an exposure adjustment amount calculation process is performed based on each index obtained in the scene determination process and the result of shooting scene determination (step S156). The exposure adjustment amount calculation process will be described later with reference to FIG.

次に、シーン判別処理で得られた各指標及び撮影シーンの判別結果に基づいて、第1の画像の階調変換処理のために必要な条件を設定する階調処理条件設定が行われる(ステップS157)。階調処理条件設定については、後に図26を参照して説明する。   Next, gradation processing condition setting for setting conditions necessary for gradation conversion processing of the first image is performed on the basis of each index obtained in the scene determination processing and the determination result of the photographic scene (step) S157). The gradation processing condition setting will be described later with reference to FIG.

一方、第1の画像に対してガンマ変換処理が行われ、ノンリニア画像に変換される(ステップS158)。ただし、ガンマ変換処理は階調の変換処理であり、次に述べるステップS159の階調変換処理と合わせて行ってもよい。   On the other hand, a gamma conversion process is performed on the first image to convert it into a non-linear image (step S158). However, the gamma conversion process is a gradation conversion process, and may be performed together with the gradation conversion process in step S159 described below.

次に、第3の画像に基づいて設定された階調処理条件に基づいて、第1の画像の画像データに対する階調変換処理が行われる(ステップS159)。ステップS158のガンマ変換処理は視覚に合わせてノンリニアの階調に変換するものであるが、ステップS159の階調変換処理は撮影シーンの光源条件等による階調への影響を補正するものである。   Next, gradation conversion processing is performed on the image data of the first image based on the gradation processing conditions set based on the third image (step S159). The gamma conversion process in step S158 is to convert to a non-linear gradation in accordance with vision, but the gradation conversion process in step S159 is to correct the influence on the gradation due to the light source condition of the shooting scene.

次に、階調変換処理後の画像データに対して、その他の画像処理(ノイズ処理やシャープネス処理等)が行われる(ステップS160)。   Next, other image processing (noise processing, sharpness processing, etc.) is performed on the image data after the gradation conversion processing (step S160).

そして、画像処理後の画像データに基づいて、表示部7にライブビュー画像が表示される(ステップS161)。   Then, based on the image data after image processing, a live view image is displayed on the display unit 7 (step S161).

ここで、電源スイッチ6がOFFされたか否かが判断され(ステップS162)、電源スイッチ6がOFFされた場合には(ステップS162;Yes)、本処理が終了する。   Here, it is determined whether or not the power switch 6 has been turned off (step S162). If the power switch 6 has been turned off (step S162; Yes), this processing ends.

電源スイッチ6がOFFされない場合には(ステップS162;No)、レリーズボタン8が押下されたか否かが判断される(ステップS163)。レリーズボタン8が押下された場合には(ステップS163;Yes)、撮影処理が行われる(ステップS164)。   If the power switch 6 is not turned off (step S162; No), it is determined whether or not the release button 8 has been pressed (step S163). When the release button 8 is pressed (step S163; Yes), a photographing process is performed (step S164).

ステップS163において、レリーズボタン8が押下されない場合(ステップS163;No)、又は、撮影処理の後(ステップS164)、ステップS151に戻り、処理が繰り返される。   If the release button 8 is not pressed in step S163 (step S163; No) or after the photographing process (step S164), the process returns to step S151 and the process is repeated.

次に、図14のフローチャートを参照して、撮像装置100において実行される撮影処理(図13のステップS164)を説明する。   Next, with reference to the flowchart of FIG. 14, the imaging process (step S164 of FIG. 13) executed in the imaging apparatus 100 will be described.

レリーズボタン8が押下されると、AE制御部21により、撮像素子33aによって得られた画像データの輝度値データGに基づいて、AE露出量が算出される(ステップS171)。   When the release button 8 is pressed, the AE control unit 21 calculates the AE exposure amount based on the luminance value data G of the image data obtained by the image sensor 33a (step S171).

次に、撮影処理の直前にステップS156において算出された露出調整量が取得される(ステップS172)。この露出調整量の取得は、図4(b)のステップS114に相当する。そして、輝度値データGと露出調整量に基づいて露出が制御され(図4(b)のステップS118)、第2画像取得部11bにより、撮像素子33bからの画像データが記録用の第2の画像として取得され、メモリ32に保持される(ステップS173)。第2の画像はリニア画像(RAW画像)である。   Next, the exposure adjustment amount calculated in step S156 immediately before the photographing process is acquired (step S172). The acquisition of the exposure adjustment amount corresponds to step S114 in FIG. Then, the exposure is controlled based on the brightness value data G and the exposure adjustment amount (step S118 in FIG. 4B), and the second image acquisition unit 11b converts the image data from the image sensor 33b into a second recording image. It is acquired as an image and stored in the memory 32 (step S173). The second image is a linear image (RAW image).

また、第2画像取得部11bにより、撮影条件も合わせて取得される。撮影条件は、後に撮影画像がExif形式(Exchangeable Image File Format)で記録される際に、合わせて記録されるものである。取得した撮影条件はメモリ32に保持される。   The second image acquisition unit 11b also acquires the shooting conditions. The shooting conditions are recorded together when the shot image is recorded in the Exif format (Exchangeable Image File Format) later. The acquired shooting conditions are held in the memory 32.

次に、第4画像取得部12bにより、第2の画像の画像データの画像サイズが縮小され、第4の画像として取得される(ステップS174)。実際の画像データのサイズ縮小方法は、単純平均やバイリニア法やバイキュービック法等の公知の技術を用いることができる。   Next, the image size of the image data of the second image is reduced and acquired as a fourth image by the fourth image acquisition unit 12b (step S174). 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.

次に、取得された第4の画像の画像データに基づいて、撮影シーンを判別するシーン判別処理が行われる(ステップS175)。シーン判別処理については、後に図15を参照して説明する。   Next, a scene discrimination process for discriminating a shooting scene is performed based on the acquired image data of the fourth image (step S175). The scene discrimination process will be described later with reference to FIG.

次に、シーン判別処理で得られた各指標及び撮影シーンの判別結果に基づいて、第2の画像の階調変換処理のために必要な条件を設定する階調処理条件設定が行われる(ステップS176)。階調処理条件設定については、後に図26を参照して説明する。   Next, gradation processing condition setting for setting conditions necessary for gradation conversion processing of the second image is performed on the basis of each index obtained in the scene determination processing and the determination result of the photographic scene (step) S176). The gradation processing condition setting will be described later with reference to FIG.

一方、第2の画像に対してガンマ変換処理が行われ、ノンリニア画像に変換される(ステップS177)。ただし、ガンマ変換処理は階調の変換処理であり、次に述べるステップS178の階調変換処理と合わせて行ってもよい。   On the other hand, a gamma conversion process is performed on the second image to convert it into a non-linear image (step S177). However, the gamma conversion process is a gradation conversion process, and may be performed together with the gradation conversion process in step S178 described below.

次に、第4の画像に基づいて設定された階調処理条件に基づいて、第2の画像の画像データに対する階調変換処理が行われる(ステップS178)。   Next, gradation conversion processing is performed on the image data of the second image based on the gradation processing conditions set based on the fourth image (step S178).

次に、階調変換処理後の画像データに対して、その他の画像処理(ノイズ処理やシャープネス処理等)が行われる(ステップS179)。   Next, other image processing (noise processing, sharpness processing, etc.) is performed on the image data after the gradation conversion processing (step S179).

次いで、画像記録のため、JPEG形式、TIFF形式、BMP形式等の画像へと画像フォーマットの変換が行われる(ステップS180)。そして、画像フォーマット変換後の画像データが、保存用の記録媒体(SDメモリカード又はマルチメディアカード(MMC)等)に記録され(ステップS181)、図13のステップS151に戻る。   Next, the image format is converted into an image such as a JPEG format, a TIFF format, or a BMP format for image recording (step S180). Then, the image data after the image format conversion is recorded on a recording medium for storage (such as an SD memory card or a multimedia card (MMC)) (step S181), and the process returns to step S151 in FIG.

(シーン判別処理)
次に、図15〜図24を参照して、撮像装置100でのシーン判別処理(図13のステップS155、図14のステップS175)について説明する。シーン判別処理は、第3の画像の画像データに基づいて第1の画像の撮影シーンを判別する処理、又は、第4の画像の画像データに基づいて第2の画像の撮影シーンを判別する処理である。以下、第1の画像の撮影シーンを判別する場合を例にして説明する。第2の画像の撮影シーンの判別については、同様の処理であるため、説明を省略する。
(Scene discrimination processing)
Next, with reference to FIGS. 15 to 24, the scene determination process (step S155 in FIG. 13 and step S175 in FIG. 14) in the imaging apparatus 100 will be described. The scene determination process is a process of determining the shooting scene of the first image based on the image data of the third image, or a process of determining the shooting scene of the second image based on the image data of the fourth image. It is. Hereinafter, a case where the shooting scene of the first image is determined will be described as an example. The determination of the shooting scene of the second image is the same process, and thus the description thereof is omitted.

シーン判別処理は、図15に示すように、色空間変換処理(ステップS20)、占有率算出処理(ステップS21)、指標算出処理(ステップS22)、シーン判別(ステップS23)の各処理により構成される。以下、図15に示す各処理について詳細に説明する。   As shown in FIG. 15, the scene determination process includes a color space conversion process (step S20), an occupation ratio calculation process (step S21), an index calculation process (step S22), and a scene determination (step S23). The Hereinafter, each process shown in FIG. 15 will be described in detail.

<色空間変換処理>
図15のステップS20の色空間変換処理では、まず、撮影された第1の画像から得られた第3の画像の各画素のRGB値、輝度値及びホワイトバランスを示す情報が取得される。なお、輝度値としては、RGB値を公知の変換式に代入して算出した値を用いてもよい。次いで、取得されたRGB値がHSV表色系に変換され、画像の色情報が取得される。HSV表色系とは、画像データを色相(Hue)、彩度(Saturation)、明度(Value又はBrightness)の3つの要素で表すものであり、マンセルにより提案された表色体系を元にして考案されたものである。HSV表色系への変換は、HSV変換プログラム等を用いて行われ、通常、入力であるR、G、Bに対して、算出された色相値Hは、スケールを0〜360と定義し、彩度値S、明度値Vは、単位を0〜255と定義している。
<Color space conversion processing>
In the color space conversion process of step S20 in FIG. 15, first, information indicating the RGB value, the luminance value, and the white balance of each pixel of the third image obtained from the captured 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: Hue, 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の値が色情報として取得される。   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.

<占有率算出処理>
次に、図16のフローチャートを参照して、占有率算出処理(図15のステップS21)について説明する。
<Occupancy rate calculation process>
Next, the occupation rate calculation process (step S21 in FIG. 15) will be described with reference to the flowchart in FIG.

まず、色空間変換処理で算出されたHSV値に基づいて、第3の画像の各画素が、色相と明度の組み合わせからなる所定の階級に分類され、分類された階級毎に累積画素数を算出することによって2次元ヒストグラムが作成される(ステップS30)。   First, based on the HSV value calculated by the color space conversion process, each pixel of the third image is classified into a predetermined class composed of a combination of hue and brightness, and the cumulative number of pixels is calculated for each classified class. As a result, a two-dimensional histogram is created (step S30).

図17に、明度と色相の組み合わせからなる階級を示す。ステップS30では、明度(V)は、明度値が0〜5(v1)、6〜12(v2)、13〜24(v3)、25〜76(v4)、77〜109(v5)、110〜149(v6)、150〜255(v7)の7つの階級に分割される。図17に示すように、最も低明度の階級における明度の範囲よりも、最も高明度の階級における明度の範囲の方が広い。   FIG. 17 shows a class composed of a combination 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. 17, 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 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). Note that the red hue region (H5) is not used in the following calculation because it is known that the contribution to the determination of the shooting scene is small. The skin color hue region is further divided into a skin color region (H1) and another region (H2). Hereinafter, among the flesh-colored hue regions (H = 0 to 39, 330 to 359), the hue ′ (H) that satisfies the following formula (1) is defined as the flesh-colored region (H1), and the region that does not satisfy the formula (1) is ( H2).

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)
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 x 0.30 + G x 0.59 + B x 0.11 (A)
As
Hue '(H) / Luminance (Y) <3.0 × (Saturation (S) / 255) +0.7 (1)

従って、第3の画像を明度と色相の組み合わせからなる階級に分類した場合の階級の数は4×7=28個となる。また、最大の明度値(255)の1割の値以内に、少なくとも3つの階級(v1、v2、v3)を有する。なお、式(A)及び式(1)において明度(V)を用いることも可能である。   Therefore, the number of classes when the third image is classified into classes composed of combinations of brightness and hue 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の後、第3の画像の各画素が、画面の外縁からの距離と明度の組み合わせからなる所定の階級に分類され、分類された階級毎に累積画素数を算出することによって2次元ヒストグラムが作成される(ステップS31)。   After step S30, each pixel of the third 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).

図18(a)に、ステップS31において、第3の画像の画面の外縁からの距離に応じて分割された3つの領域n1〜n3を示す。領域n1が外枠であり、領域n2が外枠の内側の領域であり.領域n3が第3の画像の中央部の領域である。ここで、n1〜n3は略同等の画素数となるように分割することが好ましい。また本実施形態においては3つの分割としたがこれに限定されるものではない。また、ステップS31において、明度は、上述のようにv1〜v7の7つの領域に分割するものとする。図18(b)に、3つの領域n1〜n3と明度の組み合わせからなる階級を示す。図18(b)に示すように、第3の画像を画面の外縁からの距離と明度の組み合わせからなる階級に分類した場合の階級の数は3×7=21個となる。   FIG. 18A shows three regions n1 to n3 divided in step S31 according to the distance from the outer edge of the screen of the third 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 third image. Here, it is preferable to divide n1 to n3 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. 18B shows a class composed of combinations of three regions n1 to n3 and brightness. As shown in FIG. 18B, the number of classes when the third 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 the ratio of the cumulative number of pixels calculated for each predetermined class composed of a combination of hue and brightness to the total number of pixels (N × M) Is calculated (step S32). That is, step S30 and step S32 correspond to a first occupation 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.

Figure 2007288245
Figure 2007288245

ステップ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 correspond to 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.

Figure 2007288245
Figure 2007288245

なお、各画素を画面の外縁からの距離、明度及び色相からなる階級に分類し、分類された階級毎に累積画素数を算出することによって3次元ヒストグラムを作成してもよい。以下では、2次元ヒストグラムを用いる方式を採用するものとする。   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.

<指標算出処理>
次に、図19のフローチャートを参照して、指標算出処理(図15のステップS22)について説明する。
<Indicator calculation process>
Next, the index calculation process (step S22 in FIG. 15) will be described with reference to the flowchart in FIG.

まず、占有率算出処理において階級毎に算出された第1の占有率に、撮影条件に応じて予め設定された係数(第1の係数)を乗算して和をとることにより、撮影シーンを特定するための指標1が算出される(ステップS40)。指標1は、主要被写体のオーバー度を表す指標であり、「主要被写体がオーバー」と判別されるべき画像のみを他の撮影シーンから分離するためのものである。   First, the shooting scene is specified by multiplying the first occupancy calculated for each class in the occupancy calculation processing by a coefficient (first coefficient) set in advance according to the shooting conditions and taking the sum. An index 1 is calculated (step S40). 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.

次いで、同じく階級毎に算出された第1の占有率に、撮影条件に応じて予め設定された第1の係数とは異なる係数(第2の係数)を乗算して和をとることにより、撮影シーンを特定するための指標2が算出される
(ステップS41)。指標2は、空色高明度、顔色低明度等の逆光撮影時の特徴を複合的に表す指標であり、「逆光」、「主要被写体がアンダー」と判別されるべき画像のみを他の撮影シーンから分離するためのものである。
Next, the first occupancy calculated for each class is multiplied by a coefficient (second coefficient) different from the first coefficient set in advance according to the shooting conditions to obtain the sum, thereby taking a picture. The index 2 for specifying the scene is calculated (step S41). The index 2 is an index that compositely represents the characteristics at the time of backlight shooting such as sky blue high brightness and low face color brightness. It is for separation.

以下、指標1及び指標2の算出方法について詳細に説明する。
表3に、指標1を算出するために必要な第1の係数を階級別に示す。表3に示された各階級の係数は、表1に示した各階級の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。
Hereinafter, the calculation method of the index 1 and the index 2 will be described in detail.
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.

Figure 2007288245
Figure 2007288245

表3によると、高明度(v6)の肌色色相領域(H1)に分布する領域から算出される第1の占有率には、正(+)の係数が用いられ、それ以外の色相である青色色相領域から算出される第1の占有率には、負(−)の係数が用いられる。図20は、肌色領域(H1)における第1の係数と、その他の領域(緑色色相領域(H3))における第1の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表3及び図20によると、高明度(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. 20 shows a first coefficient in the skin color area (H1) and a first coefficient in the other area (green hue area (H3)) as a curve (coefficient curve) that continuously changes over the entire brightness. It is shown. According to Table 3 and FIG. 20, 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)のように定義される。   When 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).

Figure 2007288245
Figure 2007288245

従って、H1〜H4領域の和は、下記の式(2−1)〜(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)
Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (2-1) to (2-4).
Sum of H1 region = R11 × 0 + R21 × 0 + (omitted)… + R71 × (−8) (2-1)
Sum of H2 regions = R12 x (-2) + R22 x (-1) + (omitted) ... + R72 x (-10) (2-2)
Sum of H3 region = R13 × 5 + R23 × (-2) + (omitted)... + R73 × (-12) (2-3)
Sum of H4 region = R14 × 0 + R24 × (−1) + (omitted)... + R74 × (-12) (2-4)

指標1は、式(2−1)〜(2−4)で示されたH1〜H4領域の和を用いて、式(3)のように定義される。
指標1=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.5
(3)
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).
Index 1 = sum of H1 region + sum of H2 region + sum of H3 region + sum of H4 region + 1.5
(3)

表4に、指標2を算出するために必要な第2の係数を階級別に示す。表4に示された各階級の係数は、表1に示した各階級の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。   Table 4 shows the second coefficient necessary for calculating the index 2 by class. The coefficient of each class shown in Table 4 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.

Figure 2007288245
Figure 2007288245

表4によると、肌色色相領域(H1)の中間明度に分布する領域(v4、v5)から算出される占有率には負(−)の係数が用いられ、肌色色相嶺域(H1)の低明度(シャドー)領域(v2、v3)から算出される占有率には係数0が用いられる。図21は、肌色領域(H1)における第2の係数を、明度全体にわたって連続的に変化する曲線(係数曲線)として示したものである。表4及び図21によると、肌色色相領域の、明度値が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 coefficient 0 is used for the occupation ratio calculated from the brightness (shadow) region (v2, v3). FIG. 21 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 4 and FIG. 21, the sign of the second coefficient of the intermediate lightness region having a lightness value of 25 to 150 in the flesh color hue region is negative (−), and the low lightness (shadow) region having a lightness value of 6 to 24 The second coefficient is 0, and it can be seen that there is a large difference in the coefficients in both regions.

明度領域vi、色相領域Hjにおける第2の係数をDijとすると、指標2を算出するためのHk領域の和は、式(4)のように定義される。   When the second coefficient in the lightness region vi and the hue region Hj is Dij, the sum of the Hk regions for calculating the index 2 is defined as in Expression (4).

Figure 2007288245
Figure 2007288245

従って、H1〜H4領域の和は、下記の式(4−1)〜(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)
Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (4-1) to (4-4).
Sum of H1 region = R11 × 0 + R21 × 0 + (omitted)… + R71 × 2 (4-1)
Sum of H2 regions = R12 x (-2) + R22 x (-1) + (omitted) ... + R72 x 2 (4-2)
Sum of H3 region = R13 × 2 + R23 × 1 + (omitted)… + R73 × 3 (4-3)
Sum of H4 region = R14 × 0 + R24 × (−1) + (omitted)… + R74 × 3 (4-4)

指標2は、式(4−1)〜(4−4)で示されたH1〜H4領域の和を用いて、式(5)のように定義される。
指標2=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.7
(5)
The index 2 is defined as in Expression (5) using the sum of the H1 to H4 regions shown in Expressions (4-1) to (4-4).
Index 2 = sum of H1 region + sum of H2 region + sum of H3 region + sum of H4 region + 1.7
(5)

指標1及び指標2は、第3の画像の明度と色相の分布量に基づいて算出されるため、画像がカラー画像である場合の撮影シーンの判別に有効である。   Since the index 1 and the index 2 are calculated based on the lightness and hue distribution amount of the third image, the index 1 and the index 2 are effective in determining a shooting scene when the image is a color image.

指標1及び指標2が算出されると、占有率算出処理において階級毎に算出された第2の占有率に、撮影条件に応じて予め設定された第3の係数(第1の係数、第2の係数とは異なる係数)を乗算して和をとることにより、撮影シーンを特定するための指標3が算出される(ステップS42)。指標3は、主要被写体がアンダーな逆光と主要被写体がオーバーな画像間における、画像データの画面の中心と外側の明暗関係の差異を示すものである。   When the index 1 and the index 2 are calculated, the third factor (first factor, second factor) set in advance according to the shooting condition is added to the second occupancy rate calculated for each class in the occupancy rate calculation process. The index 3 for specifying the photographic scene is calculated by multiplying the coefficient by a coefficient different from the coefficient (2) (step S42). The index 3 indicates a difference in contrast between the center and the outside of the screen of the image data between the backlight with the main subject under and the image with the main subject over.

以下、指標3の算出方法について説明する。
表5に、指標3を算出するために必要な第3の係数を階級別に示す。表5に示された各階級の係数は、表2に示した各階級の第2の占有率Qijに乗算する重み係数であり、撮影条件に応じて予め設定されている。
Hereinafter, a method for calculating the index 3 will be described.
Table 5 shows the third coefficient necessary for calculating the index 3 by class. The coefficient of each class shown in Table 5 is a weighting coefficient by which the second occupation ratio Qij of each class shown in Table 2 is multiplied, and is set in advance according to the shooting conditions.

Figure 2007288245
Figure 2007288245

図22は、画面領域n1〜n3における第3の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。   FIG. 22 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)のように定義される。   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 index 3 is defined as in Expression (6).

Figure 2007288245
Figure 2007288245

従って、n1〜n3領域の和は、下記の式(6−1)〜(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)
Accordingly, the sum of the n1 to n3 regions is represented by the following formulas (6-1) to (6-3).
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)

指標3は、式(6−1)〜(6−3)で示されたn1〜n3領域の和を用いて、式(7)のように定義される。
指標3=n1領域の和+n2領域の和+n3領域の和+0.7 (7)
The index 3 is defined as in Expression (7) using the sum of the n1 to n3 regions shown in Expressions (6-1) to (6-3).
Index 3 = sum of n1 region + sum of n2 region + sum of n3 region + 0.7 (7)

指標3は、第3の画像の明度の分布位置による構図的な特徴(全体画像の画面の外縁からの距離)に基づいて算出されるため、カラー画像だけでなくモノクロ画像の撮影シーンを判別するのにも有効である。   Since the index 3 is calculated based on the compositional feature (distance from the outer edge of the screen of the entire image) based on the lightness distribution position of the third image, the photographing scene of the monochrome image as well as the color image is discriminated. It is also effective.

また、例えば公知の方法によって検出された焦点検出領域に応じて、画面の外縁からの距離と明度の所定の階級から算出される第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が算出されると、第3の画像の画面中央部における肌色領域の平均輝度値、第3の画像の最大輝度植と平均輝度値との差分値等に、撮影条件に応じて予め設定された係数(第4の係数)を乗算することにより、撮影シーンを特定するための指標4が算出される(ステップS43)。   When the indices 1 to 3 are calculated, the average brightness value of the flesh color region in the center of the screen of the third image, the difference value between the maximum brightness plant and the average brightness value of the third image, etc., according to the shooting conditions By multiplying a preset coefficient (fourth coefficient), an index 4 for specifying the shooting scene is calculated (step S43).

以下、図23のフローチャートを参照して、指標4算出処理について詳細に説明する。
まず、第3の画像のRGB(Red、Green、Blue)値から、式(A)を用いて輝度Yが算出される。次いで、第3の画像の画面中央部における肌色領域の平均輝度値x1が算出される(ステップS50)。ここで、画面中央部とは、例えば図18(a)に示した領域n3により構成される領域である。次いで、第3の画像の最大輝度値と平均輝度値との差分値x2=最大輝度値−平均輝度値が算出される(ステップS51)。
Hereinafter, the index 4 calculation process will be described in detail with reference to the flowchart of FIG.
First, the luminance Y is calculated from the RGB (Red, Green, Blue) values of the third image using the equation (A). Next, the average luminance value x1 of the skin color area at the screen center of the third 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 third image = maximum luminance value−average luminance value is calculated (step S51).

次いで、第3の画像の輝度の標準偏差x3が算出され(ステップS52)、画面中央部における平均輝度値x4が算出される(ステップS53)。次いで、第3の画像における肌色領域の最大輝度値Yskin_maxと最小輝度値Yskin_minの差分値と、肌色領域の平均輝度値Yskin_aveとの比較値x5が算出される(ステップS54)。この比較値x5は、下記の式(8−1)のように表される。
x5=(Yskin_max−Yskin_min)/2−Yskin_ave (8−1)
Next, the standard deviation x3 of the luminance of the third 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 third 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)のように定義される。
指標4=0.05×x1+1.41×x2+(-0.01)×x3
+(-0.01)×x4+0.01×x5−5.34 (8−2)
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).
Index 4 = 0.05 × x1 + 1.41 × x2 + (− 0.01) × x3
+ (-0.01) × x4 + 0.01 × x5-5.34 (8-2)

この指標4は、第3の画像の画面の構図的な特徴だけでなく、輝度ヒストグラム分布情報を持ち合わせており、特に、主要被写体がオーバーである撮影シーンとアンダー撮影シーンの判別に有効である。   This index 4 has not only the compositional characteristics of the screen of the third image but also the luminance histogram distribution information, and is particularly effective for discriminating a shooting scene in which the main subject is over and an under shooting scene.

図19に戻り、指標4が算出されると、指標1、指標3及び第3の画像の画面中央部における肌色領域の平均輝度値に、撮影条件に応じて予め設定された重み係数(第5の係数)を乗算することにより、指標5が算出される(ステップS44)。   Returning to FIG. 19, when the index 4 is calculated, the weight coefficients (fifth) set in advance in the average luminance value of the skin color area in the center of the screen of the index 1, the index 3, and the third image are set. The index 5 is calculated by multiplying the coefficient (step S44).

さらに、指標2、指標3及び第3の画像の画面中央部における肌色領域の平均輝度値に、撮影条件に応じて予め設定された重み係数(第6の係数)を乗算することにより、指標6が算出され(ステップS45)、本指標算出処理が終了する。   Furthermore, the index 6 is obtained by multiplying the average luminance value of the skin color area in the center of the screen of the index 2, the index 3, and the third image by a weighting coefficient (sixth coefficient) set in advance according to the shooting conditions. Is calculated (step S45), and the index calculation process is terminated.

以下、指標5及び指標6の算出方法について詳細に説明する。
第3の画像の画面中央部における肌色領域の平均輝度値を指標7とする。ここでの画面中央部とは、例えば、図18(a)の領域n2及び領域n3から構成される領域である。このとき、指標5は、指標1、指標3、指標7を用いて式(9)のように定義され、指標6は、指標2、指標3、指標7を用いて式(10)のように定義される。
指標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)
Hereinafter, the calculation method of the index 5 and the index 6 will be described in detail.
The average luminance value of the skin color area in the center of the screen of the third image is taken as index 7. Here, the central portion of the screen is, for example, a region composed of the region n2 and the region n3 in FIG. At this time, the index 5 is defined as in Expression (9) using the index 1, index 3, and index 7, and the index 6 is defined as in Expression (10) using the index 2, index 3, and index 7. Defined.
Index 5 = 0.54 × Index 1 + 0.50 × Index 3 + 0.01 × Index 7−0.65 (9)
Indicator 6 = 0.83 x Indicator 2 + 0.23 x Indicator 3 + 0.01 x Indicator 7-1.17 (10)

なお、図23における平均輝度値(例えば、全体平均輝度値)の算出方法としては、撮像装置100の各受光部から得られた個別輝度データの単純な加算平均値を求めてもよいし、撮像装置100の測光方式としてよく用いられる中央重点平均測光に類似した、画面中心付近の受光部より得られた輝度データに重み付けを高く、画面の周辺付近の受光部より得られた輝度データに重み付けを低くして加算平均値を求める手法を用いてもよい。また、焦点検出領域に対応した受光部付近より得られた輝度データに重み付けを高くし、焦点検出位置から離れた受光部より得られた輝度データに重み付けを低くして加算平均値を求める手法等を用いてもよい。   As a method of calculating the average luminance value (for example, the overall average luminance value) in FIG. 23, a simple addition average value of individual luminance data obtained from each light receiving unit of the imaging device 100 may be obtained, or imaging may be performed. Similar to the center-weighted average metering, which is often used as the metering method of the apparatus 100, 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.

<シーン判別>
図15に戻って、シーン判別(ステップS23)を説明する。
指標4〜6が算出されると、これらの指標の値に基づいて撮影シーンが判別される。表6に、指標4、指標5及び指標6の値による撮影シーンの判別内容を示す。
<Scene discrimination>
Returning to FIG. 15, the scene discrimination (step S23) will be described.
When the indices 4 to 6 are calculated, the shooting scene is determined based on the values of these indices. Table 6 shows the details of the shooting scene discrimination based on the values of index 4, index 5, and index 6.

Figure 2007288245
Figure 2007288245

図24は、表6に示した判別内容を、指標4〜6の座標系を用いて表した判別マップである。   FIG. 24 is a discrimination map representing the discrimination contents shown in Table 6 using the coordinate system of the indices 4-6.

(露出調整量算出処理)
次に、図25を参照して、露出調整量算出処理(図13のステップS156)について説明する。露出調整量算出処理は、第1の画像の撮影シーンに基づいて、露出調整量を算出する処理である。
(Exposure adjustment amount calculation processing)
Next, the exposure adjustment amount calculation process (step S156 in FIG. 13) will be described with reference to FIG. The exposure adjustment amount calculation process is a process of calculating the exposure adjustment amount based on the shooting scene of the first image.

まず、第1の画像の画像サイズを縮小した第3の画像の画像データに基づいて算出された指標4〜6が取得され(ステップS60)、第3の画像の画像データに基づいて判別された第1の画像の撮影シーンが取得される(ステップS61)。   First, indices 4 to 6 calculated based on the image data of the third image obtained by reducing the image size of the first image are acquired (step S60) and determined based on the image data of the third image. A shooting scene of the first image is acquired (step S61).

次に、指標4〜6及び判別された撮影シーンに基づいて、適性露出となるように露出調整量が算出される(ステップS62)。露出調整量は下記式(11)のように定義される。
露出調整量=調整係数×{(指標4/6)×指標4の重み+(指標5/6)×指標5の重み+(指標6/6)×指標6の重み} (11)
Next, an exposure adjustment amount is calculated based on the indices 4 to 6 and the determined shooting scene so as to achieve appropriate exposure (step S62). The exposure adjustment amount is defined as the following formula (11).
Exposure adjustment amount = adjustment coefficient × {(index 4/6) × weight of index 4+ (index 5/6) × weight of index 5+ (index 6/6) × weight of index 6} (11)

表7に、式(11)における調整係数、指標4の重み、指標5の重み、指標6の重みを示す。表7に示すように、調整係数及び各指標の重みは、判別された撮影シーンに応じて設定されている。なお、露出調整量の算出方法は、特に式(11)に限ったものではなく、例えば、縮小画像において肌色と判定された分割領域の平均輝度値と指標値に基づいて算出されてもよい。   Table 7 shows the adjustment coefficient, the weight of the index 4, the weight of the index 5, and the weight of the index 6 in Expression (11). As shown in Table 7, the adjustment coefficient and the weight of each index are set according to the determined shooting scene. Note that the method for calculating the exposure adjustment amount is not particularly limited to the expression (11). For example, the exposure adjustment amount may be calculated based on the average luminance value and the index value of the divided area determined as the skin color in the reduced image.

Figure 2007288245
Figure 2007288245

算出された露出調整量に基づいて、絞りユニット38(又はシャッタユニット37)が制御される。   Based on the calculated exposure adjustment amount, the aperture unit 38 (or the shutter unit 37) is controlled.

(階調処理条件設定)
次に、図26のフローチャートを参照して、第1の画像又は第2の画像に対する階調処理条件設定(図13のステップS157、図14のステップS176)について説明する。階調処理条件設定は、第1の画像の撮影シーンの判別結果に基づいて、第1の画像に対する階調処理条件を設定する処理、又は、第2の画像の撮影シーンの判別結果に基づいて、第2の画像に対する階調処理条件を設定する処理である。以下、第1の画像の撮影シーンの判別結果に基づいて、第1の画像に対する階調処理条件を設定する場合を例にして説明する。第2の画像に対する階調処理条件の設定については、同様の処理であるため、説明を省略する。
(Tone processing condition setting)
Next, the gradation processing condition setting (step S157 in FIG. 13 and step S176 in FIG. 14) for the first image or the second image will be described with reference to the flowchart in FIG. The gradation processing condition setting is based on the process of setting the gradation processing condition for the first image based on the determination result of the shooting scene of the first image or the determination result of the shooting scene of the second image. This is a process for setting the gradation processing conditions for the second image. Hereinafter, a case where the gradation processing condition for the first image is set based on the determination result of the shooting scene of the first image will be described as an example. The setting of the gradation processing condition for the second image is the same process, and thus the description thereof is omitted.

まず、判別された撮影シーンに応じて、ガンマ変換処理後の第1の画像の画像データに対する階調調整方法が決定され(ステップS70)、階調調整パラメータが算出される(ステップS71)。そして、階調調整パラメータに基づいて階調処理条件(階調変換曲線)が設定される(ステップS72)。   First, a gradation adjustment method for the image data of the first image after the gamma conversion process is determined according to the determined shooting scene (step S70), and a gradation adjustment parameter is calculated (step S71). Then, a gradation processing condition (gradation conversion curve) is set based on the gradation adjustment parameter (step S72).

<階調調整方法決定>
ステップS70で階調調整方法を決定する場合、図27に示すように、撮影シーンが順光である場合は階調調整方法A(図27(a))が選択され、逆光である場合は階調調整方法B(図27(b))が選択され、主要被写体がオーバーである場合は階調調整方法C(図27(c))が選択され、アンダーである場合は、階調調整方法B(図27(b))が選択される。
<Determination of gradation adjustment method>
When determining the gradation adjustment method in step S70, as shown in FIG. 27, the gradation adjustment method A (FIG. 27 (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. 27B) is selected and the main subject is over, the tone adjustment method C (FIG. 27C) is selected, and when it is under, the tone adjustment method B is selected. (FIG. 27B) is selected.

なお、本実施形態においては、ガンマ変換処理後の第1の画像へ適用する階調変換曲線を決定する方法を示したが、階調変換処理をガンマ変換処理の前に実施する場合には、図27の階調変換曲線に対して、ガンマ変換の逆変換を施した曲線で階調変換が行われる。   In the present embodiment, the method for determining the gradation conversion curve to be applied to the first image after the gamma conversion process has been described. However, when the gradation conversion process is performed before the gamma conversion process, The gradation conversion is performed with a curve obtained by performing inverse conversion of gamma conversion on the gradation conversion curve of FIG.

<階調調整パラメータ算出>
階調調整方法が決定されると、ステップS71では、指標算出処理で算出された各指標に基づいて、階調調整に必要なパラメータが算出される。以下、階調調整パラメータの算出方法について説明する。なお、以下では、8bitの撮影画像データは16bitへと事前に変換されているものとし、撮影画像データの値の単位は16bitであるものとする。
<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. Hereinafter, a method for calculating the gradation adjustment parameter will be described. In the following description, it is assumed that 8-bit captured image data is converted to 16 bits in advance, and the unit of the value of the captured image data is 16 bits.

階調調整に必要なパラメータ(階調調整パラメータ)として、下記のP1〜P9のパラメータが算出される。
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
As parameters necessary for gradation adjustment (gradation adjustment parameters), the following parameters P1 to P9 are calculated.
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 ': Key correction value 2
P8: Brightness correction value 2
P9: Offset value 2 = P5-P8-P1

ここで、図28及び図29を参照して、パラメータP2(ブロック分割平均輝度)の算出方法について説明する。
まず、画像データを正規化するために、CDF(累積密度関数)を作成する。次いで、得られたCDFから最大値と最小値を決定する。この最大値と最小値は、RGB毎に求める。ここで、求められたRGB毎の最大値と最小値を、それぞれ、Rmax、Rmin、Gmax、Gmin、Bmax、Bminとする。
Here, with reference to FIG. 28 and FIG. 29, a calculation method of the parameter P2 (block division average luminance) will be described.
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は、それぞれ、式(12)〜式(14)のように表される。   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 formula (12), respectively. ) To Expression (14).

Rpoint={(Rx−Rmin)/(Rmax−Rmin)}×65535 (12);
Gpoint={(Gx−Gmin)/(Gmax−Gmin)}×65535 (13);
Bpoint={(Bx−Bmin)/(Bmax−Bmin)}×65535 (14).
Rpoint = {(Rx−Rmin) / (Rmax−Rmin)} × 65535 (12);
Gpoint = {(Gx−Gmin) / (Gmax−Gmin)} × 65535 (13);
Bpoint = {(Bx−Bmin) / (Bmax−Bmin)} × 65535 (14).

次いで、式(15)により画素(Rx、Gx、Bx)の輝度Npointを算出する。
Npoint=(Bpoint+Gpoint+Rpoint)/3 (15)
Next, the luminance Npoint of the pixel (Rx, Gx, Bx) is calculated by Expression (15).
Npoint = (Bpoint + Gpoint + Rpoint) / 3 (15)

図28(a)は、正規化する前のRGB画素の輝度の度数分布(ヒストグラム)である。図28(a)において、横軸は輝度、縦軸は画素の頻度である。このヒストグラムは、RGB毎に作成する。輝度のヒストグラムが作成されると、式(12)〜式(14)により、画像データに対し、プレーン毎に正規化を行う。図28(b)は、式(15)により算出された輝度のヒストグラムを示す。撮影画像データが65535で正規化されているため、各画素は、最大値が65535で最小値が0の間で任意の値をとる。   FIG. 28A shows a frequency distribution (histogram) of luminance of RGB pixels before normalization. In FIG. 28A, 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 (12) to (14). FIG. 28B shows a histogram of the brightness calculated by the equation (15). 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.

図28(b)に示す輝度ヒストグラムを所定の範囲で区切ってブロックに分割すると、図28(c)に示すような度数分布が得られる。図28(c)において、横軸はブロック番号(輝度)、縦軸は頻度である。   When the luminance histogram shown in FIG. 28B is divided into blocks divided by a predetermined range, a frequency distribution as shown in FIG. 28C is obtained. In FIG. 28C, the horizontal axis represents the block number (luminance), and the vertical axis represents the frequency.

次いで、図28(c)に示された輝度ヒストグラムから、ハイライト、シャドー領域を削除する処理を行う。これは、白壁や雪上シーンでは、平均輝度が非常に高くなり、暗闇のシーンでは平均輝度は非常に低くなっているため、ハイライト、シャドー領域は、平均輝度制御に悪影響を与えてしまうことによる。そこで、図28(c)に示した輝度ヒストグラムのハイライト領域、シャドー領域を制限することによって、両領域の影響を減少させる。図29(a)(又は図28(c))に示す輝度ヒストグラムにおいて、高輝度領域(ハイライト領域)及び低輝度領域(シャドー領域)を削除すると、図29(b)のようになる。   Next, processing for 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 shadow area of the luminance histogram shown in FIG. 28C, the influence of both areas is reduced. If the high brightness area (highlight area) and the low brightness area (shadow area) are deleted from the brightness histogram shown in FIG. 29A (or FIG. 28C), the result is as shown in FIG.

次いで、図29(c)に示すように、輝度ヒストグラムにおいて、頻度が所定の閾値より大きい領域を削除する。これは、頻度が極端に多い部分が存在すると、この部分のデータが、撮影画像全体の平均輝度に強く影響を与えてしまうため、誤補正が生じやすいことによる。そこで、図29(c)に示すように、輝度ヒストグラムにおいて、閾値以上の画素数を制限する。図29(d)は、画素数の制限処理を行った後の輝度ヒストグラムである。   Next, as shown in FIG. 29 (c), 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. 29C, the number of pixels equal to or greater than the threshold is limited in the luminance histogram. FIG. 29D is a luminance histogram after the pixel number limiting process is performed.

正規化された輝度ヒストグラムから、高輝度領域及び低輝度領域を削除し、さらに、累積画素数を制限することによって得られた輝度ヒストグラム(図29(d))の各ブロック番号と、それぞれの頻度に基づいて、輝度の平均値を算出したものがパラメータP2である。   Each block number of the luminance histogram (FIG. 29 (d)) obtained by deleting the high luminance region and the low luminance region from the normalized luminance histogram and limiting the cumulative number of 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は、それぞれ、式(16)、式(17)、式(18)のように定義される。   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 key correction value 2 of the parameter P7 ', and the luminance correction value 2 of the parameter P8 are defined as shown in Expression (16), Expression (17), and Expression (18), respectively.

P7(キー捕正値)={P3−((指標6/6)×18000+22000)}/24.78 (16)
P7’(キー補正値2)={P3−((指標4/6)×10000+30000)}/24.78
(17)
P8(輝度補正値2)=(指標5/6)×17500 (18)
P7 (key correction value) = {P3-((index 6/6) × 18000 + 22000)} / 24.78 (16)
P7 ′ (key correction value 2) = {P3-((index 4/6) × 10000 + 30000)} / 24.78
(17)
P8 (Luminance correction value 2) = (Index 5/6) × 17500 (18)

<シーン毎の階調処理条件設定>
図26に戻り、階調調整パラメータが算出されると、ステップS72では、その算出された階調調整パラメータに基づいて、撮影画像データに対する階調処理条件が設定される。具体的には、既に決定された階調調整方法に対応して予め設定された複数の階調変換曲線の中から、撮影シーンに応じて選択されたパラメータの値に対応する階調変換曲線が選択(決定)される。あるいは、パラメータの値に基づいて、階調変換曲線を算出するようにしてもよい。
<Setting gradation processing conditions for each scene>
Returning to FIG. 26, when the tone adjustment parameters are calculated, in step S72, tone processing conditions for the photographic image data are set based on the calculated tone adjustment parameters. Specifically, a gradation conversion curve corresponding to the value of a parameter selected according to the shooting scene is selected from a plurality of gradation conversion curves set in advance corresponding to the already determined gradation adjustment method. Selected (determined). Alternatively, the gradation conversion curve may be calculated based on the parameter value.

以下、各撮影シーン(光源条件及び露出条件)毎に、階調変換曲線の決定方法(ステップS72での階調処理条件の設定)について説明する。   Hereinafter, a method for determining a gradation conversion curve (setting of gradation processing conditions in step S72) will be described for each shooting scene (light source condition and exposure condition).

<<順光の場合>>
撮影シーンが順光である場合、パラメータP6を用いて、P1をP5と一致させるオフセット補正(8bit値の平行シフト)を下記の式(19)により行う。
出力画像のRGB値=入力画像のRGB値+P6 (19)
<< In the case of front light >>
When the photographic scene is front light, using the parameter P6, offset correction (parallel shift of an 8-bit value) that matches P1 with P5 is performed by the following equation (19).
RGB value of output image = RGB value of input image + P6 (19)

従って、撮影シーンが順光の場合、図27(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).

<<逆光の場合>>
撮影シーンが逆光である場合、図27(b)に示す複数の階調変換曲線の中から、パラメータP7(キー補正値)に対応する階調変換曲線が選択される。図27(b)の階調変換曲線の具体例を図30に示す。パラメータP7の値と、選択される階調変換曲線の対応関係を以下に示す。
<< In case of backlight >>
When the shooting scene is backlit, a gradation conversion curve corresponding to the parameter P7 (key correction value) is selected from a plurality of gradation conversion curves shown in FIG. FIG. 30 shows a specific example of the gradation conversion curve of FIG. The correspondence between the value of parameter P7 and the selected gradation conversion curve is shown below.

−50<P7<+50 の場合→L3
+50≦P7<+150 の場合→L4
+150≦P7<+250 の場合→L5
−150<P7≦−50 の場合→L2
−250<P7≦−150 の場合→L1
If -50 <P7 <+ 50 → L3
When + 50 ≦ P7 <+150 → L4
When + 150 ≦ P7 <+ 250 → L5
If -150 <P7 ≤ -50 → L2
If -250 <P7 ≤ -150 → L1

なお、撮影シーンが逆光の場合、この階調変換処理とともに、覆い焼き処理を併せて行うことが好ましい。この場合、逆光度を示す指標6に応じて覆い焼き処理の程度も調整されることが望ましい。   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 index 6 indicating the backlight intensity.

<<アンダーの場合>>
撮影シーンがアンダーである場合、図27(b)に示す複数の階調変換曲線の中から、パラメータP7’(キー補正値2)に対応する階調変換曲線が選択される。具体的には、撮影シーンが逆光の場合の階調変換曲線の選択方法と同様に、図30に示す階調変換曲線の中から、パラメータP7’の値に対応した階調変換曲線が選択される。なお、撮影シーンがアンダーである場合は、逆光の場合に示したような覆い焼き処理は行わない。
<< In case of under >>>>
When the shooting scene is under, a gradation conversion curve corresponding to the parameter P7 ′ (key correction value 2) is selected from the plurality of gradation conversion curves shown in FIG. Specifically, the gradation conversion curve corresponding to the value of the parameter P7 ′ is selected from the gradation conversion curves shown in FIG. 30 in the same manner as the selection method of the gradation conversion curve when the shooting scene is backlit. The When the shooting scene is under, the dodging process as shown in the case of backlight is not performed.

<<主要被写体がオーバーの場合>>
主要被写体がオーバーである場合、パラメータP9を用いてオフセット補正(8bit値の平行シフト)を式(20)により行う。
出力画像のRGB値=入力画像のRGB値十P9 (20)
<< When main subject is over >>
When the main subject is over, offset correction (parallel shift of 8-bit value) is performed by the equation (20) using the parameter P9.
RGB value of output image = RGB value of input image plus P9 (20)

従って、主要被写体がオーバーの場合、図27(c)に示す複数の階調変換曲線の中から、パラメータP9に対応する階調変換曲線が選択される。または、式(20)に基づいて階調変換曲線を算出(決定)してもよい。なお、式(20)のパラメータP9の値が、予め設定された所定値αを上回った場合、図30に示す曲線L1〜L5の中から、キー補正値がP9−αに対応する曲線が選択される。   Therefore, when the main subject is over, the gradation conversion curve corresponding to the parameter P9 is selected from the plurality of gradation conversion curves shown in FIG. Alternatively, the gradation conversion curve may be calculated (determined) based on Expression (20). When the value of parameter P9 in equation (20) exceeds a predetermined value α, a curve corresponding to the key correction value P9-α is selected from curves L1 to L5 shown in FIG. Is done.

なお、本実施形熊では、実際に撮影画像データに対して階調変換処理を施す場合、上述の階調変換処理条件を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.

以上説明したように、撮像装置100によれば、ライブビュー表示用の第1の画像と記録用の第2の画像の撮影シーンをそれぞれ判別するので、第1の画像と第2の画像それぞれに対して、適正な画像処理を行うことができる。   As described above, according to the imaging apparatus 100, since the shooting scenes of the first image for live view display and the second image for recording are determined, respectively, the first image and the second image are respectively determined. On the other hand, appropriate image processing can be performed.

具体的には、第1の画像に対しては、第1の画像の撮影シーンに応じた階調処理条件を設定するので、ライブビュー表示用の第1の画像に対して、適正な階調変換処理を行うことができる。また、第2の画像に対しては、第2の画像の撮影シーンに応じた階調処理条件を設定するので、記録用の第2の画像に対して、適正な階調変換処理を行うことができる。   Specifically, since gradation processing conditions are set for the first image according to the shooting scene of the first image, appropriate gradation is set for the first image for live view display. Conversion processing can be performed. In addition, since gradation processing conditions are set for the second image according to the shooting scene of the second image, appropriate gradation conversion processing is performed on the second image for recording. Can do.

また、第1の画像の撮影シーンに応じた露出調整量に基づいて、ライブビュー画像を取得する際の露出、及び、記録用画像の撮影時の露出を制御するので、適正な露出制御を行うことができる。   In addition, since the exposure at the time of acquiring the live view image and the exposure at the time of shooting the recording image are controlled based on the exposure adjustment amount according to the shooting scene of the first image, appropriate exposure control is performed. be able to.

また、画像サイズを縮小した第3の画像又は第4の画像の画像データに基づいて、撮影シーンを判別するので、処理の高速化を図ることができる。   In addition, since the photographic scene is determined based on the image data of the third image or the fourth image whose image size is reduced, the processing speed can be increased.

なお、上記実施形態における記述は、本発明に係る撮像装置の例であり、これに限定されるものではない。撮像装置を構成する各部の細部構成及び細部動作に関しても本発明の趣旨を逸脱することのない範囲で適宜変更可能である。 The description in the above embodiment is an example of the imaging apparatus according to the present invention, and the present invention is not limited to this. The detailed configuration and detailed operation of each part constituting the imaging apparatus can be changed as appropriate without departing from the spirit of the present invention.

本発明の実施形態における撮像装置100の外観構成図である。1 is an external configuration diagram of an imaging apparatus 100 according to an embodiment of the present invention. 撮像装置100の内部構成を示すブロック図である。2 is a block diagram illustrating an internal configuration of the imaging apparatus 100. FIG. 撮影処理部20の内部構成を示すブロック図である。3 is a block diagram illustrating an internal configuration of a photographing processing unit 20. FIG. AE制御部21での露出量制御を示すフローチャートである。4 is a flowchart showing exposure amount control in an AE control unit 21. シャッタ速度の制御において撮像素子に電荷が蓄積される様子を示す図である。It is a figure which shows a mode that an electric charge is accumulate | stored in an image pick-up element in control of shutter speed. AF制御部22での画像の焦点を合わせる制御を示すフローチャートである。4 is a flowchart showing control for focusing an image in an AF control unit 22. 撮影光学系3の移動に伴うコントラスト情報の変化と合焦点位置検出の様子を示す図である。It is a figure which shows the change of the contrast information accompanying the movement of the imaging optical system 3, and the mode of a focus position detection. 画素補間部23での、RGB各色成分毎に画素間の補間を行う画像データの処理を示すフローチャートである。7 is a flowchart illustrating image data processing in which interpolation between pixels is performed for each RGB color component in the pixel interpolation unit 23. AWB制御部24での、撮影画像におけるホワイトバランスを自動的に調整する処理を示すフローチャートである。It is a flowchart which shows the process which automatically adjusts the white balance in a picked-up image in the AWB control part 24. ガンマ補正曲線の例を示す図である。It is a figure which shows the example of a gamma correction curve. 画像処理部10の内部構成を示すブロック図である。2 is a block diagram showing an internal configuration of an image processing unit 10. FIG. (a)は、撮影された第1の画像の一例を示す図であり、(b)は、第1の画像を分割し、N×M画素の縮小画像とした第3の画像の一例を示す図である。(A) is a figure which shows an example of the image | photographed 1st image, (b) shows an example of the 3rd image which divided | segmented the 1st image and made it the reduced image of a NxM pixel. FIG. 撮像装置100において実行されるライブビュー表示処理を示すフローチャートである。12 is a flowchart showing live view display processing executed in the imaging apparatus 100. 撮像装置100において実行される撮影処理を示すフローチャートである。3 is a flowchart illustrating imaging processing executed in the imaging apparatus 100. シーン判別処理を示すフローチャートである。It is a flowchart which shows a scene discrimination | determination process. 占有率算出処理を示すフローチャートである。It is a flowchart which shows an occupation rate calculation process. 明度と色相からなる階級を示す図である。It is a figure which shows the class which consists of brightness and hue. (a)は、画面の外縁からの距離に応じて決定される領域n1〜n3を示す図であり、(b)は、領域n1〜n3と明度からなる階級を示す図である。(A) is a figure which shows the area | regions n1-n3 determined according to the distance from the outer edge of a screen, (b) is a figure which shows the class which consists of area | regions n1-n3 and brightness. 指標算出処理を示すフローチャートである。It is a flowchart which shows an index calculation process. 指標1を算出するための、第1の占有率に乗算する第1の係数を表す曲線を示す図である。It is a figure which shows the curve showing the 1st coefficient by which the 1st occupation rate for calculating the parameter | index 1 is multiplied. 指標2を算出するための、第1の占有率に乗算する第2の係数を表す曲線を示す図である。It is a figure which shows the curve showing the 2nd coefficient by which the 1st occupation rate for calculating the parameter | index 2 is multiplied. 指標3を算出するための、第2の占有率に乗算する第3の係数を表す曲線を領域別(n1〜n3)に示す図である。It is a figure which shows the curve showing the 3rd coefficient by which the 2nd occupation rate for calculating the parameter | index 3 is multiplied for every area | region (n1-n3). 指標4算出処理を示すフローチャートである。It is a flowchart which shows the parameter | index 4 calculation process. 撮影シーン(順光、逆光、オーバー、アンダー)と指標4〜6の関係を示すプロット図である。It is a plot figure which shows the relationship between an imaging | photography scene (front light, backlight, over, under) and the indices 4-6. 露出調整量算出処理を示すフローチャートである。It is a flowchart which shows exposure adjustment amount calculation processing. 階調処理条件設定を示すフローチャートである。It is a flowchart which shows gradation processing condition setting. 各階調調整方法に対応する階調変換曲線を示す図である。It is a figure which shows the gradation conversion curve corresponding to each gradation adjustment method. (a)は、輝度の度数分布(ヒストグラム)であり、(b)は、正規化されたヒストグラムであり、(c)は、ブロック分割されたヒストグラムである。(A) is a luminance frequency distribution (histogram), (b) is a normalized histogram, and (c) is a block-divided histogram. (a)及び(b)は、輝度のヒストグラムからの低輝度領域及び高輝度領域の削除を説明する図であり、(c)及び(d)は、輝度の頻度の制限を説明する図である。(A) And (b) is a figure explaining the deletion of the low-intensity area | region and high-intensity area | region from the brightness | luminance histogram, (c) And (d) is a figure explaining the restriction | limiting of the frequency of a brightness | luminance. . 撮影シーンが逆光又はアンダーである場合の階調処理条件を表す階調変換曲線を示す図である。It is a figure which shows the gradation conversion curve showing the gradation processing conditions in case a imaging | photography scene is backlight or under.

符号の説明Explanation of symbols

100 撮像装置
1 筐体
2 方向選択キー
3 撮影光学系
4 フラッシュ
5 ファインダ
6 電源スイッチ
7 表示部
8 レリーズボタン
10 画像処理部
11a 第1画像取得部
11b 第2画像取得部
12a 第3画像取得部
12b 第4画像取得部
13 占有率算出部
14 指標算出部
15 シーン判別部
16 階調処理条件設定部
17 階調変換処理部
18 露出調整量算出部
20 撮影処理部
21 AE制御部
22 AF制御部
23 画素補間部
24 AWB制御部
25 ガンマ補正部
31 プロセッサ
32 メモリ
33a,33b 撮像素子
34 画像データ出力部
35 操作部
36 タイミングジェネレータ
37 シャッタユニット
38 絞りユニット
39 フォーカスユニット
DESCRIPTION OF SYMBOLS 100 Image pick-up device 1 Housing | casing 2 Direction selection key 3 Shooting optical system 4 Flash 5 Finder 6 Power switch 7 Display part 8 Release button 10 Image processing part 11a 1st image acquisition part 11b 2nd image acquisition part 12a 3rd image acquisition part 12b Fourth image acquisition unit 13 Occupancy rate calculation unit 14 Index calculation unit 15 Scene determination unit 16 Gradation processing condition setting unit 17 Gradation conversion processing unit 18 Exposure adjustment amount calculation unit 20 Imaging processing unit 21 AE control unit 22 AF control unit 23 Pixel interpolation unit 24 AWB control unit 25 Gamma correction unit 31 Processor 32 Memory 33a, 33b Image sensor 34 Image data output unit 35 Operation unit 36 Timing generator 37 Shutter unit 38 Aperture unit 39 Focus unit

Claims (27)

第1の撮像素子により、ライブビュー表示用の第1の画像を取得する第1の撮像手段と、
第2の撮像素子により、記録用の第2の画像を取得する第2の撮像手段と、
前記第1の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別し、前記第2の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別するシーン判別処理手段と、
を備えたことを特徴とする撮像装置。
First imaging means for acquiring a first image for live view display by a first imaging element;
A second imaging means for acquiring a second image for recording by the second imaging element;
A scene determination process for determining a shooting scene of the first image based on the image data of the first image and determining a shooting scene of the second image based on the image data of the second image. Means,
An imaging apparatus comprising:
前記シーン判別処理手段による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の画像に対する階調処理条件を設定する第1の階調処理条件設定手段を備えたことを特徴とする請求項1に記載の撮像装置。   The image processing apparatus includes first gradation processing condition setting means for setting gradation processing conditions for the first image based on a determination result of the shooting scene of the first image by the scene determination processing means. The imaging device according to claim 1. 前記シーン判別処理手段による前記第2の画像の撮影シーンの判別結果に基づいて、前記第2の画像に対する階調処理条件を設定する第2の階調処理条件設定手段を備えたことを特徴とする請求項1又は2に記載の撮像装置。   And a second gradation processing condition setting means for setting a gradation processing condition for the second image based on a result of determination of a shooting scene of the second image by the scene determination processing means. The imaging apparatus according to claim 1 or 2. 前記シーン判別処理手段による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の撮像手段の露出調整量を算出する露出調整量算出手段と、
前記露出調整量算出手段により算出された露出調整量に基づいて、前記第1の撮像手段の露出を制御する第1の露出制御手段と、
を備えたことを特徴とする請求項1〜3の何れか一項に記載の撮像装置。
An exposure adjustment amount calculating unit that calculates an exposure adjustment amount of the first imaging unit based on a determination result of the shooting scene of the first image by the scene determination processing unit;
First exposure control means for controlling exposure of the first imaging means based on the exposure adjustment amount calculated by the exposure adjustment amount calculation means;
The imaging apparatus according to claim 1, further comprising:
前記第2の撮像手段により前記第2の画像を取得する直前に算出された前記露出調整量に基づいて、前記第2の撮像手段の露出を制御する第2の露出制御手段を備えたことを特徴とする請求項4に記載の撮像装置。   A second exposure control unit configured to control exposure of the second imaging unit based on the exposure adjustment amount calculated immediately before obtaining the second image by the second imaging unit; The imaging apparatus according to claim 4, wherein the imaging apparatus is characterized. 前記第1の撮像手段により取得された第1の画像から画像サイズを縮小した第3の画像を取得する第3の画像取得手段を備え、
前記シーン判別処理手段は、前記第3の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別することを特徴とする請求項1〜5の何れか一項に記載の撮像装置。
A third image acquisition unit that acquires a third image obtained by reducing the image size from the first image acquired by the first imaging unit;
The imaging apparatus according to claim 1, wherein the scene determination processing unit determines a shooting scene of the first image based on image data of the third image. .
前記第2の撮像手段により取得された第2の画像から画像サイズを縮小した第4の画像を取得する第4の画像取得手段を備え、
前記シーン判別処理手段は、前記第4の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別することを特徴とする請求項1〜6の何れか一項に記載の撮像装置。
A fourth image acquisition means for acquiring a fourth image obtained by reducing the image size from the second image acquired by the second imaging means;
The imaging apparatus according to claim 1, wherein the scene determination processing unit determines a shooting scene of the second image based on image data of the fourth image. .
前記シーン判別処理手段は、
前記第3の画像の画像データから色情報を取得する色情報取得手段と、
前記取得された色情報に基づいて、前記第3の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、
前記取得された色情報に基づいて、前記第3の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出手段と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出手段と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出手段と、
少なくとも前記第3の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出手段と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出手段と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出手段と、
前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第1の画像の撮影シーンを特定するシーン判別手段と、
を備えたことを特徴とする請求項6に記載の撮像装置。
The scene discrimination processing means includes
Color information acquisition means for acquiring color information from image data of the third image;
Based on the acquired color information, the image data of the third image is classified into a class composed of a combination of a predetermined brightness and hue, and the entire image data of the third image is classified for each classified class. First occupancy ratio calculating means for calculating a first occupancy ratio indicating a ratio of
Based on the acquired color information, the image data of the third image is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and the third image of the third image is classified for each classified class. Second occupancy ratio calculating means for calculating a second occupancy ratio indicating the ratio of the entire image data;
A first index calculating means for calculating a first index by multiplying the first occupancy by a preset first coefficient;
A second index calculating means for calculating a second index by multiplying the first occupancy by a preset second coefficient;
A third index calculating means for calculating a third index by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating means for calculating a fourth index by multiplying the average brightness of the skin color at least in the center of the screen of the image data of the third image by a preset fourth coefficient;
A fifth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset fifth coefficient. Index calculation means;
A sixth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset sixth coefficient. Index calculation means;
Scene discriminating means for specifying a shooting scene of the first image based on the fourth index, the fifth index, and the sixth index;
The imaging apparatus according to claim 6, further comprising:
前記シーン判別処理手段は、
前記第4の画像の画像データから色情報を取得する色情報取得手段と、
前記取得された色情報に基づいて、前記第4の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出手段と、
前記取得された色情報に基づいて、前記第4の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出手段と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出手段と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出手段と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出手段と、
少なくとも前記第4の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出手段と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出手段と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出手段と、
前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第2の画像の撮影シーンを特定するシーン判別手段と、
を備えたことを特徴とする請求項7に記載の撮像装置。
The scene discrimination processing means includes
Color information acquisition means for acquiring color information from image data of the fourth image;
Based on the acquired color information, the image data of the fourth image is classified into a class composed of a combination of a predetermined brightness and hue, and the entire image data of the fourth image is classified for each classified class. First occupancy ratio calculating means for calculating a first occupancy ratio indicating a ratio of
Based on the acquired color information, the image data of the fourth image is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and the fourth image of the fourth image is classified for each classified class. Second occupancy ratio calculating means for calculating a second occupancy ratio indicating the ratio of the entire image data;
A first index calculating means for calculating a first index by multiplying the first occupancy by a preset first coefficient;
A second index calculating means for calculating a second index by multiplying the first occupancy by a preset second coefficient;
A third index calculating means for calculating a third index by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating means for calculating a fourth index by multiplying the average brightness of the skin color at least in the center of the screen of the image data of the fourth image by a preset fourth coefficient;
A fifth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset fifth coefficient. Index calculation means;
A sixth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset sixth coefficient. Index calculation means;
Scene discriminating means for specifying a shooting scene of the second image based on the fourth index, the fifth index, and the sixth index;
The imaging apparatus according to claim 7, further comprising:
第1の撮像素子により、ライブビュー表示用の第1の画像を取得する第1の撮像工程と、
第2の撮像素子により、記録用の第2の画像を取得する第2の撮像工程と、
前記第1の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別し、前記第2の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別するシーン判別処理工程と、
を含むことを特徴とする画像処理方法。
A first imaging step of acquiring a first image for live view display by the first imaging element;
A second imaging step of acquiring a second image for recording by the second imaging element;
A scene determination process for determining a shooting scene of the first image based on the image data of the first image and determining a shooting scene of the second image based on the image data of the second image. Process,
An image processing method comprising:
前記シーン判別処理工程における前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の画像に対する階調処理条件を設定する第1の階調処理条件設定工程を含むことを特徴とする請求項10に記載の画像処理方法。   A first gradation processing condition setting step of setting a gradation processing condition for the first image based on a determination result of a shooting scene of the first image in the scene determination processing step; The image processing method according to claim 10. 前記シーン判別処理工程における前記第2の画像の撮影シーンの判別結果に基づいて、前記第2の画像に対する階調処理条件を設定する第2の階調処理条件設定工程を含むことを特徴とする請求項10又は11に記載の画像処理方法。   And a second gradation processing condition setting step of setting a gradation processing condition for the second image based on a determination result of a shooting scene of the second image in the scene determination processing step. The image processing method according to claim 10 or 11. 前記シーン判別処理工程における前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の撮像工程における露出調整量を算出する露出調整量算出工程と、
前記露出調整量算出工程において算出された露出調整量に基づいて、前記第1の撮像工程における露出を制御する第1の露出制御工程と、
を含むことを特徴とする請求項10〜12の何れか一項に記載の画像処理方法。
An exposure adjustment amount calculation step for calculating an exposure adjustment amount in the first imaging step based on a determination result of a shooting scene of the first image in the scene determination processing step;
A first exposure control step of controlling exposure in the first imaging step based on the exposure adjustment amount calculated in the exposure adjustment amount calculation step;
The image processing method according to claim 10, further comprising:
前記第2の撮像工程において前記第2の画像を取得する直前に算出された前記露出調整量に基づいて、前記第2の撮像工程における露出を制御する第2の露出制御工程を含むことを特徴とする請求項13に記載の画像処理方法。   And a second exposure control step of controlling exposure in the second imaging step based on the exposure adjustment amount calculated immediately before obtaining the second image in the second imaging step. The image processing method according to claim 13. 前記第1の撮像工程において取得された第1の画像から画像サイズを縮小した第3の画像を取得する第3の画像取得工程を含み、
前記シーン判別処理工程では、前記第3の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別することを特徴とする請求項10〜14の何れか一項に記載の画像処理方法。
Including a third image acquisition step of acquiring a third image obtained by reducing the image size from the first image acquired in the first imaging step;
The image processing according to any one of claims 10 to 14, wherein, in the scene determination processing step, a shooting scene of the first image is determined based on image data of the third image. Method.
前記第2の撮像工程において取得された第2の画像から画像サイズを縮小した第4の画像を取得する第4の画像取得工程を含み、
前記シーン判別処理工程では、前記第4の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別することを特徴とする請求項10〜15の何れか一項に記載の画像処理方法。
Including a fourth image acquisition step of acquiring a fourth image reduced in image size from the second image acquired in the second imaging step;
The image processing according to any one of claims 10 to 15, wherein in the scene determination processing step, a shooting scene of the second image is determined based on image data of the fourth image. Method.
前記シーン判別処理工程は、
前記第3の画像の画像データから色情報を取得する色情報取得工程と、
前記取得された色情報に基づいて、前記第3の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出工程と、
前記取得された色情報に基づいて、前記第3の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出工程と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出工程と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出工程と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出工程と、
少なくとも前記第3の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出工程と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出工程と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出工程と、
前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第1の画像の撮影シーンを特定するシーン判別工程と、
を含むことを特徴とする請求項15に記載の画像処理方法。
The scene discrimination processing step includes
A color information acquisition step of acquiring color information from the image data of the third image;
Based on the acquired color information, the image data of the third image is classified into a class composed of a combination of a predetermined brightness and hue, and the entire image data of the third image is classified for each classified class. A first occupancy ratio calculating step of calculating a first occupancy ratio indicating a ratio of
Based on the acquired color information, the image data of the third image is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and the third image of the third image is classified for each classified class. A second occupancy ratio calculating step of calculating a second occupancy ratio indicating the ratio of the entire image data;
A first index calculating step of calculating a first index by multiplying the first occupancy by a preset first coefficient;
A second index calculating step of calculating a second index by multiplying the first occupancy by a preset second coefficient;
A third index calculating step of calculating a third index by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating step of calculating a fourth index by multiplying the average brightness of the skin color at the center of the screen of the image data of the third image by a preset fourth coefficient;
A fifth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset fifth coefficient. An index calculation process;
A sixth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset sixth coefficient. An index calculation process;
A scene determination step for specifying a shooting scene of the first image based on the fourth index, the fifth index, and the sixth index;
The image processing method according to claim 15, further comprising:
前記シーン判別処理工程は、
前記第4の画像の画像データから色情報を取得する色情報取得工程と、
前記取得された色情報に基づいて、前記第4の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出工程と、
前記取得された色情報に基づいて、前記第4の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出工程と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出工程と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出工程と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出工程と、
少なくとも前記第4の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出工程と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出工程と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出工程と、
前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第2の画像の撮影シーンを特定するシーン判別工程と、
を含むことを特徴とする請求項16に記載の画像処理方法。
The scene discrimination processing step includes
A color information acquisition step of acquiring color information from the image data of the fourth image;
Based on the acquired color information, the image data of the fourth image is classified into a class composed of a combination of a predetermined brightness and hue, and the entire image data of the fourth image is classified for each classified class. A first occupancy ratio calculating step of calculating a first occupancy ratio indicating a ratio of
Based on the acquired color information, the image data of the fourth image is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and the fourth image of the fourth image is classified for each classified class. A second occupancy ratio calculating step of calculating a second occupancy ratio indicating the ratio of the entire image data;
A first index calculating step of calculating a first index by multiplying the first occupancy by a preset first coefficient;
A second index calculating step of calculating a second index by multiplying the first occupancy by a preset second coefficient;
A third index calculating step of calculating a third index by multiplying the second occupancy by a preset third coefficient;
A fourth index calculating step of calculating a fourth index by multiplying the average brightness of the skin color at least in the center of the screen of the image data of the fourth image by a preset fourth coefficient;
A fifth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset fifth coefficient. An index calculation process;
A sixth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset sixth coefficient. An index calculation process;
A scene determination step for identifying a shooting scene of the second image based on the fourth index, the fifth index, and the sixth index;
The image processing method according to claim 16, further comprising:
コンピュータに、
第1の撮像素子により、ライブビュー表示用の第1の画像を取得する第1の撮像機能と、
第2の撮像素子により、記録用の第2の画像を取得する第2の撮像機能と、
前記第1の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別し、前記第2の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別するシーン判別処理機能と、
を実現させるための画像処理プログラム。
On the computer,
A first imaging function for acquiring a first image for live view display by the first imaging element;
A second imaging function for acquiring a second image for recording by the second imaging element;
A scene determination process for determining a shooting scene of the first image based on the image data of the first image and determining a shooting scene of the second image based on the image data of the second image. Function and
An image processing program for realizing
前記コンピュータに、さらに、
前記シーン判別処理機能による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の画像に対する階調処理条件を設定する第1の階調処理条件設定機能を実現させることを特徴とする請求項19に記載の画像処理プログラム。
In addition to the computer,
A first gradation processing condition setting function for setting a gradation processing condition for the first image is realized based on a determination result of a shooting scene of the first image by the scene determination processing function. The image processing program according to claim 19.
前記コンピュータに、さらに、
前記シーン判別処理機能による前記第2の画像の撮影シーンの判別結果に基づいて、前記第2の画像に対する階調処理条件を設定する第2の階調処理条件設定機能を実現させることを特徴とする請求項19又は20に記載の画像処理プログラム。
In addition to the computer,
A second gradation processing condition setting function for setting a gradation processing condition for the second image is realized based on a determination result of a shooting scene of the second image by the scene determination processing function. The image processing program according to claim 19 or 20.
前記コンピュータに、さらに、
前記シーン判別処理機能による前記第1の画像の撮影シーンの判別結果に基づいて、前記第1の撮像機能における露出調整量を算出する露出調整量算出機能と、
前記露出調整量算出機能により算出された露出調整量に基づいて、前記第1の撮像機能における露出を制御する第1の露出制御機能と、
を実現させることを特徴とする請求項19〜21の何れか一項に記載の画像処理プログラム。
In addition to the computer,
An exposure adjustment amount calculation function for calculating an exposure adjustment amount in the first imaging function based on a determination result of a shooting scene of the first image by the scene determination processing function;
A first exposure control function for controlling exposure in the first imaging function based on the exposure adjustment amount calculated by the exposure adjustment amount calculation function;
The image processing program according to any one of claims 19 to 21, wherein the image processing program is implemented.
前記コンピュータに、さらに、
前記第2の撮像機能により前記第2の画像を取得する直前に算出された前記露出調整量に基づいて、前記第2の撮像機能における露出を制御する第2の露出制御機能を実現させることを特徴とする請求項22に記載の画像処理プログラム。
In addition to the computer,
Realizing a second exposure control function for controlling exposure in the second imaging function based on the exposure adjustment amount calculated immediately before obtaining the second image by the second imaging function. 23. An image processing program according to claim 22, wherein
前記コンピュータに、さらに、
前記第1の撮像機能により取得された第1の画像から画像サイズを縮小した第3の画像を取得する第3の画像取得機能を実現させ、
前記シーン判別処理機能は、前記第3の画像の画像データに基づいて、前記第1の画像の撮影シーンを判別することを特徴とする請求項19〜23の何れか一項に記載の画像処理プログラム。
In addition to the computer,
Realizing a third image acquisition function for acquiring a third image obtained by reducing the image size from the first image acquired by the first imaging function;
The image processing according to any one of claims 19 to 23, wherein the scene determination processing function determines a shooting scene of the first image based on image data of the third image. program.
前記コンピュータに、さらに、
前記第2の撮像機能により取得された第2の画像から画像サイズを縮小した第4の画像を取得する第4の画像取得機能を実現させ、
前記シーン判別処理機能は、前記第4の画像の画像データに基づいて、前記第2の画像の撮影シーンを判別することを特徴とする請求項19〜24の何れか一項に記載の画像処理プログラム。
In addition to the computer,
Realizing a fourth image acquisition function for acquiring a fourth image obtained by reducing the image size from the second image acquired by the second imaging function;
The image processing according to any one of claims 19 to 24, wherein the scene determination processing function determines a shooting scene of the second image based on image data of the fourth image. program.
前記シーン判別処理機能は、
前記第3の画像の画像データから色情報を取得する色情報取得機能と、
前記取得された色情報に基づいて、前記第3の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出機能と、
前記取得された色情報に基づいて、前記第3の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第3の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出機能と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出機能と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出機能と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出機能と、
少なくとも前記第3の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出機能と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出機能と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出機能と、
前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第1の画像の撮影シーンを特定するシーン判別機能と、
を含むことを特徴とする請求項24に記載の画像処理プログラム。
The scene discrimination processing function is
A color information acquisition function for acquiring color information from the image data of the third image;
Based on the acquired color information, the image data of the third image is classified into a class composed of a combination of a predetermined brightness and hue, and the entire image data of the third image is classified for each classified class. A first occupancy ratio calculating function for calculating a first occupancy ratio indicating a proportion of
Based on the acquired color information, the image data of the third image is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and the third image of the third image is classified for each classified class. A second occupancy ratio calculation function for calculating a second occupancy ratio indicating a ratio of the entire image data;
A first index calculating function for calculating a first index by multiplying the first occupancy by a preset first coefficient;
A second index calculating function for calculating a second index by multiplying the first occupancy by a preset second coefficient;
A third index calculating function for calculating a third index by multiplying the second occupancy by a preset third coefficient;
A fourth index calculation function for calculating a fourth index by multiplying the average brightness of the skin color at least in the center of the screen of the image data of the third image by a preset fourth coefficient;
A fifth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset fifth coefficient. An index calculation function,
A sixth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset sixth coefficient. An index calculation function,
A scene determination function for specifying a shooting scene of the first image based on the fourth index, the fifth index, and the sixth index;
The image processing program according to claim 24, further comprising:
前記シーン判別処理機能は、
前記第4の画像の画像データから色情報を取得する色情報取得機能と、
前記取得された色情報に基づいて、前記第4の画像の画像データを所定の明度と色相の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第1の占有率を算出する第1の占有率算出機能と、
前記取得された色情報に基づいて、前記第4の画像の画像データを画面の外縁からの距離と明度の組み合わせからなる階級に分類し、当該分類された階級毎に、前記第4の画像の画像データ全体に占める割合を示す第2の占有率を算出する第2の占有率算出機能と、
前記第1の占有率に予め設定された第1の係数を乗算することにより、第1の指標を算出する第1の指標算出機能と、
前記第1の占有率に予め設定された第2の係数を乗算することにより、第2の指標を算出する第2の指標算出機能と、
前記第2の占有率に予め設定された第3の係数を乗算することにより、第3の指標を算出する第3の指標算出機能と、
少なくとも前記第4の画像の画像データの画面中央部における肌色の平均輝度に、予め設定された第4の係数を乗算することにより、第4の指標を算出する第4の指標算出機能と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第5の係数を乗算することにより、第5の指標を算出する第5の指標算出機能と、
前記第1の指標、前記第2の指標及び前記第3の指標のうち少なくとも一つ以上の指標に予め設定された第6の係数を乗算することにより、第6の指標を算出する第6の指標算出機能と、
前記第4の指標、前記第5の指標及び前記第6の指標に基づいて、前記第2の画像の撮影シーンを特定するシーン判別機能と、
を含むことを特徴とする請求項25に記載の画像処理プログラム。
The scene discrimination processing function is
A color information acquisition function for acquiring color information from the image data of the fourth image;
Based on the acquired color information, the image data of the fourth image is classified into a class composed of a combination of a predetermined brightness and hue, and the entire image data of the fourth image is classified for each classified class. A first occupancy ratio calculating function for calculating a first occupancy ratio indicating a proportion of
Based on the acquired color information, the image data of the fourth image is classified into a class composed of a combination of the distance from the outer edge of the screen and the brightness, and the fourth image of the fourth image is classified for each classified class. A second occupancy ratio calculation function for calculating a second occupancy ratio indicating a ratio of the entire image data;
A first index calculating function for calculating a first index by multiplying the first occupancy by a preset first coefficient;
A second index calculating function for calculating a second index by multiplying the first occupancy by a preset second coefficient;
A third index calculating function for calculating a third index by multiplying the second occupancy by a preset third coefficient;
A fourth index calculation function for calculating a fourth index by multiplying the average brightness of the skin color at least in the center of the screen of the image data of the fourth image by a preset fourth coefficient;
A fifth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset fifth coefficient. An index calculation function,
A sixth index is calculated by multiplying at least one of the first index, the second index, and the third index by a preset sixth coefficient. An index calculation function,
A scene determination function for specifying a shooting scene of the second image based on the fourth index, the fifth index, and the sixth index;
The image processing program according to claim 25, further comprising:
JP2006109766A 2006-04-12 2006-04-12 Imaging apparatus, image processing method, and image processing program Pending JP2007288245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006109766A JP2007288245A (en) 2006-04-12 2006-04-12 Imaging apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006109766A JP2007288245A (en) 2006-04-12 2006-04-12 Imaging apparatus, image processing method, and image processing program

Publications (1)

Publication Number Publication Date
JP2007288245A true JP2007288245A (en) 2007-11-01

Family

ID=38759649

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006109766A Pending JP2007288245A (en) 2006-04-12 2006-04-12 Imaging apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP2007288245A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009085119A1 (en) 2007-12-19 2009-07-09 Eastman Kodak Company Camera using preview image to select exposure
JP2009260510A (en) * 2008-04-15 2009-11-05 Mega Chips Corp Single-lens reflex digital camera
US8587691B2 (en) 2008-11-28 2013-11-19 Samsung Electronics Co., Ltd. Photographing apparatus and method for dynamic range adjustment and stereography

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05297266A (en) * 1992-04-20 1993-11-12 Canon Inc Camera with focus sensing means and line-of-sight sensing means
JP2002290826A (en) * 2001-03-28 2002-10-04 Minolta Co Ltd Digital camera
JP2004023452A (en) * 2002-06-17 2004-01-22 Fuji Photo Film Co Ltd Electronic camera
JP2006050233A (en) * 2004-08-04 2006-02-16 Konica Minolta Photo Imaging Inc Image pickup apparatus, image processor, image processing method and program
JP2006094000A (en) * 2004-09-22 2006-04-06 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, and image processing program
JP2007281873A (en) * 2006-04-06 2007-10-25 Nikon Corp Imaging device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05297266A (en) * 1992-04-20 1993-11-12 Canon Inc Camera with focus sensing means and line-of-sight sensing means
JP2002290826A (en) * 2001-03-28 2002-10-04 Minolta Co Ltd Digital camera
JP2004023452A (en) * 2002-06-17 2004-01-22 Fuji Photo Film Co Ltd Electronic camera
JP2006050233A (en) * 2004-08-04 2006-02-16 Konica Minolta Photo Imaging Inc Image pickup apparatus, image processor, image processing method and program
JP2006094000A (en) * 2004-09-22 2006-04-06 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, and image processing program
JP2007281873A (en) * 2006-04-06 2007-10-25 Nikon Corp Imaging device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009085119A1 (en) 2007-12-19 2009-07-09 Eastman Kodak Company Camera using preview image to select exposure
US8488015B2 (en) 2007-12-19 2013-07-16 Intellectual Ventures Fund 83 Llc Camera using preview image to select exposure
US9819852B2 (en) 2007-12-19 2017-11-14 Monument Peak Ventures, Llc Camera using preview image to select exposure
US20180041691A1 (en) * 2007-12-19 2018-02-08 Monument Peak Ventures, Llc Camera using preview image to select exposure
US10142536B2 (en) * 2007-12-19 2018-11-27 Monument Peak Ventures, Llc Camera using preview image to select exposure
US10412296B2 (en) 2007-12-19 2019-09-10 Monument Peak Ventures, Llc Camera using preview image to select exposure
JP2009260510A (en) * 2008-04-15 2009-11-05 Mega Chips Corp Single-lens reflex digital camera
US8711246B2 (en) 2008-04-15 2014-04-29 Megachips Corporation Single-lens reflex digital camera which displays an image for live view
US8587691B2 (en) 2008-11-28 2013-11-19 Samsung Electronics Co., Ltd. Photographing apparatus and method for dynamic range adjustment and stereography
US8947557B2 (en) 2008-11-28 2015-02-03 Samsung Electronics Co., Ltd. Photographing apparatus and method for dynamic range adjustment and stereography

Similar Documents

Publication Publication Date Title
CN108683862B (en) Imaging control method, imaging control device, electronic equipment and computer-readable storage medium
US8305487B2 (en) Method and apparatus for controlling multiple exposures
JP5398156B2 (en) WHITE BALANCE CONTROL DEVICE, ITS CONTROL METHOD, AND IMAGING DEVICE
EP2608527B1 (en) Image pickup apparatus, control method for image pickup apparatus, and storage medium
CN110246101B (en) Image processing method and device
US10091422B2 (en) Image processing device and recording medium
CN104702824A (en) Image capturing apparatus and control method of image capturing apparatus
JP2007184888A (en) Imaging apparatus, image processor, image processing method, and image processing program
JP5782311B2 (en) Imaging apparatus and control method thereof
JP2006333205A (en) Imaging apparatus, image processing method and image processing program
JP4154128B2 (en) Image processing apparatus, image processing method, and recording medium on which program for executing the method is recorded
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
CN110276730B (en) Image processing method and device and electronic equipment
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2007288245A (en) Imaging apparatus, image processing method, and image processing program
JP2007243542A (en) Imaging apparatus, image processing apparatus, 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
JP2007184887A (en) Image pickup device, image processor, image processing method and image processing program
JP2007312294A (en) Imaging apparatus, image processor, method for processing image, and image processing program
JP2007201679A (en) Imaging apparatus, image processing method, and image processing program
JP2007243556A (en) Imaging apparatus, image processing method, and image processing program
JP2007235369A (en) Imaging apparatus, and unit, method, and program for processing image
JP2006197460A (en) Image processing method, image processor, image processing program and image pickup device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20070827

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080221

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090319

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20100913

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20101007

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101129

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110422