JP2006092133A - Image processing method, image processor, imaging device and image processing program - Google Patents

Image processing method, image processor, imaging device and image processing program Download PDF

Info

Publication number
JP2006092133A
JP2006092133A JP2004275212A JP2004275212A JP2006092133A JP 2006092133 A JP2006092133 A JP 2006092133A JP 2004275212 A JP2004275212 A JP 2004275212A JP 2004275212 A JP2004275212 A JP 2004275212A JP 2006092133 A JP2006092133 A JP 2006092133A
Authority
JP
Japan
Prior art keywords
image data
calculating
brightness
calculated
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004275212A
Other languages
Japanese (ja)
Inventor
Hiroaki Takano
博明 高野
Jo Nakajima
丈 中嶋
Daisuke Sato
大輔 佐藤
Tsukasa Ito
司 伊藤
Takeshi Saito
剛 齋藤
Misae Tazaki
美紗恵 田▲崎▼
Kenji Kuwae
健児 加
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Konica Minolta Photo Imaging Inc
Original Assignee
Konica Minolta Photo Imaging Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Konica Minolta Photo Imaging Inc filed Critical Konica Minolta Photo Imaging Inc
Priority to JP2004275212A priority Critical patent/JP2006092133A/en
Priority to PCT/JP2005/016383 priority patent/WO2006033235A1/en
Publication of JP2006092133A publication Critical patent/JP2006092133A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/6083Colour correction or control controlled by factors external to the apparatus
    • H04N1/6086Colour correction or control controlled by factors external to the apparatus by scene illuminant, i.e. conditions at the time of picture capture, e.g. flash, optical filter used, evening, cloud, daylight, artificial lighting, white point measurement, colour temperature
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve brightness reproducibility of a photographic object by determining a gradation adjustment method on the basis of an index quantitatively expressing a photographic condition of photographic image data and a distinction map showing reliability of the index. <P>SOLUTION: An image adjustment processing part 701 divides the photographic image data into areas each comprising combination of prescribed brightness and hue, an occupation ratio showing a ratio of the divided area to the whole photographic image data is calculated in each the divided area, and a deviation amount showing deviation of a gradation distribution of the photographic image data is calculated. The index for specifying the photographic condition is calculated on the basis of the calculated occupation ratio and deviation amount, and the photographic condition of the photographic image data is distinguished on the basis of the calculated index and the distinction map previously area-divided according to a reliability degree of the photographic condition. A method for gradation adjustment to the photographic image data is determined according to the distinguished photographic condition, and gradation conversion processing is applied to the photographic image data by use of the determined gradation adjustment method. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

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

従来、フィルムスキャン画像やデジタルカメラ画像の輝度補正は、画像全体の平均輝度をユーザが希望する値へと補正することで行われていた。また通常の撮影では、順光、逆光、ストロボ等の光源条件が様々に変動し、画像中に輝度の偏りの大きい大面積の領域が生じるため、平均輝度の補正に加えて、判別分析、重回帰分析により算出される値を用いた追加補正が必要であった。しかしながら、判別回帰分析方法では、ストロボシーン及び逆光シーンから算出されるパラメータが非常に類似しているため、撮影条件(撮影シーン)の判別が困難であるという問題があった。   Conventionally, the brightness correction of a film scan image or a digital camera image 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 light fluctuate in various ways, resulting in a large area with a large luminance deviation in the image. 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 calculated from the strobe scene and the backlight scene are very similar.

特許文献1には、判別回帰分析方法に代わる追加補正値の算出方法が開示されている。特許文献1に記載の方法は、輝度の累積画素数(頻度数)を示す輝度ヒストグラムから、高輝度領域と抵輝度領域を削除し、更に、頻度数を制限したものを用いて、輝度の平均値を算出し、この平均値と基準輝度との差分を補正値として求めるものである。   Patent Document 1 discloses a method for calculating an additional correction value in place of the discriminant regression analysis method. In the method described in Patent Document 1, a luminance histogram indicating the cumulative number of pixels (frequency number) of luminance is deleted from the high luminance region and the sub luminance region, and further, the luminance average is used by using the frequency number limited. A value is calculated, and a difference between the average value and the reference luminance is obtained as a correction value.

また、特許文献2には、顔領域の抽出精度を補償するために、撮影時の光源状態の判別を行う方法が記載されている。特許文献2に記載の方法は、まず、顔候補領域を抽出し、抽出した顔候補領域の平均輝度の画像全体に対する偏りを算出し、偏倚量が大きい場合、撮影条件(逆光撮影かストロボ近接撮影か)の判別を行い、顔領域としての判断基準の許容幅を調整する。特許文献2には、顔候補領域の抽出方法として、特開平6−67320号公報に記載の、色相と彩度の2次元ヒストグラムを用いる方法、特開平8−122944号公報、特開平8−184925号公報及び特開平9−138471号公報に記載のパターンマッチング、パターン検索方法などが引用されている。   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 region is extracted, and the bias of the average brightness of the extracted face candidate region with respect to the entire image is calculated. When the amount of deviation is large, shooting conditions (backlight shooting or strobe proximity shooting) are calculated. And the permissible width of the determination criterion as the face area is adjusted. Japanese Patent Laid-Open No. 6-67320 discloses a method of using a two-dimensional histogram of hue and saturation, Japanese Patent Laid-Open No. 8-122944, and Japanese Patent Laid-Open No. 8-184925. And pattern matching and pattern search methods described in Japanese Patent Laid-Open No. 9-138471.

また、特許文献2には、顔以外の背景領域除去方法としては、特開平8−122944号公報及び特開平8−184925号公報に記載の、直線部分の比率、線対象性、画面外縁との接触率、濃度コントラスト、濃度変化のパターンや周期性を用いて判別する方法が引用されている。撮影条件の判別には、濃度の1次元ヒストグラムを用いる方法が記載されている。この方法は、逆光の場合は顔領域が暗く背景領域が明るい、ストロボ近接撮影の場合は顔領域が明るく背景領域が暗いという経験則に基づいている。
特開2002−247393号公報 特開2000−148980号公報
Further, in Patent Document 2, as background area removal methods other than the face, the ratio of the straight line portion, the line target property, and the outer edge of the screen described in JP-A-8-122944 and JP-A-8-184925 are described. A method of determining using a contact rate, density contrast, density change pattern and periodicity is cited. A method of using a one-dimensional histogram of density is described for determining the photographing condition. 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 the face area is bright and the background area is dark in the case of close-up flash photography.
JP 2002-247393 A JP 2000-148980 A

しかしながら、特許文献1に記載の技術は、逆光シーン、ストロボシーンでの輝度の偏りの大きい領域の影響は低減されるが、人物を主要被写体とする撮影シーンでは、顔領域の明度が不適切であるという問題があった。また、特許文献2に記載の技術は、典型的な逆光やストロボ近接撮影の場合には、顔領域の特定を補償する効果を達成することができるが、典型的な構図に当てはまらないと、補償効果が得られなくなるという問題があった。   However, although the technique described in Patent Document 1 reduces the influence of a region with a large luminance deviation in a backlight scene and a strobe scene, the brightness of the face region is inappropriate in a shooting scene having a person as a main subject. There was a problem that there was. 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 backlighting 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.

また、デジタルカメラで撮影された画像データには、露出条件が不適切な状態で撮影されたものが多く、中でも露出不足によるアンダー画像が大半を占めている。逆光やストロボ近接撮影といった光源条件に由来する撮影条件を判別する際、アンダー画像をストロボ近接撮影、オーバー画像を逆光シーンと誤判別し、濃度補正を全く正反対の方向へと導いてしまう問題があった。   Also, many image data taken with a digital camera were taken with an inappropriate exposure condition, and most of them are under images due to underexposure. 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 backlight scene, leading to density correction in the exact opposite direction. It was.

このように、人物の顔領域を基準とした定量的な補正を実現するため、撮影条件の判別能力の向上は重要な課題である。更に、撮影条件の判別結果の信頼度を評価するなど、撮影条件の誤判定に対する対策が望まれている。   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, countermeasures against erroneous determination of shooting conditions, such as evaluating the reliability of the determination result of shooting conditions, are desired.

本発明の課題は、撮影画像データの撮影条件(光源条件及び露出条件)を定量的に表す指標と、指標の信頼度を評価する判別マップに基づいて階調調整方法を決定することにより、被写体の明度再現性を向上させることである。   An object of the present invention is to determine a gradation adjustment method based on an index that quantitatively represents shooting conditions (light source condition and exposure condition) of captured image data and a discrimination map that evaluates the reliability of the index. It is to improve the lightness reproducibility.

上記課題を解決するため、請求項1に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換工程と、を含むことを特徴としている。
In order to solve the above-mentioned problem, the invention described in claim 1 divides the photographed image data into regions composed of combinations of predetermined brightness and hue, and occupies the entire photographed image data for each of the divided regions. An occupancy ratio calculating step for calculating an occupancy ratio indicating a ratio;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項2に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定工程と、
前記調整方法決定工程において決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定工程において決定された階調調整量の階調変換処理を施す階調変換工程と、を含むことを特徴としている。
According to the second aspect of the present invention, the captured image data is divided into regions each having a predetermined combination of brightness and hue, and an occupancy ratio indicating the proportion of the entire captured image data is calculated for each of the divided regions. An occupancy calculation step to perform,
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
An adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion step of performing gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step on the captured image data using the gradation adjustment method determined in the adjustment method determination step; It is characterized by including.

請求項3に記載の発明は、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換工程と、を含むことを特徴としている。
According to a third aspect of the present invention, the captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and the captured image data is divided for each of the divided areas. An occupancy ratio calculating step for calculating an occupancy ratio indicating a ratio to the whole;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項4に記載の発明は、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定工程と、
前記調整方法決定工程において決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定工程において決定された階調調整量の階調変換処理を施す階調変換工程と、を含むことを特徴としている。
According to the fourth aspect of the present invention, the captured image data is divided into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness, and the captured image data is divided for each of the divided areas. An occupancy ratio calculating step for calculating an occupancy ratio indicating a ratio to the whole;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
An adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion step of performing gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step on the captured image data using the gradation adjustment method determined in the adjustment method determination step; It is characterized by including.

請求項5に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された第1の占有率及び第2の占有率と、前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換工程と、を含むことを特徴としている。
According to the fifth aspect of the present invention, the captured image data is divided into regions each having a predetermined combination of brightness and hue, and the first occupation indicating the ratio of the divided regions to the entire captured image data. The ratio is calculated, and the photographed image data is divided into predetermined regions each composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and each of the divided regions occupies the entire photographed image data. An occupancy ratio calculating step of calculating a second occupancy ratio indicating a ratio;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio 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 an index for specifying the shooting conditions;
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項6に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された第1の占有率及び第2の占有率と、前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定工程と、
前記調整方法決定工程において決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定工程において決定された階調調整量の階調変換処理を施す階調変換工程と、を含むことを特徴としている。
The invention according to claim 6 divides the photographed image data into regions composed of a combination of predetermined lightness and hue, and a first occupation indicating a ratio of the divided regions to the entire photographed image data. The ratio is calculated, and the photographed image data is divided into a predetermined region composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and the divided region occupies the entire photographed image data. An occupancy ratio calculating step of calculating a second occupancy ratio indicating a ratio;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio 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 an index for specifying the shooting conditions;
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
An adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion step of performing gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step on the captured image data using the gradation adjustment method determined in the adjustment method determination step; It is characterized by including.

請求項7に記載の発明は、請求項3又は4に記載の画像処理方法において、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記占有率が算出されることを特徴としている。
The invention according to claim 7 is the image processing method according to claim 3 or 4, wherein a two-dimensional histogram is created by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. Including the steps of:
In the occupancy rate calculating step, the occupancy rate is calculated based on the created two-dimensional histogram.

請求項8に記載の発明は、請求項5又は6に記載の画像処理方法において、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記第2の占有率が算出されることを特徴としている。
The invention according to claim 8 is the image processing method according to claim 5 or 6, wherein a two-dimensional histogram is created by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. Including the steps of:
In the occupation rate calculating step, the second occupation rate is calculated based on the created two-dimensional histogram.

請求項9に記載の発明は、請求項1又は2に記載の画像処理方法において、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記占有率が算出されることを特徴としている。
According to a ninth aspect of the present invention, in the image processing method according to the first or second aspect, the step of creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. Including
In the occupancy rate calculating step, the occupancy rate is calculated based on the created two-dimensional histogram.

請求項10に記載の発明は、請求項5又は6に記載の画像処理方法において、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記第1の占有率が算出されることを特徴としている。
A tenth aspect of the present invention is the image processing method according to the fifth or sixth aspect, wherein a step of creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. Including
In the occupation rate calculating step, the first occupation rate is calculated based on the created two-dimensional histogram.

請求項11に記載の発明は、請求項1、2、5、6、8〜10の何れか一項に記載の画像処理方法において、前記指標算出工程において、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴としている。   The invention according to claim 11 is the image processing method according to any one of claims 1, 2, 5, 6, 8 to 10, and in the index calculation step, a skin color hue region having a predetermined high brightness and The coefficient of a different sign is used for the hue area other than the high brightness skin color hue area.

請求項12に記載の発明は、請求項1、2、5、6、8〜11の何れか一項に記載の画像処理方法において、前記指標算出工程において、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴としている。   The image processing method according to any one of claims 1, 2, 5, 6, and 8 to 11, wherein, in the index calculation step, an intermediate brightness area of a flesh color area, It is characterized in that coefficients having different signs are used in lightness regions other than the intermediate lightness region.

請求項13に記載の発明は、請求項11に記載の画像処理方法において、前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴としている。   A thirteenth aspect of the present invention is the image processing method according to the eleventh aspect, wherein a lightness area of a hue area other than the high-brightness skin color hue area is a predetermined high-lightness area.

請求項14に記載の発明は、請求項12に記載の画像処理方法において、前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴としている。   According to a fourteenth aspect of the present invention, in the image processing method according to the twelfth aspect, the lightness region other than the intermediate lightness region is a lightness region within a flesh-color hue region.

請求項15に記載の発明は、請求項11又は13に記載の画像処理方法において、前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴としている。   According to a fifteenth aspect of the present invention, in the image processing method according to the eleventh or thirteenth aspect, the high lightness skin color hue region includes a region having a lightness value of 170 to 224 in the HSV color system. It is characterized by that.

請求項16に記載の発明は、請求項12又は14に記載の画像処理方法において、前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴としている。   According to a sixteenth aspect of the present invention, in the image processing method according to the twelfth or fourteenth aspect, the intermediate lightness region includes a region in the range of 85 to 169 as a lightness value of the HSV color system. It is said.

請求項17に記載の発明は、請求項11、13、15の何れか一項に記載の画像処理方法において、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴としている。   The invention according to claim 17 is the image processing method according to any one of claims 11, 13, and 15, wherein a hue region other than the high brightness skin color hue region includes a blue hue region and a green hue region. It is characterized by including at least one of these.

請求項18に記載の発明は、請求項12、14、16の何れか一項に記載の画像処理方法において、前記中間明度領域以外の明度領域がシャドー領域であることを特徴としている。   According to an eighteenth aspect of the present invention, in the image processing method according to any one of the twelfth, fourteenth, and sixteenth aspects, a lightness area other than the intermediate lightness area is a shadow area.

請求項19に記載の発明は、請求項17に記載の画像処理方法において、前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴としている。   The invention according to claim 19 is the image processing method according to claim 17, wherein a hue value of the blue hue region is in a range of 161 to 250 as a hue value of the HSV color system, and the green hue region The hue value is a hue value of the HSV color system and is in the range of 40 to 160.

請求項20に記載の発明は、請求項18に記載の画像処理方法において、前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴としている。   According to a twentieth aspect of the present invention, in the image processing method according to the eighteenth aspect, the lightness value of the shadow area is in the range of 26 to 84 as the lightness value of the HSV color system.

請求項21に記載の発明は、請求項11〜20の何れか一項に記載の画像処理方法において、前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴としている。   The invention according to claim 21 is the image processing method according to any one of claims 11 to 20, wherein the hue value of the flesh color hue region is a hue value of HSV color system 0 to 39 and 330 to It is characterized by being in the range of 359.

請求項22に記載の発明は、請求項11〜21の何れか一項に記載の画像処理方法において、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴としている。   The invention according to claim 22 is the image processing method according to any one of claims 11 to 21, wherein the skin color hue region is divided into two regions by a predetermined conditional expression based on brightness and saturation. It is characterized by that.

請求項23に記載の発明は、請求項1〜22の何れか一項に記載の画像処理方法において、前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴としている。   According to a twenty-third aspect of the present invention, in the image processing method according to any one of the first to twenty-second aspects, the deviation amount includes a deviation amount of brightness of captured image data, a center of a screen of the captured image data. It is characterized in that at least one of an average brightness value and a brightness difference value calculated under different conditions is included.

ここで、撮影画像データの明るさの偏差量とは、例えば、撮影画像データの輝度の標準偏差、分散等である。また、撮影画像データの画面中央部における明るさの平均値とは、例えば、画面中央部における平均輝度値、画面中央部における肌色領域の平均輝度値等である。また、異なる条件で算出された明るさの差分値とは、例えば、撮影画像データの最大輝度値と最小輝度値の差分値等である。   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. Further, the average brightness value of the captured image data at the center of the screen is, for example, the average brightness value at the center of the screen, the average brightness value of the skin color area at the center of the screen, or the like. The brightness difference value calculated under different conditions is, for example, the difference value between the maximum luminance value and the minimum luminance value of the captured image data.

請求項24に記載の発明は、請求項1〜23の何れか一項に記載の画像処理方法において、前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴としている。
The invention according to claim 24 is the image processing method according to any one of claims 1 to 23, 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.

請求項25に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention described in claim 25 divides the photographed image data into regions composed of combinations of predetermined brightness and hue, and calculates an occupancy ratio indicating the proportion of the entire photographed image data for each of the divided regions. Occupancy ratio calculating means to
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項26に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention described in claim 26 divides the photographed image data into regions composed of a combination of predetermined brightness and hue, and calculates an occupancy ratio indicating a proportion of the entire photographed image data for each of the divided regions. Occupancy ratio calculating means to
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means; It is characterized by having.

請求項27に記載の発明は、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention described in claim 27 divides the photographed image data into predetermined regions composed of combinations of the distance from the outer edge of the screen of the photographed image data and the brightness, and the photographed image data for each of the divided regions. An occupancy ratio calculating means for calculating an occupancy ratio indicating a ratio of the whole;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項28に記載の発明は、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention described in claim 28 divides the photographed image data into predetermined regions comprising a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and the photographed image data for each of the divided regions. An occupancy ratio calculating means for calculating an occupancy ratio indicating a ratio of the whole;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means; It is characterized by having.

請求項29に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、を備えることを特徴としている。
According to a twenty-ninth aspect of the present invention, the photographed image data is divided into regions each having a predetermined combination of brightness and hue, and the first occupation indicating the ratio of the divided regions to the whole photographed image data. The ratio is calculated, and the photographed image data is divided into predetermined regions each composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and each of the divided regions occupies the entire photographed image data. An occupancy ratio calculating means for calculating a second occupancy ratio indicating a ratio;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項30に記載の発明は、撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、を備えることを特徴としている。
According to a thirty-third aspect of the present invention, the photographed image data is divided into regions each having a predetermined combination of brightness and hue, and a first occupation indicating a ratio of the divided regions to the whole photographed image data. The ratio is calculated, and the photographed image data is divided into predetermined regions each composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and each of the divided regions occupies the entire photographed image data. An occupancy ratio calculating means for calculating a second occupancy ratio indicating a ratio;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means; It is characterized by having.

請求項31に記載の発明は、請求項27又は28に記載の画像処理装置において、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴としている。
The invention according to claim 31 is the image processing device according to claim 27 or 28, wherein a two-dimensional histogram is created by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the photographed image data. Means to
The occupancy rate calculation means calculates the occupancy rate based on the created two-dimensional histogram.

請求項32に記載の発明は、請求項29又は30に記載の画像処理装置において、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第2の占有率を算出することを特徴としている。
A thirty-second aspect of the present invention is the image processing apparatus according to the twenty-ninth or thirty-third aspect, wherein a two-dimensional histogram is created by calculating a cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. Means to
The occupancy rate calculation means calculates the second occupancy rate based on the created two-dimensional histogram.

請求項33に記載の発明は、請求項25又は26に記載の画像処理装置において、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴としている。
According to a thirty-third aspect of the present invention, in the image processing apparatus according to the twenty-fifth or twenty-sixth aspect, means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. Prepared,
The occupancy rate calculation means calculates the occupancy rate based on the created two-dimensional histogram.

請求項34に記載の発明は、請求項29又は30に記載の画像処理装置において、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第1の占有率を算出することを特徴としている。
According to a thirty-fourth aspect of the present invention, in the image processing apparatus according to the thirty-ninth or thirty-third aspect, means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and lightness of the photographed image data. Prepared,
The occupancy rate calculation means calculates the first occupancy rate based on the created two-dimensional histogram.

請求項35に記載の発明は、請求項25、26、29、30、32〜34の何れか一項に記載の画像処理装置において、前記指標算出手段では、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴としている。   The invention described in claim 35 is the image processing apparatus according to any one of claims 25, 26, 29, 30, 32 to 34, wherein the index calculating means includes a skin color hue region having a predetermined high brightness, The coefficient of a different sign is used for the hue area other than the high brightness skin color hue area.

請求項36に記載の発明は、請求項25、26、29、30、32〜35の何れか一項に記載の画像処理装置において、前記指標算出手段では、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴としている。   The invention described in claim 36 is the image processing device according to any one of claims 25, 26, 29, 30, 32 to 35, wherein the index calculating means includes an intermediate brightness area of a flesh-color hue area, It is characterized in that coefficients having different signs are used in lightness regions other than the intermediate lightness region.

請求項37に記載の発明は、請求項35に記載の画像処理装置において、前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴としている。   A thirty-seventh aspect of the present invention is the image processing apparatus according to the thirty-fifth aspect, characterized in that a lightness region of a hue region other than the high lightness skin color hue region is a predetermined high lightness region.

請求項38に記載の発明は、請求項36に記載の画像処理装置において、前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴としている。   According to a thirty-eighth aspect of the present invention, in the image processing apparatus according to the thirty-sixth aspect, the lightness area other than the intermediate lightness area is a lightness area within a flesh-color hue area.

請求項39に記載の発明は、請求項35又は37に記載の画像処理装置において、前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴としている。   According to a thirty-ninth aspect of the present invention, in the image processing apparatus according to the thirty-fifth or thirty-seventh aspect, the high lightness skin color hue region includes a region having a lightness value of 170 to 224 in the HSV color system. It is characterized by that.

請求項40に記載の発明は、請求項36又は38に記載の画像処理装置において、前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴としている。   According to a forty-second aspect of the present invention, in the image processing apparatus according to the thirty-sixth or thirty-eighth aspect, the intermediate lightness region includes a region in the range of 85 to 169 as a lightness value of the HSV color system. It is said.

請求項41に記載の発明は、請求項35、37、39の何れか一項に記載の画像処理装置において、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴としている。   The invention according to claim 41 is the image processing apparatus according to any one of claims 35, 37, and 39, wherein a hue region other than the high brightness skin color hue region includes a blue hue region and a green hue region. It is characterized by including at least one of these.

請求項42に記載の発明は、請求項36、38、40の何れか一項に記載の画像処理装置において、前記中間明度領域以外の明度領域がシャドー領域であることを特徴としている。   A forty-second aspect of the present invention is the image processing apparatus according to any one of the thirty-sixth, thirty-eight and thirty-fourth aspects, wherein the brightness area other than the intermediate brightness area is a shadow area.

請求項43に記載の発明は、請求項41に記載の画像処理装置において、前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴としている。   The invention according to claim 43 is the image processing apparatus according to claim 41, wherein a hue value of the blue hue region is in a range of 161 to 250 as a hue value of the HSV color system, and the green hue region The hue value is a hue value of the HSV color system and is in the range of 40 to 160.

請求項44に記載の発明は、請求項42に記載の画像処理装置において、前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴としている。   According to a 44th aspect of the present invention, in the image processing apparatus according to the 42nd aspect, the lightness value of the shadow area is in the range of 26 to 84 as the lightness value of the HSV color system.

請求項45に記載の発明は、請求項35〜44の何れか一項に記載の画像処理装置において、前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴としている。   According to a 45th aspect of the present invention, in the image processing device according to any one of the 35th to 44th aspects, the hue value of the flesh color hue region is a hue value of HSV color system of 0 to 39 and 330 to It is characterized by being in the range of 359.

請求項46に記載の発明は、請求項35〜45の何れか一項に記載の画像処理装置において、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴としている。   The invention according to claim 46 is the image processing apparatus according to any one of claims 35 to 45, wherein the skin color hue region is divided into two regions by a predetermined conditional expression based on brightness and saturation. It is characterized by that.

請求項47に記載の発明は、請求項25〜46の何れか一項に記載の画像処理装置において、前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴としている。   According to a 47th aspect of the present invention, in the image processing device according to any one of the 25th to 46th aspects, the deviation amount includes a deviation amount of brightness of the captured image data, a center of the screen of the captured image data. It is characterized in that at least one of an average brightness value and a brightness difference value calculated under different conditions is included.

請求項48に記載の発明は、請求項25〜47の何れか一項に記載の画像処理装置において、前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴としている。
The invention according to claim 48 is the image processing apparatus according to any one of claims 25 to 47, 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.

請求項49に記載の発明は、被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention according to claim 49, the imaging means for capturing the captured image data by capturing the subject,
Occupancy rate calculating means for dividing the photographed image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating a proportion of the entire photographed image data;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項50に記載の発明は、被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention according to claim 50 is an imaging means for photographing a subject and acquiring photographed image data;
Occupancy rate calculating means for dividing the photographed image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating a proportion of the entire photographed image data;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means; It is characterized by having.

請求項51に記載の発明は、被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention according to claim 51, the imaging means for capturing the captured image data by capturing the subject,
Dividing the photographed image data into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating a ratio of the entire photographed image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項52に記載の発明は、被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention according to claim 52 is an imaging means for photographing a subject and obtaining photographed image data;
Dividing the photographed image data into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating a ratio of the entire photographed image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means; It is characterized by having.

請求項53に記載の発明は、被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention according to claim 53 is an imaging means for capturing a captured image data by capturing a subject;
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image A second occupancy ratio that divides the data into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness and occupies the entire captured image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項54に記載の発明は、被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、を備えることを特徴としている。
The invention according to claim 54 is an imaging means for capturing a captured image data by capturing a subject;
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image A second occupancy ratio that divides the data into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness and occupies the entire captured image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means; It is characterized by having.

請求項55に記載の発明は、請求項51又は52に記載の撮像装置において、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴としている。
According to a 55th aspect of the present invention, in the imaging device according to the 51st or 52nd aspect, a two-dimensional histogram is created by calculating a cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. With means,
The occupancy rate calculation means calculates the occupancy rate based on the created two-dimensional histogram.

請求項56に記載の発明は、請求項53又は54に記載の撮像装置において、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第2の占有率を算出することを特徴としている。
According to a 56th aspect of the present invention, in the imaging device according to the 53rd or 54th aspect, a two-dimensional histogram is created by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data. With means,
The occupancy rate calculation means calculates the second occupancy rate based on the created two-dimensional histogram.

請求項57に記載の発明は、請求項49又は50に記載の撮像装置において、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴としている。
The invention according to claim 57 is the imaging device according to claim 49 or 50, further comprising means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. ,
The occupancy rate calculation means calculates the occupancy rate based on the created two-dimensional histogram.

請求項58に記載の発明は、請求項53又は54に記載の撮像装置において、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第1の占有率を算出することを特徴としている。
The invention according to claim 58 is the imaging device according to claim 53 or 54, further comprising means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. ,
The occupancy rate calculation means calculates the first occupancy rate based on the created two-dimensional histogram.

請求項59に記載の発明は、請求項49、50、53、54、56〜58の何れか一項に記載の撮像装置において、前記指標算出手段では、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴としている。   According to a 59th aspect of the present invention, in the imaging apparatus according to any one of the 49th, 50th, 53rd, 54th, and 56th to 58th aspects, the index calculating unit includes a skin color hue region having a predetermined high brightness, A different sign coefficient is used in a hue area other than the high brightness skin color hue area.

請求項60に記載の発明は、請求項49、50、53、54、56〜59の何れか一項に記載の撮像装置において、前記指標算出手段では、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴としている。   The invention according to claim 60 is the imaging device according to any one of claims 49, 50, 53, 54, 56 to 59, wherein the index calculating means includes an intermediate brightness area of a flesh-color hue area, and It is characterized in that coefficients having different signs are used in lightness regions other than the intermediate lightness region.

請求項61に記載の発明は、請求項59に記載の撮像装置において、前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴としている。   The invention according to claim 61 is the imaging apparatus according to claim 59, characterized in that the brightness area of the hue area other than the high brightness skin color hue area is a predetermined high brightness area.

請求項62に記載の発明は、請求項60に記載の撮像装置において、前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴としている。   According to a 62nd aspect of the present invention, in the imaging device according to the 60th aspect, the brightness area other than the intermediate brightness area is a brightness area within a flesh-color hue area.

請求項63に記載の発明は、請求項59又は61に記載の撮像装置において、前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴としている。   According to a 63rd aspect of the present invention, in the imaging device according to the 59th or 61th aspect, 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 characterized by.

請求項64に記載の発明は、請求項60又は62に記載の撮像装置において、前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴としている。   According to a 64th aspect of the present invention, in the imaging device according to the 60th or 62th aspect of the present invention, the intermediate lightness region includes a region having a lightness value in the HSV color system of 85 to 169. Yes.

請求項65に記載の発明は、請求項59、61、63の何れか一項に記載の撮像装置において、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴としている。   According to a 65th aspect of the present invention, in the imaging device according to any one of the 59th, 61th, and 63th aspects, a hue region other than the high brightness skin color hue region includes a blue hue region and a green hue region. It is characterized in that at least one of them is included.

請求項66に記載の発明は、請求項60、62、64の何れか一項に記載の撮像装置において、前記中間明度領域以外の明度領域がシャドー領域であることを特徴としている。   According to a 66th aspect of the present invention, in the imaging device according to any one of the 60th, 62th, and 64th aspects, the brightness area other than the intermediate brightness area is a shadow area.

請求項67に記載の発明は、請求項65に記載の撮像装置において、前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴としている。   According to a 67th aspect of the present invention, in the imaging device according to the 65th aspect, a hue value of the blue hue region is in a range of 161 to 250 as a hue value of an HSV color system, and the hue value of the green hue region is The hue value is a hue value in the HSV color system and is characterized by being in the range of 40 to 160.

請求項68に記載の発明は、請求項66に記載の撮像装置において、前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴としている。   According to a 68th aspect of the present invention, in the imaging apparatus according to the 66th aspect, the lightness value of the shadow region is in the range of 26 to 84 as the lightness value of the HSV color system.

請求項69に記載の発明は、請求項59〜68の何れか一項に記載の撮像装置において、前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴としている。   According to a 69th aspect of the present invention, in the imaging apparatus according to any one of the 59th to 68th aspects, the hue value of the flesh color hue region is a hue value of HSV color system 0 to 39 and 330 to 359. It is characterized by being in the range of.

請求項70に記載の発明は、請求項59〜69の何れか一項に記載の撮像装置において、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴としている。   According to a 70th aspect of the present invention, in the imaging device according to any one of the 59th to 69th aspects, the skin color hue region is divided into two regions by a predetermined conditional expression based on brightness and saturation. It is characterized by that.

請求項71に記載の発明は、請求項49〜70の何れか一項に記載の撮像装置において、前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴としている。   The invention according to claim 71 is the imaging apparatus according to any one of claims 49 to 70, wherein the deviation amount includes a deviation amount of brightness of photographed image data, and a screen center portion of the photographed image data. At least one of an average value of brightness and a difference value of brightness calculated under different conditions.

請求項72に記載の発明は、請求項49〜71の何れか一項に記載の撮像装置において、前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴としている。
The invention according to claim 72 is the imaging device according to any one of claims 49 to 71, 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.

請求項73に記載の発明は、画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換機能と、を実現させるための画像処理プログラムである。
The invention according to claim 73 provides a computer for executing image processing,
Occupancy rate calculation function for dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating the proportion of the entire captured image data;
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An image processing program for realizing a gradation conversion function for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項74に記載の発明は、画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定機能と、
前記調整方法決定機能により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定機能により決定された階調調整量の階調変換処理を施す階調変換機能と、を実現させるための画像処理プログラムである。
According to a 74th aspect of the present invention, there is provided a computer for executing image processing,
Occupancy rate calculation function for dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating the proportion of the entire captured image data;
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An adjustment amount determination function for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion function for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination function on the captured image data using the gradation adjustment method determined by the adjustment method determination function; Is an image processing program for realizing the above.

請求項75に記載の発明は、画像処理を実行するためのコンピュータに、
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換機能と、を実現させるための画像処理プログラムである。
The invention according to claim 75 provides a computer for executing image processing,
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating the ratio of the entire photographed image data for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An image processing program for realizing a gradation conversion function for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項76に記載の発明は、画像処理を実行するためのコンピュータに、
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定機能と、
前記調整方法決定機能により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定機能により決定された階調調整量の階調変換処理を施す階調変換機能と、を実現させるための画像処理プログラムである。
The invention according to claim 76 provides a computer for executing image processing,
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating the ratio of the entire photographed image data for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An adjustment amount determination function for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion function for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination function on the captured image data using the gradation adjustment method determined by the adjustment method determination function; Is an image processing program for realizing the above.

請求項77に記載の発明は、画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された第1の占有率及び第2の占有率と、前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換機能と、を実現させるための画像処理プログラムである。
The invention according to claim 77 provides a computer for executing image processing,
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data is determined for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for calculating a deviation amount indicating a deviation in gradation distribution of the captured image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the shooting condition. , An index calculation function for calculating an index for specifying shooting conditions,
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An image processing program for realizing a gradation conversion function for performing gradation conversion processing on the photographed image data using the determined gradation adjustment method.

請求項78に記載のはつめいは、画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された第1の占有率及び第2の占有率と、前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定機能と、
前記調整方法決定機能により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定機能により決定された階調調整量の階調変換処理を施す階調変換機能と、を実現させるための画像処理プログラムである。
According to a 78th aspect of the present invention, there is provided a computer for executing image processing.
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data is determined for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for calculating a deviation amount indicating a deviation in gradation distribution of the captured image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the shooting condition. , An index calculation function for calculating an index for specifying shooting conditions,
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An adjustment amount determination function for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion function for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination function on the captured image data using the gradation adjustment method determined by the adjustment method determination function; Is an image processing program for realizing the above.

請求項79に記載の発明は、請求項75又は76に記載の画像処理プログラムにおいて、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴としている。
The invention according to claim 79 is the image processing program according to claim 75 or 76, wherein a two-dimensional histogram is created by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the photographed image data. Realize the function to
When the occupancy rate calculation function is realized, the occupancy rate is calculated based on the created two-dimensional histogram.

請求項80に記載の発明は、請求項77又は78に記載の画像処理プログラムにおいて、前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記第2の占有率を算出することを特徴としている。
The invention according to claim 80 is the image processing program according to claim 77 or 78, wherein a two-dimensional histogram is created by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the photographed image data. Realize the function to
When the occupation rate calculation function is realized, the second occupation rate is calculated based on the created two-dimensional histogram.

請求項81に記載の発明は、請求項73又は74に記載の画像処理プログラムにおいて、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴としている。
The invention according to claim 81 is the image processing program according to claim 73 or 74, wherein the two-dimensional histogram is created by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data. Realized,
When the occupancy rate calculation function is realized, the occupancy rate is calculated based on the created two-dimensional histogram.

請求項82に記載の発明は、請求項77又は78に記載の画像処理プログラムにおいて、前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記第1の占有率を算出することを特徴としている。
The invention according to claim 82 is the image processing program according to claim 77 or 78, wherein the two-dimensional histogram is created by calculating the cumulative number of pixels for each predetermined hue and lightness of the photographed image data. Realized,
When realizing the occupancy rate calculating function, the first occupancy rate is calculated based on the created two-dimensional histogram.

請求項83に記載の発明は、請求項73、74、77、78、80〜82の何れか一項に記載の画像処理プログラムにおいて、前記指標算出機能を実現させる際に、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴としている。   According to an 83rd aspect of the present invention, in the image processing program according to any one of the 73rd, 74th, 77th, 78th and 80th to 82nd aspects, when the index calculation function is realized, a predetermined high brightness is obtained. It is characterized in that coefficients of different signs are used in the flesh color hue area and the hue area other than the high brightness flesh color hue area.

請求項84に記載の発明は、請求項73、74、77、78、80〜83の何れか一項に記載の画像処理プログラムにおいて、前記指標算出機能を実現させる際に、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴としている。   The invention according to an 84th aspect is the image processing program according to any one of the 73rd, 74th, 77th, 78th and 80th to 83rd aspects, wherein when the index calculation function is realized, It is characterized in that coefficients of different signs are used in the brightness area and brightness areas other than the intermediate brightness area.

請求項85に記載の発明は、請求項83に記載の画像処理プログラムにおいて、前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴としている。   According to an 85th aspect of the present invention, in the image processing program according to the 83rd aspect, the brightness area of the hue area other than the high brightness skin color hue area is a predetermined high brightness area.

請求項86に記載の発明は、請求項84に記載の画像処理プログラムにおいて、前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴としている。   According to an 86th aspect of the present invention, in the image processing program according to the 84th aspect, the lightness area other than the intermediate lightness area is a lightness area in a flesh-color hue area.

請求項87に記載の発明は、請求項83又は85に記載の画像処理プログラムにおいて、前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴としている。   According to an 87th aspect of the present invention, in the image processing program according to the 83rd or 85th aspect, the high-brightness skin color hue region includes a region in the range of 170 to 224 in terms of the lightness value of the HSV color system. It is characterized by that.

請求項88に記載の発明は、請求項84又は86に記載の画像処理プログラムにおいて、前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴としている。   According to an 88th aspect of the present invention, in the image processing program according to the 84th or 86th aspect, the intermediate lightness area includes an area in the range of 85 to 169 as a lightness value of the HSV color system. It is said.

請求項89に記載の発明は、請求項83、85、87の何れか一項に記載の画像処理プログラムにおいて、前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴としている。   The invention according to claim 89 is the image processing program according to any one of claims 83, 85, and 87, wherein the hue area other than the high brightness skin color hue area includes a blue hue area and a green hue area. It is characterized by including at least one of these.

請求項90に記載の発明は、請求項84、86、88の何れか一項に記載の画像処理プログラムにおいて、記中間明度領域以外の明度領域がシャドー領域であることを特徴としている。   The invention described in item 90 is the image processing program according to any one of items 84, 86, 88, wherein the brightness area other than the intermediate brightness area is a shadow area.

請求項91に記載の発明は、請求項89に記載の画像処理プログラムにおいて、前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴としている。   The invention according to claim 91 is the image processing program according to claim 89, wherein a hue value of the blue hue region is in a range of 161 to 250 as a hue value of the HSV color system, and the green hue region The hue value is a hue value of the HSV color system and is in the range of 40 to 160.

請求項92に記載の発明は、請求項90に記載の画像処理プログラムにおいて、前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴としている。   The invention according to claim 92 is the image processing program according to claim 90, characterized in that the brightness value of the shadow area is in the range of 26 to 84 in terms of the brightness value of the HSV color system.

請求項93に記載の発明は、請求項83〜92の何れか一項に記載の画像処理プログラムにおいて、前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴としている。   The invention according to claim 93 is the image processing program according to any one of claims 83 to 92, wherein the hue value of the flesh color hue region is a hue value of HSV color system 0 to 39 and 330 to It is characterized by being in the range of 359.

請求項94に記載の発明は、請求項83〜93の何れか一項に記載の画像処理プログラムにおいて、前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴としている。   The invention according to claim 94 is the image processing program according to any one of claims 83 to 93, wherein the skin color hue region is divided into two regions by a predetermined conditional expression based on lightness and saturation. It is characterized by that.

請求項95に記載の発明は、請求項73〜94の何れか一項に記載の画像処理プログラムにおいて、前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴としている。   The invention according to claim 95 is the image processing program according to any one of claims 73 to 94, wherein the deviation amount includes a brightness deviation amount of the photographed image data, a screen center of the photographed image data. It is characterized in that at least one of an average brightness value and a brightness difference value calculated under different conditions is included.

請求項96に記載の発明は、請求項73〜95の何れか一項に記載の画像処理プログラムにおいて、前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴としている。
The invention according to claim 96 is the image processing program according to any one of claims 73 to 95, 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.

本発明によれば、撮影画像データの撮影条件を定量的に示す指標を算出し、その算出された指標に基づいて撮影条件を判別して、判別結果に応じて撮影画像データに対する階調調整の方法を決定することにより、被写体の明度を適切に補正することが可能となる。特に、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて撮影条件を判別することにより、判別結果の信頼度が高くなり、撮影条件に応じた適切な階調変換を行うことが可能になる。   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 gradation adjustment for the captured image data is performed according to the determination result. By determining the method, it is possible to appropriately correct the brightness of the subject. In particular, by determining the shooting conditions based on the determination map divided in advance according to the accuracy of the shooting conditions, the reliability of the determination result becomes high, and appropriate gradation conversion according to the shooting conditions can be performed. It becomes possible.

また、撮影画像データの撮影条件を定量的に示す指標を算出し、その算出された指標に基づいて撮影画像データの階調調整量を決定することにより、被写体の明度を適切に補正することが可能となる。   Further, it is possible to appropriately correct the brightness of the subject by calculating an index quantitatively indicating the shooting condition of the captured image data and determining the gradation adjustment amount of the captured image data based on the calculated index. It becomes possible.

以下、図面を参照して、本発明の実施形態を詳細に説明する。
まず、本実施形態における構成について説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, the configuration in the present embodiment will be described.

図1は、本発明の実施形態における画像処理装置1の外観構成を示す斜視図である。画像処理装置1は、図1に示すように、筐体2の一側面に、感光材料を装填するためのマガジン装填部3が備えられている。筐体2の内側には、感光材料に露光する露光処理部4と、露光された感光材料を現像処理して乾燥し、プリントを作成するためのプリント作成部5が備えられている。筐体2の他側面には、プリント作成部5で作成されたプリントを排出するためのトレー6が備えられている。   FIG. 1 is a perspective view showing an external configuration of an image processing apparatus 1 according to an embodiment of the present invention. As shown in FIG. 1, the image processing apparatus 1 is provided with a magazine loading unit 3 for loading a photosensitive material on one side 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 surface of the housing 2, a tray 6 for discharging the print created by the print creation unit 5 is provided.

また、筐体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 serving as a device for reading a transparent document, a reflective document input device 10, and an operation unit 11 are provided on the upper portion of the housing 2. The CRT 8 constitutes display means for displaying an image of image information to be printed on the screen. Further, the housing 2 includes 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. Yes. In addition, a control unit 7 that centrally controls these units is provided inside the housing 2.

画像読込部14には、PCカード用アダプタ14a、フロッピー(登録商標)ディスク用アダプタ14bが備えられ、PCカード13aやフロッピー(登録商標)ディスク13bが差し込み可能になっている。PCカード13aは、例えば、デジタルカメラで撮像された複数の駒画像データが記録されたメモリを有する。フロッピー(登録商標)ディスク13bには、例えば、デジタルカメラで撮像された複数の駒画像データが記録される。PCカード13a及びフロッピー(登録商標)ディスク13b以外に駒画像データが記録される記録媒体としては、例えば、マルチメディアカード(登録商標)、メモリースティック(登録商標)、MDデータ、CD−ROM等がある。   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. The PC card 13a has, for example, 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. Examples of the recording medium on which frame image data is recorded other than the PC card 13a and the floppy (registered trademark) disk 13b include a multimedia card (registered trademark), a memory stick (registered trademark), MD data, and a CD-ROM. .

画像書込部15には、フロッピー(登録商標)ディスク用アダプタ15a、MO用アダプタ15b、光ディスク用アダプタ15cが備えられ、それぞれ、フロッピー(登録商標)ディスク16a、MO16b、光ディスク16cが差し込み可能になっている。光ディスク16cとしては、CD−R、DVD−R等がある。   The image writing unit 15 includes a floppy (registered trademark) disk adapter 15a, an MO adapter 15b, and an optical disk adapter 15c, and a floppy (registered trademark) disk 16a, MO 16b, and an optical disk 16c can be inserted into the image writing unit 15, respectively. ing. Examples of the optical disc 16c include a CD-R and a DVD-R.

なお、図1では、操作部11、CRT8、フィルムスキャナ部9、反射原稿入力装置10、画像読込部14が、筐体2に一体的に備えられた構造となっているが、これらの何れか1つ以上を別体として設けるようにしてもよい。   In FIG. 1, the operation unit 11, the CRT 8, the film scanner unit 9, the reflection original input device 10, and the image reading unit 14 are integrally provided in the housing 2. One or more may be provided separately.

また、図1に示した画像処理装置1では、感光材料に露光して現像してプリントを作成するものが例示されているが、プリント作成方式はこれに限定されず、例えば、インクジェット方式、電子写真方式、感熱方式、昇華方式等の方式を用いてもよい。   Further, in the image processing apparatus 1 shown in FIG. 1, there is exemplified an apparatus that creates a print by exposing to a photosensitive material and developing it, but the print creation system is not limited to this, for example, an inkjet system, an electronic system, etc. A method such as a photographic method, a thermal method, or a sublimation method may be used.

〈画像処理装置1の主要部構成〉
図2に、画像処理装置1の主要部構成を示す。画像処理装置1は、図2に示すように、制御部7、露光処理部4、プリント生成部5、フィルムスキャナ部9、反射原稿入力装置10、画像読込部14、通信手段(入力)32、画像書込部15、データ蓄積手段71、テンプレート記憶手段72、操作部11、CRT8、通信手段(出力)33により構成される。
<Main part configuration of image processing apparatus 1>
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 reflective original input device 10, an image reading unit 14, a communication means (input) 32, The image writing unit 15, the data storage unit 71, the template storage unit 72, the operation unit 11, the CRT 8, and the communication unit (output) 33 are configured.

制御部7は、マイクロコンピュータにより構成され、ROM(Read Only Memory)等の記憶部(図示略)に記憶されている各種制御プログラムと、CPU(Central Processing Unit)(図示略)との協働により、画像処理装置1を構成する各部の動作を制御する。   The control unit 7 is configured by a microcomputer, and cooperates with various control programs stored in a storage unit (not shown) such as a ROM (Read Only Memory) and a CPU (Central Processing Unit) (not shown). The operation of each unit constituting the image processing apparatus 1 is controlled.

制御部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, and is read from the film scanner unit 9 or the reflective original input device 10 based on an input signal (command information) from the operation unit 11. Image processing is performed on the image signal, the image signal read from the image reading unit 14, and the image signal input from the external device via the communication unit 32 to form exposure image information, and the exposure processing unit 4 Output. 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 the image signal. Output destinations of the image processing unit 70 include the CRT 8, the image writing unit 15, the communication means (output) 33, and the like.

露光処理部4は、感光材料に画像の露光を行い、この感光材料をプリント作成部5に出力する。プリント作成部5は、露光された感光材料を現像処理して乾燥し、プリントP1、P2、P3を作成する。プリントP1は、サービスサイズ、ハイビジョンサイズ、パノラマサイズ等のプリントであり、プリントP2は、A4サイズのプリントであり、プリントP3は、名刺サイズのプリントである。   The exposure processing unit 4 exposes an image to the photosensitive material and outputs the photosensitive material to the print creating unit 5. The print creating unit 5 develops and exposes the exposed photosensitive material to create prints P1, P2, and P3. The print P1 is a service size, high-definition size, panoramic size print, the print P2 is an A4 size print, and the print P3 is a business card size print.

フィルムスキャナ部9は、アナログカメラにより撮像された現像済みのネガフィルムN、リバーサルフィルム等の透過原稿に記録された駒画像を読み取り、駒画像のデジタル画像信号を取得する。反射原稿入力装置10は、フラットベットスキャナにより、プリントP(写真プリント、書画、各種の印刷物)上の画像を読み取り、デジタル画像信号を取得する。   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 acquires a digital image signal of the frame image. The reflective original input device 10 reads an image on a print P (photo print, document, various printed materials) by a flat bed scanner, and acquires a digital image signal.

画像読込部14は、PCカード13aやフロッピー(登録商標)ディスク13bに記録された駒画像情報を読み出して制御部7に転送する。この画像読込部14は、画像転送手段30として、PCカード用アダプタ14a、フロッピー(登録商標)ディスク用アダプタ14b等を有する。画像読込部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 or 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 the 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 (registered trademark) disk 13b inserted into the floppy (registered trademark) disk adapter 14b. 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.

通信手段(入力)32は、画像処理装置1が設置された施設内の別のコンピュータや、インターネット等を介した遠方のコンピュータから、撮像画像を表す画像信号やプリント命令信号を受信する。   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 remote computer via the Internet or the like.

画像書込部15は、画像搬送部31として、フロッピー(登録商標)ディスク用アダプタ15a、MO用アダプタ15b、光ディスク用アダプタ15cを備えている。画像書込部15は、制御部7から入力される書込信号に従って、フロッピー(登録商標)ディスク用アダプタ15aに差し込まれたフロッピー(登録商標)ディスク16a、MO用アダプタ15bに差し込まれたMO16b、光ディスク用アダプタ15cに差し込まれた光ディスク16cに、本発明における画像処理方法によって生成された画像信号を書き込む。   The image writing unit 15 includes, as the image conveying unit 31, a floppy (registered trademark) disk adapter 15a, an MO adapter 15b, and an optical disk adapter 15c. In accordance with a write signal input from the control unit 7, the image writing unit 15 includes a floppy (registered trademark) disk 16a inserted into the floppy (registered trademark) disk adapter 15a, an MO 16b inserted into the MO adapter 15b, The image signal generated by the image processing method according to the present invention is written to the optical disk 16c inserted into the optical disk adapter 15c.

データ蓄積手段71は、画像情報とそれに対応する注文情報(どの駒の画像から何枚プリントを作成するかの情報、プリントサイズの情報等)とを記憶し、順次蓄積する。   The data storage unit 71 stores and sequentially stores image information and order information corresponding to the image information (information on how many prints are to be created from images of which frames, print size information, and the like).

テンプレート記憶手段72は、サンプル識別情報D1、D2、D3に対応するサンプル画像データである背景画像、イラスト画像等と合成領域を設定する少なくとも1個のテンプレートのデータを記憶している。オペレータの操作によりセットしてテンプレート記憶手段72に予め記憶された複数のテンプレートから所定のテンプレートを選択し、駒画像情報は選択されたテンプレートにより合成し、指定されるサンプル識別情報D1、D2、D3に基づいて選択されたサンプル画像データと、注文に基づく画像データ及び/又は文字データとを合成し、指定によるサンプルに基づくプリントを作成する。このテンプレートによる合成は、周知のクロマキー法によって行なわれる。   The template storage means 72 stores at least one template data for setting a synthesis area and a background image, an illustration image, and the like, which are sample image data corresponding to the sample identification information D1, D2, and D3. A predetermined template is selected from a plurality of templates that are set by the operation of the operator 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 D1, D2, D3 The sample image data selected on the basis of the image data and the image data and / or character data based on the order are combined to create a print based on the specified sample. The synthesis using this template is performed by a well-known chroma key method.

なお、プリントのサンプルを指定するサンプル識別情報D1、D2、D3は、操作部211から入力されるように構成されているが、これらのサンプル識別情報は、プリントのサンプル又は注文シートに記録されているため、OCR等の読み取り手段により読み取ることができる。或いは、オペレータのキーボード操作により入力することもできる。   Note that sample identification information D1, D2, and D3 for specifying a print sample is configured to be input from the operation unit 211. These sample identification information is recorded on a print sample or an order sheet. Therefore, it can be read by reading means such as OCR. Or it can also input by an operator's keyboard operation.

このようにプリントのサンプルを指定するサンプル識別情報D1に対応してサンプル画像データを記録しておき、プリントのサンプルを指定するサンプル識別情報D1を入力し、この入力されるサンプル識別情報D1に基づきサンプル画像データを選択し、この選択されたサンプル画像データと、注文に基づく画像データ及び/又は文字データとを合成し、指定によるサンプルに基づくプリントを作成するため、種々の実物大のサンプルをユーザが実際に手にしてプリントの注文ができ、幅広いユーザの多様な要求に応じることができる。   In this way, sample image data is recorded corresponding to the sample identification information D1 for designating the print sample, the sample identification information D1 for designating the print sample is input, and based on the input sample identification information D1. Select the sample image data, synthesize the selected sample image data with the image data and / or text data based on the order, and create a print based on the specified sample. Can actually place a print order and meet the diverse requirements of a wide range of users.

また、第1のサンプルを指定する第1のサンプル識別情報D2と第1のサンプルの画像データを記憶し、また、第2のサンプルを指定する第2のサンプル識別情報D3と第2のサンプルの画像データを記憶し、指定される第1及び第2のサンプル識別情報D2、D3とに基づいて選択されたサンプル画像データと、注文に基づく画像データ及び/又は文字データとを合成し、指定によるサンプルに基づくプリントを作成するため、さらに多種多様の画像を合成することができ、より一層幅広いユーザの多様な要求に応じたプリントを作成することができる。   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 second sample The image data is stored, the sample image data selected based on the designated first and second sample identification information D2 and D3, and the image data and / or character data based on the order are synthesized, and according to the designation In order to create a print based on a sample, it is possible to synthesize a wider variety of images, and it is possible to create a print that meets a wider variety of user requirements.

操作部11は、情報入力手段12を有する。情報入力手段12は、例えば、タッチパネル等により構成されており、情報入力手段12の押下信号を入力信号として制御部7に出力する。なお、操作部11は、キーボードやマウス等を備えて構成するようにしてもよい。CRT8は、制御部7から入力された表示制御信号に従って、画像情報等を表示する。   The operation unit 11 includes information input means 12. The information input unit 12 is configured by a touch panel, for example, and outputs a pressing signal of the information input unit 12 to the control unit 7 as an input signal. Note that the operation unit 11 may be configured to include a keyboard, a mouse, and the like. The CRT 8 displays image information and the like according to a display control signal input from the control unit 7.

通信手段(出力)33は、本発明の画像処理を施した後の撮影画像を表す画像信号と、それに付帯するオーダー情報を、画像処理装置1が設置された施設内の他のコンピュータや、インターネット等を介した遠方のコンピュータに対して送信する。   The communication means (output) 33 sends an image signal representing a photographed image after image processing of the present invention and order information attached thereto to other computers in the facility where the image processing apparatus 1 is installed, the Internet Etc. to a distant computer via

図2に示すように、画像処理装置1は、各種デジタルメディアの画像及び画像原稿を分割測光して得られた画像情報を取り込む画像入力手段と、画像処理手段と、処理済の画像を表示、プリント出力、画像記録メディアに書き込む画像出力手段と、通信回線を介して施設内の別のコンピュータやインターネット等を介した遠方のコンピュータに対して画像データと付帯するオーダー情報を送信する手段と、を備える。   As shown in FIG. 2, the image processing apparatus 1 displays an image input unit that captures image information obtained by dividing and metering images of various digital media and an image original, an image processing unit, and a processed image. Print output, image output means for writing to an image recording medium, and means for transmitting image data and accompanying order information to another computer in the facility or a distant computer via the Internet via a communication line, Prepare.

<画像処理部70の内部構成>
図3に、画像処理部70の内部構成を示す。画像処理部70は、図3に示すように、画像調整処理部701、フィルムスキャンデータ処理部702、反射原稿スキャンデータ処理部703、画像データ書式解読処理部704、テンプレート処理部705、CRT固有処理部706、プリンタ固有処理部A707、プリンタ固有処理部B708、画像データ書式作成処理部709により構成される。
<Internal Configuration of Image Processing Unit 70>
FIG. 3 shows an 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 reflected original scan data processing unit 703, an image data format decoding processing unit 704, a template processing unit 705, and CRT specific processing. 706, printer specific processing unit A707, printer specific processing unit B708, and image data format creation processing unit 709.

フィルムスキャンデータ処理部702は、フィルムスキャナ部9から入力された画像データに対し、フィルムスキャナ部9固有の校正操作、ネガポジ反転(ネガ原稿の場合)、ゴミキズ除去、コントラスト調整、粒状ノイズ除去、鮮鋭化強調等の処理を施し、処理済の画像データを画像調整処理部701に出力する。また、フィルムサイズ、ネガポジ種別、フィルムに光学的或いは磁気的に記録された主要被写体に関わる情報、撮影条件に関する情報(例えば、APSの記載情報内容)等も併せて画像調整処理部701に出力する。   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, granular noise removal, and sharpness for the image data input from the film scanner unit 9. Processing such as conversion enhancement is performed, and processed image data is output to the image adjustment processing unit 701. In addition, the film size, the negative / positive type, information relating to the main subject optically or magnetically recorded on the film, information relating to the photographing conditions (for example, information content described in APS), and the like are also output to the image adjustment processing unit 701. .

反射原稿スキャンデータ処理部703は、反射原稿入力装置10から入力された画像データに対し、反射原稿入力装置10固有の校正操作、ネガポジ反転(ネガ原稿の場合)、ゴミキズ除去、コントラスト調整、ノイズ除去、鮮鋭化強調等の処理を施し、処理済の画像データを画像調整処理部701に出力する。   The reflection original scan data processing unit 703 performs a calibration operation unique to the reflection original input device 10, negative / positive reversal (in the case of a negative original), dust flaw removal, contrast adjustment, and noise removal on the image data input from the reflection original input device 10. Then, processing such as sharpening enhancement is performed, and processed image data is output to the image adjustment processing unit 701.

画像データ書式解読処理部704は、画像転送手段30及び/又は通信手段(入力)32から入力された画像データに対し、その画像データのデータ書式に従って、必要に応じて圧縮符号の復元、色データの表現方法の変換等の処理を施し、画像処理部70内の演算に適したデータ形式に変換し、画像調整処理部701に出力する。また、画像データ書式解読処理部704は、操作部11、通信手段(入力)32、画像転送手段30の何れかから出力画像の大きさが指定された場合、その指定された情報を検出し、画像調整処理部701に出力する。なお、画像転送手段30により指定される出力画像の大きさについての情報は、画像転送手段30が取得した画像データのヘッダ情報、タグ情報に埋め込まれている。   The image data format decoding processing unit 704 restores the compression code, if necessary, according to the data format of the image data input from the image transfer means 30 and / or the communication means (input) 32, and the color data. Are converted into a data format suitable for computation in the image processing unit 70 and output to the image adjustment processing unit 701. Further, when the size of the output image is specified from any of the operation unit 11, the communication unit (input) 32, and the image transfer unit 30, the image data format decoding processing unit 704 detects the specified information, The image is output to the image adjustment processing unit 701. Information about the size of the output image designated 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.

画像調整処理部701は、操作部11又は制御部7の指令に基づいて、フィルムスキャナ部9、反射原稿入力装置10、画像転送手段30、通信手段(入力)32、テンプレート処理部705から受け取った画像データに対し、後述の画像処理(図6、図7、図13及び図17参照)を施して、出力媒体上での鑑賞に最適化された画像形成用のデジタル画像データを生成し、CRT固有処理部706、プリンタ固有処理部A707、プリンタ固有処理部B708、画像データ書式作成処理部709、データ蓄積手段71に出力する。   The image adjustment processing unit 701 receives from the film scanner unit 9, the reflection original input device 10, the image transfer unit 30, the communication unit (input) 32, and the template processing unit 705 based on the command from the operation unit 11 or the control unit 7. The image data described below is subjected to image processing (see FIGS. 6, 7, 13, and 17) to generate digital image data for image formation optimized for viewing on the output medium, and CRT The data is output to the specific processing unit 706, the printer specific processing unit A 707, the printer specific processing unit B 708, the image data format creation processing unit 709, and the data storage unit 71.

最適化処理においては、例えばsRGB規格に準拠したCRTディスプレイモニタに表示することを前提とした場合、sRGB規格の色域内で最適な色再現が得られるように処理される。銀塩印画紙への出力を前提とした場合、銀塩印画紙の色域内で最適な色再現が得られるように処理される。また前記色域の圧縮の以外にも、16bitから8bitへの階調圧縮、出力画素数の低減、及び出力デバイスの出力特性(LUT)への対応処理等も含まれる。さらにノイズ抑制、鮮鋭化、グレーバランス調整、彩度調整、或いは覆い焼き処理等の階調圧縮処理が行われることは言うまでもない。   In the optimization process, for example, when it is assumed that the image is displayed on a CRT display monitor compliant with the sRGB standard, the optimal color reproduction is performed within the sRGB standard color gamut. If output to silver salt photographic paper is assumed, processing is performed so that optimum color reproduction is obtained 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, processing corresponding to output characteristics (LUT) of the output device, and the like are also included. Furthermore, it goes without saying that tone compression processing such as noise suppression, sharpening, gray balance adjustment, saturation adjustment, or dodging processing is performed.

画像調整処理部701は、図3に示すように、撮影画像データの撮影条件を判別して階調調整条件(階調調整方法、階調調整量)を決定するシーン判別部710と、その決定された階調調整条件に従って階調変換処理を行う階調変換部711により構成される。   As shown in FIG. 3, the image adjustment processing unit 701 determines a gradation adjustment condition (gradation adjustment method, gradation adjustment amount) by determining a photographing condition of photographed image data, and the determination. The gradation conversion unit 711 performs gradation conversion processing according to the adjusted gradation adjustment conditions.

本実施形態において撮影条件は、光源条件と露出条件に分類される。
光源条件とは、撮影時の光源、主要被写体(主に人物)と撮影者との位置関係に由来するものである。広義の意味において、光源の種類(太陽光、ストロボ光、タングステン照明及び蛍光灯)も含まれる。逆光シーンは、主要被写体の背景に太陽が位置することに生じる。また、ストロボ(近接撮影)シーンは、主要被写体にストロボ光が強く照射されることにより生じる。両シーンは、共に撮影輝度(明暗の比)は同程度で、主要被写体の前景と背景の明るさの関係が逆転しているに過ぎない。
In the present embodiment, shooting conditions are classified into light source conditions and exposure conditions.
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 a broad sense, the type of light source (sunlight, strobe light, tungsten illumination and fluorescent lamp) is also included. Backlit scenes occur when the sun is located in the background of the main subject. Further, a strobe (close-up shooting) scene is generated when strobe light is intensely applied to a main subject. Both scenes have the same shooting brightness (ratio of light and darkness), and the relationship between the foreground and background brightness of the main subject is merely reversed.

一方、露出条件とは、カメラのシャッタースピードや絞り値等の設定に由来するものであり、露出不足の状態をアンダー、適正な露出状態をノーマル、露出過多の状態をオーバーと称する。広義の意味において、所謂「白とび」や「シャドーの潰れ」も含まれる。全ての光源条件において、アンダー或いはオーバーの露出条件とすることができる。特に、ダイナミックレンジの狭いDSC(デジタルスチルカメラ)では、自動露出調整機能を用いても、白とびを抑制することを目的とした設定条件に起因して、アンダー気味の露出条件となる頻度が高い。   On the other hand, the exposure condition is derived from the settings of the camera shutter speed, aperture value, etc., and the underexposure state is referred to as under, the proper exposure state is referred to as normal, and the overexposure state is referred to as 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 set. In particular, in a DSC (digital still camera) with a narrow dynamic range, even if the automatic exposure adjustment function is used, the frequency of underexposure exposure conditions is high due to setting conditions intended to suppress overexposure. .

図4(a)に、シーン判別部710の内部構成を示す。シーン判別部710は、図4(a)に示すように、割合算出部712、偏り算出部722、指標算出部713、画像処理条件算出部714により構成される。割合算出部712は、図4(b)に示すように、表色系変換部715、ヒストグラム作成部716、占有率演算部717により構成される。   FIG. 4A shows an internal configuration of the scene determination unit 710. As shown in FIG. 4A, the scene determination unit 710 includes a ratio calculation unit 712, a bias calculation unit 722, an index calculation unit 713, and an image processing condition calculation 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.

表色系変換部715は、撮影画像データのRGB(Red, Green, Blue)値をHSV表色系に変換する。HSV表色系とは、画像データを、色相(Hue)、彩度(Saturation)、明度(Value又はBrightness)の3つの要素で表すものであり、マンセルにより提案された表色体系を元にして考案されたものである。   The color system conversion unit 715 converts RGB (Red, Green, Blue) values of the captured image data into the HSV color system. The HSV color system is a representation of image data in terms of three elements: Hue, Saturation, and Lightness (Value or Brightness), and is based on the color system proposed by Munsell. It has been devised.

なお、特許請求の範囲及び本実施形態において、「明度」は特に注釈を設けない限り一般に用いられる「明るさ」の意味である。以下の記載において、HSV表色系のV(0〜255)を「明度」として用いるが、他の如何なる表色系の明るさを表す単位系を用いてもよい。その際、本実施形態で記載する各種係数等の数値を、改めて算出し直すことは言うまでもない。また、本実施形形態における撮影画像データは、人物を主要被写体とする画像データであるものとする。   In the claims and this embodiment, “brightness” means “brightness” generally used unless otherwise specified. In the following description, V (0 to 255) of the HSV color system is used as “brightness”, but a unit system representing the brightness of any other color system may be used. At that time, it goes without saying that numerical values such as various coefficients described in the present embodiment are recalculated. The captured image data in the present embodiment is assumed to be image data having a person as a main subject.

ヒストグラム作成部716は、撮影画像データを、所定の色相と明度の組み合わせからなる領域に分割し、分割された領域毎に累積画素数を算出することによって2次元ヒストグラムを作成する。また、ヒストグラム作成部716は、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、分割された領域毎に累積画素数を算出することによって2次元ヒストグラムを作成する。なお、撮影画像データを、撮影画像データの画面の外縁からの距離、明度及び色相の組み合わせからなる領域に分割し、分割された領域毎に累積画素数を算出することによって3次元ヒストグラムを作成するようにしてもよい。以下では、2次元ヒストグラムを作成する方式を採用するものとする。   The histogram creation unit 716 creates a two-dimensional histogram by dividing the photographed 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 composed of combinations of the distance from the outer edge of the screen of the captured image data and the brightness, 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 including combinations of the distance from the outer edge of the screen of the captured image data, brightness, and hue, and a cumulative pixel count is calculated for each of the divided regions, thereby creating a three-dimensional histogram. You may do it. In the following, it is assumed that a method of creating a two-dimensional histogram is adopted.

占有率演算部717は、明度と色相の組み合わせによって分割された領域毎に、ヒストグラム作成部716において算出された累積画素数の全画素数(撮影画像データ全体)に占める割合を示す第1の占有率(表1参照)を算出する。また、占有率演算部717は、撮影画像データの画面の外縁からの距離と明度の組み合わせによって分割された領域毎に、ヒストグラム作成部716において算出された累積画素数の全画素数(撮影画像データ全体)に占める割合を示す第2の占有率(表4参照)を算出する。   The occupancy calculating unit 717 has a first occupancy indicating 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. The rate (see Table 1) is calculated. In addition, the occupation ratio calculation unit 717 calculates the total number of pixels (shooted image data) of the cumulative number of pixels calculated by the histogram creation unit 716 for each region divided by the combination of the distance from the outer edge of the screen of the shot image data and the brightness. A second occupancy ratio (see Table 4) indicating a ratio of the total) is calculated.

偏り算出部722は、撮影画像データの階調分布の偏りを示す偏倚量を算出する。ここでの偏倚量とは、撮影画像データの輝度値の標準偏差、輝度差分値、画面中央部の肌色平均輝度値、画面中央部の平均輝度値、肌色輝度分布値である。これらの偏倚量の算出処理については、後に図16を参照して詳細に説明する。   The bias calculation unit 722 calculates a bias amount indicating the bias of the gradation distribution of the captured image data. Here, the deviation amount is a standard deviation of luminance values of the captured 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 calculation processing of these deviation amounts will be described in detail later with reference to FIG.

指標算出部713は、占有率演算部717において各領域毎に算出された第1の占有率に、撮影条件に応じて予め(例えば、判別分析によって)設定された第1の係数(表2参照)を乗算して和をとることにより、撮影条件を特定するための指標1を算出する。指標1は、屋内撮影度、近接撮影度、顔色高明度等のストロボ撮影時の特徴を示すもので、ストロボと判別されるべき画像を他の撮影条件から分離するためのものである。   The index calculation unit 713 uses a first coefficient (see, for example, Table 2) set in advance (for example, by discriminant analysis) in accordance with the shooting conditions in the first occupancy calculated for each region in the occupancy calculation unit 717. ) To obtain a sum, thereby calculating an index 1 for specifying the photographing condition. The index 1 indicates characteristics at the time of strobe shooting such as indoor shooting degree, close-up shooting degree, face color high brightness, and the like, and is for separating an image that should be identified as a strobe from other shooting conditions.

指標1の算出の際、指標算出部713は、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数を用いる。ここで、所定の高明度の肌色色相領域には、HSV表色系の明度値で170〜224の領域が含まれる。また、所定の高明度の肌色色相領域以外の色相領域には、青色色相領域(色相値161〜250)、緑色色相領域(色相値40〜160)の少なくとも一方の高明度領域が含まれる。   When calculating the index 1, the index calculation unit 713 uses coefficients of different signs for a predetermined high brightness skin color hue area and a hue area other than the high brightness skin color hue area. Here, the predetermined high lightness skin color hue region includes regions 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 high brightness area of the blue hue area (hue values 161 to 250) and the green hue area (hue values 40 to 160).

また、指標算出部713は、占有率演算部717において各領域毎に算出された第1の占有率に、撮影条件に応じて予め(例えば、判別分析によって)設定された第2の係数(表3参照)を乗算して和をとることにより、撮影条件を特定するための指標2を算出する。指標2は、屋外撮影度、空色高明度、顔色低明度等の逆光撮影時の特徴を複合的に示すもので、逆光と判別されるべき画像を他の撮影条件から分離するためのものである。   The index calculation unit 713 also sets a second coefficient (table) set in advance (for example, by discriminant analysis) to the first occupancy calculated for each region in the occupancy calculation unit 717 according to the shooting conditions. The index 2 for specifying the photographing condition is calculated by multiplying (see 3) and taking the sum. The index 2 is a composite indication of characteristics at the time of backlight photographing such as outdoor photographing degree, sky blue high lightness, facial color low lightness, etc., and is for separating an image that should be distinguished from backlighting from other photographing conditions. .

指標2の算出の際、指標算出部713は、肌色色相領域(色相値0〜39、330〜359)の中間明度領域と、当該中間明度領域以外の明度領域とで、異なる符号の係数を用いる。この肌色色相領域の中間明度領域には、明度値85〜169の領域が含まれる。また、当該中間明度領域以外の明度領域には、例えば、シャドー領域(明度値26〜84)が含まれる。   When calculating the index 2, the index calculation unit 713 uses coefficients of different signs in 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 intermediate lightness area of the flesh color hue area includes lightness values of 85 to 169. The brightness area other than the intermediate brightness area includes, for example, a shadow area (brightness values 26 to 84).

更に、指標算出部713は、占有率演算部717において各領域毎に算出された第2の占有率に、撮影条件に応じて予め(例えば、判別分析によって)設定された第3の係数(表5参照)を乗算して和をとることにより、撮影条件を特定するための指標3を算出する。指標3は、逆光とストロボ間における、撮影画像データの画面の中心と外側の明暗関係の差異を示すものであり、逆光又はストロボと判別されるべき画像のみを定量的に示すものである。指標3の算出の際、指標算出部713は、撮影画像データの画面の外縁からの距離に応じて異なる値の係数を用いる。   Further, the index calculation unit 713 uses the third coefficient (table) set in advance (for example, by discriminant analysis) in accordance with the shooting conditions in the second occupancy calculated for each region in the occupancy calculation unit 717. 5) to obtain a sum to calculate an index 3 for specifying the photographing condition. The index 3 indicates the difference in contrast between the center and the outside of the screen of the captured image data between the backlight and the strobe, and quantitatively indicates only the image that should be distinguished from the backlight or the strobe. When calculating the index 3, the index calculation unit 713 uses different values of coefficients according to the distance from the outer edge of the screen of the captured image data.

また、指標算出部713は、指標1、指標3、撮影画像データの画面中央部における肌色領域の平均輝度値に、それぞれ、撮影条件に応じて予め(例えば、判別分析によって)設定された係数を乗算して和をとることにより指標4を算出する。更に、指標算出部713は、指標2、指標3、画面中央部における肌色領域の平均輝度値に、それぞれ、撮影条件に応じて予め(例えば、判別分析によって)設定された係数を乗算して和をとることにより指標5を算出する。また、指標算出部713は、偏り算出部722において算出された偏倚量に、撮影条件に応じて予め(例えば、判別分析によって)設定された第4の係数(表6参照)を乗算して和をとることにより指標6を算出する。指標算出部713における指標1〜6の具体的な算出方法は、後述の本実施形態の動作説明において詳細に説明する。   In addition, the index calculation unit 713 uses coefficients set in advance (for example, by discriminant analysis) according to shooting conditions for the average brightness value of the skin color area in the center of the screen of the index 1, the index 3, and the captured image data. The index 4 is calculated by multiplying and taking the sum. Further, the index calculation unit 713 multiplies the average luminance value of the skin color area in the index 2, index 3, and center portion of the screen by a coefficient set in advance (for example, by discriminant analysis) according to the shooting condition. The index 5 is calculated by taking 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. The index 6 is calculated by taking A specific method for calculating the indices 1 to 6 in the index calculating unit 713 will be described in detail in the operation description of the present embodiment described later.

図4(c)に、画像処理条件算出部714の内部構成を示す。画像処理条件算出部714は、図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. .

シーン判別部718は、指標算出部713において算出された指標4、指標5及び指標6の値と、撮影条件の確度に応じて予め領域分けされ、指標の信頼度を評価する判別マップ(図19参照)に基づいて、撮影画像データの撮影条件を判別する。   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 evaluates the reliability of the index (FIG. 19). Based on the reference), the shooting condition of the shot image data is determined.

階調調整方法決定部719は、シーン判別部718において判別された撮影条件に応じて、撮影画像データに対する階調調整の方法を決定する。例えば、撮影条件が順光又はストロボである場合は、図21(a)に示すように、入力された撮影画像データの画素値を平行移動(オフセット)補正する方法(階調調整方法A)が適用される。撮影条件が逆光又はアンダーである場合は、図21(b)に示すように、入力された撮影画像データの画素値をガンマ補正する方法(階調調整方法B)が適用される。また、撮影条件が逆光と順光の中間(低確度領域(1))である場合、又はストロボとアンダーの中間(低確度領域(2))である場合、図21(c)に示すように、入力された撮影画像データの画素値をガンマ補正及び平行移動(オフセット)補正する方法(階調調整方法C)が適用される。   A gradation adjustment method determination unit 719 determines a method of gradation adjustment 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. 21A, there is a method (tone adjustment method A) for correcting the translation (offset) of the pixel value of the input captured image data. Applied. When the shooting condition is backlit or under, as shown in FIG. 21B, a method (gradation adjustment method B) for applying gamma correction to the pixel value of the input captured image data is applied. Further, when the photographing condition is intermediate between backlight and direct light (low accuracy region (1)), or intermediate between strobe and under light (low accuracy region (2)), as shown in FIG. A method (tone adjustment method C) for applying gamma correction and translation (offset) correction to the pixel value of the input captured image data is applied.

階調調整パラメータ算出部720は、指標算出部713において算出された指標4、指標5及び指標6の値に基づいて、階調調整に必要なパラメータ(キー補正値等)を算出する。   The tone adjustment parameter calculation unit 720 calculates parameters (key correction values and the like) 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.

階調調整量算出部721は、階調調整パラメータ算出部720において算出された階調調整パラメータに基づいて、撮影画像データに対する階調調整量を算出(決定)する。具体的に、階調調整量算出部721は、階調調整方法決定部719において決定された階調調整方法に対応して予め設定された複数の階調変換曲線の中から、階調調整パラメータ算出部720において算出された階調調整パラメータに対応する階調変換曲線を選択する。なお、階調調整パラメータ算出部720において算出された階調調整パラメータに基づいて階調変換曲線(階調調整量)を算出するようにしてもよい。   The tone adjustment amount calculation unit 721 calculates (determines) the tone adjustment amount for the captured image data based on the tone adjustment parameter calculated by the tone adjustment parameter calculation unit 720. Specifically, the tone adjustment amount calculation unit 721 selects a tone adjustment parameter from a plurality of tone conversion curves set in advance corresponding to the tone adjustment method determined by the tone adjustment method determination unit 719. A gradation conversion curve corresponding to the gradation adjustment parameter calculated by the calculation unit 720 is selected. Note that the tone conversion curve (tone adjustment amount) may be calculated based on the tone adjustment parameter calculated by the tone adjustment parameter calculation unit 720.

シーン判別部718における撮影条件の判別方法、階調調整パラメータ算出部720における階調調整パラメータの算出方法は、後述の本実施形態の動作説明において詳細に説明する。   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.

図3において階調変換部711は、階調調整量算出部721において決定された階調変換曲線に従って、撮影画像データを階調変換する。   In FIG. 3, the gradation conversion unit 711 performs gradation conversion of the captured image data according to the gradation conversion curve determined by the gradation adjustment amount calculation unit 721.

テンプレート処理部705は、画像調整処理部701からの指令に基づいて、テンプレート記憶手段72から所定の画像データ(テンプレート)を読み出して、画像処理対象の画像データとテンプレートを合成するテンプレート処理を行い、テンプレート処理後の画像データを画像調整処理部701に出力する。   The template processing unit 705 reads out predetermined image data (template) from the template storage unit 72 based on a command from the image adjustment processing unit 701, and performs template processing for combining the image data to be processed with the template. The image data after the template processing is output to the image adjustment processing unit 701.

CRT固有処理部706は、画像調整処理部701から入力された画像データに対して、必要に応じて画素数変更やカラーマッチング等の処理を施し、制御情報等表示が必要な情報と合成した表示用の画像データをCRT8に出力する。   The CRT specific processing unit 706 performs a process 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 combines the information with information that needs to be displayed, such as control information. Image data is output to the CRT 8.

プリンタ固有処理部A707は、必要に応じてプリンタ固有の校正処理、カラーマッチング、画素数変更等の処理を行い、処理済の画像データを露光処理部4に出力する。   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.

本発明の画像処理装置1に、大判インクジェットプリンタ等の外部プリンタ51が接続可能な場合には、接続するプリンタ装置毎にプリンタ固有処理部B708が備えられている。このプリンタ固有処理部B708は、プリンタ固有の校正処理、カラーマッチング、画素数変更等の処理を施し、処理済の画像データを外部プリンタ51に出力する。   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.

画像データ書式作成処理部709は、画像調整処理部701から入力された画像データに対して、必要に応じてJPEG、TIFF、Exif等に代表される各種の汎用画像フォーマットへの変換を施し、処理済の画像データを画像搬送部31や通信手段(出力)33に出力する。   The image data format creation processing unit 709 converts the image data input from the image adjustment processing unit 701 into various general-purpose image formats typified by JPEG, TIFF, Exif, and the like as necessary. The completed image data is output to the image transport unit 31 and the communication means (output) 33.

なお、図3に示したフィルムスキャンデータ処理部702、反射原稿スキャンデータ処理部703、画像データ書式解読処理部704、画像調整処理部701、CRT固有処理部706、プリンタ固有処理部A707、プリンタ固有処理部B708、画像データ書式作成処理部709、という区分は、画像処理部70の機能の理解を助けるために設けた区分であり、必ずしも物理的に独立したデバイスとして実現される必要はなく、例えば、単一のCPUによるソフトウエア処理の種類の区分として実現されてもよい。   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, the printer specific processing unit A707, and the printer specific shown in FIG. The divisions of the processing unit B708 and the image data format creation processing unit 709 are provided to assist understanding of the functions of the image processing unit 70, and are not necessarily realized as physically independent devices. Alternatively, it may be realized as a type of software processing performed by a single CPU.

次に、本実施形態における動作について説明する。
まず、図5のフローチャートを参照して、画像調整処理部701において実行される処理の流れについて説明する。
Next, the operation in this embodiment will be described.
First, the flow of processing executed in the image adjustment processing unit 701 will be described with reference to the flowchart of FIG.

まず、撮影画像データのサイズが縮小される(ステップT1)。撮影画像データのサイズを縮小する方法としては、公知の方法(例えば、バイリニア法、バイキュービック法、ニアレストネ−バー法等)を用いることができる。縮小率としては特に限定はないが、処理速度の観点及び撮影条件の判別精度の観点で、元画像の1/2〜1/10程度が好ましい。   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 nearest neighbor method, or the like) can be used. The reduction ratio is not particularly limited, but is preferably about 1/2 to 1/10 of the original image from the viewpoint of processing speed and shooting condition determination accuracy.

次いで、縮小された撮影画像データに対して、DSCのホワイトバランス調整の補正処理が行われ(ステップT2)、補正処理後の撮影画像データに基づいて、撮影条件を特定するための指標(指標1〜6)を算出する指標算出処理が行われる(ステップT3)。ステップT3の指標算出処理については、後に図6を参照して詳細に説明する。   Next, DSC white balance adjustment correction processing is performed on the reduced photographed image data (step T2), and an index (index 1) for specifying the photographing condition based on the photographed image data after the correction processing. ˜6) is calculated (step T3). The index calculation process in step T3 will be described in detail later with reference to FIG.

次いで、ステップT3で算出された指標と判別マップに基づいて撮影画像データの撮影条件を判別して、撮影画像データに対する階調調整条件(階調調整方法、階調調整量)を決定する階調調整条件決定処理が行われる(ステップT4)。ステップT4の階調調整条件決定処理については、後に図17を参照して詳細に説明する。   Next, the gradation that determines the shooting condition of the captured image data based on the index calculated in step T3 and the determination map, and determines the gradation adjustment condition (gradation adjustment method, gradation adjustment amount) for the captured image data Adjustment condition determination processing is performed (step T4). The gradation adjustment condition determination processing in step T4 will be described in detail later with reference to FIG.

次いで、元の撮影画像データに対し、ステップT4で決定された階調調整条件に従って階調変換処理が施される(ステップT5)。そして、階調変換処理後の撮影画像データに対し、鮮鋭性を調整する処理が施される(ステップT6)。ステップT6では、撮影条件や出力プリントサイズに応じて、処理量を調整することが好ましい。   Next, gradation conversion processing is performed on the original photographed image data in accordance with the gradation adjustment conditions determined in step T4 (step T5). Then, a process for adjusting the sharpness is performed on the captured image data after the gradation conversion process (step T6). In step T6, it is preferable to adjust the processing amount according to the photographing conditions and the output print size.

次いで、階調調整による硬調化や、鮮鋭性の強調により強調されるノイズを除去する処理が行われる(ステップT7)。次いで、撮影画像データを出力するメディアの種類に合わせて色空間を変換する色補正処理が行われ(ステップT8)、指定されたメディアに画像処理後の撮影画像データが出力される。   Next, a process for removing the noise enhanced by the gradation adjustment and the enhancement of sharpness is performed (step T7). Next, color correction processing is performed to convert the color space in accordance with the type of medium that outputs the captured image data (step T8), and the captured image data after image processing is output to the designated medium.

次に、図6のフローチャートを参照して、シーン判別部710において実行される指標算出処理(図5のステップT3)について説明する。以下の指標算出処理において「撮影画像データ」とは、図5のステップT1において縮小された画像データである。   Next, the index calculation process (step T3 in FIG. 5) executed in the scene determination unit 710 will be described with reference to the flowchart in FIG. In the following index calculation processing, “photographed image data” is image data reduced in step T1 in FIG.

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

次いで、偏り算出部722において、撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出処理が行われる(ステップS2)。ステップS2の偏倚量算出処理については、後に図16を参照して詳細に説明する。   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 captured image data is performed (step S2). The bias amount calculation process in step S2 will be described later in detail with reference to FIG.

次いで、割合算出部712において算出された占有率と、撮影条件に応じて予め設定された係数に基づいて、光源条件を特定するための指標が算出される(ステップS3)。また、割合算出部712において算出された占有率と、撮影条件に応じて予め設定された係数に基づいて、露出条件を特定するための指標が算出され(ステップS4)、本指標算出処理が終了する。ステップS3及びS4における指標の算出方法は、後に詳細に説明する。   Next, an index for specifying the light source condition is calculated based on the occupation ratio calculated by the ratio calculation unit 712 and a 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 ends. To do. The index calculation method in steps S3 and S4 will be described in detail later.

次に、図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.

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

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

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

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

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

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

Figure 2006092133
Next, a method for calculating the index 1 and the index 2 will be described.
Table 2 shows 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, for each divided area. The coefficient of each divided area shown in Table 2 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.
Figure 2006092133

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

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

Figure 2006092133
従って、H1〜H4領域の和は、下記の式(2-1)〜式(2-4)のように表される。
H1領域の和=R11×(-44.0)+R21×(-16.0)+(中略)...+R71×(-11.3) (2-1)
H2領域の和=R12×0.0+R22×8.6+(中略)... +R72×(-11.1) (2-2)
H3領域の和=R13×0.0+R23×(-6.3)+(中略)...+R73×(-10.0) (2-3)
H4領域の和=R14×0.0+R24×(-1.8)+(中略)...+R74×(-14.6) (2-4) When the first coefficient in the lightness region vi and the hue region Hj is Cij, the sum of the Hk regions for calculating the index 1 is defined as in Expression (2).
Figure 2006092133
Accordingly, the sum of the H1 to H4 regions is expressed by the following formulas (2-1) to (2-4).
H1 area sum = R11 x (-44.0) + R21 x (-16.0) + (omitted) ... + R71 x (-11.3) (2-1)
Sum of H2 area = R12 x 0.0 + R22 x 8.6 + (omitted) ... + R72 x (-11.1) (2-2)
Sum of H3 area = R13 x 0.0 + R23 x (-6.3) + (omitted) ... + R73 x (-10.0) (2-3)
Sum of H4 area = R14 x 0.0 + R24 x (-1.8) + (omitted) ... + R74 x (-14.6) (2-4)

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

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

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

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

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

Figure 2006092133
従って、H1〜H4領域の和は、下記の式(4-1)〜式(4-4)のように表される。
H1領域の和=R11×(-27.0)+R21×4.5+(中略)...+R71×(-24.0) (4-1)
H2領域の和=R12×0.0+R22×4.7+(中略)... +R72×(-8.5) (4-2)
H3領域の和=R13×0.0+R23×0.0+(中略)...+R73×0.0 (4-3)
H4領域の和=R14×0.0+R24×(-5.1)+(中略)...+R74×7.2 (4-4) When the second coefficient in the lightness area vi and the hue area Hj is Dij, the sum of the Hk areas for calculating the index 2 is defined as in Expression (4).
Figure 2006092133
Therefore, the sum of the H1 to H4 regions is expressed by the following formulas (4-1) to (4-4).
H1 area sum = R11 x (-27.0) + R21 x 4.5 + (omitted) ... + R71 x (-24.0) (4-1)
Sum of H2 area = R12 x 0.0 + R22 x 4.7 + (omitted) ... + R72 x (-8.5) (4-2)
Sum of H3 area = R13 x 0.0 + R23 x 0.0 + (omitted) ... + R73 x 0.0 (4-3)
H4 area sum = R14 x 0.0 + R24 x (-5.1) + (omitted) ... + R74 x 7.2 (4-4)

指標2は、式(4-1)〜(4-4)で示されたH1〜H4領域の和を用いて、式(5)のように定義される。
指標2=H1領域の和+H2領域の和+H3領域の和+H4領域の和+1.554 (5)
指標1及び指標2は、撮影画像データの明度と色相の分布量に基づいて算出されるため、撮影画像データがカラー画像である場合の撮影条件の判別に有効である。
The index 2 is defined as in Expression (5) using the sum of the H1 to H4 regions shown in Expressions (4-1) to (4-4).
Index 2 = sum of H1 area + sum of H2 area + sum of H3 area + sum of H4 area + 1.554 (5)
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.

次に、図13のフローチャートを参照して、指標3を算出するために割合算出部712において実行される第2の占有率算出処理について詳細に説明する。   Next, the second occupancy rate 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.

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

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

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

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

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

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

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

Figure 2006092133
従って、n1〜n4領域の和は、下記の式(6-1)〜式(6-4)のように表される。
n1領域の和=Q11×40.1+Q21×37.0+(中略)...+Q71×22.0 (6-1)
n2領域の和=Q12×(-14.8)+Q22×(-10.5)+(中略)...+Q72×0.0 (6-2)
n3領域の和=Q13×24.6+Q23×12.1+(中略)...+Q73×10.1 (6-3)
n4領域の和=Q14×1.5+Q24×(-32.9)+(中略)...+Q74×(-52.2) (6-4) If the third coefficient in the brightness area vi and the screen area nj is Eij, the sum of the nk area (screen area nk) for calculating the index 3 is defined as in Expression (6).
Figure 2006092133
Accordingly, the sum of the n1 to n4 regions is expressed as the following formulas (6-1) to (6-4).
n1 area sum = Q11 x 40.1 + Q21 x 37.0 + (omitted) ... + Q71 x 22.0 (6-1)
Sum of n2 area = Q12 x (-14.8) + Q22 x (-10.5) + (omitted) ... + Q72 x 0.0 (6-2)
n3 area sum = Q13 x 24.6 + Q23 x 12.1 + (omitted) ... + Q73 x 10.1 (6-3)
n4 area sum = Q14 x 1.5 + Q24 x (-32.9) + (omitted) ... + Q74 x (-52.2) (6-4)

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

次に、図16のフローチャートを参照して、偏り算出部722において実行される偏倚量算出処理(図6のステップS2)について説明する。   Next, a bias amount calculation process (step S2 in FIG. 6) executed in the bias calculation unit 722 will be described with reference to the flowchart in FIG.

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

Figure 2006092133
式(8)において、画素輝度値とは、撮影画像データの各画素の輝度であり、平均輝度値とは、撮影画像データの輝度の平均値である。また、全体画素数とは、撮影画像データ全体の画素数である。 First, the luminance Y (brightness) of each pixel is calculated from the RGB (Red, Green, Blue) values of the photographed image data using Equation (A), and the luminance standard deviation (x1) is calculated (step 1). S23). The standard deviation (x1) of luminance is expressed as shown in Equation (8).
Figure 2006092133
In Expression (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.

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

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

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

撮影画像データの画面中央部における肌色領域の平均輝度値をx6とする。ここでの画面中央部とは、例えば、図14の領域n2、領域n3及び領域n4から構成される領域である。このとき、指標4は、指標1、指標3、x6を用いて式(11)のように定義され、指標5は、指標2、指標3、x6を用いて式(12)のように定義される。
指標4=0.46×指標1+0.61×指標3+0.01×x6−0.79 (11)
指標5=0.58×指標2+0.18×指標3+(-0.03)×x6+3.34 (12)
ここで、式(11)及び式(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 center of the screen is, for example, an area composed of the area n2, the area n3, and the area n4 in FIG. At this time, the index 4 is defined as in Expression (11) using the index 1, index 3, and x6, and the index 5 is defined as in Expression (12) using the index 2, index 3, and x6. The
Index 4 = 0.46 × Index 1 + 0.61 × Index 3 + 0.01 × x6−0.79 (11)
Index 5 = 0.58 x Index 2 + 0.18 x Index 3 + (-0.03) x x6 + 3.34 (12)
Here, the weighting coefficient by which each index is multiplied in Expression (11) and Expression (12) is set in advance according to the shooting conditions.

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

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

次に、図17のフローチャートを参照して、画像処理条件算出部714において実行される階調調整条件決定処理(図5のステップT4)について説明する。   Next, the tone 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.

まず、指標算出部713において算出された指標(指標4〜6)と、撮影条件に応じて予め領域分けされた判別マップに基づいて、撮影画像データの撮影条件が判別される(ステップS30)。以下、撮影条件の判別方法について説明する。   First, the shooting conditions of the captured image data are determined based on the indexes calculated by the index calculation unit 713 (indexes 4 to 6) 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.

図18(a)は、順光、逆光、ストロボの各撮影条件で60枚ずつ撮影し、合計180枚のデジタル画像データについて、指標4及び指標5を算出し、各撮影条件での指標4及び指標5の値をプロットしたものである。図18(b)は、ストロボ、アンダーの各撮影条件で60枚ずつ撮影し、指標4が0.5より大きい画像の指標4及び指標6の値をプロットしたものである。   In FIG. 18A, 60 images are captured under each of the following light, backlight, and strobe shooting conditions, and index 4 and index 5 are calculated for a total of 180 digital image data. The value of index 5 is plotted. FIG. 18B is a graph in which the values of the index 4 and the index 6 of an image in which 60 images are captured under the respective strobe and under imaging conditions and the index 4 is greater than 0.5 are plotted.

判別マップは、指標の信頼度を評価するもので、図19に示すように、順光、逆光、ストロボ、アンダーの各基本領域と、逆光と順光の中間の低確度領域(1)、ストロボとアンダーの中間の低確度領域(2)から構成される。なお、判別マップ上には、逆光とストロボの間の低確度領域等、他の低確度領域も存在するが、本実施形態では省略する。   The discriminant map is for evaluating the reliability of the index. As shown in FIG. 19, the basic areas of the following light, the backlight, the strobe and the under, and the low accuracy area (1) between the backlight and the following light, the strobe It consists of a low accuracy region (2) between the under and under. Note that other low-accuracy regions such as a low-accuracy region between backlight and strobe also exist on the discrimination map, but are omitted in this embodiment.

図18に示した各指標値のプロット図と、図19の判別マップによる撮影条件の判別内容を表7に示す。

Figure 2006092133
このように、指標4及び指標5の値により光源条件を定量的に判別することができ、指標4及び指標6の値により露出条件を定量的に判別することができる。また、指標4及び指標5の値により、順光と逆光の中間の低確度領域(1)を判別でき、指標4及び指標6の値により、ストロボとアンダーの中間の低確度領域(2)を判別することができる。 Table 7 shows the plots of the index values shown in FIG. 18 and the shooting conditions determined by the determination map of FIG.
Figure 2006092133
Thus, the light source condition can be determined quantitatively based on the values of the index 4 and the index 5, and the exposure condition can be determined quantitatively based on the values of the index 4 and the index 6. Further, the low accuracy region (1) between the forward light and the backlight can be discriminated by the values of the index 4 and the index 5, and the low accuracy region (2) between the strobe and the under can be determined by the values of the index 4 and the index 6. Can be determined.

撮影条件が判別されると、その判別された撮影条件に応じて、撮影画像データに対する階調調整の方法が決定される(ステップS31)。図20に示すように、撮影条件が順光又はストロボである場合は階調調整方法A(図21(a))が選択され、逆光又はアンダーである場合は階調調整方法B(図21(b))が選択される。また、撮影条件が逆光と順光の中間又はストロボとアンダーの中間である場合(即ち、判別マップ上の低確度領域である場合)は階調調整方法C(図21(c))が選択される。   When the shooting condition is determined, a gradation adjustment method for the shot image data is determined according to the determined shooting condition (step S31). As shown in FIG. 20, the gradation adjustment method A (FIG. 21 (a)) is selected when the photographing condition is normal light or strobe light, and the gradation adjustment method B (FIG. b)) is selected. In addition, when the shooting condition is intermediate between backlight and direct light or intermediate between strobe and under (that is, a low accuracy region on the discrimination map), the gradation adjustment method C (FIG. 21C) is selected. The

このように、撮影条件が順光である場合は、補正量が比較的少ないため、撮影画像データの画素値を平行移動(オフセット)補正する階調調整方法Aを適用することが、ガンマ変動を抑制できる観点から好ましい。また、撮影条件が逆光又はアンダーである場合は、補正量が比較的多いため、階調調整方法Aを適用すると、画像データの存在しない階調が著しく増大し、黒色の白濁化や、白色の明度の低下を招くことになる。従って、撮影条件が逆光又はアンダーである場合は、撮影画像データの画素値をガンマ補正する階調調整方法Bを適用するのが好ましい。また、判別マップ上で低確度領域にある撮影条件の場合、どの低確度領域も、隣接する一方の撮影条件に対する階調調整方法がA又はBとなるため、双方の階調調整方法を混合した階調調整方法Cを適用するのが好ましい。このように低確度領域を設定することにより、異なる階調調整方法を用いた場合でも、処理結果をスムーズに移行させることができる。また、同じ被写体を撮影した複数の写真プリント間での、濃度のばらつきを軽減することができる。なお、図21(b)に示した階調変換曲線は上向きに凸となっているが、下向きに凸の場合もある。また、図21(c)に示した階調変換曲線は下向きに凸となっているが、上向きに凸の場合もある。   Thus, since the correction amount is relatively small when the shooting condition is direct light, applying the gradation adjustment method A that translates (offsets) the pixel value of the captured image data can reduce the gamma variation. It is preferable from the viewpoint of suppression. In addition, when the shooting condition is backlight or under, the correction amount is relatively large. Therefore, when the gradation adjustment method A is applied, the gradation where the image data does not exist is remarkably increased. The brightness will be reduced. 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 region on the discrimination map, the tone adjustment method for one of the adjacent shooting conditions is A or B in any low accuracy region, so both tone adjustment methods are mixed. It is preferable to apply the gradation adjustment method C. 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 among a plurality of photographic prints taken of the same subject. Note that the tone conversion curve shown in FIG. 21B is convex upward, but may be convex downward. Further, the gradation conversion curve shown in FIG. 21C is convex downward, but may be convex upward.

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

階調調整に必要なパラメータ(階調調整パラメータ)として、下記のP1〜P10のパラメータが算出される。
P1:撮影画面全体の平均輝度
P2:ブロック分割平均輝度
P3:肌色領域(H1)の平均輝度
P4:輝度補正値1=P1−P2
P5:再現目標修正値=輝度再現目標値(30360)−P4
P6:オフセット値1=P5−P1
P7:キー補正値
P7':キー補正値2
P8:輝度補正値2
P9:オフセット値2=P5−P8−P1
P10:オフセット値3
As parameters necessary for gradation adjustment (gradation adjustment parameters), the following parameters P1 to P10 are calculated.
P1: Average brightness of the entire shooting screen
P2: Block division average brightness
P3: Average brightness of skin tone area (H1)
P4: Brightness correction value 1 = P1-P2
P5: Reproduction target correction value = Brightness reproduction target value (30360)-P4
P6: Offset value 1 = P5-P1
P7: Key correction value
P7 ': Key correction value 2
P8: Brightness correction value 2
P9: Offset value 2 = P5-P8-P1
P10: Offset value 3

ここで、図22及び図23を参照して、パラメータP2の算出方法について説明する。
まず、撮影画像データを正規化するために、CDF(累積密度関数)を作成する。次いで、得られたCDFから最大値と最小値を決定する。この最大値と最小値は、RGB毎に求める。ここで、求められたRGB毎の最大値と最小値を、それぞれ、Rmax、Rmin、Gmax、Gmin、Bmax、Bminとする。
Here, the calculation method of the parameter P2 will be described with reference to FIGS.
First, a CDF (cumulative density function) is created in order to normalize captured image data. Next, the maximum value and the minimum value are determined from the obtained CDF. The maximum value and the minimum value are obtained for each RGB. Here, the maximum value and the minimum value obtained for each RGB are Rmax, Rmin, Gmax, Gmin, Bmax, and Bmin, respectively.

次いで、撮影画像データの任意の画素(Rx,Gx,Bx)に対する正規化画像データを算出する。RプレーンにおけるRxの正規化データをRpoint、GプレーンにおけるGxの正規化データをGpoint、BプレーンにおけるBxの正規化データをBpointとすると、正規化データRpoint、Gpoint、Bpointは、それぞれ、式(14)〜式(16)のように表される。
point={(Rx−Rmin)/(Rmax−Rmin)}×65535 (14)
point={(Gx−Gmin)/(Gmax−Gmin)}×65535 (15)
point={(Bx−Bmin)/(Bmax−Bmin)}×65535 (16)
次いで、式(17)により画素(Rx,Gx,Bx)の輝度Npointを算出する。
point=(Bpoint+Gpoint+Rpoint)/3 (17)
Next, normalized image data for any pixel (Rx, Gx, Bx) of the captured image data is calculated. When Rx normalization data in the R plane is R point , Gx normalization data in the G plane is G point , and Bx normalization data in the B plane is B point , the normalization data R point , G point , and B point are , Respectively, are expressed as in Expression (14) to Expression (16).
R point = {(Rx−Rmin) / (Rmax−Rmin)} × 65535 (14)
G point = {(Gx−Gmin) / (Gmax−Gmin)} × 65535 (15)
B point = {(Bx−Bmin) / (Bmax−Bmin)} × 65535 (16)
Next, the luminance N point of the pixel (Rx, Gx, Bx) is calculated by Expression (17).
N point = (B point + G point + R point ) / 3 (17)

図22(a)は、正規化する前のRGB画素の輝度の度数分布(ヒストグラム)である。図22(a)において、横軸は輝度、縦軸は画素の頻度である。このヒストグラムは、RGB毎に作成する。輝度のヒストグラムが作成されると、式(14)〜(16)により、撮影画像データに対し、プレーン毎に正規化を行う。図22(b)は、式(17)により算出された輝度のヒストグラムを示す。撮影画像データが65535で正規化されているため、各画素は、最大値が65535で最小値が0の間で任意の値をとる。   FIG. 22A shows a frequency distribution (histogram) of luminance of RGB pixels before normalization. In FIG. 22A, the horizontal axis represents luminance, and the vertical axis represents pixel frequency. This histogram is created for each RGB. When the luminance histogram is created, normalization is performed for each plane with respect to the captured image data according to equations (14) to (16). FIG. 22B shows a histogram of luminance calculated by the equation (17). Since the captured image data is normalized by 65535, each pixel takes an arbitrary value between the maximum value 65535 and the minimum value 0.

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

次いで、図22(c)に示された輝度ヒストグラムから、ハイライト、シャドー領域を削除する処理を行う。これは、白壁や雪上シーンでは、平均輝度が非常に高くなり、暗闇のシーンでは平均輝度は非常に低くなっているため、ハイライト、シャドー領域は、平均輝度制御に悪影響を与えてしまうことによる。そこで、図22(c)に示した輝度ヒストグラムのハイライト領域、シャドー領域を制限することによって、両領域の影響を減少させる。図23(a)(又は図22(c))に示す輝度ヒストグラムにおいて、高輝度領域(ハイライト領域)及び低輝度領域(シャドー領域)を削除すると、図23(b)のようになる。   Next, a process of deleting highlight and shadow areas is performed from the luminance histogram shown in FIG. This is because the average brightness is very high in white walls and snow scenes, and the average brightness is very low in dark scenes, so highlights and shadow areas adversely affect average brightness control. . Therefore, by limiting the highlight area and shadow area of the luminance histogram shown in FIG. 22C, the influence of both areas is reduced. If the high luminance region (highlight region) and the low luminance region (shadow region) are deleted from the luminance histogram shown in FIG. 23A (or FIG. 22C), the result is as shown in FIG.

次いで、図23(c)に示すように、輝度ヒストグラムにおいて、頻度が所定の閾値より大きい領域を削除する。これは、頻度が極端に多い部分が存在すると、この部分のデータが、撮影画像全体の平均輝度に強く影響を与えてしまうため、誤補正が生じやすいことによる。そこで、図23(c)に示すように、輝度ヒストグラムにおいて、閾値以上の画素数を制限する。図23(d)は、画素数の制限処理を行った後の輝度ヒストグラムである。   Next, as shown in FIG. 23C, in the luminance histogram, an area whose frequency is larger than a predetermined threshold is deleted. This is because if there is a part having an extremely high frequency, the data in this part strongly affects the average luminance of the entire captured image, and thus erroneous correction is likely to occur. Therefore, as shown in FIG. 23C, the number of pixels equal to or greater than the threshold is limited in the luminance histogram. FIG. 23D is a luminance histogram after the pixel number limiting process is performed.

正規化された輝度ヒストグラムから、高輝度領域及び低輝度領域を削除し、更に、累積画素数を制限することによって得られた輝度ヒストグラム(図23(d))の各ブロック番号と、それぞれの頻度に基づいて、輝度の平均値を算出したものがパラメータP2である。   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, and the respective frequencies The parameter P2 is obtained by calculating the average luminance based on the above.

パラメータP1は、撮影画像データ全体の輝度の平均値であり、パラメータP3は、撮影画像データのうち肌色領域(H1)の輝度の平均値である。パラメータP7のキー補正値、パラメータP7'のキー補正値2、パラメータP8の輝度補正値2は、それぞれ、式(18)、式(19)、式(20)のように定義される。
P7(キー補正値)=[P3 −((指標5 / 6)×18000)+22000)]/24.78 (18)
P7'(キー補正値2)=[P3−((指標6/ 6)×10000+30000)]/24.78 (19)
P8(輝度補正値2)=(指標4 / 6)×17500 (20)
The parameter 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 area (H1) in the captured image data. The key correction value of the parameter P7, the key correction value 2 of the parameter P7 ′, and the luminance correction value 2 of the parameter P8 are defined as Expression (18), Expression (19), and Expression (20), respectively.
P7 (key correction value) = [P3-((index 5/6) x 18000) + 22000)] / 24.78 (18)
P7 '(key correction value 2) = [P3-((index 6/6) x 10000 + 30000)] / 24.78 (19)
P8 (Luminance correction value 2) = (Indicator 4/6) x 17500 (20)

パラメータP10のオフセット値3は、判別マップ上で低確度領域(1)又は(2)に対応する撮影条件の場合の階調調整パラメータである。以下、パラメータP10の算出方法について説明する。   The offset value 3 of the parameter 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. Hereinafter, a method for calculating the parameter P10 will be described.

まず、該当する低確度領域内の指標のうち、基準となる指標が決定される。例えば、低確度領域(1)であれば、基準指標として指標5が決定され、低確度領域(2)であれば、基準指標として指標6が決定される。そして、その基準指標の値を0〜1の範囲で正規化することによって、当該基準指標が正規化指標へ変換される。正規化指標は、式(21)のように定義される。
正規化指標=(基準指標−指標最小値)/(指標最大値−指標最小値) (21)
式(21)において、指標最大値、指標最小値は、それぞれ、該当する低確度領域内の基準指標の最大値、最小値である。
First, a reference index is determined among the indexes in the corresponding low-accuracy region. 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. The normalization index is defined as in Expression (21).
Normalized index = (reference index−index minimum value) / (index maximum value−index minimum value) (21)
In Expression (21), the index maximum value and the index minimum value are the maximum value and the minimum value of the reference index in the corresponding low accuracy region, respectively.

該当する低確度領域と、当該低確度領域に隣接する2つの領域との境界における補正量をそれぞれα、βとする。この補正量α、βは、判別マップ上の各領域の境界において定義された再現目標値を用いて予め算出された固定値である。パラメータP10は、式(21)の正規化指標と、補正量α、βを用いて式(22)のように表される。
P10 =(β−α)×正規化指標+α (22)
なお、本実施形態では、正規化指標と補正量との相関を1次の線形関係としたが、補正量をさらに緩やかに移行させるべく、曲線関係としてもよい。
The correction amounts at the boundary between the corresponding low-accuracy region and two regions adjacent to the low-accuracy region are α and β, respectively. The correction amounts α and β are fixed values calculated in advance using a reproduction target value defined at the boundary of each region on the discrimination map. The parameter P10 is expressed as in Expression (22) using the normalized index of Expression (21) and the correction amounts α and β.
P10 = (β−α) × normalization index + α (22)
In this embodiment, the correlation between the normalization index and the correction amount is a linear relationship, but a curve relationship may be used so that the correction amount can be shifted more gently.

階調調整パラメータが算出されると、その算出された階調調整パラメータに基づいて、撮影画像データに対する階調調整量が決定され(ステップS33)、本階調調整条件決定処理が終了する。ステップS33では、具体的に、ステップS31において決定された階調調整方法に対応して予め設定された複数の階調変換曲線の中から、ステップS32において算出された階調調整パラメータに対応する階調変換曲線が選択(決定)される。なお、ステップS32において算出された階調調整パラメータに基づいて、階調変換曲線(階調調整量)を算出するようにしてもよい。階調変換曲線が決定されると、その決定された階調変換曲線に従って撮影画像データが階調変換される。   When the gradation adjustment parameter is calculated, the gradation adjustment amount for the captured image data is determined based on the calculated gradation adjustment parameter (step S33), and the gradation adjustment condition determination process ends. In step S33, specifically, the step corresponding to the gradation adjustment parameter calculated in step S32 is selected from a plurality of gradation conversion curves set in advance corresponding to the gradation adjustment method determined in step S31. A key conversion curve 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.

以下、各撮影条件の階調変換曲線の決定方法について説明する。
<順光の場合>
撮影条件が順光である場合、パラメータP1をP5と一致させるオフセット補正(8bit値の平行シフト)を下記の式(23)により行う。
出力画像のRGB値=入力画像のRGB値+P6 (23)
従って、撮影条件が順光の場合、図21(a)に示す複数の階調変換曲線の中から、式(23)に対応する階調変換曲線が選択される。又は、式(23)に基づいて階調変換曲線を算出(決定)してもよい。
Hereinafter, a method for determining a gradation conversion curve for each shooting condition will be described.
<For direct light>
When the photographing condition is direct light, offset correction (parallel shift of 8-bit value) for matching the parameter P1 with P5 is performed by the following equation (23).
RGB value of output image = RGB value of input image + P6 (23)
Therefore, when the shooting condition is normal light, a gradation conversion curve corresponding to Expression (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).

<逆光の場合>
撮影条件が逆光である場合、図21(b)に示す複数の階調変換曲線の中から、式(18)に示すパラメータP7(キー補正値)に対応する階調変換曲線を選択する。図21(b)の階調変換曲線の具体例を図24に示す。パラメータP7の値と、選択される階調変換曲線の対応関係を以下に示す。
−50 < P7 < +50 の場合→L3
+50 ≦ P7 < +150 の場合→L4
+150 ≦ P7 < +250 の場合→L5
−150 < P7 ≦ −50 の場合→L2
−250 < P7 ≦ −150 の場合→L1
なお、撮影条件が逆光の場合、この階調変換処理とともに、覆い焼き処理を併せて行うことが好ましい。この場合、逆光度を示す指標5に応じて覆い焼き処理の程度も調整されることが望ましい。
<In the case of backlight>
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. A specific example of the gradation conversion curve of FIG. 21B is shown in FIG. The correspondence between the value of parameter P7 and the selected gradation conversion curve is shown below.
When -50 <P7 <+50 → L3
When +50 ≤ P7 <+150 → L4
When +150 ≤ P7 <+250 → L5
When -150 <P7 ≤ -50 → L2
When -250 <P7 ≤ -150 → L1
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 dodging process according to the index 5 indicating the backlight intensity.

<アンダーの場合>
撮影条件がアンダーである場合、逆光の場合と同様に、図21(b)に示す複数の階調変換曲線の中から、式(19)に示すパラメータP7'(キー補正値2)に対応する階調変換曲線が選択される。パラメータP7'の値と、図24において選択される階調変換曲線との対応関係を以下に示す。
−50 < P7'< +50 の場合→L3
+50 ≦ P7'< +150 の場合→L4
+150 ≦ P7'< +250 の場合→L5
−150 < P7'≦ −50 の場合→L2
−250 < P7'≦ −150 の場合→L1
なお、撮影条件がアンダーである場合は、逆光の場合に示したような覆い焼き処理は行わない。
<In case of under>
When the shooting condition is under, corresponding to the parameter P7 ′ (key correction value 2) shown in Expression (19) from among the plurality of gradation conversion curves shown in FIG. A tone conversion curve is selected. The correspondence between the value of the parameter P7 ′ and the gradation conversion curve selected in FIG. 24 is shown below.
When -50 <P7 '<+50 → L3
When +50 ≤ P7 '<+150 → L4
When +150 ≤ P7 '<+250 → L5
If -150 <P7 '≤ -50 → L2
-250 <P7 '≤ -150 → L1
When the shooting condition is under, dodging processing as shown in the case of backlight is not performed.

<ストロボの場合>
撮影条件がストロボである場合、オフセット補正(8bit値の平行シフト)を式(24)により行う。
出力画像のRGB値=入力画像のRGB値+P9 (24)
従って、撮影条件がストロボの場合、図21(a)に示す複数の階調変換曲線の中から、式(24)に対応する階調変換曲線が選択される。又は、式(24)に基づいて階調変換曲線を算出(決定)してもよい。
<In the case of strobe>
When the shooting condition is a strobe, offset correction (parallel shift of 8-bit value) is performed by Expression (24).
RGB value of output image = RGB value of input image + P9 (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, the gradation conversion curve may be calculated (determined) based on Expression (24).

<低確度領域の撮影条件の場合>
低確度領域の撮影条件である場合、オフセット補正(8bit値の平行シフト)を式(25)により行う。
出力画像のRGB値=入力画像のRGB値+P10 (25)
従って、低確度領域の場合、図21(c)に示す複数の階調変換曲線の中から、式(25)に対応する階調変換曲線が選択される。又は、式(25)に基づいて階調変換曲線を算出(決定)するようにしてもよい。
<In the case of shooting conditions in the low accuracy area>
When the shooting condition is a low-accuracy region, offset correction (parallel shift of 8-bit value) is performed by Expression (25).
RGB value of output image = RGB value of input image + P10 (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, the gradation conversion curve may be calculated (determined) based on Expression (25).

なお、本実施形態では、実際に撮影画像データに対して階調変換処理を施す場合、上述の各階調調整条件を16bitから8bitへ変更するものとする。   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.

以上のように、本実施形態の画像処理装置1によれば、撮影画像データの撮影条件を定量的に示す指標を算出し、その算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて撮影条件を判別し、判別結果に応じて撮影画像データに対する階調調整の方法を決定し、撮影画像データの階調調整量(階調変換曲線)を決定することにより、被写体の明度を適切に補正することが可能となる。特に、判別マップに基づいて撮影条件を判別することにより、判別結果の信頼度が高くなり、撮影条件に応じた適切な階調変換を行うことが可能になる。   As described above, according to the image processing apparatus 1 of the present embodiment, the index that quantitatively indicates the shooting condition of the captured image data is calculated, and the area is divided in advance according to the calculated index and the accuracy of the shooting condition. By determining the shooting conditions based on the determined determination map, determining the gradation adjustment method for the captured image data according to the determination result, and determining the gradation adjustment amount (gradation conversion curve) of the captured image data 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.

また、ストロボ撮影としての確度を定量的に示す指標1と、逆光撮影としての確度を定量的に示す指標2に加えて、撮影画像データの構図的な要素から導出される指標3を用いて撮影条件を判別することにより、撮影条件の判別精度を向上させることができる。また、撮影画像データの構図的な要素とヒストグラムの分布情報から算出される指標6を用いることで、ストロボ撮影のシーンと、アンダー撮影のシーンとを判別でき、撮影条件の判別精度を一層向上させることができる。   Further, in addition to the index 1 that quantitatively indicates the accuracy as strobe shooting and the index 2 that quantitatively indicates the accuracy as backlight shooting, the shooting is performed using the index 3 derived from the compositional elements of the captured image data. By determining the conditions, it is possible to improve the accuracy of determining the imaging conditions. Further, by using the index 6 calculated from the compositional elements of the photographed image data and the distribution information of the histogram, it is possible to discriminate between the stroboscopic scene and the under-photographed scene, thereby further improving the photographic condition discrimination accuracy. be able to.

〈撮像装置に適用した例〉
上述の実施形態で示した画像処理方法は、デジタルカメラ等の撮像装置にも適用可能である。図25に、本発明の撮像装置を適用したデジタルカメラ200の構成を示す。デジタルカメラ200は、図25に示すように、CPU201、光学系202、撮像センサ部203、AF演算部204、WB演算部205、AE演算部206、レンズ制御部207、画像処理部208、表示部209、記録データ作成部210、記録メディア211、シーンモード設定キー212、色空間設定キー213、レリーズボタン214、その他操作キー215により構成される。
<Examples applied to imaging devices>
The image processing method shown in the above embodiment can be applied to an imaging apparatus such as a digital camera. FIG. 25 shows a configuration of a digital camera 200 to which the imaging apparatus of the present invention is applied. As shown in FIG. 25, the digital camera 200 includes a CPU 201, an optical system 202, an imaging sensor unit 203, an AF calculation unit 204, a WB calculation unit 205, an AE calculation unit 206, a lens control unit 207, an image processing unit 208, and a display unit. 209, a recording data creation unit 210, a recording medium 211, a scene mode setting key 212, a color space setting key 213, a release button 214, and other operation keys 215.

CPU201は、デジタルカメラ200の動作を統括的に制御する。光学系202は、ズームレンズであり、被写体像を撮像センサ部203にあるCCD(Charge-Coupled Device)イメージセンサ上に結像させる。撮像センサ部203は、光学像をCCDイメージセンサによって光電変換し、デジタル信号に変換(A/D変換)して出力する。撮像センサ部203から出力された画像データは、AF演算部204、WB演算部205、AE演算部206、画像処理部208に入力される。   The CPU 201 controls the overall operation of the digital camera 200. The optical system 202 is a zoom lens, and forms a subject image on a CCD (Charge-Coupled Device) image sensor in the image sensor unit 203. The imaging sensor unit 203 photoelectrically converts an optical image by a CCD image sensor, converts it into a digital signal (A / D 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.

AF演算部204は、画面内9ヶ所に設けられたAFエリアの距離を算出して出力する。距離の判定は、画像のコントラスト判定により行われ、CPU201は、この中の最も近距離にある値を選択し、被写体距離とする。WB演算部205は、画像のホワイトバランス評価値を算出して出力する。ホワイトバランス評価値とは、撮影時の光源下で、ニュートラルな被写体のRGB出力値を一致させるために必要なゲイン値で、Gチャネルを基準としてR/G、B/Gの比として算出する。算出された評価値は、画像処理部208に入力され、画像のホワイトバランスが調整される。AE演算部206は、画像データから適正露出値を算出して出力し、CPU201は、算出された適正露出値と現在の露出値が一致するような絞り値とシャッター速度値を算出する。絞り値は、レンズ制御部207に出力され、対応する絞り径が設定される。シャッター速度値は、撮像センサ部203に出力され、対応するCCD積分時間が設定される。   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 shortest 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 necessary for matching the RGB output values of a neutral subject under the light source at the time of photographing, and is calculated as a ratio of R / G and B / G 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 from 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.

画像処理部208は、撮影画像データに対して、ホワイトバランス処理、CCDフィルター配列の補間処理、色変換、1次階調変換、シャープネス補正等の処理を行った後に、上述の実施形態と同様に、撮影条件を特定するための指標(指標1〜6)を算出し、その算出された指標に基づいて撮影条件を判別し、判別結果に基づいて決定された階調変換処理を行うことによって好ましい画像に変換する。その後JPEG圧縮等の変換を実行する。JPEG圧縮された画像データは、表示部209と記録データ作成部210に出力される。   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, similarly to the above-described embodiment. It is preferable to calculate an index (index 1 to 6) for specifying the shooting condition, determine the shooting condition based on the calculated index, and perform the gradation conversion process determined based on the determination result. Convert to image. Thereafter, conversion such as JPEG compression is executed. The JPEG-compressed image data is output to the display unit 209 and the recording data creation unit 210.

表示部209は、撮影画像データを液晶ディスプレイに表示するとともに、CPU201の指示による各種情報を表示する。記録データ作成部210は、JPEG圧縮された画像データと、CPU201から入力された各種撮影画像データをExif(Exchangeable Image File Format)ファイルにフォーマットし、記録メディア211に記録する。記録メディア211の中には、各メーカーが自由な情報を書き込めるスペースとして、メーカーノートと呼ばれる部分があり、撮影条件の判別結果や指標4、指標5及び指標6を記録するようにしてもよい。   The display unit 209 displays captured image data on a liquid crystal display and various information according to instructions from the CPU 201. The recording data creation unit 210 formats the JPEG-compressed image data and various captured image data input from the CPU 201 into an Exif (Exchangeable Image File Format) file, and records it in the recording medium 211. In the recording medium 211, there is a part called a maker note as a space where each maker can write free information, and the determination result of the photographing condition and the index 4, the index 5 and the index 6 may be recorded.

デジタルカメラ200では、ユーザ設定により撮影シーンモードを切り替えることができる。即ち、撮影シーンモードとして、通常モード、ポートレートモード、風景モードシーンの3つが選択可能で、ユーザは、シーンモード設定キー212を操作して、被写体が人物である場合はポートレートモード、風景の場合は風景モードに切り替えることによって、被写体に適した1次階調変換を実施する。また、デジタルカメラ200は、選択した撮影シーンモードの情報を画像データファイルのメーカーノート部分に付加して記録する。また、デジタルカメラ200は、被写体として選択したAFエリアの位置情報を同様に画像ファイルに記録する。   In the digital camera 200, the shooting scene mode can be switched by a user setting. In other words, three modes, a normal mode, a portrait mode, and a landscape mode scene, can be selected as the shooting scene mode. The user operates the scene mode setting key 212, and when the subject is a person, the portrait mode and the landscape mode are selected. In this case, the primary gradation conversion suitable for the subject is performed by switching to the landscape mode. In addition, the digital camera 200 adds and records information on the selected shooting scene mode to the maker note portion of the image data file. In addition, the digital camera 200 similarly records the position information of the AF area selected as the subject in the image file.

なお、デジタルカメラ200では、色空間設定キー213によって、出力色空間のユーザ設定が可能になっている。出力色空間としては、sRGB(IEC61966-2-1)とRawの選択が可能である。sRGBが選択された場合は、本実施形態における画像処理を実行するが、Rawが選択された場合は、本実施形態の画像処理は行わず、CCD固有の色空間で出力する。   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-1) and Raw can be selected. When sRGB is selected, image processing according to the present embodiment is executed. When Raw is selected, image processing according to the present embodiment is not performed, and output is performed in a color space unique to the CCD.

以上のように、本発明の撮像装置を適用したデジタルカメラ200によれば、上述の画像処理装置1と同様に、撮影画像データの撮影条件を定量的に示す指標を算出し、その算出された指標に基づいて撮影条件を判別し、判別結果に応じて撮影画像データに対する階調調整の方法を決定し、撮影画像データの階調調整量(階調変換曲線)を決定することにより、被写体の明度を適切に補正することが可能となる。このように、デジタルカメラ200の内部で、撮影条件に応じた適切な階調変換処理が行われることにより、デジタルカメラ200とプリンタがパーソナルコンピュータを介さずに直接接続されている場合であっても、好ましい画像を出力することができる。   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 calculated The shooting condition is determined based on the 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. It becomes possible to correct the brightness appropriately. As described above, even when the digital camera 200 and the printer are directly connected without going through a personal computer by performing appropriate gradation conversion processing according to the shooting conditions inside the digital camera 200. A preferable image can be output.

なお、本実施形態における記述内容は、本発明の趣旨を逸脱しない範囲で適宜変更可能である。   Note that the description in the present embodiment can be changed as appropriate without departing from the spirit of the present invention.

例えば、撮影画像データから顔画像を検出し、検出された顔画像に基づいて撮影条件を判別し、階調調整条件を決定するようにしてもよい。また、撮影条件の判別に、Exif情報を用いるようにしてもよい。Exif情報を用いると、撮影条件の判別精度を更に向上させることが可能となる。   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. Further, Exif information may be used to determine the shooting condition. By using Exif information, it is possible to further improve the accuracy of determining the shooting conditions.

本発明の実施形態における画像処理装置の外観構成を示す斜視図。1 is a perspective view showing an external configuration of an image processing apparatus according to an embodiment of the present invention. 本実施形態の画像処理装置の内部構成を示すブロック図。1 is a block diagram showing an internal configuration of an image processing apparatus according to an embodiment. 図2の画像処理部の主要部構成を示すブロック図。The block diagram which shows the principal part structure of the image processing part of FIG. シーン判別部の内部構成(a)と、割合算出部の内部構成(b)と、画像処理条件算出部の内部構成(c)を示す図。The figure which shows the internal structure (a) of a scene discrimination | determination part, the internal structure (b) of a ratio calculation part, and the internal structure (c) of an image processing condition calculation part. 画像調整処理部において実行される処理の流れを示すフローチャート。5 is a flowchart showing a flow of processing executed in an image adjustment processing unit. シーン判別部において実行される指標算出処理を示すフローチャート。The flowchart which shows the parameter | index calculation process performed in a scene discrimination | determination part. 明度・色相の領域毎に第1の占有率を算出する第1の占有率算出処理を示すフローチャート。The flowchart which shows the 1st occupation rate calculation process which calculates the 1st occupation rate for every area | region of lightness and hue. RGBからHSV表色系に変換するプログラムの一例を示す図。The figure which shows an example of the program which converts from RGB to HSV color system. 明度(V)−色相(H)平面と、V−H平面上の領域r1及び領域r2を示す図。The figure which shows the brightness | luminance (V) -hue (H) plane, and the area | region r1 and the area | region r2 on a VH plane. 明度(V)−色相(H)平面と、V−H平面上の領域r3及び領域r4を示す図。The figure which shows the brightness | luminance (V) -hue (H) plane, and the area | region r3 and the area | region r4 on a VH plane. 指標1を算出するための、第1の占有率に乗算する第1の係数を表す曲線を示す図。The figure which shows the curve showing the 1st coefficient by which the 1st occupation rate for calculating the parameter | index 1 is multiplied. 指標2を算出するための、第1の占有率に乗算する第2の係数を表す曲線を示す図。The figure which shows the curve showing the 2nd coefficient by which the 1st occupation rate for calculating the parameter | index 2 is multiplied. 撮影画像データの構図に基づいて第2の占有率を算出する第2の占有率算出処理を示すフローチャート。The flowchart which shows the 2nd occupation rate calculation process which calculates a 2nd occupation rate based on the composition of picked-up image data. 撮影画像データの画面の外縁からの距離に応じて決定される領域n1〜n4を示す図。The figure which shows the area | regions n1-n4 determined according to the distance from the outer edge of the screen of picked-up image data. 指標3を算出するための、第2の占有率に乗算する第3の係数を表す曲線を領域別(n1〜n4)に示す図。The figure which shows the curve showing the 3rd coefficient for multiplying the 2nd occupation rate for calculating the parameter | index 3 according to area | region (n1-n4). 偏り算出部において実行される偏倚量算出処理を示すフローチャート。The flowchart which shows the deviation amount calculation process performed in a deviation calculation part. 画像処理条件算出部において実行される階調調整条件決定処理を示すフローチャート。6 is a flowchart illustrating tone adjustment condition determination processing executed in an image processing condition calculation unit. 撮影条件別に算出された指標4〜6のプロット図。The plot figure of the parameter | index 4-6 calculated according to imaging | photography conditions. 撮影条件を判別するための判別マップを示す図。The figure which shows the discrimination | determination map for discriminating imaging conditions. 撮影条件を特定するための指標、パラメータA〜C、階調調整方法A〜Cの関係を示す図。The figure which shows the relationship between the parameter | index for specifying imaging | photography conditions, parameters AC, and gradation adjustment methods AC. 各階調調整方法に対応する階調変換曲線を示す図。The figure which shows the gradation conversion curve corresponding to each gradation adjustment method. 輝度の度数分布(ヒストグラム)(a)、正規化されたヒストグラム(b)及びブロック分割されたヒストグラム(c)を示す図。The figure which shows the frequency distribution (histogram) (a) of brightness | luminance, the normalized histogram (b), and the block-divided histogram (c). 輝度のヒストグラムからの低輝度領域及び高輝度領域の削除を説明する図((a)及び(b))と、輝度の頻度の制限を説明する図((c)及び(d))。The figure ((a) and (b)) explaining deletion of the low-intensity area | region and the high-intensity area | region from the brightness | luminance histogram, and the figure ((c) and (d)) explaining the restriction | limiting of the frequency of a brightness | luminance. 撮影条件が逆光又はアンダーである場合の階調調整条件を表す階調変換曲線を示す図。The figure which shows the gradation conversion curve showing the gradation adjustment conditions in case imaging | photography conditions are backlight or under. 本発明の撮像装置を適用したデジタルカメラの構成を示すブロック図。1 is a block diagram illustrating a configuration of a digital camera to which an imaging apparatus of the present invention is applied.

符号の説明Explanation of symbols

1 画像処理装置
2 筐体
3 マガジン装填部
4 露光処理部
5 プリント作成部
7 制御部
8 CRT
9 フィルムスキャナ部
10 反射原稿入力装置
11 操作部
12 情報入力手段
14 画像読込部
15 画像書込部
30 画像転送手段
31 画像搬送部
32 通信手段(入力)
33 通信手段(出力)
51 外部プリンタ
70 画像処理部
72 テンプレート記憶手段
701 画像調整処理部
702 フィルムスキャンデータ処理部
703 反射原稿スキャンデータ処理部
704 画像データ書式解読処理部
705 テンプレート処理部
706 CRT固有処理部
707 プリント固有処理部A
708 プリント固有処理部B
709 画像データ書式作成処理部
710 シーン判別部
711 階調変換部
712 割合算出部
713 指標算出部
714 画像処理条件算出部
715 表色系変換部
716 ヒストグラム作成部
717 占有率演算部
718 シーン判別部
719 階調調整方法決定部
720 階調調整パラメータ算出部
721 階調調整量算出部
722 偏り算出部
200 デジタルカメラ(撮像装置)
208 画像処理部
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Case 3 Magazine loading part 4 Exposure processing part 5 Print preparation part 7 Control part 8 CRT
DESCRIPTION OF SYMBOLS 9 Film scanner part 10 Reflected original input device 11 Operation part 12 Information input means 14 Image reading part 15 Image writing part 30 Image transfer means 31 Image conveying part 32 Communication means (input)
33 Communication means (output)
51 External Printer 70 Image Processing Unit 72 Template Storage Unit 701 Image Adjustment Processing Unit 702 Film Scan Data Processing Unit 703 Reflected Original Scan Data Processing Unit 704 Image Data Format Decoding Processing Unit 705 Template Processing Unit 706 CRT Specific Processing Unit 707 Print Specific Processing Unit A
708 Print unique processing section B
709 Image data format creation processing unit 710 Scene determination unit 711 Gradation conversion unit 712 Ratio calculation unit 713 Index calculation unit 714 Image processing condition calculation unit 715 Color system conversion unit 716 Histogram creation unit 717 Occupancy calculation unit 718 Scene determination unit 719 Gradation adjustment method determination unit 720 Gradation adjustment parameter calculation unit 721 Gradation adjustment amount calculation unit 722 Bias calculation unit 200 Digital camera (imaging device)
208 Image processing unit

Claims (96)

撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換工程と、
を含むことを特徴とする画像処理方法。
Occupancy rate calculating step of dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and calculating an occupancy ratio indicating the proportion of the entire captured image data for each of the divided regions;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method;
An image processing method comprising:
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定工程と、
前記調整方法決定工程において決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定工程において決定された階調調整量の階調変換処理を施す階調変換工程と、
を含むことを特徴とする画像処理方法。
Occupancy rate calculating step of dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and calculating an occupancy ratio indicating the proportion of the entire captured image data for each of the divided regions;
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
An adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion step of performing gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step on the captured image data using the gradation adjustment method determined in the adjustment method determination step;
An image processing method comprising:
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換工程と、
を含むことを特徴とする画像処理方法。
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating the ratio of the entire photographed image data for each of the divided areas. An occupancy calculation step to calculate,
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method;
An image processing method comprising:
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された各領域の占有率及び前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定工程と、
前記調整方法決定工程において決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定工程において決定された階調調整量の階調変換処理を施す階調変換工程と、
を含むことを特徴とする画像処理方法。
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating the ratio of the entire photographed image data for each of the divided areas. An occupancy calculation step to calculate,
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
In order to specify the shooting condition by multiplying the occupation ratio of each region calculated in the occupation ratio calculation step and the deviation amount calculated in the deviation amount calculation step by a coefficient set in advance according to the imaging condition An index calculation process for calculating an index of
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
An adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion step of performing gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step on the captured image data using the gradation adjustment method determined in the adjustment method determination step;
An image processing method comprising:
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された第1の占有率及び第2の占有率と、前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換工程と、
を含むことを特徴とする画像処理方法。
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data is determined for each of the divided areas. An occupancy calculation step to calculate,
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio 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 an index for specifying the shooting conditions;
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
A gradation conversion step of performing gradation conversion processing on the photographed image data using the determined gradation adjustment method;
An image processing method comprising:
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出工程と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出工程と、
前記占有率算出工程において算出された第1の占有率及び第2の占有率と、前記偏倚量算出工程において算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出工程と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別工程と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定工程と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定工程と、
前記調整方法決定工程において決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定工程において決定された階調調整量の階調変換処理を施す階調変換工程と、
を含むことを特徴とする画像処理方法。
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data is determined for each of the divided areas. An occupancy calculation step to calculate,
A deviation amount calculating step of calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio 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 an index for specifying the shooting conditions;
A determination step of determining a 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;
An adjustment method determining step for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
An adjustment amount determining step for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion step of performing gradation conversion processing of the gradation adjustment amount determined in the adjustment amount determination step on the captured image data using the gradation adjustment method determined in the adjustment method determination step;
An image processing method comprising:
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記占有率が算出されることを特徴とする請求項3又は4に記載の画像処理方法。
Creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data,
The image processing method according to claim 3 or 4, wherein, in the occupancy rate calculating step, the occupancy rate is calculated based on the created two-dimensional histogram.
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記第2の占有率が算出されることを特徴とする請求項5又は6に記載の画像処理方法。
Creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data,
The image processing method according to claim 5 or 6, wherein, in the occupancy rate calculating step, the second occupancy rate is calculated based on the created two-dimensional histogram.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記占有率が算出されることを特徴とする請求項1又は2に記載の画像処理方法。
Creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data;
The image processing method according to claim 1, wherein, in the occupancy rate calculating step, the occupancy rate is calculated based on the created two-dimensional histogram.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する工程を含み、
前記占有率算出工程において、前記作成された2次元ヒストグラムに基づいて前記第1の占有率が算出されることを特徴とする請求項5又は6に記載の画像処理方法。
Creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data;
The image processing method according to claim 5 or 6, wherein, in the occupancy rate calculating step, the first occupancy rate is calculated based on the created two-dimensional histogram.
前記指標算出工程において、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴とする請求項1、2、5、6、8〜10の何れか一項に記載の画像処理方法。   In the index calculation step, coefficients having different signs are used in a predetermined high-lightness skin color hue region and a hue region other than the high-lightness skin color hue region. The image processing method according to any one of 6, 8 to 10. 前記指標算出工程において、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴とする請求項1、2、5、6、8〜11の何れか一項に記載の画像処理方法。   12. The index calculation step uses coefficients having different signs for an intermediate brightness area of a flesh hue area and a brightness area other than the intermediate brightness area. An image processing method according to any one of the above. 前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴とする請求項11に記載の画像処理方法。   The image processing method according to claim 11, wherein a lightness region of a hue region other than the high lightness skin color hue region is a predetermined high lightness region. 前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴とする請求項12に記載の画像処理方法。   The image processing method according to claim 12, wherein the brightness area other than the intermediate brightness area is a brightness area in a flesh-color hue area. 前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴とする請求項11又は13に記載の画像処理方法。   The image processing method according to claim 11 or 13, wherein the high lightness skin color hue region includes a region having a lightness value of HSV color system in a range of 170 to 224. 前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴とする請求項12又は14に記載の画像処理方法。   The image processing method according to claim 12 or 14, wherein the intermediate lightness region includes a region having a lightness value of HSV color system in a range of 85 to 169. 前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴とする請求項11、13、15の何れか一項に記載の画像処理方法。   16. The image processing method according to claim 11, wherein the hue area other than the high brightness skin color hue area includes at least one of a blue hue area and a green hue area. . 前記中間明度領域以外の明度領域がシャドー領域であることを特徴とする請求項12、14、16の何れか一項に記載の画像処理方法。   The image processing method according to any one of claims 12, 14, and 16, wherein a brightness area other than the intermediate brightness area is a shadow area. 前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴とする請求項17に記載の画像処理方法。   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 hue value of the green hue region is in the range of from 40 to 160 as the hue value of the HSV color system. The image processing method according to claim 17, wherein the image processing method is provided. 前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴とする請求項18に記載の画像処理方法。   The image processing method according to claim 18, wherein the brightness value of the shadow area is in the range of 26 to 84 as the brightness value of the HSV color system. 前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴とする請求項11〜20の何れか一項に記載の画像処理方法。   21. The image processing method according to claim 11, wherein a hue value of the flesh color hue region is in a range of 0 to 39 and 330 to 359 as a hue value of the HSV color system. . 前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴とする請求項11〜21の何れか一項に記載の画像処理方法。   The image processing method according to any one of claims 11 to 21, wherein the skin color hue region is divided into two regions by a predetermined conditional expression based on brightness and saturation. 前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴とする請求項1〜22の何れか一項に記載の画像処理方法。   The deviation amount includes at least one of the brightness deviation amount of the captured image data, the average brightness value of the captured image data at the center of the screen, and the brightness difference value calculated under different conditions. The image processing method according to claim 1, wherein the image processing method is an image processing method. 前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴とする請求項1〜23の何れか一項に記載の画像処理方法。
The shooting conditions indicate light source conditions and exposure conditions during shooting,
The light source condition includes a strobe shooting state, and the exposure condition includes an under shooting state derived from a shutter speed and an aperture value at the time of shooting. An image processing method described in 1.
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、
を備えることを特徴とする画像処理装置。
Occupancy rate calculating means for dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupancy rate indicating the proportion of the entire captured image data;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An image processing apparatus comprising:
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、
を備えることを特徴とする画像処理装置。
Occupancy rate calculating means for dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupancy rate indicating the proportion of the entire captured image data;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means;
An image processing apparatus comprising:
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、
を備えることを特徴とする画像処理装置。
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupation ratio indicating a ratio of the whole photographed image data for each of the divided areas. Occupancy ratio calculating means for calculating;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An image processing apparatus comprising:
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、
を備えることを特徴とする画像処理装置。
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupation ratio indicating a ratio of the whole photographed image data for each of the divided areas. Occupancy ratio calculating means for calculating;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means;
An image processing apparatus comprising:
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、
を備えることを特徴とする画像処理装置。
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupation ratio indicating a ratio of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas consisting of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data for each of the divided areas is obtained. Occupancy ratio calculating means for calculating;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An image processing apparatus comprising:
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、
を備えることを特徴とする画像処理装置。
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupation ratio indicating a ratio of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas consisting of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data for each of the divided areas is obtained. Occupancy ratio calculating means for calculating;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means;
An image processing apparatus comprising:
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴とする請求項27又は28に記載の画像処理装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data;
The image processing apparatus according to claim 27 or 28, wherein the occupancy ratio calculating unit calculates the occupancy ratio based on the created two-dimensional histogram.
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第2の占有率を算出することを特徴とする請求項29又は30に記載の画像処理装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data;
31. The image processing apparatus according to claim 29, wherein the occupancy rate calculating unit calculates the second occupancy rate based on the created two-dimensional histogram.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴とする請求項25又は26に記載の画像処理装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data;
27. The image processing apparatus according to claim 25, wherein the occupancy ratio calculating unit calculates the occupancy ratio based on the created two-dimensional histogram.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第1の占有率を算出することを特徴とする請求項29又は30に記載の画像処理装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data;
31. The image processing apparatus according to claim 29, wherein the occupancy rate calculating unit calculates the first occupancy rate based on the created two-dimensional histogram.
前記指標算出手段では、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴とする請求項25、26、29、30、32〜34の何れか一項に記載の画像処理装置。   The coefficient calculation unit 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, 25, 26, 29, The image processing apparatus according to any one of 30, 32 and 34. 前記指標算出手段では、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴とする請求項25、26、29、30、32〜35の何れか一項に記載の画像処理装置。   The coefficient calculation unit uses coefficients with different signs for an intermediate brightness area of a flesh-color hue area and a brightness area other than the intermediate brightness area. The image processing apparatus according to any one of the above. 前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴とする請求項35に記載の画像処理装置。   36. The image processing apparatus according to claim 35, wherein a brightness area of a hue area other than the high brightness skin color hue area is a predetermined high brightness area. 前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴とする請求項36に記載の画像処理装置。   37. The image processing apparatus according to claim 36, wherein the brightness area other than the intermediate brightness area is a brightness area within a flesh-color hue area. 前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴とする請求項35又は37に記載の画像処理装置。   38. The image processing apparatus according to claim 35, wherein the high lightness skin color hue region includes a region having a lightness value in the HSV color system of 170 to 224. 前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴とする請求項36又は38に記載の画像処理装置。   39. The image processing apparatus according to claim 36 or 38, wherein the intermediate brightness area includes an area having a brightness value in the HSV color system of 85 to 169. 前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴とする請求項35、37、39の何れか一項に記載の画像処理装置。   The image processing apparatus according to any one of claims 35, 37, and 39, wherein the hue area other than the high brightness skin color hue area includes at least one of a blue hue area and a green hue area. . 前記中間明度領域以外の明度領域がシャドー領域であることを特徴とする請求項36、38、40の何れか一項に記載の画像処理装置。   41. The image processing apparatus according to claim 36, 38, or 40, wherein the brightness area other than the intermediate brightness area is a shadow area. 前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴とする請求項41に記載の画像処理装置。   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 hue value of the green hue region is in the range of from 40 to 160 as the hue value of the HSV color system. The image processing apparatus according to claim 41, wherein the image processing apparatus is provided. 前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴とする請求項42に記載の画像処理装置。   43. The image processing apparatus according to claim 42, wherein a lightness value of the shadow area is within a range of 26 to 84 as a lightness value of the HSV color system. 前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴とする請求項35〜44の何れか一項に記載の画像処理装置。   45. The image processing apparatus according to claim 35, wherein a hue value of the skin color hue region is in a range of 0 to 39 and 330 to 359 as a hue value of the HSV color system. . 前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴とする請求項35〜45の何れか一項に記載の画像処理装置。   The image processing device according to any one of claims 35 to 45, wherein the skin color hue region is divided into two regions according to a predetermined conditional expression based on lightness and saturation. 前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴とする請求項25〜46の何れか一項に記載の画像処理装置。   The deviation amount includes at least one of the brightness deviation amount of the captured image data, the average brightness value of the captured image data at the center of the screen, and the brightness difference value calculated under different conditions. The image processing apparatus according to any one of claims 25 to 46, wherein: 前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴とする請求項25〜47の何れか一項に記載の画像処理装置。
The shooting conditions indicate light source conditions and exposure conditions during shooting,
48. The light source condition includes a strobe shooting state, and the exposure condition includes an under shooting state derived from a shutter speed and an aperture value at the time of shooting. An image processing apparatus according to 1.
被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、
を備えることを特徴とする撮像装置。
Imaging means for photographing a subject and obtaining photographed image data;
Occupancy rate calculating means for dividing the photographed image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating a proportion of the entire photographed image data;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An imaging apparatus comprising:
被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、
を備えることを特徴とする撮像装置。
Imaging means for photographing a subject and obtaining photographed image data;
Occupancy rate calculating means for dividing the photographed image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating a proportion of the entire photographed image data;
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means;
An imaging apparatus comprising:
被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、
を備えることを特徴とする撮像装置。
Imaging means for photographing a subject and obtaining photographed image data;
Dividing the photographed image data into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating a ratio of the entire photographed image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An imaging apparatus comprising:
被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された各領域の占有率及び前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、
を備えることを特徴とする撮像装置。
Imaging means for photographing a subject and obtaining photographed image data;
Dividing the photographed image data into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating a ratio of the entire photographed image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
To specify the shooting condition by multiplying the occupation ratio of each area calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the shooting conditions. Index calculating means for calculating the index of
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means;
An imaging apparatus comprising:
被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換手段と、
を備えることを特徴とする撮像装置。
Imaging means for photographing a subject and obtaining photographed image data;
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image A second occupancy ratio that divides the data into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness and occupies the entire captured image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Gradation conversion means for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An imaging apparatus comprising:
被写体を撮影して撮影画像データを取得する撮像手段と、
前記撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出手段と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出手段と、
前記占有率算出手段により算出された第1の占有率及び第2の占有率と、前記偏倚量算出手段により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出手段と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別手段と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定手段と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定手段と、
前記調整方法決定手段により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定手段により決定された階調調整量の階調変換処理を施す階調変換手段と、
を備えることを特徴とする撮像装置。
Imaging means for photographing a subject and obtaining photographed image data;
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image A second occupancy ratio that divides the data into a predetermined area composed of a combination of the distance from the outer edge of the screen of the captured image data and the brightness and occupies the entire captured image data for each of the divided areas Occupancy ratio calculating means for calculating
A deviation amount calculating means for calculating a deviation amount indicating a deviation in gradation distribution of the photographed image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculating means and the deviation amount calculated by the deviation amount calculating means by a coefficient set in advance according to the photographing condition. , An index calculating means for calculating an index for specifying the shooting conditions;
A discriminating means for discriminating a photographing condition of the photographed image data based on the calculated index and a discriminant map previously divided according to the accuracy of the photographing condition;
An adjustment method determining means for determining a method of gradation adjustment for the captured image data according to the determined imaging condition;
Adjustment amount determining means for determining a gradation adjustment amount for the captured image data based on the calculated index;
Gradation conversion means for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination means on the captured image data using the gradation adjustment method determined by the adjustment method determination means;
An imaging apparatus comprising:
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴とする請求項51又は52に記載の撮像装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data;
53. The imaging apparatus according to claim 51, wherein the occupancy ratio calculating unit calculates the occupancy ratio based on the created two-dimensional histogram.
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第2の占有率を算出することを特徴とする請求項53又は54に記載の撮像装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data;
55. The imaging apparatus according to claim 53 or 54, wherein the occupancy rate calculating unit calculates the second occupancy rate based on the created two-dimensional histogram.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴とする請求項49又は50に記載の撮像装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data;
51. The imaging apparatus according to claim 49, wherein the occupancy rate calculation unit calculates the occupancy rate based on the created two-dimensional histogram.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する手段を備え、
前記占有率算出手段は、前記作成された2次元ヒストグラムに基づいて前記第1の占有率を算出することを特徴とする請求項53又は54に記載の撮像装置。
Means for creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the photographed image data;
55. The imaging apparatus according to claim 53 or 54, wherein the occupancy rate calculating means calculates the first occupancy rate based on the created two-dimensional histogram.
前記指標算出手段では、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴とする請求項49、50、53、54、56〜58の何れか一項に記載の撮像装置。   The coefficient calculation means 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, 49, 50, 53, 54. The imaging device according to any one of 54, 56 to 58. 前記指標算出手段では、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴とする請求項49、50、53、54、56〜59の何れか一項に記載の撮像装置。   The index calculation means uses coefficients of different signs for the intermediate brightness area of the flesh hue area and the brightness areas other than the intermediate brightness area. The imaging device according to any one of the above. 前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴とする請求項59に記載の撮像装置。   60. The imaging apparatus according to claim 59, wherein a brightness area of a hue area other than the high brightness skin color hue area is a predetermined high brightness area. 前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴とする請求項60に記載の撮像装置。   61. The imaging apparatus according to claim 60, wherein the brightness area other than the intermediate brightness area is a brightness area in a flesh-color hue area. 前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴とする請求項59又は61に記載の撮像装置。   62. The imaging apparatus according to claim 59 or 61, wherein the skin color hue region of high brightness includes a region in the range of 170 to 224 in terms of brightness values of the HSV color system. 前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴とする請求項60又は62に記載の撮像装置。   63. The imaging apparatus according to claim 60, wherein the intermediate lightness region includes a region having a lightness value of HSV color system in a range of 85 to 169. 前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴とする請求項59、61、63の何れか一項に記載の撮像装置。   64. The imaging apparatus according to claim 59, wherein the hue area other than the high brightness skin color hue area includes at least one of a blue hue area and a green hue area. 前記中間明度領域以外の明度領域がシャドー領域であることを特徴とする請求項60、62、64の何れか一項に記載の撮像装置。   The imaging apparatus according to any one of claims 60, 62, and 64, wherein the brightness area other than the intermediate brightness area is a shadow area. 前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴とする請求項65に記載の撮像装置。   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 hue value of the green hue region is in the range of from 40 to 160 as the hue value of the HSV color system. The imaging apparatus according to claim 65, wherein the imaging apparatus is provided. 前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴とする請求項66に記載の撮像装置。   67. The imaging apparatus according to claim 66, wherein the brightness value of the shadow region is in the range of 26 to 84 as the brightness value of the HSV color system. 前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴とする請求項59〜68の何れか一項に記載の撮像装置。   69. The image pickup apparatus according to any one of claims 59 to 68, wherein a hue value of the skin color hue region is in a range of 0 to 39 and 330 to 359 as a hue value of an HSV color system. 前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴とする請求項59〜69の何れか一項に記載の撮像装置。   The imaging apparatus according to any one of claims 59 to 69, wherein the skin color hue region is divided into two regions according to a predetermined conditional expression based on brightness and saturation. 前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴とする請求項49〜70の何れか一項に記載の撮像装置。   The deviation amount includes at least one of the brightness deviation amount of the captured image data, the average brightness value of the captured image data at the center of the screen, and the brightness difference value calculated under different conditions. The imaging device according to any one of claims 49 to 70, wherein: 前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴とする請求項49〜71の何れか一項に記載の撮像装置。
The shooting conditions indicate light source conditions and exposure conditions during shooting,
72. The light source condition includes a strobe shooting state, and the exposure condition includes an under shooting state derived from a shutter speed and an aperture value at the time of shooting. The imaging device described in 1.
画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換機能と、
を実現させるための画像処理プログラム。
In the computer for executing image processing,
Occupancy rate calculation function for dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating the proportion of the entire captured image data;
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
A gradation conversion function for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An image processing program for realizing
画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定機能と、
前記調整方法決定機能により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定機能により決定された階調調整量の階調変換処理を施す階調変換機能と、
を実現させるための画像処理プログラム。
In the computer for executing image processing,
Occupancy rate calculation function for dividing the captured image data into regions composed of combinations of predetermined brightness and hue, and for each of the divided regions, calculating an occupation rate indicating the proportion of the entire captured image data;
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An adjustment amount determination function for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion function for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination function on the captured image data using the gradation adjustment method determined by the adjustment method determination function;
An image processing program for realizing
画像処理を実行するためのコンピュータに、
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換機能と、
を実現させるための画像処理プログラム。
In the computer for executing image processing,
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating the ratio of the entire photographed image data for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
A gradation conversion function for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An image processing program for realizing
画像処理を実行するためのコンピュータに、
撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された各領域の占有率及び前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定機能と、
前記調整方法決定機能により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定機能により決定された階調調整量の階調変換処理を施す階調変換機能と、
を実現させるための画像処理プログラム。
In the computer for executing image processing,
The photographed image data is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and an occupancy ratio indicating the ratio of the entire photographed image data for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for 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 by the occupation ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the imaging condition. An index calculation function to calculate
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An adjustment amount determination function for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion function for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination function on the captured image data using the gradation adjustment method determined by the adjustment method determination function;
An image processing program for realizing
画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された第1の占有率及び第2の占有率と、前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記決定された階調調整方法を用いて、前記撮影画像データに対し階調変換処理を施す階調変換機能と、
を実現させるための画像処理プログラム。
In the computer for executing image processing,
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data is determined for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for calculating a deviation amount indicating a deviation in gradation distribution of the captured image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the shooting condition. , An index calculation function for calculating an index for specifying shooting conditions,
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
A gradation conversion function for performing gradation conversion processing on the captured image data using the determined gradation adjustment method;
An image processing program for realizing
画像処理を実行するためのコンピュータに、
撮影画像データを、所定の明度と色相の組み合わせからなる領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第1の占有率を算出するとともに、撮影画像データを、当該撮影画像データの画面の外縁からの距離と明度の組み合わせからなる所定の領域に分割し、当該分割された領域毎に、前記撮影画像データ全体に占める割合を示す第2の占有率を算出する占有率算出機能と、
前記撮影画像データの階調分布の偏りを示す偏倚量を算出する偏倚量算出機能と、
前記占有率算出機能により算出された第1の占有率及び第2の占有率と、前記偏倚量算出機能により算出された偏倚量に、撮影条件に応じて予め設定された係数を乗算することにより、撮影条件を特定するための指標を算出する指標算出機能と、
前記算出された指標と、撮影条件の確度に応じて予め領域分けされた判別マップに基づいて、前記撮影画像データの撮影条件を判別する判別機能と、
前記判別された撮影条件に応じて、前記撮影画像データに対する階調調整の方法を決定する調整方法決定機能と、
前記算出された指標に基づいて、前記撮影画像データに対する階調調整量を決定する調整量決定機能と、
前記調整方法決定機能により決定された階調調整方法を用いて、前記撮影画像データに対し、前記調整量決定機能により決定された階調調整量の階調変換処理を施す階調変換機能と、
を実現させるための画像処理プログラム。
In the computer for executing image processing,
The photographed image data is divided into regions composed of a combination of predetermined brightness and hue, and a first occupancy ratio indicating the proportion of the whole photographed image data is calculated for each of the divided regions, and the photographed image data Is divided into predetermined areas composed of a combination of the distance from the outer edge of the screen of the photographed image data and the brightness, and a second occupancy ratio indicating the proportion of the whole photographed image data is determined for each of the divided areas. Occupancy rate calculation function to calculate,
A deviation amount calculation function for calculating a deviation amount indicating a deviation in gradation distribution of the captured image data;
By multiplying the first occupancy ratio and the second occupancy ratio calculated by the occupancy ratio calculation function and the deviation amount calculated by the deviation amount calculation function by a coefficient set in advance according to the shooting condition. , An index calculation function for calculating an index for specifying shooting conditions,
A discriminating function for discriminating the photographing condition of the photographed image data based on the calculated index and a discriminant map preliminarily divided according to the accuracy of the photographing condition;
An adjustment method determining function for determining a method of gradation adjustment for the captured image data according to the determined shooting condition;
An adjustment amount determination function for determining a gradation adjustment amount for the captured image data based on the calculated index;
A gradation conversion function for performing gradation conversion processing of the gradation adjustment amount determined by the adjustment amount determination function on the captured image data using the gradation adjustment method determined by the adjustment method determination function;
An image processing program for realizing
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴とする請求項75又は76に記載の画像処理プログラム。
Realizing the function of creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data,
The image processing program according to claim 75 or 76, wherein the occupancy rate is calculated based on the created two-dimensional histogram when the occupancy rate calculation function is realized.
前記撮影画像データの画面の外縁からの距離と明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記第2の占有率を算出することを特徴とする請求項77又は78に記載の画像処理プログラム。
Realizing the function of creating a two-dimensional histogram by calculating the cumulative number of pixels for each distance and brightness from the outer edge of the screen of the captured image data,
The image processing program according to claim 77 or 78, wherein the second occupation ratio is calculated based on the created two-dimensional histogram when the occupation ratio calculation function is realized.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記占有率を算出することを特徴とする請求項73又は74に記載の画像処理プログラム。
Realizing a function of creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data;
The image processing program according to claim 73 or 74, wherein the occupancy ratio is calculated based on the created two-dimensional histogram when the occupancy ratio calculation function is realized.
前記撮影画像データの所定の色相、明度毎に累積画素数を算出することによって2次元ヒストグラムを作成する機能を実現させ、
前記占有率算出機能を実現させる際に、前記作成された2次元ヒストグラムに基づいて前記第1の占有率を算出することを特徴とする請求項77又は78に記載の画像処理プログラム。
Realizing a function of creating a two-dimensional histogram by calculating the cumulative number of pixels for each predetermined hue and brightness of the captured image data;
The image processing program according to claim 77 or 78, wherein when the occupancy rate calculation function is realized, the first occupancy rate is calculated based on the created two-dimensional histogram.
前記指標算出機能を実現させる際に、所定の高明度の肌色色相領域と、当該高明度の肌色色相領域以外の色相領域とで、異なる符号の係数が用いられることを特徴とする請求項73、74、77、78、80〜82の何れか一項に記載の画像処理プログラム。   73. When realizing the index calculation function, coefficients having different signs are used in a predetermined high-lightness skin color hue region and a hue region other than the high-lightness skin color hue region. 74. The image processing program according to any one of 74, 77, 78, and 80 to 82. 前記指標算出機能を実現させる際に、肌色色相領域の中間明度領域と、当該中間明度領域以外の明度領域とで異なる符号の係数が用いられることを特徴とする請求項73、74、77、78、80〜83の何れか一項に記載の画像処理プログラム。   73, 74, 77, 78, wherein, when realizing the index calculation function, coefficients having different signs are used in an intermediate brightness area of a flesh hue area and a brightness area other than the intermediate brightness area. 80. The image processing program according to any one of 80 to 83. 前記高明度の肌色色相領域以外の色相領域の明度領域が、所定の高明度領域であることを特徴とする請求項83に記載の画像処理プログラム。   84. The image processing program according to claim 83, wherein a brightness area of a hue area other than the high brightness skin color hue area is a predetermined high brightness area. 前記中間明度領域以外の明度領域が、肌色色相領域内の明度領域であることを特徴とする請求項84に記載の画像処理プログラム。   85. The image processing program according to claim 84, wherein the brightness area other than the intermediate brightness area is a brightness area within a flesh-color hue area. 前記高明度の肌色色相領域には、HSV表色系の明度値で170〜224の範囲の領域が含まれることを特徴とする請求項83又は85に記載の画像処理プログラム。   86. The image processing program according to claim 83, wherein the skin color hue region of high brightness includes a region in the range of 170 to 224 in terms of brightness values of the HSV color system. 前記中間明度領域には、HSV表色系の明度値で85〜169の範囲の領域が含まれることを特徴とする請求項84又は86に記載の画像処理プログラム。   The image processing program according to claim 84 or 86, wherein the intermediate brightness area includes an area in the range of 85 to 169 in terms of brightness values of the HSV color system. 前記高明度の肌色色相領域以外の色相領域には、青色色相領域、緑色色相領域の少なくとも一方が含まれることを特徴とする請求項83、85、87の何れか一項に記載の画像処理プログラム。   The image processing program according to any one of claims 83, 85, and 87, wherein the hue area other than the high brightness skin color hue area includes at least one of a blue hue area and a green hue area. . 前記中間明度領域以外の明度領域がシャドー領域であることを特徴とする請求項84、86、88の何れか一項に記載の画像処理プログラム。   The image processing program according to any one of claims 84, 86, and 88, wherein the brightness area other than the intermediate brightness area is a shadow area. 前記青色色相領域の色相値は、HSV表色系の色相値で161〜250の範囲内にあり、前記緑色色相領域の色相値は、HSV表色系の色相値で40〜160の範囲内にあることを特徴とする請求項89に記載の画像処理プログラム。   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 hue value of the green hue region is in the range of from 40 to 160 as the hue value of the HSV color system. 90. The image processing program according to claim 89, wherein: 前記シャドー領域の明度値は、HSV表色系の明度値で26〜84の範囲内にあることを特徴とする請求項90に記載の画像処理プログラム。   The image processing program according to claim 90, wherein the brightness value of the shadow area is in the range of 26 to 84 as the brightness value of the HSV color system. 前記肌色色相領域の色相値は、HSV表色系の色相値で0〜39及び330〜359の範囲内にあることを特徴とする請求項83〜92の何れか一項に記載の画像処理プログラム。   The image processing program according to any one of claims 83 to 92, wherein a hue value of the flesh color hue region is in a range of 0 to 39 and 330 to 359 as a hue value of the HSV color system. . 前記肌色色相領域が、明度及び彩度に基づく所定の条件式により2つの領域に分割されることを特徴とする請求項83〜93の何れか一項に記載の画像処理プログラム。   The image processing program according to any one of claims 83 to 93, wherein the skin color hue region is divided into two regions according to a predetermined conditional expression based on brightness and saturation. 前記偏倚量には、撮影画像データの明るさの偏差量、当該撮影画像データの画面中央部における明るさの平均値、異なる条件で算出された明るさの差分値のうちの少なくとも一つが含まれることを特徴とする請求項73〜94の何れか一項に記載の画像処理プログラム。   The deviation amount includes at least one of the brightness deviation amount of the captured image data, the average brightness value of the captured image data at the center of the screen, and the brightness difference value calculated under different conditions. The image processing program according to any one of claims 73 to 94, wherein: 前記撮影条件は、撮影時の光源条件及び露出条件を示し、
前記光源条件にはストロボ撮影状態が含まれ、前記露出条件には、撮影時のシャッタースピード、絞り値に由来するアンダー撮影状態が含まれることを特徴とする請求項73〜95の何れか一項に記載の画像処理プログラム。
The shooting conditions indicate light source conditions and exposure conditions during shooting,
96. The light source condition includes a strobe shooting state, and the exposure condition includes an under shooting state derived from a shutter speed and an aperture value at the time of shooting. The image processing program described in 1.
JP2004275212A 2004-09-22 2004-09-22 Image processing method, image processor, imaging device and image processing program Pending JP2006092133A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004275212A JP2006092133A (en) 2004-09-22 2004-09-22 Image processing method, image processor, imaging device and image processing program
PCT/JP2005/016383 WO2006033235A1 (en) 2004-09-22 2005-09-07 Image processing method, image processing device, imaging device, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004275212A JP2006092133A (en) 2004-09-22 2004-09-22 Image processing method, image processor, imaging device and image processing program

Publications (1)

Publication Number Publication Date
JP2006092133A true JP2006092133A (en) 2006-04-06

Family

ID=36089998

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004275212A Pending JP2006092133A (en) 2004-09-22 2004-09-22 Image processing method, image processor, imaging device and image processing program

Country Status (2)

Country Link
JP (1) JP2006092133A (en)
WO (1) WO2006033235A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006123492A1 (en) * 2005-05-19 2006-11-23 Konica Minolta Photo Imaging, Inc. Image processing method, image processing device, imaging device and image processing program
KR101323731B1 (en) 2006-01-04 2013-10-31 삼성전자주식회사 Method for display exposure area
JP2014010686A (en) * 2012-06-29 2014-01-20 Secom Co Ltd Face image authentication device
KR20190063524A (en) * 2017-11-30 2019-06-10 주식회사 룰루랩 portable skin condition measuring device comprising polarizing film, and the diagnosis and managing system using thereof
KR20190063525A (en) * 2017-11-30 2019-06-10 주식회사 룰루랩 portable skin condition measuring device, and the diagnosis and managing system using thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000148980A (en) * 1998-11-12 2000-05-30 Fuji Photo Film Co Ltd Image processing method, image processor and recording medium
JP2002199221A (en) * 2000-12-27 2002-07-12 Fuji Photo Film Co Ltd Density correction curve generating device and method
JP2002247393A (en) * 2001-02-14 2002-08-30 Konica Corp Method of processing image

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006123492A1 (en) * 2005-05-19 2006-11-23 Konica Minolta Photo Imaging, Inc. Image processing method, image processing device, imaging device and image processing program
JP2006325015A (en) * 2005-05-19 2006-11-30 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, imaging apparatus, and image processing program
KR101323731B1 (en) 2006-01-04 2013-10-31 삼성전자주식회사 Method for display exposure area
JP2014010686A (en) * 2012-06-29 2014-01-20 Secom Co Ltd Face image authentication device
KR20190063524A (en) * 2017-11-30 2019-06-10 주식회사 룰루랩 portable skin condition measuring device comprising polarizing film, and the diagnosis and managing system using thereof
KR20190063525A (en) * 2017-11-30 2019-06-10 주식회사 룰루랩 portable skin condition measuring device, and the diagnosis and managing system using thereof
KR102052722B1 (en) 2017-11-30 2019-12-11 주식회사 룰루랩 portable skin condition measuring device comprising polarizing film, and the diagnosis and managing system using thereof
KR102052723B1 (en) 2017-11-30 2019-12-13 주식회사 룰루랩 portable skin condition measuring device, and the diagnosis and managing system using thereof

Also Published As

Publication number Publication date
WO2006033235A1 (en) 2006-03-30

Similar Documents

Publication Publication Date Title
JP2006325015A (en) Image processing method, image processing apparatus, imaging apparatus, and image processing program
JP2006319714A (en) Method, apparatus, and program for processing image
JP2004173010A (en) Image pickup device, image processor, image recorder, image processing method, program and recording medium
JP2005190435A (en) Image processing method, image processing apparatus and image recording apparatus
JPWO2005112428A1 (en) Image processing method, image processing apparatus, image recording apparatus, and image processing program
JP2007184888A (en) Imaging apparatus, image processor, image processing method, and image processing program
JP2006318255A (en) Image processing method, image processor and image processing program
JP2005192162A (en) Image processing method, image processing apparatus, and image recording apparatus
WO2006033235A1 (en) Image processing method, image processing device, imaging device, and image processing program
JP2006203566A (en) Imaging apparatus, image processing apparatus and image processing method
JP2007311895A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2007228221A (en) Imaging apparatus, image processing apparatus, image processing method and image processing program
WO2006033236A1 (en) Image processing method, image processing device, imaging device, and image processing program
JP2007293686A (en) Imaging apparatus, image processing apparatus, image processing method and image processing program
JP2007221678A (en) Imaging apparatus, image processor, image processing method and image processing program
JP2007312294A (en) Imaging apparatus, image processor, method for processing image, and image processing program
JP2007243542A (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
JP2006345272A (en) Image processing method, image processing apparatus, image pickup apparatus and image processing program
JP2006094000A (en) Image processing method, image processing apparatus, and image processing program
JP2005332054A (en) Image processing method, image processor, image recording device and image processing program
JP2007312125A (en) Image processor, image processing method, and image processing program
WO2006033234A1 (en) Image processing method, image processing device, imaging device, and image processing program
JP2006203571A (en) Imaging apparatus, image processing apparatus, and image recording apparatus
JP2006203573A (en) Imaging apparatus, image processor, and image recording apparatus
JP4449619B2 (en) Image processing method, image processing apparatus, and image processing program