JP4507078B2 - Automatic face image correction method and apparatus - Google Patents

Automatic face image correction method and apparatus Download PDF

Info

Publication number
JP4507078B2
JP4507078B2 JP2004213211A JP2004213211A JP4507078B2 JP 4507078 B2 JP4507078 B2 JP 4507078B2 JP 2004213211 A JP2004213211 A JP 2004213211A JP 2004213211 A JP2004213211 A JP 2004213211A JP 4507078 B2 JP4507078 B2 JP 4507078B2
Authority
JP
Japan
Prior art keywords
area
face
correction
white
pixel
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
JP2004213211A
Other languages
Japanese (ja)
Other versions
JP2006031620A (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 JP2004213211A priority Critical patent/JP4507078B2/en
Publication of JP2006031620A publication Critical patent/JP2006031620A/en
Application granted granted Critical
Publication of JP4507078B2 publication Critical patent/JP4507078B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、自動顔画像補正技術に関する。   The present invention relates to an automatic face image correction technique.

写真プリントに人物が撮影されているときに、写真プリントの画質を向上させるために、人の顔を検出し、検出した顔の濃度が適正になるように濃度を調整したり、シャープネス補正等を行うことがある。
しかし、写真プリントの濃度を一律に調整したり、シャープネス補正を行うと、例えば、白色画像に変換される画素が生じ、白色画素領域が拡大してしまうことがある。白色画素領域が拡大すると、写真プリントが不自然なものとなり、画質を低下させる虞がある。
白色画素領域の拡大を防止する技術には、白色画素に変換される画素数を少なくするために、例えば、シャープネス補正において、所定の白色認定条件に属する画素の画素値を白色画素値から離れて設定された中間値を超えない値に変換する画像処理装置がある(例えば、特許文献1参照)。
When a person is photographed on a photo print, in order to improve the image quality of the photo print, the human face is detected, the density is adjusted so that the detected face density is appropriate, sharpness correction, etc. There are things to do.
However, when the density of a photographic print is uniformly adjusted or sharpness correction is performed, for example, pixels that are converted into a white image are generated, and the white pixel region may be enlarged. If the white pixel area is enlarged, the photographic print becomes unnatural and the image quality may be degraded.
In order to reduce the number of pixels that are converted into white pixels, for example, in the sharpness correction, the technology for preventing the enlargement of the white pixel region is to separate the pixel values of pixels belonging to a predetermined white certification condition from the white pixel values. There is an image processing apparatus that converts a value that does not exceed a set intermediate value (see, for example, Patent Document 1).

特開2002−158892号公報JP 2002-158882 A

しかしながら、特許文献1の装置は、白色領域の拡大を防止できるが、写真プリントに元から存在する白色領域を縮小させることはできない。撮影の際、例えば、フラッシュを使用した場合等に、本来階調があるはずの部分が白で表現されてしまう所謂白跳が発生することがある。特許文献1の装置では、白色画素は、濃度の調整やシャープネス補正を行っても白色画素となるため、白跳を補正することができない。このため、白跳びの発生した写真プリントについては、画像補正を行っても十分な画質の向上を図ることができなかった。特に、人物の顔が撮影されている画像データにおいて、人物の顔に白跳が発生すると写真の仕上がりが悪くなるため、白跳を補正する画像処理技術が望まれている。   However, the apparatus of Patent Document 1 can prevent the white area from being enlarged, but cannot reduce the white area originally present in the photographic print. At the time of shooting, for example, when a flash is used, so-called whiteout may occur in which a portion that should originally have a gradation is expressed in white. In the apparatus of Patent Document 1, white pixels cannot be corrected because white pixels become white pixels even if density adjustment or sharpness correction is performed. For this reason, it has not been possible to achieve a sufficient improvement in image quality even if image correction is performed on a photographic print in which whiteout occurs. In particular, in image data in which a person's face is photographed, if white jump occurs in a person's face, the finish of the photograph deteriorates, so an image processing technique for correcting white jump is desired.

本発明は上記の問題に鑑みてなされたものであり、その目的は、人物の顔の白跳を補正して、画像データを自然な状態に補正することができる自動顔画像補正技術を提供する点にある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide an automatic face image correction technique capable of correcting whiteout of a person's face and correcting image data to a natural state. In the point.

この目的を達成するための本発明に係る自動顔画像補正方法の特徴構成は、顔検出部により、画像データから顔領域を検出する顔検出ステップと、白色画素認定部により、前記顔検出ステップにおいて検出された前記顔領域内の白色画素を、所定の白色認定条件に基づいて認定するステップと白跳領域検出部により、認定された前記白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出ステップと、前記白跳領域検出ステップにおいて前記白跳領域が検出された場合に、補正領域設定部により、前記白跳領域とその周辺の一定の領域とを含む補正領域を設定する補正領域設定ステップと、顔補正部により、前記補正領域の前記顔領域との境界画素の第1輝度値と、前記白跳領域の中心画素の第2輝度値とを検出し、前記補正領域内の画素の輝度値を、前記補正領域と前記顔領域との境界から前記白跳領域の中心に向けて、前記第1輝度値から前記第2輝度値まで次第に変化するように補正する顔補正ステップとから構成される点にある。
即ち、上記特徴構成によれば、画像データの顔領域から、本来階調があるはずの部分が白で表現されてしまう所謂白跳領域を検出し、白色画素をその周辺の顔領域の画素値に応じて補正するので、人物の顔を自然なものとしながら、白跳領域の補正を行うことができ、写真プリントの画質の向上を図ることができる。特に、補正領域内の画素の階調が次第に変化するように補正するので、白跳領域とその周辺領域との階調の差が大きく不自然なものとなっている画像を自然なものとすることができ、画質の向上を図ることができる。
In order to achieve this object, the feature configuration of the automatic face image correction method according to the present invention includes a face detection step for detecting a face area from image data by a face detection unit, and a white pixel recognition unit for the face detection step. The step of certifying the detected white pixels in the face area based on a predetermined white qualification condition, and when the admitted white pixels are continuously distributed over a predetermined range by a whiteout area detection unit A whitening area detection step for detecting a whitening area, and when the whitening area is detected in the whitening area detection step, the whitening area and a certain area around the whitening area are detected by a correction area setting unit. A correction area setting step for setting a correction area including a first luminance value of a boundary pixel between the correction area and the face area, and a second luminance value of a center pixel of the whiteout area by a face correction unit; And the luminance value of the pixel in the correction region gradually changes from the first luminance value to the second luminance value from the boundary between the correction region and the face region toward the center of the whiteout region. And a face correction step for correcting the difference.
That is, according to the above feature configuration, a so-called whiteout region in which a portion that should originally have a gradation is expressed in white is detected from the face region of the image data, and the white pixel is determined as the pixel value of the surrounding face region. Therefore, the white area can be corrected while making the human face natural, and the image quality of the photo print can be improved. In particular, since correction is performed so that the gradation of the pixels in the correction area gradually changes, an image in which the gradation difference between the whiteout area and the surrounding area is large and unnatural is made natural. Image quality can be improved.

この目的を達成するための本発明に係る自動顔画像補正方法の他の特徴構成は、前記白跳領域検出ステップは、前記顔領域から瞳を検出し、前記瞳を白跳領域検出対象外とする点にある。
瞳の白眼部分は、一定の範囲に渡って白色画素が連続分布しているが、この白眼部分については補正する必要がない。このため、白跳検出対象領域から瞳を除くことで、瞳の白眼部分が白跳領域と判定されるのを防止し、不必要な補正が為されるのを防止することができる。
Another feature of the automatic face image correction method according to the present invention for achieving this object is that the whiteout region detecting step detects a pupil from the face region, and the pupil is excluded from a whiteout region detection target. There is in point to do.
In the white eye part of the pupil, white pixels are continuously distributed over a certain range, but it is not necessary to correct the white eye part. For this reason, by removing the pupil from the whiteout detection target region, it is possible to prevent the white-eye portion of the pupil from being determined as the whiteout region and to prevent unnecessary correction.

また、本発明は、上述した自動顔画像補正方法をコンピュータに実行させるプログラムやそのプログラムを記録した媒体も権利の対象とするものであり、そのような自動顔画像補正プログラムは、画像データから顔領域を検出する顔検出機能と、前記顔検出機能において検出された前記顔領域内の白色画素を、所定の白色認定条件に基づいて認定し、認定された前記白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出機能と、前記白跳領域検出機能において前記白跳領域が検出された場合に、前記白跳領域とその周辺の一定の領域とを含む補正領域を設定し、前記補正領域の前記顔領域との境界画素の第1輝度値と、前記白跳領域の中心画素の第2輝度値とを検出し、前記補正領域内の画素の輝度値を、前記補正領域と前記顔領域との境界から前記白跳領域の中心に向けて、前記第1輝度値から前記第2輝度値まで次第に変化するように補正する顔補正機能とを備えている。当然ながら、このような自動顔画像補正プログラムも上述した自動顔画像補正方法におけるすべての作用効果を得ることができる。また、自動顔画像補正方法において記載した従属項に係る機能を自動顔画像補正プログラムに追加するのも好適である。 The present invention also covers a program for causing a computer to execute the above-described automatic face image correction method and a medium on which the program is recorded, and such an automatic face image correction program uses a face from image data. A face detection function for detecting an area, and white pixels in the face area detected by the face detection function are certified based on a predetermined white certification condition, and the certified white pixels are continuously distributed over a predetermined range. A white-out area detection function for detecting as a white-out area when the white-out area is detected, and the white-out area and a certain area around the white-out area when the white-out area is detected by the white-out area detection function. A correction area is set, a first luminance value of a boundary pixel between the correction area and the face area, and a second luminance value of a center pixel of the whiteout area are detected, and a luminance value of a pixel in the correction area The Toward the boundary of the serial correction region and the face region in the center of the white跳領zone, and a face correction function for correcting such changed gradually from said first luminance value to said second luminance value. Naturally, such an automatic face image correction program can also obtain all the effects of the automatic face image correction method described above. It is also preferable to add the function according to the dependent claim described in the automatic face image correction method to the automatic face image correction program.

本発明では、更に、上述した自動顔画像補正方法を実施する自動顔画像補正装置も権利の対象としており、そのような自動顔画像補正装置は、画像データから顔領域を検出する顔検出部と、前記顔検出部において検出された前記顔領域内の白色画素を、所定の白色認定条件に基づいて認定し、認定された前記白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出部と、前記白跳領域検出部において前記白跳領域が検出された場合に、前記白跳領域とその周辺の一定の領域とを含む補正領域を設定する補正領域設定部と、前記補正領域の前記顔領域との境界画素の第1輝度値と、前記白跳領域の中心画素の第2輝度値とを検出し、前記補正領域内の画素の輝度値を、前記補正領域と前記顔領域との境界から前記白跳領域の中心に向けて、前記第1輝度値から前記第2輝度値まで次第に変化するように補正する顔補正部とを備えている。当然ながら、このような自動顔画像補正装置も上述した自動顔画像補正方法におけるすべての作用効果を得ることができる。また、自動顔画像補正方法において記載した従属項に係る構成を自動顔画像補正装置に追加するのも好適である。
本発明によるその他の特徴及び利点は、以下図面を用いた実施形態の説明により明らかになるだろう。
In the present invention, an automatic face image correction apparatus that performs the above-described automatic face image correction method is also subject to rights. Such an automatic face image correction apparatus includes a face detection unit that detects a face area from image data, and , White pixels in the face area detected by the face detection unit are certified based on a predetermined white certification condition, and the whiteout area when the certified white pixels are continuously distributed over a predetermined range And a correction area setting for setting a correction area including the whitening area and a certain area around the whitening area when the whitening area is detected by the whitening area detection unit. A first luminance value of a boundary pixel between the correction area and the face area of the correction area, and a second luminance value of a center pixel of the whiteout area, and the luminance value of the pixel in the correction area is Before the boundary between the correction area and the face area Toward the center of the white跳領zone, and a face correcting unit for correcting such changed gradually from said first luminance value to said second luminance value. Naturally, such an automatic face image correction apparatus can also obtain all the effects of the automatic face image correction method described above. It is also preferable to add the configuration according to the dependent claim described in the automatic face image correction method to the automatic face image correction apparatus.
Other features and advantages of the present invention will become apparent from the following description of embodiments using the drawings.

本発明の第一実施形態について、図面に基づいて説明する。
図1は、本発明による自動顔画像補正技術を採用した写真プリント装置のコントローラの種々の動作を行うための機能部を示しており、各機能は、ハードウエア又はソフトウエアあるいはその両方で構築している。
A first embodiment of the present invention will be described with reference to the drawings.
FIG. 1 shows functional units for performing various operations of a controller of a photographic printing apparatus employing an automatic face image correction technique according to the present invention. Each function is constructed by hardware and / or software. ing.

写真プリント装置は、スキャナ20やメディアリーダ21によって読み取られた画像データを取り込んで次の処理のために必要な前処理を行う画像入力部31と、グラフィック操作画面の作成やキーボード24やマウス25等による操作入力から制御コマンドを生成するグラフィックユーザインターフェース(以下GUIと略称する)を構築するGUI部33と、GUI部33から送られてきた制御コマンドや直接キーボード24等から入力された操作命令に基づいて所望のプリントデータを生成するために画像入力部31からメモリ30に転送された画像データに対する画像処理等を行うプリント管理部32と、色補正等のプレジャッジプリント作業時にプリントソース画像や予想仕上がりプリント画像さらにはGUI部33から送られてきたグラフィックデータをモニタ23に表示させるためのビデオ信号を生成するビデオ制御部35と、画像処理が完了した画像データに基づいてプリントステーション1に適したプリントデータを生成するプリントデータ生成部36と、顧客の要望に応じて生の画像データや画像処理が完了した画像データ等をCD−Rに書き込むための形式にフォーマットするフォーマッタ部37とを備えている。   The photo printing apparatus 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, creation of a graphic operation screen, a keyboard 24, a mouse 25, and the like. A GUI unit 33 for constructing a graphic user interface (hereinafter abbreviated as GUI) for generating a control command from an operation input by the control unit, a control command sent from the GUI unit 33, an operation command input directly from the keyboard 24, etc. A print management unit 32 for performing image processing on the image data transferred from the image input unit 31 to the memory 30 in order to generate desired print data, and a print source image and an expected finish at the time of pre-judge printing work such as color correction. Sent from the print image and the GUI 33 A video control unit 35 that generates a video signal for causing the monitor 23 to display the graphic data, a print data generation unit 36 that generates print data suitable for the print station 1 based on the image data that has undergone image processing, A formatter unit 37 that formats raw image data, image data that has been subjected to image processing, and the like into a format for writing to a CD-R according to a customer's request is provided.

プリント管理部32は、プリントサイズやプリント枚数などを管理するプリント注文処理ユニット60、メモリ30に展開された画像データに対して色補正やフィルタリング(ぼかしやシャープネスなど)等のフォトレタッチ処理を施す画像処理ユニット70を備えている。   The print management unit 32 performs an image retouching process such as color correction and filtering (such as blurring and sharpness) on the image data developed in the print order processing unit 60 and the memory 30 for managing the print size and the number of prints. A processing unit 70 is provided.

画像処理ユニット70には本発明に係る自動顔画像補正技術を採用した顔画像補正手段90が含まれている。顔画像補正手段90には、図2に示すように、画像データ入力部91、顔検出部92、瞳検出部93、白色画素認定部94、白跳領域検出部95、補正領域設定部96、顔補正部97、及び、補正画像データ出力部98を備えている。顔検出部92は、画像データから顔領域を検出する顔検出ステップを行う処理部であり、白色画素認定部94及び白跳領域検出部95は、顔検出部92が検出した顔領域内の白色画素を、所定の白色認定条件に基づいて認定し、認定された白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出ステップを行う処理部である。顔補正部97は、白跳領域検出ステップにおいて白跳領域が検出された場合に、白跳領域を白跳領域の周辺画素に基づいて補正する顔補正ステップを行う処理部である。また、瞳検出部93は、顔領域の画像データから瞳を検出する処理部であり、補正領域設定部96は、白跳領域検出部95が白跳領域を検出した場合に、白跳領域とその周辺の一定の領域とを含む補正領域を設定する補正領域設定ステップを行う処理部である。   The image processing unit 70 includes face image correction means 90 that employs the automatic face image correction technique according to the present invention. As shown in FIG. 2, the face image correction means 90 includes an image data input unit 91, a face detection unit 92, a pupil detection unit 93, a white pixel recognition unit 94, a whiteout region detection unit 95, a correction region setting unit 96, A face correction unit 97 and a corrected image data output unit 98 are provided. The face detection unit 92 is a processing unit that performs a face detection step of detecting a face region from image data. The white pixel recognition unit 94 and the whiteout region detection unit 95 are white in the face region detected by the face detection unit 92. It is a processing unit that performs a whiteout region detection step of detecting pixels as whiteout regions when the pixels are recognized based on a predetermined white color recognition condition and the recognized white pixels are continuously distributed over a predetermined range. The face correcting unit 97 is a processing unit that performs a face correcting step of correcting the whiteout area based on the peripheral pixels of the whiteout area when the whiteout area is detected in the whiteout area detecting step. The pupil detection unit 93 is a processing unit that detects the pupil from the image data of the face region. The correction region setting unit 96 detects the whitening region when the whitening region detection unit 95 detects the whitening region. It is a processing unit that performs a correction area setting step for setting a correction area including a certain area around the area.

次に、上述した各処理部(各ステップ、各機能)における処理の詳細について説明する。図3は、本発明による白跳補正の処理ルーチンを示すフローチャートである。
先ず、画像データ入力部91が、画像データをメモリ30から取得する(#100)。
顔検出部92は、画像データ入力部91から画像データを受取り、画像データ中の人物の顔を検出して、顔領域を設定する(#200)。人物の顔が検出されない場合には、補正画像データ出力部98に対し画像データをそのまま出力する(#250でNO分岐)。人物の顔が検出された場合には、瞳検出部93に対し、画像データと、当該顔領域のデータとを出力する(#250でYES分岐)。瞳検出部93は、顔領域中の瞳を検出し、瞳が検出された場合には、顔領域から瞳を除いた領域を白跳検出対象領域として設定する(#300)。
Next, details of processing in each processing unit (each step, each function) described above will be described. FIG. 3 is a flowchart showing a processing routine for whiteout correction according to the present invention.
First, the image data input unit 91 acquires image data from the memory 30 (# 100).
The face detection unit 92 receives image data from the image data input unit 91, detects a human face in the image data, and sets a face area (# 200). If no human face is detected, the image data is output to the corrected image data output unit 98 as it is (NO branch at # 250). When a human face is detected, the image data and the data of the face area are output to the pupil detection unit 93 (YES branch at # 250). The pupil detection unit 93 detects a pupil in the face area, and when a pupil is detected, sets an area obtained by removing the pupil from the face area as a whiteout detection target area (# 300).

白色画素認定部94は、顔検出部92から画像データと顔領域データとを取得し、顔領域内の白色画素を所定の白色認定条件に基づいて検出する(#400)。ここでの白色認定条件は、R・G・B輝度値夫々に対して設定されたしきい値であり、注目画素のR・G・B輝度値が何れも設定されたしきい値以上である場合に白色画素であると認定する。   The white pixel recognition unit 94 acquires image data and face area data from the face detection unit 92, and detects white pixels in the face area based on a predetermined white recognition condition (# 400). The white recognition condition here is a threshold value set for each of the R, G, and B luminance values, and the R, G, and B luminance values of the target pixel are all equal to or greater than the set threshold value. In this case, the pixel is recognized as a white pixel.

詳細には、白色画素認定部94は、図4に示すように、顔領域の画素から白色認定を行う注目画素を決定し(#401)、注目画素のR・G・B輝度値を取得する(#402)。ここで、本実施形態では、しきい値として250が設定されている。従って、注目画素のR・G・B輝度値が全て250以上か否かを判定し(#403)、R・G・B輝度値が全て250以上である場合には、白色画素であると認定してその画素位置を記憶する(#404)。白色画素認定部94は、ステップ#401乃至#404の白色認定を、顔領域の全ての画素に対して行い(#405)、顔領域の全画素について白色認定が終了すると、記憶した白色画素の画素位置に基づいて、白色画素マップを作成する(#406)。尚、この白色画素マップの作成は白色画素の検出毎に、ステップ#404の段階で行うようにしてもよい。   Specifically, as shown in FIG. 4, the white pixel recognition unit 94 determines a target pixel for white recognition from the face area pixels (# 401), and acquires the R, G, and B luminance values of the target pixel. (# 402). Here, in this embodiment, 250 is set as the threshold value. Therefore, it is determined whether or not the R, G, and B luminance values of the target pixel are all 250 or more (# 403), and if the R, G, and B luminance values are all 250 or more, the pixel is recognized as a white pixel. Then, the pixel position is stored (# 404). The white pixel recognition unit 94 performs white recognition in steps # 401 to # 404 on all the pixels in the face area (# 405), and when the white recognition is completed for all the pixels in the face area, A white pixel map is created based on the pixel position (# 406). The white pixel map may be created at the step # 404 every time a white pixel is detected.

白跳領域検出部95は、白色画素認定部94が作成した白色画素マップを用いて、白跳領域を検出する(#500)。詳細には、先ず、各白色画素の連続・不連続を判定し、各白色画素が属する白跳領域を特定する。白跳領域検出部95は、図5に示すように、白色画素マップから、領域の特定を行う白色画素を求め、これを注目画素とする(#501)。そして、注目画素の周囲8近傍にある画素から、白色画素として認定されている画素であって、どの領域にも属していない白色画素を抽出する(#502)。白色画素が抽出された場合は、注目画素と同一領域に属する画素として記憶する(#503)。同様に、抽出された白色画素を注目画素とし、周囲8近傍にある画素から、白色画素として認定されている画素であって、どの領域にも属していない白色画素を抽出する(#502で)。これを、周囲にどの領域にも属さない白色画素が無くなるまで繰返し実行し、連続分布する白色領域を特定する。尚、同一領域にあると判定する画素の範囲は、8近傍にある画素に限られる必要はなく、4近傍等、画像データの大きさや解像度に応じて設定する。同一領域に属する画素が検出されなくなると(#502でNO分岐)、領域の特定を行っていない白色画素を白色画素マップから取得し、ステップ#501に移行する(#504でYES分岐)。そして、領域の特定を行っていない白色画素がなくなるまで、ステップ#501乃至#503を繰返し実施する。   The whiteout region detection unit 95 detects a whiteout region using the white pixel map created by the white pixel recognition unit 94 (# 500). Specifically, first, the white pixels are determined to be continuous or discontinuous, and the whiteout region to which each white pixel belongs is specified. As shown in FIG. 5, the whiteout region detection unit 95 obtains a white pixel for specifying a region from the white pixel map, and sets this as a target pixel (# 501). Then, a pixel that is recognized as a white pixel and that does not belong to any region is extracted from pixels in the vicinity of the periphery 8 of the target pixel (# 502). If a white pixel is extracted, it is stored as a pixel belonging to the same area as the target pixel (# 503). Similarly, the extracted white pixel is set as a target pixel, and white pixels that are recognized as white pixels and do not belong to any region are extracted from pixels in the vicinity of the surrounding 8 (in # 502). . This is repeated until there are no white pixels that do not belong to any region in the surrounding area, and a continuously distributed white region is specified. The range of pixels determined to be in the same region need not be limited to pixels in the vicinity of 8, but is set according to the size and resolution of image data, such as 4 neighborhoods. When pixels belonging to the same area are no longer detected (NO branch at # 502), white pixels that have not been identified are acquired from the white pixel map, and the process proceeds to step # 501 (YES branch at # 504). Steps # 501 to # 503 are repeated until there are no white pixels for which no area has been specified.

更に、白跳領域検出部95は、ステップ#500で検出した白跳領域夫々について、所定の補正対象条件に基づいて、補正対象であるか否かを判定する(#550)。詳細には、白跳領域の面積と、顔領域の面積とを算出し、顔領域の面積に対する白跳領域の面積の割合が一定の範囲内である場合に、補正対象であると判定する。白跳領域の大きさが視認可能な大きさより小さい領域や、白跳領域の大きさが非常に大きく補正しても画質の向上が望めない領域等、また、白跳領域ではない可能性のある領域について、補正対象から除くためである。   Furthermore, the whiteout region detection unit 95 determines whether each whiteout region detected in step # 500 is a correction target based on a predetermined correction target condition (# 550). Specifically, the area of the white area and the area of the face area are calculated, and when the ratio of the area of the white area to the area of the face area is within a certain range, it is determined to be a correction target. The area of the overexposure area is smaller than the visible area, the area where the image quality cannot be improved even if the overexposure area is corrected to a very large size, etc. This is because the area is excluded from the correction target.

続いて、補正領域設定部96及び顔補正部97は、ステップ#550で補正対象と判定された白跳領域に対する補正を行う(#600)。ここでは、補正領域内の画素を、補正領域と顔領域との境界から白跳領域の中心までの間の画素を均すように補正する。   Subsequently, the correction area setting unit 96 and the face correction unit 97 perform correction on the overexposure area determined as the correction target in Step # 550 (# 600). Here, the pixels in the correction area are corrected so as to equalize the pixels between the boundary between the correction area and the face area and the center of the whiteout area.

詳細には、図6及び図7に示すように、先ず、補正領域設定部96が、白跳領域に対し補正を行う補正領域を設定する(#601)。ここでの補正領域は、図7に示すように、境界Wで囲まれる白跳領域を、白跳領域の中心画素Bを中心として所定の割合で拡大した、境界Xで囲まれる領域となる。   Specifically, as shown in FIGS. 6 and 7, first, the correction area setting unit 96 sets a correction area for correcting the whiteout area (# 601). As shown in FIG. 7, the correction area here is an area surrounded by the boundary X, in which the whiteout area surrounded by the boundary W is enlarged at a predetermined ratio with the center pixel B of the whiteout area as the center.

次に、顔補正部97が、補正領域と顔領域との境界X上の画素、即ち、図7の画素Aの輝度値を取得し、この輝度値を第1輝度値とする(#602)。更に、白跳領域の中心画素、即ち、図7の画素Bの輝度値を取得して、第2輝度値とする(#603)。そして、画素Aから画素Bまでの間の画素を、その輝度値が、第1輝度値(画素Aの輝度値)から第2輝度値(画素Bの輝度値)まで一定の割合で次第に変化するように補正する。これを、画素B周りに全周に渡って実行する。具体的には、境界X上の画素を順次画素Aとし、この画素Aの輝度値を第1輝度値として、画素Aから画素Bまでの間の画素を補正することで、補正領域内の全ての画素を補正する(#604)。   Next, the face correction unit 97 acquires the brightness value of the pixel on the boundary X between the correction area and the face area, that is, the pixel A in FIG. 7, and uses this brightness value as the first brightness value (# 602). . Further, the luminance value of the center pixel of the whiteout region, that is, the pixel B in FIG. 7 is acquired and set as the second luminance value (# 603). The luminance value of the pixels between the pixel A and the pixel B gradually changes at a constant rate from the first luminance value (the luminance value of the pixel A) to the second luminance value (the luminance value of the pixel B). Correct as follows. This is performed all around the pixel B. Specifically, the pixels on the boundary X are sequentially set as the pixel A, the luminance value of the pixel A is set as the first luminance value, and the pixels between the pixel A and the pixel B are corrected, so that all the pixels in the correction area are corrected. Are corrected (# 604).

補正画像データ出力部98は、補正後の画像データをメモリ30に対して出力する(#700)。これによって、プリントステーション1においてプリントされる画像や、CD−R等に書き込む画像について白跳を無くすことができる。   The corrected image data output unit 98 outputs the corrected image data to the memory 30 (# 700). As a result, it is possible to eliminate whiteout in an image printed at the print station 1 or an image written on a CD-R or the like.

次に、本発明の第二実施形態について図6及び図8を基に説明する。
上記第一実施形態では、白跳を、補正領域設定部96及び顔補正部97が、補正領域内の画素を、補正領域と顔領域との境界から白跳領域の中心までの間の画素を均すように補正したが、本実施形態では、図8に示すように、補正領域内の白跳領域周辺の画素を白跳領域内に広げるように補正する。
Next, a second embodiment of the present invention will be described with reference to FIGS.
In the first embodiment, the white area is corrected by the correction area setting unit 96 and the face correction unit 97. The pixels in the correction area are pixels between the boundary between the correction area and the face area and the center of the white area. In this embodiment, correction is performed so that the pixels around the whiteout area in the correction area are expanded into the whiteout area as shown in FIG.

詳細には、顔補正部97が、ステップ#602において、補正領域と顔領域との境界X上の画素、図8の画素Aの輝度値を取得し、この輝度値を第1輝度値とする。ステップ#603において、顔補正部97が、画素Aと白跳領域の中心画素Bとを結ぶ線と、白跳領域の境界Wとの交点に位置する画素を画素Cとし、この輝度値を取得して、第2輝度値とする。そして、ステップ#604において、画素Aから画素Bまでの間の画素を、その輝度値が、第1輝度値(画素Aの輝度値)から第2輝度値(画素Cの輝度値)まで一定の割合で次第に変化するように補正する。これを、第一実施形態と同様に、画素B周りに全周に渡って実行することで、補正領域内の全ての画素を補正する。   Specifically, in step # 602, the face correction unit 97 acquires the luminance value of the pixel on the boundary X between the correction region and the face region, the pixel A in FIG. 8, and uses this luminance value as the first luminance value. . In step # 603, the face correcting unit 97 sets the pixel located at the intersection of the line connecting the pixel A and the center pixel B of the whiteout area and the boundary W of the whiteout area as the pixel C, and obtains this luminance value. Thus, the second luminance value is set. In step # 604, the luminance value of the pixels from pixel A to pixel B is constant from the first luminance value (the luminance value of pixel A) to the second luminance value (the luminance value of pixel C). Correction is made so that the rate gradually changes. As in the first embodiment, all pixels in the correction area are corrected by performing the entire circumference around the pixel B.

尚、第一実施形態では、第二輝度値として略白色の画素Bの輝度値を設定するので補正領域の中心は略白色になるが、本実施形態では、第二輝度値として略肌色の画素Cの輝度値を設定するので補正領域の中心は略肌色になる。画像データに応じて、第一実施形態における補正と、第二実施形態における補正とを選択的に実施可能に構成するのも好ましい実施態様である。   In the first embodiment, since the brightness value of the substantially white pixel B is set as the second brightness value, the center of the correction area is substantially white. However, in the present embodiment, the substantially skin-colored pixel is used as the second brightness value. Since the luminance value of C is set, the center of the correction area is substantially skin color. According to image data, it is also a preferred embodiment that the correction in the first embodiment and the correction in the second embodiment can be selectively performed.

本発明に係る自動顔画像補正技術を採用した写真プリント装置の構成図Configuration diagram of a photo printing apparatus adopting automatic face image correction technology according to the present invention 本発明による顔画像補正手段の構成図Configuration diagram of face image correcting means according to the present invention 本発明による白跳補正の処理ルーチンを示すフローチャートThe flowchart which shows the processing routine of white-out correction by this invention 本発明による白色画素の認定サブルーチンを示すフローチャートThe flowchart which shows the recognition subroutine of the white pixel by this invention 本発明による白跳領域の検出サブルーチンを示すフローチャートFlowchart showing a whiteout region detection subroutine according to the present invention. 本発明による白跳の補正サブルーチンを示すフローチャートFlowchart showing a whiteout correction subroutine according to the present invention. 白跳領域及び補正領域の対応を示す模式図Schematic diagram showing correspondence between whiteout area and correction area 白跳領域及び補正領域の対応を示す模式図Schematic diagram showing correspondence between whiteout area and correction area

符号の説明Explanation of symbols

92 顔検出部
93 瞳検出部
95 白跳領域検出部
96 補正領域設定部
97 顔補正部
92 face detection unit 93 pupil detection unit 95 white area detection unit 96 correction region setting unit 97 face correction unit

Claims (4)

顔検出部により、画像データから顔領域を検出する顔検出ステップと、
白色画素認定部により、前記顔検出ステップにおいて検出された前記顔領域内の白色画素を、所定の白色認定条件に基づいて認定する白色画素認定ステップと
白跳領域検出部により、認定された前記白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出ステップと、
前記白跳領域検出ステップにおいて前記白跳領域が検出された場合に、補正領域設定部により、前記白跳領域とその周辺の一定の領域とを含む補正領域を設定する補正領域設定ステップと、
顔補正部により、前記補正領域の前記顔領域との境界画素の第1輝度値と、前記白跳領域の中心画素の第2輝度値とを検出し、前記補正領域内の画素の輝度値を、前記補正領域と前記顔領域との境界から前記白跳領域の中心に向けて、前記第1輝度値から前記第2輝度値まで次第に変化するように補正する顔補正ステップとから構成される自動顔画像補正方法。
A face detection step of detecting a face region from the image data by the face detection unit ;
A white pixel recognition step for recognizing a white pixel in the face area detected in the face detection step based on a predetermined white recognition condition by a white pixel recognition unit ;
A whiteout region detection step of detecting a whiteout region when the recognized white pixels are continuously distributed over a predetermined range by a whiteout region detection unit ,
A correction area setting step for setting a correction area including the whitening area and a certain area around the whitening area when the whitening area is detected in the whitening area detection step ;
A face correction unit detects a first luminance value of a boundary pixel between the correction area and the face area and a second luminance value of a center pixel of the whiteout area, and determines a luminance value of the pixels in the correction area. And a face correction step for correcting so as to gradually change from the first luminance value to the second luminance value from the boundary between the correction area and the face area toward the center of the whiteout area. Face image correction method.
前記白跳領域検出ステップは、前記顔領域から瞳を検出し、前記瞳を白跳領域検出対象外とする請求項1に記載の自動顔画像補正方法。   The automatic face image correction method according to claim 1, wherein the whitening region detection step detects a pupil from the face region and excludes the pupil from being a whitening region detection target. 画像データから顔領域を検出する顔検出機能と、
前記顔検出機能において検出された前記顔領域内の白色画素を、所定の白色認定条件に基づいて認定し、認定された前記白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出機能と、
前記白跳領域検出機能において前記白跳領域が検出された場合に、前記白跳領域とその周辺の一定の領域とを含む補正領域を設定し、前記補正領域の前記顔領域との境界画素の第1輝度値と、前記白跳領域の中心画素の第2輝度値とを検出し、前記補正領域内の画素の輝度値を、前記補正領域と前記顔領域との境界から前記白跳領域の中心に向けて、前記第1輝度値から前記第2輝度値まで次第に変化するように補正する顔補正機能とをコンピュータに実行させる自動顔画像補正プログラム。
A face detection function for detecting a face area from image data;
A white pixel in the face area detected by the face detection function is recognized based on a predetermined white recognition condition, and when the recognized white pixel is continuously distributed over a predetermined range, it is determined as a whiteout area. A white area detection function to detect,
When the white spot area is detected by the white spot area detection function, a correction area including the white spot area and a certain area around the white spot area is set, and a boundary pixel between the correction area and the face area is set. A first luminance value and a second luminance value of a central pixel of the whiteout area are detected, and a luminance value of a pixel in the correction area is determined from the boundary between the correction area and the face area. An automatic face image correction program for causing a computer to execute a face correction function for correcting so as to gradually change from the first luminance value to the second luminance value toward the center .
画像データから顔領域を検出する顔検出部と、
前記顔検出部において検出された前記顔領域内の白色画素を、所定の白色認定条件に基づいて認定し、認定された前記白色画素が所定の範囲以上連続分布しているときに白跳領域として検出する白跳領域検出部と、
前記白跳領域検出部において前記白跳領域が検出された場合に、前記白跳領域とその周辺の一定の領域とを含む補正領域を設定する補正領域設定部と、前記補正領域の前記顔領域との境界画素の第1輝度値と、前記白跳領域の中心画素の第2輝度値とを検出し、前記補正領域内の画素の輝度値を、前記補正領域と前記顔領域との境界から前記白跳領域の中心に向けて、前記第1輝度値から前記第2輝度値まで次第に変化するように補正する顔補正部とから構成される自動顔画像補正装置。
A face detection unit for detecting a face area from image data;
A white pixel in the face area detected by the face detection unit is certified based on a predetermined white certification condition, and when the certified white pixel is continuously distributed over a predetermined range, the white pixel is defined as a whiteout area. A white area detection unit to detect,
A correction area setting unit that sets a correction area including the whitening area and a certain area around the whitening area when the whitening area is detected by the whitening area detection unit; and the face area of the correction area And the second luminance value of the center pixel of the whiteout region is detected, and the luminance value of the pixel in the correction region is determined from the boundary between the correction region and the face region. An automatic face image correction apparatus including a face correction unit that performs correction so as to gradually change from the first luminance value to the second luminance value toward the center of the whiteout region .
JP2004213211A 2004-07-21 2004-07-21 Automatic face image correction method and apparatus Active JP4507078B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004213211A JP4507078B2 (en) 2004-07-21 2004-07-21 Automatic face image correction method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004213211A JP4507078B2 (en) 2004-07-21 2004-07-21 Automatic face image correction method and apparatus

Publications (2)

Publication Number Publication Date
JP2006031620A JP2006031620A (en) 2006-02-02
JP4507078B2 true JP4507078B2 (en) 2010-07-21

Family

ID=35897849

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004213211A Active JP4507078B2 (en) 2004-07-21 2004-07-21 Automatic face image correction method and apparatus

Country Status (1)

Country Link
JP (1) JP4507078B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6458569B2 (en) 2015-03-12 2019-01-30 オムロン株式会社 Image processing apparatus and image processing method
CN111192241B (en) * 2019-12-23 2024-02-13 深圳市优必选科技股份有限公司 Quality evaluation method and device for face image and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07336602A (en) * 1994-06-06 1995-12-22 Matsushita Electric Ind Co Ltd Correction circuit for defective picture element
JPH09163130A (en) * 1995-12-01 1997-06-20 Matsushita Electric Ind Co Ltd Image reader
JP2001238136A (en) * 1999-12-29 2001-08-31 Ge Medical Systems Global Technology Co Llc Correction of defective pixel in detector
WO2003044739A1 (en) * 2001-11-16 2003-05-30 Adobe Systems Incorporated Generating replacement data values for an image region
WO2004010711A1 (en) * 2002-07-18 2004-01-29 Sony Corporation Imaging data processing method, imaging data processing device, and computer program
JP2004199548A (en) * 2002-12-20 2004-07-15 Fuji Xerox Co Ltd Image processor, image processing method, image processing program, printed matter inspection device, printed matter inspection method, and printed matter inspection program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07336602A (en) * 1994-06-06 1995-12-22 Matsushita Electric Ind Co Ltd Correction circuit for defective picture element
JPH09163130A (en) * 1995-12-01 1997-06-20 Matsushita Electric Ind Co Ltd Image reader
JP2001238136A (en) * 1999-12-29 2001-08-31 Ge Medical Systems Global Technology Co Llc Correction of defective pixel in detector
WO2003044739A1 (en) * 2001-11-16 2003-05-30 Adobe Systems Incorporated Generating replacement data values for an image region
WO2004010711A1 (en) * 2002-07-18 2004-01-29 Sony Corporation Imaging data processing method, imaging data processing device, and computer program
JP2004199548A (en) * 2002-12-20 2004-07-15 Fuji Xerox Co Ltd Image processor, image processing method, image processing program, printed matter inspection device, printed matter inspection method, and printed matter inspection program

Also Published As

Publication number Publication date
JP2006031620A (en) 2006-02-02

Similar Documents

Publication Publication Date Title
US7751640B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US20040234156A1 (en) Data conversion apparatus and data conversion program storage medium
US20050286793A1 (en) Photographic image processing method and equipment
JP4368513B2 (en) Image processing method and apparatus, and recording medium
JP2005310068A (en) Method for correcting white of eye, and device for executing the method
JP2005063406A (en) Image processing apparatus and method therefor
JP2005354278A (en) Image data processing apparatus for processing image data of image picked up by imaging means
JP2006343863A (en) Image processor and image processing method
JP2005309971A (en) Red-eye compensation method, program and device for executing the same method
JP2005286830A (en) Image processing method, image processing apparatus, and program
JP4507078B2 (en) Automatic face image correction method and apparatus
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
JPH10232915A (en) Image processor and its method
JP2004023737A (en) Image processing apparatus and method thereof
JP5157760B2 (en) Photo image processing method, photo image processing program, and photo image processing apparatus
JP2007201655A (en) Image processing apparatus
JP2009004951A (en) Image processing device, method, and program
JP2006352601A (en) Image processor and method thereof
JP2006146646A (en) Method and apparatus for processing photographic image
JP2006059162A (en) Tooth image correction method and device
JP2009081631A (en) Image processing apparatus, method and program
JP2006011618A (en) Photographic image processing method and its device
JP2006018740A (en) Image processing means, device, and method
US20090232402A1 (en) Image Processing Apparatus, Image Processing Method, and Computer Program for Image Processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070706

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100222

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

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

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

S801 Written request for registration of abandonment of right

Free format text: JAPANESE INTERMEDIATE CODE: R311801

ABAN Cancellation due to abandonment
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350