JP2011139481A - Device, method and program for calculating auto white balance correction value, and imaging device - Google Patents
Device, method and program for calculating auto white balance correction value, and imaging device Download PDFInfo
- Publication number
- JP2011139481A JP2011139481A JP2011014426A JP2011014426A JP2011139481A JP 2011139481 A JP2011139481 A JP 2011139481A JP 2011014426 A JP2011014426 A JP 2011014426A JP 2011014426 A JP2011014426 A JP 2011014426A JP 2011139481 A JP2011139481 A JP 2011139481A
- Authority
- JP
- Japan
- Prior art keywords
- correction value
- face
- area
- awb
- white balance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012937 correction Methods 0.000 title claims abstract description 371
- 238000003384 imaging method Methods 0.000 title claims description 11
- 238000000034 method Methods 0.000 title abstract description 60
- 238000012935 Averaging Methods 0.000 claims abstract description 10
- 238000004364 calculation method Methods 0.000 claims description 154
- 239000003086 colorant Substances 0.000 claims description 28
- 238000013075 data extraction Methods 0.000 claims description 19
- 239000000284 extract Substances 0.000 claims description 15
- 230000003287 optical effect Effects 0.000 claims description 2
- 238000001514 detection method Methods 0.000 abstract description 18
- 238000012545 processing Methods 0.000 description 88
- 230000006870 function Effects 0.000 description 31
- 238000000605 extraction Methods 0.000 description 27
- 230000000875 corresponding effect Effects 0.000 description 19
- 238000010586 diagram Methods 0.000 description 19
- 238000011156 evaluation Methods 0.000 description 7
- 238000006243 chemical reaction Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 239000004575 stone Substances 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000015654 memory Effects 0.000 description 2
- 230000037311 normal skin Effects 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 229910000906 Bronze Inorganic materials 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 239000010974 bronze Substances 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- KUNSUQLRTQLHQQ-UHFFFAOYSA-N copper tin Chemical compound [Cu].[Sn] KUNSUQLRTQLHQQ-UHFFFAOYSA-N 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 230000008921 facial expression Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000010422 painting Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- WFKWXMTUELFFGS-UHFFFAOYSA-N tungsten Chemical compound [W] WFKWXMTUELFFGS-UHFFFAOYSA-N 0.000 description 1
- 239000010937 tungsten Substances 0.000 description 1
- 229910052721 tungsten Inorganic materials 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Images
Abstract
Description
本発明は、顔検出機能を用いた画像のホワイトバランス調節に関する。 The present invention relates to white balance adjustment of an image using a face detection function.
特許文献1では、画像内の肌色領域を特定し、肌領域の色味に応じて光源を特定し、ホワイトバランス(WB)補正値を求める。
In
特許文献2では、画像内の顔領域を特定し、顔領域内から代表肌色を抽出し、代表肌色に応じて光源を特定し、WB補正値を求める。
In
特許文献1および2では、彫像や石像など人以外の顔が検出された場合や、フェイスペイントして肌色でない人の顔が検出された場合、正しい光源を特定することができず、適切なホワイトバランス補正値を求めることができない。例えば、白い石像の顔の色分布から、青い光が顔の肌色に当たって白くなっていると推定したとする。この青い光が光源色であるとの前提でホワイトバランス調整を行うと、画像が黄色くなってしまう(いわゆるカラーフェリア現象)。
In
本発明は、顔検出機能を用いたオートホワイトバランス補正における誤補正を防ぐことを目的とする。 An object of the present invention is to prevent erroneous correction in auto white balance correction using a face detection function.
本発明に係るオートホワイトバランス補正値算出方法は、画像データを入力するステップと、入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出するステップと、画像データから顔領域を特定するステップと、画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出するステップと、画像データから第1の特徴データを抽出するとともに、顔領域中の画像データから第2の特徴データを抽出するステップと、第1の特徴データと第2の特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出するステップと、を含む。 An auto white balance correction value calculation method according to the present invention includes a step of inputting image data, and a step of calculating a normal AWB correction value that is a first auto white balance (AWB) correction value based on the input image data. Identifying a face area from the image data, calculating a face AWB correction value that is a second AWB correction value based on the face area of the image data, and extracting first feature data from the image data And at least one of the face AWB correction value and the normal AWB correction value based on the step of extracting the second feature data from the image data in the face region and the comparison result between the first feature data and the second feature data. Calculating a final AWB correction value corresponding to one of them.
第1の特徴データは画像データに基づいて特定された光源色であり、第2の特徴データは顔領域に基づいて特定された光源色である。 The first feature data is the light source color specified based on the image data, and the second feature data is the light source color specified based on the face area.
この方法は、画像データの光源色と顔領域の光源色との差分量を算出するステップと、差分量に基づき、最終的なAWB補正値を算出するステップと、をさらに含んでもよい。 This method may further include a step of calculating a difference amount between the light source color of the image data and the light source color of the face region, and a step of calculating a final AWB correction value based on the difference amount.
この方法は、第1の特徴データと第2の特徴データとの比較結果に基づき、顔AWB補正値または通常AWB補正値のうちいずれか一方を最終的なAWB補正値として選択するステップをさらに含んでもよい。 The method further includes the step of selecting either the face AWB correction value or the normal AWB correction value as the final AWB correction value based on the comparison result between the first feature data and the second feature data. But you can.
第1の特徴データと第2の特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値を0%以上100%以下の所定の重みαにより加重平均することで最終的なAWB補正値を算出するステップをさらに含んでもよい。 Based on the comparison result between the first feature data and the second feature data, the final AWB correction is performed by weighted averaging the face AWB correction value and the normal AWB correction value with a predetermined weight α of 0% to 100%. A step of calculating a value may further be included.
第1の特徴データと第2の特徴データとの比較結果に基づき、画像データの光源色および顔領域の光源色の各々を0%以上100%以下の所定の重みαにより加重平均することで最終的な光源色を求めるステップと、最終的な光源色に応じて最終的なAWB補正値を算出するステップと、をさらに含んでもよい。 Based on the comparison result between the first feature data and the second feature data, each of the light source color of the image data and the light source color of the face area is weighted and averaged by a predetermined weight α of 0% or more and 100% or less. A step of obtaining a typical light source color and a step of calculating a final AWB correction value in accordance with the final light source color.
本発明に係るオートホワイトバランス補正値算出方法は、画像データを入力するステップと、入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出するステップと、画像データから顔領域を特定するステップと、画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出するステップと、画像データを1または複数のエリアに分割し、各エリアから特徴データを抽出するステップと、顔領域から特徴データを抽出するステップと、各エリアから抽出された特徴データと顔領域から抽出された特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出するステップと、を含む。 An auto white balance correction value calculation method according to the present invention includes a step of inputting image data, and a step of calculating a normal AWB correction value that is a first auto white balance (AWB) correction value based on the input image data. A step of specifying a face area from the image data, a step of calculating a face AWB correction value as a second AWB correction value based on the face area of the image data, and dividing the image data into one or a plurality of areas. The step of extracting feature data from each area, the step of extracting feature data from the face area, and the face AWB correction based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area Calculating a final AWB correction value corresponding to at least one of the value and the normal AWB correction value.
顔領域からは、特徴データとして光源色が抽出され、各エリアからは、特徴データとして各エリアの代表色が抽出される。 A light source color is extracted as feature data from the face area, and a representative color of each area is extracted as feature data from each area.
この方法は、各エリアの代表色のうち特定エリアの代表色と顔領域の光源色との差分量を算出するステップと、差分量に基づき、最終的なAWB補正値を算出するステップと、をさらに含んでもよい。 This method includes a step of calculating a difference amount between a representative color of a specific area among the representative colors of each area and a light source color of the face area, and a step of calculating a final AWB correction value based on the difference amount. Further, it may be included.
各エリアの代表色のうち特定エリアの代表色と顔領域の光源色との差分量を算出するステップと、差分量のうち顔領域の近傍にある所定数のエリアについての差分量を、差分量に対応する0%以上100%以下の所定の重みβで加重平均して得られた値に基づき、最終的なAWB補正値を算出するステップと、をさらに含んでもよい。 The step of calculating the difference amount between the representative color of the specific area among the representative colors of each area and the light source color of the face area, and the difference amount for a predetermined number of areas in the vicinity of the face area of the difference amount And a step of calculating a final AWB correction value based on a value obtained by weighted averaging with a predetermined weight β of 0% or more and 100% or less corresponding to.
各エリアから抽出された特徴データと顔領域から抽出された特徴データとの比較結果に基づき、顔AWB補正値または通常AWB補正値のうちいずれか一方を最終的なAWB補正値として選択するステップをさらに含んでもよい。 A step of selecting either the face AWB correction value or the normal AWB correction value as the final AWB correction value based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area. Further, it may be included.
各エリアから抽出された特徴データと顔領域から抽出された特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値を0%以上100%以下の所定の重みαにより加重平均することで最終的なAWB補正値を算出するステップをさらに含んでもよい。 Based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area, the face AWB correction value and the normal AWB correction value are weighted and averaged with a predetermined weight α of 0% to 100%. The method may further include a step of calculating a final AWB correction value.
画像データの光源色および顔領域の光源色の各々を0%以上100%以下の所定の重みαにより加重平均することで最終的な光源色を求めるステップと、最終的な光源色に応じて最終的なAWB補正値を算出するステップと、をさらに含んでもよい。 A step of obtaining a final light source color by performing a weighted average of each of the light source color of the image data and the light source color of the face region with a predetermined weight α of 0% or more and 100% or less, and the final according to the final light source color And calculating a typical AWB correction value.
最終的なAWB補正値を表示するステップをさらに含んでもよい。 The method may further include displaying a final AWB correction value.
顔領域の特徴データと比較された特徴データの抽出されたエリアを表示するステップをさらに含んでもよい。 The method may further include displaying an extracted area of the feature data compared with the feature data of the face region.
顔優先度の選択を受け付けるステップと、顔優先度に応じて最終的なAWB補正値の重みを変化させるステップと、をさらに含んでもよい。 The method may further include a step of receiving selection of face priority and a step of changing the weight of the final AWB correction value according to the face priority.
上記のオートホワイトバランス補正値算出方法をコンピュータに実行させるオートホワイトバランス補正値算出プログラムも本発明に含まれる。 An auto white balance correction value calculation program for causing a computer to execute the above auto white balance correction value calculation method is also included in the present invention.
本発明に係るオートホワイトバランス補正値算出装置は、画像データを入力する画像データ入力部と、画像データ入力部に入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出する通常AWB補正値算出部と、画像データから顔領域を特定する顔領域特定部と、画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出する顔AWB補正値算出部と、画像データから第1の特徴データを抽出するとともに、顔領域中の画像データから第2の特徴データを抽出する特徴データ抽出部と、第1の特徴データと第2の特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出する最終AWB補正値算出部と、を備える。 An auto white balance correction value calculation apparatus according to the present invention is an image data input unit that inputs image data, and a first auto white balance (AWB) correction value based on the image data input to the image data input unit. A normal AWB correction value calculating unit that calculates a normal AWB correction value, a face region specifying unit that specifies a face region from image data, and a face AWB correction value that is a second AWB correction value based on the face region of the image data A face AWB correction value calculation unit to be calculated; a feature data extraction unit that extracts first feature data from the image data and extracts second feature data from the image data in the face region; and first feature data; A final AW that calculates a final AWB correction value corresponding to at least one of the face AWB correction value and the normal AWB correction value based on the comparison result with the second feature data. Comprising a correction value calculating unit.
第1の特徴データは画像データに基づいて特定された光源色であり、第2の特徴データは顔領域に基づいて特定された光源色である。 The first feature data is the light source color specified based on the image data, and the second feature data is the light source color specified based on the face area.
この装置は、画像データの光源色と顔領域の光源色との差分量を算出する差分量算出部をさらに備え、最終AWB補正値算出部は、差分量に基づき、最終的なAWB補正値を算出してもよい。 The apparatus further includes a difference amount calculation unit that calculates a difference amount between the light source color of the image data and the light source color of the face area, and the final AWB correction value calculation unit calculates a final AWB correction value based on the difference amount. It may be calculated.
最終AWB補正値算出部は、第1の特徴データと第2の特徴データとの比較結果に基づき、顔AWB補正値または通常AWB補正値のうちいずれか一方を最終的なAWB補正値として選択してもよい。 The final AWB correction value calculation unit selects one of the face AWB correction value and the normal AWB correction value as the final AWB correction value based on the comparison result between the first feature data and the second feature data. May be.
最終AWB補正値算出部は、第1の特徴データと第2の特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値を0%以上100%以下の所定の重みαにより加重平均することで最終的なAWB補正値を算出してもよい。 The final AWB correction value calculation unit calculates a weighted average of the face AWB correction value and the normal AWB correction value with a predetermined weight α of 0% to 100% based on the comparison result between the first feature data and the second feature data. By doing so, the final AWB correction value may be calculated.
第1の特徴データと第2の特徴データとの比較結果に基づき、画像データの光源色および顔領域の光源色の各々を0%以上100%以下の所定の重みαにより加重平均することで最終的な光源色を求める最終光源色算出部をさらに備え、最終AWB補正値算出部は、最終的な光源色に応じて最終的なAWB補正値を算出してもよい。 Based on the comparison result between the first feature data and the second feature data, each of the light source color of the image data and the light source color of the face area is weighted and averaged by a predetermined weight α of 0% or more and 100% or less. A final light source color calculation unit for obtaining a specific light source color, and the final AWB correction value calculation unit may calculate a final AWB correction value according to the final light source color.
画像データを入力する画像データ入力部と、画像データ入力部に入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出する通常AWB補正値算出部と、画像データから顔領域を特定する顔領域特定部と、画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出する顔AWB補正値算出部と、画像データを1または複数のエリアに分割し、各エリアから特徴データを抽出するエリア特徴データ抽出部と、顔領域から特徴データを抽出する顔領域特徴データ抽出部と、各エリアから抽出された特徴データと顔領域から抽出された特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出する最終AWB補正値算出部と、を備える。 An image data input unit that inputs image data, and a normal AWB correction value calculation unit that calculates a normal AWB correction value that is a first auto white balance (AWB) correction value based on the image data input to the image data input unit A face area specifying unit that specifies a face area from the image data, a face AWB correction value calculating unit that calculates a face AWB correction value that is a second AWB correction value based on the face area of the image data, and image data An area feature data extraction unit that extracts feature data from each area by dividing into one or a plurality of areas, a face region feature data extraction unit that extracts feature data from a face region, and feature data and a face extracted from each area Based on the comparison result with the feature data extracted from the region, a final AWB correction value corresponding to at least one of the face AWB correction value and the normal AWB correction value is calculated. It comprises a final AWB correction value calculation unit for, a.
顔領域からは、特徴データとして光源色が抽出され、各エリアからは、特徴データとして各エリアの代表色が抽出される。 A light source color is extracted as feature data from the face area, and a representative color of each area is extracted as feature data from each area.
この装置は、各エリアの代表色のうち特定エリアの代表色と顔領域の光源色との差分量を算出する差分量算出部をさらに備え、最終AWB補正値算出部は、差分量に基づき、最終的なAWB補正値を算出してもよい。 The apparatus further includes a difference amount calculation unit that calculates a difference amount between the representative color of the specific area and the light source color of the face area among the representative colors of each area, and the final AWB correction value calculation unit is based on the difference amount, A final AWB correction value may be calculated.
各エリアの代表色のうち特定エリアの代表色と顔領域の光源色との差分量を算出する差分量算出部をさらに備え、最終AWB補正値算出部は、差分量のうち顔領域の近傍にある所定数のエリアについての差分量を、差分量に対応する0%以上100%以下の所定の重みβで加重平均して得られた値に基づき、最終的なAWB補正値を算出してもよい。 A difference amount calculation unit that calculates a difference amount between the representative color of the specific area of the representative colors of each area and the light source color of the face region is further provided, and the final AWB correction value calculation unit is located near the face region of the difference amount. Even if a final AWB correction value is calculated based on a value obtained by weighted averaging a difference amount for a certain number of areas with a predetermined weight β of 0% or more and 100% or less corresponding to the difference amount. Good.
最終AWB補正値算出部は、各エリアから抽出された特徴データと顔領域から抽出された特徴データとの比較結果に基づき、顔AWB補正値または通常AWB補正値のうちいずれか一方を最終的なAWB補正値として選択してもよい。 The final AWB correction value calculation unit finalizes either the face AWB correction value or the normal AWB correction value based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area. You may select as an AWB correction value.
最終AWB補正値算出部は、各エリアから抽出された特徴データと顔領域から抽出された特徴データとの比較結果に基づき、顔AWB補正値および通常AWB補正値を0%以上100%以下の所定の重みαにより加重平均することで最終的なAWB補正値を算出してもよい。 The final AWB correction value calculation unit sets the face AWB correction value and the normal AWB correction value to a predetermined value of 0% or more and 100% or less based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area. The final AWB correction value may be calculated by weighted averaging with the weight α.
画像データの光源色および顔領域の光源色の各々を0%以上100%以下の所定の重みαにより加重平均することで最終的な光源色を求める最終光源色算出部をさらに備え、最終AWB補正値算出部は、最終的な光源色に応じて最終的なAWB補正値を算出してもよい。 A final light source color calculation unit for obtaining a final light source color by weighted averaging each of the light source color of the image data and the light source color of the face area with a predetermined weight α of 0% or more and 100% or less, and final AWB correction The value calculation unit may calculate a final AWB correction value according to the final light source color.
最終的なAWB補正値を表示する表示部をさらに備えてもよい。 You may further provide the display part which displays a final AWB correction value.
顔領域の特徴データと比較された特徴データの抽出されたエリアを表示する表示部をさらに備えてもよい。 You may further provide the display part which displays the area from which the feature data compared with the feature data of the face area was extracted.
顔優先度の選択を受け付ける顔優先度選択部をさらに備え、最終AWB補正値算出部は、顔優先度に応じて最終的なAWB補正値の重みを変化させてもよい。 A face priority selection unit that receives selection of face priority may be further provided, and the final AWB correction value calculation unit may change the weight of the final AWB correction value according to the face priority.
本発明に係る撮像装置は、上記のオートホワイトバランス補正値算出装置と、撮影光学系を介して被写体像を受光し、該被写体像を示すアナログ画像信号を出力する撮像素子と、アナログ画像信号をデジタル画像データに変換して画像データ入力部に出力する画像データ出力部と、オートホワイトバランス補正値算出装置の算出した最終的なAWB補正値に基づいて画像データのホワイトバランスを補正する補正部と、を備える。 An image pickup apparatus according to the present invention includes the above-described auto white balance correction value calculation apparatus, an image pickup device that receives a subject image via a photographing optical system, and outputs an analog image signal indicating the subject image, and an analog image signal. An image data output unit that converts the digital image data into an image data input unit; a correction unit that corrects the white balance of the image data based on the final AWB correction value calculated by the auto white balance correction value calculation device; .
この発明によると、顔領域を基準としたホワイトバランス補正を行う際、通常の肌色を有さない顔が特定された場合でも、その顔に基づいて誤ったホワイトバランス調整がされるのを可及的に避けることができる。 According to the present invention, when white balance correction is performed on the basis of the face area, even if a face having no normal skin color is specified, it is possible to make an erroneous white balance adjustment based on the face. Can be avoided.
<第1実施形態>
図1はデジタルカメラ2の電気的構成を示す。撮像レンズ10には、レンズモータ30が接続されている。また、絞り31には、アイリスモータ32が接続されている。これらのモータ30、32はステッピングモータからなり、CPU33に接続されたモータドライバ34、35から送信される駆動パルスにより動作制御され、レリーズボタン12の半押しに伴う撮影準備処理を行う。
<First Embodiment>
FIG. 1 shows an electrical configuration of the
レンズモータ30は、ズーム操作ボタン24の操作に連動して、撮像レンズ10のズームレンズをワイド側、あるいはテレ側に移動させる。また、ズームレンズの変倍などに応じて撮像レンズ10のフォーカスレンズ(図示せず)を移動させ、撮影条件が最適となるように焦点調整を行う。アイリスモータ32は、絞り31を動作させ、露出調整を行う。
The
撮像レンズ10の背後には、撮像レンズ10を透過した被写体像が撮像されるCCD36が配置されている。CCD36には、CPU33によって制御されるタイミングジェネレータ(TG)37が接続され、このTG37から入力されるタイミング信号(クロックパルス)により、電子シャッタのシャッタ速度が決定される。
Behind the imaging lens 10 is a
CCD36から出力された撮像信号は、相関二重サンプリング回路(CDS)38に入力され、CCD36の各セルの蓄積電荷量に正確に対応したR、G、Bの画像データとして出力される。CDS38から出力された画像データは、増幅器(AMP)39で増幅され、A/D変換器(A/D)40でデジタルの画像データに変換される。
The imaging signal output from the
画像入力コントローラ41は、バス42を介してCPU33に接続され、CPU33の制御命令に応じて、CCD36、CDS38、AMP39、およびA/D40を制御する。A/D40から出力された画像データは、SDRAM43に一時記録される。
The
画像信号処理回路44は、SDRAM43から画像データを読み出して、階調変換、ホワイトバランス補正、γ補正処理などの各種画像処理を施し、この画像データを再度SDRAM43に記録する。YC変換処理回路45は、画像信号処理回路44で各種処理を施された画像データをSDRAM43から読み出し、輝度信号Yと色差信号Cr、Cbとに変換する。
The image
VRAM46は、LCD22にスルー画像を出力するためのメモリであり、画像信号処理回路44、YC変換処理回路45を経た画像データが格納される。VRAM46には、画像データの書き込みと読み出しを並行して行えるように、2フレーム分のメモリ46a、46bが確保されている。VRAM46に格納された画像データは、LCDドライバ47でアナログのコンポジット信号に変換され、LCD22にスルー画像として表示される。
The
圧縮伸長処理回路48は、YC変換処理回路45でYC変換された画像データに対して、所定の圧縮形式(例えばJPEG形式)で画像圧縮を施す。圧縮された画像データは、メディアコントローラ49を経由してメモリカード50に記憶される。
The compression /
CPU33には、前述のレリーズボタン12、受信部20、操作部23の他に、EEPROM51が接続されている。EEPROM51には、各種制御用のプログラムや設定情報などが記録されている。CPU33は、これらの情報をEEPROM51から作業用メモリであるSDRAM43に読み出して、各種処理を実行する。
In addition to the release button 12, the receiving
バス42には、露出量、すなわち電子シャッタのシャッタ速度、および絞り31の絞り値が撮影に適切か否かを検出するとともに、ホワイトバランスが撮影に適切か否かを検出するAE/AWB検出回路52と、撮像レンズ10の焦点調整が撮影に適切か否かを検出するAF検出回路53と、ストロボ装置54の動作を制御するストロボ制御回路55とが接続されている。
The
AE/AWB検出回路52は、YC変換処理回路45でYC変換された画像データの輝度信号Yと色差信号Cr、Cbとの積算値を元に、露出量、およびホワイトバランスの適否を検出し、この検出結果をCPU33に送信する。CPU33は、AE/AWB検出回路52から送信された検出結果に基づいて、撮像レンズ10、絞り31、およびCCD36の動作を制御する。
The AE /
AF検出回路53は、A/D40でデジタル化された画像データから画像の鮮鋭度を表すフォーカス評価値を算出し、この算出結果をCPU33に送信する。フォーカス評価値は、画像の特定のエリア、例えば、撮影画角の中央部分の画像データに対して、バンドパスフィルタなどで輪郭抽出処理を施し、これにより抽出した輪郭信号、および中央部分の画像データの輝度値を積算することで得られる。ここで、フォーカス評価値が大きいほどその部分の高周波成分が多く、その部分が合焦状態にあることを表している。
The
CPU33は、レリーズボタン12の半押しに伴う撮影準備処理時に、そのときのズームレンズの位置からフォーカスレンズの合焦位置の探索範囲を決定し、モータドライバ34を介してレンズモータ30の動作を制御して、決定した探索範囲内で、フォーカスレンズを例えば近点側から遠点側に移動させ、そのときAF検出回路53から順次送信されるフォーカス評価値の大小を比較することで、フォーカス評価値が最大となる位置、つまり合焦位置でフォーカスレンズを停止させる。
The
セルフ撮影モード下において、リモートコントローラ16から受信部20を介してレリーズ信号を受信し、且つAE/AWB検出回路52による輝度の積算値の算出結果が、予め設定された閾値よりも小さい場合、画像信号処理回路44は、SDRAM43から読み出した画像データから、レリーズ信号の送信時にリモートコントローラ16の光源19から発せられた光を表す画像データを抽出する。
When the release signal is received from the remote controller 16 via the receiving
光源19から発せられた光を表す画像データの抽出は、具体的には、前フレームと現フレームの画像データの差分をとっておき、光源19から発せられた光が撮像されているフレームと、されていないフレームの画像データの差分から、光が撮像されている部分を特定し、その部分、あるいはその部分を含む周囲を表す画像データを抽出する。なお、AE/AWB検出回路52による輝度の積算値の算出結果が、予め設定された閾値よりも小さい場合とは、焦点調整が困難な状況(暗所など)であることを意味する。
Specifically, the extraction of the image data representing the light emitted from the light source 19 is performed by taking a difference between the image data of the previous frame and the current frame, and taking a frame in which the light emitted from the light source 19 is imaged. A part where light is imaged is specified from the difference between image data of no frames, and image data representing the part or the surrounding including the part is extracted. Note that the case where the calculation result of the integrated luminance value by the AE /
AF検出回路53は、画像信号処理回路44で抽出した光を表す画像データに対してフォーカス評価値の算出を行う。CPU33は、フォーカス評価値の波形が谷間となる点を合焦位置とし、モータドライバ34を介してレンズモータの動作を制御して、この位置でフォーカスレンズを停止させる。
The
図2は第1実施形態に係る画像信号処理回路44の要部ブロック構成を示す。この図に開示された各ブロックの詳細な機能は後述する。
FIG. 2 shows a principal block configuration of the image
顔領域特定部52aは、SDRAM43のデジタル画像データ(記録用の静止画像、スルー画像あるいは動画フレーム)から人物の顔部分を含む領域である顔領域を特定する。顔領域の検出方法としては、例えば本出願人による特許公開2007−124112号公報において開示された技術を適用することができる。
The face
すなわち、顔領域特定部52aは、撮影された画像の画像データP0′を読み込み、画像P0′中の顔部分P0f′を検出する。具体的には、特開2005−108195号公報に記載されているように、画像P0′の各画素におけるエッジの向きと大きさを表す勾配ベクトルの向きを表す第1の特徴量を、複数の第1の識別器に入力することによって画像P0′中に顔候補領域が存在するかどうかを判定し、さらに、顔候補領域が存在する場合には、その領域を抽出し、抽出された顔候補領域の各画素における勾配ベクトルの大きさを正規化し、正規化後の勾配ベクトルの大きさと向きを表す第2の特徴量を、第2の識別器に入力することによって、抽出された顔候補領域が真の顔領域であるかどうかを判定し、真の顔領域であれば、その領域を顔部分P0f′として検出することが考えられる。ここで、第1/第2の識別器は、学習用サンプルとなる顔であることがわかっている複数の画像と顔でないことがわかっている複数の画像の各々について算出された第1/第2の特徴量を入力する、AdaBoost等のマシンラーニングの手法を用いた学習処理によって各々得られたものである。
That is, the face
なお、顔部分P1fの検出方法としては、特表2004−527863号公報に記載されているような固有顔表現と画像自体との相関スコアを用いる方法の他、知識ベース、特徴抽出、テンプレートマッチング、グラフマッチング、統計的手法(ニューラルネットワーク、SVM、HMM)等の様々な公知の手法を用いることができる。ただし、人物の顔の色に依存しないような顔検出を可能とするため(例えば銅像の顔やフェイスペイントした顔も検出できるようにするため)、本願明細書の各実施形態では、人物の顔の色に依存した顔検出方法、例えば肌色検出を用いる方法は採用しないものとする。 In addition, as a method for detecting the face portion P1f, in addition to the method using the correlation score between the unique face expression and the image itself as described in JP-T-2004-527863, a knowledge base, feature extraction, template matching, Various known methods such as graph matching and statistical methods (neural network, SVM, HMM) can be used. However, in order to enable face detection that does not depend on the color of the person's face (for example, to enable detection of a bronze face or face painted face), in each embodiment of the present specification, the face of the person It is assumed that a face detection method depending on the color, for example, a method using skin color detection is not adopted.
顔AWB補正値算出部52bは、顔領域特定部52aが特定した顔領域の画像データに基づき、画像全体に施すホワイトバランスの補正値を決定する。
The face AWB correction
顔AWB特徴データ抽出部52cは、顔領域特定部52aが特定した顔領域内の画像データに基づいて特徴データを抽出する。特徴データとは、例えば、顔領域内の画像データから推定される光源の種類(太陽光、タングステン、蛍光など)、あるいは光源の色温度(例えば2500K〜9400Kの間で色温度を推定)である。あるいは顔領域の代表色でもよい。
The face AWB feature
通常AWB補正値算出部52dは、通常ホワイトバランス補正値決定用の特定領域である通常AWB領域(例えば画像データの全体、あるいは、画像データ全体から所定の周縁領域を除いた残りの部分。ただし、特定領域は顔領域と同一ではない)に基づいて画像全体に施すホワイトバランスの補正値を決定する。
The normal AWB correction
通常AWB特徴データ抽出部52eは、通常AWB領域に基づいて特徴データを抽出する。特徴データとは、通常AWB領域の画像データから推定される光源種、色温度、代表色などである。
The normal AWB feature
WB補正部52hは、光源の種類あるいは光源の色温度に応じた比率で各色の画像データを増減することにより、撮影画像を適切なホワイトバランスに調整、すなわち白色が色味を帯びないように色補正する。
The
特徴データ比較部52fは、顔AWB特徴データ抽出部52cの得た特徴データと、通常AWB特徴データ抽出部52eの得た特徴データとを比較する。これは後述するが、例えば、各種の色空間における光源色L1と光源色L2との距離を求めることである。
The feature
最終WB補正値算出部52gは、通常AWB特徴データ抽出部52eおよび顔AWB特徴データ抽出部52cからの2つの特徴データの比較結果に基づき、画像全体に対するホワイトバランス補正値の算出方法を選択する。これは後述するが、例えば、光源色L1とL2との距離が所定の閾値以上であるか未満であるかに基づいて、通常AWB補正値算出部52dの用いる補正値算出式および顔AWB補正値算出部52bの用いる補正値算出式のうちいずれか一方の補正値算出式を選択することである。
The final WB correction
WB補正部52hは、最終WB補正値算出部52gの選択した算出方法で算出されたホワイトバランス補正値によって画像全体のホワイトバランスを補正する。
The
図3は第1実施形態に係る画像信号処理回路44で実行されるホワイトバランス補正処理のフローチャートである。
FIG. 3 is a flowchart of white balance correction processing executed by the image
S1では、通常AWB補正値算出部52dが、補正値を算出する。
In S1, the normal AWB correction
S2では、顔領域特定部52aが、顔領域の特定を試みる。
In S2, the face
S3では、顔領域特定部52aが、顔領域の特定に成功したか否かを判断する。顔領域の特定に成功した場合はS4、失敗した場合はS10に進む。
In S3, the face
S4では、顔AWB補正値算出部52bが、顔AWB補正値を算出する。
In S4, the face AWB correction
S5では、顔AWB特徴データ抽出部52c、通常AWB特徴データ抽出部52eが、それぞれ色空間における特徴データを抽出する。
In S5, the face AWB feature
S6では、特徴データ比較部52fが、S5で抽出された2つの特徴データを比較する。例えば、通常AWB領域、顔領域における2つの代表色を求め、所定の色空間または色度図上における両代表色の各色差(距離)を比較する。
In S6, the feature
S7では、最終WB補正値算出部52gが、2つの特徴データの比較結果に基づき、画像全体に対するホワイトバランス補正値の算出方法として適切なものを1つ、例えば、顔AWB補正値算出部52bによる算出方法および通常AWB補正値算出部52dによる算出方法のうちいずれか一方を選択する。顔AWB補正値算出部52bによる算出方法を選択した場合はS8、通常AWB補正値算出部52dによる算出方法を選択した場合はS9に進む。2つの特徴データの比較結果に基づいた算出方法の選択は、例えば、両代表色の各色差(距離)が所定の閾値未満であれば顔AWBの算出方法、所定の閾値であれば通常AWBの算出方法を選択する。
In S7, the final WB correction
S8では、WB補正部52hは、最終WB補正値算出部52gの選択したホワイトバランス補正値算出方法で得られた最終WB補正値=顔AWB補正値によって画像全体のホワイトバランスを補正する。
In S8, the
S9では、WB補正部52hは、最終WB補正値算出部52gの選択したホワイトバランス補正値算出方法で得られた最終WB補正値=通常AWB補正値によって画像全体のホワイトバランスを補正する。
In S9, the
S10では、WB補正部52hは、通常AWB補正値によって画像全体のホワイトバランスを補正する。
In S10, the
すなわち、本実施形態では、通常AWB領域の特徴データと、顔領域の特徴データとの比較結果に応じて補正値算出方法を選択する。 That is, in this embodiment, the correction value calculation method is selected according to the comparison result between the feature data of the normal AWB area and the feature data of the face area.
<第2実施形態>
図4は第2実施形態に係る画像信号処理回路44の詳細ブロック構成を示す。ここでは図2における顔AWB特徴データ抽出部52cの一例として顔AWB光源色抽出部52c−1が、通常AWB特徴データ抽出部52eの一例として通常AWB光源色抽出部52e−1が、特徴データ比較部52fの一例として光源色比較部52f−1が示されている。
Second Embodiment
FIG. 4 shows a detailed block configuration of the image
顔AWB光源色抽出部52c−1は、顔領域特定部52aが特定した顔領域内の画像データに基づいて光源色を抽出する。これは、例えば、ホワイトバランス調整のために画像データの一部から光源色を推定する各種の方法(例えば、特許公開2000−209598号公報や、特許公開2006−222928号公報に開示されたもの)を用いて光源色(R1、G1、B1)を推定し、この推定した光源色を、R/GおよびB/Gの比からなる色空間の座標L1=(R1/G1,B1/G1)へ変換する(図5)。なお、光源色をプロットする色空間はYCrCbなど各種のものであってもよい。
The face AWB light source
通常AWB光源色抽出部52e−1は、通常AWB領域の画像データに基づいて光源色を抽出する。これは例えば、ホワイトバランス調整のために画像データの全部から光源色を推定する各種の方法を用いて光源色(R2、G2、B2)を推定し、この推定した光源色を、R/GおよびB/Gの比からなる色空間の色空間の座標L2=(R2/G2,B2/G2)へ変換する(図5)。
The normal AWB light source
光源色比較部52f−1は、顔AWB光源色抽出部52c−1の得た光源色L1と、通常AWB光源色抽出部52e−1の得た光源色L2とを比較する。これは後述するが、例えば、光源色L1と光源色L2との色差(色空間における距離)を求めることである。
The light source
通常AWB補正値算出部52dは、画像全体に施すホワイトバランスの補正値を、通常AWB領域の画像データに基づいて決定する。
The normal AWB correction
WB補正部52hは、光源の種類あるいは光源の色温度に応じた比率で各色の画像データを増減することにより、撮影画像を適切なホワイトバランスに調整、すなわち白色が色味を帯びないように色補正する。
The
最終WB補正値算出部52gは、色空間における光源色L1とL2との比較結果に基づき、画像全体に対するホワイトバランス補正値の算出方法を選択する。これは後述するが、例えば、光源色L1とL2との距離が所定の閾値以上であるか未満であるかに基づいて、通常AWB補正値算出部52dの算出した補正値および顔AWB補正値算出部52bの算出した補正値のうちいずれか一方の補正値を選択することである。
The final WB correction
WB補正部52hは、最終WB補正値算出部52gの選択した算出方法で算出されたホワイトバランス補正値によって画像全体のホワイトバランスを補正する。
The
図6は画像信号処理回路44で実行されるホワイトバランス補正処理の流れを示す。
FIG. 6 shows the flow of white balance correction processing executed by the image
S1では、通常AWB補正値算出部52dが、補正値を算出する。
In S1, the normal AWB correction
S2では、顔領域特定部52aが、顔領域の特定を試みる。
In S2, the face
S3では、顔領域特定部52aが、顔領域の特定に成功したか否かを判断する。顔領域の特定に成功した場合はS4、失敗した場合はS10に進む。
In S3, the face
S4では、顔AWB補正値算出部52bが、顔AWB補正値を算出する。
In S4, the face AWB correction
S5−1では、顔AWB光源色抽出部52c−1、通常AWB光源色抽出部52e−1が、それぞれ顔領域、通常AWB領域における光源色L1、L2を抽出する。
In S5-1, the face AWB light source
S6−1では、光源色比較部52f−1が、光源色L1とL2とを比較する。
In S6-1, the light source
S7−1では、最終WB補正値算出部52gが、光源色比較部52f−1による光源色L1とL2との比較結果に基づき、画像全体に対するホワイトバランス補正値算出方法として適切なものを1つ、例えば、顔AWB補正値算出部52bによる算出方法および通常AWB補正値算出部52dによる算出方法のうちいずれか一方を選択する。顔AWB補正値算出部52bによる算出方法を選択した場合はS8、通常AWB補正値算出部52dによる算出方法を選択した場合はS9に進む。
In S7-1, the final WB correction
S8では、WB補正部52hは、最終WB補正値算出部52gの選択したホワイトバランス補正値算出方法で得た最終WB補正値=顔AWB補正値によって画像全体のホワイトバランスを補正する。
In S8, the
S9では、WB補正部52hは、最終WB補正値算出部52gの選択したホワイトバランス補正値算出方法で得た最終WB補正値=通常AWB補正値によって画像全体のホワイトバランスを補正する。
In S9, the
S10では、WB補正部52hは、通常AWB補正値によって画像全体のホワイトバランスを補正する。
In S10, the
すなわち、本実施形態では、通常AWB領域の光源色と、顔領域の光源色との比較結果に応じて補正値算出方法を選択する。 That is, in the present embodiment, the correction value calculation method is selected according to the comparison result between the light source color of the normal AWB area and the light source color of the face area.
<第3実施形態>
図7は第3実施形態に係る画像信号処理回路44のブロック構成を示す。ここでは図2における光源色比較部52f−1の一例として、光源色の差分算出部52f−2が示されている。
<Third Embodiment>
FIG. 7 shows a block configuration of an image
光源色の差分算出部52f−2は、顔AWB光源色抽出部52c−1の得た光源色L1と、通常AWB光源色抽出部52e−1の得た光源色L2との差分を算出する。これは後述するが、例えば、図8に示すように、色空間における光源色L1と光源色L2との距離Lを求めることである。
The light source color
図9は画像信号処理回路44で実行されるホワイトバランス補正処理の流れを示す。
FIG. 9 shows the flow of white balance correction processing executed by the image
S11〜S15はそれぞれ図3のS1〜S5と同様である。 S11 to S15 are the same as S1 to S5 in FIG.
S16では、光源色の差分算出部52f−2が、光源色L1とL2との差分Lを算出する。差分Lとは、具体的には図8(a)に示すように、色空間における光源色L1とL2との距離(色差)を指す。その値は、図8(b)に示すような数式で求めることができる。
In S16, the light source color
S17では、最終WB補正値算出部52gが、光源色の差分算出部52f−2の算出した、光源色L1とL2との差分Lに基づき、最適な補正値算出方法(例えば第1・2実施形態と同様のもの)を選択する。顔AWB補正値の算出方法を選択した場合はS18、通常AWB補正値の算出方法を選択した場合はS19に進む。
In S17, the final WB correction
S18〜S20は、S8〜S10と同様である。 S18 to S20 are the same as S8 to S10.
<第4実施形態>
図10は第4実施形態に係る画像信号処理回路44のブロック構成を示す。ここでは図2および図5における最終WB補正値算出部52gの一例として、最終WB選択部52g−1が示されている。この機能は後述する。
<Fourth embodiment>
FIG. 10 shows a block configuration of an image
図11は画像信号処理回路44で実行されるホワイトバランス補正処理の流れを示す。
FIG. 11 shows the flow of white balance correction processing executed by the image
S21〜S26はそれぞれS11〜S16と同様である。 S21 to S26 are the same as S11 to S16, respectively.
S27では、最終WB補正値算出部52gが、光源色L1とL2との差分Lが、所定の閾値T1以下であるか否かを判断する。L≦T1の場合はS28、L>T1の場合はS29に進む。図12は、L>T1の場合を例示している。T1は、顔AWB補正値と通常AWB補正値のいずれを使用することが適切なホワイトバランス補正となるかを区別する値であるから、撮影条件に応じて経験的に定めるとよい。
In S27, the final WB correction
S28では、最終WB補正値算出部52gは、顔AWB補正値を最終WB補正値に決定する。WB補正部52hは、最終WB補正値算出部52gの決定した最終WB補正値=顔AWB補正値によって画像全体のホワイトバランスを補正する。
In S28, the final WB correction
S29では、最終WB補正値算出部52gは、通常AWB補正値を最終WB補正値に決定する。WB補正部52hは、最終WB補正値算出部52gの決定した最終WB補正値=通常AWB補正値によって画像全体のホワイトバランスを補正する。
In S29, the final WB correction
S30は、S10と同様である。 S30 is the same as S10.
図13は、このホワイトバランス補正による具体的効果を例示する。 FIG. 13 illustrates a specific effect by this white balance correction.
例えば、図13(a)に示すように、太陽光が照射している白色系の石像を被写体とした画像データが取得されたものとする。 For example, as shown in FIG. 13A, it is assumed that image data having a white stone image irradiated with sunlight as a subject is acquired.
図13(b)に示すように、通常AWB光源色抽出部52e−1は、画像データ全体の色分布などから光源色を推定する。図13(c)に示すように、ここでは太陽光と推定したとする。
As shown in FIG. 13B, the normal AWB light source
図13(d)に示すように、顔AWB光源色抽出部52c−1は、画像データ中の顔領域特定部52aが特定した顔領域の色分布などから光源色を推定する。図13(e)に示すように、ここでは、白い石像の顔の色分布から、青い光が顔の肌色に当たって白くなっていると推定したとする。この青い光が光源色であるとの前提でホワイトバランス調整を行うと、画像が黄色くなってしまう。
As shown in FIG. 13D, the face AWB light source
この場合、図13(f)に示すように、顔AWB光源色抽出部52c−1の光源色L1と通常AWB光源色抽出部52e−1の光源色L2との距離Lは、離れる傾向にある。この距離Lが所定の閾値T1を超えていれば、両者の食い違いが大きく、顔AWB光源色抽出部52c−1の光源色L1の推定は信頼性が低く、通常AWB光源色抽出部52e−1の光源色L2に基づいてWB補正値を決める方がより適切といえる。そこでL>T1の場合、通常AWB補正値によって画像全体のホワイトバランスを補正する。
In this case, as shown in FIG. 13 (f), the distance L between the light source color L1 of the face AWB light source
一方、L≦T1の場合は、光源色L1の推定は信頼性が一定程度確保されているから、この場合、顔AWB補正値によって画像全体のホワイトバランスを補正する。 On the other hand, when L ≦ T1, the reliability of the estimation of the light source color L1 is ensured to a certain degree. In this case, the white balance of the entire image is corrected by the face AWB correction value.
こうすることで、顔領域を基準としたホワイトバランス補正を行う際、通常の肌色を有さない顔が特定された場合でも、その顔に基づいて誤ったホワイトバランス調整がされるのを可及的に避けることができる。 In this way, when performing white balance correction based on the face area, even if a face that does not have a normal skin color is identified, it is possible to make an incorrect white balance adjustment based on that face. Can be avoided.
<第5実施形態>
図14は第5実施形態に係る画像信号処理回路44のブロック構成を示す。ここでは重みα算出部52iが追加されている。
<Fifth Embodiment>
FIG. 14 shows a block configuration of an image
例えば図15(a)のような差分Lと重みαとの関係を規定した関数(重みα決定関数)が、予め重みα算出部52iに記憶されており、重みα算出部52iは、差分Lの値に対応する重みαを該関数から特定することで、関数の重みαを算出する。
For example, a function (weight α determination function) that defines the relationship between the difference L and the weight α as shown in FIG. 15A is stored in advance in the weight
最終WB補正値算出部52gは、例えば図15(b)のような、重みαで通常AWB補正値と顔AWB補正値とを加重平均する数式により、最終WB補正値を算出する。
The final WB correction
図16は第5実施形態に係るホワイトバランス補正処理を示すフローチャートである。 FIG. 16 is a flowchart showing white balance correction processing according to the fifth embodiment.
S31〜S36はS11〜S16と同様である。 S31 to S36 are the same as S11 to S16.
S37では、差分Lが所定の閾値T2以下であるか否かを判断する。L≦T2の場合はS38、L>T2の場合はS41に進む。 In S37, it is determined whether or not the difference L is equal to or less than a predetermined threshold value T2. If L ≦ T2, the process proceeds to S38, and if L> T2, the process proceeds to S41.
S38では、重みα=100(%)とする。 In S38, the weight α is set to 100 (%).
S40では、最終WB補正値を顔AWB補正値とする。なおこの値は図15(b)の数式でα=100とした値である。 In S40, the final WB correction value is set as the face AWB correction value. This value is a value in which α = 100 in the equation of FIG.
S41では、差分Lが所定の閾値T3以上であるか否かを判断する。L≧T3の場合はS42、L<T3の場合はS45に進む。 In S41, it is determined whether or not the difference L is greater than or equal to a predetermined threshold T3. If L ≧ T3, the process proceeds to S42, and if L <T3, the process proceeds to S45.
S42では、重みα=0(%)とする。 In S42, the weight α = 0 (%).
S44では、最終WB補正値を通常AWB補正値とする。なおこの値は図15(b)の数式でα=0とした値である。 In S44, the final WB correction value is set as the normal AWB correction value. This value is a value in which α = 0 in the equation of FIG.
S45では、差分Lに対応した重みα=1〜99(%)の値とする。例えば図15(a)のような差分Lと重みαとの関係を規定した関数(重みα決定関数)を予め記憶しておき、差分Lの値に対応する重みαを該関数から特定する。 In S45, the weight α corresponding to the difference L is set to a value of 1 to 99 (%). For example, a function (weight α determining function) that defines the relationship between the difference L and the weight α as shown in FIG. 15A is stored in advance, and the weight α corresponding to the value of the difference L is specified from the function.
S47では、例えば図15(b)のような、重みαで通常AWB補正値と顔AWB補正値とを加重平均する数式により、最終WB補正値を算出する。 In S47, for example, as shown in FIG. 15B, the final WB correction value is calculated by a mathematical expression that weights and averages the normal AWB correction value and the face AWB correction value with the weight α.
S48は、S10と同様である。 S48 is the same as S10.
<第6実施形態>
図17は第6実施形態に係る画像信号処理回路44のブロック構成を示す。ここでは最終光源色算出部52jが追加されている。
<Sixth Embodiment>
FIG. 17 shows a block configuration of an image
例えば図18(a)のような差分Lと重みαとの関係を規定した関数(重みα決定関数)を予め重みα算出部52iに記憶しておき、重みα算出部52iは、差分Lの値に対応する重みαを該関数から特定することで、光源色の重みαを算出する。
For example, a function (weight α determination function) that defines the relationship between the difference L and the weight α as shown in FIG. 18A is stored in the weight
最終光源色算出部52jは、例えば図18(b)のような重みαで通常AWB光源色と顔AWB光源色とを加重平均する数式により、最終光源色を算出する。
The final light source
図19は第6実施形態に係るホワイトバランス補正処理を示すフローチャートである。 FIG. 19 is a flowchart showing white balance correction processing according to the sixth embodiment.
S51〜S56はS31〜S36と同様である。 S51 to S56 are the same as S31 to S36.
S57では、差分Lが所定の閾値T4以下であるか否かを判断する。L≦T4の場合はS58、L>T4の場合はS61に進む。 In S57, it is determined whether or not the difference L is equal to or less than a predetermined threshold T4. If L ≦ T4, the process proceeds to S58, and if L> T4, the process proceeds to S61.
S58では、重みα=100(%)とする。 In S58, the weight α is set to 100 (%).
S59では、最終光源色を顔AWB光源色抽出部52c−1の抽出した光源色とする。
In S59, the final light source color is the light source color extracted by the face AWB light source
S60では、最終光源色である顔AWB光源色抽出部52c−1の抽出した光源色を補正値の算出基準とし、最終WB補正値を顔AWB補正値とする。
In S60, the light source color extracted by the face AWB light source
S61では、差分Lが所定の閾値T5以上であるか否かを判断する。L≧T5の場合はS62、L<T5の場合はS65に進む。 In S61, it is determined whether or not the difference L is greater than or equal to a predetermined threshold T5. If L ≧ T5, the process proceeds to S62, and if L <T5, the process proceeds to S65.
S62では、重みα=0(%)とする。 In S62, the weight α = 0 (%).
S63では、最終光源色を通常AWB光源色抽出部52e−1の抽出した光源色とする。
In S63, the final light source color is the light source color extracted by the normal AWB light source
S64では、最終光源色である通常AWB光源色抽出部52e−1の抽出した光源色を補正値の算出基準とし、最終WB補正値を通常AWB補正値とする。
In S64, the light source color extracted by the normal AWB light source
S65では、差分Lに対応した重みα=1〜99(%)の値とする。例えば図18(a)のような差分Lと重みαとの関係を規定した関数(重みα決定関数)を予め記憶しておき、差分Lの値に対応する重みαを該関数から特定する。 In S65, the weight α corresponding to the difference L is set to a value of 1 to 99 (%). For example, a function (weight α determination function) that defines the relationship between the difference L and the weight α as shown in FIG. 18A is stored in advance, and the weight α corresponding to the value of the difference L is specified from the function.
S66では、例えば図18(b)のような、2つの光源色を重みαで加重平均する数式により、最終光源色を算出する。 In S66, the final light source color is calculated by a mathematical formula that weights and averages the two light source colors with the weight α as shown in FIG. 18B, for example.
S67では、最終光源色を補正値の算出基準とし、最終WB補正値を算出する。 In S67, the final WB correction value is calculated using the final light source color as the correction value calculation reference.
S68は、S10と同様である。 S68 is the same as S10.
<第7実施形態>
図20は第7実施形態に係る画像信号処理回路44のブロック構成を示す。上記実施形態と同一のブロックには同一の符号を付しており、説明は省略する。ここではエリア分割部52k、エリア特徴データ抽出部52lが追加されている。
<Seventh embodiment>
FIG. 20 shows a block configuration of an image
エリア分割部52kは、画像データ全体を所定の1または複数のエリアに分割する。
The
図21は複数のエリアに分割した場合の一例である。複数のエリアへの区分の仕方は図示したものに限らず、これよりも多数あるいは少数の小領域に区分してもよい。また、分割面積は等面積、等間隔である必然性はなく、領域の特徴(例えば顔領域に包含される領域であるか否か)や重要度に応じてより精緻な領域分割を行ってもよい。あるいは、異なる色相ごとに画像を分割してもよい。なお、1つのエリアに分割するとは画像データ全体そのものを得ることと同じである。 FIG. 21 shows an example of dividing into a plurality of areas. The method of dividing into a plurality of areas is not limited to that shown in the figure, and may be divided into a larger number or a smaller number of small areas. In addition, the divided areas are not necessarily equal areas and equally spaced, and more precise area division may be performed according to the characteristics of the area (for example, whether or not the area is included in the face area) and importance. . Or you may divide | segment an image for every different hue. Note that dividing into one area is the same as obtaining the entire image data itself.
図22は第7実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 22 is a flowchart of white balance correction processing according to the seventh embodiment.
S71〜S75はS1〜S5と同様である。 S71 to S75 are the same as S1 to S5.
S76では、エリア分割部52kが画像データ全体を1または複数のエリアに分割する。
In S76, the
S77では、エリア特徴データ抽出部52lが各エリアの特徴データを抽出する。特徴データとは例えば各エリアの代表色である。エリアの代表色の求め方としては、例えば本出願人による特許公開2007−36462号公報、段落0038に記載されるように、エリアの各画像データを用いて、各画素の色をR/G−B/G空間の座標にそれぞれ変換し、それら各座標の重心の座標を求め、これを代表色の座標とする。 In S77, the area feature data extraction unit 52l extracts feature data of each area. The feature data is, for example, a representative color of each area. As a method for obtaining a representative color of an area, for example, as described in Japanese Patent Application Publication No. 2007-36462 and Paragraph 0038 by the present applicant, the color of each pixel is set to R / G- The coordinates are converted into coordinates in the B / G space, the coordinates of the center of gravity of each of these coordinates are obtained, and this is used as the representative color coordinates.
S78では、特徴データ比較部52fが、各エリアの特徴データを顔領域からの特徴データと比較する。
In S78, the feature
S79では、各エリアの特徴データを顔領域からの特徴データと比較した結果に応じて、適切な補正値算出式を選択する。例えば上述と同様、通常AWB補正値算出部52dの算出した補正値(通常AWB補正値)および顔AWB補正値算出部52bの算出した補正値(顔AWB補正値)のうちいずれか一方の最適な補正値を選択する。
In S79, an appropriate correction value calculation formula is selected according to the result of comparing the feature data of each area with the feature data from the face area. For example, as described above, the optimum value of either the correction value (normal AWB correction value) calculated by the normal AWB correction
S80〜S82は、S8〜S10と同様である。 S80 to S82 are the same as S8 to S10.
図23は、このホワイトバランス補正による具体的効果を例示する。 FIG. 23 illustrates a specific effect by this white balance correction.
例えば、図23(a)に示すように、1つの画像データ中に、人には赤い光源が照らされており、背景には青い水槽が存在していたとする。 For example, as shown in FIG. 23A, it is assumed that a person is illuminated with a red light source and a blue aquarium exists in the background in one image data.
この場合、図23(b)に示すように、1画面を複数のエリアに分割し、かつ、図23(c)に示すように、各エリアの特徴データとして各エリアの代表色を算出する。この場合、水槽側のエリアでは青、光源側のエリアでは赤が代表色となる。 In this case, as shown in FIG. 23B, one screen is divided into a plurality of areas, and as shown in FIG. 23C, the representative color of each area is calculated as feature data of each area. In this case, blue is the representative color in the water tank side area, and red is the representative color in the light source side area.
また、図23(d)に示すように、検出された顔領域から、光源色を推定する。この場合、図23(e)に示すように、顔色から赤い光源と推定される。 Further, as shown in FIG. 23D, the light source color is estimated from the detected face area. In this case, as shown in FIG. 23E, a red light source is estimated from the face color.
つまり、各エリアの特徴データと顔領域の特徴データの間では、食い違いが生じ、それぞれの特徴データに従ってホワイトバランス補正を行った場合、得られる画像データも異なってくる。従って、いずれか一方の特徴データを基準としたより適切なホワイトバランス補正を行う必要がある。 That is, there is a discrepancy between the feature data of each area and the feature data of the face area, and when white balance correction is performed according to each feature data, the image data obtained also differs. Therefore, it is necessary to perform more appropriate white balance correction based on either one of the feature data.
図23(f)に示すように、顔領域の特徴データ(代表色)および各エリアの特徴データ(代表色)を、R/G−B/G色空間にプロットすると、顔領域の特徴データの周辺には、赤い光源が支配的な光源近傍のエリアの特徴データが集中し、また、水槽近傍のエリアは青が支配的な位置に集中する。 As shown in FIG. 23 (f), when the feature data (representative color) of the face area and the feature data (representative color) of each area are plotted in the R / GB / G color space, In the vicinity, feature data of an area near the light source where the red light source is dominant are concentrated, and in the area near the water tank, blue is concentrated at a dominant position.
この、顔領域を中心とした所定の閾値Tの近傍内に、一定程度の分割エリアの特徴データが存在していれば、これが正しい光源色を表していると判断でき、近傍外にある青の特徴データは、背景を支配する色であるということが識別でき、顔AWBによるホワイトバランス補正がよりよい補正方法であると識別できる。 If feature data of a certain degree of divided area exists within the vicinity of the predetermined threshold T centered on the face area, it can be determined that this represents the correct light source color, and the blue color outside the vicinity can be determined. The feature data can be identified as a color that dominates the background, and it can be identified that white balance correction by the face AWB is a better correction method.
この方式は図24のように、本来の光源とは関係のない色で画像の大部分が支配されることで、通常AWBにおける光源推定が顔AWBにおける光源推定とかけ離れてしまうときに特に有効である。 As shown in FIG. 24, this method is particularly effective when the light source estimation in the normal AWB is far from the light source estimation in the face AWB because most of the image is dominated by colors that are not related to the original light source. is there.
<第8実施形態>
図25は第8実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Eighth Embodiment>
FIG. 25 shows a block configuration of an image
図26は第8実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 26 is a flowchart of white balance correction processing according to the eighth embodiment.
S91〜S94はS71〜S74と同様である。 S91 to S94 are the same as S71 to S74.
S95では、顔AWB特徴データ抽出部52cが、顔領域から光源色を抽出する。そして、抽出した光源色を色空間にプロットする(例えば図27を参照)。
In S95, the face AWB feature
S96は、S76と同様である。 S96 is the same as S76.
S97では、エリア特徴データ抽出部52lが各エリアの代表色(例えばエリアごとの画素の平均色)を抽出する。そして、抽出した各エリアの代表色を色空間にプロットする(例えば図27を参照)。 In S97, the area feature data extraction unit 52l extracts a representative color of each area (for example, an average color of pixels for each area). Then, the extracted representative colors of each area are plotted in a color space (see, for example, FIG. 27).
S98では、特徴データ比較部52fが、各エリアの代表色を顔領域からの光源色と比較する。
In S98, the feature
S99は、S98の比較結果に応じ、S100またはS101に分岐する。 S99 branches to S100 or S101 depending on the comparison result of S98.
S100〜S102は、S80〜S82と同様である。 S100 to S102 are the same as S80 to S82.
<第9実施形態>
図28は第9実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Ninth Embodiment>
FIG. 28 shows a block configuration of an image
光源色と特定のエリアの代表色との差分算出部52f−3は、図29に例示するような数式により、色空間における各エリアの代表色と顔AWB光源色抽出部52の得た光源色との差分(距離)Lを算出する。
The
図30は第9実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 30 is a flowchart of white balance correction processing according to the ninth embodiment.
S111〜S117は、S91〜S97と同様である。 S111 to S117 are the same as S91 to S97.
S118では、例えば図29に例示する数式により、色空間における各エリアRi(iはエリアに付与された添え字)の代表色と顔AWB光源色抽出部52の得た光源色との差分(距離)Liを算出する。そして、各エリアごとに求められた差分Liのうち最小値Lminを確定する(図31参照)。
In S118, the difference (distance) between the representative color of each area Ri (i is a subscript assigned to the area) in the color space and the light source color obtained by the face AWB light source
S119では、最終WB補正値算出部52gが、差分Lminに基づき、適切な補正値算出方法を選択する。これは例えば上述と同様、差分Lminとある所定の閾値との大小関係に応じて、通常AWB補正値算出部52dの算出した補正値(通常AWB補正値)および顔AWB補正値算出部52bの算出した補正値(顔AWB補正値)のうちいずれか一方の最適な補正値を選択する。顔AWB補正値を選択した場合はS120、通常AWB補正値を選択した場合はS121に進む。
In S119, the final WB correction
S120〜S122は、S100〜S102と同様である。 S120 to S122 are the same as S100 to S102.
<第10実施形態>
図32は第10実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Tenth Embodiment>
FIG. 32 shows a block configuration of an image
光源色とn個のエリアの代表色との差分算出部52f−4は、各エリアの代表色と顔AWB光源色抽出部52c−1からの光源色との差分を算出する。
The
例えば図33に示すように、光源色の近傍に位置する所定個数(例えば総エリア個数の5〜20%程度の個数)の代表色と光源色との距離を、代表色ごとにそれぞれ求める。 For example, as shown in FIG. 33, a distance between a predetermined number of representative colors (for example, about 5 to 20% of the total number of areas) located near the light source color and the light source color is obtained for each representative color.
重みづけ平均部52pは、各エリアと光源色との差分(距離)Liに対応する重みβiを乗じることで、差分の加重平均を算出する(図35)。各差分Liに対応する重みβiは例えば図34に示すような、差分量と重みの関係を規定する重みβi決定関数から特定する。 The weighting average unit 52p calculates a weighted average of differences by multiplying the weight (βi) corresponding to the difference (distance) Li between each area and the light source color (FIG. 35). The weight βi corresponding to each difference Li is specified from a weight βi determination function that defines the relationship between the difference amount and the weight, for example, as shown in FIG.
図36は第10実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 36 is a flowchart of white balance correction processing according to the tenth embodiment.
S131〜137は、S111〜S117と同様である。 S131 to 137 are the same as S111 to S117.
S138では、各エリアの代表色と光源色との差分(距離)Liを算出する。 In S138, a difference (distance) Li between the representative color of each area and the light source color is calculated.
S139〜S145は、各エリアの各差分Liに対応するに対応する重みβiが全て(n個)算出するまで繰り返される処理単位である。 S139 to S145 are processing units that are repeated until all (n) weights βi corresponding to each difference Li in each area are calculated.
S140では、差分Liが所定の閾値T6以下であるか否かを判断する。判断が“Y”ならばS142、“N”ならばS141に進む。 In S140, it is determined whether or not the difference Li is equal to or less than a predetermined threshold T6. If the determination is “Y”, the process proceeds to S142, and if “N”, the process proceeds to S141.
S141では、差分Liが所定の閾値T7以上であるか否かを判断する。判断が“Y”ならばS143、“N”ならばS144に進む。 In S141, it is determined whether or not the difference Li is greater than or equal to a predetermined threshold T7. If the determination is “Y”, the process proceeds to S143, and if “N”, the process proceeds to S144.
S142では、図34の重み決定関数に従い、重みβi=100%とする。 In S142, the weight βi = 100% is set according to the weight determination function of FIG.
S143では、図34の重み決定関数に従い、重みβi=0%とする。 In S143, the weight βi = 0% according to the weight determination function of FIG.
S144では、図34の重み決定関数に従い、重みβi=1〜99%とする。 In S144, the weight βi is set to 1 to 99% according to the weight determination function of FIG.
S145では、n個の重みが算出されたか否かを判断し、算出されればS146に進む。算出されていなければS140に戻る。 In S145, it is determined whether n weights have been calculated, and if calculated, the process proceeds to S146. If not calculated, the process returns to S140.
S146では、各差分Liに対応する重みβiで各差分Liを重みづけして平均した差分の加重平均L’を算出する(図35参照)。 In S146, a weighted average L ′ of differences obtained by weighting and averaging each difference Li with a weight βi corresponding to each difference Li is calculated (see FIG. 35).
S147では、最終WB補正値算出部52gが、差分加重平均L’に基づき、適切な補正値算出方法を選択する。これの具体例は上述と同様である。第1の算出方法(例えば顔AWB補正値)を選択した場合はS148、第2の算出方法(例えば通常AWB補正値)を選択した場合はS149に進む。
In S147, the final WB correction
S148〜S150は、S120〜S122と同様である。 S148 to S150 are the same as S120 to S122.
<第11実施形態>
図37は第11実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Eleventh embodiment>
FIG. 37 shows a block configuration of the image
光源色と代表色との差分算出部52f−5は、各エリアの代表色と顔AWB光源色抽出部52c−1からの光源色との差分を算出する。
The
図38は第11実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 38 is a flowchart of white balance correction processing according to the eleventh embodiment.
S161〜S167は、S131〜S137と同様である。 S161 to S167 are the same as S131 to S137.
S168では、顔AWBの光源色と各エリアの代表色との差分Lを算出する。どのような差分を用いるかは任意であり、例えば上述した差分最小値Lminや重みづけ差分平均L’などである。 In S168, the difference L between the light source color of the face AWB and the representative color of each area is calculated. What kind of difference is used is arbitrary, and is, for example, the above-described difference minimum value Lmin, weighted difference average L ′, or the like.
S169では、差分Lが所定の閾値T5以下であるか否かを判断する。L≦T5ならばS170,L>T5ならばS171に進む。 In S169, it is determined whether or not the difference L is equal to or less than a predetermined threshold T5. If L ≦ T5, the process proceeds to S170, and if L> T5, the process proceeds to S171.
S170〜S172はS28〜S30と同様である。 S170 to S172 are the same as S28 to S30.
<第12実施形態>
図39は第12実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Twelfth embodiment>
FIG. 39 shows a block configuration of an image
重みα算出部52iは、例えば図40のような差分Lと重みαとの関係を規定した関数を予め記憶しておき、差分Lの値に対応する重みαを該関数から特定することで、重みαを算出する。
For example, the weight
図41は第12実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 41 is a flowchart of white balance correction processing according to the twelfth embodiment.
S181〜188は、S161〜S168と同様である。 S181 to 188 are the same as S161 to S168.
S189〜S200は、S37〜S48(図16)と同様である。ただし、S189、S193で用いられる閾値は、それぞれT6、T7である。 S189 to S200 are the same as S37 to S48 (FIG. 16). However, the threshold values used in S189 and S193 are T6 and T7, respectively.
<第13実施形態>
図42は第13実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<13th Embodiment>
FIG. 42 shows a block configuration of an image
最終光源色算出部52jは、例えば図43のような差分Lと重みαとの関係を規定した重み決定関数を予め記憶しておき、差分Lの値に対応する重みαを該関数から特定することで、重みαを算出する。
For example, the final light source
図44は第13実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 44 is a flowchart of white balance correction processing according to the thirteenth embodiment.
S211〜S218は、S181〜S188と同様である。 S211 to S218 are the same as S181 to S188.
S219〜S230は、S57〜S68(図19)と同様である。ただし、S219、S223で用いられる閾値は、それぞれT8、T9である。 S219 to S230 are the same as S57 to S68 (FIG. 19). However, the threshold values used in S219 and S223 are T8 and T9, respectively.
<第14実施形態>
図45は第14実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Fourteenth embodiment>
FIG. 45 shows a block configuration of an image
図46に例示するように、表示アイコン作成部52qは、重みα()を示すアイコンICの映像信号を生成し、これを撮像された画像データに重畳して、LCD22に出力して画像とともに表示させる。
As illustrated in FIG. 46, the display icon creation unit 52q generates a video signal of the icon IC indicating the weight α (), superimposes it on the captured image data, outputs it to the
図47は第14実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 47 is a flowchart of white balance correction processing according to the fourteenth embodiment.
S241〜S257は、S181〜S200(図41)と同様である。 S241 to S257 are the same as S181 to S200 (FIG. 41).
S258では、重みαを示すアイコンICの映像信号を生成し、これを撮像された画像データに重畳して、LCD22に出力して画像とともにポストビュー(撮像後の画像ビュー)として表示させる。これにより、ユーザはどのような重みが加えられているかを知ることができ、目視でそれが不適切と判断すれば、撮影のやり直しをすることができる。
In S258, a video signal of the icon IC indicating the weight α is generated, superimposed on the captured image data, output to the
<第15実施形態>
図48は第15実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Fifteenth embodiment>
FIG. 48 shows a block configuration of an image
図49に例示するように、表示枠作成部52qは、顔AWBの光源色に最も近い代表色を有するエリアを示す枠Fの映像信号を生成し、これを撮像された画像データに重畳して、LCD22に出力して画像とともに表示させる。
As illustrated in FIG. 49, the display frame creation unit 52q generates a video signal of a frame F indicating an area having a representative color closest to the light source color of the face AWB, and superimposes the video signal on the captured image data. , Output to the
図50は第15実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 50 is a flowchart of white balance correction processing according to the fifteenth embodiment.
S261〜S267は、S181〜S200と同様である。 S261 to S267 are the same as S181 to S200.
S278では、顔AWBの光源色に最も近い代表色を有するエリアを示す枠Fの映像信号を生成し、これを撮像された画像データに重畳して、LCD22に出力して画像とともにポストビューとして表示させる。これにより、ユーザはどのエリアの特徴データがホワイトバランスの基準となっているかを知ることができ、目視でそれが不適切と判断すれば、撮影のやり直しをすることができる。
In S278, a video signal of a frame F indicating an area having a representative color closest to the light source color of the face AWB is generated, superimposed on the captured image data, output to the
<第16実施形態>
図51は第16実施形態に係る画像信号処理回路44のブロック構成を示す。他の実施形態と同一のブロックには同一の符号を付している。
<Sixteenth Embodiment>
FIG. 51 shows a block configuration of an image
重みα’算出部52sは、CPU33の指令に従って操作部23から読み込まれた顔AWBの優先度に基づき、重みα’を算出する。
The weight α ′
ここで、顔AWBの優先度とは、例えば、高(設定優先度が標準の優先度よりも高く、画像信号処理回路44で算出した重みαよりも重みα’を大きくする)、中(設定優先度と標準の優先度が同じであり、画像信号処理回路44で算出した重みαと重みα’を同じにする)、低(設定優先度が標準の優先度よりも低く、画像信号処理回路44で算出した重みαよりも重みα’を小さくする)の3段階のレベルからなり、その中から、ユーザが所望のレベルを1つ選択できる。無論、高および低の段階は、さらに重みα’を所望の幅で増減可能にするため、さらに細分された段階を有していてもよい。
Here, the priority of the face AWB is, for example, high (the setting priority is higher than the standard priority and the weight α ′ is larger than the weight α calculated by the image signal processing circuit 44), medium (setting The priority and the standard priority are the same, and the weight α and the weight α ′ calculated by the image
図52は第16実施形態に係るホワイトバランス補正処理のフローチャートである。 FIG. 52 is a flowchart of white balance correction processing according to the sixteenth embodiment.
S281〜S295は、S261〜S275(図50)と同様である。 S281 to S295 are the same as S261 to S275 (FIG. 50).
S296では、操作部23から、顔AWBの優先度の設定(重みα’)を読み込む。そして、設定された顔AWBの優先度(重みα’)と基準の顔AWBの優先度(重みα)が一致しているかを判断する。両者が一致する場合はS297、一致しない場合にはS298に進む。
In S296, the priority setting (weight α ′) of the face AWB is read from the
S297では、S47と同様、重みαに基づいて最終WB補正値を算出する。 In S297, as in S47, the final WB correction value is calculated based on the weight α.
S298では、設定された顔AWBの優先度(重みα’)が基準の顔AWBの優先度(重みα)よりも大きいかを判断する。“Y”の場合はS299、“N”の場合場合にはS301に進む。 In S298, it is determined whether the priority (weight α ′) of the set face AWB is higher than the priority (weight α) of the reference face AWB. If “Y”, the process proceeds to S299, and if “N”, the process proceeds to S301.
S299では、重みα’に基づいて最終WB補正値を算出する。この場合、結果的に顔AWBの重みが上がるから、顔AWB補正値に近い最終補正値が得られる(S300)。 In S299, a final WB correction value is calculated based on the weight α ′. In this case, since the weight of the face AWB increases as a result, a final correction value close to the face AWB correction value is obtained (S300).
S301では、重みα’に基づいて最終WB補正値を算出する。この場合、結果的に顔AWBの重みが下がるから、通常AWB補正値に近い最終補正値が得られる(S302)。 In S301, a final WB correction value is calculated based on the weight α ′. In this case, as a result, the weight of the face AWB is lowered, so that a final correction value close to the normal AWB correction value is obtained (S302).
S303は、S277と同様である。 S303 is the same as S277.
このように、ユーザの好みに応じて顔AWB、通常AWBの重みを変えることで、ユーザの意図通りの画像データを得ることができる。 Thus, by changing the weights of the face AWB and the normal AWB according to the user's preference, image data as intended by the user can be obtained.
44:画像信号処理回路、52a:顔領域特定部、52b:顔AWB補正値算出部、52c:顔AWB特徴データ抽出部、52d:通常AWB補正値算出部、52e:通常AWB特徴データ抽出部、52f:特徴データ比較部、52g:最終AWB補正値算出部、52h:WB補正部 44: Image signal processing circuit, 52a: Face area specifying unit, 52b: Face AWB correction value calculating unit, 52c: Face AWB feature data extracting unit, 52d: Normal AWB correction value calculating unit, 52e: Normal AWB feature data extracting unit, 52f: feature data comparison unit, 52g: final AWB correction value calculation unit, 52h: WB correction unit
Claims (22)
入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出するステップと、
前記画像データから顔領域を特定するステップと、
前記画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出するステップと、
前記画像データを1または複数のエリアに分割し、各エリアから特徴データを抽出するステップと、
前記顔領域から特徴データを抽出するステップと、
前記各エリアから抽出された特徴データと前記顔領域から抽出された特徴データとの比較結果に基づき、前記顔AWB補正値および前記通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出するステップと、
を含むオートホワイトバランス補正値算出方法。 Inputting image data;
Calculating a normal AWB correction value that is a first auto white balance (AWB) correction value based on the input image data;
Identifying a face region from the image data;
Calculating a face AWB correction value that is a second AWB correction value based on the face area of the image data;
Dividing the image data into one or more areas and extracting feature data from each area;
Extracting feature data from the face region;
Based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area, a final AWB correction value corresponding to at least one of the face AWB correction value and the normal AWB correction value Calculating steps,
Auto white balance correction value calculation method including
前記各エリアからは、前記特徴データとして前記各エリアの代表色が抽出される請求項1に記載のオートホワイトバランス補正値算出方法。 From the face area, a light source color is extracted as the feature data,
The auto white balance correction value calculation method according to claim 1, wherein a representative color of each area is extracted as the feature data from each area.
前記差分量に基づき、最終的なAWB補正値を算出するステップと、
をさらに含む請求項2に記載のオートホワイトバランス補正値算出方法。 Calculating a difference amount between a representative color of a specific area among representative colors of each area and a light source color of the face area;
Calculating a final AWB correction value based on the difference amount;
The auto white balance correction value calculation method according to claim 2, further comprising:
前記差分量のうち前記顔領域の近傍にある所定数のエリアについての差分量を、前記差分量に対応する0%以上100%以下の所定の重みβで加重平均して得られた値に基づき、最終的なAWB補正値を算出するステップと、
をさらに含む請求項2に記載のオートホワイトバランス補正値算出方法。 Calculating a difference amount between a representative color of a specific area among representative colors of each area and a light source color of the face area;
Based on a value obtained by performing a weighted average of a difference amount for a predetermined number of areas in the vicinity of the face area in the difference amount with a predetermined weight β corresponding to the difference amount of 0% or more and 100% or less. Calculating a final AWB correction value;
The auto white balance correction value calculation method according to claim 2, further comprising:
前記最終的な光源色に応じて最終的なAWB補正値を算出するステップと、
をさらに含む請求項2〜4のいずれかに記載のオートホワイトバランス補正値算出方法。 Obtaining a final light source color by weighted averaging each of the light source color of the image data and the light source color of the face region with a predetermined weight α of 0% or more and 100% or less;
Calculating a final AWB correction value according to the final light source color;
The auto white balance correction value calculation method according to claim 2, further comprising:
前記顔優先度に応じて前記重みを変化させるステップと、
をさらに含む請求項4、6または7に記載のオートホワイトバランス補正値算出方法。 Receiving a face priority selection;
Changing the weight according to the face priority;
The auto white balance correction value calculation method according to claim 4, 6 or 7, further comprising:
入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出するステップと、
前記画像データから顔領域を特定するステップと、
前記画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出するステップと、
前記画像データを1または複数のエリアに分割し、各エリアから特徴データを抽出するステップと、
前記顔領域から特徴データを抽出するステップと、
前記各エリアから抽出された特徴データと前記顔領域から抽出された特徴データとの比較結果に基づき、前記顔AWB補正値および前記通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出するステップと、
をコンピュータに実行させるオートホワイトバランス補正値算出プログラム。 Inputting image data;
Calculating a normal AWB correction value that is a first auto white balance (AWB) correction value based on the input image data;
Identifying a face region from the image data;
Calculating a face AWB correction value that is a second AWB correction value based on the face area of the image data;
Dividing the image data into one or more areas and extracting feature data from each area;
Extracting feature data from the face region;
Based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area, a final AWB correction value corresponding to at least one of the face AWB correction value and the normal AWB correction value Calculating steps,
Auto white balance correction value calculation program that causes a computer to execute.
前記画像データ入力部に入力された画像データに基づいて第1のオートホワイトバランス(AWB)補正値である通常AWB補正値を算出する通常AWB補正値算出部と、
前記画像データから顔領域を特定する顔領域特定部と、
前記画像データの顔領域に基づいて第2のAWB補正値である顔AWB補正値を算出する顔AWB補正値算出部と、
前記画像データを1または複数のエリアに分割し、各エリアから特徴データを抽出するエリア特徴データ抽出部と、
前記顔領域から特徴データを抽出する顔領域特徴データ抽出部と、
前記各エリアから抽出された特徴データと前記顔領域から抽出された特徴データとの比較結果に基づき、前記顔AWB補正値および前記通常AWB補正値のうち少なくとも一方に応じた最終的なAWB補正値を算出する最終AWB補正値算出部と、
を備えるオートホワイトバランス補正値算出装置。 An image data input unit for inputting image data;
A normal AWB correction value calculation unit that calculates a normal AWB correction value that is a first auto white balance (AWB) correction value based on the image data input to the image data input unit;
A face area specifying unit for specifying a face area from the image data;
A face AWB correction value calculation unit that calculates a face AWB correction value that is a second AWB correction value based on the face area of the image data;
An area feature data extraction unit that divides the image data into one or a plurality of areas and extracts feature data from each area;
A face area feature data extraction unit for extracting feature data from the face area;
Based on the comparison result between the feature data extracted from each area and the feature data extracted from the face area, a final AWB correction value corresponding to at least one of the face AWB correction value and the normal AWB correction value A final AWB correction value calculation unit for calculating
An auto white balance correction value calculation device.
前記各エリアからは、前記特徴データとして前記各エリアの代表色が抽出される請求項12に記載のオートホワイトバランス補正値算出装置。 From the face area, a light source color is extracted as the feature data,
The automatic white balance correction value calculation apparatus according to claim 12, wherein a representative color of each area is extracted as the feature data from each area.
前記最終AWB補正値算出部は、前記差分量に基づき、最終的なAWB補正値を算出する請求項13に記載のオートホワイトバランス補正値算出装置。 A difference amount calculating unit that calculates a difference amount between a representative color of a specific area and a light source color of the face area among the representative colors of each area;
The auto white balance correction value calculation apparatus according to claim 13, wherein the final AWB correction value calculation unit calculates a final AWB correction value based on the difference amount.
前記最終AWB補正値算出部は、前記差分量のうち前記顔領域の近傍にある所定数のエリアについての差分量を、前記差分量に対応する0%以上100%以下の所定の重みβで加重平均して得られた値に基づき、最終的なAWB補正値を算出する請求項13に記載のオートホワイトバランス補正値算出装置。 A difference amount calculating unit that calculates a difference amount between a representative color of a specific area and a light source color of the face area among the representative colors of each area;
The final AWB correction value calculation unit weights a difference amount for a predetermined number of areas in the vicinity of the face area in the difference amount with a predetermined weight β of 0% or more and 100% or less corresponding to the difference amount. The auto white balance correction value calculation apparatus according to claim 13, wherein a final AWB correction value is calculated based on a value obtained by averaging.
前記最終AWB補正値算出部は、前記最終的な光源色に応じて最終的なAWB補正値を算出する請求項13〜15のいずれかに記載のオートホワイトバランス補正値算出装置。 A final light source color calculation unit for obtaining a final light source color by weighted averaging each of the light source color of the image data and the light source color of the face region with a predetermined weight α of 0% or more and 100% or less;
The auto white balance correction value calculation apparatus according to claim 13, wherein the final AWB correction value calculation unit calculates a final AWB correction value according to the final light source color.
前記最終AWB補正値算出部は、前記顔優先度に応じて前記重みを変化させる請求項15、17または18に記載のオートホワイトバランス補正値算出装置。 A face priority selection unit for receiving selection of face priority;
The auto white balance correction value calculation device according to claim 15, 17 or 18, wherein the final AWB correction value calculation unit changes the weight according to the face priority.
撮影光学系を介して被写体像を受光し、該被写体像を示すアナログ画像信号を出力する撮像素子と、
前記アナログ画像信号をデジタル画像データに変換して前記画像データ入力部に出力する画像データ出力部と、
前記オートホワイトバランス補正値算出装置の算出した最終的なAWB補正値に基づいて前記画像データのホワイトバランスを補正する補正部と、
を備える撮像装置。 The auto white balance correction value calculation device according to any one of claims 12 to 21,
An image sensor that receives a subject image via a photographing optical system and outputs an analog image signal indicating the subject image;
An image data output unit for converting the analog image signal into digital image data and outputting the digital image data to the image data input unit;
A correction unit that corrects the white balance of the image data based on the final AWB correction value calculated by the auto white balance correction value calculation device;
An imaging apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011014426A JP5214749B2 (en) | 2011-01-26 | 2011-01-26 | AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011014426A JP5214749B2 (en) | 2011-01-26 | 2011-01-26 | AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007185873A Division JP4702635B2 (en) | 2007-07-17 | 2007-07-17 | AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011139481A true JP2011139481A (en) | 2011-07-14 |
JP5214749B2 JP5214749B2 (en) | 2013-06-19 |
Family
ID=44350366
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011014426A Active JP5214749B2 (en) | 2011-01-26 | 2011-01-26 | AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5214749B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130056442A (en) * | 2011-11-22 | 2013-05-30 | 삼성전자주식회사 | Device and method for adjusting white balance |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003333616A (en) * | 2002-03-06 | 2003-11-21 | Canon Inc | White balance adjustment method, image pickup device, program, and storage medium |
JP2004328098A (en) * | 2003-04-22 | 2004-11-18 | Mitsubishi Electric Corp | Digital camera and its picture correcting method |
JP2005072694A (en) * | 2003-08-28 | 2005-03-17 | Nikon Corp | Image pickup apparatus |
JP2005531189A (en) * | 2002-06-25 | 2005-10-13 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Method and system for performing image white balance using face color as reference signal |
JP2006139368A (en) * | 2004-11-10 | 2006-06-01 | Fuji Photo Film Co Ltd | Image processing method and apparatus, and program |
JP2006352795A (en) * | 2005-06-20 | 2006-12-28 | Canon Inc | Imaging apparatus and image processing method |
JP2008236101A (en) * | 2007-03-19 | 2008-10-02 | Ricoh Co Ltd | Imaging device and imaging method |
-
2011
- 2011-01-26 JP JP2011014426A patent/JP5214749B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003333616A (en) * | 2002-03-06 | 2003-11-21 | Canon Inc | White balance adjustment method, image pickup device, program, and storage medium |
JP2005531189A (en) * | 2002-06-25 | 2005-10-13 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Method and system for performing image white balance using face color as reference signal |
JP2004328098A (en) * | 2003-04-22 | 2004-11-18 | Mitsubishi Electric Corp | Digital camera and its picture correcting method |
JP2005072694A (en) * | 2003-08-28 | 2005-03-17 | Nikon Corp | Image pickup apparatus |
JP2006139368A (en) * | 2004-11-10 | 2006-06-01 | Fuji Photo Film Co Ltd | Image processing method and apparatus, and program |
JP2006352795A (en) * | 2005-06-20 | 2006-12-28 | Canon Inc | Imaging apparatus and image processing method |
JP2008236101A (en) * | 2007-03-19 | 2008-10-02 | Ricoh Co Ltd | Imaging device and imaging method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20130056442A (en) * | 2011-11-22 | 2013-05-30 | 삼성전자주식회사 | Device and method for adjusting white balance |
KR101896386B1 (en) | 2011-11-22 | 2018-09-11 | 삼성전자주식회사 | Device and method for adjusting white balance |
Also Published As
Publication number | Publication date |
---|---|
JP5214749B2 (en) | 2013-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4702635B2 (en) | AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE | |
EP3477931B1 (en) | Image processing method and device, readable storage medium and electronic device | |
US8055067B2 (en) | Color segmentation | |
US8384792B2 (en) | Imaging apparatus, method for controlling the same, and program | |
KR101441786B1 (en) | Subject determination apparatus, subject determination method and recording medium storing program thereof | |
JP2019012426A (en) | Image recognition device, learning device, image recognition method, learning method and program | |
JP6006543B2 (en) | Image processing apparatus and image processing method | |
JP2003036438A (en) | Program for specifying red-eye in image, recording medium, image processor and method for specifying red- eye | |
CN103679767A (en) | Image generation apparatus and image generation method | |
CN103369238A (en) | Image creating device and image creating method | |
JP2016126750A (en) | Image processing system, image processing device, imaging device, image processing method, program, and recording medium | |
CN102088539A (en) | Method and system for evaluating pre-shot picture quality | |
JP5509621B2 (en) | Image processing apparatus, camera, and program | |
JP5214749B2 (en) | AUTO WHITE BALANCE CORRECTION VALUE CALCULATION DEVICE, METHOD, PROGRAM, AND IMAGING DEVICE | |
JP5414216B2 (en) | Imaging apparatus, control method thereof, and program | |
JP5463688B2 (en) | Focus evaluation device, camera and program | |
JP5146223B2 (en) | Program, camera, image processing apparatus, and image contour extraction method | |
Rahman et al. | Real-time face-based auto-focus for digital still and cell-phone cameras | |
TWI552112B (en) | A color temperature estimation algorithm | |
KR20090102259A (en) | Apparatus and method for operation control of camera | |
JP6314281B1 (en) | Image processing method and foreground region acquisition method | |
JP2007201679A (en) | Imaging apparatus, image processing method, and image processing program | |
JP2009206583A (en) | Imaging apparatus, and image processing program | |
JP2017182668A (en) | Data processor, imaging device, and data processing method | |
JP2014022826A (en) | Image processing apparatus, imaging apparatus, and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121122 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121203 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121227 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130214 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130227 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5214749 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160308 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |