JP4837602B2 - Image trimming apparatus and method, and program - Google Patents

Image trimming apparatus and method, and program Download PDF

Info

Publication number
JP4837602B2
JP4837602B2 JP2007061358A JP2007061358A JP4837602B2 JP 4837602 B2 JP4837602 B2 JP 4837602B2 JP 2007061358 A JP2007061358 A JP 2007061358A JP 2007061358 A JP2007061358 A JP 2007061358A JP 4837602 B2 JP4837602 B2 JP 4837602B2
Authority
JP
Japan
Prior art keywords
face
image
center
trimming
eyes
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
JP2007061358A
Other languages
Japanese (ja)
Other versions
JP2008225720A (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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2007061358A priority Critical patent/JP4837602B2/en
Publication of JP2008225720A publication Critical patent/JP2008225720A/en
Application granted granted Critical
Publication of JP4837602B2 publication Critical patent/JP4837602B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、顔を含む画像に対して、顔を含むトリミング領域を設定する画像トリミング装置および方法並びに画像トリミング方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to an image trimming apparatus and method for setting a trimming region including a face for an image including a face, and a program for causing a computer to execute the image trimming method.

パスポートや免許証の交付申請、あるいは履歴書の作成等の場合において、本人の顔が写っているあらかじめ定められた出力規格の写真(以下証明写真という)の提出が要求されることが多い。このため、利用者の撮影を行うための撮影室が設けられ、撮影室内の椅子に着座した利用者を撮影し、利用者の証明写真用の顔写真画像をシートに記録した証明写真シートを作成することを自動的に行う証明写真の自動作成装置が従来より利用されている。このような自動作成装置は、大型であり、設置場所が限られているため、利用者が証明写真を取得するためには、自動作成装置が設置された場所を探して出向く必要があり、不便である。   When applying for a passport or license, or creating a resume, it is often required to submit a photo of a predetermined output standard (hereinafter referred to as an ID photo) showing the person's face. For this reason, a photo room is provided for taking pictures of the user, and the ID photo sheet is created by photographing the user sitting on the chair in the photo room and recording the face photo image for the ID photo of the user on the sheet. ID photo automatic creation devices that automatically do this have been used. Since such an automatic creation device is large and has limited installation locations, it is inconvenient for a user to search for the location where the automatic creation device is installed in order to obtain an ID photo. It is.

このため、画像から顔、目等を検出して、それに基づいてトリミング領域を設定してトリミングを行う手法が提案されている。例えば、特許文献1には、画像に含まれる顔の画像平面内での回転角度を両目の中心位置から求め、顔の回転を補正してトリミング領域を設定する手法が提案されている。また、特許文献2には、画像から顔の検出、目の検出、および瞳の検出を行い、両瞳の位置および両瞳間の距離を取得し、両瞳の位置および両瞳間の距離を用いてトリミング領域を設定する手法が提案されている。さらに特許文献3には、両目間の中心点、鼻の中心点、および口の中心点を結ぶ直線をトリミング中心線とし、トリミング中心線を中心に左右対称する領域をトリミング領域として設定する手法が提案されている。これらの手法によれば、顔の中心を基準として顔を含むトリミング領域を画像に設定することができる。
特開2003−319169号公報 特開2005−242641号公報 特開2006−139369号公報
For this reason, a method has been proposed in which a face, eyes, and the like are detected from an image, and a trimming region is set based on the detected face and eyes. For example, Patent Document 1 proposes a method of determining a rotation angle of a face included in an image in the image plane from the center position of both eyes and correcting the face rotation to set a trimming region. In Patent Document 2, face detection, eye detection, and pupil detection are performed from an image, the positions of both pupils and the distance between both pupils are acquired, and the positions of both pupils and the distance between both pupils are obtained. A method for setting a trimming region by using it has been proposed. Further, in Patent Document 3, there is a method in which a straight line connecting the center point between both eyes, the center point of the nose, and the center point of the mouth is set as a trimming center line, and an area that is symmetrical about the trimming center line is set as a trimming area. Proposed. According to these methods, a trimming region including a face can be set in an image with the center of the face as a reference.
JP 2003-319169 A JP 2005-242641 A JP 2006-139369 A

ところで、画像に含まれる顔は必ずしも正面を向いた顔ばかりではなく、上下左右を向いている場合がある。このような、上下左右を向いた顔は証明写真としてはふさわしくないものの、例えばスクールフォト等においては、若干斜めを向いている方が好ましい場合があるため、上下左右を向いた顔についても自動でトリミング領域を設定してトリミングを行いたいという要望がある。このため、上記特許文献1〜3に記載された手法を用いて画像にトリミング領域を設定することが考えられる。   By the way, the face included in the image is not necessarily a face facing front, but may be facing up, down, left and right. Although such a face facing up, down, left and right is not suitable as an ID photo, for example in school photos, it may be preferable to face slightly diagonally. There is a demand for trimming by setting a trimming area. For this reason, it is conceivable to set a trimming region in an image using the methods described in Patent Documents 1 to 3 above.

ここで、上記特許文献1〜3に記載された手法は、両目の中心位置等をトリミング領域の設定の基準としているため、正面を向いた顔については顔が中央に位置するようにトリミング領域を設定できる。しかしながら、顔が上下左右を向いていると、両目の中心位置が必ずしも顔の中心に位置するとは限らないため、上記特許文献1〜3の手法を用いた場合、トリミング領域の中心が顔の中心からずれ、その結果、顔がトリミング領域の中央に位置しないこととなってしまう。   Here, since the methods described in Patent Documents 1 to 3 use the center position of both eyes as a reference for setting the trimming region, the trimming region is set so that the face facing the front is centered. Can be set. However, since the center position of both eyes is not necessarily located at the center of the face when the face is faced up, down, left, and right, the center of the trimming region is the center of the face when the methods of Patent Documents 1 to 3 are used. As a result, the face is not positioned at the center of the trimming area.

本発明は、上記事情に鑑みなされたものであり、顔の向きに拘わらずトリミング領域を適切に設定できるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to allow a trimming region to be appropriately set regardless of the face orientation.

本発明による画像トリミング装置は、顔を含む画像に該顔を含むトリミング領域を設定する画像トリミング装置において、
前記画像に含まれる顔を検出する顔検出手段と、
前記検出された顔から該顔の特徴量を取得する特徴量取得手段と、
前記顔の検出結果および前記特徴量に基づいて、前記顔の中心位置を設定する中心位置設定手段と、
前記中心位置を中心として前記画像にトリミング領域を設定するトリミング領域設定手段とを備えたことを特徴とするものである。
An image trimming apparatus according to the present invention is an image trimming apparatus that sets a trimming region including a face to an image including a face.
Face detection means for detecting a face included in the image;
Feature quantity acquisition means for acquiring the feature quantity of the face from the detected face;
Center position setting means for setting a center position of the face based on the detection result of the face and the feature amount;
Trimming area setting means for setting a trimming area for the image with the center position as the center is provided.

なお、本発明による画像トリミング装置においては、前記特徴量に基づいて前記顔の向きを検出する向き検出手段をさらに備えるものとし、
前記中心位置設定手段を、前記顔の向きにも基づいて、前記顔の中心位置を設定する手段としてもよい。
The image trimming apparatus according to the present invention further includes orientation detection means for detecting the orientation of the face based on the feature amount.
The center position setting means may be means for setting the center position of the face based on the orientation of the face.

また、本発明による画像トリミング装置においては、前記特徴量取得手段を、前記顔に含まれる両目の中心位置、鼻の位置および該顔の左右端の位置を前記特徴量として取得する手段とし、
前記中心位置設定手段を、前記両目の中心位置、前記鼻の位置および前記顔の左右端の位置のいずれか、またはこれらの位置の重心位置を基準として、前記顔の中心位置を設定する手段としてもよい。
Further, in the image trimming apparatus according to the present invention, the feature amount acquisition means is a means for acquiring the center position of both eyes included in the face, the position of the nose and the left and right end positions of the face as the feature amount,
The center position setting means is a means for setting the center position of the face on the basis of any one of the center positions of the eyes, the position of the nose and the left and right ends of the face, or the center of gravity of these positions. Also good.

本発明による画像トリミング方法は、顔を含む画像に該顔を含むトリミング領域を設定する画像トリミング方法において、
前記画像に含まれる顔を検出し、
前記検出された顔から該顔の特徴量を取得し、
前記顔の検出結果および前記特徴量に基づいて前記顔の中心位置を設定し、
前記中心位置を中心として前記画像にトリミング領域を設定することを特徴とするものである。
An image trimming method according to the present invention is an image trimming method for setting a trimming region including a face to an image including a face.
Detecting a face contained in the image,
Obtaining a feature amount of the face from the detected face;
Based on the detection result of the face and the feature amount, the center position of the face is set,
A trimming region is set in the image around the center position.

なお、本発明による画像トリミング方法をコンピュータに実行させるためのプログラムとして提供してもよい。   The image trimming method according to the present invention may be provided as a program for causing a computer to execute the image trimming method.

本発明によれば、画像に含まれる顔が検出され、検出された顔から顔の特徴量が取得される。そして、顔の検出結果および特徴量に基づいて顔の中心位置が検出され、中心位置を中心としてトリミング領域が設定される。このため、顔の向きに拘わらず適切に顔の中心位置を検出することができ、その結果、顔が中央に位置するようにトリミング領域を設定することができる。これにより、証明写真を撮影しなくても、スナップ写真の画像から証明写真として用いる顔をトリミングすることができる。   According to the present invention, a face included in an image is detected, and a feature amount of the face is acquired from the detected face. Then, the center position of the face is detected based on the face detection result and the feature amount, and a trimming region is set around the center position. For this reason, the center position of the face can be appropriately detected regardless of the orientation of the face, and as a result, the trimming region can be set so that the face is located at the center. This makes it possible to trim the face used as the ID photo from the snap photo image without taking the ID photo.

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の実施形態による画像トリミング装置の構成を示す概略ブロック図である。図1に示すように、本実施形態による画像トリミング装置は、顔を含む画像を表す画像データS0の入力を受け付ける画像入力部1と、画像データS0により表される画像(以下、画像についても画像データと同一の参照符号を用いるものとする)S0から顔を検出する顔検出部2と、顔検出部2が検出した顔から特徴量を取得する特徴量取得部3と、顔の向きを検出する向き検出部4と、画像における顔の中心位置を設定する中心位置設定部5と、顔の中心位置を中心としてトリミング領域を設定するトリミング領域設定部6と、トリミング領域により画像S0から画像をトリミングするトリミング部7とを備える。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing the configuration of an image trimming apparatus according to an embodiment of the present invention. As shown in FIG. 1, the image trimming apparatus according to the present embodiment includes an image input unit 1 that receives input of image data S0 representing an image including a face, and an image represented by the image data S0 (hereinafter, the image is also an image). The face detection unit 2 that detects a face from S0, the feature amount acquisition unit 3 that acquires a feature amount from the face detected by the face detection unit 2, and the face orientation are detected. An orientation detection unit 4, a center position setting unit 5 for setting the center position of the face in the image, a trimming region setting unit 6 for setting a trimming region around the center position of the face, and an image from the image S0 by the trimming region. A trimming unit 7 for trimming.

画像入力部1は、メディアに記録された画像データS0をメディアから読み出すメディアドライブや、ネットワーク経由で送信された画像データS0の入力を受け付ける各種インターフェースからなる。なお、画像データS0はデジタルカメラ等の撮像装置により取得されたものであってもよく、フイルムや原稿に記録された画像を光電的に読み出すことにより取得されたものであってもよい。   The image input unit 1 includes a media drive that reads image data S0 recorded on the medium from the medium, and various interfaces that receive input of the image data S0 transmitted via the network. The image data S0 may be acquired by an imaging device such as a digital camera, or may be acquired by photoelectrically reading an image recorded on a film or a document.

顔検出部2は、テンプレートマッチングによる手法、顔の多数のサンプル画像を用いてマシンラーニング学習により得られた顔判別器を用いる手法、および特開平5−282457号公報に記載されたニューラルネットワークを用いる手法等により、各画像上における顔の位置を顔領域として検出する。なお、画像S0に顔が含まれない場合には、顔検出部2は顔が検出されなかった旨の出力を行う。   The face detection unit 2 uses a template matching method, a method using a face discriminator obtained by machine learning learning using a large number of sample images of a face, and a neural network described in Japanese Patent Laid-Open No. 5-282457. A face position on each image is detected as a face area by a technique or the like. When the face is not included in the image S0, the face detection unit 2 outputs that the face is not detected.

特徴量取得部3は、顔検出部2が検出した顔領域に含まれる顔T0を構成する主要な顔部品である顔の特徴点を特徴量として取得する。具体的には、各顔部品のテンプレートを用いたテンプレートマッチングによる手法や顔部品の多数のサンプル画像を用いたマシンラーニング学習により得られた、顔部品毎の判別器を用いる手法等により、例えば左右目頭の位置、左右目尻の位置、鼻の位置、頭頂部の位置、顎の先端の位置および顔の左右端の位置の座標を特徴量として取得する。また、左右目頭、左右目尻の位置から両目の位置を算出することにより、両目の位置の座標も特徴量として取得する。具体的には左右の目頭と目尻との中点を左右の目の位置として算出する。   The feature amount acquisition unit 3 acquires, as a feature amount, feature points of the face, which is a main face component constituting the face T0 included in the face area detected by the face detection unit 2. Specifically, for example, by using a template matching method using a template of each facial part or a method using a discriminator for each facial part obtained by machine learning learning using a large number of sample images of facial parts. The coordinates of the position of the eyes, the position of the left and right eyes, the position of the nose, the position of the top of the head, the position of the tip of the chin, and the position of the left and right edges of the face are acquired as feature amounts. Further, by calculating the positions of both eyes from the positions of the left and right eye heads and left and right eye corners, the coordinates of the positions of both eyes are also acquired as feature amounts. Specifically, the midpoint between the left and right eye heads and the corners of the eyes is calculated as the left and right eye positions.

向き検出部4は、特徴量取得部3が取得した特徴量のうち、両目の位置および鼻の位置の位置関係を、あらかじめ定められた標準的な正面を向いた顔の位置関係と比較し、画像の左右方向および上下方向の位置関係の差を算出する。そして左右方向の位置関係の差に基づいて、顔T0の左右の向きを−90度〜90度の値にて算出する。また、上下方向の位置関係の差に基づいて、顔T0の上下の向きを−90度〜90度の値にて算出する。なお、算出した左右の角度をD1、上下の角度をD2とする。   The direction detection unit 4 compares the positional relationship between the positions of both eyes and the position of the nose among the feature amounts acquired by the feature amount acquisition unit 3 with a predetermined standard positional relationship of the face facing the front, The difference in the positional relationship between the horizontal direction and the vertical direction of the image is calculated. Then, based on the difference in the positional relationship in the left-right direction, the left-right orientation of the face T0 is calculated as a value between −90 degrees and 90 degrees. Further, the vertical direction of the face T0 is calculated as a value between −90 degrees and 90 degrees based on the difference in the positional relationship in the vertical direction. The calculated left and right angles are D1 and the up and down angles are D2.

中心位置設定部5は、両目間の中心位置C1、鼻の位置C2および顔の左右端の位置の中心位置C3の重心の位置C4を、顔の中心位置設定のための基準位置として算出する。ここで、両目の位置は左右のそれぞれの目のxy座標にて検出されているため、右目の座標を(xr,yr)、左目の座標を(xl,yl)とすると両目間の中心位置C1の座標(x1,y1)は((xr+xl)/2,(yr+yl)/2)と算出される。鼻の位置C2の座標(x2,y2)は検出した鼻の位置そのものの座標である。顔の左右端の位置は、左右のそれぞれの端のxy座標にて検出されているため、右端の座標を(xer,yer)、左目の座標を(xel,yel)とすると左右端の中心C3の座標(x3,y3)は((xer+xel)/2,(yer+yel)/2)と算出される。そして、重心の位置C4の座標(x4,y4)は、((x1+x2+x3)/3,(y1+y2+y3)/3)と算出される。   The center position setting unit 5 calculates the center position C1 between the eyes, the nose position C2, and the center position C3 of the center position C3 of the left and right end positions of the face as reference positions for setting the center position of the face. Here, since the positions of both eyes are detected by the xy coordinates of the left and right eyes, if the coordinates of the right eye are (xr, yr) and the coordinates of the left eye are (xl, yl), the center position C1 between the eyes. The coordinates (x1, y1) are calculated as ((xr + xl) / 2, (yr + yl) / 2). The coordinates (x2, y2) of the nose position C2 are the coordinates of the detected nose position itself. Since the positions of the left and right edges of the face are detected by the xy coordinates of the left and right edges, if the coordinates of the right edge are (xer, yer) and the coordinates of the left eye are (xel, yel), the center C3 of the left and right edges The coordinates (x3, y3) are calculated as ((xer + xel) / 2, (yer + yel) / 2). The coordinates (x4, y4) of the center-of-gravity position C4 are calculated as ((x1 + x2 + x3) / 3, (y1 + y2 + y3) / 3).

さらに中心位置設定部5は、顔の向きに応じて重心位置C4である基準位置の座標を補正して顔の中心C5を設定する。具体的には、下記の式(1)により座標(x5,y5)を算出し、算出した座標(x5,y5)を顔の中心位置C5に設定する。なお、式(1)において顔左右半径R1は、顔の左右端の距離の1/2である。また、顔上下半径R2は頭頂部と顎部との間の距離の1/2である。   Furthermore, the center position setting unit 5 corrects the coordinates of the reference position, which is the center of gravity position C4, according to the face direction, and sets the face center C5. Specifically, coordinates (x5, y5) are calculated by the following equation (1), and the calculated coordinates (x5, y5) are set as the center position C5 of the face. In Expression (1), the face left-right radius R1 is ½ of the distance between the left and right edges of the face. Further, the face vertical radius R2 is ½ of the distance between the top of the head and the chin.

x5=x4+R1×D1/90
y5=y4+R2×D2/90 (1)
トリミング領域設定部6は、トリミング領域の中心が顔の中心位置C5と一致し、かつトリミング領域内にトリミングする顔が収まるようにトリミング領域を画像S0に設定する。
x5 = x4 + R1 × D1 / 90
y5 = y4 + R2 × D2 / 90 (1)
The trimming area setting unit 6 sets the trimming area in the image S0 so that the center of the trimming area matches the center position C5 of the face and the face to be trimmed fits in the trimming area.

トリミング部7は、画像S0からトリミング領域を切り出す。   The trimming unit 7 cuts out a trimming area from the image S0.

次いで、本実施形態において行われる処理について説明する。図2は本実施形態において行われる処理を示すフローチャートである。なお、ここでは画像S0に含まれるすべての顔をトリミングする処理について説明する。画像入力部1により画像データS0が読み出されることにより装置が処理を開始し、顔検出部2が画像S0から顔を検出する(ステップST1)。そして、画像S0に顔が含まれるか否かを判定し(ステップST2)、ステップST2が否定されると処理を終了する。   Next, processing performed in the present embodiment will be described. FIG. 2 is a flowchart showing processing performed in the present embodiment. Here, a process of trimming all the faces included in the image S0 will be described. When the image data S0 is read by the image input unit 1, the apparatus starts processing, and the face detection unit 2 detects a face from the image S0 (step ST1). Then, it is determined whether or not a face is included in the image S0 (step ST2), and if step ST2 is negative, the process is terminated.

ステップST2が肯定されると、処理対象の顔を最初の顔に設定し(ステップST3)、特徴量取得部3が処理対象の顔の特徴量を取得し(ステップST4)、さらに向き検出部4が顔の向きを検出する(ステップST5)。   When step ST2 is affirmed, the face to be processed is set as the first face (step ST3), the feature amount acquisition unit 3 acquires the feature amount of the face to be processed (step ST4), and the direction detection unit 4 further. Detects the orientation of the face (step ST5).

そして、中心位置設定部5が上述したように顔の中心位置C5を設定し(ステップST6)、トリミング領域設定部6が画像S0上にトリミング領域を設定する(ステップST7)。そして、すべての顔についてトリミング領域を設定したか否かを判定し(ステップST8)、ステップST8が否定されると、処理対象の顔を次の顔に設定し(ステップST9)、ステップST4に戻ってステップST4以降の処理を繰り返す。   The center position setting unit 5 sets the center position C5 of the face as described above (step ST6), and the trimming region setting unit 6 sets a trimming region on the image S0 (step ST7). Then, it is determined whether trimming areas have been set for all faces (step ST8). If step ST8 is negative, the face to be processed is set as the next face (step ST9), and the process returns to step ST4. Then, the processing after step ST4 is repeated.

ステップST8が肯定されると、トリミング部7がトリミング領域をトリミングし(ステップST10)、処理を終了する。   When step ST8 is affirmed, the trimming unit 7 trims the trimming area (step ST10), and the process ends.

図3は本実施形態のトリミング領域の設定を説明するための図である。上記特許文献1〜3に記載された手法のように両目の中心を基準としてトリミング領域を設定すると、図3(a)に示すように顔が正面を向いている場合には、両目の中心位置Oにトリミング領域A1の中心を位置させることにより、顔がトリミング領域A1の中央に位置するようにトリミング領域A1を設定できる。   FIG. 3 is a diagram for explaining the setting of the trimming area according to the present embodiment. When the trimming area is set with reference to the center of both eyes as in the methods described in Patent Documents 1 to 3, when the face is facing the front as shown in FIG. By positioning the center of the trimming area A1 at O, the trimming area A1 can be set so that the face is located at the center of the trimming area A1.

しかしながら、顔が斜めを向いている場合、両目の中心位置Oを基準としてトリミング領域を設定すると、図3(b)に示すように顔がトリミング領域A1の中央に位置しなくなってしまう。   However, when the face is inclined, if the trimming area is set with reference to the center position O of both eyes, the face is not positioned at the center of the trimming area A1 as shown in FIG.

本実施形態においては、顔の特徴量、とくに顔の向きに応じて顔の中心位置C5を検出するようにしたため、図3(c)に示すように顔が横を向いていても、顔の中心位置C5にトリミング領域A1の中心を位置させることにより、顔が中央に位置するようにトリミング領域A1を設定することができることとなる。   In the present embodiment, since the center position C5 of the face is detected according to the facial feature amount, particularly the face orientation, even if the face is facing sideways as shown in FIG. By positioning the center of the trimming area A1 at the center position C5, the trimming area A1 can be set so that the face is located at the center.

なお、上記実施形態においては、両目間の中心C1、鼻の位置C2および顔の左右端の位置の中心C3の重心の位置C4を基準位置として、顔の中心位置C5を設定しているが、重心の位置C4を算出することなく、両目間の中心C1、鼻の位置C2および顔の左右端の位置の中心C3のいずれかを基準位置として顔の中心位置C5を設定してもよい。   In the above embodiment, the center position C5 of the face is set with the center C1 between the eyes, the position C2 of the nose and the center C3 of the center C3 of the position of the left and right ends of the face as the reference position. The center position C5 of the face may be set using any one of the center C1 between the eyes, the position C2 of the nose and the center C3 of the position of the left and right ends of the face without calculating the position C4 of the center of gravity.

また、上記実施形態においては、左右目頭の位置、左右目尻の位置、鼻の位置、頭頂部の位置、顎の先端の位置および顔の左右端の位置の座標を特徴量として取得し、これらの特徴量を用いて顔の中心位置C5を設定しているが、取得する特徴量はこれらに限定されるものではない。例えば、特徴量として顔の左右端の位置、頭頂部の位置および顎の先端の位置を取得し、これらの位置から顔のサイズを推定し、その顔のサイズにより規定される領域の中心位置を顔の中心位置として設定するようにしてもよい。   In the above embodiment, the coordinates of the positions of the right and left eyes, the positions of the left and right eyes, the position of the nose, the position of the top of the head, the position of the tip of the chin, and the position of the left and right edges of the face are acquired as feature amounts. Although the center position C5 of the face is set using the feature amount, the feature amount to be acquired is not limited to these. For example, the position of the left and right edges of the face, the position of the top of the head, and the position of the tip of the chin are obtained as feature quantities, the face size is estimated from these positions, and the center position of the region defined by the face size is The center position of the face may be set.

また、上記実施形態において、顔検出部2が顔を検出する際に、両目の位置を検出する場合がある。このような場合には、顔検出部2が検出した両目の位置を特徴量として取得して、顔の中心位置C5の設定に用いるようにしてもよい。   Moreover, in the said embodiment, when the face detection part 2 detects a face, the position of both eyes may be detected. In such a case, the positions of both eyes detected by the face detection unit 2 may be acquired as feature amounts and used for setting the center position C5 of the face.

また、上記実施形態においては、特徴量取得部3が、左右目頭の位置、左右目尻の位置、鼻の位置、頭頂部の位置、顎の先端の位置および顔の左右端の位置の座標を特徴量として取得しているが、これらのすべての特徴量を取得できない場合がある。このような場合には、不図示の入力部からオペレータが不足してる特徴量をマニュアル操作により入力するようにしてもよい。   In the above embodiment, the feature amount acquisition unit 3 is characterized by the coordinates of the positions of the left and right eyes, the positions of the left and right eyes, the position of the nose, the position of the top of the head, the position of the tip of the jaw, and the positions of the left and right edges of the face. Although it is acquired as a quantity, there are cases where all of these feature quantities cannot be acquired. In such a case, the feature quantity that the operator lacks may be input from a not-shown input unit by manual operation.

また、両目の位置は検出できることが多いため、両目位置のみが特徴量として取得された場合には、両目の位置から統計的に、鼻の位置、頭頂部の位置、顎の位置および顔の左右端の位置を推定するようにしてもよい。また、両目の位置から顔のサイズを推定するようにしてもよい。また、頭頂部の位置のみが特徴量として取得された場合には、頭頂部の位置から統計的に顎の位置を推定してもよく、この場合、頭頂部の位置および顎の位置から顔のサイズを推定することが可能となる。   In addition, since the position of both eyes can often be detected, when only the position of both eyes is acquired as a feature amount, the position of the nose, the position of the top of the head, the position of the chin, and the left and right sides of the face are statistically calculated from the positions of both eyes. The position of the end may be estimated. Further, the face size may be estimated from the positions of both eyes. If only the position of the top of the head is acquired as the feature amount, the position of the jaw may be statistically estimated from the position of the top of the head, and in this case, the position of the face is determined from the position of the top of the head and the position of the chin. The size can be estimated.

以上、本発明の第1の実施形態に係る装置について説明したが、コンピュータを、上記の顔検出部2、特徴量取得部3、向き検出部4、中心位置設定部5およびトリミング領域設定部6に対応する手段として機能させ、図2に示すような処理を行わせるプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。   Although the apparatus according to the first embodiment of the present invention has been described above, the computer includes the face detection unit 2, the feature amount acquisition unit 3, the orientation detection unit 4, the center position setting unit 5, and the trimming region setting unit 6 described above. A program that functions as means corresponding to the above and causes the processing shown in FIG. 2 to be performed is also one embodiment of the present invention. A computer-readable recording medium in which such a program is recorded is also one embodiment of the present invention.

本発明の実施形態による画像トリミング装置の構成を示す概略ブロック図1 is a schematic block diagram showing the configuration of an image trimming apparatus according to an embodiment of the present invention. 本実施形態において行われる処理を示すフローチャートA flowchart showing processing performed in the present embodiment 本実施形態のトリミング領域の設定を説明するための図The figure for demonstrating the setting of the trimming area | region of this embodiment

符号の説明Explanation of symbols

1 画像入力部
2 顔検出部
3 特徴量取得部
4 向き検出部
5 中心位置設定部
6 トリミング領域設定部
7 トリミング部
DESCRIPTION OF SYMBOLS 1 Image input part 2 Face detection part 3 Feature-value acquisition part 4 Direction detection part 5 Center position setting part 6 Trimming area setting part 7 Trimming part

Claims (4)

顔を含む画像に該顔を含むトリミング領域を設定する画像トリミング装置において、
前記画像に含まれる顔を検出する顔検出手段と、
前記検出された顔から該顔に含まれる両目の位置、鼻の位置および該顔の左右端の位置を特徴量として取得する特徴量取得手段と、
前記特徴量に基づいて前記顔の向きを検出する向き検出手段と、
前記両目の間の中心位置、前記鼻の位置および前記顔の左右端の位置のいずれか、または前記両目の間の中心位置、前記鼻の位置および前記顔の左右端の位置の重心位置を前記顔の中心位置設定のための基準位置とし、前記顔の向きに応じて前記基準位置を補正して、前記顔の中心位置を設定する中心位置設定手段と、
前記中心位置を中心として前記画像にトリミング領域を設定するトリミング領域設定手段とを備えたことを特徴とする画像トリミング装置。
In an image trimming apparatus that sets a trimming region including a face to an image including a face,
Face detection means for detecting a face included in the image;
Feature amount acquisition means for acquiring, from the detected face, the position of both eyes included in the face, the position of the nose, and the positions of the left and right ends of the face as feature amounts;
Orientation detection means for detecting the orientation of the face based on the feature amount;
The center position between the eyes, the position of the nose and the positions of the left and right edges of the face, or the center position of the eyes, the position of the nose and the center of gravity of the positions of the left and right edges of the face Center position setting means for setting the center position of the face by correcting the reference position according to the orientation of the face as a reference position for setting the center position of the face;
An image trimming apparatus comprising trimming area setting means for setting a trimming area for the image with the center position as a center.
前記向き検出手段は、前記両目の位置および前記鼻の位置の位置関係を、所定の標準的な正面を向いた顔の位置関係と比較し、該比較結果に基づいて前記顔の向きを検出する手段であることを特徴とする請求項1記載の画像トリミング装置。  The orientation detection means compares the positional relationship between the positions of the eyes and the nose with a positional relationship of a predetermined standard frontal face, and detects the orientation of the face based on the comparison result. The image trimming apparatus according to claim 1, wherein the image trimming apparatus is a means. 顔を含む画像に該顔を含むトリミング領域を設定する画像トリミング方法において、
前記画像に含まれる顔を検出し、
前記検出された顔から該顔に含まれる両目の位置、鼻の位置および該顔の左右端の位置を特徴量として取得し、
前記特徴量に基づいて前記顔の向きを検出し、
前記両目の間の中心位置、前記鼻の位置および前記顔の左右端の位置のいずれか、または前記両目の間の中心位置、前記鼻の位置および前記顔の左右端の位置の重心位置を前記顔の中心位置設定のための基準位置とし、前記顔の向きに応じて前記基準位置を補正して、前記顔の中心位置を設定し、
前記中心位置を中心として前記画像にトリミング領域を設定することを特徴とする画像トリミング方法。
In an image trimming method for setting a trimming region including a face in an image including a face,
Detecting a face contained in the image,
From the detected face, the position of both eyes included in the face, the position of the nose and the positions of the left and right ends of the face are acquired as feature amounts ,
Detecting the orientation of the face based on the feature amount;
The center position between the eyes, the position of the nose and the positions of the left and right edges of the face, or the center position of the eyes, the position of the nose and the center of gravity of the positions of the left and right edges of the face A reference position for setting the center position of the face, correcting the reference position according to the orientation of the face, and setting the center position of the face,
An image trimming method, wherein a trimming region is set in the image with the center position as a center.
顔を含む画像に該顔を含むトリミング領域を設定する画像トリミング方法をコンピュータに実行させるためのプログラムにおいて、
前記画像に含まれる顔を検出する手順と、
前記検出された顔から該顔に含まれる両目の位置、鼻の位置および該顔の左右端の位置を特徴量として取得する手順と、
前記特徴量に基づいて前記顔の向きを検出する手順と、
前記両目の間の中心位置、前記鼻の位置および前記顔の左右端の位置のいずれか、または前記両目の間の中心位置、前記鼻の位置および前記顔の左右端の位置の重心位置を前記顔の中心位置設定のための基準位置とし、前記顔の向きに応じて前記基準位置を補正して、前記顔の中心位置を設定する手順と、
前記中心位置を中心として前記画像にトリミング領域を設定する手順とを有することを特徴とするプログラム。
In a program for causing a computer to execute an image trimming method for setting a trimming region including a face to an image including a face,
Detecting a face included in the image;
A procedure for acquiring, from the detected face, the position of both eyes included in the face, the position of the nose and the positions of the left and right ends of the face as feature amounts ;
Detecting the orientation of the face based on the feature amount;
The center position between the eyes, the position of the nose and the positions of the left and right edges of the face, or the center position of the eyes, the position of the nose and the center of gravity of the positions of the left and right edges of the face A reference position for setting the center position of the face, correcting the reference position according to the orientation of the face, and setting the center position of the face;
And a procedure for setting a trimming area in the image with the center position as a center.
JP2007061358A 2007-03-12 2007-03-12 Image trimming apparatus and method, and program Active JP4837602B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007061358A JP4837602B2 (en) 2007-03-12 2007-03-12 Image trimming apparatus and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007061358A JP4837602B2 (en) 2007-03-12 2007-03-12 Image trimming apparatus and method, and program

Publications (2)

Publication Number Publication Date
JP2008225720A JP2008225720A (en) 2008-09-25
JP4837602B2 true JP4837602B2 (en) 2011-12-14

Family

ID=39844285

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007061358A Active JP4837602B2 (en) 2007-03-12 2007-03-12 Image trimming apparatus and method, and program

Country Status (1)

Country Link
JP (1) JP4837602B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5708151B2 (en) * 2011-03-31 2015-04-30 大日本印刷株式会社 Face image shooting system for creating certification cards
JP6222900B2 (en) 2012-07-09 2017-11-01 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP6188452B2 (en) * 2013-06-28 2017-08-30 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP6902886B2 (en) 2017-03-14 2021-07-14 キヤノン株式会社 Image processing equipment, methods and programs
CN110706150A (en) * 2019-07-12 2020-01-17 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111104846B (en) * 2019-10-16 2022-08-30 平安科技(深圳)有限公司 Data detection method and device, computer equipment and storage medium
CN113111680B (en) * 2020-01-09 2023-12-12 北京君正集成电路股份有限公司 Method for correcting face cutting frame based on face feature points

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10274516A (en) * 1997-03-31 1998-10-13 Victor Co Of Japan Ltd Face direction detecting device
JP4091184B2 (en) * 1998-11-19 2008-05-28 株式会社東芝 Camera and image generation method
JP4513369B2 (en) * 2004-03-19 2010-07-28 セイコーエプソン株式会社 Image trimming apparatus and method
JP4321350B2 (en) * 2004-05-14 2009-08-26 パナソニック株式会社 Parameter estimation method, parameter estimation device, and verification method
JP2006338329A (en) * 2005-06-02 2006-12-14 Seiko Epson Corp Face orientation detection method, device and program and recording medium with the program recorded thereon

Also Published As

Publication number Publication date
JP2008225720A (en) 2008-09-25

Similar Documents

Publication Publication Date Title
JP4837602B2 (en) Image trimming apparatus and method, and program
JP4529837B2 (en) Imaging apparatus, image correction method, and program
JP5276111B2 (en) Method and system for supporting so that composition of face can be determined during self-photographing
US8031970B2 (en) Method of restoring closed-eye portrait photo
US11210796B2 (en) Imaging method and imaging control apparatus
JP2019057111A (en) Contour detection device, drawing device, contour detection method, and contour detection program
JP2009100301A (en) Composition determination apparatus, composition determination method, and program
JP2006319610A (en) Camera
JP4647289B2 (en) Image processing method, apparatus, and program
US10924660B2 (en) Augmented reality markers in digital photography
JP2006268248A (en) Photographing device, and face direction determining method
JP2019053626A (en) Contour detection apparatus, drawing apparatus, contour detection method, and contour detection program
JP4874914B2 (en) Jaw position calculation apparatus, image processing apparatus using the same, jaw position calculation method, and program
JP4957607B2 (en) Detection of facial regions in images
WO2007108101A1 (en) Information terminal device
JP4091184B2 (en) Camera and image generation method
JP2006238362A (en) Apparatus and method for determining image top and bottom, and program
JP4709812B2 (en) Image generation method and image processing apparatus
JP2009003644A (en) Eye opening degree decision device
KR102623605B1 (en) Electornic device for acquiring biometric information of and operating method thereof
JP2005148245A (en) Photographing system
JP2006004265A (en) Program, and information processor
JP4461001B2 (en) Information terminal
JP2005283801A (en) Printer, printing method and its program
JP2008234377A (en) Image sorting device and method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090911

RD15 Notification of revocation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7435

Effective date: 20110415

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110506

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110608

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

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

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

Free format text: PAYMENT UNTIL: 20141007

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4837602

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250