JP2009140423A - Face centerline detecting device - Google Patents

Face centerline detecting device Download PDF

Info

Publication number
JP2009140423A
JP2009140423A JP2007318681A JP2007318681A JP2009140423A JP 2009140423 A JP2009140423 A JP 2009140423A JP 2007318681 A JP2007318681 A JP 2007318681A JP 2007318681 A JP2007318681 A JP 2007318681A JP 2009140423 A JP2009140423 A JP 2009140423A
Authority
JP
Japan
Prior art keywords
center line
density gradient
image
face
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.)
Granted
Application number
JP2007318681A
Other languages
Japanese (ja)
Other versions
JP4872895B2 (en
Inventor
Junpei Endo
淳平 遠藤
Kenichi Hagio
健一 萩尾
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Panasonic Electric 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 Panasonic Electric Works Co Ltd filed Critical Panasonic Electric Works Co Ltd
Priority to JP2007318681A priority Critical patent/JP4872895B2/en
Publication of JP2009140423A publication Critical patent/JP2009140423A/en
Application granted granted Critical
Publication of JP4872895B2 publication Critical patent/JP4872895B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a face centerline detecting device capable of detecting a more accurate centerline. <P>SOLUTION: The face centerline detecting device 1 includes a face image extraction part 11 which receives input of a gray level image and extracts a face image containing a face from the gray level image; a concentration gradient image generation part 12 which substitutes the pixel value of each pixel of the face image extracted by the extraction part 11 by a numerical value according to the direction of concentration gradient (density gradient direction) in the position of the pixel to generate a concentration gradient image; and a centerline detection part 13 which detects the centerline of the face image using the concentration gradient image generated by the generation part 12. By using the concentration gradient direction larger in information quantity than edge, a further accurate centerline can be obtained, compared with the case using the edge. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、撮像された画像における顔の中心線を検出する顔中心線検出装置に関するものである。   The present invention relates to a face centerline detection device that detects a face centerline in a captured image.

従来から、撮像された画像における顔の領域である顔画像の左右方向での中心となる中心線を検出する顔中心線検出装置が提供されている。この種の顔中心線検出装置は、例えば、撮像された画像から抽出された認証対象者の顔画像と予め登録された登録者の顔を示す基準顔画像とを比較して認証対象者が登録者であるか否かを判定する顔認証装置において、比較に先立って認証対象者の顔画像の位置と基準顔画像の位置とを合わせる際に用いられている。   2. Description of the Related Art Conventionally, a face centerline detection device that detects a centerline that is the center in the left-right direction of a face image that is a face area in a captured image has been provided. In this type of face centerline detection device, for example, the authentication target person registers the face image of the authentication target person extracted from the captured image and the reference face image indicating the face of the registrant registered in advance. In a face authentication device that determines whether or not a person is a person, it is used to match the position of the face image of the person to be authenticated with the position of the reference face image prior to comparison.

従来は、顔画像のエッジを検出し、このエッジの対称性を検出することによって顔画像の中心線を検出していた(例えば、特許文献1参照)。
特開2004−110543号公報
Conventionally, the edge of a face image is detected, and the center line of the face image is detected by detecting the symmetry of the edge (see, for example, Patent Document 1).
JP 2004-110543 A

しかし、例えば光源と顔との間に木の枝のような他の物体が存在していた場合にその物体の影によるエッジが生じることがあり、上記のようにエッジの対称性を検出することによる中心線の検出では、上記の影のように照明条件に起因して生じたエッジによる誤差が生じやすい。   However, when another object such as a tree branch exists between the light source and the face, an edge due to the shadow of the object may be generated, and the symmetry of the edge is detected as described above. In the detection of the center line by, an error due to an edge caused by the illumination condition is likely to occur like the above-mentioned shadow.

本発明は、上記事由に鑑みて為されたものであり、その目的は、より正確な中心線を検出することができる顔中心線検出装置を提供することにある。   The present invention has been made in view of the above-described reasons, and an object thereof is to provide a face centerline detection device capable of detecting a more accurate centerline.

請求項1の発明は、濃淡画像を入力され該濃淡画像から顔を含む顔画像を抽出する顔画像抽出部と、顔画像抽出部によって抽出された顔画像の各画素の画素値を該画素の位置での濃度勾配の向きに応じた数値に置き換えた濃度勾配画像を生成する濃度勾配画像生成部と、濃度勾配画像生成部が生成した濃度勾配画像を用いて顔画像の中心線を検出する中心線検出部とを備えることを特徴とする。   According to the first aspect of the present invention, a face image extraction unit that receives a grayscale image and extracts a face image including a face from the grayscale image, and a pixel value of each pixel of the face image extracted by the face image extraction unit A density gradient image generation unit that generates a density gradient image replaced with a numerical value corresponding to the direction of the density gradient at the position, and a center that detects the center line of the face image using the density gradient image generated by the density gradient image generation unit And a line detection unit.

この発明によれば、例えば顔に影が生じていたとしてもその影の中で発生する濃度勾配の向き(濃度勾配方向)を用いることができるといったように、従来例において用いられていたエッジよりも情報量の多い濃度勾配方向を用いていることにより、エッジを用いる場合に比べてより正確な中心線を得ることができる。   According to this invention, for example, even if a shadow is generated on the face, the direction of the density gradient (density gradient direction) generated in the shadow can be used. In addition, since the density gradient direction with a large amount of information is used, a more accurate center line can be obtained as compared with the case where edges are used.

請求項2の発明は、請求項1の発明において、顔画像抽出部は、抽出された顔画像に対して拡大又は縮小の変換を施すことにより、濃度勾配画像生成部へ出力する顔画像のサイズを常に一定とすることを特徴とする。   According to a second aspect of the present invention, in the first aspect of the present invention, the face image extraction unit performs a conversion of enlargement or reduction on the extracted face image, whereby the size of the face image output to the density gradient image generation unit Is always constant.

この発明によれば、濃淡画像における顔の大きさの違いに対応可能となる。   According to the present invention, it is possible to cope with a difference in face size in a grayscale image.

請求項3の発明は、請求項1の発明において、中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像について複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、中心線検出部は、濃度勾配画像の画素数が多いほど、演算領域を広くすることを特徴とする。   According to a third aspect of the present invention, in the first aspect of the invention, the center line detection unit assumes a plurality of temporary center lines for the density gradient image generated by the density gradient image generation unit, and the density gradient for each temporary center line. Calculating the symmetry within a predetermined calculation area centered on the temporary center line in the image, and detecting the temporary center line having the highest symmetry among the temporary center lines as the center line of the face image; The center line detection unit is characterized in that the larger the number of pixels of the density gradient image, the wider the calculation area.

この発明によれば、濃淡画像における顔の大きさの違いに対応可能となる。   According to the present invention, it is possible to cope with a difference in face size in a grayscale image.

請求項4の発明は、請求項1〜3のいずれかの発明において、中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像について複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、中心線検出部が仮定する各仮中心線はそれぞれ1画素以上の幅を有し、中心線検出部は仮中心線上の画素の画素値を対称性の演算には用いないことを特徴とする。   According to a fourth aspect of the present invention, in the invention according to any one of the first to third aspects, the center line detection unit assumes a plurality of temporary center lines for the density gradient image generated by the density gradient image generation unit, and each temporary center. Calculate the symmetry within a predetermined calculation area centered on the temporary center line in the density gradient image for each line, and detect the temporary center line with the highest symmetry among the temporary center lines as the center line of the face image Each temporary center line assumed by the center line detection unit has a width of 1 pixel or more, and the center line detection unit does not use the pixel value of the pixel on the temporary center line for the calculation of symmetry. It is characterized by.

この発明によれば、局所的に非対称となりやすい部位である顔の左右方向での中央部である可能性が高い画素が仮中心線上の画素とされ、その画素値が対称性の演算に用いられていないことにより、濃度勾配画像の全ての画素の画素値が対称性の演算に用いられる場合に比べ、より正確な中心線の検出が可能となる。   According to the present invention, a pixel that is highly likely to be a central part in the left-right direction of a face, which is a region that tends to be locally asymmetric, is set as a pixel on the temporary center line, and the pixel value is used for the calculation of symmetry. As a result, the center line can be detected more accurately than in the case where the pixel values of all the pixels in the density gradient image are used for the symmetry calculation.

請求項5の発明は、請求項1〜4の発明において、顔画像抽出部によって抽出された顔画像に対しそれぞれ異なる角度だけ回転させた複数枚の回転顔画像を生成する顔画像回転部を備え、濃度勾配画像生成部は、顔画像回転部が出力した各回転顔画像についてもそれぞれ顔画像回転部によって回転されていない顔画像と同様の濃度勾配画像の生成を行い、中心線検出部は、濃度勾配画像生成部が生成した各濃度勾配画像について、それぞれ上下方向に平行な複数本の仮中心線を仮定するとともに、各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し仮中心線のうち対称性が最も高くなった仮中心線を中心線として検出するという中心線検出動作を行うものであって、中心線検出部は、回転顔画像から生成された各濃度勾配画像から得られた中心線についてはそれぞれ顔画像回転部における回転に対して逆方向に同じ角度だけ回転させた上で、各濃度勾配画像から得られた中心線のうち対称性が最も高くなった中心線を顔画像の中心線として検出することを特徴とする。   According to a fifth aspect of the present invention, in the first to fourth aspects of the invention, there is provided a face image rotation unit that generates a plurality of rotated face images that are rotated by different angles with respect to the face image extracted by the face image extraction unit. The density gradient image generation unit generates a density gradient image similar to the face image not rotated by the face image rotation unit for each rotated face image output by the face image rotation unit, and the center line detection unit For each density gradient image generated by the density gradient image generation unit, a plurality of temporary center lines parallel to the vertical direction are assumed, and each temporary center line has a predetermined center around the temporary center line in the density gradient image. A center line detection operation is performed in which the symmetry in the calculation area is calculated and the temporary center line having the highest symmetry among the temporary center lines is detected as a center line. The center line obtained from each density gradient image generated from the face image is rotated by the same angle in the opposite direction to the rotation in the face image rotation unit, and the center obtained from each density gradient image. A center line having the highest symmetry among the lines is detected as the center line of the face image.

この発明によれば、顔が画像に対して傾いていた場合には、その傾きに最も近い角度だけ回転された回転顔画像から得られた中心線が検出されることになるから、顔画像回転部を用いない場合に比べ、さらに正確な中心線の検出が可能となる。   According to the present invention, when the face is tilted with respect to the image, the center line obtained from the rotated face image rotated by the angle closest to the tilt is detected. Compared with the case where no part is used, the center line can be detected more accurately.

請求項6の発明は、請求項1〜5のいずれかに記載の発明において、中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像についてそれぞれ上下方向に平行な複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、中心線検出部は、対称性を演算する際、仮中心線を挟んで互いに反対側に位置する画素同士で画素値を比較し、一方の画素値が示す濃度勾配の向きに対して他方の画素値が示す濃度勾配の向きが仮中心線に関して対称となった場合に対称値を増加させるという動作を、濃度勾配画像において仮中心線を中心とする所定の演算領域のうち仮中心線の両側の全ての画素について行い、最終的に得られた対称値が高いほど対称性が高いとするものであって、演算領域は上下方向について2個の分割演算領域に分割され、下側とされる一方の分割演算領域では、上側とされる他方の分割演算領域よりも、対称値の増加時の増加幅が大きいことを特徴とする。   The invention according to claim 6 is the invention according to any one of claims 1 to 5, wherein the center line detection unit is a plurality of temporary centers parallel to each other in the vertical direction with respect to the density gradient image generated by the density gradient image generation unit. Assuming a line and calculating the symmetry within a predetermined calculation area around the temporary center line in the density gradient image for each temporary center line, the temporary center line having the highest symmetry among the temporary center lines is calculated. The center line detection unit detects the center line of the face image, and the center line detection unit compares the pixel values of pixels located on opposite sides of the temporary center line when calculating the symmetry, The operation of increasing the symmetric value when the direction of the density gradient indicated by the other pixel value is symmetric with respect to the temporary center line with respect to the direction of the density gradient indicated by the value, Predetermined calculation area Of all the pixels on both sides of the temporary center line, the higher the symmetry value finally obtained, the higher the symmetry, and the calculation area is divided into two divided calculation areas in the vertical direction. One of the divided calculation areas on the lower side has a larger increase width when the symmetry value increases than the other divided calculation area on the upper side.

この発明によれば、片目用眼鏡や髪型といった要因により左右非対称になりやすい顔の上側部分よりも、左右対称になりやすい顔の下側部分を重視することになるから、対称値への加算値を濃度勾配画像の全体で共通とする場合に比べ、より正確な中心線の検出が可能となる。   According to the present invention, since the lower part of the face that tends to be bilaterally symmetrical is more important than the upper part of the face that tends to be bilaterally asymmetric due to factors such as one-eye glasses and hairstyle, the value added to the symmetrical value As compared with the case where the density gradient image is common to all the density gradient images, the center line can be detected more accurately.

請求項7の発明は、請求項1〜6のいずれかの発明において、濃度勾配画像における各画素の画素値は、濃度勾配の向きのみに依存し、濃度勾配画像における各画素の画素値が取りうる値は、上下左右に一対一に対応した計4通りであることを特徴とする。   According to a seventh aspect of the present invention, in any one of the first to sixth aspects, the pixel value of each pixel in the density gradient image depends only on the direction of the density gradient, and the pixel value of each pixel in the density gradient image takes a value. There are a total of four possible values that correspond one to one vertically and horizontally.

この発明によれば、濃度勾配画像での画素値がとり得る値を5通り以上とする場合に比べ、濃度勾配画像のデータ量が低減され、中心線検出部にかかる負荷が軽減される。   According to the present invention, the data amount of the density gradient image is reduced and the load applied to the center line detection unit is reduced as compared with the case where the pixel value in the density gradient image can take five or more values.

請求項8の発明は、請求項7の発明において、中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像についてそれぞれ上下方向に平行な複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであり、対称性を演算する際、仮中心線を挟んで互いに反対側に位置する画素同士で画素値を比較し、画素値が上下方向の濃度勾配に対応した数値同士で互いに一致した第1の場合と、画素値がそれぞれ左右方向の濃度勾配で且つ互いに逆向きの濃度勾配に対応した数値であった第2の場合とに、それぞれ場合に応じた値を対称値に加算するという動作を、濃度勾配画像において仮中心線を中心とする所定の演算領域のうち仮中心線の両側の全ての画素について行い、最終的に得られた対称値が高いほど対称性が高いとするものであって、対称性の演算の際、前記第2の場合よりも、前記第1の場合の方が、対称値に加算される値が大きいことを特徴とする。   The invention according to claim 8 is the invention according to claim 7, wherein the center line detection unit assumes a plurality of temporary center lines parallel to each other in the vertical direction for the density gradient image generated by the density gradient image generation unit. Calculates the symmetry within the predetermined calculation area around the temporary center line in the density gradient image with respect to the center line, and detects the temporary center line with the highest symmetry among the temporary center lines as the center line of the face image When calculating symmetry, the pixel values are compared between pixels located on opposite sides of the temporary center line, and the pixel values coincide with each other in numerical values corresponding to the density gradient in the vertical direction. In the first case and in the second case where the pixel values are values corresponding to density gradients in the left-right direction and opposite to each other, a value corresponding to each case is added to the symmetric value. Operation, concentration It is performed for all pixels on both sides of the temporary center line in a predetermined calculation area centered on the temporary center line in the layout image, and the higher the symmetry value finally obtained, the higher the symmetry, In the calculation of symmetry, the value added to the symmetry value is larger in the first case than in the second case.

この発明によれば、第1の場合と第2の場合とで対称値に加算される数値を共通とする場合に比べ、y方向すなわち上下方向の濃度勾配を生じさせる眉や目や口といった要素の対称性をより強く対称値に反映させ、より適切な中心線の選択に結びつけることができる。   According to the present invention, elements such as eyebrows, eyes, and mouth that cause a concentration gradient in the y direction, that is, the vertical direction, are compared with the case where the numerical value added to the symmetric value is shared between the first case and the second case. Can be reflected in the symmetry value more strongly and can be linked to the selection of a more appropriate center line.

請求項9の発明は、請求項7又は請求項8の発明において、中心線検出部は、濃度勾配画像生成部から濃度勾配画像が入力された後、中心線を検出する前に、濃度勾配画像の画素値がとり得る各数値について、それぞれ、数値毎に予め設定された最低画素数と、該濃度勾配画像において画素値が該数値となっている画素数とを比較し、いずれかの数値について前記画素数が最低画素数未満であった場合、該濃度勾配画像を用いた中心線の検出を行わないことを特徴とする。   The invention according to claim 9 is the invention according to claim 7 or claim 8, wherein the center line detecting unit receives the density gradient image from the density gradient image generating unit and then detects the density gradient image before detecting the center line. For each numerical value that can be taken by each pixel value, the minimum number of pixels set in advance for each numerical value is compared with the number of pixels whose pixel value is the numerical value in the density gradient image. When the number of pixels is less than the minimum number of pixels, the center line is not detected using the density gradient image.

この発明によれば、例えば濃度勾配画像において上下方向の濃度勾配を示す画素値をとっている画素が異常に少ない場合のように、顔画像抽出部が明らかに顔を含まない範囲を顔画像として誤って抽出していた場合に、その誤った顔画像について無駄に中心線の検出が行われることを避けることができる。   According to the present invention, for example, the face image extraction unit clearly uses a range that does not include a face as a face image, such as when the number of pixels that have a pixel value indicating a vertical density gradient in the density gradient image is abnormally small. In the case of erroneous extraction, it is possible to avoid unnecessary detection of the center line for the erroneous face image.

請求項10の発明は、請求項1又は請求項2の発明において、中心線検出部は、濃度勾配画像においてそれぞれ左右方向について複数画素分の幅を有し上下方向について1画素分の幅を有する複数個の線状領域についてそれぞれ左右方向での対称性を最も高くする中心点を検出し、複数個の線状領域から検出された中心点の群に対して最小二乗法を適用して得られた直線を中心線として検出することを特徴とする。   According to a tenth aspect of the present invention, in the first or second aspect of the present invention, the center line detection unit has a width corresponding to a plurality of pixels in the horizontal direction and a width corresponding to one pixel in the vertical direction in the density gradient image. It is obtained by detecting the center point that maximizes the symmetry in the left-right direction for each of the plurality of linear regions, and applying the least square method to the group of center points detected from the plurality of linear regions. It is characterized by detecting a straight line as a center line.

この発明によれば、顔が画像に対して傾いていた場合にも比較的に正確な中心線の検出が可能となる。   According to the present invention, it is possible to detect the center line relatively accurately even when the face is inclined with respect to the image.

請求項1の発明によれば、例えば顔に影が生じていたとしてもその影の中で発生する濃度勾配の向き(濃度勾配方向)を用いることができるといったように、従来例において用いられていたエッジよりも情報量の多い濃度勾配方向を用いていることにより、エッジを用いる場合に比べてより正確な中心線を得ることができる。   According to the first aspect of the present invention, for example, even if a shadow is generated on the face, the direction of the density gradient (density gradient direction) generated in the shadow can be used. By using the density gradient direction having a larger amount of information than the edge, a more accurate center line can be obtained as compared with the case where the edge is used.

請求項2の発明の発明によれば、顔画像抽出部は、抽出された顔画像に対して拡大又は縮小の変換を施すことにより、濃度勾配画像生成部へ出力する顔画像のサイズを常に一定とし、請求項3の発明によれば、中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像について複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、中心線検出部は、濃度勾配画像の画素数が多いほど、演算領域を広くするので、それぞれ、濃淡画像における顔の大きさの違いに対応可能となる。   According to the invention of claim 2, the face image extraction unit constantly enlarges or reduces the size of the extracted face image so that the size of the face image output to the density gradient image generation unit is always constant. According to the invention of claim 3, the center line detecting unit assumes a plurality of temporary center lines for the density gradient image generated by the density gradient image generating unit, and each of the temporary center lines includes a temporary line in the density gradient image. Calculating symmetry within a predetermined calculation area centered on the center line, and detecting the temporary center line with the highest symmetry among the temporary center lines as the center line of the face image. As the number of pixels of the density gradient image is larger, the unit widens the calculation area, so that each can cope with a difference in face size in the grayscale image.

請求項4の発明によれば、中心線検出部が仮定する各仮中心線はそれぞれ1画素以上の幅を有し、中心線検出部は仮中心線上の画素の画素値を対称性の演算には用いないので、局所的に非対称となりやすい部位である顔の左右方向での中央部である可能性が高い画素が仮中心線上の画素とされ、その画素値が対称性の演算に用いられていないことにより、濃度勾配画像の全ての画素の画素値が対称性の演算に用いられる場合に比べ、より正確な中心線の検出が可能となる。   According to the invention of claim 4, each temporary center line assumed by the center line detection unit has a width of one pixel or more, and the center line detection unit calculates the pixel value of the pixel on the temporary center line for symmetry calculation. Is not used, the pixel that is likely to be the central part in the left-right direction of the face, which is a region that tends to be locally asymmetric, is regarded as the pixel on the temporary center line, and the pixel value is used for the calculation of symmetry. The absence of this makes it possible to detect the center line more accurately than when the pixel values of all the pixels of the density gradient image are used for symmetry calculation.

請求項5の発明によれば、中心線検出部は、顔画像回転部が出力した回転顔画像から生成された濃度勾配画像を含め、各濃度勾配画像から得られた中心線のうち対称性が最も高くなった中心線を顔画像の中心線として検出するので、顔が画像に対して傾いていた場合には、その傾きに最も近い角度だけ回転された回転顔画像から得られた中心線が検出されることになるから、顔画像回転部を用いない場合に比べ、さらに正確な中心線の検出が可能となる。   According to the invention of claim 5, the centerline detection unit includes a density gradient image generated from the rotated face image output from the face image rotation unit, and the symmetry of the centerlines obtained from the respective density gradient images. Since the highest center line is detected as the center line of the face image, if the face is tilted with respect to the image, the center line obtained from the rotated face image rotated by the angle closest to the tilt is Therefore, the center line can be detected more accurately than when the face image rotation unit is not used.

請求項6の発明によれば、演算領域は上下方向について2個の分割演算領域に分割され、下側とされる一方の分割演算領域では、上側とされる他方の分割演算領域よりも、対称値の増加時の増加幅が大きいので、片目用眼鏡や髪型といった要因により左右非対称になりやすい顔の上側部分よりも、左右対称になりやすい顔の下側部分を重視することになるから、対称値への加算値を濃度勾配画像の全体で共通とする場合に比べ、より正確な中心線の検出が可能となる。   According to the invention of claim 6, the calculation area is divided into two divided calculation areas in the vertical direction, and one divided calculation area on the lower side is more symmetric than the other divided calculation area on the upper side. Since the increase range when the value increases is large, the lower part of the face that tends to be symmetric is emphasized rather than the upper part of the face that tends to be asymmetrical due to factors such as eyeglasses for one eye and hairstyle. Compared to the case where the value added to the value is common to the entire density gradient image, the center line can be detected more accurately.

請求項7の発明によれば、濃度勾配画像における各画素の画素値は、濃度勾配の向きのみに依存し、濃度勾配画像における各画素の画素値が取りうる値は、上下左右に一対一に対応した計4通りであるので、濃度勾配画像での画素値がとり得る値を5通り以上とする場合に比べ、濃度勾配画像のデータ量が低減され、中心線検出部にかかる負荷が軽減される。   According to the seventh aspect of the present invention, the pixel value of each pixel in the density gradient image depends only on the direction of the density gradient, and the values that can be taken by the pixel value of each pixel in the density gradient image are one-to-one on the top, bottom, left, and right. Since there are 4 types in total, the data amount of the density gradient image is reduced and the load on the center line detection unit is reduced as compared with the case where the value that the pixel value in the density gradient image can take is 5 or more. The

請求項8の発明によれば、画素値が上下方向の濃度勾配に対応した数値同士で互いに一致した第1の場合には、画素値がそれぞれ左右方向の濃度勾配で且つ互いに逆向きの濃度勾配に対応した数値であった第2の場合よりも、対称値に加算される値が大きいので、第1の場合と第2の場合とで対称値に加算される数値を共通とする場合に比べ、上下方向の濃度勾配を生じさせる眉や目や口といった要素の対称性をより強く対称値に反映させ、より適切な中心線の選択に結びつけることができる。   According to the eighth aspect of the invention, in the first case where the pixel values coincide with each other in the numerical values corresponding to the density gradient in the vertical direction, the pixel values are the density gradients in the horizontal direction and the density gradients opposite to each other. Since the value added to the symmetric value is larger than the second case, which is a numerical value corresponding to, the numerical value added to the symmetric value in the first case and the second case is compared with the case where the numerical value added to the symmetric value is common. The symmetry of the elements such as the eyebrows, eyes, and mouth that cause the density gradient in the vertical direction can be more strongly reflected in the symmetry value, and can be linked to the selection of a more appropriate center line.

請求項9の発明によれば、中心線検出部は、濃度勾配画像生成部から濃度勾配画像が入力された後、中心線を検出する前に、濃度勾配画像の画素値がとり得る各数値について、それぞれ、数値毎に予め定められた最低画素数と、該濃度勾配画像において画素値が該数値となっている画素数とを比較し、いずれかの数値について前記画素数が最低画素数未満であった場合、該濃度勾配画像を用いた中心線の検出を行わないので、例えば濃度勾配画像において上下方向の濃度勾配を示す画素値をとっている画素が異常に少ない場合のように、顔画像抽出部が明らかに顔を含まない範囲を顔画像として誤って抽出していた場合に、その誤った顔画像について無駄に中心線の検出が行われることを避けることができる。   According to the ninth aspect of the present invention, the center line detection unit determines each numerical value that the pixel value of the density gradient image can take after detecting the center line after the density gradient image is input from the density gradient image generation unit. Each of the numerical values is compared with the minimum number of pixels predetermined for each numerical value and the number of pixels whose pixel value is the numerical value in the density gradient image, and for any numerical value, the number of pixels is less than the minimum number of pixels. If there is, the center line is not detected using the density gradient image. For example, as in the case where the pixel value indicating the density gradient in the vertical direction in the density gradient image is abnormally small, the face image When the extraction unit has mistakenly extracted a range that does not include a face as a face image, it is possible to avoid unnecessary detection of the center line for the erroneous face image.

請求項10の発明によれば、中心線検出部は、濃度勾配画像においてそれぞれ左右方向について複数画素分の幅を有し上下方向について1画素分の幅を有する複数個の線状領域についてそれぞれ左右方向での対称性を最も高くする中心点を検出し、複数個の線状領域から検出された中心点の群に対して最小二乗法を適用して得られた直線を中心線として検出することを特徴とする。   According to the tenth aspect of the present invention, the center line detection unit is configured so that each of the plurality of linear regions having a width corresponding to a plurality of pixels in the left-right direction and a width corresponding to one pixel in the vertical direction in the density gradient image. Detect the center point with the highest symmetry in the direction, and detect the straight line obtained by applying the least square method to the group of center points detected from multiple linear regions as the center line It is characterized by.

この発明によれば、顔が画像に対して傾いていた場合にも比較的に正確な中心線の検出が可能となる。   According to the present invention, it is possible to detect the center line relatively accurately even when the face is inclined with respect to the image.

以下、本発明を実施するための最良の形態について、図面を参照しながら説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

(実施形態1)
図1に示すように、本実施形態の顔中心線検出装置1は、撮像装置2から濃淡画像を入力され、入力された濃淡画像中の顔の中心線を検出して後段の顔認証装置(図示せず)に出力するものであって、撮像装置2から入力された濃淡画像から顔画像を抽出する顔画像抽出部11と、顔画像抽出部11によって抽出された顔画像の各画素の画素値を該画素の位置での濃度勾配の向きに応じた数値に置き換えた濃度勾配画像を生成する濃度勾配画像生成部12と、濃度勾配画像生成部12が生成した濃度勾配画像を用いて顔画像の中心線を検出する中心線検出部13とを備える。撮像装置2は、例えばCCDやCMOSを用いた撮像素子を有する周知のいわゆるデジタルカメラである。さらに、撮像装置2から入力された濃淡画像が格納される画像記憶部14を備え、顔画像抽出部11は、撮像装置2から直接入力された濃淡画像だけでなく、画像記憶部14に格納された濃淡画像から顔画像を抽出することも可能となっている。顔画像抽出部11への濃淡画像の入力元の切換は、例えば、画像記憶部14に未処理の濃淡画像が存在した場合には画像記憶部14を入力元とし、画像処理部14に未処理の濃淡画像が存在しなければ撮像装置2を入力元とするといったように、顔画像抽出部11が自動的に切り換える。
(Embodiment 1)
As shown in FIG. 1, a face centerline detection device 1 according to the present embodiment receives a grayscale image from an imaging device 2, detects a face centerline in the inputted grayscale image, and detects a face authentication device ( A face image extracting unit 11 that extracts a face image from a grayscale image input from the imaging device 2, and each pixel of the face image extracted by the face image extracting unit 11 A density image generated by replacing the value with a numerical value corresponding to the direction of the density gradient at the position of the pixel, a density gradient image generating unit 12, and a face image using the density gradient image generated by the density gradient image generating unit 12 And a center line detection unit 13 for detecting the center line of. The imaging device 2 is a known so-called digital camera having an imaging element using, for example, a CCD or a CMOS. Furthermore, the image storage unit 14 in which the grayscale image input from the imaging device 2 is stored is provided, and the face image extraction unit 11 is stored in the image storage unit 14 as well as the grayscale image directly input from the imaging device 2. It is also possible to extract a face image from the gray image. For example, when there is an unprocessed grayscale image in the image storage unit 14, the input source of the grayscale image to the face image extraction unit 11 is set as the input source, and the image processing unit 14 is unprocessed. If there is no grayscale image, the face image extraction unit 11 automatically switches to the imaging device 2 as an input source.

以下、各部の動作について詳しく説明する。顔画像抽出部11が濃度勾配画像生成部12に出力する顔画像は、濃淡画像から顔部分を含むように切り出された例えば長方形状の領域である。濃淡画像から顔部分を検出する方法や、顔画像として出力する領域を決定する方法については、いずれも周知技術で実現可能であるので、詳細な説明は省略する。また、顔画像抽出部11は、濃淡画像から切り出された領域に対して適宜の拡大又は縮小を施すことにより、濃度勾配画像生成部12に出力する顔画像のサイズを常に一定とする。これにより、濃淡画像において顔画像抽出部11が顔と判断する領域の大きさが違う場合にも対応可能となる。   Hereinafter, the operation of each unit will be described in detail. The face image output from the face image extraction unit 11 to the density gradient image generation unit 12 is, for example, a rectangular region cut out from the grayscale image so as to include the face portion. Since a method for detecting a face portion from a grayscale image and a method for determining an area to be output as a face image can be realized by a well-known technique, detailed description thereof is omitted. In addition, the face image extraction unit 11 constantly enlarges or reduces the area cut out from the grayscale image, so that the size of the face image output to the density gradient image generation unit 12 is always constant. Accordingly, it is possible to cope with a case where the size of the area that the face image extraction unit 11 determines as a face is different in the grayscale image.

濃度勾配画像生成部12は、濃度勾配画像の生成にあたり、まず、顔画像の各画素について、それぞれ、該画素の位置での左右方向(x方向)についての濃度勾配dxと、上下方向(y方向)についての濃度勾配dyとを演算する。濃度勾配dx,dyの演算には、例えば周知のSobelフィルタを用いる。すなわち、図2(a)に示すように、濃度勾配の演算の対象となっている画素(以下、「対象画素」と呼ぶ。)の画素値をP5として、対象画素の左上、上、右上、左、右、左下、下、右下の各画素の画素値をそれぞれ順にP1、P2、P3、P4、P6、P7、P8、P9とし、xは右方向を正とし、yは下方向を正として、図2(b)(c)に示すようなSobelフィルタを用いると、対象画素の位置でのx方向での濃度勾配dxはdx=(P1+2×P4+P7)−(P3+2×P6+P9)と表され、対象画素の位置でのy方向での濃度勾配dyはdy=(P1+2×P2+P3)−(P7+2×P8+P9)と表される。上記の濃度勾配dx、dyは、正の方向へ向かって画素値が低くなる場合に正の値をとる。   In generating the density gradient image, the density gradient image generation unit 12 firstly, for each pixel of the face image, the density gradient dx in the left-right direction (x direction) at the position of the pixel and the vertical direction (y direction). ) With respect to the concentration gradient dy. For the calculation of the density gradients dx, dy, for example, a known Sobel filter is used. That is, as shown in FIG. 2A, the pixel value of a pixel that is the target of density gradient calculation (hereinafter referred to as “target pixel”) is P5, and the upper left, upper, upper right, The pixel values of the left, right, lower left, lower, and lower right pixels are respectively P1, P2, P3, P4, P6, P7, P8, and P9, x is positive in the right direction, and y is positive in the downward direction. As shown in FIGS. 2B and 2C, when the Sobel filter is used, the density gradient dx in the x direction at the position of the target pixel is expressed as dx = (P1 + 2 × P4 + P7) − (P3 + 2 × P6 + P9). The density gradient dy in the y direction at the position of the target pixel is expressed as dy = (P1 + 2 × P2 + P3) − (P7 + 2 × P8 + P9). The density gradients dx and dy take positive values when the pixel value decreases in the positive direction.

また、dx>0且つdy≧0であれば、図4に示すように右方向(xの正の方向)を0°として時計回り方向に数値が増加する角度表現を用いて、対象画素の位置での濃度勾配の向き(つまり、顔画像での画素値が低くなる方向)を示す角度(以下、「濃度勾配方向」と呼ぶ。)θは、θ=arctan(dy/dx)と表される。   If dx> 0 and dy ≧ 0, as shown in FIG. 4, the position of the target pixel is expressed using an angle expression in which the numerical value increases clockwise with the right direction (positive direction of x) being 0 °. The angle θ (hereinafter referred to as “density gradient direction”) θ indicating the direction of the density gradient at (that is, the direction in which the pixel value in the face image decreases) θ is expressed as θ = arctan (dy / dx). .

上記の濃度勾配dx,dyがともに0である場合を除けば、濃度勾配dx,dyの各符号に応じた適宜の場合分けにより、あらゆる濃度勾配dx,dyについて、上記のように定義される濃度勾配方向θの値は0°≦θ<360°の範囲内で決定可能である。具体的には、dx=0の場合dy>0であればθ=90°としてdy<0であればθ=270°とし、dx>0且つdy<0であればθ=arctan(dy/dx)+360°とし、dx<0であればθ=arctan(dy/dx)+180°とする。そして、濃度勾配画像生成部12は、濃度勾配dx,dyが得られた対象画素について上記範囲内で濃度勾配方向θを決定する。   Except for the case where the concentration gradients dx and dy are both 0, the concentration defined as described above for all the concentration gradients dx and dy by appropriate classification according to the signs of the concentration gradients dx and dy. The value of the gradient direction θ can be determined within a range of 0 ° ≦ θ <360 °. Specifically, when dx = 0, if dy> 0, θ = 90 ° and if dy <0, θ = 270 °, and if dx> 0 and dy <0, θ = arctan (dy / dx ) + 360 °, and if dx <0, θ = arctan (dy / dx) + 180 °. Then, the density gradient image generation unit 12 determines the density gradient direction θ within the above range for the target pixel from which the density gradients dx and dy are obtained.

次に、濃度勾配画像生成部12は、濃度勾配方向θが決定された対象画素について、濃度勾配画像における画素値を決定する。濃度勾配画像における画素値がとり得る値は上下左右の4方向に一対一に対応する4通りの値である。具体的には、対象画素の画素値は、図4にDR1で示すように濃度勾配方向θが0°≦θ<45°又は315°≦θ<360°であれば右方向の濃度勾配を示す画素値とされ、図4にDR2で示すように濃度勾配方向θが45°≦θ<135°であれば下方向の濃度勾配を示す画素値とされ、図4にDR3で示すように濃度勾配方向θが135°≦θ<225°であれば左方向の濃度勾配を示す画素値とされ、図4にDR4で示すように濃度勾配方向θが225°≦θ<315°であれば上方向の濃度勾配を示す画素値とされる。以上の動作を顔画像の全ての画素についてそれぞれ行うことにより、該顔画像に基いた濃度勾配画像が生成される。例えば、図3(a)に示す顔画像FPからは、図3(b)に示す濃度勾配画像DPが生成される。   Next, the density gradient image generation unit 12 determines a pixel value in the density gradient image for the target pixel for which the density gradient direction θ is determined. The values that can be taken by the pixel values in the density gradient image are four values that correspond one-to-one in the four directions, up, down, left, and right. Specifically, the pixel value of the target pixel indicates a density gradient in the right direction if the density gradient direction θ is 0 ° ≦ θ <45 ° or 315 ° ≦ θ <360 ° as indicated by DR1 in FIG. If the density gradient direction θ is 45 ° ≦ θ <135 ° as indicated by DR2 in FIG. 4, the pixel value indicates a downward density gradient, and the density gradient is indicated by DR3 in FIG. If the direction θ is 135 ° ≦ θ <225 °, the pixel value indicates the density gradient in the left direction. As indicated by DR4 in FIG. 4, the direction is upward if the density gradient direction θ is 225 ° ≦ θ <315 °. The pixel value indicates the density gradient. By performing the above operation for all the pixels of the face image, a density gradient image based on the face image is generated. For example, a density gradient image DP shown in FIG. 3B is generated from the face image FP shown in FIG.

中心線検出部13は、濃度勾配画像生成部12から濃度勾配画像DPが入力された後、中心線を検出する前に、濃度勾配画像DPの画素値がとり得る各数値(つまり上記の4通りの画素値)について、それぞれ、上記濃度勾配画像DPにおいて画素値が該数値となっている画素数を計数するとともに、画素値がとり得る数値毎に予め設定された最低画素数と、上記濃度勾配画像DPにおいて画素値が該数値となっている画素数とを比較し、いずれかの数値について画素数が最低画素数未満であった場合、上記濃度勾配画像DPを用いた中心線の検出を行わない。これにより、例えば濃度勾配画像DPにおいて上下方向の濃度勾配を示す画素値をとっている画素が異常に少ない場合のように、顔画像抽出部11が明らかに顔を含まない範囲を顔画像FPとして誤って抽出していた場合に、その誤った顔画像FPについて無駄に中心線の検出が行われることを避けることができる。なお、最低画素数の具体的な数値については、実際の顔画像でのデータを参考に決定すればよい。   The center line detection unit 13 receives each numerical value (that is, the above four values) that the pixel value of the density gradient image DP can take after detecting the center line after the density gradient image DP is input from the density gradient image generation unit 12. Pixel value), the number of pixels whose pixel value is the numerical value in the density gradient image DP is counted, the minimum number of pixels set in advance for each numerical value that the pixel value can take, and the density gradient The pixel number of the image DP is compared with the number of pixels, and if the number of pixels is less than the minimum number of pixels for any value, the center line is detected using the density gradient image DP. Absent. As a result, for example, when the number of pixels having a pixel value indicating a vertical density gradient in the density gradient image DP is abnormally small, the face image extraction unit 11 clearly sets a range that does not include a face as the face image FP. If it is extracted by mistake, it can be avoided that the center line is detected unnecessarily for the erroneous face image FP. In addition, what is necessary is just to determine about the specific numerical value of the minimum pixel number with reference to the data in an actual face image.

一方、中心線検出部13は、濃度勾配画像DPの画素値がとり得る全ての数値について、入力された濃度勾配画像DPにおける画素数が最低画素数以上であった場合、入力された濃度勾配画像DPにおける中心線を検出する中心線検出動作を開始する。中心線検出動作では、中心線検出部13は、まず、図3(c)〜(e)に示すように、濃度勾配画像生成部12から入力された濃度勾配画像DPにおいて複数本の仮中心線CL1〜CL3を仮定するとともに、各仮中心線CL1〜CL3についてそれぞれ仮中心線CL1〜CL3を中心とする演算領域CZ1〜CZ3を設定する。本実施形態では、各仮中心線CL1〜CL3は、それぞれ、上下方向(y方向)に平行な直線であり、x方向について少なくとも1画素分の幅を有するとともにy方向について複数画素分の長さを有する領域である。また、各演算領域CZ1〜CZ3は、それぞれ、仮中心線CL1〜CL3を左右方向の中心として左右対称に設定された長方形状の領域であり、形状及び大きさは全ての演算領域CZ1〜CZ3で共通となっている。さらに、各仮中心線CL1〜CL3は、それぞれ、y方向(上下方向)について濃度勾配画像DPの中央に配置され、x方向(左右方向)については演算領域CZ1〜CZ3が濃度勾配画像DPに収まる範囲内で仮中心線CL1〜CL3毎に僅かずつ位置をずらされている。そして、中心線検出部13は、各演算領域CZ1〜CZ3についてそれぞれ仮中心線CL1に関する対称性を示す数値である対称値SP1〜SP3を演算する。なお、図では仮中心線CL1〜CL3は3本となっているが、仮中心線の本数はこれに限られず、例えば演算領域が確保される範囲内でx方向での位置を1画素ずつずらして可能な限りの数の仮中心線を仮定してもよい。   On the other hand, if the number of pixels in the input density gradient image DP is greater than or equal to the minimum number of pixels for all the numerical values that can be taken by the pixel values of the density gradient image DP, the center line detection unit 13 inputs the density gradient image. A center line detection operation for detecting the center line in the DP is started. In the center line detection operation, the center line detection unit 13 first, as shown in FIGS. 3C to 3E, a plurality of temporary center lines in the density gradient image DP input from the density gradient image generation unit 12. Assuming CL1 to CL3, calculation areas CZ1 to CZ3 centering on the temporary center lines CL1 to CL3 are set for the temporary center lines CL1 to CL3, respectively. In the present embodiment, each of the temporary center lines CL1 to CL3 is a straight line parallel to the vertical direction (y direction), has a width of at least one pixel in the x direction, and a length of a plurality of pixels in the y direction. It is an area | region which has. The calculation areas CZ1 to CZ3 are rectangular areas set symmetrically about the temporary center lines CL1 to CL3 as the centers in the left-right direction, and the shapes and sizes of all the calculation areas CZ1 to CZ3 are the same. It is common. Further, the temporary center lines CL1 to CL3 are respectively arranged in the center of the density gradient image DP in the y direction (up and down direction), and the calculation areas CZ1 to CZ3 fit in the density gradient image DP in the x direction (left and right direction). Within the range, the temporary center lines CL1 to CL3 are slightly shifted in position. Then, the center line detection unit 13 calculates the symmetry values SP1 to SP3, which are numerical values indicating the symmetry with respect to the temporary center line CL1, for each of the calculation regions CZ1 to CZ3. Although the number of temporary center lines CL1 to CL3 is three in the figure, the number of temporary center lines is not limited to this. For example, the position in the x direction is shifted by one pixel within a range where a calculation area is secured. As many temporary centerlines as possible may be assumed.

以下、図5及び図6を用いて、1本の仮中心線CL1に関する対称値SP1の演算方法を説明する。中心線検出部13は、対称値の演算を開始する(S1)と、まず、対称値SP1を初期値である0に戻す(リセットする)(S2)。次に、図6に示す演算領域CZ1において仮中心線CL1の一方側(例えば左側)の1個の画素(以下、「注目画素」と呼ぶ。)Pの画素値と、仮中心線CL1を挟んで反対側(対称位置)に位置する1個の画素(以下、「対応画素」と呼ぶ。)P’の画素値とを比較する。まず、上下方向(y方向)の濃度勾配に対応する画素値同士で一致するか否かを判定する(S3)。一致した場合、つまり、上向きに対応する画素値同士で一致した場合や、下向きに対応する画素値同士で一致した場合には、それぞれ対称値SP1に2を加算して(S4)、次のステップS7に進む。ステップS3において一致しなかった場合、次に、上記の画素値同士が、左右方向(x方向)の濃度勾配に対応する画素値同士であって互いに逆向きに対応する画素値同士であるか否か、つまり、上記の画素値の一方が左向きに対応する画素値であって上記の画素値の他方が右向きに対応する画素値であるか否かを判定する(S5)。ステップS5において上記のような画素値同士であった場合、対称値SP1に1を加算して(S6)、次のステップS7に進む。そして、ステップS5においても画素値同士が上記の関係でなかった場合には、対称値SP1を変化させず、次のステップS7に進む。すなわち、濃度勾配の向きが仮中心線CL1に関して対称であった場合にのみ、濃度勾配の向きに応じて対称値SP1が加算される。そして、次のステップS7では、演算領域CZ1において仮中心線CL1の同じ側(図6では左側)に、まだ注目画素Pとなっていない画素が存在するか否かを判定し、存在していれば、上記のまだ注目画素Pとなっていない画素のいずれかを新たに注目画素Pとして(S8)、ステップS3に戻る。注目画素Pの選択方法としては、具体的には例えば、まず演算領域CZ1の最も左上の画素を注目画素Pとし、ステップS8に至る度に注目画素Pの位置を右方向へ1画素ずつずらしてゆき、注目画素Pが仮中心線CL1の左側に至った次のステップS8では注目画素Pの位置を1画素だけ下にずらして再び演算領域CZ1の左端から順に右方向へ注目画素Pの位置を変化させるといった動作を、仮中心線CL1の左側であって演算領域CZ1の下端の画素が注目画素Pとなるまで繰り返す。そして、演算領域CZ1において仮中心線CL1の一方側(図6では左側)の全ての画素が1回ずつ注目画素Pとなった場合、つまり演算領域CZ1において仮中心線CL1の両側の(つまり仮中心線CL1上の画素以外の)全ての画素が比較の対象(つまり注目画素Pと対応画素P’とのいずれか)となった場合、その仮中心線CL1及び演算領域CZ1についての対称値SP1の演算を終了する(S9)。つまり、仮中心線CL1に関して互いに反対側に位置する画素P,P’の画素値に示された濃度勾配の向きが仮中心線CL1に関して対称となったときに対称値SP1が加算されるのであり、仮中心線CL1に関して演算領域CZ1の濃度勾配の対称性が高いほど、最終的に得られる対称値SP1は大きい数値となる。   Hereinafter, the calculation method of the symmetric value SP1 with respect to one temporary center line CL1 will be described with reference to FIGS. When the center line detector 13 starts to calculate a symmetric value (S1), first, the symmetric value SP1 is returned to the initial value 0 (reset) (S2). Next, in the calculation area CZ1 shown in FIG. 6, the pixel value of one pixel (hereinafter referred to as “target pixel”) P on one side (for example, the left side) of the temporary center line CL1 and the temporary center line CL1 are sandwiched. The pixel value of one pixel (hereinafter referred to as “corresponding pixel”) P ′ located on the opposite side (symmetrical position) is compared. First, it is determined whether or not the pixel values corresponding to the density gradient in the vertical direction (y direction) match (S3). When the pixel values match, that is, when the pixel values corresponding to the upward direction match or the pixel values corresponding to the downward direction match, 2 is added to the symmetry value SP1 (S4), and the next step Proceed to S7. If they do not match in step S3, then whether or not the pixel values are pixel values corresponding to the density gradient in the left-right direction (x direction) and corresponding to opposite directions. That is, it is determined whether one of the pixel values is a pixel value corresponding to the left direction and the other of the pixel values is a pixel value corresponding to the right direction (S5). If the pixel values are as described above in step S5, 1 is added to the symmetry value SP1 (S6), and the process proceeds to the next step S7. In step S5, if the pixel values do not have the above relationship, the symmetry value SP1 is not changed and the process proceeds to the next step S7. That is, the symmetry value SP1 is added according to the direction of the concentration gradient only when the direction of the concentration gradient is symmetric with respect to the temporary center line CL1. In the next step S7, it is determined whether or not there is a pixel that has not yet become the target pixel P on the same side (left side in FIG. 6) of the temporary center line CL1 in the calculation region CZ1. For example, any of the pixels that are not yet the target pixel P is newly set as the target pixel P (S8), and the process returns to step S3. As a method for selecting the target pixel P, specifically, for example, the upper left pixel of the calculation area CZ1 is first set as the target pixel P, and the position of the target pixel P is shifted to the right by one pixel each time step S8 is reached. Then, in the next step S8 when the target pixel P reaches the left side of the temporary center line CL1, the position of the target pixel P is shifted downward by one pixel, and the position of the target pixel P is moved to the right again in order from the left end of the calculation area CZ1. The operation of changing is repeated until the pixel on the left side of the temporary center line CL1 and the lower end of the calculation area CZ1 becomes the target pixel P. Then, when all the pixels on one side (left side in FIG. 6) of the temporary center line CL1 in the calculation area CZ1 become the target pixel P one time, that is, on both sides of the temporary center line CL1 (that is, the temporary center line CL1 in the calculation area CZ1). When all the pixels other than the pixel on the center line CL1 are to be compared (that is, either the target pixel P or the corresponding pixel P ′), the symmetric value SP1 for the temporary center line CL1 and the calculation region CZ1. This calculation is finished (S9). That is, the symmetry value SP1 is added when the direction of the density gradient shown in the pixel values of the pixels P and P ′ located on the opposite sides with respect to the temporary center line CL1 is symmetric with respect to the temporary center line CL1. The higher the symmetry of the concentration gradient in the calculation area CZ1 with respect to the temporary center line CL1, the greater the finally obtained symmetry value SP1.

中心線検出部13は、全ての仮中心線CL1〜CL3についてそれぞれ上記のようにして対称値SP1〜SP3を演算する。そして、中心線検出部13は、全ての仮中心線CL1〜CL3について対称値SP1〜SP3が得られると、いずれの仮中心線CL1〜CL3について最も対称値SP1〜SP3が高くなったかを判定し、最も対称値SP1〜SP3が高くなった仮中心線CL1〜CL3(例えば中央の仮中心線CL2)をその濃度勾配画像DPの(つまり元となった顔画像FPの)中心線として出力し、中心線検出動作を終了する。   The center line detector 13 calculates the symmetry values SP1 to SP3 as described above for all the temporary center lines CL1 to CL3. Then, when the symmetry values SP1 to SP3 are obtained for all the temporary center lines CL1 to CL3, the center line detection unit 13 determines which of the temporary center lines CL1 to CL3 has the highest symmetry value SP1 to SP3. The temporary center lines CL1 to CL3 (for example, the central temporary center line CL2) having the highest symmetry values SP1 to SP3 are output as the center lines of the density gradient image DP (that is, the original face image FP), End the centerline detection operation.

上記構成によれば、例えば顔に影が生じていたとしてもその影の中で発生する濃度勾配方向を用いることができるといったように、従来例において用いられていたエッジよりも情報量の多い濃度勾配方向を用いていることにより、エッジを用いる場合に比べてより正確な中心線を得ることができる。   According to the above configuration, for example, even if a shadow is generated on the face, the density gradient direction generated in the shadow can be used, so that the density has a larger amount of information than the edge used in the conventional example. By using the gradient direction, a more accurate center line can be obtained as compared with the case of using the edge.

また、濃度勾配画像DPでの画素値がとり得る値を4通りとしていることにより、濃度勾配画像での画素値がとり得る値を5通り以上とする場合に比べて濃度勾配画像DPのデータ量が低減され、中心線検出部13にかかる負荷が軽減されている。   Also, since the four possible pixel values in the density gradient image DP are four, the data amount of the density gradient image DP is larger than in the case where there are five or more possible pixel values in the density gradient image. Is reduced, and the load on the center line detection unit 13 is reduced.

さらに、対称性の演算の際、ステップS6のように濃度勾配が左右方向の逆向きであった場合よりも、ステップS4のように濃度勾配が上下方向で互いに一致する向きであった場合のほうが対称値SP1〜SP3に加算される数値を大きくしているので、例えば上記の各場合で対称値SP1〜SP3に加算される数値を共通とする場合に比べ、上下方向の濃度勾配を生じさせる眉や目や口といった要素の対称性をより強く対称値SP1〜SP3に反映させ、より適切な中心線の選択に結びつけることができる。   Further, when calculating the symmetry, the case where the concentration gradients are in the same direction in the vertical direction as in step S4 is more than the case where the concentration gradients are in the opposite direction in the left-right direction as in step S6. Since the numerical value added to the symmetric values SP1 to SP3 is increased, for example, the eyebrows that cause the density gradient in the vertical direction compared to the case where the numerical values added to the symmetric values SP1 to SP3 are common in the above cases, for example. As a result, the symmetry of elements such as the eyes and the mouth can be more strongly reflected in the symmetry values SP1 to SP3, and can be linked to the selection of a more appropriate center line.

また、顔の左右方向での中央部は局所的に非対称となりやすいが、本実施形態では顔の左右方向での中央部である可能性が高い画素が仮中心線CZ1上の画素とされ、その画素値が対称値SP1の演算に用いられていないことにより、濃度勾配画像DPの全ての画素の画素値が対象性の演算に用いられる場合に比べ、より正確な中心線の検出が可能となる。   Further, although the central part in the left-right direction of the face is likely to be locally asymmetric, in this embodiment, a pixel that is highly likely to be the central part in the left-right direction of the face is set as a pixel on the temporary center line CZ1, Since the pixel values are not used for the calculation of the symmetric value SP1, it is possible to detect the center line more accurately than when the pixel values of all the pixels of the density gradient image DP are used for the calculation of objectivity. .

なお、顔画像抽出部11が、上記のように濃度勾配画像生成部12に出力する顔画像FPのサイズを常に一定とする代わりに、元の濃淡画像から切り出されたままのサイズで出力するようにし、中心線検出部13が、濃度勾配画像DPのサイズが大きいほど(つまり濃度勾配画像DPの画素数が多いほど)、仮中心線CL1〜CL3の長さを長くするとともに演算領域CZ1〜CZ3のサイズを大きくし、さらに、仮定する仮中心線CL1〜CL3の本数を多くするようにしてもよい。この場合、中心線の検出に先立って行われる判定において用いられる最低画素数も濃度勾配画像のサイズに応じて変更する。例えば、画素値毎に予め定められた係数に濃度勾配画像DPの総画素数を乗じることによって画素値毎の最低画素数を演算するようにする。   Note that the face image extraction unit 11 outputs the size of the face image FP output to the density gradient image generation unit 12 at a size that is cut out from the original grayscale image instead of always keeping the size of the face image FP constant. The center line detection unit 13 increases the lengths of the temporary center lines CL1 to CL3 and increases the calculation areas CZ1 to CZ3 as the size of the density gradient image DP increases (that is, as the number of pixels of the density gradient image DP increases). And the number of temporary center lines CL1 to CL3 to be assumed may be increased. In this case, the minimum number of pixels used in the determination performed prior to the detection of the center line is also changed according to the size of the density gradient image. For example, the minimum number of pixels for each pixel value is calculated by multiplying a predetermined coefficient for each pixel value by the total number of pixels of the density gradient image DP.

また、対称性の演算の際、各演算領域CZ1〜CZ3をそれぞれ上下の分割演算領域に分け、対称値SP1〜SP3が加算される際に加算される数値(つまり増加幅)を、下側の分割演算領域(例えば演算領域CZ1〜CZ3の下半分)では上側の分割演算領域よりも大きく(例えば2倍に)してもよい。この構成を採用すれば、片目用眼鏡や髪型といった要因により左右非対称になりやすい顔の上側部分よりも、左右対称になりやすい顔の下側部分を重視することになるから、より正確な中心線の検出が可能となる。   Further, in the calculation of symmetry, each of the calculation areas CZ1 to CZ3 is divided into upper and lower divided calculation areas, and a numerical value (that is, an increase width) added when the symmetry values SP1 to SP3 are added, The divided calculation area (for example, the lower half of the calculation areas CZ1 to CZ3) may be larger (for example, doubled) than the upper divided calculation area. By adopting this configuration, the lower center part of the face, which tends to be bilaterally symmetrical, is more important than the upper part of the face, which tends to be bilaterally asymmetric due to factors such as eyeglasses for one eye and hairstyle. Can be detected.

(実施形態2)
本実施形態の基本構成は実施形態1と共通であるので、共通する部分については同じ符号を付して図示並びに説明を省略する。
(Embodiment 2)
Since the basic configuration of the present embodiment is the same as that of the first embodiment, common portions are denoted by the same reference numerals, and illustration and description thereof are omitted.

本実施形態は、図7及び図8に示すように、顔画像抽出部11によって抽出された顔画像FPに対しそれぞれ異なる角度だけ回転させた複数枚の回転顔画像RPを生成する顔画像回転部15を備える。顔画像回転部15が顔画像FPを回転させる角度の最大値は、例えば、画像の上下方向(y方向)に対して顔の中心線が傾き得る角度の想定される限りの最大値とする。また、回転顔画像RPの枚数は図8には2枚のみ示しているが、回転角度が異なる回転顔画像RPをさらに追加してもよい。   In the present embodiment, as shown in FIGS. 7 and 8, a face image rotation unit that generates a plurality of rotated face images RP rotated by different angles with respect to the face image FP extracted by the face image extraction unit 11. 15. The maximum value of the angle by which the face image rotation unit 15 rotates the face image FP is, for example, the maximum value as long as the angle at which the center line of the face can tilt with respect to the vertical direction (y direction) of the image is assumed. Further, only two rotated face images RP are shown in FIG. 8, but rotated face images RP with different rotation angles may be further added.

濃度勾配画像生成部12は、顔画像回転部15が出力した各回転顔画像RPについてもそれぞれ顔画像回転部15によって回転されていない顔画像FPと同様の濃度勾配画像の生成を行う。   The density gradient image generation unit 12 generates a density gradient image similar to the face image FP that has not been rotated by the face image rotation unit 15 for each rotated face image RP output by the face image rotation unit 15.

さらに、中心線検出部13は、濃度勾配画像生成部12が生成した各濃度勾配画像について、それぞれ、複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し仮中心線のうち対称性が最も高くなった中心線を中心線として検出するという実施形態1と同様の中心線検出動作を行い、さらに、回転顔画像RPから生成された濃度勾配画像から得られた中心線については顔画像回転部15における回転に対して逆向きで同じ角度だけ(つまり顔画像回転部15における回転を打ち消すように)回転させた上で、共通の顔画像FPから生成された各濃度勾配画像から得られた中心線のうち対称値が最も大きかった(つまり対称性が最も高かった)中心線を、最終的な顔画像FPの中心線として検出する。   Further, the center line detection unit 13 assumes a plurality of temporary center lines for each density gradient image generated by the density gradient image generation unit 12, and determines the temporary center line in the density gradient image for each temporary center line. A centerline detection operation similar to that of the first embodiment is performed in which symmetry within a predetermined calculation area as a center is calculated and a centerline having the highest symmetry among the temporary centerlines is detected as a centerline. The center line obtained from the density gradient image generated from the rotated face image RP is rotated in the opposite direction to the rotation in the face image rotation unit 15 by the same angle (that is, to cancel the rotation in the face image rotation unit 15). Then, the center line having the largest symmetry value (ie, the highest symmetry) among the center lines obtained from the density gradient images generated from the common face image FP is selected. It is detected as the center line of the final facial image FP.

上記構成によれば、顔の正確な中心線が画像の上下方向に対して傾いていた場合には、その傾きに最も近い角度だけ回転された回転顔画像RPから得られた中心線が検出されることになるから、実施形態1よりもさらに正確な中心線の検出が可能となる。   According to the above configuration, when the exact center line of the face is tilted with respect to the vertical direction of the image, the center line obtained from the rotated face image RP rotated by an angle closest to the tilt is detected. Therefore, the center line can be detected more accurately than in the first embodiment.

(実施形態3)
本実施形態の基本構成は実施形態1と共通であるので、共通する部分については同じ符号を付して図示並びに説明を省略する。
(Embodiment 3)
Since the basic configuration of the present embodiment is the same as that of the first embodiment, common portions are denoted by the same reference numerals, and illustration and description thereof are omitted.

本実施形態は、中心線検出部13の中心線検出動作の内容が実施形態1とは異なる。   In the present embodiment, the content of the center line detection operation of the center line detection unit 13 is different from that of the first embodiment.

詳しく説明すると、中心線検出部13は、濃度勾配画像生成部12から濃度勾配画像DPを入力されると、まず、図9に示すように、入力された濃度勾配画像DPにおいてそれぞれx方向について複数画素分の幅を有しy方向について1画素分の幅を有する複数個の線状領域LZを設定する。線状領域LZは、例えばy方向について等間隔(数画素おき)に設定される。   More specifically, when the density gradient image DP is input from the density gradient image generation unit 12, the center line detection unit 13 first has a plurality of values in the x direction in the input density gradient image DP as shown in FIG. A plurality of linear regions LZ having a width for pixels and a width for one pixel in the y direction are set. For example, the linear regions LZ are set at equal intervals (every several pixels) in the y direction.

次に、中心線検出部13は、各線状領域LZについて、それぞれx方向での対称性を最も高くする中心点CPを検出する。各線状領域LZにおける中心点CPの検出は、実施形態1での中心線の検出と同様に、複数個の仮中心点(実施形態1での仮中心線CL1〜CL3に相当)を仮定して各仮中心点について所定幅(実施形態1での演算領域CZ1〜CZ3に相当)内での対称値を演算し、最も対称値が高くなった仮中心点をその線状領域LZの中心点CPとすることによって行うことができる。   Next, the center line detection unit 13 detects the center point CP that maximizes the symmetry in the x direction for each linear region LZ. The detection of the center point CP in each linear region LZ assumes a plurality of temporary center points (corresponding to the temporary center lines CL1 to CL3 in the first embodiment) in the same manner as the detection of the center line in the first embodiment. For each temporary center point, a symmetric value within a predetermined width (corresponding to the calculation regions CZ1 to CZ3 in the first embodiment) is calculated, and the temporary center point having the highest symmetry value is determined as the center point CP of the linear region LZ. It can be done by.

そして、全ての線状領域LZで中心点CPが検出されると、中心線検出部13は、検出された中心点CPの群に対して最小二乗法を適用して得られた直線を中心線CLとして検出する。   When the center point CP is detected in all the linear regions LZ, the center line detection unit 13 uses the straight line obtained by applying the least square method to the group of detected center points CP as the center line. Detect as CL.

上記構成によれば、実施形態1と共通する部分についての実施形態1と同様の効果に加え、顔の正確な中心線が画像の上下方向(y方向)に対して傾いていた場合にも、比較的に正確な中心線CLの検出が可能となる。   According to the above configuration, in addition to the same effects as those of the first embodiment with respect to the parts common to the first embodiment, even when the accurate center line of the face is inclined with respect to the vertical direction (y direction) of the image, A relatively accurate center line CL can be detected.

本発明の実施形態1を示すブロック図である。It is a block diagram which shows Embodiment 1 of this invention. (a)〜(c)はそれぞれ同上の濃度勾配画像生成部の動作の説明に用いられる説明図であり、(a)は本文中の符号と画素の位置との対応関係を示し、(b)はx方向についてのSobelフィルタを示し、(c)はy方向についてのSobelフィルタを示す。(A)-(c) is explanatory drawing used for description of operation | movement of a density gradient image generation part same as the above, respectively, (a) shows the correspondence between the code | symbol in a text, and the position of a pixel, (b) Indicates a Sobel filter for the x direction, and (c) indicates a Sobel filter for the y direction. (a)〜(e)はそれぞれ同上の動作を示す説明図であり、(a)は顔画像の例を示し、(b)は(a)の顔画像から生成された濃度勾配画像を示し、(c)〜(e)はそれぞれ(b)の濃度勾配画像に対して仮定される仮中心線と演算領域との例を示す。(A)-(e) is explanatory drawing which respectively shows operation | movement same as the above, (a) shows the example of a face image, (b) shows the density | concentration gradient image produced | generated from the face image of (a), (C)-(e) shows the example of the temporary center line and calculation area | region assumed with respect to the density | concentration gradient image of (b), respectively. 同上における濃度勾配画像の画素値と濃度勾配の向きとの対応関係を示す説明図である。It is explanatory drawing which shows the correspondence of the pixel value of the density gradient image in the same as the above, and the direction of a density gradient. 同上の中心線検出部の対称値演算の動作を示す流れ図である。It is a flowchart which shows the operation | movement of the symmetrical value calculation of a centerline detection part same as the above. 同上の中心線検出部の対称値演算の動作において画素値を比較される画素同士の位置関係を示す説明図である。It is explanatory drawing which shows the positional relationship of the pixels by which a pixel value is compared in the operation | movement of the symmetrical value calculation of a centerline detection part same as the above. 本発明の実施形態2を示すブロック図である。It is a block diagram which shows Embodiment 2 of this invention. 同上の顔画像回転部の動作を示す説明図である。It is explanatory drawing which shows operation | movement of a face image rotation part same as the above. 本発明の実施形態3の中心線検出部の動作を示す説明図である。It is explanatory drawing which shows operation | movement of the centerline detection part of Embodiment 3 of this invention.

符号の説明Explanation of symbols

1 顔中心線検出装置
11 顔画像抽出部
12 濃度勾配画像生成部
13 中心線検出部
15 顔画像回転部
CL 中心線
CL1〜CL3 仮中心線
CP 中心点
CZ1〜CZ3 演算領域
DP 濃度勾配画像
FP 顔画像
LZ 線状領域
DESCRIPTION OF SYMBOLS 1 Face centerline detection apparatus 11 Face image extraction part 12 Density gradient image generation part 13 Centerline detection part 15 Face image rotation part CL Centerline CL1-CL3 Temporary centerline CP Center point CZ1-CZ3 Calculation area DP Density gradient image FP Face Image LZ Linear area

Claims (10)

濃淡画像を入力され該濃淡画像から顔を含む顔画像を抽出する顔画像抽出部と、顔画像抽出部によって抽出された顔画像の各画素の画素値を該画素の位置での濃度勾配の向きに応じた数値に置き換えた濃度勾配画像を生成する濃度勾配画像生成部と、濃度勾配画像生成部が生成した濃度勾配画像を用いて顔画像の中心線を検出する中心線検出部とを備えることを特徴とする顔中心線検出装置。   A face image extraction unit that inputs a grayscale image and extracts a face image including a face from the grayscale image, and a pixel gradient value of each pixel of the face image extracted by the face image extraction unit is a direction of a density gradient at the position of the pixel A density gradient image generation unit that generates a density gradient image replaced with a numerical value corresponding to the density gradient image generation unit, and a center line detection unit that detects the center line of the face image using the density gradient image generated by the density gradient image generation unit. A face centerline detection device characterized by the above. 顔画像抽出部は、抽出された顔画像に対して拡大又は縮小の変換を施すことにより、濃度勾配画像生成部へ出力する顔画像のサイズを常に一定とすることを特徴とする請求項1記載の顔中心線検出装置。   2. The face image extraction unit is characterized in that the size of the face image output to the density gradient image generation unit is always constant by performing enlargement or reduction conversion on the extracted face image. Face centerline detection device. 中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像について複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、
中心線検出部は、濃度勾配画像の画素数が多いほど、演算領域を広くすることを特徴とする請求項1記載の顔中心線検出装置。
The center line detection unit assumes a plurality of temporary center lines for the density gradient image generated by the density gradient image generation unit, and within a predetermined calculation area centered on the temporary center line in the density gradient image for each temporary center line. Is calculated, and the temporary center line having the highest symmetry among the temporary center lines is detected as the center line of the face image,
The face centerline detection device according to claim 1, wherein the centerline detection unit widens the calculation area as the number of pixels of the density gradient image increases.
中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像について複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、
中心線検出部が仮定する各仮中心線はそれぞれ1画素以上の幅を有し、中心線検出部は仮中心線上の画素の画素値を対称性の演算には用いないことを特徴とする請求項1〜3のいずれか1項に記載の顔中心線検出装置。
The center line detection unit assumes a plurality of temporary center lines for the density gradient image generated by the density gradient image generation unit, and within a predetermined calculation area centered on the temporary center line in the density gradient image for each temporary center line. Is calculated, and the temporary center line having the highest symmetry among the temporary center lines is detected as the center line of the face image,
Each temporary center line assumed by the center line detection unit has a width of one pixel or more, and the center line detection unit does not use a pixel value of a pixel on the temporary center line for calculation of symmetry. Item 4. The face centerline detection device according to any one of Items 1 to 3.
顔画像抽出部によって抽出された顔画像に対しそれぞれ異なる角度だけ回転させた複数枚の回転顔画像を生成する顔画像回転部を備え、
濃度勾配画像生成部は、顔画像回転部が出力した各回転顔画像についてもそれぞれ顔画像回転部によって回転されていない顔画像と同様の濃度勾配画像の生成を行い、
中心線検出部は、濃度勾配画像生成部が生成した各濃度勾配画像について、それぞれ上下方向に平行な複数本の仮中心線を仮定するとともに、各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し仮中心線のうち対称性が最も高くなった仮中心線を中心線として検出するという中心線検出動作を行うものであって、
中心線検出部は、回転顔画像から生成された各濃度勾配画像から得られた中心線についてはそれぞれ顔画像回転部における回転に対して逆方向に同じ角度だけ回転させた上で、各濃度勾配画像から得られた中心線のうち対称性が最も高くなった中心線を顔画像の中心線として検出することを特徴とする請求項1〜4のいずれか1項に記載の顔中心線検出装置。
A face image rotation unit that generates a plurality of rotated face images rotated by different angles with respect to the face image extracted by the face image extraction unit;
The density gradient image generation unit generates a density gradient image similar to a face image that has not been rotated by the face image rotation unit for each rotated face image output by the face image rotation unit,
The center line detection unit assumes a plurality of temporary center lines parallel to the vertical direction for each density gradient image generated by the density gradient image generation unit, and the temporary center line in the density gradient image with respect to each temporary center line. Performing a center line detection operation of calculating a symmetry in a predetermined calculation area centered on the center line and detecting a temporary center line having the highest symmetry among the temporary center lines as a center line,
The center line detection unit rotates each density gradient after rotating the center line obtained from each density gradient image generated from the rotated face image by the same angle in the opposite direction to the rotation in the face image rotation unit. 5. The face centerline detection device according to claim 1, wherein a centerline having the highest symmetry among centerlines obtained from an image is detected as a centerline of a face image. .
中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像についてそれぞれ上下方向に平行な複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであって、
中心線検出部は、対称性を演算する際、仮中心線を挟んで互いに反対側に位置する画素同士で画素値を比較し、一方の画素値が示す濃度勾配の向きに対して他方の画素値が示す濃度勾配の向きが仮中心線に関して対称となった場合に対称値を増加させるという動作を、濃度勾配画像において仮中心線を中心とする所定の演算領域のうち仮中心線の両側の全ての画素について行い、最終的に得られた対称値が高いほど対称性が高いとするものであって、
演算領域は上下方向について2個の分割演算領域に分割され、下側とされる一方の分割演算領域では、上側とされる他方の分割演算領域よりも、対称値の増加時の増加幅が大きいことを特徴とする請求項1〜5のいずれか1項に記載の顔中心線検出装置。
The center line detection unit assumes a plurality of temporary center lines parallel to the vertical direction of the density gradient image generated by the density gradient image generation unit, and each temporary center line is centered on the temporary center line in the density gradient image. Calculating the symmetry within the predetermined calculation area, and detecting the temporary center line having the highest symmetry among the temporary center lines as the center line of the face image,
When calculating the symmetry, the center line detection unit compares pixel values between pixels located on opposite sides of the temporary center line, and the other pixel with respect to the direction of the density gradient indicated by one pixel value. When the direction of the density gradient indicated by the value is symmetric with respect to the temporary center line, an operation of increasing the symmetry value is performed on both sides of the temporary center line in a predetermined calculation area centered on the temporary center line in the density gradient image It is performed for all pixels, and the higher the symmetry value finally obtained, the higher the symmetry,
The calculation area is divided into two divided calculation areas in the vertical direction, and one of the divided calculation areas on the lower side has a larger increase width when the symmetrical value increases than the other divided calculation area on the upper side. The face centerline detection apparatus according to claim 1, wherein the face centerline detection apparatus is a face centerline detection apparatus.
濃度勾配画像における各画素の画素値は、濃度勾配の向きのみに依存し、濃度勾配画像における各画素の画素値が取りうる値は、上下左右に一対一に対応した計4通りであることを特徴とする請求項1〜6のいずれか1項に記載の顔中心線検出装置。   The pixel value of each pixel in the density gradient image depends only on the direction of the density gradient, and the pixel value of each pixel in the density gradient image can be a total of four values that correspond one-to-one vertically and horizontally. The face centerline detection device according to claim 1, wherein the face centerline detection device is a feature of the face centerline detection device. 中心線検出部は、濃度勾配画像生成部が生成した濃度勾配画像についてそれぞれ上下方向に平行な複数本の仮中心線を仮定するとともに各仮中心線に関してそれぞれ濃度勾配画像における仮中心線を中心とした所定の演算領域内の対称性を演算し、仮中心線のうち対称性が最も高くなった仮中心線を顔画像の中心線として検出するものであり、対称性を演算する際、仮中心線を挟んで互いに反対側に位置する画素同士で画素値を比較し、画素値が上下方向の濃度勾配に対応した数値同士で互いに一致した第1の場合と、画素値がそれぞれ左右方向の濃度勾配で且つ互いに逆向きの濃度勾配に対応した数値であった第2の場合とに、それぞれ場合に応じた値を対称値に加算するという動作を、濃度勾配画像において仮中心線を中心とする所定の演算領域のうち仮中心線の両側の全ての画素について行い、最終的に得られた対称値が高いほど対称性が高いとするものであって、
対称性の演算の際、前記第2の場合よりも、前記第1の場合の方が、対称値に加算される値が大きいことを特徴とする請求項7記載の顔中心線検出装置。
The center line detection unit assumes a plurality of temporary center lines parallel to the vertical direction of the density gradient image generated by the density gradient image generation unit, and each temporary center line is centered on the temporary center line in the density gradient image. Is calculated as the center line of the face image, and the temporary center line is detected as the center line of the face image. A pixel value is compared between pixels located on the opposite sides of the line, and the pixel value is a value corresponding to a density gradient in the vertical direction. An operation of adding a value corresponding to each case to a symmetric value in the second case, which is a numerical value corresponding to a concentration gradient that is a gradient and opposite to each other, is centered on the temporary center line in the concentration gradient image. Predetermined Performed for all the pixels on both sides of the temporary center line of the calculation region, the finally obtained symmetric values been made to a high higher symmetry,
The face centerline detection device according to claim 7, wherein in the calculation of symmetry, the value added to the symmetry value is larger in the first case than in the second case.
中心線検出部は、濃度勾配画像生成部から濃度勾配画像が入力された後、中心線を検出する前に、濃度勾配画像の画素値がとり得る各数値について、それぞれ、数値毎に予め定められた最低画素数と、該濃度勾配画像において画素値が該数値となっている画素数とを比較し、いずれかの数値について前記画素数が最低画素数未満であった場合、該濃度勾配画像を用いた中心線の検出を行わないことを特徴とする請求項7又は請求項8記載の顔中心線検出装置。   The center line detection unit is predetermined for each numerical value for each numerical value that can be taken by the pixel value of the density gradient image before the center line is detected after the density gradient image is input from the density gradient image generation unit. The minimum number of pixels is compared with the number of pixels whose pixel value is the numerical value in the density gradient image. If the number of pixels is less than the minimum pixel number for any numerical value, the density gradient image is The face centerline detection device according to claim 7 or 8, wherein the centerline used is not detected. 中心線検出部は、濃度勾配画像においてそれぞれ上下方向について複数画素分の幅を有し左右方向について1画素分の幅を有する複数個の線状領域についてそれぞれ左右方向での対称性を最も高くする中心点を検出し、複数個の線状領域から検出された中心点の群に対して最小二乗法を適用して得られた直線を中心線として検出することを特徴とする請求項1又は請求項2記載の顔中心線検出装置。   The center line detection unit maximizes the symmetry in the left-right direction for each of the plurality of linear regions each having a width of a plurality of pixels in the vertical direction and a width of one pixel in the horizontal direction in the density gradient image. The center point is detected, and a straight line obtained by applying the least square method to a group of center points detected from a plurality of linear regions is detected as the center line. Item 3. The face centerline detection device according to Item 2.
JP2007318681A 2007-12-10 2007-12-10 Face centerline detection device Expired - Fee Related JP4872895B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007318681A JP4872895B2 (en) 2007-12-10 2007-12-10 Face centerline detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007318681A JP4872895B2 (en) 2007-12-10 2007-12-10 Face centerline detection device

Publications (2)

Publication Number Publication Date
JP2009140423A true JP2009140423A (en) 2009-06-25
JP4872895B2 JP4872895B2 (en) 2012-02-08

Family

ID=40870932

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007318681A Expired - Fee Related JP4872895B2 (en) 2007-12-10 2007-12-10 Face centerline detection device

Country Status (1)

Country Link
JP (1) JP4872895B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732530A (en) * 2015-03-10 2015-06-24 北京环境特性研究所 Image edge detection method
CN115619410A (en) * 2022-10-19 2023-01-17 闫雪 Self-adaptive financial payment platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10162118A (en) * 1996-11-29 1998-06-19 Canon Inc Device and method for image processing
JP2005011097A (en) * 2003-06-19 2005-01-13 Toyota Central Res & Dev Lab Inc Face existence determining device and face existence determining program
JP2005084979A (en) * 2003-09-09 2005-03-31 Fuji Photo Film Co Ltd Face authentication system, method and program
JP2006301811A (en) * 2005-04-18 2006-11-02 Matsushita Electric Works Ltd Image processor and image processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10162118A (en) * 1996-11-29 1998-06-19 Canon Inc Device and method for image processing
JP2005011097A (en) * 2003-06-19 2005-01-13 Toyota Central Res & Dev Lab Inc Face existence determining device and face existence determining program
JP2005084979A (en) * 2003-09-09 2005-03-31 Fuji Photo Film Co Ltd Face authentication system, method and program
JP2006301811A (en) * 2005-04-18 2006-11-02 Matsushita Electric Works Ltd Image processor and image processing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732530A (en) * 2015-03-10 2015-06-24 北京环境特性研究所 Image edge detection method
CN115619410A (en) * 2022-10-19 2023-01-17 闫雪 Self-adaptive financial payment platform
CN115619410B (en) * 2022-10-19 2024-01-26 闫雪 Self-adaptive financial payment platform

Also Published As

Publication number Publication date
JP4872895B2 (en) 2012-02-08

Similar Documents

Publication Publication Date Title
US7542608B2 (en) Method for automatically cropping image objects
US8254644B2 (en) Method, apparatus, and program for detecting facial characteristic points
US20050196044A1 (en) Method of extracting candidate human region within image, system for extracting candidate human region, program for extracting candidate human region, method of discerning top and bottom of human image, system for discerning top and bottom, and program for discerning top and bottom
JP2007213359A (en) Two-dimensional code detection system and two-dimensional code detection program
JP2008217347A (en) License plate recognition device, its control method and computer program
JP4694613B2 (en) Document orientation determination apparatus, document orientation determination method, program, and recording medium therefor
JP2011130439A (en) Image alignment method for image comparison and document authentication
JP2005316755A (en) Two-dimensional rectangular code symbol reader and two-dimensional rectangular code symbol reading method
CN110765992B (en) Seal identification method, medium, equipment and device
JP2004129271A (en) Method for determining skew angle and position for document in overscanned image
CN105761256B (en) The sub-pixel edge straight line acquisition methods and device of image
JP2006139369A (en) Image processing method and apparatus, and program
JP6542230B2 (en) Method and system for correcting projected distortion
JP4872895B2 (en) Face centerline detection device
JPH1173475A (en) Row direction deciding device, image tilt detecting device, and image tilt correcting device
US10325353B2 (en) Image processing apparatus
JP5486403B2 (en) Image processing apparatus, image processing method, and computer program
JP2008269181A (en) Object detector
CN112036232A (en) Image table structure identification method, system, terminal and storage medium
JP2010152457A (en) Image processing device and image processing program
WO2019019383A1 (en) Image correction method and apparatus, storage medium and computer device
WO2022211064A1 (en) Information reading device
JP6561891B2 (en) Barcode area detection apparatus, barcode reading system, barcode area detection method, and program
JP4064677B2 (en) Image processing apparatus, image processing method, and program causing computer to execute the method
JP2014071784A (en) Device and method for reading driver&#39;s license

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100723

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100812

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110802

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111003

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

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

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

Free format text: PAYMENT UNTIL: 20141202

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20141202

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees