JP4998794B2 - Image correction method and image correction apparatus - Google Patents

Image correction method and image correction apparatus Download PDF

Info

Publication number
JP4998794B2
JP4998794B2 JP2007308930A JP2007308930A JP4998794B2 JP 4998794 B2 JP4998794 B2 JP 4998794B2 JP 2007308930 A JP2007308930 A JP 2007308930A JP 2007308930 A JP2007308930 A JP 2007308930A JP 4998794 B2 JP4998794 B2 JP 4998794B2
Authority
JP
Japan
Prior art keywords
image
density value
input
correction
correction curve
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.)
Active
Application number
JP2007308930A
Other languages
Japanese (ja)
Other versions
JP2009134433A (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 Precision Co Ltd
Original Assignee
NK Works 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 NK Works Co Ltd filed Critical NK Works Co Ltd
Priority to JP2007308930A priority Critical patent/JP4998794B2/en
Publication of JP2009134433A publication Critical patent/JP2009134433A/en
Application granted granted Critical
Publication of JP4998794B2 publication Critical patent/JP4998794B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Description

本発明は、入力画像を適正画像に補正曲線を用いて補正する画像補正技術に関する。   The present invention relates to an image correction technique for correcting an input image into a proper image using a correction curve.

入力画像を適正画像に補正する代表的な分野である写真プリント出力の分野では、写真フィルムに形成された撮影画像をフィルムスキャナを用いてデジタル化して得られた撮影画像(データ)や、デジタルカメラなどのデジタル撮影機器によって直接撮影画像をデジタル化して得られた撮影画像(データ)に濃度補正や色補正などの画像補正を施した後これをプリントデータに変換し、このプリントデータに基づいて写真プリントユニットを駆動して、撮影画像を感光材料(印画紙)に光ビームで焼き付けたり、プリント用紙にカラーインクで形成したりするデジタル写真処理技術が主流である。種々の写真撮影状況下において適正な撮影画像を得るためには、シャッタースピードや絞りの設定、天候、光源の種類などの撮影条件を適切に設定する必要があるが、撮影者はこれらの撮影条件をあまり意識せずに撮影しているのが実情であり、このため、被写体の色調や明暗(コントラスト)の再現性が適正に得られていない不適正な撮影画像が写真プリント装置に入力されることが少なくない。取得した入力撮影画像を適正な出力撮影画像、例えば写真プリントとして再現するために用いられる画像補正の主なものは、色補正、濃度補正、コントラスト補正であり、これらの補正を正しく調整して組み合わせた画像補正が必要となる。写真プリント分野においてよく用いられている補正では、経験的及び実験的に知られている入力撮影画像とこれに基づいて出力される写真プリントの画像との関係から作成された基本補正曲線(ガンマ曲線とも呼ばれる)に対して、入力撮影画像毎の画像特性に応じて、その基本補正曲線の部分的な形状や全体の傾きを調整して最終的な補正曲線を作成し、この最終的な補正曲線に基づいて入力撮影画像の補正が行われている。しかしながら、この基本補正曲線の調整が人為的に行われる場合には熟練と手間がかかり、自動的に行われる場合には仕上がり品質が不十分という問題がある。   In the field of photographic print output, which is a typical field for correcting input images to appropriate images, photographic images (data) obtained by digitizing photographic images formed on photographic film using a film scanner, and digital cameras After image correction such as density correction and color correction is performed on the shot image (data) obtained by digitizing the shot image directly with a digital shooting device such as this, it is converted to print data, and a photo is taken based on this print data The mainstream is a digital photo processing technique in which a print unit is driven and a photographed image is printed on a photosensitive material (printing paper) with a light beam or formed on a printing paper with color ink. In order to obtain an appropriate shot image under various photography conditions, it is necessary to appropriately set shooting conditions such as shutter speed, aperture setting, weather, and light source type. The actual situation is that the photographer is not consciously aware of this, and an inappropriate photographed image in which the color tone or contrast of the subject is not properly obtained is input to the photographic printing apparatus. There are many things. The main image corrections used to reproduce the acquired input captured image as an appropriate output captured image, such as a photographic print, are color correction, density correction, and contrast correction. These corrections are adjusted and combined correctly. Image correction is required. A correction often used in the field of photographic prints is a basic correction curve (gamma curve) created from the relationship between an input photographed image that is empirically and experimentally known and an image of a photographic print that is output based on this image. The final correction curve is created by adjusting the partial shape and overall inclination of the basic correction curve according to the image characteristics of each input captured image. The input captured image is corrected based on the above. However, when the adjustment of the basic correction curve is artificially performed, there is a problem that it takes skill and labor, and when it is automatically performed, the finished quality is insufficient.

最近では、画像補正にニューラルネットワーク技術が応用されており、例えば、選択された代表色のRGB信号を入力データとして使用するととともに、出力装置(プリンタ)にて出力された上記の代表色の複製画像を再び入力装置(スキャナ)にて読み取ったRGB信号を教師データとして使用することによってニューラルネットワークを構築し、入力画像の各画素値を入力層に入力することにより、中間層を介して、出力層からプリンタのインク量を出力させ、これにより良好な複製画像を得ようとする画像処理装置がある(例えば、特許文献1参照)。さらには、画像信号を入力データとし画像補正量を教師値として予め学習させたニューラルネットワークを備え、このニューラルネットワークに画像信号を入力することで得られる画像補正量を用いて画像信号を補正して安定した出力画像を得る画像形成装置も知られている(例えば、特許文献2参照)。しかしながら、ニューラルネットワークを用いた画像補正は、コンピュータを用いた統計的経験則によって決定された結果を出力するので、ニューラルネットワークの構築時に用いられたサンプル画像に類似しないような画像が入力された場合、イレギュラーな補正結果を出力してしまう可能性がある。特に、この補正技術を写真プリント分野に適用する場合には、写真プリントにとって最も重要な人物の顔がイレギュラーな調子になると、商品価値を失ってしまう。   Recently, neural network technology has been applied to image correction. For example, the selected representative color RGB signal is used as input data, and the above representative color duplicate image output by an output device (printer) is used. The RGB signal read again by the input device (scanner) is used as teacher data to construct a neural network, and by inputting each pixel value of the input image to the input layer, through the intermediate layer, the output layer There is an image processing apparatus that outputs an ink amount of a printer from the printer and thereby obtains a good duplicate image (see, for example, Patent Document 1). Furthermore, a neural network is provided that has previously learned an image signal as input data and an image correction amount as a teacher value, and the image signal is corrected using the image correction amount obtained by inputting the image signal to the neural network. An image forming apparatus that obtains a stable output image is also known (see, for example, Patent Document 2). However, image correction using a neural network outputs the result determined by statistical empirical rules using a computer, so if an image that does not resemble the sample image used when constructing the neural network is input There is a possibility that an irregular correction result is output. In particular, when this correction technique is applied to the photographic print field, the commercial value is lost when the face of a person most important for photographic print becomes irregular.

特開平09−168095号公報(段落番号0050−0057、0066、図4)Japanese Patent Laid-Open No. 09-168095 (paragraph numbers 0050-0057, 0066, FIG. 4) 特開平09−018716号公報(段落番号0039−0040、図1)Japanese Unexamined Patent Publication No. 09-018716 (paragraph numbers 0039-0040, FIG. 1)

上記実状に鑑み、本発明の課題はニューラルネットワークに代表される統計的学習則を用いて出力される補正曲線を用いて、入力画像を適正画像に補正する画像補正技術において、入力画像の画像特性にかかわらず、その入力画像に人物の顔が含まれている場合、その顔領域の補正が満足できるものであるとともに、顔以外の領域との調和も維持できる画像補正技術を提供することである。   In view of the above situation, an object of the present invention is to provide an image correction technique for correcting an input image to an appropriate image using a correction curve output using a statistical learning rule represented by a neural network. Regardless of whether or not the input image includes a human face, the correction of the face area is satisfactory, and an image correction technique that can maintain harmony with areas other than the face is provided. .

入力画像を適正画像に補正曲線を用いて補正する画像補正方法において、上記課題を解決するため、本発明の方法は、用意された多数のサンプル画像から元画像として順次選択された画像の画像特徴量を入力値とするとともに前記元画像から適正画像を作り出す参照補正曲線を教師値として学習させた統計的学習則部を構築するステップと、前記サンプル画像から顔領域が検出される顔付きサンプル画像と当該顔付きサンプル画像に対応する顔付き適正画像とを抽出するステップと、前記顔付きサンプル画像における顔領域の基準濃度値と前記顔付き適正画像における顔領域の基準濃度値とから回帰式を算定するステップと、前記入力画像から画像特徴量群を求めるステップと、前記入力画像の画像特徴量群を前記統計的学習則部に入力することで前記統計的学習則部から出力される出力値に基づいて基準補正曲線を作成するステップと、前記入力画像から検出された顔領域の基準濃度値を入力濃度値として算出するステップと、前記回帰式を用いて前記入力濃度値から導出される出力濃度値を決定するステップと、前記入力濃度値と前記出力濃度値の関係が成立するように前記基準補正曲線を調整することで実行補正曲線を生成するステップと、前記実行補正曲線で前記入力画像を画像補正するステップとからなる。   In an image correction method for correcting an input image to a proper image using a correction curve, in order to solve the above-described problem, the method of the present invention is characterized in that an image feature of an image sequentially selected as an original image from a number of prepared sample images. A step of constructing a statistical learning rule part having a quantity as an input value and learning a reference correction curve for creating a proper image from the original image as a teacher value; a sample image with a face from which a face region is detected from the sample image; Extracting an appropriate image with a face corresponding to the sample image with face; calculating a regression equation from a reference density value of the face region in the sample image with face and a reference density value of the face region in the image with face; Obtaining an image feature amount group from the input image; and inputting the image feature amount group of the input image to the statistical learning rule unit. A step of creating a reference correction curve based on an output value output from the statistical learning rule part, a step of calculating a reference density value of a face area detected from the input image as an input density value, An execution correction curve by determining an output density value derived from the input density value using a regression equation and adjusting the reference correction curve so that a relationship between the input density value and the output density value is established. And the step of correcting the input image with the execution correction curve.

上記方法では、予め、多数のサンプル画像とこのサンプル画像を適正に補正した適正画像とから、統計的学習則部を構築するとともに、顔検出されたサンプル画像の顔領域の基準濃度値と対応する適正画像の顔領域の基準濃度値とを回帰分析した回帰式を算定しておく。実際に補正すべき画像が入力されると、この入力画像の画像特徴量群を統計的学習則部に入力することで基本濃度曲線が出力されるが、入力画像に顔が含まれており、その顔領域が検出された場合には、その顔領域に含まれる画素濃度値の基準となる基準濃度値と、この基準濃度値を入力濃度値として上記回帰式から求められる出力濃度値との関係が成立するように基本濃度曲線が調整される。このように調整された基本濃度曲線を用いて入力画像が補正されることにより、入力画像の全領域の中でも顔領域に重きをおいた適正化がなされるとともに、入力画像全体においても基本濃度曲線の形状で補正されることから調和の取れた補正が実現する。   In the above method, a statistical learning rule part is constructed in advance from a large number of sample images and appropriate images obtained by appropriately correcting the sample images, and corresponding to the reference density value of the face area of the sample image whose face has been detected. A regression equation is calculated by performing regression analysis on the reference density value of the face area of the appropriate image. When an image to be actually corrected is input, a basic density curve is output by inputting the image feature amount group of the input image to the statistical learning rule part, but a face is included in the input image, When the face area is detected, the relationship between the reference density value serving as a reference for the pixel density value included in the face area and the output density value obtained from the regression equation using the reference density value as the input density value The basic density curve is adjusted so that is established. By correcting the input image using the basic density curve adjusted in this way, optimization is made with emphasis placed on the face area in the entire area of the input image, and the basic density curve is also applied to the entire input image. Since the correction is made with the shape of, a harmonious correction is realized.

写真プリント業界などで取り扱われる画像はカラー画像である。従って、本発明の好適な実施形態では、補正曲線と回帰式とはR濃度値、G濃度値、B濃度値、R・G・B濃度値から算出される輝度値毎に作成される。これにより、より極めの細かい補正が可能となる。もちろん、R・G・B濃度値(C・M・Y濃度値も同義である)毎に補正曲線を作成せずに、R・G・B濃度値から算出される輝度値(例えば、(R濃度値+G濃度値+B濃度値)/3)で得られる)だけから補正曲線と回帰式を作成してもよいし、R・G・B濃度値毎の補正曲線及び輝度値の補正曲線と回帰式を作成してもよい。   Images handled in the photographic print industry are color images. Therefore, in a preferred embodiment of the present invention, the correction curve and the regression equation are created for each luminance value calculated from the R density value, the G density value, the B density value, and the R / G / B density value. As a result, more fine correction can be performed. Of course, luminance values (for example, (R) are calculated from R, G, and B density values without creating a correction curve for each of R, G, and B density values (C, M, and Y density values are also synonymous). The correction curve and the regression equation may be created only from the density value + G density value + B density value) / 3)), or the correction curve for each of the R, G, B density values and the correction curve for the luminance value and the regression. An expression may be created.

顔領域の基準濃度値として、顔領域の平均濃度値を採用することが好適である。実験的な考察により、平均濃度値が顔領域の画像特性を精度良く簡単に表す値であるとの知見を得ている。また、一般的な顔入りのサンプル画像とその適正画像を回帰分析するとその相関関係は高い信頼度で線形となることも確かめられたので、回帰式として回帰直線を採用することも好適である。   It is preferable to adopt the average density value of the face area as the reference density value of the face area. Through experimental consideration, it has been found that the average density value is a value that easily and accurately represents the image characteristics of the face region. Moreover, since it was confirmed that the correlation is linear with high reliability when a general sample image with a face and its appropriate image are subjected to regression analysis, it is also preferable to adopt a regression line as a regression equation.

入力画像を適正画像に補正曲線を用いて補正する画像補正装置において、上記課題を解決するため、本発明による装置は、用意された多数のサンプル画像から元画像として順次選択された画像の画像特徴量を入力値とするとともに前記元画像から適正画像を作り出す参照補正曲線を教師値として学習させて構築した統計的学習則部と、前記サンプル画像から抽出された顔領域が検出される顔付きサンプル画像と当該顔付きサンプル画像に対応する顔付き適正画像とにおける顔領域の基準濃度値から算定された回帰式を格納する回帰式テーブルと、前記入力画像から画像特徴量群を求める画像特徴量演算部と、前記入力画像の画像特徴量群を前記統計的学習則部に入力することで前記統計的学習則部から出力される出力値に基づいて基準補正曲線を作成する基準補正曲線生成部と、前記入力画像から検出された顔領域の基準濃度値を入力濃度値として算出する第1前処理部と、前記回帰式テーブルを用いて前記入力濃度値から導出される出力濃度値を決定する第2前処理部と、前記入力濃度値と前記出力濃度値の関係が成立するように前記基準補正曲線を調整することで実行補正曲線を生成する補正曲線調整部と、前記実行補正曲線で前記入力画像を画像補正する画像補正部と、からなる。当然ながら、この画像補正装置も上記画像補正方法で述べたすべての作用効果を得ることができ、さらに上述した付加的技術を組み込むことも可能である。   In an image correction apparatus that corrects an input image to a proper image using a correction curve, in order to solve the above-described problem, the apparatus according to the present invention is characterized in that an image feature of an image sequentially selected as an original image from a number of prepared sample images. A statistical learning rule part constructed by learning a reference correction curve for creating a proper image from the original image as a teacher value and using a quantity as an input value, and a sample image with a face from which a face region extracted from the sample image is detected A regression equation table that stores a regression equation calculated from a reference density value of a face region in the appropriate image with a face corresponding to the sample image with the face, an image feature amount calculation unit that obtains an image feature amount group from the input image, By inputting an image feature amount group of the input image to the statistical learning rule unit, a reference correction music is generated based on an output value output from the statistical learning rule unit. Derived from the input density value using the regression equation table, a reference correction curve generation section for creating a reference density curve, a first preprocessing section for calculating a reference density value of the face area detected from the input image as an input density value, A second pre-processing unit that determines an output density value to be performed, and a correction curve adjustment unit that generates an execution correction curve by adjusting the reference correction curve so that the relationship between the input density value and the output density value is established And an image correction unit that corrects the input image with the execution correction curve. Naturally, this image correction apparatus can also obtain all the effects described in the above image correction method, and can further incorporate the above-described additional techniques.

画像処理の分野で用いられる統計的学習則としては、共役勾配法、遺伝的アルゴリズム、ニューラルネットワークなどが挙げられるが、ハードウエア又はソフトウエアのモジュール化が進んでおり、扱いやすいこと、及び1万を超えるような多数のサンプル数から作成された教師値を用いて学習させることも容易であることを考慮すると、ニューラルネットワークが好都合である。そのため、本発明による画像補正方法や画像補正装置において、統計的学習則部としてニューラルネットワーク部を採用することが好ましい。   Statistical learning rules used in the field of image processing include conjugate gradient method, genetic algorithm, neural network, etc., but hardware or software is becoming more modular, easy to handle, and 10,000 Considering that it is also easy to train using a teacher value created from a large number of samples exceeding the above, a neural network is advantageous. Therefore, in the image correction method and the image correction apparatus according to the present invention, it is preferable to employ a neural network unit as the statistical learning rule unit.

また、本発明は、上述した補正曲線を用いた画像補正方法をコンピュータによって実行させるための画像補正プログラムも権利範囲としている。本発明によるその他の特徴及び利点は、以下図面を用いた実施形態の説明により明らかになるだろう。   The present invention also includes an image correction program for causing a computer to execute the above-described image correction method using the correction curve. Other features and advantages of the present invention will become apparent from the following description of embodiments using the drawings.

以下、本発明の実施形態を図面に基づいて説明するが、まず、本発明による補正技術の重要な構成要素となる、補正すべき画像から得られる画像特徴量群に基づいて基準補正曲線(より詳しくは補正曲線を規定する係数)を生成する統計的学習則部の一例としてニューラルネットワーク部の構築原理を述べる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. First, a reference correction curve (based on an image feature amount group obtained from an image to be corrected, which is an important component of the correction technique according to the present invention (more Specifically, the construction principle of a neural network unit will be described as an example of a statistical learning rule unit that generates a coefficient that defines a correction curve.

まずは、図1に模式的に示されているように、種々の撮影条件で取得された画像をサンプル画像として多数用意し、これらのサンプル撮影画像を元画像とし、モニタでの表示やテストプリントを通じて適正画像となるようにマニュアルで画像補正を行う(#01)。次に、元画像とマニュアル画像補正によって得られた適正画像との画素値を比較評価して、元画像の画素値と適正画像の画素値との対応関係を規定する画像補正量、結果的にはこの画像補正量によって規定されるマニュアル補正曲線を生成する(#02)。   First, as schematically shown in FIG. 1, a large number of images acquired under various shooting conditions are prepared as sample images, and these sample shot images are used as original images, through display on a monitor and test prints. Image correction is manually performed so that an appropriate image is obtained (# 01). Next, by comparing and evaluating the pixel values of the original image and the appropriate image obtained by manual image correction, an image correction amount that defines the correspondence between the pixel value of the original image and the pixel value of the appropriate image, and consequently Generates a manual correction curve defined by the image correction amount (# 02).

次に、元画像となっているサンプル画像から画像特徴量が算出される(#03)。画像特徴量としては、当該サンプル画像から生成された濃度ヒストグラムから求められる領域非依存画像特徴量や、該サンプル画像から区分けされた領域群における領域依存特徴量を採用することができる。領域依存特量は、画像の部分域における平均濃度値、最大濃度値、最小濃度値といった特徴量であり、領域非依存特徴群としては、画像全域における平均濃度値、最大濃度値、最小濃度値、濃度階調値部分領域毎の積算頻度値などである。 Next, an image feature amount is calculated from the sample image that is the original image (# 03). As the image feature amount, a region-independent image feature amount obtained from a density histogram generated from the sample image or a region-dependent feature amount in a region group divided from the sample image can be employed. Region dependent feature amount is the average density value in the parts-domain of the image, the maximum density value, a feature amount such as minimum density value, as the region independent feature groups, the average of the entire image density, maximum density value, minimum The density value , the density gradation value , and the integrated frequency value for each partial region.

ステップ#02で得られた各濃度領域の補正曲線を規定する係数と、ステップ#03で得られた画像特徴量群は、ニューラルネットワーク部を構築するための学習データとして利用されるため、ステップ#01からステップ#03までの作業は準備された全てのサンプル画像に対して実施される。そして、画像特徴量群を入力データとするとともにそれぞれの濃度領域の補正曲線を規定する係数が出力値となるように各ニューラルネットワークの内部変数を調整する反復シミュレーションを数千回以上行い、ニューラルネットワーク部を構築する(#04)。   Since the coefficient defining the correction curve for each density region obtained in step # 02 and the image feature quantity group obtained in step # 03 are used as learning data for constructing the neural network unit, step # The operations from 01 to step # 03 are performed for all the prepared sample images. Then, iterative simulation that adjusts the internal variables of each neural network so that the coefficient that defines the correction curve of each density region becomes the output value while using the image feature group as input data is performed several thousand times or more. Part (# 04).

また、前記サンプル画像から顔領域が検出される顔付きサンプル画像と当該顔付きサンプル画像に対応する顔付き適正画像とが抽出される(#05)。この顔領域の検出には、公知の顔検出ユニットが用いられ、自動的に行われる。次いで、顔付きサンプル画像における顔領域の基準濃度値と、前記顔付き適正画像における顔領域の基準濃度値が算出される(#06)。この基準濃度値として、顔領域における平均濃度値、中間値濃度値、最頻濃度値などを利用することができるが、平均濃度値が好適であることが、実験的に確かめられている。さらに、前記顔付きサンプル画像における顔領域の基準濃度値(平均濃度値)を説明変数、前記顔付き適正画像における顔領域の基準濃度値(平均濃度値)を目的変数として回帰分析を行い、回帰式、好ましくは、図2で示されているような、回帰直線を算定する(#07)。   In addition, a sample image with a face from which a face area is detected and an appropriate image with a face corresponding to the sample image with the face are extracted from the sample image (# 05). This face area is detected automatically using a known face detection unit. Next, the reference density value of the face area in the sample image with face and the reference density value of the face area in the appropriate image with face are calculated (# 06). As the reference density value, an average density value, an intermediate density value, a mode density value, or the like in the face area can be used, but it has been experimentally confirmed that the average density value is suitable. Further, a regression analysis is performed using a reference density value (average density value) of the face area in the sample image with face as an explanatory variable, and a reference density value (average density value) of the face area in the appropriate image with face as an objective variable, Preferably, a regression line as shown in FIG. 2 is calculated (# 07).

このようにして構築された、ニューラルネットワーク部を用いて、補正すべき入力画像を適正画像に補正することができる。この画像補正の原理が図3に模式的に示されている。まず、補正目的で入力された画像から、あるいは必要に応じて所定サイズまでの縮小処理を施して生成された補正演算用画像(入力画像の一種)から画像特徴量群(領域非依存画像特徴量群又は領域依存画像特徴量群あるいはその両方)を算出する(#11)。このようにして得られた、入力画像に基づく画像特徴量群を、ニューラルネットワーク部に入力する(#12)。この結果、ニューラルネットワーク部から出力される補正曲線を規定する係数から基本補正曲線が作成される(#13)。   The input image to be corrected can be corrected to an appropriate image using the neural network unit constructed in this way. The principle of this image correction is schematically shown in FIG. First, an image feature value group (region-independent image feature value) from an image input for correction purposes or a correction calculation image (a type of input image) generated by performing a reduction process to a predetermined size as necessary. Group or region-dependent image feature quantity group or both) is calculated (# 11). The image feature amount group based on the input image obtained in this way is input to the neural network unit (# 12). As a result, a basic correction curve is created from the coefficient defining the correction curve output from the neural network unit (# 13).

次に、入力画像に対して顔領域検出を行い(#14)、検出された顔領域の濃度基準値、例えば平均濃度値が算出される(#15)。算出された平均濃度値を説明変数値(入力濃度値)として前もって算定されている回帰直線に基づいて、図4に示すように、その目的変数値(出力濃度値)を求める(#16)。図4の例では、入力濃度値を「156」、出力濃度値を「160」としておく。この求められた入力濃度値と出力濃度値の関係が基本補正曲線を調整するための調整量として用いられる。つまり、図5で、例示しているように、入力濃度値「156」に対して出力濃度値「160」が導かれるように基本補正曲線をシフトさせることで、基本補正曲線の顔領域を重視した調整を行う(#17)。このようにして調整された基本補正曲線が実行補正曲線として設定され(#18)、この実行補正曲線を用いて入力画像の画像補正が実施される(#19)。さらに、この補正画像からプリントデータを生成し、このプリントデータをプリント部に転送することにより、画像プリントが出力される(#20)。入力画像から顔領域が検出されない場合は、基本補正曲線をそのまま実行補正曲線として設定することになる。   Next, face area detection is performed on the input image (# 14), and a density reference value of the detected face area, for example, an average density value is calculated (# 15). Based on the regression line calculated in advance using the calculated average density value as an explanatory variable value (input density value), the objective variable value (output density value) is obtained as shown in FIG. 4 (# 16). In the example of FIG. 4, the input density value is “156” and the output density value is “160”. The obtained relationship between the input density value and the output density value is used as an adjustment amount for adjusting the basic correction curve. In other words, as exemplified in FIG. 5, the face area of the basic correction curve is emphasized by shifting the basic correction curve so that the output density value “160” is derived with respect to the input density value “156”. Adjustments are made (# 17). The basic correction curve adjusted in this way is set as an execution correction curve (# 18), and image correction of the input image is performed using the execution correction curve (# 19). Further, print data is generated from the corrected image, and the print data is transferred to the printing unit, whereby an image print is output (# 20). If no face area is detected from the input image, the basic correction curve is set as an execution correction curve as it is.

写真プリント処理などで取り扱われる画像のデータは、主色成分である赤、青、緑の画素値であるR・B・G濃度値で表されるカラー画像である。従って、上述したサンプル画像や入力画像は、R・B・G濃度値からなるカラー画像として取り扱われ、R・B・G毎に画像特徴群が求められ、R・B・G毎の基本補正曲線が生成される。従って、回帰直線もR・B・G毎に算定される。さらに、例えば、各R・B・G濃度値を加算して3で割ることにより得られる輝度値に基づいて、回帰直線を算定し、画像特徴群を求めて基本補正曲線を生成することも可能である。輝度値に基づく画像補正では、最終的に得られた補正輝度値から、R・B・G成分割合から、再びR・B・G濃度値に戻すとよい。但し、以下の説明では、色成分や輝度を分けて説明せずに、統一的に説明を行うことにする。従って、濃度値という語句には、各色の濃度値やそれから算出される輝度値が含まれていると解釈されるべきである。   Image data handled in photographic print processing is a color image represented by R, B, and G density values, which are pixel values of red, blue, and green as main color components. Therefore, the above-described sample image and input image are handled as a color image composed of R, B, and G density values, an image feature group is obtained for each of R, B, and G, and a basic correction curve for each of R, B, and G is obtained. Is generated. Accordingly, the regression line is also calculated for each of R, B, and G. Furthermore, for example, it is also possible to calculate a regression line based on the luminance value obtained by adding each R, B, and G density value and dividing by 3, to obtain an image feature group and generate a basic correction curve It is. In the image correction based on the luminance value, it is preferable to return the corrected luminance value finally obtained to the R / B / G density value again from the R / B / G component ratio. However, in the following description, the color components and luminance will not be described separately, but will be described in a unified manner. Therefore, the phrase density value should be interpreted as including the density value of each color and the luminance value calculated from it.

次に、上述したニューラルネットワーク部の具体的な構築手順の一例を図3から図6を用いて説明する。図6にニューラルネットワーク部の模式的な構造が示されている。ニューラルネットワーク部は多数個の入力要素を有する入力層と多数個の中間要素を有する中間層と多数個の出力要素を有する出力層からなる。一般に、入力要素と中間要素と出力要素の数はその順に少なくなっている。入力要素には入力画像の画像特徴量群が入力されると、出力要素には、基本補正曲線を規定する所定個の係数が基本補正曲線として出力される。なお、この出力された係数を用いてスムーズな補正曲線を作り出すアルゴリズムには公知の近似曲線作成アルゴリズムを用いることができる。   Next, an example of a specific construction procedure of the above-described neural network unit will be described with reference to FIGS. FIG. 6 shows a schematic structure of the neural network unit. The neural network unit includes an input layer having a large number of input elements, an intermediate layer having a large number of intermediate elements, and an output layer having a large number of output elements. In general, the number of input elements, intermediate elements, and output elements decreases in that order. When an image feature quantity group of the input image is input to the input element, a predetermined number of coefficients that define the basic correction curve are output as the basic correction curve to the output element. A known approximate curve creation algorithm can be used as an algorithm for creating a smooth correction curve using the output coefficient.

ニューラルネットワーク部の学習時に採用されている画像特徴量群としては、領域依存画像特徴量、つまり画像領域に依存する特徴量と、領域非依存画像特徴量、つまり画像領域に依存しない特徴量とが用いられる。
領域依存画像特徴量として以下のものが挙げられる;
像中央部(図7の(a)参照)の平均濃度値、画像周辺部(図7の(a)参照)の平均濃度値、画像上側部(図7の(b)参照)の平均濃度値、画像下側部(図7の(b)参照)の平均濃度値、画像左側部(図7の(c)参照)の平均濃度値、画像右側部(図7の(c)参照)の平均濃度値、画像中央部(図7の(a)参照)の最大濃度値、画像周辺部(図7の(a)参照)の最大濃度値、画像上側部(図7の(b)参照)の最大濃度値、画像下側部(図7の(b)参照)の最大濃度値、画像左側部(図7の(c)参照)の最大濃度値、画像右側部(図7の(c)参照)の最大濃度値、画像中央部(図7の(a)参照)の最小濃度値、画像周辺部(図7の(a)参照)の最小濃度値、画像上側部(図7の(b)参照)の最小濃度値、画像下側部(図7の(b)参照)の最小濃度値、画像左側部(図7の(c)参照)の最小濃度値、画像右側部(図7の(c)参照)の最小濃度値、上下に隣接する画素の差分値(図7の(d)参照)の平均値。
領域非依存画像特徴量としては、画像全体の平均濃度値、画像全体の最大濃度値、画像全体の最小濃度値、画像全体の濃度標準偏差、画像全体の最大濃度値、画像全体の最小濃度値、各色成分に関するヒストグラムの階調値軸を20分割した各領域(図8参照)に含まれる階調値の頻度を積算して得られる各階調領域積算頻度値が代表的なものである。
The image feature quantity group used at the time of learning in the neural network section includes area-dependent image feature quantities, that is, feature quantities that depend on image areas, and area-independent image feature quantities, that is, feature quantities that do not depend on image areas. Used.
Examples of region-dependent image feature values include:
Average density value of the images the central portion (see (a) in FIG. 7), the average density of the image peripheral portion average density value of ((a) see FIG. 7), the image upper portion (see (b) in FIG. 7) Value, average density value of the lower side of the image (see FIG. 7B), average density value of the left side of the image (see FIG. 7C), right side of the image (see FIG. 7C) average density value, the maximum density value of the images the central portion (see (a) in FIG. 7), the image periphery maximum density value (in FIG. 7 (a) refer), the image upper portion (FIG. 7 (b), see ), The maximum density value at the lower side of the image (see FIG. 7B), the maximum density value at the left side of the image (see FIG. 7C), and the right side of the image (see FIG. 7C). maximum concentration value of) the reference), the minimum density value of the images the central portion (see (a) in FIG. 7), the image peripheral portion (minimum density value of the see FIG. 7 (a)), the image upper portion (in FIG. 7 Minimum density value (see (b)), below image Density (see FIG. 7B), minimum density value on the left side of the image (see FIG. 7C), minimum density value on the right side of the image (see FIG. 7C), top and bottom The average value of the difference values (see (d) of FIG. 7) of the pixels adjacent to .
Area-independent image feature values include the average density value of the entire image, the maximum density value of the entire image, the minimum density value of the entire image, the density standard deviation of the entire image, the maximum density value of the entire image, and the minimum density value of the entire image. , each gray scale region integrated frequency value obtained by integrating the frequency of the tone values included in each region where the gradation value axis of a histogram 20 divided for each color component (see FIG. 8) are representative.

以上のような入出力形態をもつニューラルネットワーク部の構築と顔領域回帰直線算定のルーチンが図9に示されている。
まず、用意しておいたサンプル画像を読み込み(#30)、そのサンプル画像から前述した各画像特徴量を算出し(#31)、それらを画像特徴量群としてメモリに格納する(#32)。読み込んだサンプル画像をモニタ表示しながら熟練者によるマニュアルの画像補正を行う(#33)。必要に応じて補正された画像のプリント出力を行い(#34)、補正された画像が適正であるかどうかをチェックする(#35)。補正された画像が適正と判定されるまで、マニュアル補正を繰り返し、適正な補正画像が得られると、その画像補正に基づいて元画像の画素値を適正補正画像の画素値に変換する補正曲線(補正曲線を規定する係数)を作成して、メモリに格納する(#36)。次に、ステップ#30で読み込んだサンプル画像から顔領域が検出されるかどうかをチェックする(#37)。顔領域が検出されると(#37Yes分岐)、サンプル画像とその適正補正画像の顔領域に含まれる画素の平均濃度値を算出し(#38)、メモリに格納する(#39)。顔領域が検出されなければ(#37No分岐)、ステップ#38と#39の処理はジャンプされる。
FIG. 9 shows a routine for constructing a neural network unit having the above input / output configuration and calculating a face area regression line.
First, the prepared sample image is read (# 30), each image feature amount described above is calculated from the sample image (# 31), and these are stored in the memory as an image feature amount group (# 32). Manual image correction by an expert is performed while displaying the read sample image on the monitor (# 33). A printout of the corrected image is performed as necessary (# 34), and it is checked whether the corrected image is appropriate (# 35). Manual correction is repeated until the corrected image is determined to be appropriate, and when an appropriate corrected image is obtained, a correction curve that converts the pixel value of the original image into the pixel value of the appropriate corrected image based on the image correction ( A coefficient defining the correction curve is created and stored in the memory (# 36). Next, it is checked whether a face area is detected from the sample image read in step # 30 (# 37). When the face area is detected (# 37 Yes branch), the average density value of the pixels included in the face area of the sample image and its appropriate corrected image is calculated (# 38) and stored in the memory (# 39). If no face area is detected (# 37 No branch), the processing of steps # 38 and # 39 is jumped.

ステップ#30〜ステップ#39までの処理が用意されている全てのサンプル画像のための実行される(#40Yes分岐)。全てのサンプル画像に対する処理が完了すると(#37No分岐)、メモリに格納されている画像特徴量群とメモリに格納されている補正曲線、正確にはマニュアル補正曲線を規定する係数が学習データとしてニューラルネットワーク部に割り当てる(#41)。ニューラルネットワーク部は、画像特徴量群を入力データ、マニュアル補正曲線を規定する係数を教師データとして学習し、その入出力関係(結合係数やしきい値)を確定させ、ニューラルネットワーク部を構築する(#42)。   The processing from step # 30 to step # 39 is executed for all the sample images prepared (# 40 Yes branch). When the processing for all the sample images is completed (# 37 No branch), the image feature quantity group stored in the memory and the correction curve stored in the memory, more precisely, the coefficient defining the manual correction curve is used as the learning data. Assign to the network part (# 41). The neural network unit learns an image feature group as input data, and a coefficient that defines a manual correction curve as teacher data, determines its input / output relationship (coupling coefficient and threshold), and constructs a neural network unit ( # 42).

次に、メモリから顔領域が検出された全てのサンプル画像の顔領域の平均濃度値と、対応する適正補正画像の顔領域に含まれる画素の平均濃度値を全て読み出し(#43)、顔領域検出されたサンプル画像における顔領域の基準濃度値(平均濃度値)を説明変数、顔領域検出された適正画像における顔領域の基準濃度値(平均濃度値)を目的変数として回帰分析を行い、回帰直線を算定する(#44)。   Next, the average density value of the face area of all the sample images in which the face area is detected and all the average density values of the pixels included in the face area of the corresponding proper correction image are read out from the memory (# 43). Regression analysis is performed using the reference density value (average density value) of the face area in the detected sample image as an explanatory variable, and the reference density value (average density value) of the face area in the appropriate image detected in the face area as an objective variable. A straight line is calculated (# 44).

次に、図1と図2を用いて先に説明した画像補正技術を用いた画像補正装置を搭載し、画像として撮影画像を取り扱う写真プリント装置を説明する。図10はその写真プリント装置を示す外観図であり、この写真プリント装置は、印画紙Pに対して露光処理と現像処理とを行う写真プリント部としてのプリントステーション1Bと、現像済み写真フィルム2aやデジタルカメラ用メモリカード2bなどの画像入力メディアから取り込んだ撮影画像を処理してプリントステーション1Bで使用されるプリントデータの生成・転送などを行う操作ステーション1Aとから構成されている。   Next, a photographic printing apparatus that mounts an image correction apparatus using the image correction technique described above with reference to FIGS. 1 and 2 and handles captured images as images will be described. FIG. 10 is an external view showing the photographic printing apparatus. This photographic printing apparatus includes a printing station 1B as a photographic printing section that performs exposure processing and development processing on the photographic paper P, a developed photographic film 2a, and the like. The operation station 1A is configured to process a captured image taken from an image input medium such as a digital camera memory card 2b and generate / transfer print data used in the print station 1B.

この写真プリント装置はデジタルミニラボとも称せられるものであり、プリントステーション1Bは2つの印画紙マガジンに納めたロール状の印画紙Pを引き出してシートカッターでプリントサイズに切断すると共に、このように切断された印画紙Pに対し、プリント露光部で印画紙Pの表面に撮影画像の露光を行い、この露光後の印画紙Pを複数の現像処理槽を有した処理槽ユニット15に送り込んで現像処理する。乾燥の後に装置上部の横送りコンベア16からソータ17に送られた印画紙P、つまり写真プリントPは、このソータ17の複数のトレイにオーダ単位で仕分けられた状態で集積される。プリント露光部には、副走査方向に搬送される印画紙Pに対して、主走査方向に沿って操作ステーション1Aからのプリントデータに基づいてR(赤)、G(緑)、B(青)の3原色のレーザ光線の照射を行うライン露光ヘッドが設けられている。   This photographic printing apparatus is also called a digital minilab. The printing station 1B pulls out the roll-shaped printing paper P stored in two printing paper magazines and cuts it into a print size with a sheet cutter. The photographic paper P is exposed on the surface of the photographic paper P by the print exposure unit, 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. The print exposure unit receives R (red), G (green), and B (blue) based on print data from the operation station 1A along the main scanning direction with respect to the printing paper P conveyed in the sub-scanning direction. A line exposure head for irradiating laser beams of the three primary colors is provided.

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

この写真プリント装置のコントローラ3は、CPUを中核部材として、写真プリント装置の種々の動作を行うための機能部をハードウエア又はソフトウエアあるいはその両方で構築しているが、図11に示されているように、本発明に特に関係する機能部としては、フィルムスキャナ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 a photographed image read by the film scanner 20 or the media reader 21 and performs preprocessing necessary for the next processing, Graphic user interface (hereinafter abbreviated as GUI) that generates a control command from creation of a graphic operation screen including a window, various operation buttons, and the like, and user operation input through such a graphic operation screen (using the keyboard 24, mouse 25, etc.) Sent from the GUI unit 33 and the GUI unit 33 A print management unit 32 that performs image processing on a captured image transferred from the image input unit 31 to the memory 30 in order to generate desired print data based on a control command or an operation command directly input from the keyboard 24 or the like. Video control for generating a video signal for causing the monitor 23 to display graphic data sent from the GUI source 33, a simulated image as a print source image, an expected finished print image, and a pre-judge print operation such as color correction A print data generation unit 36 for generating print data suitable for the print exposure unit 14 installed in the print station 1B based on the processed photographed image having undergone the image processing, C shot images or processed shot images that have been processed Etc. formatter 37 for formatting into a form for writing to -R 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 includes a thumbnail image (low resolution data), the captured image main data (for use in displaying a list on the monitor 23) ( The thumbnail image is sent to the memory 30 separately from the high-resolution data. If a thumbnail image is not included, a reduced image is created from this data and sent to the memory 30 as a thumbnail image.

プリント管理部32は、プリントサイズやプリント枚数などを管理するプリント注文処理ユニット40、メモリ30に展開された撮影画像に対して各種画像処理を施す画像処理ユニット50を備えている。   The print management unit 32 includes a print order processing unit 40 that manages the print size, the number of prints, and the like, and an image processing unit 50 that performs various types of image processing on the captured image developed in the memory 30.

画像処理ユニット50には、メモリ30に展開された撮影画像に対してマニュアルで各種画像処理などを行うためのフォトレタッチプログラムを実装している第1画像補正ユニット60と、前述したようなニューラルネットワーク画像補正技術を用いてメモリ30に展開された入力撮影画像に対する自動的な画像補正を行う第2画像補正ユニット70と、入力撮影画像から顔領域を検出して、検出された顔領域の位置やサイズを出力する顔検出ユニット80が基本的にはプログラムの形で組み込まれている。   The image processing unit 50 includes a first image correction unit 60 in which a photo retouching program for manually performing various image processing on the captured image developed in the memory 30 and a neural network as described above. A second image correction unit 70 for performing automatic image correction on the input photographed image developed in the memory 30 using an image correction technique; and a face area detected from the input photographed image, and the position of the detected face area, A face detection unit 80 for outputting the size is basically incorporated in the form of a program.

図12で示されているように、本発明による画像補正装置としての機能を有する第2画像補正ユニット70には、この実施形態では、メモリ30に展開された入力撮影画像から作り出された補正演算用撮影画像(256×384の画像)から前述した領域非依存画像特徴量と領域依存画像特徴量からなる画像特徴量を求める画像特徴量演算部71と、図9を用いて説明された手順によって構築されたニューラルネットワーク部72と、このニューラルネットワーク部72に画像特徴量群を入力することによって出力された出力値に基づいて基本補正曲線を生成する基本補正曲線生成部73と、図9を用いて説明された手順によって算定された回帰直線をテーブル化した回帰式テーブル76と、顔検出ユニット80から与えられる顔領域位置や顔領域サイズなどの顔検出情報に基づいて入力撮影画像の顔領域の平均濃度値を入力濃度値として算出する第1前処理部74と、回帰式テーブル76を用いて第1前処理部74から与えられた入力濃度値に対応する出力濃度値を決定する第2前処理部75と、入力濃度値と出力濃度値の関係が成立するように基準補正曲線を調整することで実行補正曲線を生成する補正曲線調整部77と、この実行補正曲線を用いて入力撮影画像を画像補正する画像補正部78とが備えられている。画像補正部78は、補正曲線設定部78bによって設定された実行補正曲線に基づいて入力撮影画像を画像補正する画像補正実行部78aを備えている。   As shown in FIG. 12, the second image correction unit 70 having a function as an image correction apparatus according to the present invention includes a correction calculation generated from an input photographed image developed in the memory 30 in this embodiment. The image feature amount calculation unit 71 for obtaining the image feature amount composed of the region-independent image feature amount and the region-dependent image feature amount from the photographed image (256 × 384 image), and the procedure described with reference to FIG. The constructed neural network unit 72, a basic correction curve generating unit 73 that generates a basic correction curve based on an output value output by inputting an image feature quantity group to the neural network unit 72, and FIG. A regression equation table 76 that is a table of regression lines calculated by the procedure described above, and the face area position given by the face detection unit 80, The first preprocessing unit 74 that calculates the average density value of the face area of the input photographed image as the input density value based on the face detection information such as the area size, and the first preprocessing unit 74 using the regression equation table 76 An execution correction curve is generated by adjusting the reference correction curve so that the relationship between the input density value and the output density value is established, and the second preprocessing unit 75 that determines the output density value corresponding to the input density value that has been input. A correction curve adjustment unit 77 and an image correction unit 78 that corrects an input captured image using the execution correction curve are provided. The image correction unit 78 includes an image correction execution unit 78a that corrects an input captured image based on the execution correction curve set by the correction curve setting unit 78b.

以上のように構成された写真プリント装置における写真プリント処理を図13のフローチャートを用いて説明する。まず、写真プリント出力を行うために入力された撮影画像を読み込み(#50)、その撮影画像から作り出された補正演算用画像から画像特徴量群を算出する(#51)。画像特徴量群をニューラルネットワーク部72aの入力要素に与える(#52)。ニューラルネットワーク部72aからの出力値に基づいて基本補正曲線を作成する(#53)。次に顔検出ユニット80が、読み込んでいる撮影画像から顔領域が検出できるかどうかをチェックする(#54)。顔領域が検出されると(#54Yes分岐)、検出された顔領域に関する顔検出情報を第1前処理部74に与える。第1前処理部74は、与えられた顔検出情報に基づいて、読み込んでいる撮影画像の顔領域に含まれる画素の平均濃度値を算出する(#55)。第1前処理部74は、算出された平均濃度値を入力濃度値として回帰式テーブル76にアクセスして、出力濃度値を得る(#56)。この入力濃度値と出力濃度値の関係が基本補正曲線の調整量となる。図5で示すようなやり方で顔領域の特性に応じた基本補正曲線をシフトする調整を行う。調整された基本補正曲線は、画像補正部78での実行補正曲線として設定される(#58)。なお、ステップ#54で顔領域が検出されなければ(#54No分岐)、基本補正曲線がそのまま実行補正曲線として設定される。続いて、画像補正実行部76aが設定された実行補正曲線を用いて撮影画像を画像補正し(#59)、この補正された撮影画像からプリントデータ生成部36がプリントデータを生成する(#60)。プリントデータがプリントステーション1Bに転送されることによりプリント処理が行われ(#61)、写真プリントが出力される(#62)。   The photographic print processing in the photographic printing apparatus configured as described above will be described with reference to the flowchart of FIG. First, a captured image input to perform photographic print output is read (# 50), and an image feature quantity group is calculated from a correction calculation image created from the captured image (# 51). The image feature quantity group is given to the input element of the neural network unit 72a (# 52). A basic correction curve is created based on the output value from the neural network unit 72a (# 53). Next, the face detection unit 80 checks whether or not a face area can be detected from the read captured image (# 54). When a face area is detected (Yes in # 54), face detection information related to the detected face area is given to the first preprocessing unit 74. The first preprocessing unit 74 calculates the average density value of the pixels included in the face area of the captured image being read based on the given face detection information (# 55). The first preprocessing unit 74 accesses the regression equation table 76 using the calculated average density value as the input density value, and obtains an output density value (# 56). The relationship between the input density value and the output density value is the adjustment amount of the basic correction curve. Adjustment to shift the basic correction curve according to the characteristics of the face area is performed in the manner shown in FIG. The adjusted basic correction curve is set as an execution correction curve in the image correction unit 78 (# 58). If no face area is detected in step # 54 (# 54 No branch), the basic correction curve is set as it is as an execution correction curve. Subsequently, the image correction execution unit 76a corrects the captured image using the set execution correction curve (# 59), and the print data generation unit 36 generates print data from the corrected captured image (# 60). ). Print processing is performed by transferring the print data to the print station 1B (# 61), and a photo print is output (# 62).

上述した実施形態の説明では、回帰式として線形である回帰直線を採用したが、もちろん2次式や3次式などの回帰曲線を採用してもよい。   In the description of the embodiment described above, a regression line that is linear is adopted as the regression equation, but, of course, a regression curve such as a quadratic equation or a cubic equation may be adopted.

顔領域平均濃度値に関する回帰直線に基づいて基本補正曲線を調整する際、図5の説明では、基本補正曲線を水平移動して調整していたが、基本補正曲線を垂直移動して調整してもよい。また、所定の基準点を設定し、基本補正曲線を回転させて、調整してよい。本発明で重要な点は、顔領域の平均濃度値の補正関係を回帰直線によって求めて、この関係に基づいて基本補正曲線を調整することである。   When adjusting the basic correction curve based on the regression line related to the face area average density value, in the description of FIG. 5, the basic correction curve is adjusted by moving horizontally, but the basic correction curve is adjusted by moving vertically. Also good. Further, a predetermined reference point may be set and the basic correction curve may be rotated for adjustment. The important point in the present invention is that the correction relationship of the average density value of the face area is obtained by a regression line, and the basic correction curve is adjusted based on this relationship.

ここでは、本発明による画像補正技術が、DPショップに設置されているミニラボと呼ばれている写真プリント装置に組み込まれた例を取り上げたが、コンビニやDPショップの店頭に設置されているセルフサービス式の写真プリント装置など、種々の写真プリント装置に組み込んでもよいし、画像処理ソフトウエアの撮影画像補正機能の1つとして、この画像処理ソフトウエアのプログラムに組み込んでもよい。   Here, an example in which the image correction technology according to the present invention is incorporated in a photo printing apparatus called a minilab installed in a DP shop is taken up, but self-service installed in a store of a convenience store or DP shop. It may be incorporated into various photographic printing apparatuses such as a photographic printing apparatus, or may be incorporated into a program of the image processing software as one of the photographed image correction functions of the image processing software.

なお、上述した実施の形態では、画像プリント出力部としてのプリントステーション1Bは、印画紙Pに対し、レーザ式露光エンジンを備えたプリント露光部14で撮影画像の露光を行い、この露光後の印画紙Pを現像処理する、いわゆる銀塩写真プリント方式を採用していたが、もちろん、本発明によって補正された撮影画像のプリント方式は、このような方式に限定されるわけではなく、例えば、フィルムや紙にインクを吐出して画像を形成するインクジェットプリント方式や感熱転写シートを用いた熱転写方式など、種々の写真プリント方式を含む。   In the above-described embodiment, the print station 1B serving as the image print output unit exposes the photographic image to the photographic paper P by the print exposure unit 14 including the laser type exposure engine, and prints after the exposure. Although the so-called silver salt photographic printing method for developing the paper P was adopted, of course, the printing method of the photographed image corrected by the present invention is not limited to such a method. And various photographic printing methods such as an inkjet printing method in which an image is formed by ejecting ink onto paper and a thermal transfer method using a thermal transfer sheet.

本発明による画像補正技術で用いられる基本原理を説明する説明図Explanatory drawing explaining the basic principle used with the image correction technique by this invention サンプル画像とマニュアル補正された適正画像とにおける顔領域の平均濃度値の相関関係を示す相関図とその回帰直線を示す説明図Correlation diagram showing correlation of average density value of face area between sample image and manually corrected appropriate image, and explanatory diagram showing its regression line 本発明による画像補正技術で用いられる基本原理を説明する説明図Explanatory drawing explaining the basic principle used with the image correction technique by this invention 回帰直線を用いて入力濃度値に対応する出力濃度値を求める様子を説明する説明図Explanatory drawing explaining how to obtain an output density value corresponding to an input density value using a regression line 基本濃度曲線の調整の仕方を説明する説明図Explanatory drawing explaining how to adjust the basic density curve ニューラルネットワークの構成を示す模式図Schematic diagram showing the configuration of a neural network 画像領域に依存する画像特徴量を説明する説明図Explanatory drawing explaining the image feature amount depending on the image area 画像領域に依存しない画像特徴量を説明する説明図Explanatory drawing explaining the image feature amount independent of the image area ニューラルネットワークの構築ルーチンを示すフローチャートFlow chart showing the construction routine of the neural network 本発明による画像補正技術を採用した写真プリント装置の外観図External view of photographic printing apparatus adopting image correction technology according to the present invention 写真プリント装置のコントローラ内に構築される機能要素を説明する機能ブロック図Functional block diagram explaining the functional elements built in the controller of the photo printing device 本発明の画像補正技術を採用した画像補正ユニットの機能構成を示す機能ブロック図1 is a functional block diagram showing the functional configuration of an image correction unit that employs the image correction technology of the present invention. 写真プリント処理の手順を示すフローチャートFlow chart showing the procedure of photo print processing

符号の説明Explanation of symbols

1B:プリントステーション(プリント部)
31:画像入力部
36:プリントデータ生成部
70:第2画像補正ユニット(画像補正装置)
71:画像特徴量算出部
72:ニューラルネットワーク部(統計的学習則部)
74:第1前処理部
75:第2前処理部
76:回帰式テーブル
77:補正曲線調整部
78:画像補正部
78a:画像補正実行部
78b:補正曲線設定部
80:顔検出ユニット
1B: Print station (print section)
31: Image input unit 36: Print data generation unit 70: Second image correction unit (image correction device)
71: Image feature amount calculation unit 72: Neural network unit (statistical learning rule unit)
74: first preprocessing unit 75: second preprocessing unit 76: regression equation table 77: correction curve adjustment unit 78: image correction unit 78a: image correction execution unit 78b: correction curve setting unit 80: face detection unit

Claims (6)

入力画像を適正画像に補正曲線を用いて補正する画像補正方法において、
用意された多数のサンプル画像から元画像として順次選択された画像の画像特徴量を入力値とするとともに前記元画像から適正画像を作り出す参照補正曲線を教師値として学習させた統計的学習則部を構築するステップと、
前記サンプル画像から顔領域が検出される顔付きサンプル画像と当該顔付きサンプル画像に対応する顔付き適正画像とを抽出するステップと、
前記顔付きサンプル画像における顔領域の基準濃度値と前記顔付き適正画像における顔領域の基準濃度値とから回帰式を算定するステップと、
前記入力画像から画像特徴量群を求めるステップと、
前記入力画像の画像特徴量群を前記統計的学習則部に入力することで前記統計的学習則部から出力される出力値に基づいて基準補正曲線を作成するステップと、
前記入力画像から検出された顔領域の基準濃度値を入力濃度値として算出するステップと、
前記回帰式を用いて前記入力濃度値から導出される出力濃度値を決定するステップと、
前記入力濃度値と前記出力濃度値の関係が成立するように前記基準補正曲線を調整することで実行補正曲線を生成するステップと、
前記実行補正曲線で前記入力画像を画像補正するステップと、
からなる画像補正方法。
In an image correction method for correcting an input image to a proper image using a correction curve,
A statistical learning rule unit that learns, as an input value, an image feature amount of an image sequentially selected as an original image from a number of prepared sample images as a teacher value and a reference correction curve that creates an appropriate image from the original image Building steps,
Extracting a face sample image in which a face region is detected from the sample image and a face appropriate image corresponding to the face sample image;
Calculating a regression equation from the reference density value of the face area in the sample image with face and the reference density value of the face area in the appropriate image with face;
Obtaining an image feature quantity group from the input image;
Creating a reference correction curve based on an output value output from the statistical learning rule unit by inputting an image feature quantity group of the input image to the statistical learning rule unit;
Calculating a reference density value of the face area detected from the input image as an input density value;
Determining an output density value derived from the input density value using the regression equation;
Generating an execution correction curve by adjusting the reference correction curve so that the relationship between the input density value and the output density value is established;
Image correcting the input image with the execution correction curve;
An image correction method comprising:
前記統計的学習則部がニューラルネットワーク部であることを特徴とする請求項1による画像補正方法。 The image correction method according to claim 1, wherein the statistical learning rule part is a neural network part. 補正対象となる画像はR・G・B濃度値からなるカラー画像であり、前記補正曲線と前記回帰式は、R濃度値、G濃度値、B濃度値、R・G・B濃度値から算出される輝度値毎に作成されることを特徴とする請求項1又は2に記載の画像補正方法。 The image to be corrected is a color image composed of R, G, and B density values, and the correction curve and the regression equation are calculated from the R density value, G density value, B density value, and R, G, B density value. The image correction method according to claim 1, wherein the image correction method is created for each luminance value to be processed. 前記基準濃度値は顔領域の平均濃度値であることを特徴とする請求項1から3のいずれか一項に記載の画像補正方法。 The image correction method according to claim 1, wherein the reference density value is an average density value of a face area. 前記回帰式が回帰直線であることを特徴とする請求項1から4のいずれか一項に記載の画像補正方法。 The image correction method according to claim 1, wherein the regression equation is a regression line. 入力画像を適正画像に補正曲線を用いて補正する画像補正装置において、
用意された多数のサンプル画像から元画像として順次選択された画像の画像特徴量を入力値とするとともに前記元画像から適正画像を作り出す参照補正曲線を教師値として学習させて構築した統計的学習則部と、
前記サンプル画像から抽出された顔領域が検出される顔付きサンプル画像と当該顔付きサンプル画像に対応する顔付き適正画像とにおける顔領域の基準濃度値から算定された回帰式を格納する回帰式テーブルと、
前記入力画像から画像特徴量群を求める画像特徴量演算部と、
前記入力画像の画像特徴量群を前記統計的学習則部に入力することで前記統計的学習則部から出力される出力値に基づいて基準補正曲線を作成する基準補正曲線生成部と、
前記入力画像から検出された顔領域の基準濃度値を入力濃度値として算出する第1前処理部と、
前記回帰式テーブルを用いて前記入力濃度値から導出される出力濃度値を決定する第2前処理部と、
前記入力濃度値と前記出力濃度値の関係が成立するように前記基準補正曲線を調整することで実行補正曲線を生成する補正曲線調整部と、
前記実行補正曲線で前記入力画像を画像補正する画像補正部と、
からなる画像補正装置。
In an image correction apparatus that corrects an input image to a proper image using a correction curve,
A statistical learning rule constructed by learning, as a teacher value, a reference correction curve that uses an image feature amount of an image sequentially selected as an original image from a large number of prepared images as an input value and creates an appropriate image from the original image And
A regression equation table storing a regression equation calculated from the reference density value of the face region in the sample image with face from which the face region extracted from the sample image is detected and the appropriate image with face corresponding to the sample image with face;
An image feature quantity computing unit for obtaining an image feature quantity group from the input image;
A reference correction curve generation unit that creates a reference correction curve based on an output value output from the statistical learning rule unit by inputting an image feature amount group of the input image to the statistical learning rule unit;
A first pre-processing unit that calculates a reference density value of the face area detected from the input image as an input density value;
A second pre-processing unit that determines an output density value derived from the input density value using the regression equation table;
A correction curve adjustment unit that generates an execution correction curve by adjusting the reference correction curve so that the relationship between the input density value and the output density value is established;
An image correction unit that corrects the input image with the execution correction curve;
An image correction apparatus comprising:
JP2007308930A 2007-11-29 2007-11-29 Image correction method and image correction apparatus Active JP4998794B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007308930A JP4998794B2 (en) 2007-11-29 2007-11-29 Image correction method and image correction apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007308930A JP4998794B2 (en) 2007-11-29 2007-11-29 Image correction method and image correction apparatus

Publications (2)

Publication Number Publication Date
JP2009134433A JP2009134433A (en) 2009-06-18
JP4998794B2 true JP4998794B2 (en) 2012-08-15

Family

ID=40866263

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007308930A Active JP4998794B2 (en) 2007-11-29 2007-11-29 Image correction method and image correction apparatus

Country Status (1)

Country Link
JP (1) JP4998794B2 (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11437032B2 (en) 2017-09-29 2022-09-06 Shanghai Cambricon Information Technology Co., Ltd Image processing apparatus and method
EP3667488B1 (en) * 2017-09-29 2023-06-28 Shanghai Cambricon Information Technology Co., Ltd Image processing apparatus and method
US11450319B2 (en) 2017-09-29 2022-09-20 Cambricon (Xi'an) Semiconductor Co., Ltd. Image processing apparatus and method
EP3617959B1 (en) 2018-02-13 2021-08-04 Shanghai Cambricon Information Technology Co., Ltd Computing device and method
US11709672B2 (en) 2018-02-13 2023-07-25 Shanghai Cambricon Information Technology Co., Ltd Computing device and method
US11630666B2 (en) 2018-02-13 2023-04-18 Shanghai Cambricon Information Technology Co., Ltd Computing device and method
CN116991225A (en) 2018-02-14 2023-11-03 上海寒武纪信息科技有限公司 Control device, method and equipment of processor
WO2019218896A1 (en) 2018-05-18 2019-11-21 上海寒武纪信息科技有限公司 Computing method and related product
EP3825841A1 (en) 2018-06-27 2021-05-26 Shanghai Cambricon Information Technology Co., Ltd Method and device for parallel computation of a network model
KR102519467B1 (en) 2018-08-28 2023-04-06 캠브리콘 테크놀로지스 코퍼레이션 리미티드 Data pre-processing method, device, computer equipment and storage medium
US11703939B2 (en) 2018-09-28 2023-07-18 Shanghai Cambricon Information Technology Co., Ltd Signal processing device and related products
CN111385462A (en) 2018-12-28 2020-07-07 上海寒武纪信息科技有限公司 Signal processing device, signal processing method and related product
CN111832739B (en) 2019-04-18 2024-01-09 中科寒武纪科技股份有限公司 Data processing method and related product
US11934940B2 (en) 2019-04-18 2024-03-19 Cambricon Technologies Corporation Limited AI processor simulation
US11676028B2 (en) 2019-06-12 2023-06-13 Shanghai Cambricon Information Technology Co., Ltd Neural network quantization parameter determination method and related products
US11675676B2 (en) 2019-06-12 2023-06-13 Shanghai Cambricon Information Technology Co., Ltd Neural network quantization parameter determination method and related products
WO2021036904A1 (en) 2019-08-23 2021-03-04 安徽寒武纪信息科技有限公司 Data processing method, apparatus, computer device, and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0832838A (en) * 1994-07-21 1996-02-02 Matsushita Electric Ind Co Ltd Gradation correction method and gradation correction device
JPH0918716A (en) * 1995-06-30 1997-01-17 Ricoh Co Ltd Image forming device
JPH09168095A (en) * 1995-12-15 1997-06-24 Sharp Corp Color correction method and color image processor
JP3953569B2 (en) * 1997-03-11 2007-08-08 株式会社日立メディコ Image processing device
JP2001257883A (en) * 2000-03-13 2001-09-21 Fuji Photo Film Co Ltd Method and device for density correction
JP2001346043A (en) * 2000-06-06 2001-12-14 Konica Corp Image processor and image processing method
JP2004240738A (en) * 2003-02-06 2004-08-26 Fuji Photo Film Co Ltd Image processing method and device
JP3981744B2 (en) * 2003-11-21 2007-09-26 中部電力株式会社 Image correction method and image correction apparatus
JP2006031440A (en) * 2004-07-16 2006-02-02 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, image processing program and image processing system
EP1802096B1 (en) * 2004-09-30 2019-10-23 FUJIFILM Corporation Image processing device, method, and image processing program
JP2006259974A (en) * 2005-03-16 2006-09-28 Fuji Photo Film Co Ltd Image-processing method and device
JP2007249802A (en) * 2006-03-17 2007-09-27 Noritsu Koki Co Ltd Image processor and image processing method
JP4793292B2 (en) * 2007-03-15 2011-10-12 Nkワークス株式会社 Image processing apparatus and image processing method
JP2009027254A (en) * 2007-07-17 2009-02-05 Noritsu Koki Co Ltd Image correcting method and image correcting device

Also Published As

Publication number Publication date
JP2009134433A (en) 2009-06-18

Similar Documents

Publication Publication Date Title
JP4998794B2 (en) Image correction method and image correction apparatus
US7643696B2 (en) Image processing method and program for restricting granular noise and module for implementing the method
JP4496465B2 (en) Red-eye correction method, program, and apparatus for implementing the method
JP4655210B2 (en) Density correction curve generation method and density correction curve generation module
JP2005141477A (en) Image sharpening process and image processor implementing this process
JP4591784B2 (en) Method for creating conversion table for photographed image correction and photo printing apparatus for implementing this method
JP4441876B2 (en) Photographed image processing method, photographed image processing program, and photographed image processing apparatus
JP2006107329A (en) Photographed image processor
JP2005148915A (en) Proper face discrimination method and apparatus for implementing the method
JP2007249802A (en) Image processor and image processing method
JP2009027254A (en) Image correcting method and image correcting device
JP4798446B2 (en) Photographed image correction method and photographed image correction module
JP4366634B2 (en) Noise pixel map creation method, apparatus and program for implementing the method, and photo print apparatus
JP2009004887A (en) Image correction method and image correction device
JP4441853B2 (en) Face selection method for density correction and apparatus for carrying out this method
JPH10155091A (en) Image recorder
JP4655211B2 (en) Generation method, generation program and generation module of correction characteristics used for contrast correction
JP2005159387A (en) Method of determining density characteristic curve and density correction management apparatus for executing this method
JP4793648B2 (en) Image correction unit and image correction program
JP4284604B2 (en) Contrast adjustment method and contrast adjustment apparatus for implementing the method
JP2009010853A (en) Image correction method and image correction apparatus
JP4431980B2 (en) Gradation correction method and color printing apparatus using the method
JP2009004888A (en) Image correction method and image correction device
JP4775289B2 (en) Image processing apparatus and image processing method
JP4835900B2 (en) Image processing method and image processing apparatus for image data from a digital camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100909

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20110223

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111026

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120315

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120329

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: 20120419

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: 20120502

R150 Certificate of patent or registration of utility model

Ref document number: 4998794

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150525

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250