明 細 書 Specification
画像処理方法、画像処理装置、撮像装置及び画像処理プログラム 技術分野 Image processing method, image processing apparatus, imaging apparatus, and image processing program
[0001] 本発明は、画像処理方法、画像処理装置、撮像装置及び画像処理プログラムに関 する。 The present invention relates to an image processing method, an image processing device, an imaging device, and an image processing program.
背景技術 Background art
[0002] 従来、フィルムスキャン画像やデジタルカメラ画像の輝度補正は、画像全体の平均 輝度をユーザが希望する値へと補正することで行われて 、た。また通常の撮影では 、順光、逆光、ストロボ等の光源条件が様々に変動し、画像中に輝度の偏りの大きい 大面積の領域が生じるため、平均輝度の補正に加えて、判別分析、重回帰分析によ り算出される値を用いた追加補正が必要であった。し力しながら、判別回帰分析方法 では、ストロボシーン及び逆光シーン力 算出されるパラメータが非常に類似してい るため、撮影条件 (撮影シーン)の判別が困難であるという問題があった。 Conventionally, brightness correction of film scan images and digital camera images has been performed by correcting the average brightness of the entire image to a value desired by the user. In normal shooting, the light source conditions such as forward light, backlight, and strobe change variously, resulting in a large area with a large luminance deviation in the image. In addition to correcting the average luminance, discriminant analysis, Additional correction using values calculated by regression analysis was necessary. However, the discriminant regression analysis method has a problem that it is difficult to discriminate shooting conditions (shooting scenes) because the parameters for calculating the stroboscopic scene and the backlight scene force are very similar.
[0003] 特許文献 1には、判別回帰分析方法に代わる追加補正値の算出方法が開示され ている。特許文献 1に記載の方法は、輝度の累積画素数 (頻度数)を示す輝度ヒスト グラムから、高輝度領域と抵輝度領域を削除し、更に、頻度数を制限したものを用い て、輝度の平均値を算出し、この平均値と基準輝度との差分を補正値として求めるも のである。 [0003] Patent Document 1 discloses a method for calculating an additional correction value in place of the discriminant regression analysis method. The method described in Patent Document 1 deletes the high luminance region and the low luminance region from the luminance histogram indicating the cumulative number of pixels of luminance (frequency number), and further uses the frequency frequency limit to limit the luminance. An average value is calculated, and a difference between the average value and the reference luminance is obtained as a correction value.
[0004] また、特許文献 2には、顔領域の抽出精度を補償するために、撮影時の光源状態 の判別を行う方法が記載されている。特許文献 2に記載の方法は、まず、顔候補領 域を抽出し、抽出した顔候補領域の平均輝度の画像全体に対する偏りを算出し、偏 倚量が大きい場合、撮影条件 (逆光撮影カゝストロボ近接撮影か)の判別を行い、顔領 域としての判断基準の許容幅を調整する。特許文献 2には、顔候補領域の抽出方法 として、特開平 6— 67320号公報に記載の、色相と彩度の 2次元ヒストグラムを用いる 方法、特開平 8— 122944号公報、特開平 8— 184925号公報及び特開平 9 138 471号公報に記載のパターンマッチング、パターン検索方法などが弓 I用されて 、る。 [0004] Patent Document 2 describes a method of determining a light source state at the time of photographing in order to compensate for the extraction accuracy of a face region. In the method described in Patent Document 2, first, a face candidate area is extracted, and the average brightness of the extracted face candidate area is calculated with respect to the entire image. (Shooting close-up flash)) and adjust the tolerance of the judgment criteria for the face area. In Patent Document 2, as a method for extracting a face candidate region, a method using a two-dimensional histogram of hue and saturation described in JP-A-6-67320, JP-A-8-122944, JP-A-8-184925 The pattern matching and pattern search methods described in Japanese Patent Laid-Open No. 9138471 and Japanese Patent Laid-Open No. 9138471 are used for bow I.
[0005] また、特許文献 2には、顔以外の背景領域除去方法としては、特開平 8— 122944
号公報及び特開平 8— 184925号公報に記載の、直線部分の比率、線対象性、画 面外縁との接触率、濃度コントラスト、濃度変化のパターンや周期性を用いて判別す る方法が引用されている。撮影条件の判別には、濃度の 1次元ヒストグラムを用いる 方法が記載されている。この方法は、逆光の場合は顔領域が暗く背景領域が明るい 、ストロボ近接撮影の場合は顔領域が明るく背景領域が暗いという経験則に基づい ている。 [0005] Patent Document 2 discloses a method for removing a background region other than a face as disclosed in JP-A-8-122944. And the method described in Japanese Patent Application Laid-Open No. 8-184925 and the method of discriminating using the ratio of the linear portion, the line object property, the contact ratio with the outer edge of the screen, the density contrast, the pattern of the density change, and the periodicity. Has been. A method that uses a one-dimensional histogram of density is described to determine shooting conditions. This method is based on an empirical rule that the face area is dark and the background area is bright in the case of backlighting, and that the face area is bright and the background area is dark in the case of close-up flash photography.
特許文献 1:特開 2002— 247393号公報 Patent Document 1: JP 2002-247393 A
特許文献 2 :特開 2000— 148980号公報 Patent Document 2: JP 2000-148980 A
[0006] し力しながら、特許文献 1に記載の技術は、逆光シーン、ストロボシーンでの輝度の 偏りの大きい領域の影響は低減されるが、人物を主要被写体とする撮影シーンでは 、顔領域の明度が不適切であるという問題があった。また、特許文献 2に記載の技術 は、典型的な逆光やストロボ近接撮影の場合には、顔領域の特定を補償する効果を 達成することができるが、典型的な構図に当てはまらないと、補償効果が得られなく なるという問題があった。 [0006] However, the technique described in Patent Document 1 reduces the influence of a region having a large luminance deviation in a backlight scene and a strobe scene, but in a shooting scene in which a person is a main subject, There was a problem that the brightness of was inappropriate. In addition, the technique described in Patent Document 2 can achieve the effect of compensating for the identification of the face area in the case of typical backlight or close-up flash photography, but if it does not apply to the typical composition, There was a problem that the effect could not be obtained.
[0007] また、デジタルカメラで撮影された画像データには、露出条件が不適切な状態で撮 影されたものが多ぐ中でも露出不足によるアンダー画像が大半を占めている。逆光 やストロボ近接撮影といった光源条件に由来する撮影条件を判別する際、アンダー 画像をストロボ近接撮影、オーバー画像を逆光シーンと誤判別し、濃度補正を全く正 反対の方向へと導いてしまう問題があった。 [0007] Also, most of image data taken with a digital camera is underexposure due to underexposure, even though there are many images taken with inappropriate exposure conditions. When discriminating shooting conditions derived from light source conditions such as backlighting or close-up flash photography, there is a problem that the under image is mistaken for close-up flash photography and the over image is mistaken for a backlit scene, leading to density correction in the exact opposite direction. there were.
[0008] このように、人物の顔領域を基準とした定量的な補正を実現するため、撮影条件の 判別能力の向上は重要な課題である。更に、撮影条件の判別結果の信頼度を評価 するなど、撮影条件の誤判定に対する対策が望まれて ヽる。 [0008] As described above, in order to realize quantitative correction based on a person's face area, improvement of the imaging condition discrimination capability is an important issue. Furthermore, measures against misjudgment of shooting conditions, such as evaluating the reliability of the judgment result of shooting conditions, are desired.
発明の開示 Disclosure of the invention
[0009] 本発明の課題は、撮影画像データの撮影条件 (光源条件及び露出条件)を定量的 に表す指標と、指標の信頼度を評価する判別マップに基づ 、て階調調整方法を決 定することにより、被写体の明度再現性を向上させることである。 [0009] An object of the present invention is to determine a gradation adjustment method based on an index that quantitatively represents shooting conditions (light source conditions and exposure conditions) of shot image data and a discrimination map that evaluates the reliability of the index. This is to improve the lightness reproducibility of the subject.
[0010] 上記課題を解決するため、項 1に記載の形態は、撮影画像データを、少なくとも、所 定の明度と色相の組み合わせ及び当該撮影画像データの画面の外縁からの距離と
明度の組み合わせのいずれかからなる領域に分割し、当該分割された領域毎に、前 記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、 前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程 と、 [0010] In order to solve the above-mentioned problem, the form described in Item 1 is that the captured image data includes at least a predetermined combination of brightness and hue and a distance from the outer edge of the screen of the captured image data. An occupancy ratio calculating step of dividing the area into any one of the combinations of brightness and calculating an occupancy ratio indicating a ratio of the entire photographic image data for each of the divided areas; and a gradation of the photographic image data A bias amount calculating step for calculating a bias amount indicating a distribution bias; and
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出 工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算 することにより、撮影条件を特定するための指標を算出する指標算出工程と、 前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップ に基づ!/ヽて、前記撮影画像データの撮影条件を判別する判別工程と、 To specify the shooting condition by multiplying the occupation ratio of each area calculated in the occupancy ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the shooting condition. An index calculation step for calculating the index of the image, and a determination for determining the shooting condition of the captured image data based on the calculated index and a determination map divided in advance according to the accuracy of the shooting condition! Process,
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方 法を決定する調整方法決定工程と、 An adjustment method determining step for determining a gradation adjustment method for the captured image data in accordance with the determined shooting conditions;
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処 理を施す階調変換工程と、を含む。 A gradation conversion step of performing gradation conversion processing on the captured image data using the determined gradation adjustment method.
図面の簡単な説明 Brief Description of Drawings
[図 1]本発明の実施形態における画像処理装置の外観構成を示す斜視図。 FIG. 1 is a perspective view showing an external configuration of an image processing apparatus according to an embodiment of the present invention.
[図 2]本実施形態の画像処理装置の内部構成を示すブロック図。 FIG. 2 is a block diagram showing an internal configuration of the image processing apparatus according to the present embodiment.
[図 3]図 2の画像処理部の主要部構成を示すブロック図。 3 is a block diagram showing a main part configuration of the image processing unit in FIG.
圆 4]シーン判別部の内部構成 (a)と、割合算出部の内部構成 (b)と、画像処理条件 算出部の内部構成 (c)を示す図。 圆 4] A diagram showing an internal configuration (a) of the scene determination unit, an internal configuration (b) of the ratio calculation unit, and an internal configuration (c) of the image processing condition calculation unit.
[図 5]画像調整処理部において実行される処理の流れを示すフローチャート。 FIG. 5 is a flowchart showing a flow of processing executed in an image adjustment processing unit.
[図 6]シーン判別部において実行される指標算出処理を示すフローチャート。 FIG. 6 is a flowchart showing index calculation processing executed in the scene determination unit.
[図 7]明度,色相の領域毎に第 1の占有率を算出する第 1の占有率算出処理を示す フローチャート。 FIG. 7 is a flowchart showing a first occupancy ratio calculation process for calculating a first occupancy ratio for each brightness and hue region.
[図 8]RGB力も HSV表色系に変換するプログラムの一例を示す図。 FIG. 8 is a diagram showing an example of a program for converting RGB power into the HSV color system.
[図 9]明度 (V)—色相 (H)平面と、 V— H平面上の領域 rl及び領域 r2を示す図。 FIG. 9 is a diagram showing the brightness (V) —hue (H) plane and the region rl and region r2 on the V—H plane.
[図 10]明度 (V)—色相(H)平面と、 V— H平面上の領域 r3及び領域 r4を示す図。 FIG. 10 is a diagram showing the lightness (V) —hue (H) plane, and regions r3 and r4 on the V—H plane.
[図 11]指標 1を算出するための、第 1の占有率に乗算する第 1の係数を表す曲線を 示す図。
[図 12]指標 2を算出するための、第 1の占有率に乗算する第 2の係数を表す曲線を 示す図。 FIG. 11 is a diagram showing a curve representing a first coefficient for multiplying the first occupancy for calculating index 1; FIG. 12 is a diagram showing a curve representing a second coefficient for multiplying the first occupancy for calculating index 2;
[図 13]撮影画像データの構図に基づ 、て第 2の占有率を算出する第 2の占有率算 出処理を示すフローチャート。 FIG. 13 is a flowchart showing a second occupancy ratio calculation process for calculating a second occupancy ratio based on the composition of captured image data.
[図 14]撮影画像データの画面の外縁からの距離に応じて決定される領域 nl〜n4を 示す図。 FIG. 14 is a diagram showing areas nl to n4 determined according to the distance from the outer edge of the screen of captured image data.
[図 15]指標 3を算出するための、第 2の占有率に乗算する第 3の係数を表す曲線を 領域別(nl〜n4)に示す図。 FIG. 15 is a diagram showing, by region (n1 to n4), curves representing a third coefficient for multiplying the second occupancy ratio for calculating index 3;
[図 16]偏り算出部において実行される偏倚量算出処理を示すフローチャート。 FIG. 16 is a flowchart showing a bias amount calculation process executed in a bias calculator.
[図 17]画像処理条件算出部において実行される階調調整条件決定処理を示すフロ ーテヤート。 FIG. 17 is a flowchart showing tone adjustment condition determination processing executed in the image processing condition calculation unit.
[図 18]撮影条件別に算出された指標 4〜6のプロット図。 [FIG. 18] Plot of indices 4-6 calculated according to shooting conditions.
[図 19]撮影条件を判別するための判別マップを示す図。 FIG. 19 is a diagram showing a discrimination map for discriminating shooting conditions.
[図 20]撮影条件を特定するための指標、パラメータ A〜C、階調調整方法 A〜Cの関 係を示す図。 [FIG. 20] A diagram showing the relationship between an index for specifying shooting conditions, parameters A to C, and gradation adjustment methods A to C.
[図 21]各階調調整方法に対応する階調変換曲線を示す図。 FIG. 21 is a diagram showing a gradation conversion curve corresponding to each gradation adjustment method.
[図 22]輝度の度数分布 (ヒストグラム)(a)、正規化されたヒストグラム (b)及びブロック 分割されたヒストグラム (c)を示す図。 FIG. 22 is a diagram showing a luminance frequency distribution (histogram) (a), a normalized histogram (b), and a block-divided histogram (c).
[図 23]輝度のヒストグラム力ゝらの低輝度領域及び高輝度領域の削除を説明する図(( a)及び (b) )と、輝度の頻度の制限を説明する図( (c)及び (d) )。 FIG. 23 is a diagram ((a) and (b)) for explaining the deletion of the low luminance region and the high luminance region of the luminance histogram power, and a diagram for explaining the limitation of the luminance frequency ((c) and ( d)).
[図 24]撮影条件が逆光又はアンダーである場合の階調調整条件を表す階調変換曲 線を示す図。 FIG. 24 is a diagram showing a gradation conversion curve representing gradation adjustment conditions when the photographing condition is backlight or under.
[図 25]本発明の撮像装置を適用したデジタルカメラの構成を示すブロック図。 FIG. 25 is a block diagram showing a configuration of a digital camera to which the imaging apparatus of the present invention is applied.
発明を実施するための最良の形態 BEST MODE FOR CARRYING OUT THE INVENTION
[0012] 以下、本発明に係る好ましい実施の形態を説明する。 [0012] Preferred embodiments according to the present invention will be described below.
[0013] 項 2に記載の形態は、項 1に記載の画像処理方法において、前記占有率算出工程 では、撮影画像データを、所定の明度と色相の組み合わせカゝらなる領域に分割し、 当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を
算出する。 [0013] In the form described in Item 2, in the image processing method described in Item 1, in the occupancy ratio calculating step, the captured image data is divided into regions that are combinations of predetermined brightness and hue, and For each divided area, an occupancy ratio indicating a ratio of the entire captured image data is set. calculate.
[0014] 項 3に記載の形態は、項 2に記載の画像処理方法において、 [0014] The form described in Item 3 is the image processing method described in Item 2,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定工程を含み、前記階調変換工程において、前記調整方法 決定工程にぉ 、て決定された階調調整方法を用いて、前記撮影画像データに対し 、前記調整量決定工程にお!ヽて決定された階調調整量の階調変換処理を施す。 And an adjustment amount determination step for determining a gradation adjustment amount for the captured image data based on the calculated index. In the gradation conversion step, the level determined by the adjustment method determination step is determined. Using the tone adjustment method, the photographed image data is subjected to gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step.
[0015] 項 4に記載の形態は、項 1に記載の画像処理方法において、前記占有率算出工程 では、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組 み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像デ ータ全体に占める割合を示す占有率を算出する。 [0015] In the form described in Item 4, in the image processing method described in Item 1, in the occupation rate calculating step, the captured image data is a combination of a distance from the outer edge of the screen of the captured image data and brightness. Is divided into predetermined areas, and for each of the divided areas, an occupancy ratio indicating a ratio of the entire captured image data is calculated.
[0016] 項 5に記載の形態は、項 4に記載の画像処理方法において、 [0016] The form described in Item 5 is the image processing method described in Item 4,
さらに前記算出された指標に基づいて、前記撮影画像データに対する階調調整量 を決定する調整量決定工程を含み、前記階調変換工程において、前記調整方法決 定工程にぉ 、て決定された階調調整方法を用いて、前記撮影画像データに対し、 前記調整量決定工程において決定された階調調整量の階調変換処理を施す。 And an adjustment amount determination step for determining a gradation adjustment amount for the captured image data based on the calculated index. In the gradation conversion step, the level determined by the adjustment method determination step is determined. Using the tone adjustment method, tone conversion processing of the tone adjustment amount determined in the adjustment amount determination step is performed on the captured image data.
[0017] 項 6に記載の形態は、項 1記載の画像処理方法において、前記占有率算出工程で は、撮影画像データを、所定の明度と色相の組み合わせカゝらなる領域に分割し、当 該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第 1の占有 率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁から の距離と明度の組み合わせ力 なる所定の領域に分割し、当該分割された領域毎に 、前記撮影画像データ全体に占める割合を示す第 2の占有率を算出し、 [0017] In the form described in Item 6, in the image processing method described in Item 1, in the occupancy rate calculating step, the captured image data is divided into regions corresponding to combinations of predetermined brightness and hue, For each divided area, a first occupancy ratio indicating the ratio of the entire captured image data is calculated, and the captured image data is combined with the distance from the outer edge of the captured image data and the brightness. Dividing into predetermined areas, and for each of the divided areas, calculate a second occupancy ratio indicating the ratio of the entire captured image data,
前記指標算出工程では、前記占有率算出工程において算出された第 1の占有率 及び第 2の占有率と、前記偏倚量算出工程において算出された偏倚量に、撮影条 件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指 標を算出する。 In the index calculation step, the first occupancy rate and the second occupancy rate calculated in the occupancy rate calculation step and the deviation amount calculated in the deviation amount calculation step are preset according to the shooting conditions. The index for specifying the shooting condition is calculated by multiplying the obtained coefficient.
[0018] 項 7に記載の形態は、項 6に記載の画像処理方法において、 [0018] The form described in Item 7 is the image processing method described in Item 6,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定工程を含み、前記階調変換工程において、前記調整方法
決定工程にぉ 、て決定された階調調整方法を用いて、前記撮影画像データに対し 、前記調整量決定工程にお!ヽて決定された階調調整量の階調変換処理を施す。 The method further includes an adjustment amount determination step of determining a gradation adjustment amount for the captured image data based on the calculated index, and in the gradation conversion step, the adjustment method Using the gradation adjustment method determined in the determination step, the photographed image data is subjected to gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step.
[0019] 項 8に記載の形態は、項 4又は 5に記載の画像処理方法にお 、て、前記撮影画像 データの画面の外縁からの距離と明度毎に累積画素数を算出することによって 2次 元ヒストグラムを作成する工程を含み、前記占有率算出工程において、前記作成され た 2次元ヒストグラムに基づ 、て前記占有率が算出される。 [0019] In the form described in Item 8, in the image processing method described in Item 4 or 5, the number of accumulated pixels is calculated for each distance and brightness from the outer edge of the screen of the captured image data. A occupancy ratio calculating step, wherein the occupancy ratio is calculated based on the generated two-dimensional histogram.
[0020] 項 9に記載の形態は、項 6又は 7に記載の画像処理方法にお 、て、前記撮影画像 データの画面の外縁からの距離と明度毎に累積画素数を算出することによって 2次 元ヒストグラムを作成する工程を含み、前記占有率算出工程において、前記作成され た 2次元ヒストグラムに基づいて前記第 2の占有率が算出される。 [0020] In the form described in Item 9, in the image processing method described in Item 6 or 7, the cumulative number of pixels is calculated for each distance and brightness from the outer edge of the screen of the captured image data. Including a step of creating a dimension histogram, wherein the second occupancy rate is calculated based on the created two-dimensional histogram in the occupancy rate calculation step.
[0021] 項 10に記載の形態は、項 2又は 3に記載の画像処理方法において、前記撮影画 像データの所定の色相、明度毎に累積画素数を算出することによって 2次元ヒストグ ラムを作成する工程を含み、前記占有率算出工程において、前記作成された 2次元 ヒストグラムに基づいて前記占有率が算出される。 [0021] In the form described in Item 10, in the image processing method described in Item 2 or 3, a two-dimensional histogram is created by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data. In the occupation rate calculation step, the occupation rate is calculated based on the created two-dimensional histogram.
[0022] 項 11に記載の形態は、項 6又は 7に記載の画像処理方法にお 、て、前記撮影画 像データの所定の色相、明度毎に累積画素数を算出することによって 2次元ヒストグ ラムを作成する工程を含み、前記占有率算出工程において、前記作成された 2次元 ヒストグラムに基づいて前記第 1の占有率が算出される。 [0022] In the form described in Item 11, in the image processing method described in Item 6 or 7, a two-dimensional histogram is calculated by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. Including a step of creating a ram, and in the occupation rate calculating step, the first occupation rate is calculated based on the created two-dimensional histogram.
[0023] 項 12に記載の形態は、項 1、 2、 3、 6、 7、 9〜: L 1の何れか一項に記載の画像処理 方法において、前記指標算出工程において、所定の高明度の肌色色相領域と、当 該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられる。 [0023] In the image processing method according to any one of Items 1, 2, 3, 6, 7, 9 to: L1, the form described in Item 12 includes a predetermined high brightness in the index calculation step. The coefficients with different signs are used for the skin color hue area of the color tone and the hue area other than the high brightness skin color hue area.
[0024] 項 13に記載の形態は、項 1、 2、 3、 6、 7、 9〜 12の何れか一項に記載の画像処理 方法において、前記指標算出工程において、肌色色相領域の中間明度領域と、当 該中間明度領域以外の明度領域とで異なる符号の係数が用いられる。 [0024] In the image processing method according to any one of Items 1, 2, 3, 6, 7, and 9 to 12, the form described in Item 13 is an intermediate lightness of a flesh color hue region in the index calculation step. Different code coefficients are used for the region and the lightness region other than the intermediate lightness region.
[0025] 項 14に記載の形態は、項 12に記載の画像処理方法において、前記高明度の肌 色色相領域以外の色相領域の明度領域が、所定の高明度領域である。 [0025] In the form described in Item 14, in the image processing method described in Item 12, the brightness area of the hue area other than the high brightness skin color hue area is a predetermined high brightness area.
[0026] 項 15に記載の形態は、項 13に記載の画像処理方法において、前記中間明度領 域以外の明度領域が、肌色色相領域内の明度領域である。
[0027] 項 16に記載の形態は、項 12又は 14に記載の画像処理方法において、前記高明 度の肌色色相領域には、 HSV表色系の明度値で 170〜224の範囲の領域が含ま れる。 [0026] In the form described in Item 15, in the image processing method described in Item 13, the brightness area other than the intermediate brightness area is a brightness area in the flesh-color hue area. [0027] In the form described in Item 16, in the image processing method described in Item 12 or 14, the skin color hue region of high brightness includes a region in the range of 170 to 224 in terms of brightness value of the HSV color system. It is.
[0028] 項 17に記載の形態は、項 13又は 15に記載の画像処理方法において、前記中間 明度領域には、 HSV表色系の明度値で 85〜169の範囲の領域が含まれる。 [0028] In the form described in Item 17, in the image processing method described in Item 13 or 15, the intermediate brightness region includes a region in the range of 85 to 169 in terms of the brightness value of the HSV color system.
[0029] 項 18に記載の形態は、項 12、 14、 16の何れか一項に記載の画像処理方法にお いて、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相 領域の少なくとも一方が含まれる。 [0029] The form described in Item 18 is the image processing method according to any one of Items 12, 14, and 16, wherein a hue region other than the high brightness skin color hue region includes a blue hue region, At least one of the green hue regions is included.
[0030] 項 19に記載の形態は、項 13、 15、 17の何れか一項に記載の画像処理方法にお いて、前記中間明度領域以外の明度領域がシャドー領域である。 [0030] In the form described in Item 19, in the image processing method described in any one of Items 13, 15, and 17, the lightness region other than the intermediate lightness region is a shadow region.
[0031] 項 20に記載の形態は、項 18に記載の画像処理方法において、前記青色色相領 域の色相値は、 HSV表色系の色相値で 161〜250の範囲内にあり、前記緑色色相 領域の色相値は、 HSV表色系の色相値で 40〜 160の範囲内にある。 [0031] The form described in Item 20 is the image processing method described in Item 18, wherein the hue value of the blue hue region is in the range of 161 to 250 in terms of the hue value of the HSV color system. The hue value in the hue area is in the range of 40 to 160 in the HSV color system.
[0032] 項 21に記載の形態は、項 19に記載の画像処理方法にぉ 、て、前記シャドー領域 の明度値は、 HSV表色系の明度値で 26〜84の範囲内にある。 In the form described in Item 21, in the image processing method described in Item 19, the brightness value of the shadow area is in the range of 26 to 84 as the brightness value of the HSV color system.
[0033] 項 22および項 23に記載の形態は、項 12〜21の何れか一項に記載の画像処理方 法において、前記肌色色相領域の色相値は、 HSV表色系の色相値で 0〜39及び 3[0033] The form described in Item 22 and Item 23 is the image processing method described in any one of Items 12 to 21, wherein the hue value of the flesh color hue region is a hue value of the HSV color system. ~ 39 and 3
30〜359の範囲内にある。 It is in the range of 30-359.
[0034] 項 24および項 25に記載の形態は、項 12〜23の何れか一項に記載の画像処理方 法において、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により 2つ の領域に分割される。 [0034] The form described in Item 24 and Item 25 is the image processing method described in any one of Items 12 to 23, in which the skin color hue region is expressed by a predetermined conditional expression based on lightness and saturation. It is divided into one area.
[0035] 項 26に記載の形態は、項 1〜25の何れか一項に記載の画像処理方法において、 前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面 中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの 少なくとも一つが含まれる。 [0035] In the form described in Item 26, in the image processing method described in any one of Items 1 to 25, the deviation amount includes a brightness deviation amount of the photographed image data, and a screen of the photographed image data. It contains at least one of the average brightness value in the center and the brightness difference value calculated under different conditions.
[0036] ここで、撮影画像データの明るさの偏差量とは、例えば、撮影画像データの輝度の 標準偏差、分散等である。また、撮影画像データの画面中央部における明るさの平 均値とは、例えば、画面中央部における平均輝度値、画面中央部における肌色領域
の平均輝度値等である。また、異なる条件で算出された明るさの差分値とは、例えば 、撮影画像データの最大輝度値と最小輝度値の差分値等である。 Here, the brightness deviation amount of the photographed image data is, for example, the standard deviation or variance of the brightness of the photographed image data. In addition, the average brightness value of the captured image data at the center of the screen is, for example, the average luminance value at the center of the screen, or the skin color area at the center of the screen. The average luminance value of. Further, the brightness difference value calculated under different conditions is, for example, a difference value between the maximum brightness value and the minimum brightness value of the captured image data.
[0037] 項 27に記載の形態は、項 1〜26の何れか一項に記載の画像処理方法において、 前記撮影条件は、撮影時の光源条件及び露出条件を示し、 [0037] The form according to Item 27 is the image processing method according to any one of Items 1 to 26, wherein the photographing condition indicates a light source condition and an exposure condition at the time of photographing,
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャ ッタースピード、絞り値に由来するアンダー撮影状態が含まれる。 The light source condition includes a flash photographing state, and the exposure condition includes an under photographing state derived from a shutter speed and an aperture value at the time of photographing.
[0038] 項 28に記載の形態は、撮影画像データを、少なくとも、所定の明度と色相の組み 合わせ及び当該撮影画像データの画面の外縁からの距離と明度の組み合わせのい ずれかからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体 に占める割合を示す占有率を算出する占有率算出部と、 [0038] In the form described in Item 28, the photographed image data is at least in a region including any combination of a predetermined brightness and hue and a combination of the distance from the outer edge of the screen and the brightness of the photographed image data. An occupancy ratio calculating unit that divides and calculates an occupancy ratio indicating a ratio of the entire captured image data for each of the divided areas;
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出部と、 前記占有率算出部において算出された各領域の占有率及び前記偏倚量算出部 において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算するこ とにより、撮影条件を特定するための指標を算出する指標算出部と、 A deviation amount calculation unit that calculates a deviation amount indicating a deviation in gradation distribution of the photographed image data, an occupancy rate of each area calculated by the occupancy rate calculation unit, and a deviation amount calculated by the deviation amount calculation unit An index calculation unit that calculates an index for specifying the shooting condition by multiplying a preset coefficient according to the shooting condition;
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップ に基づ!/ヽて、前記撮影画像データの撮影条件を判別する判別部と、 A discriminator for discriminating the shooting condition of the shot image data based on the calculated index and a discrimination map pre-divided into regions according to the accuracy of the shooting condition;
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方 法を決定する調整方法決定部と、 An adjustment method determining unit that determines a gradation adjustment method for the captured image data according to the determined shooting condition;
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処 理を施す階調変換部と、を含む画像処理装置である。 An image processing apparatus including a gradation conversion unit that performs gradation conversion processing on the captured image data using the determined gradation adjustment method.
[0039] 項 29に記載の形態は、項 28に記載の画像処理装置において、前記占有率算出 部では、撮影画像データを、所定の明度と色相の組み合わせカゝらなる領域に分割し 、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率 を算出する。 [0039] In the form described in Item 29, in the image processing device described in Item 28, the occupancy ratio calculation unit divides the captured image data into regions that are combinations of predetermined brightness and hue, and For each divided area, an occupancy ratio indicating the ratio of the entire captured image data is calculated.
[0040] 項 30に記載の形態は、項 29に記載の画像処理装置において、 [0040] The form described in Item 30 is the image processing apparatus described in Item 29,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定部を備え、前記階調変換部において、前記調整方法決定 部により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整
量決定部により決定された階調調整量の階調変換処理を施す。 Further, an adjustment amount determination unit that determines a gradation adjustment amount for the captured image data based on the calculated index is provided, and in the gradation conversion unit, the gradation adjustment method determined by the adjustment method determination unit The adjustment is performed on the captured image data using A gradation conversion process of the gradation adjustment amount determined by the amount determination unit is performed.
[0041] 項 31に記載の形態は、項 28に記載の画像処理装置において、前記占有率算出 部では、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の 組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像 データ全体に占める割合を示す占有率を算出する。 [0041] In the form described in Item 31, in the image processing device described in Item 28, the occupancy ratio calculation unit includes a combination of the distance from the outer edge of the screen of the captured image data and the brightness. The area is divided into predetermined areas, and for each of the divided areas, an occupation ratio indicating a ratio of the entire captured image data is calculated.
[0042] 項 32に記載の形態は、項 31に記載の画像処理装置において、 [0042] The form described in Item 32 is the image processing device described in Item 31,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定部を備え、 And an adjustment amount determination unit that determines a gradation adjustment amount for the captured image data based on the calculated index,
前記階調変換部において、前記調整方法決定部により決定された階調調整方法 を用いて、前記撮影画像データに対し、前記調整量決定部により決定された階調調 整量の階調変換処理を施す。 In the gradation conversion unit, gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination unit is performed on the captured image data using the gradation adjustment method determined by the adjustment method determination unit. Apply.
[0043] 項 33に記載の形態は、項 28に記載の画像処理装置において、前記占有率算出 部では、撮影画像データを、所定の明度と色相の組み合わせカゝらなる領域に分割し 、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第 1の占 有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁か らの距離と明度の組み合わせ力 なる所定の領域に分割し、当該分割された領域毎 に、前記撮影画像データ全体に占める割合を示す第 2の占有率を算出し、前記指標 算出部では、前記占有率算出部により算出された第 1の占有率及び第 2の占有率と 、前記偏倚量算出部により算出された偏倚量に、撮影条件に応じて予め設定された 係数を乗算することにより、撮影条件を特定するための指標を算出する。 [0043] In the form described in Item 33, in the image processing device described in Item 28, the occupancy ratio calculation unit divides the captured image data into regions that are combinations of predetermined brightness and hue, and For each divided area, a first occupancy ratio indicating the ratio of the entire captured image data is calculated, and the captured image data is combined with the distance from the outer edge of the captured image data and the light intensity combination power. A second occupancy ratio indicating a ratio of the entire captured image data is calculated for each of the divided areas, and the index calculation unit calculates the occupancy ratio calculation unit. An index for identifying the shooting condition by multiplying the first occupancy ratio and the second occupancy ratio by the coefficient set in advance according to the shooting condition to the deviation amount calculated by the deviation amount calculation unit. Is calculated.
[0044] 項 34に記載の形態は、項 33に記載の画像処理装置において、 The form described in Item 34 is the image processing apparatus described in Item 33,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定部を備え、前記階調変換部において、前記調整方法決定 部により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整 量決定部により決定された階調調整量の階調変換処理を施す。 Further, an adjustment amount determination unit that determines a gradation adjustment amount for the captured image data based on the calculated index is provided, and in the gradation conversion unit, the gradation adjustment method determined by the adjustment method determination unit Is used to perform gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination unit on the captured image data.
[0045] 項 35に記載の形態は、項 31又は 32に記載の画像処理装置において、前記撮影 画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって 2次元ヒストグラムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記
作成された 2次元ヒストグラムに基づ 、て前記占有率を算出する。 In the form described in Item 35, in the image processing device described in Item 31 or 32, a two-dimensional histogram is obtained by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. A histogram creation unit to create, and the occupancy rate calculation unit, The occupation ratio is calculated based on the created two-dimensional histogram.
[0046] 項 36に記載の形態は、項 33又は 34に記載の画像処理装置において、前記撮影 画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって 2次元ヒストグラムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記 作成された 2次元ヒストグラムに基づいて前記第 2の占有率を算出する。 [0046] In the form described in Item 36, in the image processing device described in Item 33 or 34, a two-dimensional histogram is obtained by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. A histogram creation unit is provided, and the occupation rate calculation unit calculates the second occupation rate based on the created two-dimensional histogram.
[0047] 項 37に記載の形態は、項 29又は 30に記載の画像処理装置において、前記撮影 画像データの所定の色相、明度毎に累積画素数を算出することによって 2次元ヒスト グラムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記作成された 2次元ヒストグラムに基づ 、て前記占有率を算出する。 [0047] In the form described in Item 37, in the image processing device described in Item 29 or 30, a two-dimensional histogram is created by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data. A histogram creation unit is provided, and the occupation rate calculation unit calculates the occupation rate based on the created two-dimensional histogram.
[0048] 項 38に記載の形態は、項 33又は 34に記載の画像処理装置において、前記撮影 画像データの所定の色相、明度毎に累積画素数を算出することによって 2次元ヒスト グラムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記作成された 2次元ヒストグラムに基づいて前記第 1の占有率を算出する。 [0048] In the form described in Item 38, in the image processing device described in Item 33 or 34, a two-dimensional histogram is created by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data. A histogram creation unit is provided, and the occupation rate calculation unit calculates the first occupation rate based on the created two-dimensional histogram.
[0049] 項 39に記載の形態 ίま、項 28、 29、 30、 33、 34、 36〜38の何れ力一項に記載の 画像処理装置において、前記指標算出部では、所定の高明度の肌色色相領域と、 当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられる。 [0049] In the image processing device described in any one of the forms described in Item 39, Item 28, 29, 30, 33, 34, 36 to 38, the index calculation unit has a predetermined high brightness. Different code coefficients are used for the flesh-color hue area and the hue area other than the high-brightness flesh-color hue area.
[0050] 項 40に記載の形態 ίま、項 28、 29、 30、 33、 34、 36〜39の何れ力一項に記載の 画像処理装置において、前記指標算出部では、肌色色相領域の中間明度領域と、 当該中間明度領域以外の明度領域とで異なる符号の係数が用いられる。 [0050] In the image processing apparatus according to any one of Items 28, 29, 30, 33, 34, and 36 to 39, the index calculation unit includes an intermediate part of a flesh-color hue region. Different code coefficients are used for the lightness region and the lightness region other than the intermediate lightness region.
[0051] 項 41に記載の形態は、項 39に記載の画像処理装置において、前記高明度の肌 色色相領域以外の色相領域の明度領域が、所定の高明度領域である。 [0051] In the form described in Item 41, in the image processing device described in Item 39, the lightness region of the hue region other than the high-brightness skin color hue region is a predetermined high-lightness region.
[0052] 項 42に記載の形態は、項 40に記載の画像処理装置において、前記中間明度領 域以外の明度領域が、肌色色相領域内の明度領域である。 [0052] In the form described in Item 42, in the image processing device described in Item 40, the lightness area other than the intermediate lightness area is a lightness area in the flesh-color hue area.
[0053] 項 43に記載の形態は、項 39又は 41に記載の画像処理装置において、前記高明 度の肌色色相領域には、 HSV表色系の明度値で 170〜224の範囲の領域が含ま れる。 [0053] In the form described in Item 43, in the image processing device described in Item 39 or 41, the high-brightness skin color hue region includes a region in the range of 170 to 224 in terms of the brightness value of the HSV color system. It is.
[0054] 項 44に記載の形態は、項 40又は 42に記載の画像処理装置において、前記中間 明度領域には、 HSV表色系の明度値で 85〜169の範囲の領域が含まれる。
[0055] 項 45に記載の形態は、項 39、 41、 43の何れか一項に記載の画像処理装置にお いて、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相 領域の少なくとも一方が含まれる。 [0054] In the form described in Item 44, in the image processing device described in Item 40 or 42, the intermediate brightness region includes a region in the range of 85 to 169 in terms of the brightness value of the HSV color system. [0055] In the form described in Item 45, in the image processing device described in any one of Items 39, 41, and 43, the hue region other than the high brightness skin color hue region includes a blue hue region, At least one of the green hue regions is included.
[0056] 項 46に記載の形態は、項 40、 42、 44の何れか一項に記載の画像処理装置にお いて、前記中間明度領域以外の明度領域がシャドー領域である。 [0056] In the form described in Item 46, in the image processing device described in any one of Items 40, 42, and 44, the lightness region other than the intermediate lightness region is a shadow region.
[0057] 項 47に記載の形態は、項 45に記載の画像処理装置にお 、て、前記青色色相領 域の色相値は、 HSV表色系の色相値で 161〜250の範囲内にあり、前記緑色色相 領域の色相値は、 HSV表色系の色相値で 40〜 160の範囲内にある。 [0057] In the form described in Item 47, in the image processing device described in Item 45, the hue value of the blue hue region is in the range of 161 to 250 in terms of the hue value of the HSV color system. The hue value of the green hue region is in the range of 40 to 160 as the hue value of the HSV color system.
[0058] 項 48に記載の形態は、項 46に記載の画像処理装置にお 、て、前記シャドー領域 の明度値は、 HSV表色系の明度値で 26〜84の範囲内にある。 [0058] In the form described in Item 48, in the image processing device described in Item 46, the brightness value of the shadow area is in the range of 26 to 84 as the brightness value of the HSV color system.
[0059] 項 49および 50に記載の形態は、項 39〜48の何れか一項に記載の画像処理装置 において、前記肌色色相領域の色相値は、 HSV表色系の色相値で 0〜39及び 33[0059] In the image processing device according to any one of Items 39 to 48, the hue value of the flesh color hue region is 0 to 39 in the HSV color system. And 33
0〜359の範囲内にある。 It is in the range of 0-359.
[0060] 項 51および 52に記載の形態は、項 39〜50の何れか一項に記載の画像処理装置 において、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により 2つの 領域に分割される。 [0060] In the image processing device according to any one of Items 39 to 50, the skin color hue region is divided into two regions according to a predetermined conditional expression based on lightness and saturation. It is divided into.
[0061] 項 53に記載の形態は、項 28〜52の何れか一項に記載の画像処理装置において 、前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面 中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの 少なくとも一つが含まれる。 [0061] In the form described in Item 53, in the image processing device described in any one of Items 28 to 52, the deviation amount includes a deviation amount of brightness of photographed image data, and a screen of the photographed image data. It contains at least one of the average brightness value in the center and the brightness difference value calculated under different conditions.
[0062] 項 54に記載の形態は、項 28〜53の何れか一項に記載の画像処理装置において 、前記撮影条件は、撮影時の光源条件及び露出条件を示し、前記光源条件にはスト ロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に 由来するアンダー撮影状態が含まれる。 [0062] In the form described in Item 54, in the image processing apparatus described in any one of Items 28 to 53, the photographing condition indicates a light source condition and an exposure condition at the time of photographing. A robot shooting state is included, and the exposure condition includes an under shooting state derived from the shutter speed and aperture value at the time of shooting.
[0063] 項 55に記載の形態は、被写体を撮影して撮影画像データを取得する撮像部と、前 記撮影画像データを、少なくとも、所定の明度と色相の組み合わせ及び当該撮影画 像データの画面の外縁からの距離と明度の組み合わせのいずれかからなる領域に 分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す
占有率を算出する占有率算出部と、 [0063] In the form described in Item 55, an image capturing unit that captures captured image data by capturing a subject, and the captured image data include at least a combination of predetermined brightness and hue and a screen of the captured image data. Is divided into areas consisting of any combination of distance and brightness from the outer edge, and the ratio of the divided area to the entire captured image data is indicated for each of the divided areas. An occupancy rate calculation unit for calculating an occupancy rate;
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出部と、 前記占有率算出部において算出された各領域の占有率及び前記偏倚量算出部 において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算するこ とにより、撮影条件を特定するための指標を算出する指標算出部と、 A deviation amount calculation unit that calculates a deviation amount indicating a deviation in gradation distribution of the photographed image data, an occupancy rate of each area calculated by the occupancy rate calculation unit, and a deviation amount calculated by the deviation amount calculation unit An index calculation unit that calculates an index for specifying the shooting condition by multiplying a preset coefficient according to the shooting condition;
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップ に基づ!/ヽて、前記撮影画像データの撮影条件を判別する判別部と、 A discriminator for discriminating the shooting condition of the shot image data based on the calculated index and a discrimination map pre-divided into regions according to the accuracy of the shooting condition;
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方 法を決定する調整方法決定部と、 An adjustment method determining unit that determines a gradation adjustment method for the captured image data according to the determined shooting condition;
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処 理を施す階調変換部と、を備える撮像装置である。 A gradation conversion unit that performs gradation conversion processing on the photographed image data using the determined gradation adjustment method.
[0064] 項 56に記載の形態は、項 55に記載の撮像装置において、前記占有率算出部では 、前記撮影画像データを、所定の明度と色相の組み合わせ力 なる領域に分割し、 当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を 算出する。 [0064] In the form described in Item 56, in the imaging device described in Item 55, the occupation ratio calculation unit divides the photographed image data into regions having a combination of predetermined brightness and hue, and the divided image data is divided. For each area, an occupancy ratio indicating the ratio of the entire captured image data is calculated.
[0065] 項 57に記載の形態は、項 56に記載の撮像装置において、 [0065] The form according to Item 57 is the imaging apparatus according to Item 56,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定部を備え、前記階調変換では、前記調整方法決定部によ り決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定 部により決定された階調調整量の階調変換処理を施す。 Furthermore, an adjustment amount determination unit that determines a gradation adjustment amount for the captured image data based on the calculated index is provided, and in the gradation conversion, the gradation adjustment determined by the adjustment method determination unit Using the method, the photographed image data is subjected to gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination unit.
[0066] 項 58に記載の形態は、項 55に記載の撮像装置において、前記占有率算出部では 、前記撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の 組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像 データ全体に占める割合を示す占有率を算出する。 [0066] In the form described in Item 58, in the imaging device described in Item 55, the occupancy ratio calculation unit includes a combination of a distance from the outer edge of the screen of the captured image data and brightness. The area is divided into predetermined areas, and for each of the divided areas, an occupation ratio indicating a ratio of the entire captured image data is calculated.
[0067] 項 59に記載の形態は、項 58に記載の撮像装置において、 [0067] The configuration according to Item 59, in the imaging device according to Item 58,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定部を備え、前記階調変換部において、前記調整方法決定 部により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整
量決定部により決定された階調調整量の階調変換処理を施す。 Further, an adjustment amount determination unit that determines a gradation adjustment amount for the captured image data based on the calculated index is provided, and in the gradation conversion unit, the gradation adjustment method determined by the adjustment method determination unit The adjustment is performed on the captured image data using A gradation conversion process of the gradation adjustment amount determined by the amount determination unit is performed.
[0068] 項 60に記載の形態は、項 55に記載の撮像装置において、前記占有率算出部では 、前記撮影画像データを、所定の明度と色相の組み合わせ力 なる領域に分割し、 当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第 1の占 有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁か らの距離と明度の組み合わせ力 なる所定の領域に分割し、当該分割された領域毎 に、前記撮影画像データ全体に占める割合を示す第 2の占有率を算出し、 前記指標算出部では、前記占有率算出部により算出された第 1の占有率及び第 2 の占有率と、前記偏倚量算出部により算出された偏倚量に、撮影条件に応じて予め 設定された係数を乗算することにより、撮影条件を特定するための指標を算出する。 [0068] In the form described in Item 60, in the imaging device described in Item 55, the occupation ratio calculation unit divides the photographed image data into regions having a combination of predetermined brightness and hue, and the divided image data is divided. For each region, a first occupancy ratio indicating the ratio of the entire captured image data is calculated, and the captured image data is determined to be a predetermined combination power of distance and brightness from the outer edge of the captured image data screen. A second occupancy ratio indicating a ratio of the entire captured image data is calculated for each of the divided areas, and the index calculation unit calculates the first occupancy ratio calculated by the occupancy ratio calculation unit. The index for identifying the shooting condition is calculated by multiplying the occupancy ratio and the second occupancy ratio by the deviation amount calculated by the deviation amount calculation unit by a coefficient set in advance according to the shooting condition. To do.
[0069] 項 61に記載の形態は、項 60に記載の撮像装置において、 [0069] The configuration according to Item 61, in the imaging device according to Item 60,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定部を備え、前記階調変換部において、前記調整方法決定 部により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整 量決定部により決定された階調調整量の階調変換処理を施す。 Further, an adjustment amount determination unit that determines a gradation adjustment amount for the captured image data based on the calculated index is provided, and in the gradation conversion unit, the gradation adjustment method determined by the adjustment method determination unit Is used to perform gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination unit on the captured image data.
[0070] 項 62に記載の形態は、項 58又は 59に記載の撮像装置において、前記撮影画像 データの画面の外縁からの距離と明度毎に累積画素数を算出することによって 2次 元ヒストグラムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記作成 された 2次元ヒストグラムに基づ 、て前記占有率を算出する。 [0070] In the form described in Item 62, in the imaging device described in Item 58 or 59, a two-dimensional histogram is calculated by calculating a cumulative pixel count for each distance and brightness from the outer edge of the screen of the captured image data. A histogram creation unit is provided, and the occupancy rate calculation unit calculates the occupancy rate based on the created two-dimensional histogram.
[0071] 項 63に記載の形態は、項 60又は 61に記載の撮像装置において、前記撮影画像 データの画面の外縁からの距離と明度毎に累積画素数を算出することによって 2次 元ヒストグラムを作成するヒストグラム作成部を備え、 [0071] In the configuration described in Item 63, in the imaging device described in Item 60 or 61, a two-dimensional histogram is obtained by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. It has a histogram creation part to create,
前記占有率算出部は、前記作成された 2次元ヒストグラムに基づいて前記第 2の占 有率を算出する。 The occupation ratio calculation unit calculates the second occupation ratio based on the created two-dimensional histogram.
[0072] 項 64に記載の形態は、項 56又は 57に記載の撮像装置にお 、て、前記撮影画像 データの所定の色相、明度毎に累積画素数を算出することによって 2次元ヒストグラ ムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記作成された 2次 元ヒストグラムに基づ 、て前記占有率を算出する。
[0073] 項 65に記載の形態は、項 60又は 61に記載の撮像装置にぉ 、て、前記撮影画像 データの所定の色相、明度毎に累積画素数を算出することによって 2次元ヒストグラ ムを作成するヒストグラム作成部を備え、前記占有率算出部は、前記作成された 2次 元ヒストグラムに基づ 、て前記第 1の占有率を算出する。 [0072] In the form described in Item 64, in the imaging device described in Item 56 or 57, the two-dimensional histogram is calculated by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data. A histogram creation unit is provided, and the occupancy rate calculation unit calculates the occupancy rate based on the created 2D histogram. [0073] In the configuration described in Item 65, the two-dimensional histogram is calculated by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data in the imaging device described in Item 60 or 61. A histogram creation unit is provided, and the occupancy rate calculation unit calculates the first occupancy rate based on the created 2D histogram.
[0074] 項 66に記載の形態 ίま、項 55、 56、 57、 60、 61、 63〜65の何れ力一項に記載の 撮像装置において、前記指標算出部では、所定の高明度の肌色色相領域と、当該 高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられる。 [0074] In the imaging device according to any one of the forms described in Item 66, Item 55, 56, 57, 60, 61, 63 to 65, the index calculation unit includes a skin color having a predetermined high brightness. Different sign coefficients are used for the hue area and the hue area other than the high brightness skin color hue area.
[0075] 項 67に記載の形態 ίま、項 55、 56、 57、 60、 61、 63〜66の何れ力一項に記載の 撮像装置において、前記指標算出部では、肌色色相領域の中間明度領域と、当該 中間明度領域以外の明度領域とで異なる符号の係数が用いられる。 [0075] In the imaging device according to any one of the forms described in Item 67, Item 55, 56, 57, 60, 61, 63 to 66, the index calculation unit includes the intermediate lightness of the flesh color hue region. Different sign coefficients are used for the region and the lightness region other than the intermediate lightness region.
[0076] 項 68に記載の形態は、項 66に記載の撮像装置において、前記高明度の肌色色 相領域以外の色相領域の明度領域が、所定の高明度領域である。 In the form described in Item 68, in the imaging device described in Item 66, the brightness region of the hue region other than the high-brightness skin color hue region is a predetermined high brightness region.
[0077] 項 69に記載の形態は、項 67に記載の撮像装置において、前記中間明度領域以 外の明度領域が、肌色色相領域内の明度領域である。 [0077] In the form described in Item 69, in the imaging device described in Item 67, the brightness area other than the intermediate brightness area is a brightness area in the flesh-color hue area.
[0078] 項 70に記載の形態は、項 66又は 68に記載の撮像装置において、前記高明度の 肌色色相領域には、 HSV表色系の明度値で 170〜224の範囲の領域が含まれる。 [0078] In the form described in Item 70, in the imaging device described in Item 66 or 68, the skin color hue region of high brightness includes a region in the range of 170 to 224 in terms of brightness value of the HSV color system. .
[0079] 項 71に記載の形態は、項 67又は 69に記載の撮像装置において、前記中間明度 領域には、 HSV表色系の明度値で 85〜169の範囲の領域が含まれる。 [0079] In the form described in Item 71, in the imaging device described in Item 67 or 69, the intermediate brightness region includes a region in the range of 85 to 169 in terms of the brightness value of the HSV color system.
[0080] 項 72に記載の形態は、項 66、 68、 70の何れか一項に記載の撮像装置において、 前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域 の少なくとも一方が含まれる。 [0080] In the imaging device according to any one of Items 66, 68, and 70, the form according to Item 72 includes a blue hue region and a green hue region in the hue region other than the high brightness skin color hue region. At least one of them.
[0081] 項 73に記載の形態は、項 67、 69、 71の何れか一項に記載の撮像装置において、 前記中間明度領域以外の明度領域がシャドー領域である。 [0081] In the form described in Item 73, in the imaging device described in any one of Items 67, 69, and 71, the lightness region other than the intermediate lightness region is a shadow region.
[0082] 項 74に記載の形態は、項 72に記載の撮像装置にお 、て、前記青色色相領域の 色相値は、 HSV表色系の色相値で 161〜250の範囲内にあり、前記緑色色相領域 の色相値は、 HSV表色系の色相値で 40〜 160の範囲内にある。 [0082] In the form described in Item 74, in the imaging device described in Item 72, the hue value of the blue hue region is in a range of 161 to 250 in terms of the hue value of the HSV color system, The hue value in the green hue region is in the range of 40 to 160 in the HSV color system.
[0083] 項 75に記載の形態は、項 73に記載の撮像装置にぉ 、て、前記シャドー領域の明 度値は、 HSV表色系の明度値で 26〜84の範囲内にある。
[0084] 項 76および 77に記載の形態は、項 66〜75の何れか一項に記載の撮像装置にお いて、前記肌色色相領域の色相値は、 HSV表色系の色相値で 0〜39及び 330〜3 59の範囲内にある。 In the form described in Item 75, in the imaging device described in Item 73, the brightness value of the shadow area is in the range of 26 to 84 as the brightness value of the HSV color system. [0084] In the imaging device according to any one of Items 66 to 75, the hue value of the flesh color hue region is a hue value of the HSV color system in the form described in Item 76 and 77. It is in the range of 39 and 330-359.
[0085] 項 78および 79に記載の形態は、項 66〜77の何れか一項に記載の撮像装置にお いて、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により 2つの領域 に分割される。 [0085] In the imaging device according to any one of Items 66 to 77, the form described in Item 78 and 79 includes two skin color hue regions according to a predetermined conditional expression based on brightness and saturation. Divided into regions.
[0086] 項 80に記載の形態は、項 55〜79の何れか一項に記載の撮像装置において、前 記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中 央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少な くとも一つが含まれる。 [0086] In the configuration described in Item 80, in the imaging device described in any one of Items 55 to 79, the deviation amount includes a brightness deviation amount of captured image data, a screen of the captured image data. It includes at least one of the average brightness value in the center and the brightness difference value calculated under different conditions.
[0087] 項 81に記載の形態は、項 55〜80の何れか一項に記載の撮像装置において、前 記撮影条件は、撮影時の光源条件及び露出条件を示し、前記光源条件にはストロボ 撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来 するアンダー撮影状態が含まれる。 [0087] In the form described in Item 81, in the imaging device described in any one of Items 55 to 80, the imaging condition indicates a light source condition and an exposure condition at the time of imaging, and the light source condition includes a strobe. The exposure condition includes an under shooting state derived from the shutter speed and aperture value at the time of shooting.
[0088] 項 82に記載の形態は、画像処理を実行するためのコンピュータに、 [0088] The form according to Item 82 is provided in a computer for executing image processing.
撮影画像データを、少なくとも、所定の明度と色相の組み合わせ及び当該撮影画像 データの画面の外縁からの距離と明度の組み合わせのいずれかからなる領域に分 割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占 有率を算出する占有率算出工程と、 The photographed image data is divided into at least a predetermined combination of brightness and hue and a combination of the distance and brightness from the outer edge of the screen of the photographed image data, and for each of the divided areas, An occupancy ratio calculating step for calculating an occupancy ratio indicating the ratio of the entire captured image data;
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程 と、 A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the captured image data;
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出 工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算 することにより、撮影条件を特定するための指標を算出する指標算出工程と、 前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップ に基づ!/ヽて、前記撮影画像データの撮影条件を判別する判別工程と、 To specify the shooting condition by multiplying the occupation ratio of each area calculated in the occupancy ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the shooting condition. An index calculation step for calculating the index of the image, and a determination for determining the shooting condition of the captured image data based on the calculated index and a determination map divided in advance according to the accuracy of the shooting condition! Process,
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方 法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処 理を施す階調変換工程と、を含む画像処理プログラムである。 An adjustment method determining step for determining a gradation adjustment method for the captured image data in accordance with the determined shooting conditions; A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.
[0089] 項 83に記載の形態は、項 82に記載の画像処理プログラムにお 、て、前記占有率 算出工程では、撮影画像データを、所定の明度と色相の組み合わせカゝらなる領域に 分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す 占有率を算出する。 [0089] In the form described in Item 83, in the image processing program described in Item 82, in the occupancy ratio calculating step, the captured image data is divided into regions that are combinations of predetermined brightness and hue. Then, for each of the divided areas, an occupancy ratio indicating a ratio of the entire captured image data is calculated.
[0090] 項 84に記載の形態は、項 83に記載の画像処理プログラムにおいて、 [0090] The form described in Item 84 is the image processing program described in Item 83,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定工程を含み、 And an adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index,
前記階調変換工程では、前記調整方法決定工程により決定された階調調整方法 を用いて、前記撮影画像データに対し、前記調整量決定工程により決定された階調 調整量の階調変換処理を施す。 In the gradation conversion step, gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination step is performed on the captured image data using the gradation adjustment method determined by the adjustment method determination step. Apply.
[0091] 項 85に記載の形態は、項 82に記載の画像処理プログラムにおいて、前記占有率 算出工程では、撮影画像データを、当該撮影画像データの画面の外縁からの距離と 明度の組み合わせ力 なる所定の領域に分割し、当該分割された領域毎に、前記撮 影画像データ全体に占める割合を示す占有率を算出する。 [0091] In the form described in Item 85, in the image processing program described in Item 82, in the occupation rate calculation step, the captured image data is combined with the distance from the outer edge of the screen of the captured image data and the brightness. The area is divided into predetermined areas, and for each of the divided areas, an occupation ratio indicating a ratio of the entire captured image data is calculated.
[0092] 項 86に記載の形態は、項 85に記載の画像処理プログラムにおいて、 [0092] The form described in Item 86 is the image processing program described in Item 85,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定工程を含み、前記階調変換において、前記調整方法決定 工程により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調 整量決定工程により決定された階調調整量の階調変換処理を施す。 The method further includes an adjustment amount determination step of determining a gradation adjustment amount for the captured image data based on the calculated index, and the gradation adjustment method determined by the adjustment method determination step in the gradation conversion. Then, gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination step is performed on the captured image data.
[0093] 項 87に記載の形態は、項 82に記載の画像処理プログラムにお 、て、前記占有率 算出では、撮影画像データを、所定の明度と色相の組み合わせカゝらなる領域に分割 し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第 1の 占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁 力 の距離と明度の組み合わせ力 なる所定の領域に分割し、当該分割された領域 毎に、前記撮影画像データ全体に占める割合を示す第 2の占有率を算出し、前記指 標算出工程では、前記占有率算出工程により算出された第 1の占有率及び第 2の占
有率と、前記偏倚量算出工程により算出された偏倚量に、撮影条件に応じて予め設 定された係数を乗算することにより、撮影条件を特定するための指標を算出する。 [0093] In the form described in Item 87, in the image processing program described in Item 82, in the occupancy ratio calculation, the captured image data is divided into regions that are combinations of predetermined brightness and hue. For each of the divided areas, a first occupancy ratio indicating a ratio of the entire captured image data is calculated, and the captured image data is combined with the distance between the outer edge force of the captured image data and the lightness combination power. And a second occupancy ratio indicating the ratio of the entire captured image data is calculated for each of the divided areas. In the indicator calculation step, the second occupancy ratio is calculated by the occupancy ratio calculation step. First occupancy and second occupancy An index for specifying the shooting condition is calculated by multiplying the ratio and the deviation amount calculated in the bias amount calculation step by a coefficient set in advance according to the shooting condition.
[0094] 項 88に記載の形態は、項 87に記載の画像処理プログラムにおいて、 [0094] The form described in Item 88 is the image processing program described in Item 87,
さらに、前記算出された指標に基づいて、前記撮影画像データに対する階調調整 量を決定する調整量決定工程を含み、前記階調変換工程において、前記調整方法 決定工程により決定された階調調整方法を用いて、前記撮影画像データに対し、前 記調整量決定工程により決定された階調調整量の階調変換処理を施す。 The method further includes an adjustment amount determination step of determining a gradation adjustment amount for the captured image data based on the calculated index, and the gradation adjustment method determined by the adjustment method determination step in the gradation conversion step Is used to perform gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step.
[0095] 項 89に記載の形態は、項 85又は 86に記載の画像処理プログラムにおいて、前記 撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによ つて 2次元ヒストグラムを作成する工程を含み、前記占有率算出工程においてに、前 記作成された 2次元ヒストグラムに基づ 、て前記占有率を算出する。 [0095] In the form described in Item 89, in the image processing program described in Item 85 or 86, the cumulative number of pixels is calculated for each distance and brightness from the outer edge of the screen of the captured image data. A step of creating a histogram, wherein the occupation rate is calculated based on the two-dimensional histogram created in the occupation rate calculation step.
[0096] 項 90に記載の形態は、項 87又は 88に記載の画像処理プログラムにおいて、前記 撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによ つて 2次元ヒストグラムを作成する工程を含み、前記占有率算出工程においてに、前 記作成された 2次元ヒストグラムに基づ 、て前記第 2の占有率を算出する。 [0096] In the form described in Item 90, in the image processing program described in Item 87 or 88, the cumulative number of pixels is calculated for each distance and brightness from the outer edge of the screen of the captured image data. A step of creating a histogram, wherein the second occupancy ratio is calculated based on the two-dimensional histogram created in the occupancy ratio calculation step.
[0097] 項 91に記載の形態は、項 83又は 84に記載の画像処理プログラムにおいて、前記 撮影画像データの所定の色相、明度毎に累積画素数を算出することによって 2次元 ヒストグラムを作成する工程を含み、前記占有率算出工程において、前記作成された 2次元ヒストグラムに基づ 、て前記占有率を算出する。 [0097] In the form described in Item 91, in the image processing program described in Item 83 or 84, a step of creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data And the occupancy ratio calculating step calculates the occupancy ratio based on the created two-dimensional histogram.
[0098] 項 92に記載の形態は、項 87又は 88に記載の画像処理プログラムにおいて、前記 撮影画像データの所定の色相、明度毎に累積画素数を算出することによって 2次元 ヒストグラムを作成するヒストグラム作成工程を含み、前記占有率算出工程において、 前記作成された 2次元ヒストグラムに基づいて前記第 1の占有率を算出する。 [0098] In the form described in Item 92, the image processing program described in Item 87 or 88 is a histogram for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data. A first step of calculating the first occupancy rate based on the generated two-dimensional histogram.
[0099] 項 93に記載の形態 ίま、項 82、 83、 84、 87、 88、 90〜92の何れ力一項に記載の 画像処理プログラムにおいて、前記指標算出工程において、所定の高明度の肌色 色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数 が用いられる。 [0099] In the image processing program according to any one of the forms described in Item 93, Item 82, 83, 84, 87, 88, 90 to 92, in the index calculation step, a predetermined high brightness value is obtained. A coefficient with a different sign is used for the flesh-color hue area and the hue area other than the high-brightness flesh-color hue area.
[0100] 項 94に記載の形態 ίま、項 82、 83、 84、 87、 88、 90〜93の何れ力一項に記載の
画像処理プログラムにおいて、前記指標算出工程において、肌色色相領域の中間 明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられ る。 [0100] The configuration described in item 94, described in any one of the items of items 82, 83, 84, 87, 88, 90 to 93 In the image processing program, in the index calculation step, coefficients with different signs are used in the intermediate brightness area of the flesh color hue area and the brightness areas other than the intermediate brightness area.
[0101] 項 95に記載の形態は、項 93に記載の画像処理プログラムにおいて、前記高明度 の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域である。 [0101] In the form described in Item 95, in the image processing program described in Item 93, the brightness region of the hue region other than the high-brightness skin color hue region is a predetermined high brightness region.
[0102] 項 96に記載の形態は、項 94に記載の画像処理プログラムにおいて、前記中間明 度領域以外の明度領域が、肌色色相領域内の明度領域である。 [0102] In the form described in Item 96, in the image processing program described in Item 94, the brightness region other than the intermediate brightness region is a brightness region in the flesh-color hue region.
[0103] 項 97に記載の形態は、項 93又は 95に記載の画像処理プログラムにおいて、前記 高明度の肌色色相領域には、 HSV表色系の明度値で 170〜224の範囲の領域が 含まれる。 [0103] In the form described in Item 97, in the image processing program described in Item 93 or 95, the high-brightness skin color hue region includes a region in the range of 170 to 224 in terms of the brightness value of the HSV color system. It is.
[0104] 項 98に記載の形態は、項 94又は 96に記載の画像処理プログラムにおいて、前記 中間明度領域には、 HSV表色系の明度値で 85〜169の範囲の領域が含まれる。 [0104] In the form described in Item 98, in the image processing program described in Item 94 or 96, the intermediate brightness region includes a region in the range of 85 to 169 in terms of the brightness value of the HSV color system.
[0105] 項 99に記載の形態は、項 93、 95、 97の何れか一項に記載の画像処理プログラム において、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色 色相領域の少なくとも一方が含まれる。 [0105] In the image processing program according to any one of Items 93, 95, and 97, the form described in Item 99 includes a blue hue region, a green hue in a hue region other than the high brightness skin color hue region. At least one of the regions is included.
[0106] 項 100に記載の形態は、項 94、 96、 98の何れか一項に記載の画像処理プロダラ ムにおいて、記中間明度領域以外の明度領域がシャドー領域である。 [0106] In the form described in Item 100, in the image processing program according to any one of Items 94, 96, and 98, the brightness area other than the intermediate brightness area is a shadow area.
[0107] 項 101に記載の形態は、項 99に記載の画像処理プログラムにおいて、前記青色色 相領域の色相値は、 HSV表色系の色相値で 161〜250の範囲内にあり、前記緑色 色相領域の色相値は、 HSV表色系の色相値で 40〜 160の範囲内にある。 [0107] In the form described in Item 101, in the image processing program described in Item 99, the hue value of the blue hue region is in the range of 161 to 250 as the hue value of the HSV color system, and the green color The hue value in the hue region is in the range of 40 to 160 in the HSV color system.
[0108] 項 102に記載の形態は、項 100に記載の画像処理プログラムにおいて、前記シャド 一領域の明度値は、 HSV表色系の明度値で 26〜84の範囲内にある。 [0108] In the form described in Item 102, in the image processing program described in Item 100, the brightness value of the shadow area is in the range of 26 to 84 as the brightness value of the HSV color system.
[0109] 項 103および 104に記載の形態は、項 93〜102の何れか一項に記載の画像処理 プログラムにおいて、前記肌色色相領域の色相値は、 HSV表色系の色相値で 0〜3[0109] In the image processing program according to any one of Items 93 to 102, the form described in Item 103 and 104 is the hue value of the HSV color system in the image processing program according to any one of Items 93 to 102.
9及び 330〜359の範囲内にある。 9 and within the range of 330-359.
[0110] 項 105〜106に記載の形態は、項 93〜 104の何れか一項に記載の画像処理プロ グラムにおいて、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により[0110] In the image processing program according to any one of Items 93 to 104, the form described in Items 105 to 106 is based on a predetermined conditional expression based on lightness and saturation in the skin color hue region.
2つの領域に分割される。
[0111] 項 107に記載の形態は、項 82〜106の何れか一項に記載の画像処理プログラム において、前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像デー タの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値 のうちの少なくとも一つが含まれる。 Divided into two areas. [0111] In the form described in Item 107, in the image processing program described in any one of Items 82 to 106, the deviation amount includes the brightness deviation amount of the photographed image data, and the photographed image data. At least one of the average brightness value at the center of the screen and the brightness difference value calculated under different conditions is included.
[0112] 項 108に記載の形態は、項 82〜107の何れか一項に記載の画像処理プログラム において、前記撮影条件は、撮影時の光源条件及び露出条件を示し、前記光源条 件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード 、絞り値に由来するアンダー撮影状態が含まれる。 [0112] In the form described in Item 108, in the image processing program described in any one of Items 82 to 107, the photographing condition indicates a light source condition and an exposure condition at the time of photographing, and the light source condition includes A flash shooting state is included, and the exposure condition includes an under shooting state derived from the shutter speed and aperture value at the time of shooting.
[0113] 以下、図面を参照して、本発明の実施形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0114] まず、本実施形態における構成について説明する。 First, the configuration of the present embodiment will be described.
[0115] 図 1は、本発明の実施形態における画像処理装置 1の外観構成を示す斜視図であ る。画像処理装置 1は、図 1に示すように、筐体 2の一側面に、感光材料を装填する ためのマガジン装填部 3が備えられている。筐体 2の内側には、感光材料に露光する 露光処理部 4と、露光された感光材料を現像処理して乾燥し、プリントを作成するた めのプリント作成部 5が備えられている。筐体 2の他側面には、プリント作成部 5で作 成されたプリントを排出するためのトレー 6が備えられている。 FIG. 1 is a perspective view showing an external configuration of the image processing apparatus 1 according to the embodiment of the present invention. As shown in FIG. 1, the image processing apparatus 1 is provided with a magazine loading section 3 for loading a photosensitive material on one side surface of a housing 2. Inside the housing 2 are provided an exposure processing unit 4 for exposing the photosensitive material and a print creating unit 5 for developing and drying the exposed photosensitive material to create a print. On the other side of the casing 2, a tray 6 for discharging the prints produced by the print creation unit 5 is provided.
[0116] また、筐体 2の上部には、表示装置としての CRT (Cathode Ray Tube) 8、透過 原稿を読み込む装置であるフィルムスキャナ部 9、反射原稿入力装置 10、操作部 11 が備えられている。この CRT8力 プリントを作成しょうとする画像情報の画像を画面 に表示する表示手段を構成している。更に、筐体 2には、各種デジタル記録媒体に 記録された画像情報を読み取り可能な画像読込部 14、各種デジタル記録媒体に画 像信号を書き込み(出力)可能な画像書込部 15が備えられている。また、筐体 2の内 部には、これらの各部を集中制御する制御部 7が備えられている。 In addition, a CRT (Cathode Ray Tube) 8 serving as a display device, a film scanner unit 9 that is a device for reading a transparent document, a reflective document input device 10, and an operation unit 11 are provided at the top of the housing 2. Yes. The CRT8 power print is composed of a display means that displays the image of the image information to be created on the screen. Further, the housing 2 is provided with an image reading unit 14 that can read image information recorded on various digital recording media, and an image writing unit 15 that can write (output) image signals to various digital recording media. ing. In addition, a control unit 7 that centrally controls each of these units is provided inside the housing 2.
[0117] 画像読込部 14には、 PCカード用アダプタ 14a、フロッピー(登録商標)ディスク用ァ ダプタ 14bが備えられ、 PCカード 13aやフロッピー(登録商標)ディスク 13bが差し込 み可能になっている。 PCカード 13aは、例えば、デジタルカメラで撮像された複数の 駒画像データが記録されたメモリを有する。フロッピー(登録商標)ディスク 13bには、 例えば、デジタルカメラで撮像された複数の駒画像データが記録される。 PCカード 1
3a及びフロッピー(登録商標)ディスク 13b以外に駒画像データが記録される記録媒 体としては、例えば、マルチメディアカード (登録商標)、メモリースティック (登録商標 ;)、 MDデータ、 CD— ROM等がある。 [0117] The image reading unit 14 includes a PC card adapter 14a and a floppy (registered trademark) disk adapter 14b, and a PC card 13a and a floppy (registered trademark) disk 13b can be inserted therein. . For example, the PC card 13a has a memory in which a plurality of frame image data captured by a digital camera is recorded. For example, a plurality of frame image data captured by a digital camera is recorded on the floppy (registered trademark) disk 13b. PC card 1 Recording media on which frame image data is recorded in addition to 3a and floppy disk 13b include, for example, multimedia card (registered trademark), memory stick (registered trademark), MD data, CD-ROM, etc. .
[0118] 画像書込部 15には、フロッピー(登録商標)ディスク用アダプタ 15a、 MO用ァダプ タ 15b、光ディスク用アダプタ 15cが備えられ、それぞれ、フロッピー(登録商標)ディ スク 16a、 M016b、光ディスク 16cが差し込み可能になっている。光ディスク 16cとし ては、 CD— R、 DVD— R等がある。 [0118] The image writing unit 15 includes a floppy (registered trademark) disk adapter 15a, an MO adapter 15b, and an optical disk adapter 15c. The floppy disk (registered trademark) disks 16a and M016b and the optical disk 16c, respectively. Can be inserted. Examples of the optical disk 16c include CD-R, DVD-R, and the like.
[0119] なお、図 1では、操作部 11、 CRT8、フィルムスキャナ部 9、反射原稿入力装置 10、 画像読込部 14が、筐体 2に一体的に備えられた構造となっている力 これらの何れ 力 1つ以上を別体として設けるようにしてもよ!、。 In FIG. 1, the operation unit 11, the CRT 8, the film scanner unit 9, the reflective document input device 10, and the image reading unit 14 have a structure in which the casing 2 is integrally provided. Either one or more powers may be provided as separate bodies!
[0120] また、図 1に示した画像処理装置 1では、感光材料に露光して現像してプリントを作 成するものが例示されている力 プリント作成方式はこれに限定されず、例えば、イン クジェット方式、電子写真方式、感熱方式、昇華方式等の方式を用いてもよい。 〈画像処理装置 1の主要部構成〉 [0120] In the image processing apparatus 1 shown in FIG. 1, the force print creation method exemplified by the photosensitive material exposed to light and developed to create a print is not limited to this. A method such as a kuget method, an electrophotographic method, a heat sensitive method, or a sublimation method may be used. <Main components of image processing device 1>
図 2に、画像処理装置 1の主要部構成を示す。画像処理装置 1は、図 2に示すよう に、制御部 7、露光処理部 4、プリント生成部 5、フィルムスキャナ部 9、反射原稿入力 装置 10、画像読込部 14、通信手段 (入力) 32、画像書込部 15、データ蓄積手段 71 、テンプレート記憶手段 72、操作部 11、 CRT8、通信手段(出力) 33により構成され る。 FIG. 2 shows a main part configuration of the image processing apparatus 1. As shown in FIG. 2, the image processing apparatus 1 includes a control unit 7, an exposure processing unit 4, a print generation unit 5, a film scanner unit 9, a reflection original input device 10, an image reading unit 14, a communication means (input) 32, The image writing unit 15, data storage unit 71, template storage unit 72, operation unit 11, CRT 8, and communication unit (output) 33 are configured.
[0121] 制御部 7は、マイクロコンピュータにより構成され、 ROM (Read Only Memory) 等の記憶部(図示略)に記憶されて 、る各種制御プログラムと、 CPU (Central Pro cessmg [0121] The control unit 7 is constituted by a microcomputer, and is stored in a storage unit (not shown) such as a ROM (Read Only Memory).
Unit) (図示略)との協働により、画像処理装置 1を構成する各部の動作を制御する Unit) (operation not shown) controls the operation of each part of the image processing apparatus 1
[0122] 制御部 7は、本発明の画像処理装置に係る画像処理部 70を有し、操作部 11から の入力信号 (指令情報)に基づいて、フィルムスキャナ部 9や反射原稿入力装置 10 から読み取られた画像信号、画像読込部 14から読み込まれた画像信号、外部機器 から通信手段 32を介して入力された画像信号に対して、画像処理を施して露光用画
像情報を形成し、露光処理部 4に出力する。また、画像処理部 70は、画像処理され た画像信号に対して出力形態に応じた変換処理を施して出力する。画像処理部 70 の出力先としては、 CRT8、画像書込部 15、通信手段(出力) 33等がある。 The control unit 7 includes an image processing unit 70 according to the image processing apparatus of the present invention. Based on an input signal (command information) from the operation unit 11, the control unit 7 receives from the film scanner unit 9 and the reflection original input device 10. The scanned image signal, the image signal read from the image reading unit 14, and the image signal input from the external device via the communication means 32 are subjected to image processing to obtain an image for exposure. Image information is formed and output to the exposure processing unit 4. Further, the image processing unit 70 performs a conversion process corresponding to the output form on the image signal subjected to the image processing, and outputs it. As output destinations of the image processing unit 70, there are a CRT 8, an image writing unit 15, a communication means (output) 33, and the like.
[0123] 露光処理部 4は、感光材料に画像の露光を行 ヽ、この感光材料をプリント作成部 5 に出力する。プリント作成部 5は、露光された感光材料を現像処理して乾燥し、プリン ト Pl、 P2、 P3を作成する。プリント P1は、サービスサイズ、ハイビジョンサイズ、パノラ マサイズ等のプリントであり、プリント P2は、 A4サイズのプリントであり、プリント P3は、 名刺サイズのプリントである。 The exposure processing unit 4 performs image exposure on the photosensitive material and outputs the photosensitive material to the print creating unit 5. The print creating unit 5 develops the exposed photosensitive material and dries it to create prints Pl, P2, and P3. Print P1 is a service size, high-definition size, panorama size, etc. print P2 is an A4 size print, and print P3 is a business card size print.
[0124] フィルムスキャナ部 9は、アナログカメラにより撮像された現像済みのネガフィルム N 、リバーサルフィルム等の透過原稿に記録された駒画像を読み取り、駒画像のデジタ ル画像信号を取得する。反射原稿入力装置 10は、フラットベットスキャナにより、プリ ント P (写真プリント、書画、各種の印刷物)上の画像を読み取り、デジタル画像信号 を取得する。 [0124] The film scanner unit 9 reads a frame image recorded on a transparent original such as a developed negative film N or a reversal film imaged by an analog camera, and obtains a digital image signal of the frame image. The reflective original input device 10 reads an image on the print P (photo print, document, various printed materials) by a flat bed scanner, and obtains a digital image signal.
[0125] 画像読込部 14は、 PCカード 13aやフロッピー(登録商標)ディスク 13bに記録され た駒画像情報を読み出して制御部 7に転送する。この画像読込部 14は、画像転送 手段 30として、 PCカード用アダプタ 14a、フロッピー(登録商標)ディスク用アダプタ 1 4b等を有する。画像読込部 14は、 PCカード用アダプタ 14aに差し込まれた PCカー ド 13aや、フロッピー(登録商標)ディスク用アダプタ 14bに差し込まれたフロッピー( 登録商標)ディスク 13bに記録された駒画像情報を読み取り、制御部 7に転送する。 PCカード用アダプタ 14aとしては、例えば PCカードリーダや PCカードスロット等が用 いられる。 The image reading unit 14 reads frame image information recorded on the PC card 13 a and the floppy (registered trademark) disk 13 b and transfers the frame image information to the control unit 7. The image reading unit 14 includes, as image transfer means 30, a PC card adapter 14a, a floppy (registered trademark) disk adapter 14b, and the like. The image reading unit 14 reads frame image information recorded on the PC card 13a inserted into the PC card adapter 14a or the floppy disk 13b inserted into the floppy disk adapter 14b. And transfer to the control unit 7. For example, a PC card reader or a PC card slot is used as the PC card adapter 14a.
[0126] 通信手段 (入力) 32は、画像処理装置 1が設置された施設内の別のコンピュータや 、インターネット等を介した遠方のコンピュータから、撮像画像を表す画像信号やプリ ント命令信号を受信する。 [0126] The communication means (input) 32 receives an image signal representing a captured image and a print command signal from another computer in the facility where the image processing apparatus 1 is installed or a distant computer via the Internet or the like. To do.
[0127] 画像書込部 15は、画像搬送部 31として、フロッピー(登録商標)ディスク用アダプタ 15a、 MO用アダプタ 15b、光ディスク用アダプタ 15cを備えている。画像書込部 15 は、制御部 7から入力される書込信号に従って、フロッピー(登録商標)ディスク用ァ ダプタ 15aに差し込まれたフロッピー(登録商標)ディスク 16a、 MO用アダプタ 15bに
差し込まれた MO 16b、光ディスク用アダプタ 15cに差し込まれた光ディスク 16c〖こ、 本発明における画像処理方法によって生成された画像信号を書き込む。 The image writing unit 15 includes a floppy (registered trademark) disk adapter 15a, an MO adapter 15b, and an optical disk adapter 15c as the image transport unit 31. In accordance with a write signal input from the control unit 7, the image writing unit 15 is connected to the floppy disk 16a inserted in the floppy disk adapter 15a and the MO adapter 15b. The MO 16b inserted, the optical disc 16c inserted into the optical disc adapter 15c, and the image signal generated by the image processing method of the present invention are written.
[0128] データ蓄積手段 71は、画像情報とそれに対応する注文情報(どの駒の画像力も何 枚プリントを作成するかの情報、プリントサイズの情報等)とを記憶し、順次蓄積する。 [0128] The data storage means 71 stores and sequentially stores image information and order information corresponding to the image information (information on how many sheets of image power are to be created, information on the print size, etc.).
[0129] テンプレート記憶手段 72は、サンプル識別情報 Dl、 D2、 D3に対応するサンプル 画像データである背景画像、イラスト画像等と合成領域を設定する少なくとも 1個のテ ンプレートのデータを記憶して 、る。オペレータの操作によりセットしてテンプレート記 憶手段 72に予め記憶された複数のテンプレートから所定のテンプレートを選択し、駒 画像情報は選択されたテンプレートにより合成し、指定されるサンプル識別情報 Dl、 D2、 D3に基づいて選択されたサンプル画像データと、注文に基づく画像データ及 び Z又は文字データとを合成し、指定によるサンプルに基づくプリントを作成する。こ のテンプレートによる合成は、周知のクロマキ一法によって行なわれる。 [0129] The template storage means 72 stores the background image, illustration image, etc., which are sample image data corresponding to the sample identification information Dl, D2, and D3, and data of at least one template that sets the synthesis region. RU A predetermined template is selected from a plurality of templates that are set by the operator's operation and stored in advance in the template storage means 72, and the frame image information is synthesized by the selected template and designated sample identification information Dl, D2, The sample image data selected based on D3 is combined with the image data based on the order and the Z or character data to create a print based on the specified sample. The synthesis using this template is performed by the well-known Chromaki method.
[0130] なお、プリントのサンプルを指定するサンプル識別情報 Dl、 D2、 D3は、操作部 21 1から入力されるように構成されているが、これらのサンプル識別情報は、プリントのサ ンプル又は注文シートに記録されているため、 OCR等の読み取り手段により読み取 ることができる。或いは、オペレータのキーボード操作により入力することもできる。 [0130] The sample identification information Dl, D2, and D3 for designating the print sample is configured to be input from the operation unit 211. However, these sample identification information is stored in the print sample or order. Since it is recorded on the sheet, it can be read by reading means such as OCR. Or it can also input by an operator's keyboard operation.
[0131] このようにプリントのサンプルを指定するサンプル識別情報 D1に対応してサンプル 画像データを記録しておき、プリントのサンプルを指定するサンプル識別情報 D1を 入力し、この入力されるサンプル識別情報 D1に基づきサンプル画像データを選択し 、この選択されたサンプル画像データと、注文に基づく画像データ及び Z又は文字 データとを合成し、指定によるサンプルに基づくプリントを作成するため、種々の実物 大のサンプルをユーザが実際に手にしてプリントの注文ができ、幅広いユーザの多 様な要求に応じることができる。 [0131] In this way, sample image data is recorded corresponding to sample identification information D1 that specifies a print sample, sample identification information D1 that specifies a print sample is input, and this sample identification information that is input Select sample image data based on D1, and combine the selected sample image data with the image data and Z or character data based on the order to create prints based on the specified samples. Users can actually order samples for printing and can meet the diverse requirements of a wide range of users.
[0132] また、第 1のサンプルを指定する第 1のサンプル識別情報 D2と第 1のサンプルの画 像データを記憶し、また、第 2のサンプルを指定する第 2のサンプル識別情報 D3と第 2のサンプルの画像データを記憶し、指定される第 1及び第 2のサンプル識別情報 D 2、 D3とに基づいて選択されたサンプル画像データと、注文に基づく画像データ及 び Z又は文字データとを合成し、指定によるサンプルに基づくプリントを作成するた
め、さらに多種多様の画像を合成することができ、より一層幅広いユーザの多様な要 求に応じたプリントを作成することができる。 [0132] Also, the first sample identification information D2 designating the first sample and the image data of the first sample are stored, and the second sample identification information D3 designating the second sample and the first sample identification data D3 are stored. The image data of two samples is stored, the sample image data selected based on the designated first and second sample identification information D2, D3, the image data based on the order, and the Z or character data To create a print based on the specified sample. Therefore, it is possible to synthesize a wider variety of images, and to create prints that meet a wide variety of user requirements.
[0133] 操作部 11は、情報入力手段 12を有する。情報入力手段 12は、例えば、タツチパネ ル等により構成されており、情報入力手段 12の押下信号を入力信号として制御部 7 に出力する。なお、操作部 11は、キーボードやマウス等を備えて構成するようにして もよい。 CRT8は、制御部 7から入力された表示制御信号に従って、画像情報等を表 示する。 [0133] The operation unit 11 includes information input means 12. The information input means 12 is composed of, for example, a touch panel and outputs a pressing signal from the information input means 12 to the control unit 7 as an input signal. The operation unit 11 may be configured with a keyboard, a mouse, and the like. The CRT 8 displays image information and the like according to the display control signal input from the control unit 7.
[0134] 通信手段(出力) 33は、本発明の画像処理を施した後の撮影画像を表す画像信号 と、それに付帯するオーダー情報を、画像処理装置 1が設置された施設内の他のコ ンピュータゃ、インターネット等を介した遠方のコンピュータに対して送信する。 [0134] The communication means (output) 33 sends an image signal representing a photographed image after the image processing of the present invention and order information attached thereto to other links in the facility where the image processing apparatus 1 is installed. The computer transmits to a distant computer via the Internet or the like.
[0135] 図 2に示すように、画像処理装置 1は、各種デジタルメディアの画像及び画像原稿 を分割測光して得られた画像情報を取り込む画像入力手段と、画像処理手段と、処 理済の画像を表示、プリント出力、画像記録メディアに書き込む画像出力手段と、通 信回線を介して施設内の別のコンピュータやインターネット等を介した遠方のコンビュ ータに対して画像データと付帯するオーダー情報を送信する手段と、を備える。 <画像処理部 70の内部構成 > As shown in FIG. 2, the image processing apparatus 1 includes an image input unit that captures image information obtained by dividing and metering images of various digital media and image originals, an image processing unit, and a processed image. Image output means for displaying images, printing output, writing to image recording media, and order information attached to image data for remote computers via the communication line via another communication line or computer Means for transmitting. <Internal configuration of image processor 70>
図 3に、画像処理部 70の内部構成を示す。画像処理部 70は、図 3に示すように、 画像調整処理部 701、フィルムスキャンデータ処理部 702、反射原稿スキャンデータ 処理部 703、画像データ書式解読処理部 704、テンプレート処理部 705、 CRT固有 処理部 706、プリンタ固有処理部 A707、プリンタ固有処理部 B708、画像データ書 式作成処理部 709により構成される。 FIG. 3 shows the internal configuration of the image processing unit 70. As shown in FIG. 3, the image processing unit 70 includes an image adjustment processing unit 701, a film scan data processing unit 702, a reflection original scan data processing unit 703, an image data format decoding processing unit 704, a template processing unit 705, and a CRT specific process. A unit 706, a printer specific processing unit A707, a printer specific processing unit B708, and an image data format creation processing unit 709 are configured.
[0136] フィルムスキャンデータ処理部 702は、フィルムスキャナ部 9から入力された画像デ ータに対し、フィルムスキャナ部 9固有の校正操作、ネガポジ反転 (ネガ原稿の場合) 、ゴミキズ除去、コントラスト調整、粒状ノイズ除去、鮮鋭化強調等の処理を施し、処理 済の画像データを画像調整処理部 701に出力する。また、フィルムサイズ、ネガポジ 種別、フィルムに光学的或いは磁気的に記録された主要被写体に関わる情報、撮影 条件に関する情報 (例えば、 APSの記載情報内容)等も併せて画像調整処理部 701 に出力する。
[0137] 反射原稿スキャンデータ処理部 703は、反射原稿入力装置 10から入力された画像 データに対し、反射原稿入力装置 10固有の校正操作、ネガポジ反転 (ネガ原稿の 場合)、ゴミキズ除去、コントラスト調整、ノイズ除去、鮮鋭化強調等の処理を施し、処 理済の画像データを画像調整処理部 701に出力する。 [0136] The film scan data processing unit 702 performs a calibration operation specific to the film scanner unit 9, negative / positive reversal (in the case of a negative document), dust scratch removal, contrast adjustment, and the like on the image data input from the film scanner unit 9. It performs processing such as granular noise removal and sharpening enhancement, and outputs the processed image data to the image adjustment processing unit 701. In addition, the film size, negative / positive type, information on the main subject optically or magnetically recorded on the film, information on the shooting conditions (for example, information content described in APS), etc. are also output to the image adjustment processing unit 701. . [0137] The reflection document scan data processing unit 703 performs a calibration operation specific to the reflection document input device 10, negative / positive reversal (in the case of a negative document), dust flaw removal, and contrast adjustment for the image data input from the reflection document input device 10. Then, processing such as noise removal and sharpening enhancement is performed, and the processed image data is output to the image adjustment processing unit 701.
[0138] 画像データ書式解読処理部 704は、画像転送手段 30及び Z又は通信手段 (入力 ) 32から入力された画像データに対し、その画像データのデータ書式に従って、必 要に応じて圧縮符号の復元、色データの表現方法の変換等の処理を施し、画像処 理部 70内の演算に適したデータ形式に変換し、画像調整処理部 701に出力する。 また、画像データ書式解読処理部 704は、操作部 11、通信手段 (入力) 32、画像転 送手段 30の何れかから出力画像の大きさが指定された場合、その指定された情報を 検出し、画像調整処理部 701に出力する。なお、画像転送手段 30により指定される 出力画像の大きさについての情報は、画像転送手段 30が取得した画像データのへ ッダ情報、タグ情報に埋め込まれている。 [0138] The image data format decoding processing unit 704 applies a compression code to the image data input from the image transfer means 30 and Z or the communication means (input) 32 according to the data format of the image data as necessary. Processing such as restoration and conversion of the color data expression method is performed, the data is converted into a data format suitable for computation in the image processing unit 70, and output to the image adjustment processing unit 701. In addition, when the size of the output image is specified from any of the operation unit 11, the communication means (input) 32, and the image transfer means 30, the image data format decoding processing unit 704 detects the specified information. And output to the image adjustment processing unit 701. Information about the size of the output image specified by the image transfer means 30 is embedded in the header information and tag information of the image data acquired by the image transfer means 30.
[0139] 画像調整処理部 701は、操作部 11又は制御部 7の指令に基づいて、フィルムスキ ャナ部 9、反射原稿入力装置 10、画像転送手段 30、通信手段 (入力) 32、テンプレ ート処理部 705から受け取った画像データに対し、後述の画像処理(図 6、図 7、図 1 3及び図 17参照)を施して、出力媒体上での鑑賞に最適化された画像形成用のデジ タル画像データを生成し、 CRT固有処理部 706、プリンタ固有処理部 A707、プリン タ固有処理部 B708、画像データ書式作成処理部 709、データ蓄積手段 71に出力 する。 The image adjustment processing unit 701 is based on a command from the operation unit 11 or the control unit 7, and includes a film scanner unit 9, a reflective document input device 10, an image transfer unit 30, a communication unit (input) 32, and a template. The image data received from the image processing unit 705 is subjected to image processing described later (see FIGS. 6, 7, 13, and 17) for image formation optimized for viewing on the output medium. Digital image data is generated and output to the CRT specific processing unit 706, the printer specific processing unit A707, the printer specific processing unit B708, the image data format creation processing unit 709, and the data storage unit 71.
[0140] 最適化処理においては、例えば sRGB規格に準拠した CRTディスプレイモニタに 表示することを前提とした場合、 sRGB規格の色域内で最適な色再現が得られるよう に処理される。銀塩印画紙への出力を前提とした場合、銀塩印画紙の色域内で最適 な色再現が得られるように処理される。また前記色域の圧縮の以外にも、 16bitから 8 bitへの階調圧縮、出力画素数の低減、及び出力デバイスの出力特性 (LUT)への 対応処理等も含まれる。さらにノイズ抑制、鮮鋭化、グレーバランス調整、彩度調整、 或いは覆 、焼き処理等の階調圧縮処理が行われることは言うまでもな 、。 [0140] In the optimization process, for example, assuming that the image is displayed on a CRT display monitor compliant with the sRGB standard, the process is performed so that the optimum color reproduction is obtained within the color gamut of the sRGB standard. If output to silver salt photographic paper is assumed, processing is performed to obtain the optimum color reproduction within the color gamut of silver salt photographic paper. In addition to the compression of the color gamut, gradation processing from 16 bits to 8 bits, reduction of the number of output pixels, and processing for handling output characteristics (LUT) of the output device are also included. It goes without saying that noise compression, sharpening, gray balance adjustment, saturation adjustment, or gradation compression processing such as masking and baking are performed.
[0141] 画像調整処理部 701は、図 3に示すように、撮影画像データの撮影条件を判別し
て階調調整条件 (階調調整方法、階調調整量)を決定するシーン判別部 710と、そ の決定された階調調整条件に従って階調変換処理を行う階調変換部 711により構 成される。 [0141] The image adjustment processing unit 701 determines the shooting condition of the shot image data as shown in FIG. A scene discriminating unit 710 that determines tone adjustment conditions (tone adjustment method, tone adjustment amount) and a tone conversion unit 711 that performs tone conversion processing according to the determined tone adjustment conditions. The
[0142] 本実施形態において撮影条件は、光源条件と露出条件に分類される。 In the present embodiment, the photographing conditions are classified into light source conditions and exposure conditions.
[0143] 光源条件とは、撮影時の光源、主要被写体 (主に人物)と撮影者との位置関係に由 来するものである。広義の意味において、光源の種類 (太陽光、ストロボ光、タンダス テン照明及び蛍光灯)も含まれる。逆光シーンは、主要被写体の背景に太陽が位置 することに生じる。また、ストロボ (近接撮影)シーンは、主要被写体にストロボ光が強 く照射されることにより生じる。両シーンは、共に撮影輝度(明暗の比)は同程度で、 主要被写体の前景と背景の明るさの関係が逆転しているに過ぎない。 [0143] The light source condition is derived from the light source at the time of photographing, the positional relationship between the main subject (mainly a person) and the photographer. In the broader sense, it also includes the type of light source (sunlight, strobe light, tandasten lighting and fluorescent lamps). Backlit scenes occur when the sun is located behind the main subject. A strobe (close-up) scene occurs when the main subject is strongly irradiated with strobe light. Both scenes have the same brightness (light / dark ratio), and the relationship between the brightness of the foreground and background of the main subject is merely reversed.
[0144] 一方、露出条件とは、カメラのシャッタースピードや絞り値等の設定に由来するもの であり、露出不足の状態をアンダー、適正な露出状態をノーマル、露出過多の状態 をオーバーと称する。広義の意味において、所謂「白とび」や「シャドーの潰れ」も含 まれる。全ての光源条件において、アンダー或いはオーバーの露出条件とすることが できる。特に、ダイナミックレンジの狭い DSC (デジタルスチルカメラ)では、自動露出 調整機能を用いても、白とびを抑制することを目的とした設定条件に起因して、アン ダー気味の露出条件となる頻度が高 、。 On the other hand, the exposure conditions are derived from the settings of the camera shutter speed, aperture value, etc., and underexposure is under, proper exposure is normal, and overexposure is over. In a broad sense, so-called “white jump” and “shadow collapse” are also included. Under all light source conditions, under or over exposure conditions can be used. Especially in DSC (digital still camera) with a narrow dynamic range, even if the automatic exposure adjustment function is used, due to the setting conditions aimed at suppressing overexposure, the frequency of underexposed exposure conditions is high. High,.
[0145] 図 4 (a)に、シーン判別部 710の内部構成を示す。シーン判別部 710は、図 4 (a)に 示すように、割合算出部 712、偏り算出部 722、指標算出部 713、画像処理条件算 出部 714により構成される。割合算出部 712は、図 4 (b)に示すように、表色系変換 部 715、ヒストグラム作成部 716、占有率演算部 717により構成される。 FIG. 4 (a) shows the internal configuration of the scene discrimination unit 710. As shown in FIG. 4A, the scene discriminating unit 710 includes a ratio calculating unit 712, a bias calculating unit 722, an index calculating unit 713, and an image processing condition calculating unit 714. As shown in FIG. 4B, the ratio calculation unit 712 includes a color system conversion unit 715, a histogram creation unit 716, and an occupation rate calculation unit 717.
[0146] 表色系変換部 715は、撮景画像データの RGB (Red, Green, Blue)値を HSV 表色系に変換する。 HSV表色系とは、画像データを、色相(Hue)、彩度(Saturati on)、明度(Value又は Brightness)の 3つの要素で表すものであり、マンセルにより 提案された表色体系を元にして考案されたものである。 The color system conversion unit 715 converts the RGB (Red, Green, Blue) value of the captured image data into the HSV color system. The HSV color system is a representation of image data with three elements: Hue, Saturation, and Value (Value or Brightness), and is based on the color system proposed by Munsell. Was devised.
[0147] なお、特許請求の範囲及び本実施形態において、「明度」は特に注釈を設けない 限り一般に用いられる「明るさ」の意味である。以下の記載において、 HSV表色系の V (0〜255)を「明度」として用いる力 他の如何なる表色系の明るさを表す単位系を
用いてもよい。その際、本実施形態で記載する各種係数等の数値を、改めて算出し 直すことは言うまでもない。また、本実施形形態における撮影画像データは、人物を 主要被写体とする画像データであるものとする。 In the claims and the present embodiment, “brightness” means “brightness” that is generally used unless otherwise noted. In the following description, the power to use V (0 to 255) of the HSV color system as “brightness” is the unit system that expresses the brightness of any other color system. It may be used. At that time, it goes without saying that numerical values such as various coefficients described in the present embodiment are recalculated. The photographed image data in the present embodiment is assumed to be image data having a person as a main subject.
[0148] ヒストグラム作成部 716は、撮影画像データを、所定の色相と明度の組み合わせか らなる領域に分割し、分割された領域毎に累積画素数を算出することによって 2次元 ヒストグラムを作成する。また、ヒストグラム作成部 716は、撮影画像データを、当該撮 影画像データの画面の外縁からの距離と明度の組み合わせ力 なる所定の領域に 分割し、分割された領域毎に累積画素数を算出することによって 2次元ヒストグラムを 作成する。なお、撮影画像データを、撮影画像データの画面の外縁からの距離、明 度及び色相の組み合わせ力 なる領域に分割し、分割された領域毎に累積画素数 を算出することによって 3次元ヒストグラムを作成するようにしてもよい。以下では、 2次 元ヒストグラムを作成する方式を採用するものとする。 [0148] The histogram creation unit 716 creates a two-dimensional histogram by dividing the captured image data into regions composed of a predetermined combination of hue and brightness, and calculating the cumulative number of pixels for each of the divided regions. In addition, the histogram creation unit 716 divides the captured image data into predetermined regions having a combination power of distance and brightness from the outer edge of the screen of the captured image data, and calculates the cumulative number of pixels for each of the divided regions. To create a two-dimensional histogram. Note that the captured image data is divided into regions that have the combined power of distance, brightness, and hue from the outer edge of the screen of the captured image data, and a three-dimensional histogram is created by calculating the cumulative number of pixels for each divided region. You may make it do. In the following, a method of creating a two-dimensional histogram will be adopted.
[0149] 占有率演算部 717は、明度と色相の組み合わせによって分割された領域毎に、ヒ ストグラム作成部 716において算出された累積画素数の全画素数 (撮影画像データ 全体)に占める割合を示す第 1の占有率 (表 1参照)を算出する。また、占有率演算部 717は、撮影画像データの画面の外縁からの距離と明度の組み合わせによって分割 された領域毎に、ヒストグラム作成部 716において算出された累積画素数の全画素 数 (撮影画像データ全体)に占める割合を示す第 2の占有率 (表 4参照)を算出する。 [0149] The occupancy calculation unit 717 indicates the ratio of the cumulative number of pixels calculated by the histogram creation unit 716 to the total number of pixels (the entire captured image data) for each region divided by the combination of brightness and hue. Calculate the first occupancy (see Table 1). The occupancy calculation unit 717 also calculates the total number of pixels calculated by the histogram creation unit 716 for each area divided by the combination of the distance from the outer edge of the screen of the captured image data and the brightness (the captured image data). Calculate the second occupancy ratio (see Table 4) indicating the ratio of the total occupancy.
[0150] 偏り算出部 722は、撮影画像データの階調分布の偏りを示す偏倚量を算出する。 [0150] The bias calculation unit 722 calculates a bias amount indicating the bias of the gradation distribution of the captured image data.
ここでの偏倚量とは、撮影画像データの輝度値の標準偏差、輝度差分値、画面中央 部の肌色平均輝度値、画面中央部の平均輝度値、肌色輝度分布値である。これらの 偏倚量の算出処理については、後に図 16を参照して詳細に説明する。 Here, the deviation amount is a standard deviation of luminance values of photographed image data, a luminance difference value, a skin color average luminance value at the center of the screen, an average luminance value at the center of the screen, and a skin color luminance distribution value. The processing for calculating these deviation amounts will be described in detail later with reference to FIG.
[0151] 指標算出部 713は、占有率演算部 717において各領域毎に算出された第 1の占 有率に、撮影条件に応じて予め (例えば、判別分析によって)設定された第 1の係数 ( 表 2参照)を乗算して和をとることにより、撮影条件を特定するための指標 1を算出す る。指標 1は、屋内撮影度、近接撮影度、顔色高明度等のストロボ撮影時の特徴を示 すもので、ストロボと判別されるべき画像を他の撮影条件力 分離するためのもので ある。
[0152] 指標 1の算出の際、指標算出部 713は、所定の高明度の肌色色相領域と、当該高 明度の肌色色相領域以外の色相領域とで、異なる符号の係数を用いる。ここで、所 定の高明度の肌色色相領域には、 HSV表色系の明度値で 170〜224の領域が含 まれる。また、所定の高明度の肌色色相領域以外の色相領域には、青色色相領域( 色相値 161〜250)、緑色色相領域 (色相値 40〜160)の少なくとも一方の高明度領 域が含まれる。 [0151] The index calculation unit 713 sets the first coefficient set in advance (for example, by discriminant analysis) to the first occupancy rate calculated for each area in the occupancy rate calculation unit 717 according to the imaging conditions. By multiplying (see Table 2) and taking the sum, index 1 for specifying the shooting conditions is calculated. Index 1 indicates the characteristics of flash photography such as indoor photography, close-up photography, and high brightness of the face color, and is used to separate the image that should be identified as a flash from other shooting conditions. [0152] When calculating the index 1, the index calculation unit 713 uses coefficients of different signs for a predetermined high-lightness skin color hue region and a hue region other than the high-lightness skin color hue region. Here, the skin color hue region of a predetermined high lightness includes a region of 170 to 224 in the lightness value of the HSV color system. Further, the hue area other than the predetermined high brightness skin color hue area includes at least one of the high brightness areas of the blue hue area (hue values 161 to 250) and the green hue area (hue values 40 to 160).
[0153] また、指標算出部 713は、占有率演算部 717において各領域毎に算出された第 1 の占有率に、撮影条件に応じて予め(例えば、判別分析によって)設定された第 2の 係数 (表 3参照)を乗算して和をとることにより、撮影条件を特定するための指標 2を算 出する。指標 2は、屋外撮影度、空色高明度、顔色低明度等の逆光撮影時の特徴を 複合的に示すもので、逆光と判別されるべき画像を他の撮影条件力 分離するため のものである。 In addition, the index calculation unit 713 sets the first occupancy calculated for each area in the occupancy ratio calculation unit 717 to the second occupancy previously set according to the imaging conditions (for example, by discriminant analysis). By multiplying the coefficient (see Table 3) and taking the sum, index 2 for specifying the shooting conditions is calculated. Indicator 2 is a composite indication of characteristics during backlighting such as outdoor shooting, sky blue high brightness, and low facial color, and is used to separate the image that should be identified as backlight from other shooting conditions. .
[0154] 指標 2の算出の際、指標算出部 713は、肌色色相領域 (色相値 0〜39、 330〜35 9)の中間明度領域と、当該中間明度領域以外の明度領域とで、異なる符号の係数 を用いる。この肌色色相領域の中間明度領域には、明度値 85〜169の領域が含ま れる。また、当該中間明度領域以外の明度領域には、例えば、シャドー領域 (明度値 26-84)が含まれる。 [0154] When calculating the index 2, the index calculation unit 713 uses different codes for the intermediate brightness area of the flesh color hue area (hue values 0 to 39, 330 to 359) and the brightness areas other than the intermediate brightness area. The coefficient of is used. The intermediate brightness area of the flesh tone hue area includes areas with brightness values of 85 to 169. The brightness area other than the intermediate brightness area includes, for example, a shadow area (brightness value 26-84).
[0155] 更に、指標算出部 713は、占有率演算部 717において各領域毎に算出された第 2 の占有率に、撮影条件に応じて予め(例えば、判別分析によって)設定された第 3の 係数 (表 5参照)を乗算して和をとることにより、撮影条件を特定するための指標 3を算 出する。指標 3は、逆光とストロボ間における、撮影画像データの画面の中心と外側 の明暗関係の差異を示すものであり、逆光又はストロボと判別されるべき画像のみを 定量的に示すものである。指標 3の算出の際、指標算出部 713は、撮影画像データ の画面の外縁からの距離に応じて異なる値の係数を用いる。 [0155] Furthermore, the index calculation unit 713 sets the second occupancy calculated for each area in the occupancy calculation unit 717 to the third occupancy set in advance (for example, by discriminant analysis) according to the imaging conditions. By multiplying the coefficient (see Table 5) and taking the sum, index 3 for specifying the shooting conditions is calculated. Indicator 3 shows the difference in contrast between the center and outside of the screen of the captured image data between backlight and strobe, and quantitatively shows only the image that should be identified as backlight or strobe. When calculating the index 3, the index calculation unit 713 uses different values of coefficients depending on the distance from the outer edge of the screen of the captured image data.
[0156] また、指標算出部 713は、指標 指標 3、撮影画像データの画面中央部における 肌色領域の平均輝度値に、それぞれ、撮影条件に応じて予め(例えば、判別分析に よって)設定された係数を乗算して和をとることにより指標 4を算出する。更に、指標算 出部 713は、指標 2、指標 3、画面中央部における肌色領域の平均輝度値に、それ
ぞれ、撮影条件に応じて予め(例えば、判別分析によって)設定された係数を乗算し て和をとることにより指標 5を算出する。また、指標算出部 713は、偏り算出部 722に おいて算出された偏倚量に、撮影条件に応じて予め (例えば、判別分析によって)設 定された第 4の係数 (表 6参照)を乗算して和をとることにより指標 6を算出する。指標 算出部 713における指標 1〜6の具体的な算出方法は、後述の本実施形態の動作 説明において詳細に説明する。 [0156] In addition, the index calculation unit 713 is set in advance (for example, by discriminant analysis) to the index index 3 and the average luminance value of the skin color region in the center of the screen of the captured image data according to the shooting conditions. Index 4 is calculated by multiplying the coefficient and taking the sum. In addition, the index calculation unit 713 calculates the average luminance value of the skin color area in the index 2, index 3, and center of the screen. Each index 5 is calculated by multiplying a coefficient set in advance (for example, by discriminant analysis) according to the photographing condition and taking the sum. In addition, the index calculation unit 713 multiplies the deviation amount calculated by the bias calculation unit 722 by a fourth coefficient (see Table 6) set in advance (for example, by discriminant analysis) according to the shooting conditions. Then, index 6 is calculated by taking the sum. A specific calculation method of the indices 1 to 6 in the index calculation unit 713 will be described in detail in the operation description of the present embodiment described later.
[0157] 図 4 (c)に、画像処理条件算出部 714の内部構成を示す。画像処理条件算出部 7 14は、図 4 (c)に示すように、シーン判別部 718、階調調整方法決定部 719、階調調 整パラメータ算出部 720、階調調整量算出部 721により構成される。 FIG. 4C shows the internal configuration of the image processing condition calculation unit 714. As shown in FIG. 4C, the image processing condition calculation unit 714 includes a scene determination unit 718, a gradation adjustment method determination unit 719, a gradation adjustment parameter calculation unit 720, and a gradation adjustment amount calculation unit 721. The
[0158] シーン判別部 718は、指標算出部 713において算出された指標 4、指標 5及び指 標 6の値と、撮影条件の確度に応じて予め領域分けされ、指標の信頼度を評価する 判別マップ (図 19参照)に基づいて、撮影画像データの撮影条件を判別する。 [0158] The scene discriminating unit 718 is divided into regions in advance according to the values of the index 4, the index 5 and the index 6 calculated by the index calculating unit 713 and the accuracy of the shooting conditions, and discriminates the reliability of the index Based on the map (see FIG. 19), the shooting condition of the shot image data is determined.
[0159] 階調調整方法決定部 719は、シーン判別部 718において判別された撮影条件に 応じて、撮影画像データに対する階調調整の方法を決定する。例えば、撮影条件が 順光又はストロボである場合は、図 21 (a)に示すように、入力された撮影画像データ の画素値を平行移動 (オフセット)補正する方法 (階調調整方法 A)が適用される。撮 影条件が逆光又はアンダーである場合は、図 21 (b)に示すように、入力された撮影 画像データの画素値をガンマ補正する方法 (階調調整方法 B)が適用される。また、 撮影条件が逆光と順光の中間 (低確度領域( 1) )である場合、又はストロボとアンダー の中間 (低確度領域 (2) )である場合、図 21 (c)に示すように、入力された撮影画像 データの画素値をガンマ補正及び平行移動 (オフセット)補正する方法 (階調調整方 法 C)が適用される。 The gradation adjustment method determination unit 719 determines a gradation adjustment method for the captured image data according to the imaging conditions determined by the scene determination unit 718. For example, when the shooting condition is direct light or strobe light, as shown in Fig. 21 (a), the method of correcting the translation (offset) of the pixel value of the input captured image data (tone adjustment method A) is Applied. When the shooting condition is backlit or under, as shown in FIG. 21 (b), a method (tone adjustment method B) for gamma correction of the pixel value of the input captured image data is applied. If the shooting condition is between backlight and direct light (low accuracy region (1)), or between strobe and under light (low accuracy region (2)), as shown in Fig. 21 (c). Gamma correction and translation (offset) correction (tone adjustment method C) are applied to the pixel values of the input captured image data.
[0160] 階調調整パラメータ算出部 720は、指標算出部 713において算出された指標 4、指 標 5及び指標 6の値に基づいて、階調調整に必要なパラメータ (キー補正値等)を算 出する。 [0160] The tone adjustment parameter calculation unit 720 calculates parameters (key correction values, etc.) necessary for tone adjustment based on the values of the index 4, the index 5, and the index 6 calculated by the index calculation unit 713. Put out.
[0161] 階調調整量算出部 721は、階調調整パラメータ算出部 720において算出された階 調調整パラメータに基づいて、撮影画像データに対する階調調整量を算出 (決定) する。具体的に、階調調整量算出部 721は、階調調整方法決定部 719において決
定された階調調整方法に対応して予め設定された複数の階調変換曲線の中から、 階調調整パラメータ算出部 720において算出された階調調整パラメータに対応する 階調変換曲線を選択する。なお、階調調整パラメータ算出部 720において算出され た階調調整パラメータに基づいて階調変換曲線 (階調調整量)を算出するようにして ちょい。 The gradation adjustment amount calculation unit 721 calculates (determines) the gradation adjustment amount for the captured image data based on the gradation adjustment parameter calculated by the gradation adjustment parameter calculation unit 720. Specifically, the gradation adjustment amount calculation unit 721 is determined by the gradation adjustment method determination unit 719. A gradation conversion curve corresponding to the gradation adjustment parameter calculated by the gradation adjustment parameter calculation unit 720 is selected from a plurality of gradation conversion curves set in advance corresponding to the determined gradation adjustment method. . Note that the tone conversion curve (tone adjustment amount) is calculated based on the tone adjustment parameter calculated by the tone adjustment parameter calculation unit 720.
[0162] シーン判別部 718における撮影条件の判別方法、階調調整パラメータ算出部 720 における階調調整パラメータの算出方法は、後述の本実施形態の動作説明におい て詳細に説明する。 [0162] The method for determining the shooting condition in the scene determination unit 718 and the method for calculating the gradation adjustment parameter in the gradation adjustment parameter calculation unit 720 will be described in detail in the operation description of the present embodiment described later.
[0163] 図 3において階調変換部 711は、階調調整量算出部 721において決定された階調 変換曲線に従って、撮影画像データを階調変換する。 In FIG. 3, the tone conversion unit 711 performs tone conversion of the captured image data according to the tone conversion curve determined by the tone adjustment amount calculation unit 721.
[0164] テンプレート処理部 705は、画像調整処理部 701からの指令に基づいて、テンプレ ート記憶手段 72から所定の画像データ (テンプレート)を読み出して、画像処理対象 の画像データとテンプレートを合成するテンプレート処理を行 、、テンプレート処理後 の画像データを画像調整処理部 701に出力する。 [0164] Based on a command from the image adjustment processing unit 701, the template processing unit 705 reads predetermined image data (template) from the template storage unit 72 and synthesizes the image data to be processed and the template. The template processing is performed, and the image data after the template processing is output to the image adjustment processing unit 701.
[0165] CRT固有処理部 706は、画像調整処理部 701から入力された画像データに対し て、必要に応じて画素数変更やカラーマッチング等の処理を施し、制御情報等表示 が必要な情報と合成した表示用の画像データを CRT8に出力する。 [0165] The CRT specific processing unit 706 performs processing such as changing the number of pixels and color matching on the image data input from the image adjustment processing unit 701 as necessary, and displays information such as control information that needs to be displayed. The combined display image data is output to CRT8.
[0166] プリンタ固有処理部 A707は、必要に応じてプリンタ固有の校正処理、カラーマッチ ング、画素数変更等の処理を行い、処理済の画像データを露光処理部 4に出力する [0166] The printer-specific processing unit A707 performs printer-specific calibration processing, color matching, pixel number change processing, and the like as necessary, and outputs processed image data to the exposure processing unit 4.
[0167] 本発明の画像処理装置 1に、大判インクジェットプリンタ等の外部プリンタ 51が接続 可能な場合には、接続するプリンタ装置毎にプリンタ固有処理部 B708が備えられて いる。このプリンタ固有処理部 B708は、プリンタ固有の校正処理、カラーマッチング 、画素数変更等の処理を施し、処理済の画像データを外部プリンタ 51に出力する。 [0167] When an external printer 51 such as a large-format ink jet printer can be connected to the image processing apparatus 1 of the present invention, a printer specific processing unit B708 is provided for each printer apparatus to be connected. The printer-specific processing unit B708 performs printer-specific calibration processing, color matching, pixel number change, and the like, and outputs processed image data to the external printer 51.
[0168] 画像データ書式作成処理部 709は、画像調整処理部 701から入力された画像デ ータに対して、必要に応じて JPEG、 TIFF, Exif等に代表される各種の汎用画像フ ォーマットへの変換を施し、処理済の画像データを画像搬送部 31や通信手段(出力 ) 33に出力する。
[0169] なお、図 3に示したフィルムスキャンデータ処理部 702、反射原稿スキャンデータ処 理部 703、画像データ書式解読処理部 704、画像調整処理部 701、 CRT固有処理 部 706、プリンタ固有処理部 A707、プリンタ固有処理部 B708、画像データ書式作 成処理部 709、という区分は、画像処理部 70の機能の理解を助けるために設けた区 分であり、必ずしも物理的に独立したデバイスとして実現される必要はなぐ例えば、 単一の CPUによるソフトウェア処理の種類の区分として実現されてもよい。 [0168] The image data format creation processing unit 709 converts the image data input from the image adjustment processing unit 701 to various general-purpose image formats represented by JPEG, TIFF, Exif, and the like as necessary. The processed image data is output to the image transport unit 31 and the communication means (output) 33. Note that the film scan data processing unit 702, the reflection original scan data processing unit 703, the image data format decoding processing unit 704, the image adjustment processing unit 701, the CRT specific processing unit 706, and the printer specific processing unit shown in FIG. The categories A707, printer specific processing unit B708, and image data format creation processing unit 709 are provided to help understand the functions of the image processing unit 70, and are not necessarily realized as physically independent devices. For example, it may be realized as a type of software processing by a single CPU.
[0170] 次に、本実施形態における動作について説明する。 Next, the operation in the present embodiment will be described.
[0171] まず、図 5のフローチャートを参照して、画像調整処理部 701において実行される 処理の流れにっ 、て説明する。 First, the flow of processing executed by the image adjustment processing unit 701 will be described with reference to the flowchart of FIG.
[0172] まず、撮影画像データのサイズが縮小される (ステップ T1)。撮影画像データのサイ ズを縮小する方法としては、公知の方法 (例えば、バイリニア法、バイキュービック法、 二アレストネーバー法等)を用いることができる。縮小率としては特に限定はないが、 処理速度の観点及び撮影条件の判別精度の観点で、元画像の 1Z2〜: LZ10程度 が好ましい。 [0172] First, the size of the captured image data is reduced (step T1). As a method for reducing the size of the captured image data, a known method (for example, a bilinear method, a bicubic method, a two-arrest naver method, or the like) can be used. The reduction ratio is not particularly limited, but is preferably about 1Z2 to LZ10 of the original image from the viewpoint of processing speed and the accuracy of determining the photographing condition.
[0173] 次 、で、縮小された撮影画像データに対して、 DSCのホワイトバランス調整の補正 処理が行われ (ステップ T2)、補正処理後の撮影画像データに基づいて、撮影条件 を特定するための指標 (指標 1〜6)を算出する指標算出処理が行われる (ステップ Τ 3)。ステップ Τ3の指標算出処理については、後に図 6を参照して詳細に説明する。 [0173] Next, DSC white balance adjustment correction processing is performed on the reduced captured image data (step T2), and the shooting conditions are specified based on the corrected captured image data. An index calculation process for calculating the indices (index 1 to 6) is performed (step Τ 3). The index calculation process of step IV3 will be described in detail later with reference to FIG.
[0174] 次 、で、ステップ Τ3で算出された指標と判別マップに基づ 、て撮影画像データの 撮影条件を判別して、撮影画像データに対する階調調整条件 (階調調整方法、階調 調整量)を決定する階調調整条件決定処理が行われる (ステップ Τ4)。ステップ Τ4の 階調調整条件決定処理については、後に図 17を参照して詳細に説明する。 [0174] Next, based on the index calculated in Step ス テ ッ プ 3 and the discrimination map, the shooting conditions of the shot image data are determined, and the tone adjustment conditions (tone adjustment method, tone adjustment for the shot image data) are determined. Gradation adjustment condition determination processing for determining (amount) is performed (step Τ4). The gradation adjustment condition determination processing in step IV4 will be described in detail later with reference to FIG.
[0175] 次 、で、元の撮影画像データに対し、ステップ Τ4で決定された階調調整条件に従 つて階調変換処理が施される (ステップ Τ5)。そして、階調変換処理後の撮影画像デ ータに対し、鮮鋭性を調整する処理が施される (ステップ Τ6)。ステップ Τ6では、撮 影条件や出力プリントサイズに応じて、処理量を調整することが好ま ヽ。 Next, gradation conversion processing is performed on the original photographed image data in accordance with the gradation adjustment condition determined in step Τ4 (step Τ5). Then, the sharpness adjustment processing is performed on the captured image data after the gradation conversion processing (step ス テ ッ プ 6). In step Τ6, it is preferable to adjust the processing amount according to the shooting conditions and output print size.
[0176] 次 ヽで、階調調整による硬調化や、鮮鋭性の強調により強調されるノイズを除去す る処理が行われる (ステップ Τ7)。次いで、撮影画像データを出力するメディアの種
類に合わせて色空間を変換する色補正処理が行われ (ステップ T8)、指定されたメ ディアに画像処理後の撮影画像データが出力される。 [0176] In the next step, a process for removing the noise enhanced by the gradation adjustment and the enhancement of sharpness is performed (step Τ7). Next, the type of media that outputs the captured image data Color correction processing is performed to convert the color space according to the type (step T8), and the captured image data after image processing is output to the designated media.
[0177] 次に、図 6のフローチャートを参照して、シーン判別部 710において実行される指 標算出処理(図 5のステップ Τ3)について説明する。以下の指標算出処理において「 撮影画像データ」とは、図 5のステップ T1にお ヽて縮小された画像データである。 Next, with reference to the flowchart in FIG. 6, the index calculation process (step Τ3 in FIG. 5) executed in the scene determination unit 710 will be described. In the following index calculation processing, “photographed image data” is image data reduced in step T1 in FIG.
[0178] まず、割合算出部 712において、撮影画像データが所定の画像領域に分割され、 各分割領域が撮影画像データ全体に占める割合を示す占有率 (第 1の占有率、第 2 の占有率)を算出する占有率算出処理が行われる (ステップ S1)。占有率算出処理 の詳細は、後に図 7、図 13を参照して説明する。 [0178] First, in the ratio calculation unit 712, the captured image data is divided into predetermined image areas, and an occupation ratio indicating the ratio of each divided area to the entire captured image data (first occupation ratio, second occupation ratio). ) Is calculated (step S1). Details of the occupation rate calculation process will be described later with reference to FIGS.
[0179] 次いで、偏り算出部 722において、撮影画像データの階調分布の偏りを示す偏倚 量を算出する偏倚量算出処理が行われる (ステップ S2)。ステップ S2の偏倚量算出 処理については、後に図 16を参照して詳細に説明する。 [0179] Next, in the bias calculation unit 722, a bias amount calculation process for calculating a bias amount indicating a bias in the gradation distribution of the photographed image data is performed (step S2). The bias amount calculation processing in step S2 will be described in detail later with reference to FIG.
[0180] 次いで、割合算出部 712において算出された占有率と、撮影条件に応じて予め設 定された係数に基づいて、光源条件を特定するための指標が算出される (ステップ S 3)。また、割合算出部 712において算出された占有率と、撮影条件に応じて予め設 定された係数に基づいて、露出条件を特定するための指標が算出され (ステップ S4 )、本指標算出処理が終了する。ステップ S3及び S4における指標の算出方法は、後 に詳細に説明する。 [0180] Next, an index for specifying the light source condition is calculated based on the occupation ratio calculated by the ratio calculation unit 712 and the coefficient set in advance according to the imaging condition (step S3). Also, an index for specifying the exposure condition is calculated based on the occupation ratio calculated in the ratio calculation unit 712 and a coefficient set in advance according to the shooting condition (step S4), and this index calculation process is performed. finish. The method for calculating the indices in steps S3 and S4 will be described in detail later.
[0181] 次に、図 7のフローチャートを参照して、割合算出部 712において実行される第 1の 占有率算出処理について詳細に説明する。 Next, the first occupancy ratio calculation process executed in the ratio calculation unit 712 will be described in detail with reference to the flowchart of FIG.
[0182] まず、撮影画像データの RGB値が HSV表色系に変換される (ステップ S 10)。図 8 は、 RGB力 HSV表色系に変換することにより色相値、彩度値、明度値を得る変換 プログラム (HSV変換プログラム)の一例を、プログラムコード (c言語)により示したも のである。図 8に示す HSV変換プログラムでは、入力画像データであるデジタル画 像データの値を、 InR、 InG、 InBと定義し、算出された色相値を OutHとし、スケール を 0〜360と定義し、彩度値を OutS、明度値を OutVとし、単位を 0〜255と定義して いる。 [0182] First, the RGB values of the photographed image data are converted into the HSV color system (step S10). Figure 8 shows an example of a conversion program (HSV conversion program) that obtains hue values, saturation values, and brightness values by converting to the RGB power HSV color system, using program code (c language). In the HSV conversion program shown in Fig. 8, the digital image data values that are 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, The degree value is OutS, the lightness value is OutV, and the unit is defined as 0 to 255.
[0183] 次 、で、撮影画像データが、所定の明度と色相の組み合わせ力 なる領域に分割
され、分割領域毎に累積画素数を算出することにより 2次元ヒストグラムが作成される (ステップ Sll)。以下、撮影画像データの領域分割について詳細に説明する。 [0183] Next, the shot image data is divided into areas having a predetermined combination of brightness and hue. Then, a two-dimensional histogram is created by calculating the cumulative number of pixels for each divided region (step Sll). Hereinafter, the area division of the captured image data will be described in detail.
[0184] 明度(V)iま、明度値力^)〜 25(vl)、 26— 50(ν2)、 51〜84(ν3)、 85〜169(ν4) 、 170〜199(v5)、 200〜224(v6)、 225〜255(v7)の 7つの領域に分割される。 色相(H)は、色相値が 0〜39、 330〜359の肌色色相領域 (HI及び H2)、色相値 力 0〜160の緑色色相領域 (H3)、色相値が 161〜250の青色色相領域 (H4)、赤 色色相領域 (H5)の 4つの領域に分割される。なお、赤色色相領域 (H5)は、撮影条 件の判別への寄与が少ないとの知見から、以下の計算では用いていない。肌色色相 領域は、更に、肌色領域 (HI)と、それ以外の領域 (H2)に分割される。以下、肌色 色相領域 (H = 0〜39、 330〜359)のうち、下記の式(1)を満たす色相'(H)を肌色 領域 (HI)とし、式( 1)を満たさな!/、領域を (H2)とする。 [0184] Lightness (V) i, Lightness value power ^) to 25 (vl), 26-50 (ν2), 51 to 84 (ν3), 85 to 169 (ν4), 170 to 199 (v5), 200 It is divided into seven areas of ~ 224 (v6) and 225 ~ 255 (v7). Hue (H) is a flesh color range (HI and H2) with a hue value of 0 to 39, 330 to 359, a green hue range (H3) with a hue value of 0 to 160, and a blue hue range with a hue value of 161 to 250. It is divided into four areas: (H4) and red hue area (H5). Note that the red hue area (H5) is not used in the following calculations because of the fact that it contributes little to the determination of the shooting conditions. The flesh-color hue area is further divided into a flesh-color area (HI) and other areas (H2). Hereinafter, out of the flesh color hue area (H = 0 to 39, 330 to 359), the hue '(H) that satisfies the following formula (1) is defined as the flesh color area (HI), and the formula (1) is not satisfied! /, Let the region be (H2).
[0185] 10<彩度(S)<175、 [0185] 10 <Saturation (S) <175,
色相 '(H) =色相(H) + 60 (0≤色相(H) < 300のとき)、 Hue '(H) = Hue (H) + 60 (when 0≤Hue (H) <300),
色相,(H)=色相(H)— 300 (300≤色相(H)く 360のとき)、 Hue, (H) = Hue (H) — 300 (when 300 ≤ Hue (H) 360 360),
輝度(Y)=InRX0.30+InGXO.59+InBXO. 11 (A)として、 色相'(H)Z輝度 (Y)く 3.0Χ(彩度(S)Z255)+0.7 (1) Luminance (Y) = InRX0.30 + InGXO.59 + InBXO. 11 (A), Hue '(H) Z Luminance (Y) <3.0Χ (Saturation (S) Z255) +0.7 (1)
従って、撮影画像データの分割領域の数は 4X7 = 28個となる。なお、式(1)にお V、て明度 (V)を用いることも可能である。 Therefore, the number of divided areas of the captured image data is 4X7 = 28. It is also possible to use V and brightness (V) in equation (1).
[0186] 2次元ヒストグラムが作成されると、分割領域毎に算出された累積画素数の全画素 数 (撮影画像全体)に占める割合を示す第 1の占有率が算出され (ステップ S12)、本 占有率算出処理が終了する。明度領域 vi、色相領域 Hjの組み合わせ力 なる分割 領域において算出された第 1の占有率を Rijとすると、各分割領域における第 1の占 有率は表 1のように表される。 [0186] 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). The occupation rate calculation process ends. Assuming that Rij is the first occupancy calculated in the divided area, which is the combined power of the lightness area vi and the hue area Hj, the first occupancy ratio in each divided area is expressed as shown in Table 1.
[0187] [表 1]
[第 1の占有率] [0187] [Table 1] [First occupancy]
[0188] 次に、指標 1及び指標 2の算出方法について説明する。 [0188] Next, a method of calculating the index 1 and the index 2 will be described.
[0189] 表 2に、ストロボ撮影としての確度、即ち、ストロボ撮影時の顔領域の明度状態を定 量的に示す指標 1を算出するために必要な第 1の係数を分割領域別に示す。表 2に 示された各分割領域の係数は、表 1に示した各分割領域の第 1の占有率 Rijに乗算 する重み係数であり、撮影条件に応じて予め設定されている。 [0189] Table 2 shows, for each divided area, the first coefficient necessary for calculating the index 1 that quantitatively indicates the accuracy of strobe shooting, that is, the brightness state of the face area at the time of strobe shooting. The coefficient of each divided area shown in Table 2 is a weighting coefficient by which the first occupancy Rij of each divided area shown in Table 1 is multiplied, and is set in advance according to the photographing conditions.
[0190] [表 2] [0190] [Table 2]
[第 1の係数 [First factor
[0191] 図 9に、明度 (v)—色相 (H)平面を示す。表 2によると、図 9において高明度の肌色 色相領域に分布する領域 (rl)から算出される第 1の占有率には、正(+ )の係数が 用いられ、それ以外の色相である青色色相領域 (r2)力 算出される第 1の占有率に は、負(一)の係数が用いられる。図 11は、肌色領域 (HI)における第 1の係数と、そ の他の領域 (緑色色相領域 (H3) )における第 1の係数を、明度全体に渡って連続的 に変化する曲線 (係数曲線)として示したものである。表 2及び図 11によると、高明度 (V= 170〜224)の領域では、肌色領域 (HI)における第 1の係数の符号は正(+ ) であり、その他の領域 (例えば、緑色色相領域 (H3) )における第 1の係数の符号は 負(一)であり、両者の符号が異なって 、ることがわ力る。 [0191] Figure 9 shows the brightness (v) —hue (H) plane. According to Table 2, a positive (+) coefficient is used for the first occupancy calculated from the area (rl) distributed in the high brightness skin color hue area in Fig. 9, and the other hue is blue. Hue region (r2) force A negative (one) coefficient is used for the first occupancy calculated. Figure 11 shows a curve (coefficient curve) where the first coefficient in the flesh-color area (HI) and the first coefficient in the other areas (green hue area (H3)) change continuously over the entire brightness. ). According to Table 2 and Fig. 11, in the high lightness (V = 170 to 224) region, the sign of the first coefficient in the skin color region (HI) is positive (+), and other regions (for example, the green hue region) The sign of the first coefficient in (H3)) is negative (one).
[0192] 明度領域 vi、色相領域 Hjにおける第 1の係数を Cijとすると、指標 1を算出するため の Hk領域の和は、式(2)のように定義される。
[0193] [数 1] [0192] 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 Equation (2). [0193] [Equation 1]
Hk領域の和 = tRikx Cik ( 2 ) Hk region sum = t Rikx Cik (2)
[0194] 従って、 HI' 領域の和は、下記の式(2— 1)〜式(2— 4)のように表される。 [0194] Therefore, the sum of the HI 'regions is expressed by the following equations (2-1) to (2-4).
HI領域の和: R11X (-44.0)+R21X (-16.0) + (中略) HI area sum: R11X (-44.0) + R21X (-16.0) + (omitted)
... +R71X (-11.3) (2-1) ... + R71X (-11.3) (2-1)
H2領域の和 =R12X0.0+R22X8.6+ (中略) Sum of H2 region = R12X0.0 + R22X8.6 + (omitted)
... +R72X (-11.1) (2-2) ... + R72X (-11.1) (2-2)
H3領域の和 =R13XO.0+R23X (-6.3) + (中略) Sum of H3 regions = R13XO.0 + R23X (-6.3) + (omitted)
... +R73X (-10.0) (2-3) ... + R73X (-10.0) (2-3)
H4領域の和 =R14X0.0+R24X (-1.8) + (中略) Sum of H4 region = R14X0.0 + R24X (-1.8) + (omitted)
... +R74X (-14.6) (2-4) ... + R74X (-14.6) (2-4)
指標 1は、式(2— 1)〜(2— 4)で示された H1〜H4領域の和を用いて、式(3)のよ うに定義される。 Index 1 is defined as equation (3) using the sum of the H1 to H4 regions shown in equations (2-1) to (2-4).
[0195] 指標 1=H1領域の和 +H2領域の和 +H3領域の和 +H4領域の和 +4.424 (3 ) [0195] Indicator 1 = sum of H1 regions + sum of H2 regions + sum of H3 regions + sum of H4 regions +4.424 (3)
表 3に、逆光撮影としての確度、即ち、逆光撮影時の顔領域の明度状態を定量的 に示す指標 2を算出するために必要な第 2の係数を分割領域別に示す。表 3に示さ れた各分割領域の係数は、表 1に示した各分割領域の第 1の占有率 Rijに乗算する 重み係数であり、撮影条件に応じて予め設定されている。 Table 3 shows the second coefficient required for each divided area to calculate the index 2 that quantitatively shows the accuracy of backlighting, that is, the brightness state of the face area during backlighting. The coefficient of each divided area shown in Table 3 is a weighting coefficient by which the first occupancy ratio Rij of each divided area shown in Table 1 is multiplied, and is set in advance according to the shooting conditions.
[0196] [表 3] [0196] [Table 3]
[第 2の係数] [Second factor]
[0197] 図 10に、明度 (V)—色相(H)平面を示す。表 3によると、図 10において肌色色相 領域の中間明度に分布する領域 (r4)から算出される占有率には負(一)の係数が用
ヽられ、肌色色相領域の低明度 (シャドー)領域 (r3)から算出される占有率には正 ( + )の係数が用いられる。図 12は、肌色領域 (HI)における第 2の係数を、明度全体 に渡って連続的に変化する曲線 (係数曲線)として示したものである。表 3及び図 12 によると、肌色色相領域の、明度値が 85〜169(v4)の中間明度領域の第 2の係数 の符号は負(-)であり、明度値が 26〜84(v2, v3)の低明度 (シャドー)領域の第 2 の係数の符号は正( + )であり、両領域での係数の符号が異なって 、ることがわ力る。 FIG. 10 shows the brightness (V) —hue (H) plane. According to Table 3, a negative (one) coefficient is used for the occupancy calculated from the area (r4) distributed in the intermediate lightness of the flesh-colored hue area in Fig. 10. A positive (+) coefficient is used for the occupation ratio calculated from the low brightness (shadow) area (r3) of the flesh tone hue area. Fig. 12 shows the second coefficient in the flesh color region (HI) as a curve (coefficient curve) that continuously changes over the entire brightness. According to Table 3 and Fig. 12, the sign of the second coefficient of the intermediate lightness area of the flesh tone hue area with a lightness value of 85 to 169 (v4) is negative (-), and the lightness value is 26 to 84 (v2, The sign of the second coefficient in the low lightness (shadow) region of v3) is positive (+), and it is obvious that the sign of the coefficient in both regions is different.
[0198] 明度領域 vi、色相領域 Hjにおける第 2の係数を Dijとすると、指標 2を算出するため の Hk領域の和は、式 (4)のように定義される。 [0198] If 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 equation (4).
[0199] [数 2] [0199] [Equation 2]
Hk領域の和 = £ Riit X Dik ( 4 ) Hk region sum = £ Riit X Dik (4)
[0200] 従って、 H1〜H4領域の和は、下記の式(4 1)〜式(4 4)のように表される。 [0200] Therefore, the sum of the H1 to H4 regions is expressed by the following equations (41) to (44).
HI領域の和 =R11X (― 27.0)+R21X4.5+ (中略) HI area sum = R11X (--27.0) + R21X4.5 + (omitted)
... +R71X (-24.0) (4-1) ... + R71X (-24.0) (4-1)
H2領域の和 =R12X0.0+R22X4.7+ (中略) Sum of H2 region = R12X0.0 + R22X4.7 + (omitted)
... +R72X (-8.5) (4-2) ... + R72X (-8.5) (4-2)
H3領域の和 =R13XO.0+R23XO.0+ (中略) Sum of H3 regions = R13XO.0 + R23XO.0 + (omitted)
... +R73XO.0 (4-3) ... + R73XO.0 (4-3)
H4領域の和 =R14X0.0+R24X (-5.1)+ (中略) Sum of H4 region = R14X0.0 + R24X (-5.1) + (omitted)
... +R74X7.2 (4-4) ... + R74X7.2 (4-4)
指標 2は、式 (4 1)〜(4 4)で示された H1〜H4領域の和を用いて、式(5)のよ うに定義される。 Index 2 is defined as equation (5) using the sum of the H1 to H4 regions shown in equations (41) to (44).
[0201] 指標 2=H1領域の和 +H2領域の和 +H3領域の和 +H4領域の和 +1.554 (5 ) [0201] Indicator 2 = H1 region sum + H2 region sum + H3 region sum + H4 region sum +1.554 (5)
指標 1及び指標 2は、撮影画像データの明度と色相の分布量に基づいて算出され るため、撮影画像データがカラー画像である場合の撮影条件の判別に有効である。 Since the index 1 and the index 2 are calculated based on the brightness and hue distribution amount of the captured image data, the index 1 and the index 2 are effective in determining the imaging condition when the captured image data is a color image.
[0202] 次に、図 13のフローチャートを参照して、指標 3を算出するために割合算出部 712 において実行される第 2の占有率算出処理について詳細に説明する。
[0203] まず、撮影画像データの RGB値が HSV表色系に変換される (ステップ S 20)。次 ヽ で、撮影画像データが、撮影画像画面の外縁からの距離と明度の組み合わせ力ゝらな る領域に分割され、分割領域毎に累積画素数を算出することにより 2次元ヒストグラム が作成される (ステップ S21)。以下、撮影画像データの領域分割について詳細に説 明する。 Next, the second occupancy ratio calculation process executed in the ratio calculation unit 712 to calculate the index 3 will be described in detail with reference to the flowchart of FIG. [0203] First, the RGB values of the photographed image data are converted into the HSV color system (step S20). Next, the captured image data is divided into areas where the combined power of the distance from the outer edge of the captured image screen and the brightness is determined, and a two-dimensional histogram is created by calculating the cumulative number of pixels for each divided area. (Step S21). Hereinafter, the area division of the captured image data will be described in detail.
[0204] 図 14 (a)〜 14 (d)に、撮影画像データの画面の外縁からの距離に応じて分割され た 4つの領域 nl〜n4を示す。図 14 (a)に示す領域 nlが外枠であり、図 14 (b)に示 す領域 n2が、外枠の内側の領域であり、図 14 (c)に示す領域 n3が、領域 n2の更に 内側の領域であり、図 14 (d)に示す領域 n4が、撮影画像画面の中心部の領域であ る。また、明度は、上述のように vl〜v7の 7つの領域に分割するものとする。従って、 撮影画像データを、撮影画像画面の外縁からの距離と明度の組み合わせカゝらなる領 域に分割した場合の分割領域の数は 4 X 7 = 28個となる。 [0204] Figs. 14 (a) to 14 (d) show four regions nl to n4 divided according to the distance from the outer edge of the screen of the captured image data. The area nl shown in FIG. 14 (a) is the outer frame, the area n2 shown in FIG. 14 (b) is the area inside the outer frame, and the area n3 shown in FIG. 14 (c) is the area n2. Further, an inner area, an area n4 shown in FIG. 14 (d) is an area at the center of the captured image screen. In addition, the lightness is divided into seven regions from vl to v7 as described above. Therefore, when the captured image data is divided into areas that are a combination of the distance from the outer edge of the captured image screen and the brightness, the number of divided areas is 4 × 7 = 28.
[0205] 2次元ヒストグラムが作成されると、分割領域毎に算出された累積画素数の全画素 数 (撮影画像全体)に占める割合を示す第 2の占有率が算出され (ステップ S22)、本 占有率算出処理が終了する。明度領域 vi、画面領域 njの組み合わせ力 なる分割 領域において算出された第 2の占有率を Qijとすると、各分割領域における第 2の占 有率は表 4のように表される。 [0205] 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). The occupation rate calculation process ends. Assuming that Qij is the second occupancy calculated in the divided area, which is the combination of the lightness area vi and the screen area nj, the second occupancy ratio in each divided area is shown in Table 4.
[0206] [表 4] [0206] [Table 4]
[第 2の占有率 [Second occupancy
[0207] 次に、指標 3の算出方法について説明する。 Next, a method for calculating the index 3 will be described.
[0208] 表 5に、指標 3を算出するために必要な第 3の係数を分割領域別に示す。表 5に示 された各分割領域の係数は、表 4に示した各分割領域の第 2の占有率 Qijに乗算す る重み係数であり、撮影条件に応じて予め設定されている。 [0208] 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 occupancy Qij of each divided area shown in Table 4 is multiplied, and is set in advance according to the photographing conditions.
[0209] [表 5]
[0209] [Table 5]
[0210] 図 15は、画面領域 nl〜n4における第 3の係数を、明度全体に渡って連続的に変 化する曲線 (係数曲線)として示したものである。 [0210] FIG. 15 shows the third coefficient in the screen areas nl to n4 as a curve (coefficient curve) that continuously changes over the entire brightness.
[0211] 明度領域 vi、画面領域 njにおける第 3の係数を Eijとすると、指標 3を算出するため の nk領域 (画面領域 nk)の和は、式 (6)のように定義される。 [0211] 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 equation (6).
[0212] [数 3] ( 6 )[0212] [Equation 3] (6)
[0213] 従って、 nl〜n4領域の和は、下記の式(6— 1)〜式(6— 4)のように表される。 [0213] Therefore, the sum of the nl to n4 regions is expressed by the following equations (6-1) to (6-4).
nl領域の和: Q11X40. 1+Q21X37.0+ (中略) Sum of nl region: Q11X40. 1 + Q21X37.0 + (omitted)
... +Q71X22.0 (6-1) ... + Q71X22.0 (6-1)
n2領域の和 = Q12X (-14.8)+Q22X (— 10.5) + (中略) Sum of n2 regions = Q12X (-14.8) + Q22X (— 10.5) + (omitted)
... +Q72X0.0 (6-2) ... + Q72X0.0 (6-2)
n3領域の禾ロ = Q13X24.6 + Q23X12.1+ (中略) n3 area B = Q13X24.6 + Q23X12.1 + (omitted)
... +Q73X10. 1 (6-3) ... + Q73X10. 1 (6-3)
n4領域の和 = Q14X1.5 + Q24X (-32.9) + (中略) n4 area sum = Q14X1.5 + Q24X (-32.9) + (omitted)
... +Q74X (一 52.2) (6-4) ... + Q74X (1 52.2) (6-4)
指標 3は、式(6— 1)〜(6— 4)で示された N1〜H4領域の和を用いて、式(7)のよ うに定義される。 Index 3 is defined as equation (7) using the sum of the N1 to H4 regions shown in equations (6-1) to (6-4).
[0214] 指標 3=nl領域の和 +n2領域の和 +n3領域の和 +n4領域の和 12.6201 [0214] Indicator 3 = sum of nl regions + sum of n2 regions + sum of n3 regions + sum of n4 regions 12.6201
(7) (7)
指標 3は、撮影画像データの明度の分布位置による構図的な特徴 (撮影画像デー タの画面の外縁力もの距離)に基づいて算出されるため、カラー画像だけでなくモノ クロ画像の撮影条件を判別するのにも有効である。
[0215] 次に、図 16のフローチャートを参照して、偏り算出部 722において実行される偏倚 量算出処理(図 6のステップ S2)について説明する。 Index 3 is calculated based on the compositional characteristics (distance of the outer edge force of the screen of the captured image data) based on the brightness distribution position of the captured image data. Therefore, the shooting conditions for the monochrome image as well as the color image are determined. It is also effective for discrimination. Next, with reference to the flowchart in FIG. 16, the bias amount calculation process (step S 2 in FIG. 6) executed in the bias calculation unit 722 will be described.
[0216] まず、撮影画像データの RGB (Red, Green, Blue)値から、式 (A)を用いて各画 素の輝度 Y (明るさ)が算出され、輝度の標準偏差 (xl)が算出される (ステップ S23) 。輝度の標準偏差 (xl)は、式 (8)のように表される。 [0216] First, the luminance Y (brightness) of each pixel is calculated from the RGB (Red, Green, Blue) values of the captured image data using Equation (A), and the standard deviation (xl) of the luminance is calculated. (Step S23). The standard deviation (xl) of luminance is expressed as shown in Equation (8).
[0217] [数 4] ( 8 )[0217] [Numeric 4] ( 8 )
[0218] 式 (8)において、画素輝度値とは、撮影画像データの各画素の輝度であり、平均輝 度値とは、撮影画像データの輝度の平均値である。また、全体画素数とは、撮影画 像データ全体の画素数である。 [0218] In equation (8), the pixel luminance value is the luminance of each pixel of the captured image data, and the average luminance value is the average value of the luminance of the captured image data. The total number of pixels is the number of pixels of the entire captured image data.
[0219] 次いで、式(9)に示すように、輝度差分値 (x2)が算出される (ステップ S24)。 Next, as shown in Expression (9), a luminance difference value (x2) is calculated (step S24).
[0220] 輝度差分値 (x2) = (最大輝度値一平均輝度値) Z255 (9) [0220] Luminance difference value (x2) = (maximum luminance value, average luminance value) Z255 (9)
式(9)において、最大輝度値とは、撮影画像データの輝度の最大値である。 In equation (9), the maximum luminance value is the maximum luminance value of the captured image data.
[0221] 次いで、撮影画像データの画面中央部における肌色領域の平均輝度値 (x3)が算 出され (ステップ S25)、更に、当該画面中央部における平均輝度値 (x4)が算出され る(ステップ S26)。ここで、画面中央部とは、例えば、図 14において、領域 n3及び領 域 n4により構成される領域である。 [0221] Next, the average luminance value (x3) of the flesh color region in the center of the screen of the photographed image data is calculated (step S25), and further, the average luminance value (x4) in the center of the screen is calculated (step S25). S26). Here, the center of the screen is, for example, an area composed of an area n3 and an area n4 in FIG.
[0222] 次いで、肌色輝度分布値 (x5)が算出され (ステップ S27)、本偏倚量算出処理が 終了する。撮影画像データの肌色領域の最大輝度値を Yskin— max、肌色領域の 最小輝度値を Yskin— min、肌色領域の平均輝度値を Yskin— aveとすると、肌色 輝度分布値 (x5)は、式(10)のように表される。 [0222] Next, the flesh color luminance distribution value (x5) is calculated (step S27), and this deviation amount calculation processing ends. When the maximum brightness value of the skin color area of the captured image data is Yskin—max, the minimum brightness value of the skin color area is Yskin—min, and the average brightness value of the skin color area is Yskin—ave, the skin color brightness distribution value (x5) is It is expressed as 10).
[0223] x5= (Yskin― max― Yskin― min) / 2 ― Yskin― ave ( 10) [0223] x5 = (Yskin― max― Yskin― min) / 2 ― Yskin― ave (10)
撮影画像データの画面中央部における肌色領域の平均輝度値を x6とする。ここで の画面中央部とは、例えば、図 14の領域 n2、領域 n3及び領域 n4から構成される領 域である。このとき、指標 4は、指標 指標 3、 x6を用いて式(11)のように定義され、 指標 5は、指標 2、指標 3、 x6を用いて式(12)のように定義される。 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 central portion of the screen is, for example, a region composed of region n2, region n3, and region n4 in FIG. At this time, index 4 is defined as in equation (11) using index indexes 3 and x6, and index 5 is defined as in equation (12) using index 2, index 3, and x6.
[0224] 指標 4 = 0. 46 X指標 1 + 0. 61 X指標 3 + 0. 01 Χ χ6— 0. 79 (11)
指標 5 = 0. 58X指標 2 + 0. 18X指標 3+(— 0.03) Χχ6 + 3. 34 (12) ここで、式(11)及び式(12)において各指標に乗算される重み係数は、撮影条件 に応じて予め設定されて ヽる。 [0224] Indicator 4 = 0. 46 X indicator 1 + 0. 61 X indicator 3 + 0. 01 χ χ6— 0. 79 (11) Index 5 = 0. 58X Index 2 + 0.18X Index 3 + (— 0.03) Χχ6 + 3. 34 (12) Here, the weighting coefficient multiplied by each index in Equation (11) and Equation (12) is It is set in advance according to the shooting conditions.
[0225] 指標 6は、偏倚量算出処理で算出された偏倚量 (xl)〜(x5)に、撮影条件に応じ て予め設定された第 4の係数を乗算することにより得られる。表 6に、各偏倚量に乗算 する重み係数である第 4の係数を示す。 [0225] The index 6 is obtained by multiplying the deviation amounts (xl) to (x5) calculated in the deviation amount calculation processing by a fourth coefficient set in advance according to the imaging conditions. Table 6 shows the fourth coefficient, which is a weighting coefficient by which each deviation is multiplied.
[0226] [表 6] [0226] [Table 6]
[0227] 指標 6は、式(13)のように表される。 [0227] The index 6 is expressed as in Expression (13).
[0228] 指標 6=xlX0.02+x2Xl. 13+x3XO.06+x4X (-0.01)+x5XO.03— 6.49 (13) [0228] Indicator 6 = xlX0.02 + x2Xl. 13 + x3XO.06 + x4X (-0.01) + x5XO.03— 6.49 (13)
この指標 6は、撮影画像データの画面の構図的な特徴だけでなぐ輝度ヒストグラム 分布情報を持ち合わせており、特に、ストロボ撮影シーンとアンダー撮影シーンの判 別に有効である。 This index 6 has luminance histogram distribution information that is based only on the compositional characteristics of the captured image data screen, and is particularly effective in distinguishing between a flash photography scene and an under photography scene.
[0229] 次に、図 17のフローチャートを参照して、画像処理条件算出部 714において実行 される階調調整条件決定処理(図 5のステップ T4)について説明する。 Next, the gradation adjustment condition determination process (step T4 in FIG. 5) executed in the image processing condition calculation unit 714 will be described with reference to the flowchart in FIG.
[0230] まず、指標算出部 713において算出された指標 (指標 4〜6)と、撮影条件に応じて 予め領域分けされた判別マップに基づ 、て、撮影画像データの撮影条件が判別さ れる (ステップ S30)。以下、撮影条件の判別方法について説明する。 [0230] First, the shooting condition of the shot image data is determined based on the index (indexes 4 to 6) calculated by the index calculation unit 713 and the determination map divided in advance according to the shooting conditions. (Step S30). Hereinafter, a method for determining the photographing condition will be described.
[0231] 図 18 (a)は、順光、逆光、ストロボの各撮影条件で 60枚ずつ撮影し、合計 180枚の デジタル画像データについて、指標 4及び指標 5を算出し、各撮影条件での指標 4 及び指標 5の値をプロットしたものである。図 18(b)は、ストロボ、アンダーの各撮影 条件で 60枚ずつ撮影し、指標 4が 0. 5より大きい画像の指標 4及び指標 6の値をプ ロットしたちのである。 [0231] Fig. 18 (a) shows 60 images taken under each of the following conditions: forward light, backlight, and strobe, and index 4 and index 5 were calculated for a total of 180 digital image data. The values of index 4 and index 5 are plotted. Figure 18 (b) shows the results of plotting the values of index 4 and index 6 for images where 60 images were taken under each strobe and under shooting conditions, and index 4 was greater than 0.5.
[0232] 判別マップは、指標の信頼度を評価するもので、図 19に示すように、順光、逆光、
ストロボ、アンダーの各基本領域と、逆光と順光の中間の低確度領域(1)、ストロボと アンダーの中間の低確度領域 (2)から構成される。なお、判別マップ上には、逆光と ストロボの間の低確度領域等、他の低確度領域も存在するが、本実施形態では省略 する。 [0232] The discriminant map is used to evaluate the reliability of the index. As shown in FIG. It consists of strobe and under basic areas, a low accuracy area (1) between backlight and direct light, and a low accuracy area (2) between strobe and under. Note that there are other low-accuracy regions such as a low-accuracy region between backlight and strobe on the discrimination map, but they are omitted in this embodiment.
[0233] 図 18に示した各指標値のプロット図と、図 19の判別マップによる撮影条件の判別 内容を表 7に示す。 [0233] Table 7 shows a plot of each index value shown in Fig. 18 and the shooting conditions discriminated based on the discrimination map of Fig. 19.
[0234] [表 7] [0234] [Table 7]
[0235] このように、指標 4及び指標 5の値により光源条件を定量的に判別することができ、 指標 4及び指標 6の値により露出条件を定量的に判別することができる。また、指標 4 及び指標 5の値により、順光と逆光の中間の低確度領域(1)を判別でき、指標 4及び 指標 6の値により、ストロボとアンダーの中間の低確度領域(2)を判別することができ る。 As described above, the light source condition can be quantitatively determined based on the values of the index 4 and the index 5, and the exposure condition can be quantitatively determined based on the values of the index 4 and the index 6. In addition, the low accuracy region (1) between the forward light and the backlight can be distinguished from the values of the indicators 4 and 5, and the low accuracy region (2) between the strobe and the under can be determined from the values of the indicators 4 and 6. Can be determined.
[0236] 撮影条件が判別されると、その判別された撮影条件に応じて、撮影画像データに 対する階調調整の方法が決定される (ステップ S31)。図 20に示すように、撮影条件 が順光又はストロボである場合は階調調整方法 A (図 21 (a) )が選択され、逆光又は アンダーである場合は階調調整方法 B (図 21 (b) )が選択される。また、撮影条件が 逆光と順光の中間又はストロボとアンダーの中間である場合 (即ち、判別マップ上の 低確度領域である場合)は階調調整方法 C (図 21 (c) )が選択される。 [0236] When the shooting conditions are determined, a gradation adjustment method for the shot image data is determined in accordance with the determined shooting conditions (step S31). As shown in Fig. 20, when the shooting condition is normal light or strobe light, the gradation adjustment method A (Fig. 21 (a)) is selected, and when the shooting condition is backlight or under, the gradation adjustment method B (Fig. 21 ( b)) is selected. Also, if the shooting condition is between backlight and direct light or between strobe and under (that is, a low-accuracy region on the discrimination map), tone adjustment method C (Fig. 21 (c)) is selected. The
[0237] このように、撮影条件が順光である場合は、補正量が比較的少ないため、撮影画像 データの画素値を平行移動 (オフセット)補正する階調調整方法 Aを適用することが、 ガンマ変動を抑制できる観点力も好ましい。また、撮影条件が逆光又はアンダーであ る場合は、補正量が比較的多いため、階調調整方法 Aを適用すると、画像データの 存在しない階調が著しく増大し、黒色の白濁化や、白色の明度の低下を招くことにな
る。従って、撮影条件が逆光又はアンダーである場合は、撮影画像データの画素値 をガンマ補正する階調調整方法 Bを適用するのが好ましい。また、判別マップ上で低 確度領域にある撮影条件の場合、どの低確度領域も、隣接する一方の撮影条件に 対する階調調整方法が A又は Bとなるため、双方の階調調整方法を混合した階調調 整方法 Cを適用するのが好ましい。このように低確度領域を設定することにより、異な る階調調整方法を用いた場合でも、処理結果をスムーズに移行させることができる。 また、同じ被写体を撮影した複数の写真プリント間での、濃度のばらつきを軽減する ことができる。なお、図 21 (b)に示した階調変換曲線は上向きに凸となっているが、 下向きに凸の場合もある。また、図 21 (c)に示した階調変換曲線は下向きに凸となつ ているが、上向きに凸の場合もある。 [0237] As described above, when the shooting condition is direct light, since the correction amount is relatively small, it is possible to apply the gradation adjustment method A in which the pixel value of the shot image data is corrected in parallel (offset). A viewpoint power capable of suppressing gamma fluctuation is also preferable. Also, when the shooting conditions are backlit or under, the amount of correction is relatively large, so applying gradation adjustment method A significantly increases the gradation where there is no image data, resulting in black turbidity or whiteness. Will lead to a decrease in the brightness of The Therefore, when the shooting condition is backlight or under, it is preferable to apply the gradation adjustment method B in which the pixel value of the shot image data is gamma corrected. Also, in the case of shooting conditions in the low accuracy area on the discrimination map, the gradation adjustment method for one of the adjacent shooting conditions is A or B in any low accuracy area, so both gradation adjustment methods are mixed. It is preferable to apply the gradation adjustment method C described above. By setting the low-accuracy region in this way, the processing result can be smoothly transferred even when different gradation adjustment methods are used. In addition, it is possible to reduce variations in density between multiple photo prints taken of the same subject. Note that the tone conversion curve shown in FIG. 21 (b) is convex upward, but may be convex downward. In addition, the tone conversion curve shown in FIG. 21 (c) is convex downward, but may be convex upward.
[0238] 階調調整方法が決定されると、指標算出部 713において算出された指標に基づい て、階調調整に必要なパラメータが算出される (ステップ S32)。以下、ステップ S32 において算出される階調調整パラメータの算出方法について説明する。なお、以下 では、 8bitの撮影画像データは 16bitへと事前に変換されているものとし、撮影画像 データの値の単位は 16bitであるものとする。 [0238] When the gradation adjustment method is determined, parameters necessary for gradation adjustment are calculated based on the index calculated by the index calculation unit 713 (step S32). Hereinafter, the calculation method of the gradation adjustment parameter calculated in step S32 will be described. In the following, it is assumed that the 8-bit captured image data has been converted to 16-bit in advance, and the unit of the captured image data value is 16-bit.
[0239] 階調調整に必要なパラメータ(階調調整パラメータ)として、下記の P1〜P10のパラ メータが算出される。 [0239] The following parameters P1 to P10 are calculated as parameters necessary for gradation adjustment (gradation adjustment parameters).
[0240] P1:撮影画面全体の平均輝度 [0240] P1: Average brightness of the entire shooting screen
P2 :ブロック分割平均輝度 P2: Block division average brightness
P3:肌色領域 (HI)の平均輝度 P3: Average brightness of skin tone area (HI)
P4:輝度補正値 1 = P1 -P2 P4: Brightness correction value 1 = P1 -P2
P5:再現目標修正値 =輝度再現目標値 (30360) -P4 P5: Reproduction target correction value = Brightness reproduction target value (30360) -P4
P6 :オフセット値 1 = P5— P1 P6: Offset value 1 = P5— P1
P7 :キー補正値 P7: Key correction value
P7':キー補正値 2 P7 ': Key correction value 2
P8 :輝度補正値 2 P8: Brightness correction value 2
P9 :オフセット値 2 = P5— P8— P1 P9: Offset value 2 = P5— P8— P1
P 10 :オフセット値 3
ここで、図 22及び図 23を参照して、ノ メータ P2の算出方法について説明する。 P 10: Offset value 3 Here, the calculation method of the meter P2 will be described with reference to FIG. 22 and FIG.
[0241] まず、撮影画像データを正規化するために、 CDF (累積密度関数)を作成する。次 いで、得られた CDF力 最大値と最小値を決定する。この最大値と最小値は、 RGB 毎に求める。ここで、求められた RGB毎の最大値と最小値を、それぞれ、 Rmax、 R mmゝ Gmax、 Gmmゝ Bmax、 Bmmとす 0 [0241] First, a CDF (cumulative density function) is created in order to normalize captured image data. Next, the maximum and minimum values of the CDF force obtained are determined. The maximum and minimum values are obtained for each RGB. Here, the maximum and minimum values for each of RGB obtained, respectively, Rmax, R mmゝGmax, GmmゝBmax, Bmm and to 0
[0242] 次 、で、撮影画像データの任意の画素 (Rx, Gx, Bx)に対する正規化画像データ を算出する。 Rプレーンにおける Rxの正規化データを R 、 Gプレーンにおける Gx [0242] Next, normalized image data for any pixel (Rx, Gx, Bx) of the captured image data is calculated. Rx normalized data in R plane is R, Gx in G plane
point point
の正規化データを G 、 Bプレーンにおける Bxの正規化データを B とすると、正 If the normalized data of G is G and the normalized data of Bx in the B plane is B, then
point point point point
規化データ R 、 G 、 B は、それぞれ、式(14)〜式(16)のように表される。 The normalized data R 1, G 2, and B are respectively expressed as Expression (14) to Expression (16).
point point point point point point
R = { (Rx-Rmin) / (Rmax-Rmin) } X 65535 (14) R = {(Rx-Rmin) / (Rmax-Rmin)} X 65535 (14)
point point
G = { (Gx-Gmin) / (Gmax-Gmin) } X 65535 (15) G = {(Gx-Gmin) / (Gmax-Gmin)} X 65535 (15)
point point
B = { (Bx-Bmin) / (Bmax-Bmin) } X 65535 (16) B = {(Bx-Bmin) / (Bmax-Bmin)} X 65535 (16)
point point
次いで、式(17)により画素 (Rx, Gx, Bx)の輝度 N を算出する。 Next, the luminance N of the pixel (Rx, Gx, Bx) is calculated by Expression (17).
point point
[0243] N = (B +G +R ) /3 (17) [0243] N = (B + G + R) / 3 (17)
point point point point point point point point
図 22 (a)は、正規ィ匕する前の RGB画素の輝度の度数分布 (ヒストグラム)である。図 22 (a)において、横軸は輝度、縦軸は画素の頻度である。このヒストグラムは、 RGB 毎に作成する。輝度のヒストグラムが作成されると、式(14)〜(16)により、撮影画像 データに対し、プレーン毎に正規ィ匕を行う。図 22 (b)は、式(17)により算出された輝 度のヒストグラムを示す。撮影画像データが 65535で正規ィ匕されているため、各画素 は、最大値が 65535で最小値力^の間で任意の値をとる。 Figure 22 (a) shows the frequency distribution (histogram) of the brightness of RGB pixels before normalization. In FIG. 22 (a), the horizontal axis represents luminance, and the vertical axis represents pixel frequency. This histogram is created for each RGB. When the luminance histogram is created, regularity is applied to the captured image data for each plane according to equations (14) to (16). Fig. 22 (b) shows a histogram of brightness calculated by equation (17). Since the captured image data is normally entered at 65535, each pixel takes an arbitrary value between the maximum value of 65535 and the minimum value power.
[0244] 図 22 (b)に示す輝度ヒストグラムを所定の範囲で区切ってブロックに分割すると、図 22 (c)に示すような度数分布が得られる。図 22 (c)において、横軸はブロック番号( 輝度)、縦軸は頻度である。 When the luminance histogram shown in FIG. 22 (b) is divided into blocks divided by a predetermined range, a frequency distribution as shown in FIG. 22 (c) is obtained. In Fig. 22 (c), the horizontal axis is the block number (luminance) and the vertical axis is the frequency.
[0245] 次いで、図 22 (c)に示された輝度ヒストグラムから、ノ、イライト、シャドー領域を削除 する処理を行う。これは、白壁や雪上シーンでは、平均輝度が非常に高くなり、暗闇 のシーンでは平均輝度は非常に低くなつているため、ハイライト、シャドー領域は、平 均輝度制御に悪影響を与えてしまうことによる。そこで、図 22 (c)に示した輝度ヒスト グラムのハイライト領域、シャドー領域を制限することによって、両領域の影響を減少
させる。図 23 (a) (又は図 22 (c) )に示す輝度ヒストグラムにおいて、高輝度領域 (ハ イライト領域)及び低輝度領域 (シャドー領域)を削除すると、図 23 (b)のようになる。 [0245] Next, a process of deleting the no, illite, and shadow areas from the luminance histogram shown in Fig. 22 (c) is performed. This is because the average brightness is extremely high in white walls and snow scenes, and the average brightness is very low in dark scenes, so highlights and shadow areas can adversely affect average brightness control. by. Therefore, by limiting the highlight and shadow areas of the luminance histogram shown in Fig. 22 (c), the influence of both areas is reduced. Let If the high-brightness region (highlight region) and the low-brightness region (shadow region) are deleted from the luminance histogram shown in Fig. 23 (a) (or Fig. 22 (c)), the result is as shown in Fig. 23 (b).
[0246] 次いで、図 23 (c)に示すように、輝度ヒストグラムにおいて、頻度が所定の閾値より 大きい領域を削除する。これは、頻度が極端に多い部分が存在すると、この部分の データが、撮影画像全体の平均輝度に強く影響を与えてしまうため、誤補正が生じ やすいことによる。そこで、図 23 (c)に示すように、輝度ヒストグラムにおいて、閾値以 上の画素数を制限する。図 23 (d)は、画素数の制限処理を行った後の輝度ヒストグラ ムである。 [0246] Next, as shown in Fig. 23 (c), an area having a frequency greater than a predetermined threshold is deleted from the luminance histogram. This is because if there is a part with an extremely high frequency, the data in this part has a strong influence on the average brightness of the entire photographed image, so that erroneous correction is likely to occur. Therefore, as shown in Fig. 23 (c), the number of pixels above the threshold is limited in the luminance histogram. Figure 23 (d) shows the luminance histogram after the pixel number limiting process.
[0247] 正規化された輝度ヒストグラムから、高輝度領域及び低輝度領域を削除し、更に、 累積画素数を制限することによって得られた輝度ヒストグラム(図 23 (d) )の各ブロック 番号と、それぞれの頻度に基づいて、輝度の平均値を算出したものがパラメータ P2 である。 [0247] Each block number of the luminance histogram (Fig. 23 (d)) obtained by deleting the high luminance region and the low luminance region from the normalized luminance histogram and further limiting the cumulative number of pixels, The parameter P2 is the average luminance value calculated based on each frequency.
[0248] ノラメータ P1は、撮影画像データ全体の輝度の平均値であり、パラメータ P3は、撮 影画像データのうち肌色領域 (HI)の輝度の平均値である。パラメータ P7のキー補 正値、パラメータ P7'のキー補正値 2、パラメータ P8の輝度補正値 2は、それぞれ、 式(18)、式(19)、式(20)のように定義される。 [0248] The norm P1 is an average value of the luminance of the entire captured image data, and the parameter P3 is an average value of the luminance of the skin color region (HI) in the captured image data. The key correction value for parameter P7, the key correction value 2 for parameter P7 ', and the luminance correction value 2 for parameter P8 are defined as shown in equations (18), (19), and (20), respectively.
[0249] P7 (キー補正値) = [P3— ( (指標 5Z6) X 18000) + 22000) ]Z24. 78 ( 18) [0249] P7 (Key correction value) = [P3— ((Indicator 5Z6) X 18000) + 22000)] Z24. 78 (18)
P7' (キー補正値 2) = [P3— ( (指標 6Z6) X 10000 + 30000) ]Z24. 78 (19) P7 '(key correction value 2) = [P3— ((index 6Z6) X 10000 + 30000)] Z24. 78 (19)
P8 (輝度補正値 2) = (指標 4Z6) X 17500 (20) P8 (Luminance correction value 2) = (Indicator 4Z6) X 17500 (20)
ノ メータ P10のオフセット値 3は、判別マップ上で低確度領域(1)又は(2)に対応 する撮影条件の場合の階調調整パラメータである。以下、ノ メータ P10の算出方法 について説明する。 The offset value 3 of the meter P10 is a gradation adjustment parameter in the case of shooting conditions corresponding to the low accuracy region (1) or (2) on the discrimination map. The calculation method of the meter P10 will be described below.
[0250] まず、該当する低確度領域内の指標のうち、基準となる指標が決定される。例えば 、低確度領域 (1)であれば、基準指標として指標 5が決定され、低確度領域 (2)であ れば、基準指標として指標 6が決定される。そして、その基準指標の値を 0〜1の範囲 で正規ィ匕することによって、当該基準指標が正規化指標へ変換される。正規化指標
は、式(21)のように定義される。 [0250] First, among the indexes in the corresponding low-accuracy region, a reference index is determined. For example, in the low accuracy region (1), the index 5 is determined as the reference index, and in the low accuracy region (2), the index 6 is determined as the reference index. Then, by normalizing the value of the reference index in the range of 0 to 1, the reference index is converted into a normalized index. Normalized indicator Is defined as in equation (21).
[0251] 正規化指標 = (基準指標 指標最小値) Z (指標最大値 指標最小値) (21) 式 (21)において、指標最大値、指標最小値は、それぞれ、該当する低確度領域 内の基準指標の最大値、最小値である。 [0251] Normalized index = (Standard index Minimum index value) Z (Maximum index value Minimum index value) (21) In equation (21), the maximum index value and minimum index value are within the corresponding low accuracy range. The maximum and minimum values of the reference index.
[0252] 該当する低確度領域と、当該低確度領域に隣接する 2つの領域との境界における 補正量をそれぞれ ex、 βとする。この補正量 α、 j8は、判別マップ上の各領域の境 界において定義された再現目標値を用いて予め算出された固定値である。ノ メー タ P10は、式(21)の正規化指標と、補正量 a、 βを用いて式(22)のように表される [0252] The correction amounts at the boundary between the corresponding low accuracy region and the two regions adjacent to the low accuracy region are ex and β, respectively. The correction amounts α and j8 are fixed values calculated in advance using the reproduction target value defined at the boundary of each region on the discrimination map. The nomometer P10 is expressed as in equation (22) using the normalized index of equation (21) and the correction amounts a and β.
[0253] PIO = ( j8— α ) X正規化指標 + α (22) [0253] PIO = (j8— α) X normalization index + α (22)
なお、本実施形態では、正規ィヒ指標と補正量との相関を 1次の線形関係としたが、 補正量をさらに緩やかに移行させるベぐ曲線関係としてもよい。 In the present embodiment, the correlation between the normal index and the correction amount is a linear relationship, but it may be a curve relationship in which the correction amount shifts more gradually.
[0254] 階調調整パラメータが算出されると、その算出された階調調整パラメータに基づい て、撮影画像データに対する階調調整量が決定され (ステップ S33)、本階調調整条 件決定処理が終了する。ステップ S33では、具体的に、ステップ S31において決定さ れた階調調整方法に対応して予め設定された複数の階調変換曲線の中から、ステツ プ S32において算出された階調調整パラメータに対応する階調変換曲線が選択 (決 定)される。なお、ステップ S32において算出された階調調整パラメータに基づいて、 階調変換曲線 (階調調整量)を算出するようにしてもよ!、。階調変換曲線が決定され ると、その決定された階調変換曲線に従って撮影画像データが階調変換される。 [0254] When the tone adjustment parameter is calculated, the tone adjustment amount for the captured image data is determined based on the calculated tone adjustment parameter (step S33), and the tone adjustment condition determination process is performed. finish. In step S33, specifically, from the plurality of gradation conversion curves set in advance corresponding to the gradation adjustment method determined in step S31, it corresponds to the gradation adjustment parameter calculated in step S32. The gradation conversion curve to be selected is selected (determined). Note that the gradation conversion curve (gradation adjustment amount) may be calculated based on the gradation adjustment parameter calculated in step S32. When the gradation conversion curve is determined, the photographed image data is gradation converted according to the determined gradation conversion curve.
[0255] 以下、各撮影条件の階調変換曲線の決定方法につ!、て説明する。 [0255] A method for determining a gradation conversion curve for each shooting condition will be described below.
<順光の場合 > <For direct light>
撮影条件が順光である場合、パラメータ P1を P5と一致させるオフセット補正 (8bit 値の平行シフト)を下記の式(23)により行う。 When the shooting condition is direct light, offset correction (parallel shift of 8-bit value) that matches parameter P1 with P5 is performed by the following equation (23).
[0256] 出力画像の RGB値 =入力画像の RGB値 +P6 (23) [0256] RGB value of output image = RGB value of input image + P6 (23)
従って、撮影条件が順光の場合、図 21 (a)に示す複数の階調変換曲線の中から、 式 (23)に対応する階調変換曲線が選択される。又は、式 (23)に基づいて階調変換 曲線を算出 (決定)してもよい。
<逆光の場合 > Therefore, when the shooting condition is normal light, a gradation conversion curve corresponding to Equation (23) is selected from the plurality of gradation conversion curves shown in FIG. Alternatively, the gradation conversion curve may be calculated (determined) based on Expression (23). <In the case of backlight>
撮影条件が逆光である場合、図 21 (b)に示す複数の階調変換曲線の中から、式( 18)に示すパラメータ P7(キー補正値)に対応する階調変換曲線を選択する。図 21 ( b)の階調変換曲線の具体例を図 24に示す。パラメータ P7の値と、選択される階調 変換曲線の対応関係を以下に示す。 When the photographing condition is backlight, a gradation conversion curve corresponding to the parameter P7 (key correction value) shown in Expression (18) is selected from the plurality of gradation conversion curves shown in FIG. 21 (b). A specific example of the gradation conversion curve in Fig. 21 (b) is shown in Fig. 24. The correspondence between the value of parameter P7 and the selected gradation conversion curve is shown below.
[0257] -50<P7<+ 50の場合→L3 [0257] -50 <P7 <+ 50 → L3
+ 50≤P7< + 150の場合→L4 + 50≤P7 <+ 150 → L4
+ 150≤P7く +250の場合→L5 + 150≤P7 + + 250 → L5
— 150<P7≤— 50の場合→L2 — 150 <P7≤— If 50 → L2
-250<P7≤-150 の場合→L1 -250 <P7≤-150 → L1
なお、撮影条件が逆光の場合、この階調変換処理とともに、覆い焼き処理を併せて 行うことが好ましい。この場合、逆光度を示す指標 5に応じて覆い焼き処理の程度も 調整されることが望ましい。 When the photographing condition is backlight, it is preferable to perform the dodging process together with the gradation conversion process. In this case, it is desirable to adjust the degree of the dodging process according to the index 5 indicating the backlight intensity.
<アンダーの場合 > <If under>
撮影条件がアンダーである場合、逆光の場合と同様に、図 21(b)に示す複数の階 調変換曲線の中から、式(19)に示すパラメータ P7' (キー補正値 2)に対応する階調 変換曲線が選択される。パラメータ P7'の値と、図 24において選択される階調変換 曲線との対応関係を以下に示す。 When the shooting condition is under, as in the case of backlighting, it corresponds to the parameter P7 ′ (key correction value 2) shown in Equation (19) from among the multiple tone transformation curves shown in FIG. 21 (b). A tone conversion curve is selected. The correspondence between the value of parameter P7 'and the gradation conversion curve selected in Fig. 24 is shown below.
[0258] 50<?7,<+50の場合→ 3 [0258] 50 <? 7, <+50 → 3
+ 50≤P7'< + 150の場合→L4 + 50≤P7 '<+ 150 → L4
+ 150≤P7'<+ 250の場合→L5 + 150≤P7 '<+ 250 → L5
— 150<P7,≤— 50の場合→L2 — If 150 <P7, ≤— 50 → L2
— 250く P7,≤— 150の場合→L1 — 250 P P7, ≤— 150 → L1
なお、撮影条件がアンダーである場合は、逆光の場合に示したような覆い焼き処理 は行わない。 Note that when the shooting condition is under, dodging is not performed as shown in the case of backlight.
<ストロボの場合 > <In the case of strobe>
撮影条件がストロボである場合、オフセット補正(8bit値の平行シフト)を式(24)に より行う。
[0259] 出力画像の RGB値 =入力画像の RGB値 +P9 (24) When the shooting condition is a strobe, offset correction (parallel shift of 8-bit value) is performed using equation (24). [0259] RGB value of output image = RGB value of input image + P9 (24)
従って、撮影条件がストロボの場合、図 21 (a)に示す複数の階調変換曲線の中か ら、式 (24)に対応する階調変換曲線が選択される。又は、式 (24)に基づいて階調 変換曲線を算出 (決定)してもょ 、。 Therefore, when the shooting condition is a strobe, a gradation conversion curve corresponding to Expression (24) is selected from a plurality of gradation conversion curves shown in FIG. Alternatively, calculate (determine) the gradation conversion curve based on Equation (24).
<低確度領域の撮影条件の場合 > <In the case of shooting conditions in the low accuracy area>
低確度領域の撮影条件である場合、オフセット補正(8bit値の平行シフト)を式(25 For low-accuracy area shooting conditions, offset correction (parallel shift of 8-bit value)
)により行う。 ).
[0260] 出力画像の RGB値 =入力画像の RGB値 +P10 (25) [0260] RGB value of output image = RGB value of input image + P10 (25)
従って、低確度領域の場合、図 21 (c)に示す複数の階調変換曲線の中から、式 (2 5)に対応する階調変換曲線が選択される。又は、式 (25)に基づいて階調変換曲線 を算出 (決定)するようにしてもょ 、。 Therefore, in the case of the low accuracy region, the gradation conversion curve corresponding to the equation (25) is selected from the plurality of gradation conversion curves shown in FIG. Alternatively, calculate (determine) the gradation conversion curve based on Equation (25).
[0261] なお、本実施形態では、実際に撮影画像データに対して階調変換処理を施す場 合、上述の各階調調整条件を 16bitから 8bitへ変更するものとする。 [0261] In the present embodiment, when the gradation conversion process is actually performed on the captured image data, the above-described gradation adjustment conditions are changed from 16 bits to 8 bits.
[0262] 以上のように、本実施形態の画像処理装置 1によれば、撮影画像データの撮影条 件を定量的に示す指標を算出し、その算出された指標と、撮影条件の確度に応じて 予め領域分けされた判別マップに基づ 、て撮影条件を判別し、判別結果に応じて撮 影画像データに対する階調調整の方法を決定し、撮影画像データの階調調整量( 階調変換曲線)を決定することにより、被写体の明度を適切に補正することが可能と なる。特に、判別マップに基づいて撮影条件を判別することにより、判別結果の信頼 度が高くなり、撮影条件に応じた適切な階調変換を行うことが可能になる。 [0262] As described above, according to the image processing apparatus 1 of the present embodiment, an index that quantitatively indicates the shooting condition of the captured image data is calculated, and the index is calculated according to the calculated index and the accuracy of the shooting condition. Based on the discrimination map divided in advance, the shooting conditions are determined, the gradation adjustment method for the captured image data is determined according to the determination result, and the gradation adjustment amount (gradation conversion) of the captured image data is determined. By determining (curve), it is possible to appropriately correct the brightness of the subject. In particular, by determining the shooting condition based on the determination map, the reliability of the determination result is increased, and appropriate gradation conversion according to the shooting condition can be performed.
[0263] また、ストロボ撮影としての確度を定量的に示す指標 1と、逆光撮影としての確度を 定量的に示す指標 2に加えて、撮影画像データの構図的な要素力も導出される指標 3を用いて撮影条件を判別することにより、撮影条件の判別精度を向上させることが できる。また、撮影画像データの構図的な要素とヒストグラムの分布情報力も算出され る指標 6を用いることで、ストロボ撮影のシーンと、アンダー撮影のシーンとを判別でき 、撮影条件の判別精度を一層向上させることができる。 [0263] In addition to index 1 that quantitatively indicates the accuracy for flash photography and index 2 that quantitatively indicates the accuracy for backlighting, index 3 is also used to derive the compositional elemental power of the captured image data. By using this to determine the shooting conditions, the determination accuracy of the shooting conditions can be improved. In addition, by using the compositional element of the captured image data and the index 6 that also calculates the distribution information power of the histogram, it is possible to distinguish between a strobe shooting scene and an under shooting scene, further improving the shooting condition discrimination accuracy. be able to.
〈撮像装置に適用した例〉 <Examples applied to imaging devices>
上述の実施形態で示した画像処理方法は、デジタルカメラ等の撮像装置にも適用
可能である。図 25に、本発明の撮像装置を適用したデジタルカメラ 200の構成を示 す。デジタノレカメラ 200ίま、図 25【こ示すよう【こ、 CPU201、光学系 202、撮像センサ 咅 203、 AF演算咅 204、 WB演算咅 205、 AE演算咅 206、レンズ制御咅 207、画像 処理部 208、表示部 209、記録データ作成部 210、記録メディア 211、シーンモード 設定キー 212、色空間設定キー 213、レリーズボタン 214、その他操作キー 215によ り構成される c The image processing method shown in the above embodiment is also applied to an imaging apparatus such as a digital camera. Is possible. FIG. 25 shows a configuration of a digital camera 200 to which the imaging apparatus of the present invention is applied. Digital camera 200, Fig. 25 [As shown], CPU201, optical system 202, image sensor 咅 203, AF calculation 咅 204, WB calculation 咅 205, AE calculation 咅 206, lens control 咅 207, image processing unit 208 , Display unit 209, recording data creation unit 210, recording medium 211, scene mode setting key 212, color space setting key 213, release button 214, and other operation keys 215 c
[0264] CPU201は、デジタルカメラ 200の動作を統括的に制御する。光学系 202は、ズー ムレンズであり、被写体像を撮像センサ部 203にある CCD (Charge— Coupled De vice)イメージセンサ上に結像させる。撮像センサ部 203は、光学像を CCDイメージ センサによって光電変換し、デジタル信号に変換 (AZD変換)して出力する。撮像 センサ部 203から出力された画像データは、 AF演算部 204、 WB演算部 205、 AE 演算部 206、画像処理部 208に入力される。 The CPU 201 comprehensively controls the operation of the digital camera 200. The optical system 202 is a zoom lens, and forms a subject image on a charge-coupled device (CCD) image sensor in the imaging sensor unit 203. The imaging sensor unit 203 photoelectrically converts an optical image by a CCD image sensor, converts it into a digital signal (AZD conversion), and outputs it. The image data output from the imaging sensor unit 203 is input to the AF calculation unit 204, the WB calculation unit 205, the AE calculation unit 206, and the image processing unit 208.
[0265] AF演算部 204は、画面内 9ケ所に設けられた AFエリアの距離を算出して出力する 。距離の判定は、画像のコントラスト判定により行われ、 CPU201は、この中の最も近 距離にある値を選択し、被写体距離とする。 WB演算部 205は、画像のホワイトバラン ス評価値を算出して出力する。ホワイトバランス評価値とは、撮影時の光源下で、ニュ ートラルな被写体の RGB出力値を一致させるために必要なゲイン値で、 Gチャネル を基準として RZG、 BZGの比として算出する。算出された評価値は、画像処理部 2 08に入力され、画像のホワイトバランスが調整される。 AE演算部 206は、画像デー タカも適正露出値を算出して出力し、 CPU201は、算出された適正露出値と現在の 露出値が一致するような絞り値とシャッター速度値を算出する。絞り値は、レンズ制御 部 207に出力され、対応する絞り径が設定される。シャッター速度値は、撮像センサ 部 203に出力され、対応する CCD積分時間が設定される。 [0265] The AF calculation unit 204 calculates and outputs the distances of the AF areas provided at nine places in the screen. The determination of the distance is performed by determining the contrast of the image, and the CPU 201 selects a value at the closest distance among them and sets it as the subject distance. The WB calculation unit 205 calculates and outputs a white balance evaluation value of the image. The white balance evaluation value is a gain value required to match the RGB output value of a neutral subject under the light source at the time of shooting, and is calculated as the ratio of RZG and BZG with reference to the G channel. The calculated evaluation value is input to the image processing unit 208, and the white balance of the image is adjusted. The AE calculation unit 206 calculates and outputs an appropriate exposure value for the image data, and the CPU 201 calculates an aperture value and a shutter speed value so that the calculated appropriate exposure value matches the current exposure value. The aperture value is output to the lens control unit 207, and the corresponding aperture diameter is set. The shutter speed value is output to the image sensor unit 203, and the corresponding CCD integration time is set.
[0266] 画像処理部 208は、撮影画像データに対して、ホワイトバランス処理、 CCDフィル ター配列の補間処理、色変換、 1次階調変換、シャープネス補正等の処理を行った 後に、上述の実施形態と同様に、撮影条件を特定するための指標 (指標 1〜6)を算 出し、その算出された指標に基づいて撮影条件を判別し、判別結果に基づいて決定 された階調変換処理を行うことによって好ましい画像に変換する。その銜 PEG圧縮
等の変換を実行する。 JPEG圧縮された画像データは、表示部 209と記録データ作 成部 210に出力される。 [0266] The image processing unit 208 performs processing such as white balance processing, CCD filter array interpolation processing, color conversion, primary gradation conversion, and sharpness correction on the captured image data, and then performs the above-described implementation. Similar to the form, an index (index 1 to 6) for specifying the shooting condition is calculated, the shooting condition is determined based on the calculated index, and the gradation conversion process determined based on the determination result is performed. By doing so, it is converted into a preferable image. Its PEG compression And so on. The JPEG-compressed image data is output to the display unit 209 and the recording data creation unit 210.
[0267] 表示部 209は、撮影画像データを液晶ディスプレイに表示するとともに、 CPU201 の指示による各種情報を表示する。記録データ作成部 210は、 JPEG圧縮された画 像データと、 CPU201から入力された各種撮影画像データを Exif (Exchangeable Image File Format)ファイルにフォーマットし、記録メディア 211に記録する。記 録メディア 211の中には、各メーカーが自由な情報を書き込めるスペースとして、メー カーノートと呼ばれる部分があり、撮影条件の判別結果や指標 4、指標 5及び指標 6 を記録するようにしてもょ 、。 [0267] The display unit 209 displays the captured image data on the liquid crystal display and various information according to instructions from the CPU 201. The recording data creation unit 210 formats JPEG-compressed image data and various captured image data input from the CPU 201 into an Exif (Exchangeable Image File Format) file, and records the data on the recording medium 211. In the recording media 211, there is a part called maker note as a space where each manufacturer can write free information, and it is also possible to record the judgment result of shooting conditions and index 4, index 5 and index 6. Oh ,.
[0268] デジタルカメラ 200では、ユーザ設定により撮影シーンモードを切り替えることがで きる。即ち、撮影シーンモードとして、通常モード、ポートレートモード、風景モードシ ーンの 3つが選択可能で、ユーザは、シーンモード設定キー 212を操作して、被写体 が人物である場合はポートレートモード、風景の場合は風景モードに切り替えること によって、被写体に適した 1次階調変換を実施する。また、デジタルカメラ 200は、選 択した撮影シーンモードの情報を画像データファイルのメーカーノート部分に付加し て記録する。また、デジタルカメラ 200は、被写体として選択した AFエリアの位置情 報を同様に画像ファイルに記録する。 [0268] In the digital camera 200, the shooting scene mode can be switched by a user setting. That is, three modes can be selected as a shooting scene mode: a normal mode, a portrait mode, and a landscape mode scene. When the user operates the scene mode setting key 212 and the subject is a person, the portrait mode and the landscape mode are selected. In case of, switch to landscape mode to perform primary gradation conversion suitable for the subject. In addition, the digital camera 200 records the selected shooting scene mode information by adding it to the maker note portion of the image data file. The digital camera 200 also records the position information of the AF area selected as the subject in the image file in the same manner.
[0269] なお、デジタルカメラ 200では、色空間設定キー 213によって、出力色空間のユー ザ設定が可能になっている。出力色空間としては、 sRGB (IEC61966— 2—i;^Ra wの選択が可能である。 sRGBが選択された場合は、本実施形態における画像処理 を実行するが、 Rawが選択された場合は、本実施形態の画像処理は行わず、 CCD 固有の色空間で出力する。 [0269] Note that in the digital camera 200, the user can set the output color space using the color space setting key 213. As the output color space, sRGB (IEC61966-2-i; ^ RAW can be selected. When sRGB is selected, the image processing in this embodiment is executed. When Raw is selected, The image processing of this embodiment is not performed, and the image is output in a color space unique to CCD.
[0270] 以上のように、本発明の撮像装置を適用したデジタルカメラ 200によれば、上述の 画像処理装置 1と同様に、撮影画像データの撮影条件を定量的に示す指標を算出 し、その算出された指標に基づいて撮影条件を判別し、判別結果に応じて撮影画像 データに対する階調調整の方法を決定し、撮影画像データの階調調整量 (階調変 換曲線)を決定することにより、被写体の明度を適切に補正することが可能となる。こ のように、デジタルカメラ 200の内部で、撮影条件に応じた適切な階調変換処理が行
われることにより、デジタルカメラ 200とプリンタがパーソナルコンピュータを介さずに 直接接続されている場合であっても、好ましい画像を出力することができる。 [0270] As described above, according to the digital camera 200 to which the imaging apparatus of the present invention is applied, as in the above-described image processing apparatus 1, an index that quantitatively indicates the shooting condition of the shot image data is calculated, and The shooting conditions are determined based on the calculated index, the gradation adjustment method for the captured image data is determined according to the determination result, and the gradation adjustment amount (gradation conversion curve) of the captured image data is determined. Accordingly, it is possible to appropriately correct the brightness of the subject. In this way, appropriate gradation conversion processing according to the shooting conditions is performed inside the digital camera 200. Thus, even when the digital camera 200 and the printer are directly connected without using a personal computer, a preferable image can be output.
[0271] なお、本実施形態における記述内容は、本発明の趣旨を逸脱しない範囲で適宜変 更可能である。 [0271] Note that the description in this embodiment can be changed as appropriate without departing from the spirit of the present invention.
[0272] 例えば、撮影画像データから顔画像を検出し、検出された顔画像に基づいて撮影 条件を判別し、階調調整条件を決定するようにしてもよい。また、撮影条件の判別に 、 Exif情報を用いるようにしてもよい。 Exif情報を用いると、撮影条件の判別精度を 更に向上させることが可能となる。 [0272] For example, a face image may be detected from the photographed image data, the photographing condition may be determined based on the detected face image, and the gradation adjustment condition may be determined. In addition, Exif information may be used to determine the shooting conditions. By using Exif information, it is possible to further improve the accuracy of determining the shooting conditions.
産業上の利用可能性 Industrial applicability
[0273] 本発明によれば、撮影画像データの撮影条件を定量的に示す指標を算出し、その 算出された指標に基づいて撮影条件を判別して、判別結果に応じて撮影画像デー タに対する階調調整の方法を決定することにより、被写体の明度を適切に補正するこ とが可能となる。特に、撮影条件の確度に応じて予め領域分けされた判別マップに 基づいて撮影条件を判別することにより、判別結果の信頼度が高くなり、撮影条件に 応じた適切な階調変換を行うことが可能になる。 [0273] According to the present invention, an index that quantitatively indicates the shooting condition of the captured image data is calculated, the shooting condition is determined based on the calculated index, and the captured image data is determined according to the determination result. By determining the gradation adjustment method, it is possible to appropriately correct the brightness of the subject. In particular, by determining the shooting conditions based on a discrimination map that has been divided into regions according to the accuracy of the shooting conditions, the reliability of the determination results can be increased, and appropriate gradation conversion according to the shooting conditions can be performed. It becomes possible.
[0274] また、撮影画像データの撮影条件を定量的に示す指標を算出し、その算出された 指標に基づいて撮影画像データの階調調整量を決定することにより、被写体の明度 を適切に補正することが可能となる。
[0274] Further, by calculating an index that quantitatively indicates the shooting condition of the captured image data, and determining the gradation adjustment amount of the captured image data based on the calculated index, the brightness of the subject is appropriately corrected. It becomes possible to do.