JP2007081550A - Imaging apparatus, and image processing unit, method, and program - Google Patents

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

Info

Publication number
JP2007081550A
JP2007081550A JP2005263958A JP2005263958A JP2007081550A JP 2007081550 A JP2007081550 A JP 2007081550A JP 2005263958 A JP2005263958 A JP 2005263958A JP 2005263958 A JP2005263958 A JP 2005263958A JP 2007081550 A JP2007081550 A JP 2007081550A
Authority
JP
Japan
Prior art keywords
index
image data
brightness
correction amount
captured image
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
JP2005263958A
Other languages
Japanese (ja)
Inventor
Hiroaki Takano
博明 高野
Tsukasa Ito
司 伊藤
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 JP2005263958A priority Critical patent/JP2007081550A/en
Priority to PCT/JP2006/318009 priority patent/WO2007032324A1/en
Publication of JP2007081550A publication Critical patent/JP2007081550A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6083Colour correction or control controlled by factors external to the apparatus
    • H04N1/6086Colour correction or control controlled by factors external to the apparatus by scene illuminant, i.e. conditions at the time of picture capture, e.g. flash, optical filter used, evening, cloud, daylight, artificial lighting, white point measurement, colour temperature
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately correct the brightness of photographed image data regarding an imaging apparatus, an image processing unit, an image processing method, and an image processing program. <P>SOLUTION: A brightness correction section 71 in the imaging apparatus 100 comprises an index calculation section 74 for calculating a natural light index for expressing the degree of outdoor photographing by the natural light of photographed image data, a luminance ratio index for expressing the level of the dynamic range of the photographed image data, and an exposure index for expressing the degree of exposure photographing caused by exposure setting in photographing; a section 75 for calculating the amount of correction of brightness for setting a plurality of temporary correction quantities to the photographed image data, based on the brightness analysis value of photographed image data and the reproduction target value of brightness, setting a mixture coefficient as a weighting factor to be multiplied to each of the plurality of temporary correction quantities based on the natural light index, and calculating the amount of correction of brightness in the photographed image data, based on the mixture coefficient and the plurality of temporary correction quantities; and a brightness correction curve generation section 76 for generating a brightness correction curve for converting the photographed image data, based on the amount of brightness correction and each index calculated by the index calculation section 74. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、撮影画像データの明るさの補正処理を行う撮像装置、画像処理装置、画像処理方法及び画像処理プログラムに関する。   The present invention relates to an imaging apparatus, an image processing apparatus, an image processing method, and an image processing program that perform brightness correction processing of captured image data.

従来、デジタルカメラ等の撮像装置により取得された画像や、ネガフィルム等の写真フィルムに記録された画像を光電的に読み取ることによって得られた撮影画像を、プリンタ等の出力デバイスで出力(再生)することが行われている。このように出力デバイスを用いて撮影画像を出力(再生)する場合において、画像領域の低輝度部と高輝度部とを別々に補正し、画像全体のダイナミックレンジを圧縮する所謂「覆い焼き」処理を適用することにより、出力デバイスの再現範囲限界で生じる、明部及び暗部のつぶれを抑制する方法が知られている(例えば、特許文献1参照)。   Conventionally, a captured image obtained by photoelectrically reading an image acquired by an imaging device such as a digital camera or an image recorded on a photographic film such as a negative film is output (reproduced) by an output device such as a printer. To be done. In this way, when outputting (reproducing) a captured image using an output device, a so-called “dodging” process in which the low luminance portion and the high luminance portion of the image area are separately corrected and the dynamic range of the entire image is compressed. A method for suppressing the collapse of the bright part and the dark part, which occurs at the limit of the reproduction range of the output device by applying, is known (for example, see Patent Document 1).

一方、撮影画像データの主要被写体(例えば、人物顔領域)の明るさが適正に仕上がるように、撮影画像データの明るさを自動的に調整することが行われている。このような明るさ調整方法において、撮影画像データの主要被写体を解析して得られた明るさに基づいて、その撮影画像データの明るさを補正するための補正量及び補正カーブを設定する方法が知られている(例えば、特許文献2参照)。
特開2005−72930号公報 特開2002−247393号公報
On the other hand, the brightness of the captured image data is automatically adjusted so that the brightness of the main subject (for example, a human face area) of the captured image data is appropriately finished. In such a brightness adjustment method, there is a method for setting a correction amount and a correction curve for correcting the brightness of the captured image data based on the brightness obtained by analyzing the main subject of the captured image data. It is known (see, for example, Patent Document 2).
JP 2005-72930 A JP 2002-247393 A

しかしながら、撮影画像データの主要被写体の明るさに基づいて、撮影画像データの明るさを補正するための明るさ補正量及び補正カーブを設定すると、逆光やストロボ撮影シーンのような、ダイナミックレンジの大きいシーンでは、明るさ補正量が大きい程、明部及び暗部がつぶれたり、高彩度の色が飽和してつぶれたり、色相が変わってしまうという問題がある。   However, if the brightness correction amount and correction curve for correcting the brightness of the captured image data are set based on the brightness of the main subject of the captured image data, the dynamic range is large, such as in backlight or strobe shooting scenes. In the scene, as the brightness correction amount is larger, there is a problem that a bright part and a dark part are crushed, a high-saturation color is saturated and crushed, and a hue is changed.

このような問題の解決策として上記の「覆い焼き」処理を適用すると、人物顔領域の明るさを適正に保つことが難しく、また、著しい「覆い焼き」処理の結果に対するユーザの嗜好も様々であることから、改善が望まれていた。更に、逆光とストロボ撮影シーンとでは、ダイナミックレンジに差がないが、そもそも夫々のシーンにおいてつぶれを警戒すべき輝度や色の種類は、画像を明るくするか暗くするかの判断、即ち、人物顔領域の明るさをどのように検出するかの精度に依存するという、本質的な問題があった。   Applying the above-described “Dodge” process as a solution to such a problem makes it difficult to maintain the brightness of the human face area appropriately, and the user's preference for the result of the remarkable “Dodge” process also varies. Because of this, improvements were desired. Furthermore, there is no difference in dynamic range between backlight and flash photography scenes, but in the first place the brightness and color type that should be wary of crushing in each scene is determined whether to make the image brighter or darker, that is, the human face There was an essential problem of depending on the accuracy of how the brightness of the area was detected.

本発明の課題は、撮影画像データの明るさを適正に補正することである。   An object of the present invention is to appropriately correct the brightness of captured image data.

上記課題を解決するため、請求項1に記載の発明は、被写体を撮影して撮影画像データを取得し、当該撮影画像データ内の主要被写体の明るさを最適化する処理を行う撮像装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記補正量算出手段により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、を備えることを特徴としている。
In order to solve the above-described problem, an invention according to claim 1 is an imaging apparatus that performs a process of acquiring a photographed image data by photographing a subject and optimizing brightness of a main subject in the photographed image data. And
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
A correction curve generating means for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculating means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the photographed image data in accordance with the correction curve generated by the correction curve generation means.

請求項2に記載の発明は、被写体を撮影して撮影画像データを取得し、当該撮影画像データ内の主要被写体の明るさを最適化する処理を行う撮像装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定手段と、
前記補正量算出手段により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算手段と、
前記乗算手段により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、を備えることを特徴としている。
The invention according to claim 2 is an imaging device that performs processing for capturing a captured image data by capturing a subject and optimizing the brightness of a main subject in the captured image data.
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. Suppression coefficient setting means for setting a suppression coefficient for
Multiplication means for calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation means by the suppression coefficient;
A correction curve generation means for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means.

請求項3に記載の発明は、請求項1又は2に記載の撮像装置において、
前記指標算出手段は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴としている。
The invention according to claim 3 is the imaging apparatus according to claim 1 or 2,
The index calculation means divides the photographed image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire photographed image data for each of the divided regions. The first calculation process and the photographed image data are divided into predetermined areas composed of combinations of the distance from the outer edge of the screen of the photographed image data and the brightness, and the ratio of the divided areas to the entire photographed image data Executing at least one of the second calculation processes for calculating the second occupancy ratio indicating
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, It is characterized by calculating an exposure index.

請求項4に記載の発明は、撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記補正量算出手段により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、を備えることを特徴としている。
The invention according to claim 4 is an image processing apparatus that performs processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
A correction curve generating means for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculating means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means.

請求項5に記載の発明は、撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定手段と、
前記補正量算出手段により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算手段と、
前記乗算手段により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、を備えることを特徴としている。
The invention according to claim 5 is an image processing device that performs processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue set based on the natural light index, and the saturation of the captured image data is higher than a predetermined threshold. Suppression coefficient setting means for setting a suppression coefficient for
Multiplication means for calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation means by the suppression coefficient;
A correction curve generation means for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means.

請求項6に記載の発明は、請求項4又は5に記載の画像処理装置において、
前記指標算出手段は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴としている。
The invention according to claim 6 is the image processing apparatus according to claim 4 or 5, wherein
The index calculation means divides the photographed image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire photographed image data for each of the divided regions. The first calculation process and the photographed image data are divided into predetermined areas composed of combinations of the distance from the outer edge of the screen of the photographed image data and the brightness, and the ratio of the divided areas to the entire photographed image data Executing at least one of the second calculation processes for calculating the second occupancy ratio indicating
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, It is characterized by calculating an exposure index.

請求項7に記載の発明は、撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理方法であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出工程と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出工程により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定工程と、
前記指標算出工程により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定工程と、
前記第1混合係数設定工程により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定工程と、
前記指標算出工程により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定工程と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出工程と、
前記補正量算出工程により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成工程と、
前記補正カーブ生成工程により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正工程と、を含むことを特徴としている。
The invention according to claim 7 is an image processing method for performing processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation process to perform,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation step, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting step to be set;
A first mixing coefficient setting step for setting a first mixing coefficient as a weighting coefficient by which each of the plurality of first temporary correction amounts is multiplied based on the natural light index calculated by the index calculation step;
A second provisional correction amount setting step for setting a second provisional correction amount for the captured image data based on the first mixture coefficient set by the first mixture coefficient setting step and the plurality of first provisional correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation step, at least one of the plurality of first temporary correction amounts is multiplied by the second temporary correction amount as a weight coefficient. A second mixing coefficient setting step for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation process;
A correction curve generating step for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculating step, the natural light index, and the luminance ratio index;
A correction step of correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation step.

請求項8に記載の発明は、撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理方法であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出工程と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出工程により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定工程と、
前記指標算出工程により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定工程と、
前記第1混合係数設定工程により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定工程と、
前記指標算出工程により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定工程と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出工程と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定工程と、
前記補正量算出工程により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算工程と、
前記乗算工程により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成工程と、
前記補正カーブ生成工程により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正工程と、を含むことを特徴としている。
The invention according to claim 8 is an image processing method for performing processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation process to perform,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation step, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting step to be set;
A first mixing coefficient setting step for setting a first mixing coefficient as a weighting coefficient by which each of the plurality of first temporary correction amounts is multiplied based on the natural light index calculated by the index calculation step;
A second provisional correction amount setting step for setting a second provisional correction amount for the captured image data based on the first mixture coefficient set by the first mixture coefficient setting step and the plurality of first provisional correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation step, at least one of the plurality of first temporary correction amounts is multiplied by the second temporary correction amount as a weight coefficient. A second mixing coefficient setting step for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation process;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. A suppression coefficient setting step for setting a suppression coefficient for
A multiplication step of calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation step by the suppression coefficient;
A correction curve generating step for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication step, the natural light index, and the luminance ratio index;
A correction step of correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation step.

請求項9に記載の発明は、請求項7又は8に記載の画像処理方法において、
前記指標算出工程では、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴としている。
The invention according to claim 9 is the image processing method according to claim 7 or 8,
In the index calculating step, the photographed image data is divided into regions each having a predetermined combination of brightness and hue, and a first occupancy ratio indicating a proportion of the entire photographed image data is calculated for each of the divided regions. The first calculation process and the photographed image data are divided into predetermined areas composed of combinations of the distance from the outer edge of the screen of the photographed image data and the brightness, and the ratio of the divided areas to the entire photographed image data Executing at least one of the second calculation processes for calculating the second occupancy ratio indicating
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, It is characterized by calculating an exposure index.

請求項10に記載の画像処理プログラムは、コンピュータに、
撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出機能と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出機能により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定機能と、
前記指標算出機能により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定機能と、
前記第1混合係数設定機能により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定機能と、
前記指標算出機能により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定機能と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出機能と、
前記補正量算出機能により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成機能と、
前記補正カーブ生成機能により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正機能と、を実現させる。
An image processing program according to claim 10 is stored in a computer.
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation function,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation function, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting function to be set;
A first mixing coefficient setting function for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculation function;
A second temporary correction amount setting function for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting function and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation function, a first weighting factor as a weighting factor that multiplies the second temporary correction amount by at least one of the plurality of first temporary correction amounts. A second mixing coefficient setting function for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation function;
A correction curve generation function for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculation function, the natural light index, and the luminance ratio index;
And a correction function for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation function.

請求項11に記載の画像処理プログラムは、コンピュータに、
撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出機能と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出機能により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定機能と、
前記指標算出機能により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定機能と、
前記第1混合係数設定機能により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定機能と、
前記指標算出機能により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定機能と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出機能と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定機能と、
前記補正量算出機能により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算機能と、
前記乗算機能により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成機能と、
前記補正カーブ生成機能により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正機能と、を実現させる。
An image processing program according to claim 11 is stored in a computer.
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation function,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation function, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting function to be set;
A first mixing coefficient setting function for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculation function;
A second temporary correction amount setting function for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting function and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation function, a first weighting factor as a weighting factor that multiplies the second temporary correction amount by at least one of the plurality of first temporary correction amounts. A second mixing coefficient setting function for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation function;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. A suppression coefficient setting function for setting a suppression coefficient for
A multiplication function for calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation function by the suppression coefficient;
A correction curve generation function for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication function, the natural light index, and the luminance ratio index;
And a correction function for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation function.

請求項12に記載の発明は、請求項10又は11に記載の画像処理プログラムにおいて、前記指標算出機能を実現させる際に、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴としている。
The invention according to claim 12 is the image processing program according to claim 10 or 11, wherein the index calculation function is realized.
A first calculation process that divides the captured image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire captured image data for each of the divided regions; The captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and a second occupation indicating the ratio of the divided area to the entire captured image data Executing at least one of the second calculation processes for calculating the rate,
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, It is characterized by calculating an exposure index.

次に、本発明における用語について説明する。
「撮影画像データ内の主要被写体の明るさを最適化する」とは、例えば、撮影画像データの主要被写体である人物顔領域の明るさが、撮影画像データを出力する出力デバイス(例えば、プリンタ)において最適な明るさで再現されるようにすることを意味する。
Next, terms in the present invention will be described.
“Optimizing the brightness of the main subject in the captured image data” means, for example, an output device (for example, a printer) that outputs the captured image data based on the brightness of the human face area that is the main subject of the captured image data. It is meant to be reproduced with the optimum brightness.

「自然光」とは、人工的な光源である定常光や閃光(「ストロボ」、「フラッシュ」、「スピードライト」などと称される)ではなく、太陽を光源とする光のことである。日中光とも言う。デーライトは、日中光に近い色温度(約5500K)の人工的な光源を示す用語であるため、「自然光」とは異なる。   “Natural light” is light that uses the sun as a light source, not an artificial light source such as steady light or flash light (referred to as “strobe”, “flash”, “speedlight”, etc.). Also called daylight. Daylight is a term that refers to an artificial light source with a color temperature (approximately 5500K) close to that of daylight, and is different from “natural light”.

「屋外撮影度」(「自然光指標」ともいう。)とは、撮影画像データが「自然光」を用いて撮影されたものであるかどうかを推定し、その結果を定量的に示した数値である。「自然光」を用いて撮影され、明るさ補正を要するシーンには逆光シーンが多く、画面上部に高輝度領域或いは高彩度の空色領域、画面下部に、低輝度領域或いは肌色や緑色が分布する確率が高い。一方、「自然光」を用いないで撮影された屋内撮影或いはストロボ撮影シーンには、画面中央に高輝度領域或いは低彩度の肌色領域、画面周辺には低輝度領域或いは低輝度の肌色や高彩度の肌色が分布する傾向にある。このような経験側を基に、「自然光」を用いて撮影されかどうかを、「屋外撮影度」として定量的に示すことが可能である。画面上部の輝度や空色色相の画素数、画面下部の輝度や肌色色相の画素数など、多くの変量から1つの傾向を導き出す統計処理手法としては、多変量解析を用いることが望ましい。   “Outdoor shooting degree” (also referred to as “natural light index”) is a numerical value that estimates whether or not the shot image data was taken using “natural light” and quantitatively shows the result. . Scenes that are shot using “natural light” and require brightness correction are often backlit scenes, and there is a high probability that a high-luminance area or high-saturation sky blue area is distributed at the top of the screen, and a low-luminance area or skin color or green is distributed at the bottom of the screen. high. On the other hand, for indoor or strobe shooting scenes that were shot without using “natural light”, a high-brightness area or low-saturation skin color area in the center of the screen, and a low-brightness area or low-brightness skin color or high saturation around the screen. Skin color tends to be distributed. Based on such experience, it is possible to quantitatively indicate whether or not the image is taken using “natural light” as “outdoor shooting degree”. It is desirable to use multivariate analysis as a statistical processing method for deriving one tendency from many variables such as the luminance at the top of the screen and the number of pixels in the sky blue hue, the luminance at the bottom of the screen and the number of pixels in the skin color hue.

「ダイナミックレンジの大きさを表す輝度比指標」とは、逆光シーンやストロボ撮影シーンのような、撮影時の光源条件に起因して、主要被写体領域と背景領域の明るさが異なる程度を定量的に示す値のことである。例えば、逆光シーンでは、撮影者がカメラを太陽の方角に向け、人物を撮影することに起因して、人物顔領域が暗く、背景領域である空が明るい画像となっている。即ち、人物顔領域と背景領域との明るさの差分値が得られれば、差分値を指標の1つとすることができる。一般的には、画差撮影画像データのヒストグラムを作図することにより差分値を得ることが知られている。   The “brightness ratio index that indicates the size of the dynamic range” is a quantitative measure of the difference in brightness between the main subject area and the background area due to the light source conditions at the time of shooting, such as a backlight scene or a flash shooting scene. It is the value shown in. For example, in a backlight scene, the photographer points the camera in the direction of the sun and photographs a person, so that the person face area is dark and the background area is a bright image. That is, if a difference value of brightness between the human face area and the background area is obtained, the difference value can be used as one of the indices. In general, it is known to obtain a difference value by drawing a histogram of image difference image data.

撮影画像データの「明るさ解析値」とは、画素値の分布状態を調べることで得られる、画像の平均的な明るさを示す数値である。「明るさ解析値」は、撮影画像データで最も重要な被写体(主要被写体)の明るさであることが望ましい。人物顔領域の探索は、色相・彩度・明度を用いた表色系における照合により行う。より高い精度を得るためには、目・鼻・口・顔の輪郭など、顔を構成するパーツを照合する所謂「顔検出」を用いることが好ましい。また、撮影時の露出設定に起因する露出撮影度(アンダー撮影、オーバー撮影)を表す露出指標を算出し、この露出指標を明るさ解析値として用いてもよい。更に、明るさ解析値の解析方法は、撮影画像データの解析に限定するものではなく、例えば、撮像装置の自動露出情報や自動露出情報の記録された付加情報を解析して得られた明るさであってもよい。   The “brightness analysis value” of the captured image data is a numerical value indicating the average brightness of the image obtained by examining the distribution state of the pixel values. The “brightness analysis value” is desirably the brightness of the most important subject (main subject) in the captured image data. The search for the human face area is performed by collation in the color system using hue, saturation, and brightness. In order to obtain higher accuracy, it is preferable to use so-called “face detection” in which parts constituting the face, such as the eyes, nose, mouth, and face contour, are collated. In addition, an exposure index representing the exposure shooting degree (under shooting or over shooting) resulting from the exposure setting at the time of shooting may be calculated, and this exposure index may be used as the brightness analysis value. Further, the analysis method of the brightness analysis value is not limited to the analysis of the captured image data. For example, the brightness obtained by analyzing the automatic exposure information of the imaging apparatus and the additional information recorded of the automatic exposure information. It may be.

「再現目標値」とは、例えば、撮影画像データの主要被写体である人物顔領域が、撮影画像データを出力する出力デバイスにおいて最適に再現されるために必要な明るさを示す数値である。即ち、撮影画像データの「明るさ解析値」が「再現目標値」に近似した値であれば、出力デバイスにおいて最適に再現される確率が高いことを意味する。   The “reproduction target value” is, for example, a numerical value indicating the brightness necessary for the human face area, which is the main subject of the captured image data, to be optimally reproduced by the output device that outputs the captured image data. In other words, if the “brightness analysis value” of the captured image data is a value that approximates the “reproduction target value”, it means that the probability that the output device is optimally reproduced is high.

「第1仮補正量」とは、「明るさ解析値」を「再現目標値」へと近似させるために必要な補正量を、一時的なものとして示した数値である。「第1仮補正量を設定する」とは、予め「明るさ解析値」と「第1仮補正量」、との関係を定義した1次元LUT(Look Up Table)などを作成しておき、この1次元LUTと「明るさ解析値」に基づき、「第1仮補正量」を決定することを意味する。更に、「複数の第1仮補正量を設定する」とは、「明るさ解析値」を条件違いで算出する方法、異なる「再現目標値」を設定する方法(複数の1次元LUTを定義しておくことと同一)の一方又は双方により、少なくとも2つの「第1仮補正量」を一時的に得ることである。   The “first provisional correction amount” is a numerical value that temporarily indicates the correction amount necessary to approximate the “brightness analysis value” to the “reproduction target value”. “Set the first temporary correction amount” is to create a one-dimensional LUT (Look Up Table) in which the relationship between the “brightness analysis value” and the “first temporary correction amount” is defined in advance. This means that the “first provisional correction amount” is determined based on the one-dimensional LUT and the “brightness analysis value”. Furthermore, “setting a plurality of first provisional correction amounts” means “calculating brightness analysis values” under different conditions, or setting different “reproduction target values” (defining a plurality of one-dimensional LUTs. Or at least two “first provisional correction amounts” temporarily.

本発明では、逆光シーンとストロボ撮影シーンにおける人物顔領域の明るさ補正を想定した、それぞれ2つの「第1仮補正量」設定用の1次元LUTを定義する。また、逆光シーンとストロボ撮影シーンの中間的なシーンでは、アンダーとオーバー撮影シーンにおける画像全体の明るさ補正を想定した、少なくとも1つの「第1仮補正量」設定用の1次元LUTを定義することが望ましい。   In the present invention, two one-dimensional LUTs for setting “first provisional correction amount” are defined, assuming brightness correction of a human face area in a backlight scene and a flash photography scene. In addition, in a scene intermediate between a backlight scene and a flash shooting scene, at least one one-dimensional LUT for setting the “first provisional correction amount” is defined assuming brightness correction of the entire image in the under and over shooting scenes. It is desirable.

本発明の効果を十分に発揮させるために、「第1仮補正量」設定用の1次元LUTの作成に際しては、明部及び暗部がつぶれたり、高彩度の色が飽和してつぶれたり、色相が変わるなどの現象が実際に発生する逆光シーンやストロボ撮影シーンを予め「学習用画像(「教師データ」とも云う)」として多数用意し、人物顔領域の明るさと、これらの現象の発生を観察しながら行うことが望ましい。   In order to sufficiently exhibit the effects of the present invention, when creating a one-dimensional LUT for setting the “first provisional correction amount”, bright and dark portions are crushed, high-saturated colors are saturated and hushed, Prepare a large number of backlight scenes and flash photography scenes that actually cause phenomena such as changes as “learning images” (also called “teacher data”), and observe the brightness of the human face area and the occurrence of these phenomena. It is desirable to do it.

「明るさの再現目標値」と「輝度比指標」に基づいて、「第1仮補正量を設定する」とは、撮影画像データのダイナミックレンジが、撮影画像データを出力する出力デバイスのダイナミックレンジ内に適切に収まるように、主要被写体の明るさに基づいて設定された明るさ補正量を弱め、輝度比指標に基づいて明るさ補正量を設定することを意味する。   Based on “brightness reproduction target value” and “brightness ratio index”, “setting the first temporary correction amount” means that the dynamic range of the captured image data is the dynamic range of the output device that outputs the captured image data. This means that the brightness correction amount set based on the brightness of the main subject is weakened and the brightness correction amount is set based on the luminance ratio index so as to be appropriately within the range.

自然光指標に基づいて「第1混合係数を設定する」とは、予め「自然光指標」と、各第1仮補正量に乗算する「第1混合係数」との関係を定義した1次元LUTなどを、第1仮補正量の数だけ作成しておき、この1次元LUTと「自然光指標」に基づき、各第1仮補正量に乗算する「第1混合係数」を決定することを意味する。なお、輝度比指標に基づいて、第1混合係数を調整するようにしてもよい。   “Set the first mixing coefficient” based on the natural light index is a one-dimensional LUT that defines the relationship between the “natural light index” and the “first mixing coefficient” by which each first temporary correction amount is multiplied in advance. This means that the number of first temporary correction amounts is created, and the “first mixing coefficient” to be multiplied by each first temporary correction amount is determined based on the one-dimensional LUT and the “natural light index”. Note that the first mixing coefficient may be adjusted based on the luminance ratio index.

例えば、自然光指標が、高い屋外撮影度の数値を示した場合、逆光シーンにおける人物顔領域の明るさ補正を想定した、「第1仮補正量」設定用の1次元LUT(入力:肌色平均輝度、出力:第1仮補正量)の「第1混合係数」が高くなるように、1次元LUTを定義する。   For example, when the natural light index shows a high outdoor photographing value, a one-dimensional LUT (input: flesh color average luminance) for setting the “first provisional correction amount” assuming brightness correction of a human face area in a backlight scene The one-dimensional LUT is defined so that the “first mixing coefficient” of (output: first provisional correction amount) becomes high.

一方、自然光指標が、低い屋外撮影度の数値を示した場合、ストロボ撮影シーンにおける人物顔領域の明るさ補正を想定した、「第1仮補正量」設定用の1次元LUT(入力:肌色平均輝度、出力:第1仮補正量)の「第1混合係数」が高くなるように、1次元LUTを定義する。   On the other hand, when the natural light index indicates a low outdoor photographing value, a one-dimensional LUT (input: flesh color average) for setting the “first provisional correction amount” assuming brightness correction of the human face area in the flash photography scene The one-dimensional LUT is defined so that the “first mixing coefficient” of luminance and output: first provisional correction amount becomes high.

また、自然光指標が、曖昧な屋外撮影度の数値を示した場合、アンダー撮影シーンとオーバー撮影シーンにおける画像全体の明るさ補正を想定した、「第1仮補正量」設定用の1次元LUT(入力:全体平均輝度又はアンダー・オーバー撮影指標、出力:第1仮補正量)の「第1混合係数」が高くなるように1次元LUTを定義する。   Further, when the natural light index indicates an ambiguous outdoor shooting degree value, a “first provisional correction amount” setting one-dimensional LUT (assuming brightness correction of the entire image in an under shooting scene and an over shooting scene) The one-dimensional LUT is defined so that the “first mixing coefficient” of input: overall average luminance or under-over shooting index, output: first temporary correction amount) becomes high.

撮影画像データが予め逆光画像とわかっている場合には、「輝度比指標」に基づき、明るさ補正量と補正カーブを修正することができ、撮影画像データの明部及び暗部がつぶれたり、高彩度の色が飽和してつぶれたり、色相が変化することが抑制される。しかしながら、逆光シーンとストロボ撮影シーンとでは、ダイナミックレンジの大きさが同程度であっても、明るさ補正の方向が全く逆であるため、人物顔領域を適正な明るさに補正する処理を自動化するには、逆光シーンかストロボ撮影シーンあるか否かを定量的に示した予測数値(自然光指標)に応じて、ダイナミックレンジの大きさを表す輝度比指標に基づく第1仮補正量の適用量を定義しなくてはならない。そこで、逆光シーンにおける人物顔領域の明るさ補正を想定した、「第1仮補正量」設定用の1次元LUT(入力:輝度比指標、出力:第1仮補正量)の「第1混合係数」が高くなるように、「自然光指標」と「第1混合係数」との関係を定義した1次元LUTを定義する。   If the captured image data is known as a backlight image in advance, the brightness correction amount and the correction curve can be corrected based on the “brightness ratio index”, and the bright and dark portions of the captured image data may be crushed, or the high saturation It is possible to prevent the color of the color from being saturated and crushed or the hue from changing. However, since the direction of brightness correction is completely opposite between backlight scenes and flash photography scenes even if the dynamic range is about the same, the process to correct the human face area to the appropriate brightness is automated. To apply the first provisional correction amount based on the luminance ratio index indicating the size of the dynamic range in accordance with a predicted numerical value (natural light index) that quantitatively indicates whether there is a backlight scene or a flash photography scene. Must be defined. Therefore, a “first mixture coefficient” of a one-dimensional LUT (input: luminance ratio index, output: first temporary correction amount) for setting “first temporary correction amount”, assuming brightness correction of a human face area in a backlight scene. ”Is defined so as to define a one-dimensional LUT that defines the relationship between the“ natural light index ”and the“ first mixing coefficient ”.

「第2仮補正量」は、第1仮補正量と第1混合係数に基づいて算出されるもので、式(1)のように定義される。式(1)において、第1仮補正量設定手段により設定される複数の第1仮補正量のうち、m個の第1仮補正量を計算対象とし、i番目の第1仮補正量をkey_auto[i]、第1仮補正量key_auto[i]に乗算する第1混合係数をwgt[i]としている。

Figure 2007081550
The “second provisional correction amount” is calculated based on the first provisional correction amount and the first mixing coefficient, and is defined as Expression (1). In Expression (1), among the plurality of first temporary correction amounts set by the first temporary correction amount setting means, m first temporary correction amounts are set as calculation targets, and the i-th first temporary correction amount is set as key_auto. [i], the first mixing coefficient to be multiplied by the first temporary correction amount key_auto [i] is wgt [i].
Figure 2007081550

「明るさ補正量と、自然光指標と、輝度比指標に基づいて、撮影画像データを変換するための補正カーブを生成する」とは、「自然光」を用いて撮影されたシーンであるか否かを定量的に示した予測数値(自然光指標)及びダイナミックレンジの大きさを表す輝度比指標に応じて、撮影画像データの主要被写体(例えば、人物顔領域)の明るさを適正に仕上げつつ、明るさ補正カーブの形状を変更することにより、明部及び暗部がつぶれたり、高彩度の色が飽和してつぶれたり、色相が変化することを抑制することである。   “Generate a correction curve for converting captured image data based on the brightness correction amount, the natural light index, and the luminance ratio index” is whether or not the scene was captured using “natural light”. The brightness of the main subject (for example, the human face area) of the captured image data is appropriately finished and brightened according to the predicted numerical value (natural light index) that quantitatively indicates and the luminance ratio index that indicates the size of the dynamic range. By changing the shape of the height correction curve, it is possible to prevent the bright part and the dark part from being crushed, the high-saturation color to be saturated and crushed, and the hue from being changed.

「自然光」を用いて撮影され、明るさ補正を要するシーンには逆光シーンが多く、明るさ補正量がマイナスで、明部のつぶれ、高彩度の空色が飽和してつぶれたり、シアンやグリーンなどへ色相が変わる確率が高い。一方、「自然光」を用いないで撮影された屋内撮影或いはストロボ撮影シーンには、明るさ補正量がプラスで、暗部がつぶれたり、高彩度の肌色が飽和してつぶれたり、イエローやレッドなどへ色相が変わる傾向にある。このような経験側を基に、明るさ補正カーブの形状を変更する。   Scenes that are shot using “natural light” and require brightness correction are often backlit scenes, with a negative brightness correction amount. There is a high probability that the hue will change. On the other hand, for indoor or strobe shooting scenes that were shot without using “natural light”, the brightness correction amount is positive, the dark areas are crushed, the high-saturated skin color is saturated, and the hue is changed to yellow or red. Tend to change. Based on such experience, the shape of the brightness correction curve is changed.

自然光指標が、高い屋外撮影度の数値を示した場合、逆光シーンにおける明部がつぶれたり、高彩度の空色が飽和してつぶれたりすることを想定した、ハイライト側の軟調カーブを定義する。一方、自然光指標が、低い屋外撮影度の数値を示した場合、ストロボ撮影シーンにおける暗部がつぶれたり、高彩度の肌色が飽和してつぶれたりすることを想定した、シャドー側の軟調カーブを定義する。   When the natural light index indicates a numerical value of a high outdoor shooting degree, a soft curve on the highlight side is defined on the assumption that the bright part in the backlight scene is crushed or the sky color of high saturation is saturated and crushed. On the other hand, when the natural light index indicates a numerical value of a low outdoor shooting degree, a shadow-side soft curve is defined on the assumption that a dark part in a flash shooting scene is crushed or a high-saturation skin color is saturated and crushed.

「所定の色相」とは、飽和してつぶれたり、シアンやグリーンなどへ色相が変わる確率が高い高彩度画素の色相であり、逆光シーンでは空色、屋内撮影或いはストロボ撮影シーンでは肌色である。「自然光指標に基づいて設定される所定の色相」とは、画素数をカウントする高彩度画素の色相を、自然光指標に基づき変更することである。   The “predetermined hue” is a hue of a high-saturation pixel that has a high probability of being saturated and crushed or changing to a hue such as cyan or green, and is a sky blue in a backlight scene, and a flesh color in an indoor shooting or strobe shooting scene. The “predetermined hue set based on the natural light index” is to change the hue of the high saturation pixel for counting the number of pixels based on the natural light index.

なお、明るさ補正量算出手段が、撮影画像データのタグ領域に記録された付加情報を解析し、その解析された付加情報を補助的に用いて新たな明るさ補正量を設定するようにしてもよい。   The brightness correction amount calculation means analyzes the additional information recorded in the tag area of the photographed image data, and sets a new brightness correction amount by using the analyzed additional information as a supplement. Also good.

本発明によれば、撮影画像データの主要被写体の明るさを補正しつつ、明部及び暗部のつぶれ、高彩度の色の飽和によるつぶれ、色相の変化を防止することが可能となる。   According to the present invention, while correcting the brightness of the main subject in the photographed image data, it is possible to prevent the bright part and the dark part from being crushed, the color saturation due to high saturation, and the hue from being changed.

以下、図面を参照して、本発明の実施形態1及び2を詳細に説明する。
[実施形態1]
まず、実施形態1及び2に共通する構成について説明する。
Hereinafter, Embodiments 1 and 2 of the present invention will be described in detail with reference to the drawings.
[Embodiment 1]
First, a configuration common to the first and second embodiments will be described.

図1に、本発明の実施形態1及び2に係る撮像装置100の主要部構成を示す。撮像装置100は、図1に示すように、レンズ1、絞り2、CCD(Charge Coupled Device)3、アナログ処理回路4、A/D変換器5、一時記憶メモリ6、画像処理部7、ヘッダ情報処理部8、記憶デバイス9、CCD駆動回路10、制御部11、操作部12、表示部13、ストロボ駆動回路14、ストロボ15、焦点距離調整回路16、自動焦点駆動回路17、モータ20により構成される。   FIG. 1 shows a main part configuration of an imaging apparatus 100 according to Embodiments 1 and 2 of the present invention. As shown in FIG. 1, the imaging apparatus 100 includes a lens 1, an aperture 2, a CCD (Charge Coupled Device) 3, an analog processing circuit 4, an A / D converter 5, a temporary storage memory 6, an image processing unit 7, and header information. The processing unit 8, the storage device 9, the CCD drive circuit 10, the control unit 11, the operation unit 12, the display unit 13, the strobe drive circuit 14, the strobe 15, the focal length adjustment circuit 16, the automatic focus drive circuit 17, and the motor 20. The

撮像装置100の光学系は、フォーカスの調節が可能なレンズ1と、光量を調節する絞り2と、被写体情報を電気信号に変換する固体撮像素子であるCCD3とを備えている。   The optical system of the imaging apparatus 100 includes a lens 1 that can adjust the focus, a diaphragm 2 that adjusts the amount of light, and a CCD 3 that is a solid-state imaging device that converts subject information into an electrical signal.

被写体情報は、レンズ1及び絞り2を介してCCD3の受光面に結像される。CCD3は、被写体情報をCCD3内のセンサ毎に光の入射光量に応じた量の電気的な信号へと光電変換する。制御部11から入力される制御信号に基づいて、CCD駆動回路10からタイミングパルスが出力され、このタイミングパルスによってCCD3に蓄積された電気的な信号(撮像信号)が順次出力されてアナログ処理回路4に転送される。   The subject information is imaged on the light receiving surface of the CCD 3 through the lens 1 and the diaphragm 2. The CCD 3 photoelectrically converts subject information into an electrical signal of an amount corresponding to the amount of incident light for each sensor in the CCD 3. A timing pulse is output from the CCD drive circuit 10 based on a control signal input from the control unit 11, and an electrical signal (imaging signal) accumulated in the CCD 3 is sequentially output by this timing pulse, and the analog processing circuit 4. Forwarded to

アナログ処理回路4は、アナログの撮像信号の増幅やノイズの低減処理を行う。A/D変換器5は、アナログ処理回路4から入力されたアナログの撮像信号をデジタルの撮像信号(R、G、B信号)に変換する。A/D変換器5から出力されたデジタルのR、G、B信号は一旦、一時記憶メモリ6に保存される。以下、デジタルの撮像信号を「撮影画像データ」と呼ぶ。   The analog processing circuit 4 performs analog image pickup signal amplification and noise reduction processing. The A / D converter 5 converts the analog imaging signal input from the analog processing circuit 4 into a digital imaging signal (R, G, B signal). The digital R, G, B signals output from the A / D converter 5 are temporarily stored in the temporary storage memory 6. Hereinafter, the digital imaging signal is referred to as “photographed image data”.

画像処理部7は、表示部13での表示、記憶デバイス9の記録メディアへの保存に用いる撮影画像データの明るさ補正、分光感度のクロストーク補正、ノイズ抑制、鮮鋭化、ホワイトバランス調整、彩度調整等の画質向上処理の他、画像サイズの変更、トリミング、アスペクト変換等の処理を行う。画像処理部7における処理は、操作部12からの操作情報に応じてON/OFF或いは適応量等の設定が切り替えられるようになっている。例えば、操作部12から、明るさ補正を指定する操作情報が入力されると、画像処理部7は、撮影画像データの明るさを補正する明るさ補正処理(図16、図30参照)を開始する。画像処理部7による明るさ補正に係る内部構成については、後に図2を参照して説明する。   The image processing unit 7 performs display on the display unit 13, brightness correction of captured image data used for storage in the recording medium of the storage device 9, spectral sensitivity crosstalk correction, noise suppression, sharpening, white balance adjustment, and coloring. In addition to image quality improvement processing such as degree adjustment, processing such as image size change, trimming, and aspect conversion is performed. In the processing in the image processing unit 7, settings such as ON / OFF or an adaptive amount are switched according to operation information from the operation unit 12. For example, when operation information specifying brightness correction is input from the operation unit 12, the image processing unit 7 starts brightness correction processing (see FIGS. 16 and 30) for correcting the brightness of captured image data. To do. The internal configuration relating to the brightness correction by the image processing unit 7 will be described later with reference to FIG.

ヘッダ情報処理部8は、画像処理部7によって生成された撮影情報データのヘッダ情報の書き込み処理を行う。ヘッダ情報の書き込み処理が行われたR、G、B信号は、画像データとして記憶デバイス9により記録メディアに保存される。記憶デバイス9は、撮影画像画像データや、撮像装置100の制御プログラムを記憶する。   The header information processing unit 8 performs a writing process of header information of the shooting information data generated by the image processing unit 7. The R, G, and B signals that have undergone the header information writing process are stored as image data in a recording medium by the storage device 9. The storage device 9 stores captured image image data and a control program for the imaging apparatus 100.

制御部11は、CPU(Central Processing Unit)等により構成され、レンズ1の焦点距離とフォーカス(ピント)を調節するモータ20の制御を行う自動焦点駆動回路17、焦点距離調整回路16、CCD駆動回路10、アナログ処理回路4、一時記憶メモリ6、画像処理部7、表示部13、ストロボ15を駆動するストロボ駆動回路14の制御を行う。   The control unit 11 is configured by a CPU (Central Processing Unit) or the like, and performs an automatic focus driving circuit 17, a focal length adjusting circuit 16, and a CCD driving circuit for controlling the motor 20 that adjusts the focal length and focus (focus) of the lens 1. 10, the analog processing circuit 4, the temporary storage memory 6, the image processing unit 7, the display unit 13, and the strobe driving circuit 14 that drives the strobe 15 are controlled.

操作部12は、図示しないボタン、カーソルキー等を備え、ユーザによる操作部12の操作情報を制御部11に出力する。表示部13は、撮影画像データを液晶ディスプレイに表示するとともに、撮影に関する設定や条件を表示する。   The operation unit 12 includes buttons, cursor keys, and the like (not shown), and outputs operation information of the operation unit 12 by the user to the control unit 11. The display unit 13 displays captured image data on a liquid crystal display and displays settings and conditions related to shooting.

図2に、画像処理部7の内部構成を示す。画像処理部7は、図2に示すように、前処理部70、明るさ補正部71、画質補正部72により構成される。   FIG. 2 shows an internal configuration of the image processing unit 7. As illustrated in FIG. 2, the image processing unit 7 includes a preprocessing unit 70, a brightness correction unit 71, and an image quality correction unit 72.

前処理部70は、一時記憶メモリ6から入力された撮影画像データに対し、分光感度のクロストーク補正、暗電流ノイズ抑制、仮のホワイトバランス調整を施し、明るさ補正部71及び画質補正部72に出力する。   The preprocessing unit 70 performs spectral sensitivity crosstalk correction, dark current noise suppression, and temporary white balance adjustment on the captured image data input from the temporary storage memory 6, and the brightness correction unit 71 and the image quality correction unit 72. Output to.

明るさ補正部71は、画像解析部73、指標算出部74、明るさ補正量算出部75、明るさ補正カーブ生成部76により構成される。   The brightness correction unit 71 includes an image analysis unit 73, an index calculation unit 74, a brightness correction amount calculation unit 75, and a brightness correction curve generation unit 76.

画像解析部73は、撮影画像データの明るさ解析値を算出する。明るさ解析値とは、撮影画像データの画素値の分布状態を調べることで得られる、撮影画像データの平均的な明るさを示す数値であり、撮影画像データで最も重要な被写体(主要被写体)の明るさであることが好ましい。明るさ解析値としては、例えば、撮影画像データ全体の輝度値の平均値(以下、「全体平均輝度」という。)、撮影画像データの肌色領域における平均輝度値(以下、「肌色平均輝度」という。)、撮影時の露出設定に起因する露出撮影度(アンダー、オーバー)を表す露出指標(後述の指標6)等がある。   The image analysis unit 73 calculates a brightness analysis value of the captured image data. The brightness analysis value is a numerical value indicating the average brightness of the photographed image data obtained by examining the distribution state of the pixel values of the photographed image data, and the most important subject (main subject) in the photographed image data. It is preferable that the brightness is. As the brightness analysis value, for example, an average value of luminance values of the entire captured image data (hereinafter referred to as “total average luminance”), an average luminance value in the skin color area of the captured image data (hereinafter referred to as “skin color average luminance”). )), And an exposure index (index 6 described later) indicating the exposure shooting degree (under, over) due to the exposure setting at the time of shooting.

指標算出部74は、撮影画像データの自然光による屋外撮影度を表す自然光指標(後述の指標4)と、撮影画像データのダイナミックレンジの大きさを表す輝度比指標(後述の指標5)と、撮影時の露出設定に起因する露出撮影度(アンダー、オーバー)を表す露出指標(後述の指標6)を算出する。指標算出部74で実行される指標算出処理については、後に図18〜図28を参照して詳細に説明する。   The index calculation unit 74 includes a natural light index (indicator 4 described later) that represents the degree of outdoor photographing using natural light in the captured image data, a luminance ratio index (indicator 5 that will be described later) that represents the dynamic range of the captured image data, An exposure index (index 6 to be described later) representing the exposure shooting degree (under and over) due to the exposure setting at the time is calculated. The index calculation process executed by the index calculation unit 74 will be described in detail later with reference to FIGS.

明るさ補正量算出部75は、画像解析部73で算出された明るさ解析値と、指標算出部74の算出結果に基づいて、撮影画像データの明るさ補正量を算出する。明るさ補正量算出部75の内部構成については、後に図3(実施形態1)、図29(実施形態2)を参照して詳細に説明する。   The brightness correction amount calculation unit 75 calculates the brightness correction amount of the captured image data based on the brightness analysis value calculated by the image analysis unit 73 and the calculation result of the index calculation unit 74. The internal configuration of the brightness correction amount calculation unit 75 will be described in detail later with reference to FIG. 3 (Embodiment 1) and FIG. 29 (Embodiment 2).

明るさ補正カーブ生成部76は、明るさ補正量算出部75で算出された明るさ補正量に基づいて、撮影画像データを変換するための明るさ補正カーブを生成する。   The brightness correction curve generation unit 76 generates a brightness correction curve for converting photographed image data based on the brightness correction amount calculated by the brightness correction amount calculation unit 75.

画質補正部72は、明るさ補正カーブ生成部76で生成された明るさ補正カーブに従って、前処理部70から入力された撮影画像データの明るさを補正する。明るさが補正された撮影画像データは、ヘッダ情報処理部8及び表示部13に出力される。   The image quality correction unit 72 corrects the brightness of the captured image data input from the preprocessing unit 70 in accordance with the brightness correction curve generated by the brightness correction curve generation unit 76. The captured image data whose brightness has been corrected is output to the header information processing unit 8 and the display unit 13.

図3に、実施形態1の明るさ補正量算出部75の内部構成を示す。明るさ補正量算出部75は、第1仮補正量設定部101、第1混合係数設定部102、第2仮補正量演算部103、第2混合係数設定部104、明るさ補正量演算部105により構成される。   FIG. 3 shows an internal configuration of the brightness correction amount calculation unit 75 of the first embodiment. The brightness correction amount calculation unit 75 includes a first temporary correction amount setting unit 101, a first mixing coefficient setting unit 102, a second temporary correction amount calculation unit 103, a second mixing coefficient setting unit 104, and a brightness correction amount calculation unit 105. Consists of.

第1仮補正量設定部101は、撮影画像データの明るさ解析値と、明るさの再現目標値と、指標算出部74で算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する第1仮補正量を設定する。画像解析部73からn個の明るさ解析値が入力された場合、仮補正量設定部101は、各明るさ解析値を再現目標値へと近似するために必要な補正量としての第1仮補正量をn+4個設定する。   The first provisional correction amount setting unit 101 uses the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation unit 74 to determine the captured image data. A first temporary correction amount for is set. When n brightness analysis values are input from the image analysis unit 73, the temporary correction amount setting unit 101 uses a first temporary amount as a correction amount necessary to approximate each brightness analysis value to the reproduction target value. Set n + 4 correction amounts.

図4に、輝度比指標と第1仮補正量key_auto[0]との関係を定義した1次元LUT(Look Up Table)を示し、図5に、露出指標と第1仮補正量key_auto[1]との関係を定義した1次元LUTを示し、図6に、肌色平均輝度と第1仮補正量key_auto[2]との関係を定義した1次元LUTを示し、図7に、肌色平均輝度又は全体平均輝度と第1仮補正量key_auto[3]との関係を定義した1次元LUTを示し、図8に、輝度比指標と第1仮補正量key_auto[4]との関係を定義した1次元LUTを示し、図9に、露出指標と第1仮補正量key_auto[5]との関係を定義した1次元LUTを示す。   FIG. 4 shows a one-dimensional LUT (Look Up Table) that defines the relationship between the luminance ratio index and the first temporary correction amount key_auto [0], and FIG. 5 shows the exposure index and the first temporary correction amount key_auto [1]. FIG. 6 shows a one-dimensional LUT that defines the relationship between the flesh color average luminance and the first temporary correction amount key_auto [2], and FIG. 7 shows the flesh color average luminance or the entire luminance. A one-dimensional LUT defining the relationship between the average luminance and the first temporary correction amount key_auto [3] is shown. FIG. 8 shows a one-dimensional LUT defining the relationship between the luminance ratio index and the first temporary correction amount key_auto [4]. FIG. 9 shows a one-dimensional LUT that defines the relationship between the exposure index and the first temporary correction amount key_auto [5].

実施形態1及び2では、画像解析部73で算出される明るさ解析値が、肌色平均輝度及び全体平均輝度(即ち、n=2)であるため、第1仮補正量設定部101では、図4〜図9に示した1次元LUTを用いて、第1仮補正量として6個の仮補正量(key_auto[0]〜[5])が設定される。   In the first and second embodiments, the brightness analysis values calculated by the image analysis unit 73 are the skin color average luminance and the overall average luminance (that is, n = 2). Using the one-dimensional LUT shown in FIGS. 4 to 9, six temporary correction amounts (key_auto [0] to [5]) are set as the first temporary correction amounts.

第1混合係数設定部102は、指標算出部74で算出された自然光指標に基づいて、仮補正量設定部101で設定されたn+4個の第1仮補正量のうちのn+2個(key_auto[0]〜[3])に乗算する重み係数としての第1混合係数をn+2個設定する。図10〜図13に、自然光指標と第1混合係数wgt[0]〜wgt[3]との関係を定義した1次元LUTを示す。   The first mixing coefficient setting unit 102, based on the natural light index calculated by the index calculation unit 74, out of n + 2 first temporary correction amounts set by the temporary correction amount setting unit 101 (key_auto [0 ] To [3]) are set to n + 2 first mixing coefficients as weighting coefficients to be multiplied. 10 to 13 show one-dimensional LUTs that define the relationship between the natural light index and the first mixing coefficients wgt [0] to wgt [3].

なお、図4〜図9の1次元LUTと、図10〜図13の1次元LUTは、撮像装置100の図示しないメモリに格納されている。   4 to 9 and the one-dimensional LUTs of FIGS. 10 to 13 are stored in a memory (not shown) of the imaging apparatus 100.

第2仮補正量演算部103は、n+2個の第1仮補正量(key_auto[0]〜[3])と、第1混合係数設定部102で設定されたn+2個の第1混合係数wgt[0]〜wgt[3]に基づいて、撮影画像データに対する第2仮補正量を設定する。式(2)に、第2仮補正量の算出式を示す。
第2仮補正量=key_auto[0]×wgt[0]+key_auto[1]×wgt[1]+key_auto[2]×wgt[2]+key_auto[3]×wgt[3] …(2)
以後、式(2)の第2仮補正量をkey_auto[6]と表記する。
The second temporary correction amount calculation unit 103 includes n + 2 first temporary correction amounts (key_auto [0] to [3]) and n + 2 first mixing coefficients wgt [set by the first mixing coefficient setting unit 102. Based on 0] to wgt [3], the second temporary correction amount for the captured image data is set. Formula (2) shows the formula for calculating the second temporary correction amount.
Second temporary correction amount = key_auto [0] × wgt [0] + key_auto [1] × wgt [1] + key_auto [2] × wgt [2] + key_auto [3] × wgt [3] (2)
Henceforth, the 2nd temporary correction amount of Formula (2) is described with key_auto [6].

第2混合係数設定部104は、指標算出部74で算出された自然光指標、輝度比指標、露出指標の値から、判別マップを用いて撮影画像データのシーンタイプを判別し、2個の第1仮補正量key_auto[4]、key_auto[5]と、第2仮補正量key_auto[6]の各々に乗算する重み係数として3個の第2混合係数wgt[4]〜[6]を設定する。   The second mixing coefficient setting unit 104 discriminates the scene type of the captured image data from the values of the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation unit 74, using the discrimination map, and the two first Three second mixing coefficients wgt [4] to [6] are set as weight coefficients to be multiplied to the temporary correction amounts key_auto [4] and key_auto [5] and the second temporary correction amount key_auto [6].

図14(a)に、自然光指標及び輝度比指標に基づいて撮影画像データのシーンタイプ(順光、逆光、ストロボ、アンダー、低確度領域)を判別するための判別マップを示し、図14(b)に自然光指標及び露出指標に基づいて撮影画像データのシーンタイプ(順光、逆光、ストロボ、アンダー、低確度領域)を判別するための判別マップを示す。図14において、低確度領域とは、順光、逆光、ストロボ、アンダーと判別される確度が(所定値より)低い領域を表している。   FIG. 14A shows a discrimination map for discriminating the scene type (forward light, backlight, strobe, under, low accuracy region) of the captured image data based on the natural light index and the luminance ratio index. ) Shows a discrimination map for discriminating the scene type (forward light, backlight, strobe, under, low accuracy region) of the captured image data based on the natural light index and the exposure index. In FIG. 14, the low accuracy region represents a region where the accuracy determined as follow light, backlight, strobe, or under is low (lower than a predetermined value).

図15は、シーンタイプ別に第2混合係数wgt[4]〜[6]の値を表す係数算出テーブルを示している。この係数算出テーブルは、撮像装置100の図示しないメモリに格納されている。図15において、シーンタイプ項目に示された各数字は、図14の各シーンタイプに付与された数字である。例えば、図15において、シーンタイプ項目の“3”は、図14(a)の低確度領域(3)を表す。   FIG. 15 shows a coefficient calculation table representing the values of the second mixing coefficients wgt [4] to [6] for each scene type. This coefficient calculation table is stored in a memory (not shown) of the imaging apparatus 100. In FIG. 15, each number shown in the scene type item is a number assigned to each scene type in FIG. For example, in FIG. 15, “3” of the scene type item represents the low accuracy region (3) in FIG.

明るさ補正量演算部105は、2個の第1仮補正量key_auto[4]、key_auto[5]と、第2仮補正量key_auto[6]と、第2混合係数設定部104で設定された3個の第2混合係数wgt[4]〜[6]に基づいて、式(3)に示すように明るさ補正量を算出する。
明るさ補正量
=key_auto[4]×wgt[4]+key_auto[5]×wgt[5]+key_auto[6]×wgt[6] …(3)
The brightness correction amount calculation unit 105 is set by the two first temporary correction amounts key_auto [4] and key_auto [5], the second temporary correction amount key_auto [6], and the second mixing coefficient setting unit 104 Based on the three second mixing coefficients wgt [4] to [6], the brightness correction amount is calculated as shown in Expression (3).
Brightness correction amount = key_auto [4] × wgt [4] + key_auto [5] × wgt [5] + key_auto [6] × wgt [6] (3)

次に、実施形態1における動作について説明する。
図16のフローチャートを参照して、実施形態1の画像処理部7において実行される明るさ補正処理について説明する。
Next, the operation in the first embodiment will be described.
With reference to the flowchart of FIG. 16, the brightness correction process performed in the image processing unit 7 of the first embodiment will be described.

まず、指標算出部74において、自然光指標、輝度比指標、露出指標を算出する指標算出処理が行われる(ステップT1)。ステップT1の指標算出処理については、後に図18〜図28を参照して詳細に説明する。   First, the index calculation unit 74 performs an index calculation process for calculating a natural light index, a luminance ratio index, and an exposure index (step T1). The index calculation process in step T1 will be described in detail later with reference to FIGS.

指標算出処理が終了すると、画像解析部73において、撮影画像データの明るさ解析値がn個算出される(ステップT2)。ステップT2では、2個の明るさ解析値(肌色平均輝度、全体平均輝度)が算出される。次いで、図4〜図9の1次元LUTから、ステップT2で算出された明るさ解析値と、ステップT1の指標算出処理で算出された自然光指標、輝度比指標、露出指標に対応する値を抽出することにより、n+4個(6個)の第1仮補正量key_auto[0]〜[5]が設定される(ステップT3)。   When the index calculation process ends, the image analysis unit 73 calculates n brightness analysis values of the captured image data (step T2). In step T2, two brightness analysis values (skin color average brightness, overall average brightness) are calculated. Next, the brightness analysis value calculated in step T2 and the values corresponding to the natural light index, the luminance ratio index, and the exposure index calculated in the index calculation process in step T1 are extracted from the one-dimensional LUT of FIGS. As a result, n + 4 (six) first temporary correction amounts key_auto [0] to [5] are set (step T3).

次いで、図10〜図13の1次元LUTから、ステップT1で算出された自然光指標に対応する値を抽出することにより、n+2個(4個)の第1混合係数wgt[0]〜[3]が設定される(ステップT4)。次いで、4個の第1仮補正量key_auto[0]〜[3]と、4個の第1混合係数wgt[0]〜[3]を用いて、式(2)より第2仮補正量key_auto[6]が算出される(ステップT5)。   Next, n + 2 (four) first mixing coefficients wgt [0] to [3] are extracted from the one-dimensional LUTs of FIGS. 10 to 13 by extracting values corresponding to the natural light index calculated in step T1. Is set (step T4). Next, using the four first temporary correction amounts key_auto [0] to [3] and the four first mixing coefficients wgt [0] to [3], the second temporary correction amount key_auto is obtained from Equation (2). [6] is calculated (step T5).

次いで、係数算出テーブル(図15)から、判別マップ(図14)を用いて判別されたシーンタイプに対応する3個の第2混合係数wgt[4]〜[6]が抽出され、設定される(ステップT6)。次いで、2個の第1仮補正量key_auto[4]、key_auto[5]と、第2仮補正量key_auto[6]と、3個の第2混合係数wgt[4]〜[6]を用いて、式(3)により明るさ補正量が算出され(ステップT7)、その算出された明るさ補正量と、ステップT1で算出された各指標に基づいて判別されたシーンタイプから、撮影画像データを変換するための明るさ補正カーブが生成される(ステップT8)。   Next, three second mixing coefficients wgt [4] to [6] corresponding to the scene type determined using the determination map (FIG. 14) are extracted from the coefficient calculation table (FIG. 15) and set. (Step T6). Next, using the two first temporary correction amounts key_auto [4] and key_auto [5], the second temporary correction amount key_auto [6], and the three second mixing coefficients wgt [4] to [6] Then, the brightness correction amount is calculated by the equation (3) (step T7), and the captured image data is obtained from the calculated brightness correction amount and the scene type determined based on each index calculated in step T1. A brightness correction curve for conversion is generated (step T8).

図17(a)に、シーンタイプが順光である場合の明るさ補正カーブを明るさ補正量別に示し、図17(b)に、シーンタイプが逆光である場合の明るさ補正カーブを明るさ補正量別に示す。図17では、操作部12によって操作される補正ボタン数の実用域(−6、−4、−2、0ボタン)における明るさ補正カーブを示している。ステップT8では、予めシーンタイプ毎に設定された複数の明るさ補正カーブの中から、ステップT7で算出された明るさ補正量に対応する明るさ補正カーブが選択される。   FIG. 17A shows a brightness correction curve when the scene type is normal light according to the brightness correction amount, and FIG. 17B shows a brightness correction curve when the scene type is backlight. Shown by correction amount. FIG. 17 shows a brightness correction curve in a practical range (−6, −4, −2, 0 buttons) of the number of correction buttons operated by the operation unit 12. In step T8, a brightness correction curve corresponding to the brightness correction amount calculated in step T7 is selected from a plurality of brightness correction curves set in advance for each scene type.

明るさ補正カーブが生成されると、その明るさ補正カーブに従って、撮影画像データの明るさが補正され(ステップT9)、本明るさ補正処理が終了する。このように明るさが補正された撮影画像データは、指定された出力先に出力される。出力先としては、表示部13や、撮像装置100に接続されたプリンタ等がある。   When the brightness correction curve is generated, the brightness of the captured image data is corrected according to the brightness correction curve (step T9), and the brightness correction process is terminated. The captured image data whose brightness has been corrected in this way is output to a designated output destination. Examples of the output destination include the display unit 13 and a printer connected to the imaging apparatus 100.

<指標算出処理>
以下、図18のフローチャートを参照して、ステップT1の指標算出処理について説明する。
<Indicator calculation process>
Hereinafter, the index calculation process in step T1 will be described with reference to the flowchart of FIG.

まず、撮影画像データが所定の画像領域に分割され、各分割領域が撮影画像データ全体に占める割合を示す占有率(第1の占有率、第2の占有率)を算出する占有率算出処理が行われる(ステップS1)。占有率算出処理の詳細は、後に図19、図25を参照して説明する。   First, an occupancy ratio calculation process is performed in which the captured image data is divided into predetermined image areas, and an occupancy ratio (first occupancy ratio, second occupancy ratio) indicating the ratio of each divided area to the entire captured image data is calculated. Performed (step S1). Details of the occupation ratio calculation process will be described later with reference to FIGS.

次いで、撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出処理が行われる(ステップS2)。ステップS2の偏倚量算出処理については、後に図28を参照して詳細に説明する。   Next, a bias amount calculation process for calculating a bias amount indicating a bias of the gradation distribution of the photographed image data is performed (step S2). The bias amount calculation process in step S2 will be described later in detail with reference to FIG.

次いで、ステップS1で算出された占有率と、撮影条件(シーンタイプ等)に応じて予め設定された係数に基づいて、撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標が算出され(ステップS3)、本指標算出処理が終了する。ステップS3における指標の算出方法は、後に詳細に説明する。   Next, based on the occupation ratio calculated in step S1 and a coefficient set in advance according to the shooting condition (scene type or the like), a natural light index representing the degree of outdoor shooting with natural light of the shot image data, and the shot image data The brightness ratio index representing the size of the dynamic range and the exposure index representing the exposure shooting degree resulting from the exposure setting at the time of shooting are calculated (step S3), and this index calculation process is completed. The index calculation method in step S3 will be described in detail later.

次に、図19のフローチャートを参照して、第1の占有率算出処理について詳細に説明する。   Next, the first occupancy rate calculation process will be described in detail with reference to the flowchart of FIG.

まず、撮影画像データのRGB値がHSV表色系に変換される(ステップS10)。図20は、RGBからHSV表色系に変換することにより色相値、彩度値、明度値を得る変換プログラム(HSV変換プログラム)の一例を、プログラムコード(c言語)により示したものである。図20に示すHSV変換プログラムでは、入力画像データであるデジタル画像データの値を、InR、InG、InBと定義し、算出された色相値をOutHとし、スケールを0〜360と定義し、彩度値をOutS、明度値をOutVとし、単位を0〜255と定義している。   First, the RGB values of the photographed image data are converted into the HSV color system (step S10). FIG. 20 shows an example of a conversion program (HSV conversion program) that obtains a hue value, a saturation value, and a lightness value by converting from RGB to the HSV color system using program code (c language). In the HSV conversion program shown in FIG. 20, the values of digital image data as input image data are defined as InR, InG, and InB, the calculated hue value is defined as OutH, the scale is defined as 0 to 360, and the saturation The value is OutS, the brightness value is OutV, and the unit is defined as 0 to 255.

次いで、撮影画像データが、所定の明度と色相の組み合わせからなる領域に分割され、分割領域毎に累積画素数を算出することにより2次元ヒストグラムが作成される(ステップS11)。以下、撮影画像データの領域分割について詳細に説明する。   Next, the photographed image data is divided into regions composed of combinations of predetermined brightness and hue, and a two-dimensional histogram is created by calculating the cumulative number of pixels for each divided region (step S11). Hereinafter, the area division of the captured image data will be described in detail.

明度(V)は、明度値が0〜25(v1)、26-50(v2)、51〜84(v3)、85〜169(v4)、170〜199(v5)、200〜224(v6)、225〜255(v7)の7つの領域に分割される。色相(H)は、色相値が0〜39、330〜359の肌色色相領域(H1及びH2)、色相値が40〜160の緑色色相領域(H3)、色相値が161〜250の青色色相領域(H4)、赤色色相領域(H5)の4つの領域に分割される。なお、赤色色相領域(H5)は、シーンタイプ(図14参照)の判別への寄与が少ないとの知見から、以下の計算では用いていない。肌色色相領域は、更に、肌色領域(H1)と、それ以外の領域(H2)に分割される。以下、肌色色相領域(H=0〜39、330〜359)のうち、下記の式(4)を満たす色相’(H)を肌色領域(H1)とし、式(4)を満たさない領域を(H2)とする。
10 < 彩度(S) <175、
色相'(H) = 色相(H) + 60 (0 ≦ 色相(H) < 300のとき)、
色相'(H) = 色相(H) - 300 (300 ≦ 色相(H) < 360のとき)、
輝度(Y) = InR × 0.30 + InG × 0.59 + InB × 0.11 …(A)
として、
色相’(H)/輝度(Y) < 3.0 ×(彩度(S)/255)+0.7 …(4)
従って、撮影画像データの分割領域の数は4×7=28個となる。なお、式(4)において明度(V)を用いることも可能である。
The lightness value (V) is 0-25 (v1), 26-50 (v2), 51-84 (v3), 85-169 (v4), 170-199 (v5), 200-224 (v6) , 225 to 255 (v7). Hue (H) is a skin hue hue area (H1 and H2) with a hue value of 0 to 39, 330 to 359, a green hue area (H3) with a hue value of 40 to 160, and a blue hue area with 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 based on the knowledge that the contribution to the determination of the scene type (see FIG. 14) is small. The flesh-color hue area is further divided into a flesh-color area (H1) and other areas (H2). Hereinafter, among the flesh-colored hue areas (H = 0 to 39, 330 to 359), the hue '(H) that satisfies the following formula (4) is defined as the flesh-colored area (H1), and the area that does not satisfy the formula (4) is ( H2).
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) = InR x 0.30 + InG x 0.59 + InB x 0.11 (A)
As
Hue '(H) / Luminance (Y) <3.0 × (Saturation (S) / 255) +0.7 (4)
Therefore, the number of divided areas of the captured image data is 4 × 7 = 28. In addition, it is also possible to use the brightness (V) in the formula (4).

2次元ヒストグラムが作成されると、分割領域毎に算出された累積画素数の全画素数(撮影画像全体)に占める割合を示す第1の占有率が算出され(ステップS12)、本占有率算出処理が終了する。明度領域vi、色相領域Hjの組み合わせからなる分割領域において算出された第1の占有率をRijとすると、各分割領域における第1の占有率は表1のように表される。

Figure 2007081550
When the two-dimensional histogram is created, a first occupancy ratio indicating the ratio of the cumulative number of pixels calculated for each divided region to the total number of pixels (the entire captured image) is calculated (step S12), and the main occupancy ratio calculation is performed. The process ends. Assuming that the first occupancy ratio calculated in the divided area composed of the combination of the lightness area vi and the hue area Hj is Rij, the first occupancy ratio in each divided area is expressed as shown in Table 1.
Figure 2007081550

次に、指標1及び指標2の算出方法について説明する。
表2に、ストロボ撮影としての確度、即ち、ストロボ撮影時の顔領域の明度状態を定量的に示す指標1を算出するために必要な第1の係数を分割領域別に示す。表2に示された各分割領域の係数は、表1に示した各分割領域の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。

Figure 2007081550
Next, a method for calculating the index 1 and the index 2 will be described.
Table 2 shows the first coefficient required for calculating the index 1 that quantitatively indicates the accuracy of strobe shooting, that is, the lightness state of the face area at the time of strobe shooting, for each divided region. The coefficient of each divided area shown in Table 2 is a weighting coefficient by which the first occupancy rate Rij of each divided area shown in Table 1 is multiplied, and is set in advance according to the shooting conditions.
Figure 2007081550

図21に、明度(v)−色相(H)平面を示す。表2によると、図21において高明度の肌色色相領域に分布する領域(r1)から算出される第1の占有率には、正(+)の係数が用いられ、それ以外の色相である青色色相領域(r2)から算出される第1の占有率には、負(-)の係数が用いられる。図23は、肌色領域(H1)における第1の係数と、その他の領域(緑色色相領域(H3))における第1の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表2及び図23によると、高明度(V=170〜224)の領域では、肌色領域(H1)における第1の係数の符号は正(+)であり、その他の領域(例えば、緑色色相領域(H3))における第1の係数の符号は負(-)であり、両者の符号が異なっていることがわかる。   FIG. 21 shows a lightness (v) -hue (H) plane. According to Table 2, a positive (+) coefficient is used for the first occupancy calculated from the region (r1) distributed in the skin color hue region of high brightness in FIG. 21, and blue other than that is blue. A negative (−) coefficient is used for the first occupancy calculated from the hue region (r2). FIG. 23 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 2 and FIG. 23, in the region of high brightness (V = 170 to 224), the sign of the first coefficient in the skin color region (H1) is positive (+), and other regions (for example, the green hue region) The sign of the first coefficient in (H3)) is negative (-), and it can be seen that the signs of the two are different.

明度領域vi、色相領域Hjにおける第1の係数をCijとすると、指標1を算出するためのHk領域の和は、式(5)のように定義される。

Figure 2007081550
従って、H1〜H4領域の和は、下記の式(5-1)〜式(5-4)のように表される。
H1領域の和=R11×(-44.0)+R21×(-16.0)+(中略)...+R71×(-11.3) …(5-1);
H2領域の和=R12×0.0+R22×8.6+(中略)... +R72×(-11.1) …(5-2);
H3領域の和=R13×0.0+R23×(-6.3)+(中略)...+R73×(-10.0) …(5-3);
H4領域の和=R14×0.0+R24×(-1.8)+(中略)...+R74×(-14.6) …(5-4). 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 (5).
Figure 2007081550
Therefore, the sum of the H1 to H4 regions is expressed by the following formulas (5-1) to (5-4).
H1 region sum = R11 x (-44.0) + R21 x (-16.0) + (omitted) ... + R71 x (-11.3) ... (5-1);
Sum of H2 area = R12 x 0.0 + R22 x 8.6 + (omitted) ... + R72 x (-11.1) ... (5-2);
H3 area sum = R13 x 0.0 + R23 x (-6.3) + (omitted) ... + R73 x (-10.0) ... (5-3);
Sum of H4 region = R14 x 0.0 + R24 x (-1.8) + (omitted) ... + R74 x (-14.6) ... (5-4).

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

表3に、逆光撮影としての確度、即ち、逆光撮影時の顔領域の明度状態を定量的に示す指標2を算出するために必要な第2の係数を分割領域別に示す。表3に示された各分割領域の係数は、表1に示した各分割領域の第1の占有率Rijに乗算する重み係数であり、撮影条件に応じて予め設定されている。

Figure 2007081550
Table 3 shows, for each divided region, the second coefficient necessary for calculating the index 2 that quantitatively indicates the accuracy as backlight photographing, that is, the brightness state of the face region at the time of backlight photographing. The coefficient of each divided area shown in Table 3 is a weighting coefficient by which the first occupancy rate Rij of each divided area shown in Table 1 is multiplied, and is set in advance according to the shooting conditions.
Figure 2007081550

図22に、明度(v)−色相(H)平面を示す。表3によると、図22において肌色色相領域の中間明度に分布する領域(r4)から算出される占有率には負(-)の係数が用いられ、肌色色相領域の低明度(シャドー)領域(r3)から算出される占有率には正(+)の係数が用いられる。図24は、肌色領域(H1)における第2の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。表3及び図24によると、肌色色相領域の、明度値が85〜169(v4)の中間明度領域の第2の係数の符号は負(-)であり、明度値が26〜84(v2,v3)の低明度(シャドー)領域の第2の係数の符号は正(+)であり、両領域での係数の符号が異なっていることがわかる。   FIG. 22 shows a lightness (v) -hue (H) plane. According to Table 3, in FIG. 22, a negative (−) coefficient is used for the occupation ratio calculated from the area (r4) distributed in the intermediate brightness of the flesh hue area, and the low brightness (shadow) area ( A positive (+) coefficient is used for the occupation ratio calculated from r3). FIG. 24 shows the second coefficient in the skin color area (H1) as a curve (coefficient curve) that continuously changes over the entire brightness. According to Table 3 and FIG. 24, the sign of the second coefficient of the intermediate lightness region of the flesh color hue region having the lightness value of 85 to 169 (v4) is negative (−), and the lightness value is 26 to 84 (v2, It can be seen that the sign of the second coefficient in the low brightness (shadow) region of v3) is positive (+), and the sign of the coefficient in both regions is different.

明度領域vi、色相領域Hjにおける第2の係数をDijとすると、指標2を算出するためのHk領域の和は、式(7)のように定義される。

Figure 2007081550
従って、H1〜H4領域の和は、下記の式(7-1)〜式(7-4)のように表される。
H1領域の和=R11×(-27.0)+R21×4.5+(中略)...+R71×(-24.0) …(7-1);
H2領域の和=R12×0.0+R22×4.7+(中略)... +R72×(-8.5) …(7-2);
H3領域の和=R13×0.0+R23×0.0+(中略)...+R73×0.0 …(7-3);
H4領域の和=R14×0.0+R24×(-5.1)+(中略)...+R74×7.2 …(7-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 (7).
Figure 2007081550
Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (7-1) to (7-4).
H1 area sum = R11 x (-27.0) + R21 x 4.5 + (omitted) ... + R71 x (-24.0) ... (7-1);
Sum of H2 regions = R12 x 0.0 + R22 x 4.7 + (omitted) ... + R72 x (-8.5) (7-2);
Sum of H3 area = R13 x 0.0 + R23 x 0.0 + (omitted) ... + R73 x 0.0 (7-3);
Sum of H4 region = R14 x 0.0 + R24 x (-5.1) + (omitted) ... + R74 x 7.2 (7-4).

指標2は、式(7-1)〜(7-4)で示されたH1〜H4領域の和を用いて、式(8)のように定義される。
指標2=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.554 …(8)
指標1及び指標2は、撮影画像データの明度と色相の分布量に基づいて算出されるため、撮影画像データがカラー画像である場合のシーンタイプの判別に有効である。
The index 2 is defined as in Expression (8) using the sum of the H1 to H4 regions shown in Expressions (7-1) to (7-4).
Index 2 = sum of H1 area + sum of H2 area + sum of H3 area + sum of H4 area + 1.554 (8)
Since the index 1 and the index 2 are calculated based on the brightness of the captured image data and the distribution amount of the hue, they are effective for determining the scene type when the captured image data is a color image.

次に、図25のフローチャートを参照して、指標3を算出するために実行される第2の占有率算出処理について詳細に説明する。   Next, the second occupancy rate calculation process executed to calculate the index 3 will be described in detail with reference to the flowchart of FIG.

まず、撮影画像データのRGB値がHSV表色系に変換される(ステップS20)。次いで、撮影画像データが、撮影画像画面の外縁からの距離と明度の組み合わせからなる領域に分割され、分割領域毎に累積画素数を算出することにより2次元ヒストグラムが作成される(ステップS21)。以下、撮影画像データの領域分割について詳細に説明する。   First, the RGB values of the photographed image data are converted into the HSV color system (step S20). Next, the photographed image data is divided into regions each composed of a combination of the distance from the outer edge of the photographed image screen and the brightness, and a two-dimensional histogram is created by calculating the cumulative number of pixels for each divided region (step S21). Hereinafter, the area division of the captured image data will be described in detail.

図26(a)〜(d)に、撮影画像データの画面の外縁からの距離に応じて分割された4つの領域n1〜n4を示す。図26(a)に示す領域n1が外枠であり、図26(b)に示す領域n2が、外枠の内側の領域であり、図26(c)に示す領域n3が、領域n2の更に内側の領域であり、図26(d)に示す領域n4が、撮影画像画面の中心部の領域である。また、明度は、上述のようにv1〜v7の7つの領域に分割するものとする。従って、撮影画像データを、撮影画像画面の外縁からの距離と明度の組み合わせからなる領域に分割した場合の分割領域の数は4×7=28個となる。   26A to 26D show four regions n1 to n4 that are divided according to the distance from the outer edge of the screen of the captured image data. A region n1 shown in FIG. 26A is an outer frame, a region n2 shown in FIG. 26B is a region inside the outer frame, and a region n3 shown in FIG. A region n4 shown in FIG. 26D is an inner region, and is a central region of the captured image screen. Further, the lightness is divided into seven regions v1 to v7 as described above. Therefore, when the captured image data is divided into regions composed of combinations of the distance from the outer edge of the captured image screen and the brightness, the number of divided regions is 4 × 7 = 28.

2次元ヒストグラムが作成されると、分割領域毎に算出された累積画素数の全画素数(撮影画像全体)に占める割合を示す第2の占有率が算出され(ステップS22)、本占有率算出処理が終了する。明度領域vi、画面領域njの組み合わせからなる分割領域において算出された第2の占有率をQijとすると、各分割領域における第2の占有率は表4のように表される。

Figure 2007081550
When the two-dimensional histogram is created, a second occupancy ratio indicating the ratio of the cumulative number of pixels calculated for each divided region to the total number of pixels (the entire captured image) is calculated (step S22), and the main occupancy ratio calculation is performed. The process ends. If the second occupancy calculated in the divided area composed of the combination of the brightness area vi and the screen area nj is Qij, the second occupancy in each divided area is expressed as shown in Table 4.
Figure 2007081550

次に、指標3の算出方法について説明する。
表5に、指標3を算出するために必要な第3の係数を分割領域別に示す。表5に示された各分割領域の係数は、表4に示した各分割領域の第2の占有率Qijに乗算する重み係数であり、撮影条件に応じて予め設定されている。

Figure 2007081550
図27は、画面領域n1〜n4における第3の係数を、明度全体に渡って連続的に変化する曲線(係数曲線)として示したものである。 Next, a method for calculating the index 3 will be described.
Table 5 shows the third coefficient necessary for calculating the index 3 for each divided region. The coefficient of each divided area shown in Table 5 is a weighting coefficient by which the second occupation ratio Qij of each divided area shown in Table 4 is multiplied, and is set in advance according to the shooting conditions.
Figure 2007081550
FIG. 27 shows the third coefficient in the screen areas n1 to n4 as a curve (coefficient curve) that continuously changes over the entire brightness.

明度領域vi、画面領域njにおける第3の係数をEijとすると、指標3を算出するためのnk領域(画面領域nk)の和は、式(9)のように定義される。

Figure 2007081550
従って、n1〜n4領域の和は、下記の式(9-1)〜式(9-4)のように表される。
n1領域の和=Q11×40.1+Q21×37.0+(中略)...+Q71×22.0 …(9-1);
n2領域の和=Q12×(-14.8)+Q22×(-10.5)+(中略)...+Q72×0.0 …(9-2);
n3領域の和=Q13×24.6+Q23×12.1+(中略)...+Q73×10.1 …(9-3);
n4領域の和=Q14×1.5+Q24×(-32.9)+(中略)...+Q74×(-52.2) …(9-4). 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 (9).
Figure 2007081550
Accordingly, the sum of the n1 to n4 regions is expressed by the following formulas (9-1) to (9-4).
n1 area sum = Q11 x 40.1 + Q21 x 37.0 + (omitted) ... + Q71 x 22.0 (9-1);
Sum of n2 regions = Q12 x (-14.8) + Q22 x (-10.5) + (omitted) ... + Q72 x 0.0 (9-2);
n3 area sum = Q13 x 24.6 + Q23 x 12.1 + (omitted) ... + Q73 x 10.1 (9-3);
Sum of n4 regions = Q14 x 1.5 + Q24 x (-32.9) + (omitted) ... + Q74 x (-52.2) ... (9-4).

指標3は、式(9-1)〜(9-4)で示されたn1〜n4領域の和を用いて、式(10)のように定義される。
指標3=n1領域の和+n2領域の和+n3領域の和+n4領域の和−12.6201 …(10)
指標3は、撮影画像データの明度の分布位置による構図的な特徴(撮影画像データの画面の外縁からの距離)に基づいて算出されるため、カラー画像だけでなくモノクロ画像のシーンタイプを判別するのにも有効である。
The index 3 is defined as in Expression (10) using the sum of the n1 to n4 regions shown in Expressions (9-1) to (9-4).
Index 3 = sum of n1 regions + sum of n2 regions + sum of n3 regions + sum of n4 regions−12.6201 (10)
The index 3 is calculated based on a compositional feature (distance from the outer edge of the screen of the captured image data) based on the brightness distribution position of the captured image data, so that it determines the scene type of not only a color image but also a monochrome image. It is also effective.

次に、図28のフローチャートを参照して、偏倚量算出処理(図18のステップS2)について説明する。   Next, the bias amount calculation process (step S2 in FIG. 18) will be described with reference to the flowchart in FIG.

まず、撮影画像データのRGB(Red,Green,Blue)値から、式(A)を用いて各画素の輝度Y(明るさ)が算出され、輝度の標準偏差(x1)が算出される(ステップS23)。輝度の標準偏差(x1)は、式(11)のように表される。

Figure 2007081550
式(11)では、撮影画像データの各画素について和をとる。式(11)において、画素輝度値とは、撮影画像データの各画素の輝度であり、全体平均輝度とは、撮影画像データ全体の輝度の平均値である。また、全体画素数とは、撮影画像データ全体の画素数である。 First, the luminance Y (brightness) of each pixel is calculated from the RGB (Red, Green, Blue) values of the photographed image data using Equation (A), and the luminance standard deviation (x1) is calculated (step 1). S23). The standard deviation (x1) of luminance is expressed as shown in Equation (11).
Figure 2007081550
In Expression (11), the sum is calculated for each pixel of the captured image data. In Expression (11), the pixel luminance value is the luminance of each pixel of the captured image data, and the overall average luminance is the average value of the luminance of the entire captured image data. The total number of pixels is the number of pixels of the entire captured image data.

次いで、式(12)に示すように、輝度差分値(x2)が算出される(ステップS24)。
輝度差分値(x2)=(最大輝度値−全体平均輝度)/255 …(12)
式(12)において、最大輝度値とは、撮影画像データの輝度の最大値である。
Next, as shown in Expression (12), a luminance difference value (x2) is calculated (step S24).
Difference in luminance value (x2) = (maximum luminance value−total average luminance) / 255 (12)
In Equation (12), the maximum luminance value is the maximum luminance value of the captured image data.

次いで、撮影画像データの画面中央部における肌色領域の平均輝度値(x3)が算出され(ステップS25)、更に、当該画面中央部における平均輝度値(x4)が算出される(ステップS26)。ここで、画面中央部とは、例えば、図26において、領域n3及び領域n4により構成される領域である。   Next, the average luminance value (x3) of the skin color area in the center of the screen of the captured image data is calculated (step S25), and further, the average luminance value (x4) in the center of the screen is calculated (step S26). Here, the screen center portion is, for example, a region constituted by a region n3 and a region n4 in FIG.

次いで、肌色輝度分布値(x5)が算出され(ステップS27)、本偏倚量算出処理が終了する。撮影画像データの肌色領域の最大輝度値をYskin_max、肌色領域の最小輝度値をYskin_min、肌色領域の平均輝度値(肌色平均輝度)をYskin_aveとすると、肌色輝度分布値(x5)は、式(13)のように表される。
x5=(Yskin_max−Yskin_min)/2 −Yskin_ave …(13)
Next, the flesh color luminance distribution value (x5) is calculated (step S27), and this deviation amount calculation processing is completed. When the maximum luminance value of the skin color area of the photographed image data is Yskin_max, the minimum luminance value of the skin color area is Yskin_min, and the average luminance value (skin color average luminance) of the skin color area is Yskin_ave, the skin color luminance distribution value (x5) is expressed by the equation (13). ).
x5 = (Yskin_max−Yskin_min) / 2−Yskin_ave (13)

撮影画像データの画面中央部における肌色領域の平均輝度値をx6とする。ここでの画面中央部とは、例えば、図26の領域n2、領域n3及び領域n4から構成される領域である。このとき、指標4は、指標1、指標3、x6を用いて式(14)のように定義され、指標5は、指標2、指標3、x6を用いて式(15)のように定義される。
指標4=0.46×指標1+0.61×指標3+0.01×x6−0.79 …(14)
指標5=0.58×指標2+0.18×指標3+(-0.03)×x6+3.34 …(15)
ここで、式(14)及び式(15)において各指標に乗算される重み係数は、撮影条件に応じて予め設定されている。
Let x6 be the average luminance value of the skin color area in the center of the screen of the captured image data. Here, the center of the screen is, for example, an area composed of the area n2, the area n3, and the area n4 in FIG. At this time, the index 4 is defined as in Expression (14) using the index 1, index 3, and x6, and the index 5 is defined as in Expression (15) using the index 2, index 3, and x6. The
Index 4 = 0.46 × Index 1 + 0.61 × Index 3 + 0.01 × x6−0.79 (14)
Index 5 = 0.58 x Index 2 + 0.18 x Index 3 + (-0.03) x x6 + 3.34 (15)
Here, the weighting coefficient multiplied by each index in Expression (14) and Expression (15) is set in advance according to the shooting conditions.

指標6は、偏倚量算出処理で算出された偏倚量(x1)〜(x5)に、撮影条件に応じて予め設定された第4の係数を乗算することにより得られる。表6に、各偏倚量に乗算する重み係数である第4の係数を示す。

Figure 2007081550
指標6は、式(16)のように表される。
指標6=x1×0.02+x2×1.13+x3×0.06+x4×(-0.01)+x5×0.03−6.49 …(16)
この指標6は、撮影画像データの画面の構図的な特徴だけでなく、輝度ヒストグラム分布情報を持ち合わせており、特に、ストロボ撮影シーンとアンダー撮影シーンの判別に有効である。 The index 6 is obtained by multiplying the deviation amounts (x1) to (x5) calculated in the deviation amount calculation process by a fourth coefficient set in advance according to the shooting conditions. Table 6 shows a fourth coefficient which is a weighting coefficient by which each deviation amount is multiplied.
Figure 2007081550
The index 6 is expressed as in Expression (16).
Index 6 = x1 x 0.02 + x2 x 1.13 + x3 x 0.06 + x4 x (-0.01) + x5 x 0.03-6.49 (16)
This index 6 has not only the compositional characteristics of the screen of the photographed image data but also the luminance histogram distribution information, and is particularly effective for discriminating between the flash photography scene and the under photography scene.

式(14)に示す指標4が自然光指標に相当し、式(15)に示す指標5が輝度比指標に相当し、式(16)に示す指標6が露出指標に相当する。   The index 4 shown in Expression (14) corresponds to a natural light index, the index 5 shown in Expression (15) corresponds to a luminance ratio index, and the index 6 shown in Expression (16) corresponds to an exposure index.

以上のように、実施形態1の撮像装置100によれば、逆光シーンやストロボ撮影シーンにおける主要被写体(例えば、人物顔領域)の明るさが、撮影画像データを出力する出力デバイス(例えば、プリンタ)において最適な明るさで再現できる明るさ補正量を得ることが可能となる。   As described above, according to the imaging apparatus 100 of the first embodiment, the brightness of the main subject (for example, a human face area) in a backlight scene or a strobe shooting scene is an output device (for example, a printer) that outputs captured image data. It is possible to obtain a brightness correction amount that can be reproduced with an optimal brightness.

また、上述のようにして算出された明るさ補正量と、判別されたシーンタイプに基づいて明るさ補正カーブを生成することにより、逆光シーンやストロボ撮影シーンのような、撮影画像データのダイナミックレンジが大きいシーンを出力する際、出力デバイスのダイナミックレンジから外れる程度が小さくなるため、撮影画像データの主要被写体の明るさを適正に仕上げつつ、撮影画像データの明部及び暗部がつぶれたり、高彩度の色が飽和してつぶれたり、色相が変化したりすることを抑制することが可能となる。   In addition, by generating a brightness correction curve based on the brightness correction amount calculated as described above and the determined scene type, the dynamic range of captured image data such as a backlit scene or a strobe scene is captured. When outputting a large scene, the degree of deviation from the dynamic range of the output device is reduced, so the brightness of the main subject of the captured image data is appropriately finished, and the bright and dark portions of the captured image data are crushed or the high saturation It is possible to suppress the color from being saturated and crushed or the hue from being changed.

[実施形態2]
次に、本発明の実施形態2について説明する。
実施形態1及び2に共通する構成要素の機能については、説明済みであるため、以下では、実施形態2に特有の機能について説明する。
[Embodiment 2]
Next, Embodiment 2 of the present invention will be described.
Since the functions of the constituent elements common to the first and second embodiments have been described, the functions unique to the second embodiment will be described below.

以下、図29を参照して、実施形態2の明るさ補正量算出部75の内部構成について説明する。なお、実施形態2に係る明るさ補正量算出部75の構成要素のうち、図3に示した実施形態1と同一の構成要素には同一の符号を付し、その機能説明を省略する。実施形態2の明るさ補正量算出部75は、図29に示すように、第1仮補正量設定部101、第1混合係数設定部102、第2仮補正量演算部103、第2混合係数設定部104、明るさ補正量演算部105、抑制係数算出部106、乗算部107により構成される。   Hereinafter, the internal configuration of the brightness correction amount calculation unit 75 of the second embodiment will be described with reference to FIG. Note that, among the components of the brightness correction amount calculation unit 75 according to the second embodiment, the same components as those of the first embodiment shown in FIG. As shown in FIG. 29, the brightness correction amount calculation unit 75 of the second embodiment includes a first temporary correction amount setting unit 101, a first mixing coefficient setting unit 102, a second temporary correction amount calculation unit 103, and a second mixing coefficient. The setting unit 104, the brightness correction amount calculation unit 105, the suppression coefficient calculation unit 106, and the multiplication unit 107 are configured.

抑制係数算出部106は、撮影画像データの彩度が所定の閾値よりも高く、且つ自然光指標に基づいて設定される所定の色相を有する高彩度の画素数を算出し、撮影画像データの全画素数に対する前記高彩度の画素数の割合に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数Re(0.0<Re≦1.0)を算出(設定)する。抑制係数Reの算出方法については、後に図30を参照して詳細に説明する。   The suppression coefficient calculation unit 106 calculates the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold, and the total number of pixels of the captured image data A suppression coefficient Re (0.0 <Re ≦ 1.0) for suppressing the brightness correction amount of the photographed image data is calculated (set) based on the ratio of the number of pixels of the high saturation with respect to. A method of calculating the suppression coefficient Re will be described in detail later with reference to FIG.

乗算部107は、式(17)に示すように、明るさ補正量演算部105で算出された明るさ補正量(式(3))に、抑制係数算出部106で算出(設定)された抑制係数Reを乗算することにより、新たな明るさ補正量を算出し、この新たな明るさ補正量を明るさ補正カーブ生成部76に出力する。
新たな明るさ補正量=Re×明るさ補正量 …(17)
As shown in Equation (17), the multiplication unit 107 uses the suppression coefficient calculated (set) by the suppression coefficient calculation unit 106 to the brightness correction amount (Equation (3)) calculated by the brightness correction amount calculation unit 105. By multiplying the coefficient Re, a new brightness correction amount is calculated, and this new brightness correction amount is output to the brightness correction curve generation unit 76.
New brightness correction amount = Re × Brightness correction amount (17)

実施形態2の明るさ補正カーブ生成部76は、判別マップによって判別されたシーンタイプ(図14参照)と、乗算部107から入力された新たな明るさ補正量に基づいて、撮影画像データを変換するための明るさ補正カーブを生成する。   The brightness correction curve generation unit 76 according to the second embodiment converts captured image data based on the scene type determined by the determination map (see FIG. 14) and the new brightness correction amount input from the multiplication unit 107. To generate a brightness correction curve.

次に、実施形態2における動作について説明する。
図30のフローチャートを参照して、実施形態2の画像処理部7において実行される明るさ補正処理について説明する。
Next, the operation in the second embodiment will be described.
The brightness correction process executed in the image processing unit 7 of the second embodiment will be described with reference to the flowchart of FIG.

まず、指標算出部74において、自然光指標、輝度比指標、露出指標を算出する指標算出処理(図18〜図28参照)が行われる(ステップT20)。次いで、画像解析部73において、撮影画像データの明るさ解析値がn個算出される(ステップT21)。ステップT21では、2個の明るさ解析値(肌色平均輝度、全体平均輝度)が算出される。   First, the index calculation unit 74 performs an index calculation process (see FIGS. 18 to 28) for calculating a natural light index, a luminance ratio index, and an exposure index (step T20). Next, the image analysis unit 73 calculates n brightness analysis values of the captured image data (step T21). In step T21, two brightness analysis values (skin color average brightness, overall average brightness) are calculated.

次いで、図4〜図9の1次元LUTから、ステップT21で算出された明るさ解析値と、ステップT20の指標算出処理で算出された自然光指標、輝度比指標、露出指標に対応する値を抽出することにより、n+4個(6個)の第1仮補正量key_auto[0]〜[5]が設定される(ステップT22)。   Next, the brightness analysis value calculated in step T21 and the values corresponding to the natural light index, the luminance ratio index, and the exposure index calculated in the index calculation process in step T20 are extracted from the one-dimensional LUT of FIGS. As a result, n + 4 (six) first temporary correction amounts key_auto [0] to [5] are set (step T22).

次いで、図10〜図13の1次元LUTから、ステップT20で算出された自然光指標に対応する値を抽出することにより、n+2個(4個)の第1混合係数wgt[0]〜[3]が設定される(ステップT23)。次いで、4個の第1仮補正量key_auto[0]〜[3]と、3個の第1混合係数wgt[0]〜[3]を用いて、式(2)より第2仮補正量key_auto[6]が算出される(ステップT24)。   Next, n + 2 (four) first mixing coefficients wgt [0] to [3] are extracted from the one-dimensional LUTs shown in FIGS. 10 to 13 by extracting values corresponding to the natural light index calculated in step T20. Is set (step T23). Next, using the four first temporary correction amounts key_auto [0] to [3] and the three first mixing coefficients wgt [0] to [3], the second temporary correction amount key_auto is obtained from Equation (2). [6] is calculated (step T24).

次いで、係数算出テーブル(図15)から、判別マップ(図14)を用いて判別されたシーンタイプに対応する3個の第2混合係数wgt[4]〜[6]が抽出され、設定される(ステップT25)。そして、2個の第1仮補正量key_auto[4]、key_auto[5]と、第2仮補正量key_auto[6]と、3個の第2混合係数wgt[4]〜[6]を用いて、式(3)により明るさ補正量が算出される(ステップT26)。   Next, three second mixing coefficients wgt [4] to [6] corresponding to the scene type determined using the determination map (FIG. 14) are extracted from the coefficient calculation table (FIG. 15) and set. (Step T25). Then, using the two first temporary correction amounts key_auto [4] and key_auto [5], the second temporary correction amount key_auto [6], and the three second mixing coefficients wgt [4] to [6] Then, the brightness correction amount is calculated by the equation (3) (step T26).

次いで、ステップT20で算出された輝度比指標が閾値Th1より大きいか否かが判定される(ステップT27)。ここで、閾値Th1=1.5である。ステップT27において、輝度比指標>Th1であると判定された場合(ステップT27;YES)、後に高彩度画素としてカウントすべき画素の色相条件が、ステップT20で算出された自然光指標に応じて設定される(ステップT28)。   Next, it is determined whether or not the luminance ratio index calculated in step T20 is greater than a threshold value Th1 (step T27). Here, the threshold Th1 = 1.5. If it is determined in step T27 that the luminance ratio index> Th1 (step T27; YES), the hue condition of the pixel to be counted later as a high saturation pixel is set according to the natural light index calculated in step T20. (Step T28).

図31に、ステップT28において、自然光指標の値に応じて設定される色相条件(色相の範囲)を示す。図31に示すように、色相条件は、−6.0<自然光指標≦−1.5のとき、色相H=161〜250であり、−1.5<自然光指標<2.0のとき、色相H=0〜39、161〜250、330〜359であり、2.0≦自然光指標<6.0のとき、色相H=0〜39、330〜359である。   FIG. 31 shows the hue condition (hue range) set according to the value of the natural light index in step T28. As shown in FIG. 31, the hue conditions are: hue H = 161 to 250 when −6.0 <natural light index ≦ −1.5, and hue H = 0 to 39, 161 to when −1.5 <natural light index <2.0. 250, 330-359, and when 2.0 ≦ natural light index <6.0, hue H = 0-39, 330-359.

色相条件が設定されると、撮影画像データの全画素数のうち、ステップT28で設定された色相条件を有し、且つ、彩度(S)が閾値Th2より大きい画素数が算出され、彩度(S)>Th2を満たす高彩度画素数が全画素数に占める割合(%)により、彩度レベルが設定される(ステップT29)。ここで、Th2=130(HSV表色系、最大値255)である。表7に、彩度(S)>Th2を満たす高彩度画素数が全画素数に占める割合(%)と抑制係数を、彩度レベル(彩度1〜4)別に示す。

Figure 2007081550
When the hue condition is set, the number of pixels having the hue condition set in step T28 and having a saturation (S) larger than the threshold Th2 among the total number of pixels of the captured image data is calculated. The saturation level is set based on the ratio (%) of the high saturation pixel number satisfying (S)> Th2 to the total pixel number (step T29). Here, Th2 = 130 (HSV color system, maximum value 255). Table 7 shows the ratio (%) of the high saturation pixel number satisfying saturation (S)> Th2 to the total pixel number and the suppression coefficient for each saturation level (saturation 1-4).
Figure 2007081550

彩度レベルが設定されると、表7により、その設定された彩度レベルに対応する抑制係数Reが設定される(ステップT30)。なお、ステップT27〜T30の処理は、抑制係数算出部106で実行される。次いで、式(17)に示すように、ステップT26で算出された明るさ補正量に、ステップT30で設定された抑制係数Reを乗算することにより、新たな明るさ補正量が算出され(ステップT31)、その新たな明るさ補正量と、ステップT20で算出された各指標に基づいて判別されたシーンタイプから、撮影画像データを変換するための明るさ補正カーブが生成される(ステップT32)。   When the saturation level is set, the suppression coefficient Re corresponding to the set saturation level is set according to Table 7 (step T30). Note that the processing of steps T27 to T30 is executed by the suppression coefficient calculation unit 106. Next, as shown in Expression (17), a new brightness correction amount is calculated by multiplying the brightness correction amount calculated in Step T26 by the suppression coefficient Re set in Step T30 (Step T31). ), A brightness correction curve for converting photographed image data is generated from the new brightness correction amount and the scene type determined based on each index calculated in step T20 (step T32).

ステップT27において、輝度比指標≦Th1であると判定された場合(ステップT27;NO)、ステップT26で算出された明るさ補正量と、ステップT20で算出された各指標に基づいて判別されたシーンタイプから、撮影画像データを変換するための明るさ補正カーブが生成される(ステップT32)。   When it is determined in step T27 that the luminance ratio index ≦ Th1 (step T27; NO), the scene determined based on the brightness correction amount calculated in step T26 and each index calculated in step T20. From the type, a brightness correction curve for converting the captured image data is generated (step T32).

明るさ補正カーブが生成されると、その明るさ補正カーブに従って、撮影画像データの明るさが補正され(ステップT33)、本明るさ補正処理が終了する。このように明るさが補正された撮影画像データは、指定された出力先に出力される。出力先としては、表示部13や、撮像装置100に接続されたプリンタ等がある。   When the brightness correction curve is generated, the brightness of the captured image data is corrected according to the brightness correction curve (step T33), and the brightness correction process is terminated. The captured image data whose brightness has been corrected in this way is output to a designated output destination. Examples of the output destination include the display unit 13 and a printer connected to the imaging apparatus 100.

以上のように、実施形態2の撮像装置100によれば、撮影画像データの全画素数に対する高彩度画素数の割合に基づいて算出される抑制係数を用いて、撮影画像データの明るさ補正量を抑制することにより、高彩度画素が多い撮影画像データにおける高彩度画素の飽和を防止することが可能となる。特に、高彩度画素としてカウント対象となる画素の色相が、自然光指標の値に基づいて決定されることにより、高彩度画素の飽和を高精度に防止することが可能となる。   As described above, according to the imaging apparatus 100 of the second embodiment, the brightness correction amount of the captured image data is calculated using the suppression coefficient calculated based on the ratio of the high saturation pixel number to the total number of pixels of the captured image data. By suppressing the saturation, it is possible to prevent saturation of the high saturation pixels in the captured image data having many high saturation pixels. In particular, the hue of a pixel to be counted as a high saturation pixel is determined based on the value of the natural light index, so that saturation of the high saturation pixel can be prevented with high accuracy.

なお、上記各実施形態における記載内容は、本発明の趣旨を逸脱しない範囲で適宜変更可能である。   In addition, the description content in each said embodiment can be suitably changed in the range which does not deviate from the meaning of this invention.

例えば、上記各実施形態で示した明るさ補正処理が、デジタルカメラ等の撮像装置で行われる場合を示したが、ミニラボ(小規模現像所)に設置された画像処理装置(パーソナルコンピュータでもよい。)に、図2の画像処理部7の機能を搭載させるようにしてもよい。   For example, although the case where the brightness correction processing shown in each of the above embodiments is performed by an imaging apparatus such as a digital camera has been described, an image processing apparatus (a personal computer) installed in a minilab (small-scale development laboratory) may be used. 2) may be equipped with the function of the image processing unit 7 of FIG.

図32に、本発明を適用した画像処理装置200の主要部構成を示す。画像処理装置200は、図32に示すように、画像入力部201、画像処理部202、画像出力部203により構成される。   FIG. 32 shows a main configuration of an image processing apparatus 200 to which the present invention is applied. The image processing apparatus 200 includes an image input unit 201, an image processing unit 202, and an image output unit 203, as shown in FIG.

画像入力部201は、被写体の撮影により得られた撮影画像データを取得し、画像処理部202に出力する。画像出力部203は、LCD(Liquid Crystal Display)、CRT(Cathode Ray Tube)等の表示ディスプレイを有し、画像処理部202で処理された撮影画像データ等を表示する。また、画像出力部203が、画像処理部202で処理された撮影画像データを印刷出力する印刷部を備えるようにしてもよい。   The image input unit 201 acquires photographed image data obtained by photographing a subject and outputs it to the image processing unit 202. The image output unit 203 includes a display such as an LCD (Liquid Crystal Display) or a CRT (Cathode Ray Tube), and displays the captured image data processed by the image processing unit 202. Further, the image output unit 203 may include a printing unit that prints out the captured image data processed by the image processing unit 202.

画像処理部202は、図32に示すように、画像解析部204、指標算出部205、明るさ補正量算出部206、明るさ補正カーブ生成部207、画質補正部208により構成され、各部の機能は、それぞれ、図2の画像解析部73、指標算出部74、明るさ補正量算出部75、明るさ補正カーブ生成部76、画質補正部72と同等である。   As shown in FIG. 32, the image processing unit 202 includes an image analysis unit 204, an index calculation unit 205, a brightness correction amount calculation unit 206, a brightness correction curve generation unit 207, and an image quality correction unit 208. Are equivalent to the image analysis unit 73, index calculation unit 74, brightness correction amount calculation unit 75, brightness correction curve generation unit 76, and image quality correction unit 72 of FIG.

但し、ミニラボに設置された画像処理装置200の場合、明るさ補正カーブは、図17に示した4種類(−6、−4、−2、0ボタン)だけでなく、更に多種類の明るさ補正カーブを生成することが可能である。   However, in the case of the image processing apparatus 200 installed in the minilab, the brightness correction curves are not limited to the four types (−6, −4, −2, 0 buttons) shown in FIG. It is possible to generate a correction curve.

本発明の実施形態に係る撮像装置の主要部構成を示すブロック図。1 is a block diagram showing a main part configuration of an imaging apparatus according to an embodiment of the present invention. 画像処理部の内部構成を示すブロック図。The block diagram which shows the internal structure of an image process part. 本発明の実施形態1における明るさ補正量算出部の内部構成を示すブロック図。The block diagram which shows the internal structure of the brightness correction amount calculation part in Embodiment 1 of this invention. 輝度比指標と仮補正量key_auto[0]との関係を示すLUT。LUT indicating the relationship between the luminance ratio index and the provisional correction amount key_auto [0]. 露出指標と仮補正量key_auto[1]との関係を示すLUT。LUT indicating the relationship between the exposure index and the temporary correction amount key_auto [1]. 肌色平均輝度と仮補正量key_auto[2]との関係を示すLUT。LUT indicating the relationship between the skin color average luminance and the provisional correction amount key_auto [2]. 肌色平均輝度又は全体平均輝度と仮補正量key_auto[3]との関係を示すLUT。LUT indicating the relationship between the flesh color average luminance or the overall average luminance and the temporary correction amount key_auto [3]. 輝度比指標と仮補正量key_auto[4]との関係を示すLUT。LUT indicating the relationship between the brightness ratio index and the temporary correction amount key_auto [4]. 露出指標と仮補正量key_auto[5]との関係を示すLUT。LUT indicating the relationship between the exposure index and the temporary correction amount key_auto [5]. 自然光指標と混合係数wgt[0]との関係を示すLUT。LUT indicating the relationship between the natural light index and the mixing coefficient wgt [0]. 自然光指標と混合係数wgt[1]との関係を示すLUT。LUT indicating the relationship between the natural light index and the mixing coefficient wgt [1]. 自然光指標と混合係数wgt[2]との関係を示すLUT。LUT indicating the relationship between the natural light index and the mixing coefficient wgt [2]. 自然光指標と混合係数wgt[3]との関係を示すLUT。LUT indicating the relationship between the natural light index and the mixing coefficient wgt [3]. 自然光指標、輝度比指標、露出指標からシーンタイプを判別するための判別マップを示す図。The figure which shows the discrimination | determination map for discriminating a scene type from a natural light parameter | index, a luminance ratio parameter | index, and an exposure parameter | index. シーンタイプ別に混合係数wgt[4]〜[6]の値を表す係数算出テーブルを示す図。The figure which shows the coefficient calculation table showing the value of mixing coefficient wgt [4]-[6] according to scene type. 実施形態1の画像処理部において実行される明るさ補正処理を示すフローチャート。5 is a flowchart illustrating brightness correction processing executed in the image processing unit according to the first embodiment. シーンタイプが順光である場合の明るさ補正カーブ(a)と、シーンタイプが逆光である場合の明るさ補正カーブを示す図(b)。FIG. 5B is a diagram illustrating a brightness correction curve (a) when the scene type is direct light and a brightness correction curve when the scene type is backlight. 指標算出処理を示すフローチャート。The flowchart which shows an index calculation process. 明度・色相の領域毎に第1の占有率を算出する第1の占有率算出処理を示すフローチャート。The flowchart which shows the 1st occupation rate calculation process which calculates the 1st occupation rate for every area | region of lightness and hue. RGBからHSV表色系に変換するプログラムの一例を示す図。The figure which shows an example of the program which converts from RGB to HSV color system. 明度(V)−色相(H)平面と、V−H平面上の領域r1及び領域r2を示す図。The figure which shows the brightness | luminance (V) -hue (H) plane, and the area | region r1 and the area | region r2 on a VH plane. 明度(V)−色相(H)平面と、V−H平面上の領域r3及び領域r4を示す図。The figure which shows the brightness | luminance (V) -hue (H) plane, and the area | region r3 and the area | region r4 on a VH plane. 指標1を算出するための、第1の占有率に乗算する第1の係数を表す曲線を示す図。The 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の係数を表す曲線を示す図。The figure which shows the curve showing the 2nd coefficient by which the 1st occupation rate for calculating the parameter | index 2 is multiplied. 撮影画像データの構図に基づいて第2の占有率を算出する第2の占有率算出処理を示すフローチャート。The flowchart which shows the 2nd occupation rate calculation process which calculates a 2nd occupation rate based on the composition of picked-up image data. 撮影画像データの画面の外縁からの距離に応じて決定される領域n1〜n4を示す図。The figure which shows the area | regions n1-n4 determined according to the distance from the outer edge of the screen of picked-up image data. 指標3を算出するための、第2の占有率に乗算する第3の係数を表す曲線を領域別(n1〜n4)に示す図。The figure which shows the curve showing the 3rd coefficient for multiplying the 2nd occupation rate for calculating the parameter | index 3 according to area | region (n1-n4). 偏倚量算出処理を示すフローチャート。7 is a flowchart showing a bias amount calculation process. 本発明の実施形態2における明るさ補正量算出部の内部構成を示すブロック図。The block diagram which shows the internal structure of the brightness correction amount calculation part in Embodiment 2 of this invention. 実施形態2の画像処理部において実行される明るさ補正処理を示すフローチャート。9 is a flowchart illustrating brightness correction processing executed in the image processing unit of the second embodiment. 自然光指標と、高彩度画素の色相条件との関係を示す図。The figure which shows the relationship between a natural light parameter | index and the hue condition of a high saturation pixel. 本発明が適用された画像処理装置の主要部構成を示すブロック図。1 is a block diagram showing a main part configuration of an image processing apparatus to which the present invention is applied.

符号の説明Explanation of symbols

1 レンズ
2 絞り
3 CCD
4 アナログ処理回路
5 A/D変換器
6 一時記憶メモリ
7 画像処理部
70 前処理部
71 明るさ補正部
72 画質補正部
73 画像解析部
74 指標算出部
75 明るさ補正量算出部
76 明るさ補正カーブ生成部
8 ヘッダ情報処理部
9 記憶デバイス
10 CCD駆動回路
11 制御部
12 操作部
13 表示部
14 ストロボ駆動回路
15 ストロボ
16 焦点距離調整回路
17 自動焦点駆動回路
20 モータ
100 撮像装置
101 第1仮補正量設定部
102 第1混合係数設定部
103 第2仮補正量演算部
104 第2混合係数設定部
105 明るさ補正量演算部
106 抑制係数算出部
107 乗算部
200 画像処理装置
201 画像入力部
202 画像処理部
203 画像出力部
204 画像解析部
205 指標算出部
206 明るさ補正量算出部
207 明るさ補正カーブ生成部
208 画質補正部
1 Lens 2 Aperture 3 CCD
4 Analog processing circuit 5 A / D converter 6 Temporary storage memory 7 Image processing unit 70 Pre-processing unit 71 Brightness correction unit 72 Image quality correction unit 73 Image analysis unit 74 Index calculation unit 75 Brightness correction amount calculation unit 76 Brightness correction Curve generation unit 8 Header information processing unit 9 Storage device 10 CCD drive circuit 11 Control unit 12 Operation unit 13 Display unit 14 Strobe drive circuit 15 Strobe 16 Focal length adjustment circuit 17 Automatic focus drive circuit 20 Motor 100 Imaging device 101 First temporary correction Amount setting unit 102 first mixing coefficient setting unit 103 second temporary correction amount calculating unit 104 second mixing coefficient setting unit 105 brightness correction amount calculating unit 106 suppression coefficient calculating unit 107 multiplying unit 200 image processing apparatus 201 image input unit 202 image Processing unit 203 Image output unit 204 Image analysis unit 205 Index calculation unit 206 Brightness compensation Positive amount calculation unit 207 Brightness correction curve generation unit 208 Image quality correction unit

Claims (12)

被写体を撮影して撮影画像データを取得し、当該撮影画像データ内の主要被写体の明るさを最適化する処理を行う撮像装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記補正量算出手段により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、
を備えることを特徴とする撮像装置。
An imaging apparatus that captures captured image data by capturing a subject and performs processing for optimizing the brightness of a main subject in the captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
A correction curve generating means for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculating means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means;
An imaging apparatus comprising:
被写体を撮影して撮影画像データを取得し、当該撮影画像データ内の主要被写体の明るさを最適化する処理を行う撮像装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定手段と、
前記補正量算出手段により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算手段と、
前記乗算手段により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、
を備えることを特徴とする撮像装置。
An imaging apparatus that captures captured image data by capturing a subject and performs processing for optimizing the brightness of a main subject in the captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. Suppression coefficient setting means for setting a suppression coefficient for
Multiplication means for calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation means by the suppression coefficient;
A correction curve generation means for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means;
An imaging apparatus comprising:
前記指標算出手段は、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴とする請求項1又は2に記載の撮像装置。
The index calculating means includes
A first calculation process that divides the captured image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire captured image data for each of the divided regions; The captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and a second occupation indicating the ratio of the divided area to the entire captured image data Executing at least one of the second calculation processes for calculating the rate,
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, The imaging apparatus according to claim 1, wherein an exposure index is calculated.
撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記補正量算出手段により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus that performs processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
A correction curve generating means for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculating means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means;
An image processing apparatus comprising:
撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理装置であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出手段と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出手段により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定手段と、
前記指標算出手段により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定手段と、
前記第1混合係数設定手段により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定手段と、
前記指標算出手段により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定手段と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出手段と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定手段と、
前記補正量算出手段により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算手段と、
前記乗算手段により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成手段と、
前記補正カーブ生成手段により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus that performs processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. Index calculation means to
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the luminance ratio index and the exposure index calculated by the index calculation means, a plurality of first temporary correction amounts for the captured image data are determined. First temporary correction amount setting means for setting;
First mixing coefficient setting means for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculating means;
Second temporary correction amount setting means for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting means and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation means, at least one of the plurality of first temporary correction amounts is multiplied by a second coefficient as a weighting factor to be multiplied by the second temporary correction amount. A second mixing coefficient setting means for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation means;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. Suppression coefficient setting means for setting a suppression coefficient for
Multiplication means for calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation means by the suppression coefficient;
A correction curve generation means for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication means, the natural light index, and the luminance ratio index;
Correction means for correcting the brightness of the captured image data in accordance with the correction curve generated by the correction curve generation means;
An image processing apparatus comprising:
前記指標算出手段は、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴とする請求項4又は5に記載の画像処理装置。
The index calculating means includes
A first calculation process that divides the captured image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire captured image data for each of the divided regions; The captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and a second occupation indicating the ratio of the divided area to the entire captured image data Executing at least one of the second calculation processes for calculating the rate,
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, The image processing apparatus according to claim 4, wherein an exposure index is calculated.
撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理方法であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出工程と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出工程により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定工程と、
前記指標算出工程により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定工程と、
前記第1混合係数設定工程により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定工程と、
前記指標算出工程により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定工程と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出工程と、
前記補正量算出工程により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成工程と、
前記補正カーブ生成工程により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正工程と、
を含むことを特徴とする画像処理方法。
An image processing method for performing processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation process to perform,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation step, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting step to be set;
A first mixing coefficient setting step for setting a first mixing coefficient as a weighting coefficient by which each of the plurality of first temporary correction amounts is multiplied based on the natural light index calculated by the index calculation step;
A second provisional correction amount setting step for setting a second provisional correction amount for the captured image data based on the first mixture coefficient set by the first mixture coefficient setting step and the plurality of first provisional correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation step, at least one of the plurality of first temporary correction amounts is multiplied by the second temporary correction amount as a weight coefficient. A second mixing coefficient setting step for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation process;
A correction curve generating step for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculating step, the natural light index, and the luminance ratio index;
A correction step of correcting the brightness of the captured image data according to the correction curve generated by the correction curve generation step;
An image processing method comprising:
撮影画像データ内の主要被写体の明るさを最適化する処理を行う画像処理方法であって、
前記撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出工程と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出工程により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定工程と、
前記指標算出工程により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定工程と、
前記第1混合係数設定工程により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定工程と、
前記指標算出工程により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定工程と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出工程と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定工程と、
前記補正量算出工程により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算工程と、
前記乗算工程により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成工程と、
前記補正カーブ生成工程により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正工程と、
を含むことを特徴とする画像処理方法。
An image processing method for performing processing for optimizing the brightness of a main subject in captured image data,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation process to perform,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation step, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting step to be set;
A first mixing coefficient setting step for setting a first mixing coefficient as a weighting coefficient by which each of the plurality of first temporary correction amounts is multiplied based on the natural light index calculated by the index calculation step;
A second provisional correction amount setting step for setting a second provisional correction amount for the captured image data based on the first mixture coefficient set by the first mixture coefficient setting step and the plurality of first provisional correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation step, at least one of the plurality of first temporary correction amounts is multiplied by the second temporary correction amount as a weight coefficient. A second mixing coefficient setting step for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation process;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. A suppression coefficient setting step for setting a suppression coefficient for
A multiplication step of calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation step by the suppression coefficient;
A correction curve generating step for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication step, the natural light index, and the luminance ratio index;
A correction step of correcting the brightness of the captured image data according to the correction curve generated by the correction curve generation step;
An image processing method comprising:
前記指標算出工程では、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴とする請求項7又は8に記載の画像処理方法。
In the index calculation step,
A first calculation process that divides the captured image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire captured image data for each of the divided regions; The captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and a second occupation indicating the ratio of the divided area to the entire captured image data Executing at least one of the second calculation processes for calculating the rate,
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, The image processing method according to claim 7, wherein an exposure index is calculated.
コンピュータに、
撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出機能と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出機能により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定機能と、
前記指標算出機能により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定機能と、
前記第1混合係数設定機能により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定機能と、
前記指標算出機能により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定機能と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出機能と、
前記補正量算出機能により算出された明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成機能と、
前記補正カーブ生成機能により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正機能と、
を実現させるための画像処理プログラム。
On the computer,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation function,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation function, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting function to be set;
A first mixing coefficient setting function for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculation function;
A second temporary correction amount setting function for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting function and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation function, a first weighting factor as a weighting factor that multiplies the second temporary correction amount by at least one of the plurality of first temporary correction amounts. A second mixing coefficient setting function for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation function;
A correction curve generation function for generating a correction curve for converting the captured image data based on the brightness correction amount calculated by the correction amount calculation function, the natural light index, and the luminance ratio index;
A correction function for correcting the brightness of the captured image data according to the correction curve generated by the correction curve generation function;
An image processing program for realizing
コンピュータに、
撮影画像データの自然光による屋外撮影度を表す自然光指標と、当該撮影画像データのダイナミックレンジの大きさを表す輝度比指標と、撮影時の露出設定に起因する露出撮影度を表す露出指標を算出する指標算出機能と、
前記撮影画像データの明るさ解析値と、明るさの再現目標値と、前記指標算出機能により算出された輝度比指標及び露出指標に基づいて、当該撮影画像データに対する複数の第1仮補正量を設定する第1仮補正量設定機能と、
前記指標算出機能により算出された自然光指標に基づいて、前記複数の第1仮補正量の各々に乗算する重み係数としての第1混合係数を設定する第1混合係数設定機能と、
前記第1混合係数設定機能により設定された第1混合係数と、前記複数の第1仮補正量に基づいて、前記撮影画像データに対する第2仮補正量を設定する第2仮補正量設定機能と、
前記指標算出機能により算出された自然光指標、輝度比指標、露出指標に基づいて、前記複数の第1仮補正量のうちの少なくとも1つと、前記第2仮補正量に乗算する重み係数としての第2混合係数を設定する第2混合係数設定機能と、
前記第2混合係数により設定された第2混合係数と、前記少なくとも1つの第1仮補正量と、前記第2仮補正量に基づいて、前記撮影画像データの明るさ補正量を算出する補正量算出機能と、
前記撮影画像データの彩度が所定の閾値よりも高く、且つ前記自然光指標に基づいて設定される所定の色相を有する高彩度の画素数に基づいて、当該撮影画像データの明るさ補正量を抑制するための抑制係数を設定する抑制係数設定機能と、
前記補正量算出機能により算出された明るさ補正量に前記抑制係数を乗算して新たな明るさ補正量を算出する乗算機能と、
前記乗算機能により得られた新たな明るさ補正量と、前記自然光指標と、前記輝度比指標に基づいて、前記撮影画像データを変換するための補正カーブを生成する補正カーブ生成機能と、
前記補正カーブ生成機能により生成された補正カーブに従って、前記撮影画像データの明るさを補正する補正機能と、
を実現させるための画像処理プログラム。
On the computer,
Calculates a natural light index that represents the degree of outdoor shooting by natural light of the photographed image data, a luminance ratio index that represents the size of the dynamic range of the photographed image data, and an exposure index that represents the exposure photographing degree due to the exposure setting at the time of photographing. An index calculation function,
Based on the brightness analysis value of the captured image data, the brightness reproduction target value, and the brightness ratio index and the exposure index calculated by the index calculation function, a plurality of first temporary correction amounts for the captured image data are determined. A first provisional correction amount setting function to be set;
A first mixing coefficient setting function for setting a first mixing coefficient as a weighting coefficient for multiplying each of the plurality of first temporary correction amounts based on the natural light index calculated by the index calculation function;
A second temporary correction amount setting function for setting a second temporary correction amount for the captured image data based on the first mixing coefficient set by the first mixing coefficient setting function and the plurality of first temporary correction amounts; ,
Based on the natural light index, the luminance ratio index, and the exposure index calculated by the index calculation function, a first weighting factor as a weighting factor that multiplies the second temporary correction amount by at least one of the plurality of first temporary correction amounts. A second mixing coefficient setting function for setting two mixing coefficients;
A correction amount for calculating a brightness correction amount of the captured image data based on the second mixing coefficient set by the second mixing coefficient, the at least one first temporary correction amount, and the second temporary correction amount. A calculation function;
The brightness correction amount of the captured image data is suppressed based on the number of pixels of high saturation having a predetermined hue that is set based on the natural light index and the saturation of the captured image data is higher than a predetermined threshold. A suppression coefficient setting function for setting a suppression coefficient for
A multiplication function for calculating a new brightness correction amount by multiplying the brightness correction amount calculated by the correction amount calculation function by the suppression coefficient;
A correction curve generation function for generating a correction curve for converting the captured image data based on the new brightness correction amount obtained by the multiplication function, the natural light index, and the luminance ratio index;
A correction function for correcting the brightness of the captured image data according to the correction curve generated by the correction curve generation function;
An image processing program for realizing
前記指標算出機能を実現させる際に、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第1の占有率を算出する第1算出処理と、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に前記撮影画像データ全体に占める割合を示す第2の占有率を算出する第2算出処理の少なくとも一方の算出処理を実行し、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出し、
前記算出された第1の占有率及び/又は第2の占有率と、前記偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、前記自然光指標、前記輝度比指標、前記露出指標を算出することを特徴とする請求項10又は11に記載の画像処理プログラム。
When realizing the index calculation function,
A first calculation process that divides the captured image data into regions composed of combinations of predetermined brightness and hue, and calculates a first occupancy ratio that indicates a ratio of the entire captured image data for each of the divided regions; The captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and a second occupation indicating the ratio of the divided area to the entire captured image data Executing at least one of the second calculation processes for calculating the rate,
Calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the calculated first occupancy and / or second occupancy and the deviation amount by a coefficient set in advance according to a shooting condition, the natural light index, the luminance ratio index, The image processing program according to claim 10 or 11, wherein an exposure index is calculated.
JP2005263958A 2005-09-12 2005-09-12 Imaging apparatus, and image processing unit, method, and program Pending JP2007081550A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005263958A JP2007081550A (en) 2005-09-12 2005-09-12 Imaging apparatus, and image processing unit, method, and program
PCT/JP2006/318009 WO2007032324A1 (en) 2005-09-12 2006-09-12 Imaging device, image processing device, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005263958A JP2007081550A (en) 2005-09-12 2005-09-12 Imaging apparatus, and image processing unit, method, and program

Publications (1)

Publication Number Publication Date
JP2007081550A true JP2007081550A (en) 2007-03-29

Family

ID=37864916

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005263958A Pending JP2007081550A (en) 2005-09-12 2005-09-12 Imaging apparatus, and image processing unit, method, and program

Country Status (2)

Country Link
JP (1) JP2007081550A (en)
WO (1) WO2007032324A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2009001467A1 (en) * 2007-06-28 2010-08-26 富士通株式会社 Electronic devices that improve the brightness of captured images in low light environments
CN110881108A (en) * 2018-09-06 2020-03-13 华晶科技股份有限公司 Image processing method and image processing apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804461A (en) * 2021-02-01 2021-05-14 深圳瑞为智能科技有限公司 Method for automatically adjusting AE target brightness

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247393A (en) * 2001-02-14 2002-08-30 Konica Corp Method of processing image
JP4154128B2 (en) * 2001-02-14 2008-09-24 株式会社リコー Image processing apparatus, image processing method, and recording medium on which program for executing the method is recorded
JP2002369075A (en) * 2001-06-04 2002-12-20 Olympus Optical Co Ltd Image pickup unit, picture processor, image pickup program and picture processing program
JP4367821B2 (en) * 2001-08-29 2009-11-18 株式会社リコー Image processing apparatus, image processing method, and recording medium
JP3992177B2 (en) * 2001-11-29 2007-10-17 株式会社リコー Image processing apparatus, image processing method, and computer program
JP2004336521A (en) * 2003-05-09 2004-11-25 Konica Minolta Photo Imaging Inc Image processing method, image processor, and image recording apparatus
JP4261290B2 (en) * 2003-08-25 2009-04-30 富士フイルム株式会社 Image processing apparatus and method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2009001467A1 (en) * 2007-06-28 2010-08-26 富士通株式会社 Electronic devices that improve the brightness of captured images in low light environments
CN110881108A (en) * 2018-09-06 2020-03-13 华晶科技股份有限公司 Image processing method and image processing apparatus
CN110881108B (en) * 2018-09-06 2021-05-04 华晶科技股份有限公司 Image processing method and image processing apparatus

Also Published As

Publication number Publication date
WO2007032324A1 (en) 2007-03-22

Similar Documents

Publication Publication Date Title
US6825884B1 (en) Imaging processing apparatus for generating a wide dynamic range image
US8254675B2 (en) Image processing apparatus, imaging apparatus and image processing program
JP3668014B2 (en) Image processing method and apparatus
JP6282156B2 (en) Image device, image processing method, control program, and storage medium
KR20080035981A (en) Image processing apparatus, imaging apparatus, image processing method, and computer program
JP2000228747A (en) Picture processor
US8502881B2 (en) Image processing apparatus, image processing method, and electronic camera
JP2015156615A (en) Image processing system, image processing method, control program, and recording medium
US8989510B2 (en) Contrast enhancement using gradation conversion processing
JP2019047169A (en) Apparatus, method, and program for generating high dynamic range image
CN113411554A (en) Underwater image color restoration method and device
JP2007184888A (en) Imaging apparatus, image processor, image processing method, and image processing program
EP1337105A2 (en) Method, apparatus and program for image processing
US8570407B2 (en) Imaging apparatus, image processing program, image processing apparatus, and image processing method
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
US8102446B2 (en) Image capturing system and image processing method for applying grayscale conversion to a video signal, and computer-readable recording medium having recorded thereon an image processing program for applying grayscale conversion to a video signal
JP2007081550A (en) Imaging apparatus, and image processing unit, method, and program
JP2007228221A (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
JP2007312294A (en) Imaging apparatus, image processor, method for processing image, and image processing program
JP2009070099A (en) Image-processing device, image-processing method, program and recording medium
JP2007243542A (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP2007043381A (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP2002369004A (en) Image processing unit, image output device, image processing method and storage medium

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