JP4284604B2 - Contrast adjustment method and contrast adjustment apparatus for implementing the method - Google Patents

Contrast adjustment method and contrast adjustment apparatus for implementing the method Download PDF

Info

Publication number
JP4284604B2
JP4284604B2 JP2003390349A JP2003390349A JP4284604B2 JP 4284604 B2 JP4284604 B2 JP 4284604B2 JP 2003390349 A JP2003390349 A JP 2003390349A JP 2003390349 A JP2003390349 A JP 2003390349A JP 4284604 B2 JP4284604 B2 JP 4284604B2
Authority
JP
Japan
Prior art keywords
density
face
characteristic curve
contrast
value
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.)
Expired - Fee Related
Application number
JP2003390349A
Other languages
Japanese (ja)
Other versions
JP2005159388A (en
Inventor
聡 柳井
伊公子 吉田
和伸 志摩
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.)
Noritsu Koki Co Ltd
Original Assignee
Noritsu Koki Co Ltd
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 Noritsu Koki Co Ltd filed Critical Noritsu Koki Co Ltd
Priority to JP2003390349A priority Critical patent/JP4284604B2/en
Publication of JP2005159388A publication Critical patent/JP2005159388A/en
Application granted granted Critical
Publication of JP4284604B2 publication Critical patent/JP4284604B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、顔領域を含む撮影画像データの濃度補正に用いられる濃度特性曲線における顔領域のコントラストを調整する方法、プログラム、装置に関する。   The present invention relates to a method, a program, and an apparatus for adjusting the contrast of a face area in a density characteristic curve used for density correction of captured image data including the face area.

現在、写真プリント業界では、写真フィルムに形成された撮影画像をフィルムスキャナを用いてデジタル化して得られた撮影画像データや、デジタルカメラなどのデジタル撮影機器によって直接撮影画像をデジタル化して得られた撮影画像データに濃度補正や色補正などの画像処理を施した後これをプリントデータに変換し、このプリントデータに基づいてプリント露光ユニットを駆動して、撮影画像を感光材料(印画紙)に焼き付けるデジタル写真処理技術が、主流である。   At present, in the photographic printing industry, it has been obtained by digitizing a photographed image data obtained by digitizing a photographed image formed on a photographic film using a film scanner or a digital photographing device such as a digital camera. After image processing such as density correction and color correction is performed on the photographed image data, it is converted into print data, and the print exposure unit is driven based on the print data to print the photographed image on a photosensitive material (printing paper). Digital photo processing technology is the mainstream.

このようなデジタル写真処理技術の分野では、例えば、撮像素子により写真フィルムを測光して得られるコマごとのR(赤)・G(緑)・B(青)の撮影画像データに基づいて画質の良好な画像を印画紙に焼き付けるため、入力された撮影画像データの濃度を補正する処理が行われている。濃度補正方法としては、濃度特性曲線(ガンマ特性)による濃度補正が一般的である。つまり、入力画像データの濃度階調に対して印画紙が発色する濃度階調は一致しないので、印画紙が発色する濃度階調が人間の視覚特性に適したものになるように設定された濃度特性曲線を用いて入力画像データを補正し、この補正された出力画像データに基づいて最終的に得られる写真プリント(印画紙)上で発色している濃度階調が人間の視覚特性に応じたものになるようにしている。濃度特性曲線としては、理論的かつ経験的の知識に基づいて作成された基本的な濃度特性曲線がよく知られており、以前からこのような基本的な濃度特性曲線が利用されている。しかしながら、撮影画像の被写体状況や撮影環境状況は千差万別であり、基本的な濃度特性曲線では、入力された撮影画像データの撮像シーンによっては、適切な出力画像データを得られないという問題が生じている。例えば、オーバー/アンダー露出(露光過多/露光過少)で撮影された写真フィルムから取り込んだ撮影画像データを補正する場合は、撮影画像データを構成する各画素の輝度が低輝度(シャドウ部)または高輝度(ハイライト部)に偏り過ぎているのに対して、基本的な濃度特性曲線におけるシャドウ部およびハイライト部の傾斜率は緩やかになっているため、入力濃度に対して出力濃度が極めて弱くなるように補正されてしまう。   In the field of such digital photographic processing technology, for example, the image quality is determined based on R (red), G (green), and B (blue) photographed image data for each frame obtained by photometry of a photographic film with an image sensor. In order to print a good image on photographic paper, processing for correcting the density of the input captured image data is performed. As a density correction method, density correction based on a density characteristic curve (gamma characteristic) is generally used. In other words, the density gradation that the photographic paper develops does not match the density gradation of the input image data, so the density gradation that the photographic paper develops is set to be suitable for human visual characteristics. The input image data is corrected using the characteristic curve, and the density gradation that is colored on the photographic print (printing paper) that is finally obtained based on the corrected output image data corresponds to the human visual characteristics. I try to be something. As the density characteristic curve, a basic density characteristic curve created based on theoretical and empirical knowledge is well known, and such a basic density characteristic curve has been used for some time. However, the subject situation and the shooting environment situation of the shot image are various, and the basic density characteristic curve cannot obtain appropriate output image data depending on the shooting scene of the input shot image data. Has occurred. For example, when correcting photographic image data captured from photographic film taken with over / under exposure (overexposure / underexposure), the brightness of each pixel constituting the photographic image data is low (shadow) or high. The gradient of the shadow area and highlight area in the basic density characteristic curve is moderate, while the output density is extremely weak with respect to the input density. Will be corrected.

上述の問題を解決するため、基本濃度特性曲線を出力側基準で複数の領域に分割し、画像の濃度の代表値に対して、基本濃度特性曲線がとり得る入力輝度の範囲を変更するための調整率を定めたデータテーブルを上記領域別に設定し、入力画像を構成する各画素の濃度から、入力画像の濃度の代表値を求め、求めた代表値と上記データテーブルとから、入力画像に応じた調整率を領域ごとに検出し、領域ごとで、基準となるガンマカーブのとり得る出力輝度の範囲は一定としつつ、基本濃度特性曲線がとり得る入力濃度の範囲に入力画像に応じた調整率をかけることで、基本濃度特性曲線を修正し、その修正された濃度特性曲線で入力撮影画像データを濃度補正するものがある(特許文献1参照。)。このように修正された濃度特性曲線を用いて濃度補正することにより、上述の問題はある程度改善されるが、なお、特定の撮影画像、例えば人物写真などではその効果は十分ではない。   In order to solve the above-described problem, the basic density characteristic curve is divided into a plurality of regions on the output side reference, and the range of input luminance that the basic density characteristic curve can take is changed with respect to the representative value of the image density. A data table that defines the adjustment rate is set for each area, a representative value of the density of the input image is obtained from the density of each pixel constituting the input image, and the representative value and the data table are used to obtain a representative value according to the input image. The adjustment rate according to the input image is adjusted to the input density range that can be taken by the basic density characteristic curve, while the output luminance range that can be taken by the reference gamma curve is constant for each area. Is applied to correct the basic density characteristic curve and correct the density of the input photographed image data with the corrected density characteristic curve (see Patent Document 1). By correcting the density using the corrected density characteristic curve as described above, the above-described problem can be improved to some extent. However, the effect is not sufficient for a specific photographed image, for example, a person photograph.

人物撮影画像に対する適正な濃度補正を行うために、人物の肌色に相当する色相を有する画素のRGBデータの特徴量と人物が含まれている可能性の高い領域の画素のRGBデータの特徴量とに基づいて濃度特性曲線を修正することにより、人物の濃度が適正に補正されるように工夫されたものもある(特許文献2参照。)。この技術では、ある程度の確率をもって人物撮影画像の改善が得られるが、肌色画素が一義的に人物を規定するものではないので、被写体によっては不適当な濃度補正が施されることになる。   In order to perform an appropriate density correction for a human photographed image, the feature amount of the RGB data of a pixel having a hue corresponding to the skin color of the person and the feature amount of the RGB data of a pixel in a region likely to include a person Some have been devised so that the density of a person is appropriately corrected by correcting the density characteristic curve based on the above (see Patent Document 2). Although this technique can improve a person-photographed image with a certain degree of probability, the skin color pixels do not uniquely define a person, so that an inappropriate density correction is performed depending on the subject.

撮影画像データからオペレータが顔領域を指定して、その顔領域に基づいた濃度補正を行う技術も知られているが(例えば特許文献3、特許文献4参照。)、単純に人物の顔に濃度を合わせるような修正を基本濃度特性曲線に施して、濃度補正した場合、逆光撮影画像やストロボ撮影画像では過剰補正となって、やはり不自然な写真プリントを作製してしまうことも少なくない。   A technique is also known in which an operator designates a face area from captured image data and performs density correction based on the face area (see, for example, Patent Document 3 and Patent Document 4). When the basic density characteristic curve is corrected by adjusting the density so as to correct the density, overcorrection is often caused in a backlight photographed image or a flash photographed image, and an unnatural photo print is often produced.

また、濃度特性曲線を所定点周りで、一般には中央の濃度値(濃度ヒストグラム中心)となる濃度特性曲線上の点周りで回転させることで、コントラストが補正されるが、このようなコントラスト補正では、濃度の高い領域と濃度の低い領域とで同じコントラスト補正を行うことになり、特に逆光撮影画像やストロボ撮影画像の場合、必ずしも満足できる品質をもった画像を作り出すことができないという問題点がある。この問題を解決するために、コントラスト補正のために濃度特性曲線を回転させる点に関して高濃度側と低濃度側で回転させる角度を変えたり、コントラスト補正のために濃度特性曲線を回転させる点を複数(例えば濃度ヒストグラムの複数のピーク点)設定したりして、複数の領域で異なるコントラスト補正を行う技術がある(例えば、特許文献5)。このようなコントラスト補正では濃度領域別のコントラスト補正が可能であるが、人物写真などでは区分けすべき領域、つまり特定のコントラスト補正をすべき濃度領域の設定が難しく、これを間違うとかえって不適切なコントラスト補正となってしまう。   Also, the contrast is corrected by rotating the density characteristic curve around a predetermined point, generally around the point on the density characteristic curve that is the central density value (density histogram center). The same contrast correction is performed in the high density area and the low density area, and in particular, in the case of a backlit image or a strobe image, there is a problem that an image having satisfactory quality cannot always be created. . In order to solve this problem, the angle at which the density characteristic curve is rotated for contrast correction is changed by changing the angle at which the density characteristic curve is rotated on the high density side and the low density side, or the density characteristic curve is rotated for contrast correction. There is a technique for performing different contrast correction in a plurality of regions (for example, Patent Document 5). In such contrast correction, contrast correction for each density area is possible, but it is difficult to set the area that should be divided, that is, the density area that should be subjected to specific contrast correction, in person photographs, etc. It becomes contrast correction.

特開2003−304398号公報(段落番号0008、0021、第1図)JP 2003-304398 A (paragraph numbers 0008 and 0021, FIG. 1) 特開2002−369020号公報(段落番号0004−0008、第5図)JP 2002-369020 A (paragraph number 0004-0008, FIG. 5) 特開平6−59353 号公報(段落番号0024、0048、第3図)JP-A-6-59353 (paragraph numbers 0024 and 0048, FIG. 3) 特開2001−218047 号公報(段落番号0009−0010、0024−0028、第2図)JP 2001-218047 A (paragraph numbers 0009-0010, 0024-0028, FIG. 2) 特開2002−1251130号公報(段落番号0094−0113、第4−5図)JP 20021251130 (paragraph number 0094-0113, FIG. 4-5)

上記実状に鑑み、本発明の課題は、顔領域を含む撮影画像データの濃度補正に用いられる濃度特性曲線における顔領域のコントラストを適正に調整するコントラスト調整技術を提供することである。   In view of the above situation, an object of the present invention is to provide a contrast adjustment technique for appropriately adjusting the contrast of a face area in a density characteristic curve used for density correction of captured image data including the face area.

上記課題を解決するため、顔領域を含む撮影画像データの濃度補正に用いられる濃度特性曲線における顔領域のコントラストを調整する、本発明によるコントラスト調整方法は、顔領域を含む撮影画像データの濃度補正に用いられる入力濃度と出力濃度との関係を規定する濃度特性曲線における顔領域のコントラストを調整するコントラスト調整方法において、前記撮影画像データから顔領域を検出するステップと、前記撮影画像データに基づいて算出され、所定の濃度特性曲線を入力濃度の軸に平行にシフトさせることにより当該撮影データに適した補正を実現する適正濃度特性曲線を生成するためのシフト量を規定する適正濃度補正値を当該所定の濃度特性曲線の入力濃度値とした際に対応する出力濃度値がニュートラルグレーとなるよう当該所定の濃度特性曲線を前記入力濃度の軸に平行にシフトさせることにより前記適正濃度特性曲線を生成するステップと、前記撮影画像データの前記顔領域から顔平均濃度値を算出するステップと、前記撮影画像データの写真フィルムの素抜け部の濃度値もしくは光学的黒レベルに関係付けられた濃度値であるベース濃度値を算出するステップと、前記顔平均濃度と前記ベース濃度値の差を入力濃度のコントラストと出力濃度のコントラストとの比率を規定するコントラスト係数を算出するための所定の関数に代入することにより顔領域に含まれる画素の濃度値域における濃度特性曲線の傾きを示す顔コントラスト係数を算出するステップと、前記顔平均濃度値を含む所定濃度値の範囲内で前記顔コントラスト係数を傾きとする直線のうち前記適正濃度補正値を入力濃度とした際に対応する出力濃度値が顔に適した濃度値となる直線を顔コントラストとして決定するステップと、前記適正濃度特性曲線のうち入力濃度値が前記所定濃度の範囲を前記顔コントラストで置換することで前記適正濃度特性曲線から顔領域のコントラストを調整するための調整適正濃度特性曲線を生成するステップと、前記調整適正濃度特性曲線に基づき前記撮影画像データの濃度補正を行うステップとからなる。この方法では、撮影画像データに基づいて決定される適正濃度特性曲線に対して、検出された顔領域の顔平均濃度と撮影画像データのベース濃度値との差をパラメータとして、顔領域の濃度特性曲線の傾きを示す顔コントラスト係数を算出し、この顔コントラスト係数と適正濃度特性曲線を規定する適正濃度補正値によって決定される顔コントラストを適正濃度特性曲線に組み合わせるので、最終的な適正濃度特性曲線は顔領域においては顔に適したコントラストを有するとともにそれ以外の領域では一般的な被写体に適したコントラストを有することになる。この方法で調整された適正濃度補正曲線を用いて濃度補正およびコントラスト補正された撮影画像データは、撮影画像の顔領域と背景等の濃度バランスが適正な写真プリントを出力することが可能である。ここでいう、適正濃度特性曲線を規定する適正濃度補正値は、この適正濃度補正値を入力濃度値とした場合その出力濃度値としてニュートラルグレイと呼ばれる濃度値が出力されるものであると理解してもよい。また、ベース濃度値とは、一般的には、撮影画像データのソースが写真フィルムの場合写真フィルムの素抜け部の濃度値であり、撮影画像データのソースがデジタルカメラ等の場合光学的黒レベルに関係づけられた濃度値であり、いわゆる被写体から独立した濃度値である。 In order to solve the above problem, the contrast adjustment method according to the present invention, which adjusts the contrast of the face area in the density characteristic curve used for density correction of the captured image data including the face area, corrects the density of the captured image data including the face area. In the contrast adjustment method for adjusting the contrast of the face area in the density characteristic curve that defines the relationship between the input density and the output density used in the method, the step of detecting the face area from the photographed image data, and based on the photographed image data An appropriate density correction value that defines a shift amount for generating an appropriate density characteristic curve that is calculated and shifts a predetermined density characteristic curve parallel to the axis of the input density to realize correction suitable for the photographing data The output density value corresponding to the input density value of the specified density characteristic curve is neutral gray. Calculating and generating the proper density characteristic curve by shifting in parallel the predetermined density characteristic curve to the axis of the input density, the face average density value from the face region of the photographic image data, the A step of calculating a base density value which is a density value related to an unexposed portion of a photographic film of photographed image data or an optical black level, and a difference between the face average density value and the base density value is input. The face contrast coefficient indicating the slope of the density characteristic curve in the density value range of the pixels included in the face area is substituted by a predetermined function for calculating the contrast coefficient that defines the ratio between the density contrast and the output density contrast. calculating, in a straight line to tilt the face contrast coefficient within a predetermined density value, including the face average density value A step of determining, as face contrast, a straight line in which a corresponding output density value is a density value suitable for a face when the appropriate density correction value is set as an input density, and the input density value of the appropriate density characteristic curve is the predetermined density Generating an adjusted appropriate density characteristic curve for adjusting the contrast of the face area from the appropriate density characteristic curve by replacing the density range with the face contrast; and the captured image data based on the adjusted appropriate density characteristic curve And a step of performing density correction. In this method, with respect to an appropriate density characteristic curve determined based on photographed image data, the difference between the detected face average density value of the face area and the base density value of the photographed image data is used as a parameter. Since the face contrast coefficient indicating the slope of the characteristic curve is calculated and the face contrast determined by the appropriate density correction value that defines the face contrast coefficient and the appropriate density characteristic curve is combined with the appropriate density characteristic curve, the final appropriate density characteristic The curve has a contrast suitable for the face in the face area and a contrast suitable for a general subject in the other areas. The photographed image data that has been density-corrected and contrast-corrected using the appropriate density correction curve adjusted by this method can output a photographic print in which the density balance of the face area and background of the photographed image is appropriate. The proper density correction value that defines the proper density characteristic curve here is understood to be that a density value called neutral gray is output as the output density value when this appropriate density correction value is used as the input density value. May be. The base density value is generally the density value of the unexposed portion of the photographic film when the source of the photographed image data is a photographic film, and the optical black level when the source of the photographed image data is a digital camera or the like. Is a density value that is independent of the subject.

上述した顔コントラストが有効な顔領域として、検出された顔領域における最大濃度値と最小濃度値によって規定される領域を採用することが処理の容易さからも好都合である。従って、本発明の好適な実施形態の1つでは、前記顔領域の撮影画像データから顔最大濃度値と顔最小濃度値を算出するステップが含まれ、かつ前記コントラストの決定ステップにおいて、前記所定濃度値の範囲が前記顔最大濃度値と前記顔最小濃度値の範囲となっている。つまり、入力濃度値が顔最大濃度値と顔最小濃度値の範囲内で、顔コントラスト係数を傾きとし適正濃度補正値を入力濃度値とした場合にニュートラルグレイが出力濃度値となる直線を顔コントラストとするわけである。 From the viewpoint of ease of processing, it is advantageous to adopt an area defined by the maximum density value and the minimum density value in the detected face area as the face area having the effective face contrast. Accordingly, in a preferred embodiment of the present invention, a step of calculating a face maximum density value and a face minimum density value from the captured image data of the face region is included, and the predetermined density is determined in the contrast determination step. range of values is in the range of the face minimum density value and the face maximum density value. In other words, when the input density value is within the range of the maximum face density value and the minimum face density value, the straight line with neutral gray as the output density value when the face contrast coefficient is the slope and the appropriate density correction value is the input density value is the face contrast. That is why.

顔最大濃度値(顔領域の最大濃度値)と顔最小濃度値(顔領域の最小濃度値)によって規定される領域を顔コントラストの有効領域とする代わりに、顔平均濃度(顔領域の平均濃度値)から所定値だけ離れた領域を有効領域としてもよい。この所定値は入力された撮影画像データから統計的に得られる濃度特性に基づいて決定してもよいし、予め設定しておいてもよい。   Instead of setting the area defined by the maximum face density value (maximum density value of the face area) and the minimum face density value (minimum density value of the face area) as the effective area of face contrast, the average face density (average density of the face area) An area separated from the (value) by a predetermined value may be set as the effective area. This predetermined value may be determined based on the density characteristic statistically obtained from the input captured image data, or may be set in advance.

なお、前記適正濃度特性曲線と前記適正濃度補正値を決定するアルゴルズムは種々のものが知られているが、ここでは人物写真に適合させるために、前記適正濃度特性曲線が前記撮影画像データに基づいて算出される基本補正値に基づいて生成された基本濃度特性曲線と、前記撮影画像データから検出された顔領域の平均濃度値に基づいて生成された顔依存濃度特性曲線と間に、前記適正濃度特性曲線が位置するように設定されたアルゴリズムが採用されている。   Various algorithms for determining the appropriate density characteristic curve and the appropriate density correction value are known. Here, in order to adapt to a human photograph, the appropriate density characteristic curve is based on the photographed image data. Between the basic density characteristic curve generated based on the basic correction value calculated in the above and the face-dependent density characteristic curve generated based on the average density value of the face area detected from the captured image data. An algorithm set so that the density characteristic curve is located is employed.

また、本発明は、上述したような、顔領域を含む撮影画像データの濃度補正に用いられる濃度特性曲線における顔領域のコントラストを調整する方法をコンピュータに実行させるプログラムやそのプログラムを記録した媒体も権利の対象とするものである。   The present invention also provides a program for causing a computer to execute the method for adjusting the contrast of the face area in the density characteristic curve used for density correction of the captured image data including the face area as described above, and a medium on which the program is recorded. It is the subject of rights.

本発明では、さらに、上述した方法を採用した装置も権利の対象としており、顔領域を含む撮影画像データの濃度補正に用いられる入力濃度と出力濃度との関係を規定する濃度特性曲線における顔領域のコントラストを調整するコントラスト調整装置において、前記撮影画像データから顔領域を検出する顔検出ユニットと、前記撮影画像データに基づいて算出され、所定の濃度特性曲線を入力濃度の軸に平行にシフトさせることにより当該撮影データに適した補正を実現する適正濃度特性曲線を生成するためのシフト量を規定する適正濃度補正値を当該所定の濃度特性曲線の入力濃度値とした際に対応する出力濃度値がニュートラルグレーとなるよう当該所定の濃度特性曲線を前記入力濃度の軸に平行にシフトさせることにより前記適正濃度特性曲線を生成する適正補正モジュールと、前記撮影画像データの前記顔領域から顔平均濃度値を算出する顔濃度算出部と、前記撮影画像データのベース濃度値を算出する写真フィルムの素抜け部の濃度値もしくは光学的黒レベルに関係付けられた濃度値であるベース濃度算出部と、前記顔平均濃度と前記ベース濃度値の差を入力濃度のコントラストと出力濃度のコントラストとの比率を規定するコントラスト係数を算出するための所定の関数に代入することにより顔領域に含まれる画素の濃度値域における濃度特性曲線の傾きを示す顔コントラスト係数を算出する顔コントラスト係数算出部と、前記顔平均濃度値を含む所定濃度値の範囲内で前記顔コントラスト係数を傾きとする直線のうち前記適正濃度補正値を入力濃度とした際に対応する出力濃度値が顔に適した濃度値となる直線を顔コントラストとして決定する顔コントラスト決定部と、前記適正濃度特性曲線のうち入力濃度値が前記所定濃度の範囲を前記顔コントラストで置換することで前記適正濃度特性曲線における顔領域のコントラストを調整するための調整濃度特性曲線を生成する濃度特性曲線決定モジュールと、前記調整適正濃度特性曲線に基づき前記撮影画像データの濃度補正を行う濃度補正部と、から構成されている。当然ながら、このようなコントラスト調整装置も上述した方法におけるすべての作用効果を得ることができるとともに、このコントラスト調整装置で調整された濃度特性曲線を用いて濃度補正とコントラスト補正された撮影画像データに基づく写真プリントは、撮影画像の顔領域と背景等の両者において濃度バランスとコントラストバランスが良好なものとなる。 In the present invention, the apparatus adopting the above-described method is also subject to the right, and the face area in the density characteristic curve that defines the relationship between the input density and the output density used for density correction of the captured image data including the face area. In the contrast adjustment device for adjusting the contrast of the image, a face detection unit for detecting a face area from the photographed image data and a predetermined density characteristic curve calculated based on the photographed image data are shifted in parallel with the input density axis . Thus, the output density value corresponding to the appropriate density correction value that defines the shift amount for generating the appropriate density characteristic curve that realizes the correction suitable for the photographing data is set as the input density value of the predetermined density characteristic curve. the proper concentration by shifting in parallel the predetermined density characteristic curve such but as a neutral gray to the axis of the input density An appropriate correction module that generates a sex curve, a face density calculation unit that calculates a face average density value from the face area of the photographed image data, and a blank portion of a photographic film that calculates a base density value of the photographed image data A base density calculation unit which is a density value or a density value related to the optical black level, and a difference between the face average density value and the base density value is defined as a ratio between an input density contrast and an output density contrast. A face contrast coefficient calculating unit that calculates a face contrast coefficient indicating a gradient of a density characteristic curve in a density value area of a pixel included in the face area by substituting into a predetermined function for calculating a contrast coefficient; and the face average density value corresponding to when the input density the appropriate density correction value of the straight line and the inclination of the face contrast coefficient within a predetermined density value including A face contrast determining unit that determines a straight line having an output density value suitable for the face as a face contrast, and replacing a range in which the input density value is the predetermined density in the appropriate density characteristic curve with the face contrast. A density characteristic curve determination module that generates an adjusted density characteristic curve for adjusting the contrast of the face area in the appropriate density characteristic curve, and a density correction unit that performs density correction of the captured image data based on the adjusted appropriate density characteristic curve And is composed of. Naturally, such a contrast adjustment device can obtain all the effects of the above-described method, and also uses the density characteristic curve adjusted by the contrast adjustment device to obtain photographic image data subjected to density correction and contrast correction. The photographic print based on this has good density balance and contrast balance in both the face area and background of the photographed image.

なお、ここで使われている濃度特性曲線ないしコントラスト調整された濃度特性曲線は数学的な特性曲線に限定して解釈されるのでのではなく、その実体は、離散的な特性曲線であってもよいし、ソフトウエアにおいてよく用いられるテーブル化された抽出可能なデータ群で定義されるものであってもよいし、ソフトウエア的に又はハードウエア的にあるいはその両方の意味において入力濃度を出力濃度に変換する濃度特性を特定する全てのデータ構造体を意味するものである。   It should be noted that the density characteristic curve or the density characteristic curve after contrast adjustment used here is not limited to a mathematical characteristic curve, but may be a discrete characteristic curve. Alternatively, it may be defined by a tabulated extractable data group often used in software, and input density is defined as output density in terms of software and / or hardware. This means all data structures that specify the density characteristics to be converted to.

本発明によるコントラスト調整技術の実施形態について、図面に基づいて説明する。
図1は本発明によるコントラスト調整技術を組み込んでいる写真プリント装置を示す外観図であり、この写真プリント装置は、印画紙Pに対して露光処理と現像処理とを行う写真プリンタとしてのプリントステーション1Bと、現像済み写真フィルム2aやデジタルカメラ用メモリカード2bなどの画像入力メディアから取り込んだ撮影画像を処理してプリントステーション1Bで使用されるプリントデータの生成・転送などを行う操作ステーション1Aとから構成されている。
An embodiment of a contrast adjustment technique according to the present invention will be described with reference to the drawings.
FIG. 1 is an external view showing a photographic printing apparatus incorporating a contrast adjustment technique according to the present invention. This photographic printing apparatus is a printing station 1B as a photographic printer that performs exposure processing and development processing on photographic paper P. FIG. And an operation station 1A that processes captured images taken from image input media such as developed photographic film 2a and digital camera memory card 2b, and generates / transfers print data to be used in print station 1B. Has been.

この写真プリント装置はデジタルミニラボとも称せられるものであり、図2からよく理解できるように、プリントステーション1Bは2つの印画紙マガジン11に納めたロール状の印画紙Pを引き出してシートカッター12でプリントサイズに切断すると共に、このように切断された印画紙Pに対し、バックプリント部13で色補正情報やコマ番号などのプリント処理情報を印画紙Pの裏面に印字するとともに、プリント露光部14で印画紙Pの表面に撮影画像の露光を行い、この露光後の印画紙Pを複数の現像処理槽を有した処理槽ユニット15に送り込んで現像処理する。乾燥の後に装置上部の横送りコンベア16からソータ17に送られた印画紙P、つまり写真プリントPは、このソータ17の複数のトレイにオーダ単位で仕分けられた状態で集積される(図1参照)。   This photo printing apparatus is also called a digital minilab, and as can be understood from FIG. The back print unit 13 prints print processing information such as color correction information and frame number on the back side of the photographic paper P, and the print exposure unit 14 cuts the print paper P into the size. A photographed image is exposed on the surface of the photographic paper P, and the exposed photographic paper P is sent to a processing tank unit 15 having a plurality of development processing tanks for development processing. After drying, the photographic paper P, that is, the photographic prints P, sent to the sorter 17 from the transverse feed conveyor 16 at the upper part of the apparatus is collected in a plurality of trays of the sorter 17 in a state of being sorted in order units (see FIG. 1). ).

上述した印画紙Pに対する各種処理に合わせた搬送速度で印画紙Pを搬送するために印画紙搬送機構18が敷設されている。印画紙搬送機構18は、印画紙搬送方向に関してプリント露光部14の前後に配置されたチャッカー式印画紙搬送ユニット18aを含む複数の挟持搬送ローラ対から構成されている。   A photographic paper transport mechanism 18 is laid to transport the photographic paper P at a transport speed in accordance with various processes for the photographic paper P described above. The photographic paper transport mechanism 18 is composed of a plurality of nipping and transporting roller pairs including a chucker type photographic paper transport unit 18a disposed before and after the print exposure unit 14 in the photographic paper transport direction.

プリント露光部14には、副走査方向に搬送される印画紙Pに対して、主走査方向に沿って操作ステーション1Aからのプリントデータに基づいてR(赤)、G(緑)、B(青)の3原色のレーザ光線の照射を行うライン露光ヘッドが設けられている。処理槽ユニット15は、発色現像処理液を貯留する発色現像槽15aと、漂白定着処理液を貯留する漂白定着槽15bと、安定処理液を貯留する安定槽15cを備えている。   The print exposure unit 14 applies R (red), G (green), and B (blue) to the printing paper P conveyed in the sub-scanning direction based on print data from the operation station 1A along the main scanning direction. A line exposure head for irradiating laser beams of the three primary colors (1) is provided. The processing tank unit 15 includes a color developing tank 15a for storing a color developing processing liquid, a bleach-fixing tank 15b for storing a bleach-fixing processing liquid, and a stabilizing tank 15c for storing a stable processing liquid.

前記操作ステーション1Aのデスク状コンソールの上部位置には、写真フィルム2aの撮影画像コマから撮影画像データ(以下単に画像データと略称する)を取得するフィルムスキャナ20が配置されており、デジタルカメラ等に装着される撮影画像記録媒体2bとして用いられている各種半導体メモリやCD−Rなどから画像データを取得するメディアリーダ21は、この写真プリント装置のコントローラ3として機能する汎用パソコンに組み込まれている。この汎用パソコンには、さらに各種情報を表示するモニタ23、各種設定や調整を行う際に用いる操作入力部として利用されるポインティングデバイスとしてのキーボード24やマウス25も接続されている。   A film scanner 20 for obtaining photographed image data (hereinafter simply referred to as image data) from a photographed image frame of the photographic film 2a is disposed at the upper position of the desk-like console of the operation station 1A. A media reader 21 that acquires image data from various semiconductor memories, CD-Rs, and the like used as the photographed image recording medium 2b to be mounted is incorporated in a general-purpose personal computer that functions as the controller 3 of the photographic printing apparatus. The general-purpose personal computer is also connected with a monitor 23 for displaying various types of information, and a keyboard 24 and a mouse 25 as pointing devices used as operation input units used for various settings and adjustments.

この写真プリント装置のコントローラ3は、CPUを中核部材として、写真プリント装置の種々の動作を行うための機能部をハードウエア又はソフトウエアあるいはその両方で構築しているが、図3に示されているように、本発明に特に関係する機能部としては、スキャナ20やメディアリーダ21によって読み取られた画像データを取り込んで次の処理のために必要な前処理を行う画像入力部31と、各種ウインドウや各種操作ボタンなどを含むグラフィック操作画面の作成やそのようなグラフィック操作画面を通じてのユーザ操作入力(キーボード24やマウス25などによる)から制御コマンドを生成するグラフィックユーザインターフェース(以下GUIと略称する)を構築するGUI部33と、GUI部33から送られてきた制御コマンドや直接キーボード24等から入力された操作命令に基づいて所望のプリントデータを生成するために画像入力部31からメモリ30に転送された画像データに対する画像処理等を行う画像管理部32と、色補正等のプレジャッジプリント作業時にプリントソース画像や予想仕上がりプリント画像としてのシミュレート画像さらにはGUI部33から送られてきたグラフィックデータをモニタ23に表示させるためのビデオ信号を生成するビデオ制御部35と、画像処理が完了した処理済み画像データに基づいてプリントステーション1Bに装備されているプリント露光部14に適したプリントデータを生成するプリントデータ生成部36と、顧客の要望に応じて生の画像データや画像処理が完了した処理済み画像データなどをCD−Rに書き込むための形式にフォーマットするフォーマッタ部37などが挙げられる。   The controller 3 of this photographic printing apparatus uses a CPU as a core member and constructs a functional unit for performing various operations of the photographic printing apparatus by hardware and / or software, as shown in FIG. As described above, the functional unit particularly related to the present invention includes an image input unit 31 that takes in image data read by the scanner 20 and the media reader 21 and performs preprocessing necessary for the next processing, and various windows. And a graphic user interface (hereinafter abbreviated as GUI) for generating a control command from a user operation input (via the keyboard 24, mouse 25, etc.) through the graphic operation screen. The GUI unit 33 to be constructed and the control sent from the GUI unit 33 An image management unit 32 that performs image processing on the image data transferred from the image input unit 31 to the memory 30 in order to generate desired print data based on an operation command input from a command or a direct keyboard 24; A video control unit 35 that generates a video signal for causing the monitor 23 to display graphic data sent from the GUI unit 33, or a simulated image as a print source image, an expected finished print image, or the like during pre-judge printing work such as correction. A print data generation unit 36 that generates print data suitable for the print exposure unit 14 installed in the print station 1B based on the processed image data for which image processing has been completed, and a raw image according to customer requirements. Data and processed image data that have been processed Etc. formatter 37 for formatting into a form for writing in and the like.

画像入力部31は、撮影画像記録媒体がフィルム2aの場合プレスキャンモードと本スキャンモードとのスキャンデータを別々にメモリ30に送り込み、それぞれの目的に合わせた前処理を行う。また、撮影画像記録媒体がメモリカード2bの場合取り込んだ画像データにサムネイル画像データ(低解像度データ)が含まれている場合はこのデータをモニタ23での一覧表示などの目的で使用するため撮影画像の本データ(高解像度データ)とは別にメモリ30に送り込むが、もしサムネイル画像データが含まれていない場合は本データから縮小画像を作り出して低解像度画像データとしてメモリ30に送り込む。   When the photographic image recording medium is the film 2a, the image input unit 31 separately sends the scan data for the pre-scan mode and the main scan mode to the memory 30, and performs preprocessing according to each purpose. When the captured image recording medium is the memory card 2b, when the captured image data includes thumbnail image data (low resolution data), the captured image is used for the purpose of displaying a list on the monitor 23. The thumbnail image data is sent to the memory 30 separately from the main data (high resolution data). If thumbnail image data is not included, a reduced image is created from the main data and sent to the memory 30 as low resolution image data.

画像管理部32は、メモリ30に展開された低解像度の画像データから顔検出アルゴリズムを用いて顔検出領域データを含む顔検出情報を出力する顔検出ユニット40、メモリ30に展開された高解像度の画像データに対して濃度補正を施す濃度補正ユニット50、この濃度補正ユニット50が用いる濃度特性曲線を画像データの画像特性に基づいて設定調整する濃度補正管理ユニット100、画像データに対して色補正やフィルタリング(ぼかしやシャープネスなど)などの画像処理を施す画像処理ユニット200を備えている。   The image management unit 32 outputs a face detection unit 40 including face detection area data including face detection area data from a low resolution image data developed in the memory 30 using a face detection algorithm, and a high resolution developed in the memory 30. A density correction unit 50 that performs density correction on the image data, a density correction management unit 100 that sets and adjusts the density characteristic curve used by the density correction unit 50 based on the image characteristics of the image data, An image processing unit 200 that performs image processing such as filtering (such as blurring and sharpness) is provided.

顔検出ユニット40は汎用的なものを使用することが可能であり、ここでは、顔検出アルゴリズムに基づいて画像データ中の顔と見なされる領域を検出し、その顔位置とサイズ(顔位置を基点とした矩形画素領域の縦横サイズ)からなる顔検出領域データ、顔の向き、顔検出時に算定された信頼度が顔検出情報として出力するものが使われている。画像データから顔を検出する顔検出アルゴリズムは数多く知られているが、例えば、特開平11−339084号公報、特開2000−99722号公報、特開2000−22929号公報が参照される。また、この顔検出を自動的に行うのではなく、オペレータによって手動で行ってもよく、この場合顔検出ユニット40は顔検出アルゴリズムは持たず、オペレータの操作入力に基づく顔検出情報を出力するだけの構成となる。   A general-purpose face detection unit 40 can be used. Here, based on a face detection algorithm, an area considered as a face in image data is detected, and the face position and size (the face position as a base point) are detected. Are used as face detection information including face detection area data, face orientation, and reliability calculated at the time of face detection. Many face detection algorithms for detecting a face from image data are known. For example, JP-A-11-339084, JP-A-2000-99722, and JP-A-2000-22929 are referred to. In addition, the face detection may be performed manually by an operator instead of automatically. In this case, the face detection unit 40 does not have a face detection algorithm and only outputs face detection information based on an operation input of the operator. It becomes the composition of.

図4に示すように、濃度補正ユニット50は、濃度特性曲線を画像データの画像特性に基づいて濃度補正管理ユニット100によって設定調整された適正な濃度特性曲線を格納している濃度特性曲線テーブル52を用いて高解像度の画像データに対する濃度補正を実行する濃度補正部51からなる。一般的に、濃度補正部51はプログラムによって実現されており、濃度特性曲線テーブル52はルックアップテーブルといったデータ構造体によって実現されるが、本発明はこれに限定しているわけではない。   As shown in FIG. 4, the density correction unit 50 stores a density characteristic curve table 52 that stores an appropriate density characteristic curve that is set and adjusted by the density correction management unit 100 based on the image characteristics of the image data. Is used to perform density correction on high-resolution image data. Generally, the density correction unit 51 is realized by a program, and the density characteristic curve table 52 is realized by a data structure such as a look-up table. However, the present invention is not limited to this.

同様に図4に示すように、濃度補正管理ユニット100も、プログラムによって実現されているが、適正補正値を決定する適正補正モジュール60と、顔領域のコントラストである顔コントラストを決定する顔コントラスト修正モジュール70と、前記適正補正値に基づいて適正濃度補正曲線を生成するとともにこの適正濃度補正曲線を顔コントラストに基づいて修正する濃度特性曲線設定モジュール80から構成されている。   Similarly, as shown in FIG. 4, the density correction management unit 100 is also realized by a program, and an appropriate correction module 60 that determines an appropriate correction value and a face contrast correction that determines the face contrast that is the contrast of the face area. The module 70 includes a density characteristic curve setting module 80 that generates an appropriate density correction curve based on the appropriate correction value and corrects the appropriate density correction curve based on the face contrast.

適正補正モジュールは、図5に示されているように、第1補正サブモジュール60Aと第2補正サブモジュール60Bとにわけることができる。第1補正サブモジュール60Aは、顔検出評価部61と顔平均濃度算出部62と顔依存濃度特性曲線生成部63と基本濃度特性曲線生成部64と第1補正値決定部65を備えている。顔検出評価部61は、顔検出ユニット40から出力された顔検出情報によって規定される顔領域の画像情報から以後の処理に利用するに適した顔であるかどうかを判別する判別機能と、ここで適すると判別された顔が数個ある場合さらにその数を絞り込む選別機能を持つ。その際用いられる判別条件には、顔領域における肌色画素の割合や顔検出情報に含まれている信頼度が用いられ、選別条件には顔の位置やサイズや向き、顔領域の濃度などが用いられる。   As shown in FIG. 5, the proper correction module can be divided into a first correction submodule 60A and a second correction submodule 60B. The first correction submodule 60A includes a face detection evaluation unit 61, a face average density calculation unit 62, a face dependent density characteristic curve generation unit 63, a basic density characteristic curve generation unit 64, and a first correction value determination unit 65. The face detection evaluation unit 61 determines from the image information of the face area defined by the face detection information output from the face detection unit 40 whether the face is suitable for use in subsequent processing, If there are several faces that are determined to be suitable for the above, it has a sorting function to further reduce the number. The discrimination condition used at that time is the ratio of the skin color pixels in the face area and the reliability included in the face detection information, and the selection condition is the face position, size and orientation, the density of the face area, etc. It is done.

顔平均濃度算出部62は、顔検出評価部61によって選別された顔領域(単一でも複数でもよい)の平均濃度値を、各画素を構成するR・G・B濃度値の算術平均値を要素としてさらに顔領域全体を算術平均することにより算出する。   The face average density calculation unit 62 calculates the average density value of the face area (single or plural) selected by the face detection evaluation unit 61, and the arithmetic average value of the R, G, B density values constituting each pixel. Further, it is calculated by arithmetically averaging the entire face area as an element.

基本濃度特性曲線生成部64は、予め定められている基準となる特性(形状)を有する濃度特性曲線を基本補正値によって入力濃度を横軸、出力濃度を縦軸においた座標面上に位置決め(シフト)することで基本濃度特性曲線を生成する機能を有する。なお、濃度特性曲線を生成するといっても、一般的には直接濃度特性曲線を作り出すのではなく、この特性曲線の位置決めのためのパラメータを算出しているだけである。このことは、後述する各種濃度特性曲線の生成においてもいえる。つまり、図6から明らかなように、基本補正値を入力濃度値とした場合にニュートラルグレーである出力濃度値(16ビットデータで95×256)になるように、基準となる特性を有する濃度特性曲線をシフトさせることで生成された濃度特性曲線が基本濃度特性曲線である。基本補正値を算出するアルゴリズムは種々のものが知られているが、ここでは入力された画像データの各種画像特性を説明変数として重回帰分析で得られる値を採用している。   The basic density characteristic curve generation unit 64 positions a density characteristic curve having a predetermined reference characteristic (shape) on a coordinate plane based on the basic correction value on the coordinate plane with the input density on the horizontal axis and the output density on the vertical axis ( And has a function of generating a basic density characteristic curve. Note that even if the density characteristic curve is generated, generally, the density characteristic curve is not directly generated, but only a parameter for positioning the characteristic curve is calculated. This is also true for the generation of various density characteristic curves described later. That is, as is apparent from FIG. 6, when the basic correction value is used as the input density value, the density characteristic having the reference characteristic so that the output density value is neutral gray (95 × 256 for 16-bit data). A density characteristic curve generated by shifting the curve is a basic density characteristic curve. Various algorithms for calculating a basic correction value are known, but here, values obtained by multiple regression analysis are adopted using various image characteristics of input image data as explanatory variables.

顔依存濃度特性曲線生成部63は、前述した基本濃度特性曲線生成部64と類似する機能を有しており、ここでは基本補正値の代わりに顔平均濃度算出部62で算出した顔平均濃度値を用いる。つまり、図7から明らかなように、顔平均濃度値を入力濃度値とした場合に最も顔が美しく表現されるとみなされている濃度値が出力濃度値(16ビットデータで160×256)になるように、基準となる特性を有する濃度特性曲線をシフトさせることで生成された濃度特性曲線が顔依存濃度特性曲線となる。   The face-dependent density characteristic curve generation unit 63 has a function similar to the basic density characteristic curve generation unit 64 described above, and here, the face average density value calculated by the face average density calculation unit 62 instead of the basic correction value. Is used. That is, as apparent from FIG. 7, when the face average density value is set as the input density value, the density value that is considered to express the face most beautifully is the output density value (160 × 256 in 16-bit data). Thus, the density characteristic curve generated by shifting the density characteristic curve having the reference characteristic becomes the face-dependent density characteristic curve.

顔も顔以外の背景もバランス良く仕上げるためには、実際に濃度補正部51で用いられる適正濃度特性曲線を前述した基本濃度特性曲線と顔依存濃度特性曲線の間であって処理対象となる画像データの濃度補正に適した位置に設定することが重要である。このため、第1補正値決定部65は、基本濃度特性曲線と顔依存濃度特性曲線との差である第1差分値ΔD1を求め、この第1差分値ΔD1を次の判別条件にかけることにより、第1補正値:ε1を決定する(ここで濃度は16ビットデータで表現されているとする);
(1)ΔD1<-6000の場合ε1=v1(負の数)であり、
(2)ΔD1>12000の場合ε1=v2(正の数)であり、
(3)0<=ΔD1<=1000の場合ε1=v3(v1<<v3<<v2)であり、
(4)前記(1)〜(3)以外の場合ε1=ΔD1×0.5である、
この第1差分値ΔD1は、同一の出力濃度値をもたらすそれぞれの入力濃度値の差で表されており、全域にわたる両濃度特性曲線間の平均差として求められてもよいし、又は、顔領域にわたる両濃度特性曲間の平均差として求められてもよいし、又は特定出力値における両濃度特性曲線間の差として求められてもよい。もちろん、そのような差を求める複数のサブプログラムを用意しておき、選択的に切り換えるような構成を採用してもよい。
In order to finish the face and the background other than the face in a well-balanced manner, the appropriate density characteristic curve that is actually used in the density correction unit 51 is an image to be processed between the basic density characteristic curve and the face-dependent density characteristic curve described above. It is important to set a position suitable for data density correction. For this reason, the first correction value determination unit 65 obtains a first difference value ΔD1 that is the difference between the basic density characteristic curve and the face-dependent density characteristic curve, and applies the first difference value ΔD1 to the next determination condition. First correction value: ε1 is determined (assuming that the density is expressed by 16-bit data);
(1) When ΔD1 <−6000, ε1 = v1 (negative number),
(2) When ΔD1> 12000, ε1 = v2 (positive number),
(3) When 0 <= ΔD1 <= 1000, ε1 = v3 (v1 << v3 << v2),
(4) In cases other than the above (1) to (3), ε1 = ΔD1 × 0.5.
The first difference value ΔD1 is represented by the difference between the input density values that give the same output density value, and may be obtained as an average difference between the two density characteristic curves over the entire area, or the face area. It may be obtained as an average difference between the two density characteristic songs over a range, or as a difference between the two density characteristic curves at a specific output value. Of course, a configuration may be adopted in which a plurality of subprograms for obtaining such a difference are prepared and selectively switched.

濃度特性曲線設定モジュール80は、このようにして決定された第1補正値ε1を基本補正値に加えた濃度値を入力濃度値とした場合にニュートラルグレーである出力濃度値(16ビットデータで95×256)になるように、基準となるように濃度特性曲線をシフトさせることで濃度補正部51で用いられる適正濃度特性曲線を生成する(図8参照)。   When the density value obtained by adding the first correction value ε1 thus determined to the basic correction value is used as the input density value, the density characteristic curve setting module 80 outputs an output density value (95 for 16-bit data). The appropriate density characteristic curve used in the density correction unit 51 is generated by shifting the density characteristic curve so as to be a reference so that the standard density characteristic curve becomes × 256) (see FIG. 8).

しかしながら、この第1補正値ε1で適正濃度特性曲線を設定した場合画像全体の平均濃度と顔領域の平均濃度の差が少ない撮影画像では顔領域を重視しすぎるような表現になりがちなので、この実施形態では、第1補正値ε1に加えて画像全体の平均濃度値も考慮して決定された第2補正値ε2によって最終的な適正濃度特性曲線を設定する。この第2補正値は第2補正サブモジュール60Bによって出力される。このため、第2補正サブモジュール60Bは、メモリ30に展開された低解像度の画像データの全領域を構成する画素の平均濃度値である画像濃度値を算出する画像平均濃度算出部67と第2補正値決定部68を備えている。第2補正値決定部68は、前述した顔平均濃度算出部62で算出された顔平均濃度値と前記画像平均濃度算出部67で算出された画像平均濃度値との差である第2差分値から調整率を決定するとともにこの第1補正値ε1と前記調整率から第2補正値ε2を決定する。その際、第2差分値ΔD2と第1補正値ε1を用いて(ここでも濃度は16ビットデータで表現されているとする)、調整率ξは、以下の判別条件から決定される;
(1)(-3000<=ΔD2<-2000)かつ(ε1>=0)の場合ξ=w1であり、
(2)(-2000<=ΔD2<-1000)かつ(ε1>=0)の場合ξ=w2であり、
(3)(-1000<=ΔD2<1000)かつ(ε1>=0)の場合ξ=w3であり、
(4)(1000<=ΔD2<2000)かつ(ε1>=0)の場合ξ=w4であり、
(5)(2000<=ΔD2<3000)かつ(ε1>=0)の場合ξ=w5であり、
(6)(-2000<=ΔD2<-1000)かつ(ε1<0)の場合ξ=w6であり、
(7)(-1000<=ΔD2<1000)かつ(ε1<0)の場合ξ=w7であり、
(8)(1000<=ΔD2<2000)かつ(ε1<0)の場合ξ=w8であり、
(9)前記(1)〜(8)以外の場合ξ=w9で、
その際上記w1,w2,w3,w4,w5は1.0を越える正の数でかつw1<w2<w3、w5<w4<w3であり、w6,w7,w8は1.0を下回る正の数でかつw7<w8、w7<w6であり、w9はw1<w9<w7の関係をもっている。
このようにして決定された調整率ξを第1補正値ε1に乗算することにより第2補正値ε2が求まる(ε2=ε1×ξ)。濃度特性曲線設定モジュール80は、このようにして決定された第2補正値ε2を基本補正値に加えた濃度値を入力濃度値とした場合にニュートラルグレーである出力濃度値(16ビットデータで95×256)になるように、基準となるように濃度特性曲線をシフトさせることで濃度補正部51で用いられる適正濃度特性曲線を生成する(図9参照)。第2補正値ε2を基本補正値に加えた濃度値をここでは適正補正値と呼ぶことにする。
However, when an appropriate density characteristic curve is set with the first correction value ε1, a photographed image with a small difference between the average density of the entire image and the average density of the face area tends to express the face area too much. In the embodiment, the final appropriate density characteristic curve is set by the second correction value ε2 determined in consideration of the average density value of the entire image in addition to the first correction value ε1. The second correction value is output by the second correction submodule 60B. For this reason, the second correction submodule 60B includes an image average density calculation unit 67 that calculates an image density value that is an average density value of pixels constituting the entire area of the low-resolution image data developed in the memory 30, and the second correction submodule 60B. A correction value determination unit 68 is provided. The second correction value determination unit 68 is a second difference value that is a difference between the face average density value calculated by the face average density calculation unit 62 and the image average density value calculated by the image average density calculation unit 67. Then, the adjustment rate is determined, and the second correction value ε2 is determined from the first correction value ε1 and the adjustment rate. At that time, using the second difference value ΔD2 and the first correction value ε1 (again, the density is expressed by 16-bit data), the adjustment rate ξ is determined from the following determination conditions;
(1) When (−3000 <= ΔD2 <−2000) and (ε1> = 0), ξ = w1,
(2) In the case of (−2000 <= ΔD2 <−1000) and (ε1> = 0), ξ = w2,
(3) When (−1000 <= ΔD2 <1000) and (ε1> = 0), ξ = w3,
(4) In the case of (1000 <= ΔD2 <2000) and (ε1> = 0), ξ = w4,
(5) When (2000 <= ΔD2 <3000) and (ε1> = 0), ξ = w5,
(6) When (−2000 <= ΔD2 <−1000) and (ε1 <0), ξ = w6,
(7) (−1000 <= ΔD2 <1000) and (ε1 <0) ξ = w7,
(8) When (1000 <= ΔD2 <2000) and (ε1 <0), ξ = w8,
(9) In cases other than (1) to (8) above, ξ = w9,
At that time the w1, w2, w3, w 4 , w5 are each a positive number a and w1 <w2 <w3, w5 < w4 <w3 exceeding 1.0, w6, w7, w8 is and a positive number less than 1.0 w7 <w8, w7 <w6, and w9 has a relationship of w1 <w9 <w7.
By multiplying the first correction value ε1 by the adjustment rate ξ determined in this way, the second correction value ε2 is obtained (ε2 = ε1 × ξ). When the density value obtained by adding the second correction value ε2 determined in this way to the basic correction value is used as the input density value, the density characteristic curve setting module 80 outputs an output density value that is neutral gray (95 for 16-bit data). The proper density characteristic curve used in the density correction unit 51 is generated by shifting the density characteristic curve so that it becomes a reference so that the standard density characteristic curve becomes × 256) (see FIG. 9). The density value obtained by adding the second correction value ε2 to the basic correction value is referred to as an appropriate correction value here.

次に、適正補正モジュール60によって決定された適正濃度特性曲線における顔領域のコントラストを補正する顔コントラスト修正モジュールを説明する。この顔コントラスト修正モジュール70は、図10に示されるように、上述した顔検出評価部61で選別された顔領域における、好ましくはその顔領域における肌色領域における平均濃度値(顔平均濃度値)や最大濃度値や最小濃度値を算出する顔濃度算出部71と、写真フィルムの素抜け部の濃度値であるフィルムベース濃度や光学的黒レベルに関係づけられた濃度値である画像ベース濃度をベース濃度として算出するベース濃度算出部72と、顔平均濃度値とベース濃度値の差をパラメータとして顔領域の濃度特性曲線の傾きを示す顔コントラスト係数を算出する顔コントラスト係数算出部73と、顔最大濃度値と顔最小濃度値と顔コントラスト係数と適正補正モジュール60によって決定された適正濃度補正値とによって顔コントラストを決定する顔コントラスト決定部74とを備えている。この実施形態では、顔平均濃度値は適正補正モジュール60の顔平均濃度算出部62で算出されているので、それを利用することも可能であるし、顔平均濃度算出62で顔平均濃度値だけでなく顔最大濃度値と顔最小濃度値も算出して記憶させておくことで、顔濃度算出部71を省くことも可能である。   Next, the face contrast correction module for correcting the contrast of the face area in the appropriate density characteristic curve determined by the appropriate correction module 60 will be described. As shown in FIG. 10, the face contrast correction module 70 includes an average density value (face average density value) in a face area selected by the face detection evaluation unit 61 described above, preferably a skin color area in the face area. Based on the face density calculation unit 71 for calculating the maximum density value and the minimum density value, and the image base density which is the density value related to the film base density and the optical black level which is the density value of the blank portion of the photographic film. A base density calculation unit 72 that calculates the density; a face contrast coefficient calculation unit 73 that calculates a face contrast coefficient indicating the gradient of the density characteristic curve of the face region using the difference between the face average density value and the base density value as a parameter; The face contrast based on the density value, the minimum face density value, the face contrast coefficient, and the appropriate density correction value determined by the appropriate correction module 60. And a face contrast determining unit 74 for determining a. In this embodiment, since the face average density value is calculated by the face average density calculation unit 62 of the appropriate correction module 60, it can be used, or only the face average density value is calculated by the face average density calculation 62. It is also possible to omit the face density calculation unit 71 by calculating and storing the face maximum density value and the face minimum density value instead.

顔コントラスト係数算出部73における顔コントラスト係数の算出プロセスでは、図11に示されているように、まずベース濃度(図中bDで示されいる)と顔平均濃度(図中fDaveで示されている)の間の差(濃度距離)aが求められ、この濃度距離aを関数fに代入することでコントラスト係数(傾き)αを得る。この関数fは濃度距離aをパラメータとしてコントラスト係数αを求めるものであり、予め実験的に求められている。図11に暗示されているように、次のプロセスで求められる顔コントラストは、顔最小濃度値(図中fDminで示されている)と顔最大濃度値(図中fDmaxで示されている)との間の領域で傾きαを有する無数の直線の1つである。   In the face contrast coefficient calculation process in the face contrast coefficient calculation unit 73, as shown in FIG. 11, first, the base density (indicated by bD in the figure) and the face average density (indicated by fDave in the figure). ) (Concentration distance) a is obtained, and the contrast coefficient (slope) α is obtained by substituting the density distance a into the function f. This function f is used to obtain the contrast coefficient α using the density distance a as a parameter, and is obtained experimentally in advance. As implied in FIG. 11, the face contrast obtained in the following process is the minimum face density value (indicated by fDmin in the figure) and the maximum face density value (indicated by fDmax in the figure). One of innumerable straight lines having an inclination α in the region between.

次に顔コントラスト決定部74における顔コントラストの決定プロセスでは、図12に示されているように、適正補正モジュール60で決定された適正補正値を入力濃度とした場合にその出力濃度値が最も顔が美しく表現されるとみなされている濃度値160×256(16ビットデータ)になる点が決定され、さらに顔コントラスト係数算出部73で規定される無数の直線(図11参照)の内でこの点を通過する直線を特定し、この直線を顔コントラストとして決定する。   Next, in the process of determining the face contrast in the face contrast determination unit 74, as shown in FIG. 12, when the appropriate correction value determined by the appropriate correction module 60 is used as the input density, the output density value is the face most. Is determined to be a beautifully expressed density value of 160 × 256 (16-bit data), and within the infinite number of straight lines (see FIG. 11) defined by the face contrast coefficient calculation unit 73 A straight line passing through the point is specified, and this straight line is determined as the face contrast.

濃度特性曲線決定モジュール80は、図13で模式的に示されているように、この決定された顔コントラストを適正補正モジュール60によって決定された適正濃度特性曲線に組み合わせることで顔領域のコントラストが調整された適正濃度特性曲線を生成する。つまり、調整された適正濃度特性曲線では、顔領域における部分が顔コントラスト決定部74で決定された顔コントラストに置き換わっている。   The density characteristic curve determination module 80 adjusts the contrast of the face area by combining the determined face contrast with the appropriate density characteristic curve determined by the appropriate correction module 60, as schematically shown in FIG. A proper density characteristic curve is generated. That is, in the adjusted appropriate density characteristic curve, the part in the face area is replaced with the face contrast determined by the face contrast determination unit 74.

このように構成された濃度補正管理ユニット100による適正濃度特性曲線の設定とその顔領域のコントラスト補正の処理手順を説明する。適正補正モジュール60における適正濃度特性曲線の決定処理が図14に示されている。まずメモリ30に展開されている低解像度画像データから重回帰式を用いて得られた基本補正値から図6に示されているような基本濃度特性曲線を生成する(#01)。同時に顔検出ユニット40から出力された顔検出情報から顔が検出されたかどうかがチェックされ(#02)、顔が検出されていない場合(#02No分岐)、ステップ#01で生成された基本濃度特性曲線が濃度補正部51で用いられる適正濃度特性曲線として濃度特性曲線テーブル52に設定される(#03)。もし顔検出ユニット40で1つ以上の顔が検出されている場合(#02Yes分岐)、顔検出情報を参照して算出される顔画素の数に対する肌色画素の数の割合である肌割合に基づいて前選別されるとともに必要に応じてこの前選別された顔からさらに顔検出情報に含まれている顔位置と顔サイズに基づいて求められた最適な理想顔を基準顔としてこの基準顔から所定の乖離度内に入る顔だけを以後の処理のために選別する選別処理が行われる(#04)。選別された顔の顔領域、好ましくは顔領域の内の肌色領域の平均濃度が顔平均濃度値として算出される(#05)。算出された顔平均濃度値から図7に示されているような顔依存濃度特性曲線を生成する(#06)。顔依存濃度特性曲線と基本濃度特性曲線の入力濃度軸方向の差である第1差分値を求める(#07)。第1差分値から上述した判別条件を用いて第1補正値を決定する(#08)。第1補正値を用いて図8に示されているような適正濃度特性曲線を生成する(#09)。   A procedure for setting an appropriate density characteristic curve and correcting the contrast of the face area by the density correction management unit 100 configured as described above will be described. FIG. 14 shows a process for determining an appropriate density characteristic curve in the appropriate correction module 60. First, a basic density characteristic curve as shown in FIG. 6 is generated from the basic correction value obtained from the low resolution image data developed in the memory 30 using a multiple regression equation (# 01). At the same time, it is checked whether or not a face is detected from the face detection information output from the face detection unit 40 (# 02). If no face is detected (# 02 No branch), the basic density characteristic generated in step # 01 is checked. The curve is set in the density characteristic curve table 52 as an appropriate density characteristic curve used in the density correction unit 51 (# 03). If one or more faces are detected by the face detection unit 40 (# 02 Yes branch), based on the skin ratio that is the ratio of the number of skin color pixels to the number of face pixels calculated by referring to the face detection information. If necessary, a pre-selected face is selected from the pre-selected face based on the optimal ideal face obtained based on the face position and face size included in the face detection information. A selection process is performed in which only faces that fall within the divergence degree are selected for subsequent processing (# 04). The average density of the face area of the selected face, preferably the skin color area of the face area, is calculated as the face average density value (# 05). A face-dependent density characteristic curve as shown in FIG. 7 is generated from the calculated face average density value (# 06). A first difference value that is a difference between the face-dependent density characteristic curve and the basic density characteristic curve in the input density axis direction is obtained (# 07). The first correction value is determined from the first difference value using the above-described determination condition (# 08). An appropriate density characteristic curve as shown in FIG. 8 is generated using the first correction value (# 09).

次に、メモリ30に展開されている低解像度画像データから画像全体の平均濃度値を画像平均濃度値として算出する(#10)。続いて、この画像平均濃度値とステップ#05で算出した顔平均濃度値との差を第2差分値として算出し(#11)、さらにこの第2差分値とステップ#8で決定した第1補正値から上述した判別条件を用いて修正率を決定する(#12)。第1補正値と修正率を乗算して第2補正値を得る(#13)。第2補正値を用いて図8に示されているような適正濃度特性曲線を生成する(#14)。以上の処理により、適正濃度特性曲線及び第2補正値ε2を基本補正値に加えた濃度値である適正補正値が得られたことになる。   Next, the average density value of the entire image is calculated as the image average density value from the low resolution image data developed in the memory 30 (# 10). Subsequently, the difference between the image average density value and the face average density value calculated in step # 05 is calculated as a second difference value (# 11). Further, the second difference value and the first difference determined in step # 8 are calculated. The correction rate is determined from the correction value using the above-described determination condition (# 12). A second correction value is obtained by multiplying the first correction value and the correction rate (# 13). An appropriate density characteristic curve as shown in FIG. 8 is generated using the second correction value (# 14). Through the above processing, an appropriate correction value that is a density value obtained by adding the appropriate density characteristic curve and the second correction value ε2 to the basic correction value is obtained.

この適正濃度特性曲線の顔領域におけるコントラスト補正の処理が図15に示されている。まず、顔平均濃度値と顔最大濃度値と顔最小濃度値と求めるともに(#31)、ベース濃度値を求める(#32)。ベース濃度値と顔平均濃度値の差である濃度距離aを算出する(#33)。濃度距離値aから関数f(ルックアップテーブルとして構成することが好ましい)を用いてコントラスト係数αを決定する(#34)。適正補正値を(#35)。適正補正モジュール60から取得する適正補正値と顔最大濃度値と顔最小濃度値とコントラスト係数とから顔コントラストを決定する(図12参照、#36)。濃度特性曲線設定モジュール80が顔コントラスト修正モジュール70から出力される顔コントラストと適正補正モジュール60から出力されるする適正濃度特性曲線から顔領域のコントラストが修正された新たな適正濃度特性曲線を生成する(図13参照、#37)。このようにして最終的に生成された適正濃度特性曲線を濃度特性曲線テーブル52に設定する(#38)。以上の手順を経て、濃度特性曲線テーブル52にはメモリ30に展開されている顔を含む低解像度画像データに最適な濃度特性曲線が設定されたことになるので、次に、濃度補正ユニット50はメモリ3に展開される対応する高解像度画像データに対して濃度補正処理を行う。これにより、プリントに使用される高解像度画像データは顔領域のコントラストも最適に調整されることになり、結果的に顔が美しく表現された写真プリントを出力することができる。   FIG. 15 shows a contrast correction process in the face area of the appropriate density characteristic curve. First, the face average density value, the face maximum density value, and the face minimum density value are obtained (# 31), and the base density value is obtained (# 32). A density distance a which is a difference between the base density value and the face average density value is calculated (# 33). The contrast coefficient α is determined from the density distance value a using a function f (preferably configured as a look-up table) (# 34). An appropriate correction value is set (# 35). The face contrast is determined from the appropriate correction value, the face maximum density value, the face minimum density value, and the contrast coefficient acquired from the appropriate correction module 60 (see FIG. 12, # 36). The density characteristic curve setting module 80 generates a new appropriate density characteristic curve in which the contrast of the face area is corrected from the face contrast output from the face contrast correction module 70 and the appropriate density characteristic curve output from the appropriate correction module 60. (See FIG. 13, # 37). The proper density characteristic curve finally generated in this way is set in the density characteristic curve table 52 (# 38). Through the above procedure, the density characteristic curve table 52 has been set with the optimum density characteristic curve for the low resolution image data including the face developed in the memory 30. Density correction processing is performed on the corresponding high-resolution image data developed in the memory 3. As a result, the contrast of the face area of the high-resolution image data used for printing is optimally adjusted, and as a result, a photographic print that expresses the face beautifully can be output.

上述した実施の形態では、プリントステーション1Bは、印画紙Pに対し、露光エンジンを備えたプリント露光部14で撮影画像の露光を行い、この露光後の印画紙Pを複数の現像処理する、いわゆる銀塩写真プリント方式を採用していたが、もちろん、本発明におけるプリントステーション1Bは、このような方式に限定されるわけではなく、例えば、フィルムや紙にインクを吐出して画像を形成するインクジェットプリント方式や感熱転写シートを用いた熱転写方式など、種々の写真プリント方式を採用することができる。   In the above-described embodiment, the print station 1B exposes a photographed image to the photographic paper P by the print exposure unit 14 having an exposure engine, and performs a plurality of development processes on the photographic paper P after the exposure. Although the silver salt photographic printing method was adopted, of course, the printing station 1B according to the present invention is not limited to such a method. For example, an ink jet that ejects ink onto a film or paper to form an image. Various photographic printing methods such as a printing method and a thermal transfer method using a thermal transfer sheet can be employed.

本発明は、撮影画像データから検出された顔の画像特性を利用して顔領域のコントラストが最適に調整された濃度特性曲線を生成する技術分野、特に撮影画像データから写真プリントを作成する写真プリント装置へ組み込まれるコントラスト調整モジュールとして広く利用することができる。   The present invention relates to a technical field for generating a density characteristic curve in which the contrast of a face area is optimally adjusted by using face image characteristics detected from photographed image data, and more particularly to a photographic print for creating a photographic print from photographed image data It can be widely used as a contrast adjustment module incorporated in the apparatus.

本発明による濃度補正管理技術を採用した写真プリント装置の外観図External view of photographic printing apparatus employing density correction management technology according to the present invention 写真プリント装置のプリントステーションの構成を模式的に示す模式図Schematic diagram schematically showing the configuration of the print station of the photo printing device 写真プリント装置のコントローラ内に構築される機能要素を説明する機能ブロック図Functional block diagram explaining the functional elements built in the controller of the photo printing device 濃度補正補正管理ユニットの機能構成を示す機能ブロック図Functional block diagram showing the functional configuration of the density correction correction management unit 適正補正モジュールの機能構成を示す機能ブロック図Functional block diagram showing the functional configuration of the appropriate correction module 基本濃度特性曲線の生成を説明する模式図Schematic diagram explaining generation of basic density characteristic curve 顔依存濃度特性曲線の生成を説明する模式図Schematic diagram explaining generation of face-dependent density characteristic curve 濃度補正管理ユニットの第1実施形態における適正濃度特性曲線の生成を説明する模式図Schematic diagram for explaining generation of an appropriate density characteristic curve in the first embodiment of the density correction management unit. 濃度補正管理ユニットの第2実施形態における適正濃度特性曲線の生成を説明する模式図Schematic diagram illustrating generation of an appropriate density characteristic curve in the second embodiment of the density correction management unit 顔コントラスト修正モジュールの機能構成を示す機能ブロック図Functional block diagram showing the functional configuration of the face contrast correction module コントラスト係数の算出手順を説明する模式図Schematic diagram explaining the contrast coefficient calculation procedure 顔コントラストの決定手順を説明する模式図Schematic diagram explaining the procedure for determining the face contrast 顔領域における顔コントラストが修正された適正濃度特性曲線を生成する模式図Schematic diagram for generating an appropriate density characteristic curve with corrected face contrast in the face area 適正濃度特性曲線を生成する処理の流れを示すフローチャートFlow chart showing the flow of processing for generating an appropriate density characteristic curve 顔領域における顔コントラストが修正された適正濃度特性曲線を生成する処理の流れを示すフローチャートThe flowchart which shows the flow of the process which produces | generates the appropriate density characteristic curve by which the face contrast in the face area | region was corrected

符号の説明Explanation of symbols

30:メモリ
40:顔検出ユニット
50:濃度補正ユニット
51:濃度補正部
52:濃度特性曲線テーブル
60:適正補正モジュール
60A:第1補正サブモジュール
60B:第2補正サブモジュール
61:顔検出評価部
62:顔平均濃度算出部
63:顔依存濃度特性曲線生成部
64:基本濃度特性曲線生成部
65:第1補正値決定部
67:画像平均濃度算出部
68:第2補正値決定部
70:顔コントラスト修正モジュール
71:顔濃度算出部
72:ベース濃度算出部
73:顔コントラスト係数算出部
74:顔コントラスト決定部
80:濃度特性曲線設定モジュール
100:濃度補正管理ユニット
200:画像処理ユニット
30: Memory 40: Face detection unit 50: Density correction unit 51: Density correction unit 52: Density characteristic curve table 60: Appropriate correction module 60A: First correction submodule 60B: Second correction submodule 61: Face detection evaluation unit 62 : Face average density calculation unit 63: face dependent density characteristic curve generation unit 64: basic density characteristic curve generation unit 65: first correction value determination unit 67: image average density calculation unit 68: second correction value determination unit 70: face contrast Correction module 71: Face density calculation unit 72: Base density calculation unit 73: Face contrast coefficient calculation unit 74: Face contrast determination unit 80: Density characteristic curve setting module 100: Density correction management unit 200: Image processing unit

Claims (4)

顔領域を含む撮影画像データの濃度補正に用いられる入力濃度と出力濃度との関係を規定する濃度特性曲線における顔領域のコントラストを調整するコントラスト調整方法において、
前記撮影画像データから顔領域を検出するステップと、
前記撮影画像データに基づいて算出され、所定の濃度特性曲線を入力濃度の軸に平行にシフトさせることにより当該撮影データに適した補正を実現する適正濃度特性曲線を生成するためのシフト量を規定する適正濃度補正値を当該所定の濃度特性曲線の入力濃度値とした際に対応する出力濃度値がニュートラルグレーとなるよう当該所定の濃度特性曲線を前記入力濃度の軸に平行にシフトさせることにより前記適正濃度特性曲線を生成するステップと、
前記撮影画像データの前記顔領域から顔平均濃度値を算出するステップと、
前記撮影画像データの写真フィルムの素抜け部の濃度値もしくは光学的黒レベルに関係付けられた濃度値であるベース濃度値を算出するステップと、
前記顔平均濃度と前記ベース濃度値の差を入力濃度のコントラストと出力濃度のコントラストとの比率を規定するコントラスト係数を算出するための所定の関数に代入することにより顔領域に含まれる画素の濃度値域における濃度特性曲線の傾きを示す顔コントラスト係数を算出するステップと、
前記顔平均濃度値を含む所定濃度値の範囲内で前記顔コントラスト係数を傾きとする直線のうち前記適正濃度補正値を入力濃度とした際に対応する出力濃度値が顔に適した濃度値となる直線を顔コントラストとして決定するステップと、
前記適正濃度特性曲線のうち入力濃度値が前記所定濃度の範囲を前記顔コントラストで置換することで前記適正濃度特性曲線から顔領域のコントラストを調整するための調整適正濃度特性曲線を生成するステップと、
前記調整適正濃度特性曲線に基づき前記撮影画像データの濃度補正を行うステップと、からなることを特徴とするコントラスト調整方法。
In a contrast adjustment method for adjusting the contrast of a face area in a density characteristic curve that defines the relationship between input density and output density used for density correction of captured image data including a face area,
Detecting a face region from the captured image data;
A shift amount for generating an appropriate density characteristic curve that is calculated based on the photographed image data and realizes correction suitable for the photographed data by shifting a predetermined density characteristic curve parallel to the axis of input density is defined. By shifting the predetermined density characteristic curve in parallel with the input density axis so that the corresponding output density value becomes neutral gray when the appropriate density correction value to be used is the input density value of the predetermined density characteristic curve. Generating the appropriate density characteristic curve;
Calculating a face average density value from the face area of the captured image data;
Calculating a base density value, which is a density value related to an optical black level or a density value of a blank portion of the photographic film of the photographed image data;
By substituting the difference between the face average density value and the base density value into a predetermined function for calculating a contrast coefficient that defines the ratio between the contrast of the input density and the contrast of the output density, the pixels included in the face area Calculating a face contrast coefficient indicating the slope of the density characteristic curve in the density value range;
Of the straight lines having the face contrast coefficient as a slope within the range of the predetermined density value including the face average density value, the output density value corresponding to the input density as the appropriate density correction value is a density value suitable for the face. Determining a straight line as face contrast;
Generating an adjusted appropriate density characteristic curve for adjusting the contrast of the face area from the appropriate density characteristic curve by replacing the range of the predetermined density of the appropriate density characteristic curve within the predetermined density with the face contrast; ,
And a step of correcting the density of the photographed image data based on the appropriate adjustment density characteristic curve.
前記顔領域の撮影画像データから顔最大濃度値と顔最小濃度値を算出するステップが含まれ、かつ前記コントラストの決定ステップにおいて、前記所定濃度値の範囲が前記顔最大濃度値と前記顔最小濃度値の範囲であることを特徴とする請求項1に記載のコントラスト調整方法。   A step of calculating a face maximum density value and a face minimum density value from the captured image data of the face area, and in the contrast determining step, the range of the predetermined density value is the face maximum density value and the face minimum density The contrast adjustment method according to claim 1, wherein the contrast adjustment method is in a range of values. 前記請求項1〜2に記載のコントラスト調整方法をコンピュータに実行させるためのプログラム。   The program for making a computer perform the contrast adjustment method of the said Claims 1-2. 顔領域を含む撮影画像データの濃度補正に用いられる入力濃度と出力濃度との関係を規定する濃度特性曲線における顔領域のコントラストを調整するコントラスト調整装置において、
前記撮影画像データから顔領域を検出する顔検出ユニットと、
前記撮影画像データに基づいて算出され、所定の濃度特性曲線を入力濃度の軸に平行にシフトさせることにより当該撮影データに適した補正を実現する適正濃度特性曲線を生成するためのシフト量を規定する適正濃度補正値を当該所定の濃度特性曲線の入力濃度値とした際に対応する出力濃度値がニュートラルグレーとなるよう当該所定の濃度特性曲線を前記入力濃度の軸に平行にシフトさせることにより前記適正濃度特性曲線を生成する適正補正モジュールと、
前記撮影画像データの前記顔領域から顔平均濃度値を算出する顔濃度算出部と、
前記撮影画像データのベース濃度値を算出する写真フィルムの素抜け部の濃度値もしくは光学的黒レベルに関係付けられた濃度値であるベース濃度算出部と、
前記顔平均濃度と前記ベース濃度値の差を入力濃度のコントラストと出力濃度のコントラストとの比率を規定するコントラスト係数を算出するための所定の関数に代入することにより顔領域に含まれる画素の濃度値域における濃度特性曲線の傾きを示す顔コントラスト係数を算出する顔コントラスト係数算出部と、
前記顔平均濃度値を含む所定濃度値の範囲内で前記顔コントラスト係数を傾きとする直線のうち前記適正濃度補正値を入力濃度とした際に対応する出力濃度値が顔に適した濃度値となる直線を顔コントラストとして決定する顔コントラスト決定部と、
前記適正濃度特性曲線のうち入力濃度値が前記所定濃度の範囲を前記顔コントラストで置換することで前記適正濃度特性曲線における顔領域のコントラストを調整するための調整濃度特性曲線を生成する濃度特性曲線決定モジュールと、
前記調整適正濃度特性曲線に基づき前記撮影画像データの濃度補正を行う濃度補正部と、
からなることを特徴とするコントラスト調整装置。
In a contrast adjustment device that adjusts the contrast of a face area in a density characteristic curve that defines the relationship between input density and output density used for density correction of captured image data including a face area,
A face detection unit for detecting a face area from the captured image data;
A shift amount for generating an appropriate density characteristic curve that is calculated based on the photographed image data and realizes correction suitable for the photographed data by shifting a predetermined density characteristic curve parallel to the axis of input density is defined. By shifting the predetermined density characteristic curve in parallel with the input density axis so that the corresponding output density value becomes neutral gray when the appropriate density correction value to be used is the input density value of the predetermined density characteristic curve. An appropriate correction module for generating the appropriate density characteristic curve;
A face density calculation unit that calculates a face average density value from the face area of the captured image data;
A base density calculation unit that is a density value related to an optical black level or a density value of a blank portion of a photographic film that calculates a base density value of the photographed image data;
By substituting the difference between the face average density value and the base density value into a predetermined function for calculating a contrast coefficient that defines the ratio between the contrast of the input density and the contrast of the output density, the pixels included in the face area A face contrast coefficient calculating unit for calculating a face contrast coefficient indicating the slope of the density characteristic curve in the density value range;
Of the straight lines having the face contrast coefficient as a slope within the range of the predetermined density value including the face average density value, the output density value corresponding to the input density as the appropriate density correction value is a density value suitable for the face. A face contrast determination unit that determines a straight line as the face contrast;
A density characteristic curve that generates an adjusted density characteristic curve for adjusting the contrast of the face area in the appropriate density characteristic curve by replacing the range of the predetermined density of the appropriate density characteristic curve within the predetermined density with the face contrast. A decision module;
A density correction unit that performs density correction of the captured image data based on the adjustment appropriate density characteristic curve;
A contrast adjusting device characterized by comprising:
JP2003390349A 2003-11-20 2003-11-20 Contrast adjustment method and contrast adjustment apparatus for implementing the method Expired - Fee Related JP4284604B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003390349A JP4284604B2 (en) 2003-11-20 2003-11-20 Contrast adjustment method and contrast adjustment apparatus for implementing the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003390349A JP4284604B2 (en) 2003-11-20 2003-11-20 Contrast adjustment method and contrast adjustment apparatus for implementing the method

Publications (2)

Publication Number Publication Date
JP2005159388A JP2005159388A (en) 2005-06-16
JP4284604B2 true JP4284604B2 (en) 2009-06-24

Family

ID=34717756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003390349A Expired - Fee Related JP4284604B2 (en) 2003-11-20 2003-11-20 Contrast adjustment method and contrast adjustment apparatus for implementing the method

Country Status (1)

Country Link
JP (1) JP4284604B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005159387A (en) * 2003-11-20 2005-06-16 Noritsu Koki Co Ltd Method of determining density characteristic curve and density correction management apparatus for executing this method
JP2007013666A (en) * 2005-06-30 2007-01-18 Victor Co Of Japan Ltd Image processor
WO2009072207A1 (en) * 2007-12-06 2009-06-11 Fujitsu Limited Image correction device, image correction program, and image correction method
WO2011030383A1 (en) * 2009-09-10 2011-03-17 株式会社 東芝 Image processing device

Also Published As

Publication number Publication date
JP2005159388A (en) 2005-06-16

Similar Documents

Publication Publication Date Title
JP4655210B2 (en) Density correction curve generation method and density correction curve generation module
JP4496465B2 (en) Red-eye correction method, program, and apparatus for implementing the method
JP2005141477A (en) Image sharpening process and image processor implementing this process
JP4441876B2 (en) Photographed image processing method, photographed image processing program, and photographed image processing apparatus
JP4284604B2 (en) Contrast adjustment method and contrast adjustment apparatus for implementing the method
JP2005159387A (en) Method of determining density characteristic curve and density correction management apparatus for executing this method
JP2005148915A (en) Proper face discrimination method and apparatus for implementing the method
JP4366634B2 (en) Noise pixel map creation method, apparatus and program for implementing the method, and photo print apparatus
JP2007249802A (en) Image processor and image processing method
JP2005190097A (en) Image correction deciding method and image processor using the same method
US20050213839A1 (en) Image processing method and software for suppressing granular noise and image processing apparatus for implementing the method
JP3576809B2 (en) Image processing device
JP4591784B2 (en) Method for creating conversion table for photographed image correction and photo printing apparatus for implementing this method
JP4798446B2 (en) Photographed image correction method and photographed image correction module
JP4441853B2 (en) Face selection method for density correction and apparatus for carrying out this method
JP2006186753A (en) Method and apparatus for processing photographic image
JP4655211B2 (en) Generation method, generation program and generation module of correction characteristics used for contrast correction
JP4731202B2 (en) Color correction processing method and color correction processing apparatus using the same
JP4793648B2 (en) Image correction unit and image correction program
JP3976810B2 (en) Color image brightness adjustment method and apparatus
JP3576812B2 (en) Image processing apparatus and image processing method
JP2006072743A (en) Catch light composition method and device
JP4378611B2 (en) A tilt correction method, a tilt correction program, and a photo printing apparatus with a tilt correction function
JP4835900B2 (en) Image processing method and image processing apparatus for image data from a digital camera
JP2005072850A (en) Adjusting method of three dimensional lut and color conversion system equipped with three dimensional lut

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060913

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080229

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080327

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081211

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090130

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090226

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090311

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120403

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120403

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees