JP4676978B2 - Face detection device, face detection method, and face detection program - Google Patents

Face detection device, face detection method, and face detection program Download PDF

Info

Publication number
JP4676978B2
JP4676978B2 JP2007328784A JP2007328784A JP4676978B2 JP 4676978 B2 JP4676978 B2 JP 4676978B2 JP 2007328784 A JP2007328784 A JP 2007328784A JP 2007328784 A JP2007328784 A JP 2007328784A JP 4676978 B2 JP4676978 B2 JP 4676978B2
Authority
JP
Japan
Prior art keywords
image
area
shadow
face
cut
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007328784A
Other languages
Japanese (ja)
Other versions
JP2009151539A (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.)
Asahi Kasei Corp
Original Assignee
Asahi Kasei 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 Asahi Kasei Corp filed Critical Asahi Kasei Corp
Priority to JP2007328784A priority Critical patent/JP4676978B2/en
Publication of JP2009151539A publication Critical patent/JP2009151539A/en
Application granted granted Critical
Publication of JP4676978B2 publication Critical patent/JP4676978B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、撮影した画像から顔を検出する顔検出装置、顔検出方法、及び、顔検出プログラムに関するものである。   The present invention relates to a face detection apparatus, a face detection method, and a face detection program for detecting a face from a captured image.

従来より、車両運転者の脇見、居眠り運転等の運転状態を検出するため、運転者の顔を車両室内に設けられたカメラで撮影し、得られた顔画像を処理して顔の特徴点を抽出する顔画像の処理装置が開発されている。
先行技術として、例えば特許文献1に記載の技術は、運転者の目の位置を精度良く検出するために、特に発光手段の光量を制御するなどして、車両内の明るさにかかわらず常に鮮明な画像を得るようにすることを狙いとしている。
Conventionally, in order to detect the driving state of the driver, such as a driver's look-aside, doze driving, etc., the driver's face is photographed with a camera provided in the vehicle cabin, and the obtained facial image is processed to determine facial feature points. An apparatus for processing a facial image to be extracted has been developed.
As a prior art, for example, the technique described in Patent Document 1 is always clear regardless of the brightness in the vehicle, for example, by controlling the light quantity of the light emitting means in order to accurately detect the position of the driver's eyes. The aim is to get a good image.

また、例えば特許文献2に記載の技術は、目の上下幅に対応した幅以下の領域に限定して濃淡レベル変換を行うことで、車両内の陰影を受けた顔画像から目領域を判定することを狙いとしている。
特開昭60−166807号公報 特開平08−300978号公報
In addition, for example, the technique described in Patent Document 2 determines the eye area from a face image that is shaded in the vehicle by performing light / dark level conversion limited to an area that is equal to or smaller than the width corresponding to the vertical width of the eye. It aims to.
JP 60-166807 A Japanese Patent Laid-Open No. 08-300978

しかしながら、昼間には太陽の高度や向き、車体の天井やピラー、或いはサンバイザーなどの陰や木漏れ日などにより顔に陰影が生じ、顔や顔の特徴点の検出が困難になるという問題点があった。例えば、図7に示す画像は太陽光が運転席の斜め上方から当たっており、顔の上半分が車体の天井、或いはサンバイザーの陰になっており、また顔の右半分が車体のピラーの陰になっているような例を示しており、同図に示すように顔に強い陰影が生じている状態では顔面上の輝度値が大きく異なるため、顔や顔の特徴点を正しく検出することができない。
特に晴天時の太陽光の近赤外成分は非常に大きく、特許文献1に記載の技術を用いてその太陽光の近赤外成分による外乱の影響を低減するためには非常に大きな光源を要するといった問題点があった。
However, there is a problem that the face and face feature points are difficult to detect in the daytime due to the sun's altitude and direction, the shadows of the ceiling and pillars of the car body, sunshade, etc. It was. For example, in the image shown in FIG. 7, sunlight hits the driver's seat diagonally from above, the upper half of the face is behind the ceiling of the car body or the sun visor, and the right half of the face is the pillar of the car body. This example shows a shaded area, and as shown in the figure, when the face has a strong shadow, the brightness value on the face is greatly different, so the face and facial feature points must be detected correctly. I can't.
In particular, the near-infrared component of sunlight during sunny weather is very large, and a very large light source is required to reduce the influence of disturbance due to the near-infrared component of sunlight using the technique described in Patent Document 1. There was a problem.

また、車両運転中の運転者の顔位置が移動する範囲をカバーする画角のカメラを使用した場合には、運転者の顔に加えて背景も撮影される。しかしながら、特許文献2に記載の画像処理による陰影補正においては、顔全体の検出を行わずに撮像画像全体から目領域などの顔器官のみの判定を行うため、車両運転者の顔の向きや背景が刻々と変化する状況下では、顔器官の誤検出が起こるという問題点があった。
本発明は、このような従来の問題点に着目してなされたものであり、顔に陰影が生じていたり背景が刻々と変化したりする場合にも、画像から正確かつ効率的に顔の検出を行うことを可能とする顔検出装置、顔検出方法、及び、顔検出プログラムを提供することを目的とする。
In addition, when a camera having an angle of view that covers the range in which the driver's face position is moving while driving the vehicle, the background is also captured in addition to the driver's face. However, in the shadow correction by image processing described in Patent Document 2, since only the facial organs such as the eye region are determined from the entire captured image without detecting the entire face, the face direction and background of the vehicle driver There is a problem that misdetection of facial organs occurs under the condition that changes constantly.
The present invention has been made paying attention to such a conventional problem, and even when the face is shaded or the background changes momentarily, the face detection is performed accurately and efficiently from the image. An object of the present invention is to provide a face detection device, a face detection method, and a face detection program that can perform the above.

上記課題を解決するために、請求項1に記載の発明は、顔を含む画像を入力する顔画像入力手段と、前記顔画像入力手段により入力された画像から陰影を除去する陰影除去手段と、入力された画像から顔を検出する顔検出手段とを備えた顔検出装置において、前記顔画像入力手段により入力された画像から顔検出の対象となる画像を切り出す画像切出手段と、前記画像切出手段により切り出された切出画像毎に、前記陰影除去手段により除去さ
れるべき陰影があるか否かの判定を行う陰影有無判定手段とを備え、前記陰影有無判定手段は、前記切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する明暗分類手段と、前記明暗分類手段により明暗分類された領域の面積を比較することにより前記切出画像内に陰影があるか否かを判定する面積比較手段とを備えることを特徴とする顔検出装置を提供する。
In order to solve the above-described problem, the invention according to claim 1 includes a face image input unit that inputs an image including a face, a shadow removal unit that removes a shadow from an image input by the face image input unit, In a face detection device comprising a face detection means for detecting a face from an input image, an image cutout means for cutting out an image that is a target for face detection from the image input by the face image input means, and the image cutout A shadow presence / absence determination unit that determines whether or not there is a shadow to be removed by the shadow removal unit for each cut image cut out by the extraction unit, and the shadow presence / absence determination unit includes the cut image Is classified into a bright region with relatively light brightness and a dark region with relatively darkness, and the area of the region classified by the light / dark classification unit is compared with the area of the light / dark classification so that there is a shadow in the cut-out image. Whether or not Providing a face detecting apparatus characterized by comprising an area comparison means for determining.

本発明によれば、顔検出装置は、入力された画像から顔検出の対象となる画像を切り出し、切出画像毎に陰影有無の判定処理を行い、陰影が有ると判定された切出画像から陰影を除去することにより、顔を検出する顔検出手段に入力する画像を生成するため、全体画像から陰影を除去して顔検出を行うのに比べて、誤認識が起こりにくくかつ処理時間を短縮することができる。したがって、顔に陰影が生じていたり背景が刻々と変化したりする場合にも、画像から正確かつ効率的に顔を検出することができる。   According to the present invention, the face detection device cuts out an image that is a target of face detection from the input image, performs a process for determining whether or not there is a shadow for each cut image, and extracts from the cut image determined to have a shadow. By removing the shadows, an image to be input to the face detection means that detects the face is generated. Therefore, it is less likely to cause misrecognition and the processing time is shorter than when face detection is performed by removing shadows from the entire image. can do. Therefore, even when the face is shaded or the background changes every moment, the face can be detected accurately and efficiently from the image.

さらに、本発明によれば、顔検出装置は明暗分類された領域の面積を比較することにより切出画像内に陰影があるか否かを判定することができるため、正確かつ効率的に陰影があるか否かを判定することができる。 Further, according to the present invention, the face detection device can determine whether or not there is a shadow in the cut image by comparing the areas of the light and dark classified areas, so that the shadow is accurately and efficiently detected. It can be determined whether or not there is.

請求項に記載の発明は、請求項に記載の顔検出装置において、前記明暗分類手段は、前記切出画像内の各画素を白画素又は黒画素に置換する2値化処理を行う2値化手段と、前記2値化手段により2値化処理が行われた切出画像からノイズを除去するノイズ除去手段と、前記ノイズ除去手段によりノイズが除去された切出画像について、白画素が連続して分布している明領域又は黒画素が連続して分布している暗領域を特定し、各領域毎に面積を計算する面積算出手段とを備えることを特徴とする。
本発明によれば、正確かつ効率的に明領域及び暗領域を特定することができる。
Invention according to claim 2, the face detection apparatus according to claim 1, wherein the contrast classifying means performs binarization processing for replacing each pixel in the clipped images to a white pixel or a black pixel 2 A white pixel is included in a binarization unit, a noise removal unit that removes noise from the cut-out image that has been binarized by the binarization unit, and a cut-out image from which noise has been removed by the noise removal unit. It is characterized by comprising an area calculation means for specifying a bright area where black pixels are continuously distributed or a dark area where black pixels are continuously distributed, and calculating an area for each area.
According to the present invention, a bright region and a dark region can be specified accurately and efficiently.

請求項に記載の発明は、請求項に記載の顔検出装置において、前記面積比較手段は、前記明暗分類手段により明暗分類がなされた領域のうち、面積が最も大きい第一の領域と、該第一の領域よりも面積が小さくかつ該第一の領域とは異なる明暗分類がなされた第二の領域と、を足し合わせた面積が、前記切出画像の面積に対して第一の所定の値以上の割合を占めるかを判定する占有面積判定手段と、前記第二の領域に対する前記第一の領域の面積比が第二の所定の範囲内にあるかを判定する面積比判定手段とを備えることを特徴とする。
本発明によれば、第一の領域及び第二の領域の占有面積や面積比を判定することで、容易に陰影の有無を判定することができる。
According to a third aspect of the invention, the face detection apparatus according to claim 1, wherein the area comparison means, and in a region where bright and dark classification is made, the largest first region area by the brightness classifying means, The area obtained by adding the second area, which is smaller in area than the first area and has a light / dark classification different from the first area, is a first predetermined amount with respect to the area of the clipped image. Occupying area determining means for determining whether or not the ratio is equal to or greater than the value, and area ratio determining means for determining whether the area ratio of the first region to the second region is within a second predetermined range; It is characterized by providing.
According to the present invention, it is possible to easily determine the presence or absence of a shadow by determining the occupied area and the area ratio of the first region and the second region.

請求項に記載の発明は、請求項に記載の顔検出装置において、前記第一の所定の値が0.5以上であることを特徴とする。
請求項に記載の発明は、請求項に記載の顔検出装置において、前記第二の所定の範囲が0.1から1.0までの範囲であることを特徴とする。
請求項に記載の発明は、請求項からの何れか1項に記載の顔検出装置において、前記陰影有無判定手段は、前記占有面積判定手段によって前記第一の領域と前記第二の領域とを足し合わせた面積の前記切出画像に占める割合が前記第一の所定の値以上と判定された場合、かつ、前記面積比判定手段によって前記第二の領域に対する前記第一の領域の面積比が第二の所定の範囲内にあると判定された場合に、陰影有りと判定することを特徴とする。
本発明によれば、顔検出に有害な陰影がある条件に該当した場合にのみ陰影ありと判定することができる。
According to a fourth aspect of the present invention, in the face detection device according to the third aspect , the first predetermined value is 0.5 or more.
According to a fifth aspect of the present invention, in the face detection device according to the third aspect , the second predetermined range is a range from 0.1 to 1.0.
According to a sixth aspect of the present invention, in the face detection device according to any one of the third to fifth aspects, the shadow presence / absence determining means is configured to use the first area and the second area by the occupied area determining means. When it is determined that the ratio of the area combined with the area to the cut-out image is equal to or greater than the first predetermined value, and the area ratio determining unit determines the ratio of the first area to the second area. When it is determined that the area ratio is within the second predetermined range, it is determined that there is a shadow.
According to the present invention, it can be determined that there is a shadow only when a condition that has a shadow that is harmful to face detection is met.

請求項に記載の発明は、請求項1からの何れか1項に記載の顔検出装置において、
前記顔画像入力手段は、車両の運転者の顔を含む画像を入力することを特徴とする。
本発明によれば、運転者の顔に陰影ができている場合に、正確かつ効率的に陰影を除去して運転者の顔検出を行うことができる。
請求項に記載の発明は、請求項1からの何れか1項に記載の顔検出装置を備えることを特徴とする車両を提供する。
本発明によれば、車両内で運転者の顔検出を行うことができる。
The invention according to claim 7 is the face detection device according to any one of claims 1 to 6 ,
The face image input means inputs an image including the face of the driver of the vehicle.
According to the present invention, when a shadow is formed on the driver's face, the driver's face can be detected by removing the shadow accurately and efficiently.
The invention according to claim 8 provides a vehicle comprising the face detection device according to any one of claims 1 to 6 .
According to the present invention, the driver's face can be detected in the vehicle.

請求項に記載の発明は、顔を含む画像を入力する顔画像入力ステップと、前記顔画像入力ステップにおいて入力された画像から顔検出の対象となる画像を切り出す画像切出ステップと、前記画像切出ステップにおいて切り出された切出画像毎に、陰影有無の判定を行う陰影有無判定ステップと、前記陰影有無判定ステップにおいて切出画像に陰影が有ると判定された場合に、該切出画像から陰影を除去する陰影除去ステップと、前記陰影有無判定ステップにおいて陰影が有ると判定された場合は前記陰影除去ステップにおいて陰影が除去された切出画像から顔を検出し、前記陰影有無判定ステップにおいて陰影が無いと判定された場合は陰影が除去されていない切出画像から顔を検出する顔検出ステップとを有し、前記陰影有無判定ステップは、前記切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する明暗分類ステップと、前記明暗分類ステップにおいて明暗分類された領域の面積を比較することにより前記切出画像内に陰影があるか否かを判定する面積比較ステップとを有することを特徴とする顔検出方法を提供する。 The invention according to claim 9 is a face image input step of inputting an image including a face, an image cutting out step of cutting out an image to be a face detection target from the image input in the face image input step, and the image A shadow presence / absence determination step for determining the presence / absence of a shadow for each cut image cut out in the cutout step, and when it is determined in the shadow presence / absence determination step that the cutout image has a shadow, from the cutout image When it is determined in the shadow removal step that removes the shadow and in the shadow presence determination step that there is a shadow, a face is detected from the cut image from which the shadow has been removed in the shadow removal step, and the shadow is determined in the shadow presence determination step If it is determined that there is no have a face detection step of detecting a face from clipped images that shading has not been removed, the shadow presence determining step The light-dark classification step for classifying the cut-out image into a light area with relatively light brightness and a dark area with a relatively low brightness, and comparing the areas of the areas classified in the light-dark classification step with the light-dark classification step. An area comparison step for determining whether or not there is a shadow in an image is provided.

請求項10に記載の発明は、コンピュータに、顔を含む画像を入力する顔画像入力ステップと、前記顔画像入力ステップにおいて入力された画像から顔検出の対象となる画像を切り出す画像切出ステップと、前記画像切出ステップにおいて切り出された切出画像毎に、陰影有無の判定処理を行う陰影有無判定ステップと、前記陰影有無判定ステップにおいて陰影が有ると判定された切出画像から陰影を除去する陰影除去ステップと、前記陰影除去ステップにおいて陰影が除去された切出画像から顔を検出する顔検出ステップとを実行させ、前記陰影有無判定ステップにおいては、コンピュータに、前記切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する明暗分類ステップと、前記明暗分類ステップにおいて明暗分類された領域の面積を比較することにより前記切出画像内に陰影があるか否かを判定する面積比較ステップとを実行させるための顔検出プログラムを提供する。 According to a tenth aspect of the present invention, there is provided a face image input step for inputting an image including a face to a computer, and an image cutout step for cutting out an image to be detected from the image input in the face image input step. A shadow presence / absence determination step for performing a shadow presence / absence determination process for each of the cut-out images cut out in the image cutting step, and a shadow is removed from the cut-out image determined to have a shadow in the shadow presence / absence determination step. A shadow removal step and a face detection step of detecting a face from the cut image from which the shadow has been removed in the shadow removal step, and in the shadow presence / absence determination step, the computer determines the brightness of the cut image. A light / dark classification step for classifying the light area into a relatively bright light area and a relatively dark area, and the light / dark classification in the light / dark classification step. Providing face detection program for executing the area comparison step determines whether there is a shadow in the clipped images by comparing the area of the region.

本発明によれば、顔検出装置は、入力された画像から顔検出対象となる画像を切り出し、切出画像毎に陰影有無の判定処理を行い、陰影が有ると判定された切出画像から陰影を除去することにより、顔を検出する顔検出手段に入力する画像を生成するため、全体画像から陰影を除去して顔検出を行うのに比べて、誤認識が起こりにくくかつ処理時間を短縮することができる。したがって、顔に陰影が生じていたり背景が刻々と変化したりする場合にも、画像から正確かつ効率的に顔を検出することができる。   According to the present invention, the face detection device cuts out an image that is a face detection target from the input image, performs a shadow presence / absence determination process for each cut image, and performs a shadow from the cut image determined to have a shadow. Since the image to be input to the face detection means for detecting the face is generated by removing the face, erroneous recognition is less likely to occur and the processing time is shortened compared to performing face detection by removing shadows from the entire image. be able to. Therefore, even when the face is shaded or the background changes every moment, the face can be detected accurately and efficiently from the image.

以下、本発明の実施の形態を、図面を参照しながら説明する。なお、以下の説明において参照する各図では、他の図と同等部分は同一符号によって示されている。
(構成)
図1は、本発明の実施の形態に係る顔検出装置10の機能構成を示すブロック図である。同図に示すように、顔検出装置10は、顔画像入力部11、画像切出部12、陰影有無判定部13、陰影除去部14及び顔検出部15を備えている。なお、これらの機能構成は、図示せぬ顔検出装置10のCPU(Central Processing Unit)が、ROM(Read Only Memory)やハードディスク等の記憶装置に記憶されたプログラムを実行することにより顔検出装置10に実現される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings referred to in the following description, the same parts as those in the other drawings are denoted by the same reference numerals.
(Constitution)
FIG. 1 is a block diagram showing a functional configuration of a face detection apparatus 10 according to an embodiment of the present invention. As shown in the figure, the face detection apparatus 10 includes a face image input unit 11, an image cutout unit 12, a shadow presence / absence determination unit 13, a shadow removal unit 14, and a face detection unit 15. Note that these functional configurations are achieved by a CPU (Central Processing Unit) of the face detection device 10 (not shown) executing a program stored in a storage device such as a ROM (Read Only Memory) or a hard disk. To be realized.

顔画像入力部11は、例えば、車内のカメラで撮影された運転者の顔を含む画像を入力し、画像切出部12に供給する。画像切出部12は、入力された画像に探索窓を配置し、当該探索窓を走査して、顔検出対象となる画像を順次切り出す。陰影有無判定部13は、画像切出部12により切り出された切出画像毎に、陰影有無の判定を行う。陰影除去部14は、陰影有無判定部13により陰影が有ると判定された切出画像から陰影を除去する。顔検出部15は、入力された画像中の顔を画像処理により検出する。   For example, the face image input unit 11 inputs an image including a driver's face photographed by a camera in the vehicle and supplies the image to the image cutout unit 12. The image cutout unit 12 arranges a search window on the input image, scans the search window, and sequentially cuts out images to be face detection targets. The shadow presence / absence determination unit 13 determines the presence / absence of a shadow for each cut image cut out by the image cutout unit 12. The shadow removing unit 14 removes the shadow from the cut image determined to have a shadow by the shadow presence / absence determining unit 13. The face detection unit 15 detects a face in the input image by image processing.

陰影有無判定部13は、さらに、図2に示すように明暗分類機能131と面積比較機能132とを備えている。明暗分類機能131は、切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する。面積比較機能132は、明暗分類機能131により明暗分類された領域の面積を比較することにより切出画像内に陰影があるか否かを判定する。   The shade presence / absence determination unit 13 further includes a light / dark classification function 131 and an area comparison function 132 as shown in FIG. The light / dark classification function 131 classifies the cut-out image into a bright area having a relatively light brightness and a dark area having a relatively dark brightness. The area comparison function 132 determines whether or not there is a shadow in the cut image by comparing the areas of the areas classified by the light / dark classification function 131.

さらに、明暗分類機能131は、2値化機能1311とノイズ除去機能1312と、面積計算機能1313とを備えている。2値化機能1311は、切出画像内の各画素を白画素又は黒画素に置換する2値化処理を行う。ノイズ除去機能1312は、2値化機能1311により2値化された切出画像からノイズを除去する。面積計算機能1313は、ノイズ除去機能1312によりノイズが除去された切出画像について、白画素が連続して分布している明領域又は黒画素が連続して分布している暗領域を特定し、各領域毎に面積を計算する。   Further, the light / dark classification function 131 includes a binarization function 1311, a noise removal function 1312, and an area calculation function 1313. The binarization function 1311 performs binarization processing that replaces each pixel in the cut-out image with a white pixel or a black pixel. The noise removal function 1312 removes noise from the clipped image binarized by the binarization function 1311. The area calculation function 1313 specifies a bright area in which white pixels are continuously distributed or a dark area in which black pixels are continuously distributed in the cut image from which noise has been removed by the noise removal function 1312. The area is calculated for each region.

また、面積比較機能132は、占有面積判定機能1321と面積比判定機能1322とを備えている。占有面積判定機能1321は、明暗分類機能131により明暗分類がなされた領域のうち、面積が最も大きい第一の領域と、当該第一の領域よりも面積が小さくかつ当該第一の領域とは異なる明暗分類がなされている第二の領域と、を足し合わせた面積が、切出画像の面積に対して第一の所定の値以上の割合を占めるかを判定する。
面積比判定機能1322は、第二の領域に対する第一の領域の面積比が第二の所定の範囲内にあるかを判定する。
本実施の形態では、陰影有無判定部13は、第一の領域と第二の領域とを足し合わせた面積の切出画像に占める割合が第一の所定の値以上であると判定された場合、かつ、第二の領域に対する第一の領域の面積比が第二の所定の範囲内にあると判定された場合に、陰影有りと判定する。
The area comparison function 132 includes an occupied area determination function 1321 and an area ratio determination function 1322. The occupied area determination function 1321 has a first area having the largest area out of the areas classified by the light / dark classification function 131 and a smaller area than the first area and is different from the first area. It is determined whether the area obtained by adding the second region subjected to the light / dark classification occupies a ratio equal to or larger than the first predetermined value with respect to the area of the cut image.
The area ratio determination function 1322 determines whether the area ratio of the first region to the second region is within the second predetermined range.
In the present embodiment, the shadow presence / absence determination unit 13 determines that the ratio of the area obtained by adding the first region and the second region to the cut image is equal to or greater than the first predetermined value. When it is determined that the area ratio of the first region to the second region is within the second predetermined range, it is determined that there is a shadow.

(顔検出処理)
次に、図3に示すフローチャートを参照して、顔検出装置10が行う顔検出処理について説明する。
Step10では、顔画像入力部11は、運転者の撮像画像を入力し、当該画像上に顔検出のための探索窓を配置する。
Step11では、画像切出部12は、探索窓を走査して画像を切り出し、切出画像を得る。
Step12では、陰影有無判定部13は、切出画像内に陰影が存在するかどうかを判定する陰影判定処理を行う。
陰影が存在していると判定した場合にのみStep13において陰影除去部14は陰影除去処理を行う。
Step14では、陰影が存在していると判定した場合は陰影除去処理を行った上で、陰影が存在していないと判定した場合は陰影除去処理を行わずに、顔検出部15が切出画像の顔検出処理を行う。
(Face detection process)
Next, face detection processing performed by the face detection apparatus 10 will be described with reference to the flowchart shown in FIG.
In Step 10, the face image input unit 11 inputs a captured image of the driver and arranges a search window for face detection on the image.
In Step 11, the image cutout unit 12 scans the search window to cut out an image and obtain a cutout image.
In Step 12, the shadow presence / absence determination unit 13 performs a shadow determination process for determining whether there is a shadow in the cut image.
Only when it is determined that there is a shadow, the shadow removal unit 14 performs a shadow removal process in Step 13.
In Step 14, when it is determined that a shadow is present, the face detection unit 15 performs a shadow removal process, and when it is determined that a shadow does not exist, the face detection unit 15 does not perform the shadow removal process. The face detection process is performed.

(陰影判定処理)
次に、本発明の特徴であるStep12の陰影判定処理について、図4に示すフローチャートを参照して詳しく説明する。
Step11で切り出した濃淡画像に対して、2値化機能1311はStep20において2値化処理を施し、明暗領域分割を行う。この例においては、2値化の方法として、画素値のヒストグラムの山と山の間の谷の底を閾値とするモード法を用いるが、その他、黒画素クラスに属する画素と白画素クラスに属する画素の分布の分離度が大きくなるように閾値を決める判別分析法や、画素値の低いところからの頻度値を積算し、あらかじめ決めておいた画素数を超えたときの画素値を閾値とするp−タイル法などを用いてもよい。
(Shading determination processing)
Next, the shadow determination process in Step 12 which is a feature of the present invention will be described in detail with reference to the flowchart shown in FIG.
The binarization function 1311 performs binarization processing in Step 20 on the grayscale image cut out in Step 11, and performs bright and dark area division. In this example, as a binarization method, a mode method in which the threshold value is the bottom of the valley between the peaks of the pixel value histogram is used. In addition, the pixels belonging to the black pixel class and the white pixel class are used. A discriminant analysis method that determines the threshold value so that the degree of separation of the pixel distribution is large, and the frequency value from a low pixel value is integrated, and the pixel value when the number of pixels exceeds a predetermined value is used as the threshold value A p-tile method or the like may be used.

その後、2値化を行った明暗領域分割画像に対してノイズ除去を行うために、Step21においてノイズ除去機能1312が収縮・膨張処理を行う。ここで、収縮処理とは、背景または背景以外の領域である穴に接する対象の画素をひとまわり剥ぎ取る処理であり、膨張処理とは、逆に、背景または穴に接する対象の画素に、画素をひとまわり加える処理である。膨張処理と収縮処理の処理順は特に限定されるものではない。なお、膨張処理と収縮処理とを同じ回数行うことで、鼻の穴等の顔の特徴部分については、膨張・収縮処理を行う前の状態で残すことが可能となる。   Thereafter, in step 21, the noise removal function 1312 performs a contraction / expansion process in order to perform noise removal on the binarized bright / dark region divided image. Here, the shrinking process is a process of removing the target pixel in contact with the hole which is the background or the area other than the background, and the expansion process is contrary to the pixel of the target in contact with the background or the hole. Is a process of adding a circle. The processing order of the expansion process and the contraction process is not particularly limited. By performing the expansion process and the contraction process the same number of times, it is possible to leave facial features such as nostrils in the state before the expansion / contraction process.

Step22では、Step21において膨張・収縮処理を施した各画素についてラベリング処理を施す。具体的には、隣接する画素値と同じ画素値を有する画素、すなわち、同じ明暗領域となる連続した連結成分を構成する画素に対して同じラベルを付け、異なる連結成分を構成する画素に異なるラベルを付ける。
Step23では、面積計算機能131は、同じラベルが付けられた連結成分で構成される連結領域の面積或いは面積に相当する画素数を計算する。
Step24では、陰影有無判定部13は、陰影有無判定に使用する白画素領域の面積Wと黒画素領域の面積Bとを求め、面積Wと面積Bを足し合わせた面積の、切出画像の面積に占める割合C1を計算する。
In Step 22, a labeling process is performed on each pixel subjected to the expansion / contraction process in Step 21. Specifically, a pixel having the same pixel value as an adjacent pixel value, that is, a pixel constituting a continuous connected component that becomes the same light and dark region is given the same label, and a different label is assigned to a pixel constituting a different connected component. Add.
In Step 23, the area calculation function 131 calculates the number of pixels corresponding to the area or area of a connected region composed of connected components with the same label.
In Step 24, the shadow presence / absence determination unit 13 obtains the area W of the white pixel region and the area B of the black pixel region used for the shadow presence / absence determination, and the area of the clipped image having an area obtained by adding the area W and the area B to each other. The ratio C1 occupying is calculated.

Step25では、占有面積判定機能1321は、白画素領域と黒画素領域とを足し合わせた領域が切出画像の大部分である(例えば、割合C1が0.9(「第1の所定の値」に対応)以上)かどうかを判定する。ここで、白画素領域と黒画素領域とを足し合わせた領域が切出画像の大部分であるという意味は、切出画像が大きな白画素領域と黒画素領域とで占められていることを示す。なお、鼻等の顔器官の検出を行う場合には、面積Wと面積Bを足し合わせた面積の切出画像の面積に占める割合が過半(例えば、割合C1が0.5以上)であってもよい。   In Step 25, the occupation area determination function 1321 has a region obtained by adding the white pixel region and the black pixel region to most of the cut-out image (for example, the ratio C1 is 0.9 (“first predetermined value”). Whether or not))). Here, the area obtained by adding the white pixel area and the black pixel area is the majority of the cut-out image. This means that the cut-out image is occupied by the large white pixel area and the black pixel area. . When detecting a facial organ such as the nose, the ratio of the area obtained by adding the area W and the area B to the area of the cut-out image is a majority (for example, the ratio C1 is 0.5 or more). Also good.

割合C1が0.9を超えている場合には、Step26において、面積Wと面積Bのうち小さい面積に対する大きい面積の比率C2を算出し、面積比判定機能1322は白画素領域と黒画素領域の面積が同程度、すなわち、例えば、比率C2が0.25から1.0までの範囲内(「第二の所定の範囲内」に対応))であるか否かを判定する。比率C2が0.25から1.0までの範囲内であれば、陰影有無判定部13は陰影有りと判定する。ここで、白画素領域と黒画素領域の面積が同程度という趣旨は、探索窓を切り出した切出画像内に明るい領域と暗い領域が同程度含まれていることを示している。明るい領域と暗い領域の面積比に大きな差がある場合には、切出画像内はほぼ均一の明るさであるものと想定されるため、陰影除去処理を施す必要はないと判断する。なお、第二の所定の範囲内は0.25から1.0までの範囲内に限定されることはなく、例えば、0.1から1.0までの範囲内であってもよい。   When the ratio C1 exceeds 0.9, the ratio C2 of the large area to the small area of the area W and the area B is calculated in Step 26, and the area ratio determining function 1322 is used for the white pixel area and the black pixel area. It is determined whether or not the areas are the same, that is, for example, the ratio C2 is within a range from 0.25 to 1.0 (corresponding to “second predetermined range”). If the ratio C2 is within the range of 0.25 to 1.0, the shadow presence / absence determining unit 13 determines that there is a shadow. Here, the fact that the areas of the white pixel region and the black pixel region are approximately the same indicates that a bright region and a dark region are included in the cut image obtained by cutting out the search window. If there is a large difference in the area ratio between the bright area and the dark area, it is assumed that the extracted image has almost uniform brightness, and it is determined that there is no need to perform the shadow removal process. The second predetermined range is not limited to the range from 0.25 to 1.0, and may be within the range from 0.1 to 1.0, for example.

(白画素領域の面積Wと黒画素領域の面積Bの求め方)
次に、図5に示すフローチャートを参照して、上記Step24における白画素領域の面積Wと黒画素領域の面積Bの求め方について詳しく説明する。
Step30においては、図4のStep22においてラベリングされStep23において面積が計算されたそれぞれの連結領域の内、最大面積の領域を判定し、その最大面積領域が白画素領域の場合にはその面積をWとし、黒画素領域の場合にはその面積をBとする。
そして、Step31において、現在処理を行っている連結領域番号として、Nに1をセットし、連結領域の面積の大きなほうからの通し番号とする。
(How to obtain the area W of the white pixel region and the area B of the black pixel region)
Next, how to obtain the area W of the white pixel region and the area B of the black pixel region in Step 24 will be described in detail with reference to the flowchart shown in FIG.
In Step 30, the area of the maximum area is determined from the connected areas labeled in Step 22 of FIG. 4 and the area is calculated in Step 23. If the maximum area is a white pixel area, the area is set to W. In the case of a black pixel region, the area is B.
Then, in Step 31, 1 is set to N as the connected area number currently being processed, and the serial number from the larger area of the connected area is set.

次に、Step32において、Nに1を加え、2番目の連結領域の処理に移る。
Step33において、面積が2番目に大きい連結領域を選定し、Step34において、その領域の画素の色(白、或いは黒)が、最大面積の連結領域の画素の色(白、或いは黒)と同じであるか異なるかを判定する。画素の色が異なる場合には、Step36において、2番目に面積が大きい連結領域が黒画素領域の場合にはその面積をBとし、白画素領域の場合にはその面積をWとする。
Next, in Step 32, 1 is added to N, and the process proceeds to the second connected region.
In Step 33, a connected region having the second largest area is selected. In Step 34, the color (white or black) of the pixel in the region is the same as the color (white or black) of the pixel in the connected region having the maximum area. Determine whether there is a difference. When the color of the pixel is different, in Step 36, the area is B when the connected area having the second largest area is the black pixel area, and the area is W when the connected area is the white pixel area.

一方、Step34において、2番目に面積が大きい連結領域の画素の色が最大面積の連結領域の画素の色と同じである場合には、Step35において、最大面積の連結領域と2番目に面積が大きい連結領域とが同じ白画素領域の場合には、2番目に面積が大きい連結領域の面積を面積Wに加え、最大面積の連結領域と2番目に面積が大きい連結領域とが同じ黒画素領域の場合には、2番目に面積が大きい連結領域の面積を面積Bに加える。そして、Step32に戻り、連結領域番号Nに1を加え、Nを3として、Step33において3番目に面積が大きい連結領域を判定し、Step34において同様の処理を繰り返す。   On the other hand, in Step 34, when the color of the pixel of the connection area having the second largest area is the same as the color of the pixel of the connection area having the largest area, in Step 35, the color of the second area is the second largest. When the connected region is the same white pixel region, the area of the connected region having the second largest area is added to the area W, and the connected region having the largest area and the connected region having the second largest area are the same in the black pixel region. In this case, the area of the connection region having the second largest area is added to the area B. Then, returning to Step 32, 1 is added to the connected region number N, N is set to 3, a connected region having the third largest area is determined at Step 33, and the same processing is repeated at Step 34.

以上のように、面積の大きな連結領域から順番に判定を行い、白画素領域と黒画素領域が共に揃った時点の面積W及び面積Bが、図4のStep24〜Step27における白画素領域の面積W及び黒画素領域の面積Bとして用いられ、白画素領域の面積Wと黒画素領域の面積Bとの合計面積の切出画像全体に占める割合、及び白画素領域の面積Wと黒画素領域の面積Bとの面積比に基づいて、陰影有無の判定が実施される。   As described above, the determination is performed in order from the connected area having the larger area, and the area W and the area B at the time when the white pixel area and the black pixel area are both aligned are the area W of the white pixel area in Step 24 to Step 27 of FIG. Used as the area B of the black pixel region, the ratio of the total area of the area W of the white pixel region and the area B of the black pixel region to the entire cut-out image, and the area W of the white pixel region and the area of the black pixel region Based on the area ratio with B, the presence / absence of a shadow is determined.

(陰影除去処理)
次に、図6を参照して、陰影除去部14が行う陰影除去処理について説明する。陰影除去部14は、入力画像全体を走査し、切り出した切出画像ごとの陰影有無判定により、陰影が存在すると判定された切出画像に対して陰影除去処理を実施する。ここでは陰影除去処理の一例として、公知の局所正規化法による陰影除去処理について述べる。
まず、切出画像の画素に対してローパス・フィルターを適応し、スムージングを行った画像を用意し(Step41)、切出画像からそのスムージング画像を差し引いて差分画像を生成する。次に、その差分画像の各画素値を2乗し(Step42)、その2乗画素値の画像に対してローパス・フィルター処理によるスムージングを実施する(Step43)。その後、各画素値に対して平方根をとった画像を用意し(Step44)、当該画像で差分画像を割ることで(Step45)、陰影除去処理を実施する。
(Shading removal processing)
Next, the shadow removal process performed by the shadow removal unit 14 will be described with reference to FIG. The shadow removal unit 14 scans the entire input image, and performs a shadow removal process on the cut-out image that is determined to have a shadow by the shadow presence / absence determination for each cut-out cut-out image. Here, as an example of the shadow removal process, a shadow removal process by a known local normalization method will be described.
First, a low-pass filter is applied to the pixels of the cutout image to prepare a smoothed image (Step 41), and the difference image is generated by subtracting the smoothed image from the cutout image. Next, each pixel value of the difference image is squared (Step 42), and smoothing by low-pass filter processing is performed on the image of the square pixel value (Step 43). Thereafter, an image having a square root with respect to each pixel value is prepared (Step 44), and the difference image is divided by the image (Step 45) to perform the shadow removal process.

以上の陰影有無判定処理と陰影除去処理について、具体的な処理画像の例を用いて説明する。
図7に、本発明において課題としている典型的な車両運転者の顔面上に陰影がかかった撮影画像の例を示す。太陽光が運転席の前方斜め上方から当たっており、運転者の顔の上半分が車体の天井、或いはサンバイザーの陰になっており、また顔の右半分が車体のピラーの陰になっている。このように運転者の顔面に車両構造物によって非常に強い陰影が生じている撮影画像に対して顔検出を行う場合の探索窓ごとの陰影有無判定処理と陰影除去処理を例として示す。
The above-described shadow presence / absence determination process and shadow removal process will be described using specific examples of processed images.
FIG. 7 shows an example of a photographed image in which a shadow is applied on the face of a typical vehicle driver as a problem in the present invention. Sunlight is shining from the upper front of the driver's seat, the upper half of the driver's face is behind the ceiling of the car or sun visor, and the right half of the face is behind the car's pillar. Yes. An example of shadow presence / absence determination processing and shadow removal processing for each search window in the case where face detection is performed on a captured image in which a very strong shadow is generated on the driver's face by the vehicle structure will be described as an example.

図3のStep10で入力された図7の撮影画像に対して、図3のStep11の顔検出用の探索窓の走査を実施する。そして、顔検出に有害な陰影存在領域に限定した陰影除去処理を行うための探索窓ごとの陰影有無判定処理の例として、図8に示すように、白枠で示した探索窓の走査位置が運転者の顔領域にある場合と、図13に示すように、白枠で示した探索窓の走査位置が運転者の顔領域にない場合の、2つの処理画像例を示す。
図8に示す探索窓の走査位置が運転者の顔領域にある場合の、探索窓の切出画像を図9に示す。また、図13に示す探索窓の走査位置が運転者の顔領域にない場合の、探索窓の切出画像を図14に示す。
Scanning of the search window for face detection in Step 11 in FIG. 3 is performed on the captured image in FIG. 7 input in Step 10 in FIG. As an example of the shadow presence / absence determination process for each search window for performing a shadow removal process limited to a shadow existing area harmful to face detection, as shown in FIG. 8, the scan window scan position indicated by a white frame is Two processing image examples are shown in the case of the driver's face area and in the case where the scanning position of the search window indicated by the white frame is not in the driver's face area as shown in FIG.
FIG. 9 shows a cut-out image of the search window when the scanning position of the search window shown in FIG. 8 is in the driver's face area. FIG. 14 shows a cut-out image of the search window when the search position of the search window shown in FIG. 13 is not in the driver's face area.

そして、この切出画像に対して、図4のStep20における2値化による明暗領域分割を実施した画像を図10と図15のそれぞれに示す。図10と図15に示すように、一般的に2値化による明暗領域分割では、光環境の影響によるノイズが生じる。
この図10と図15に示されるような2値化ノイズを除去する目的で、図4のStep21における収縮・膨張処理によるノイズ除去を実施し、図11と図16に示す2値化ノイズを除去したぞれぞれの画像を得る。
10 and FIG. 15 show images obtained by performing bright and dark area division by binarization in Step 20 of FIG. 4 on this cut image. As shown in FIGS. 10 and 15, generally, in the bright and dark area division by binarization, noise is generated due to the influence of the light environment.
For the purpose of removing the binarized noise as shown in FIG. 10 and FIG. 15, noise removal by the contraction / expansion process in Step 21 of FIG. 4 is performed, and the binarized noise shown in FIG. 11 and FIG. 16 is removed. Get each image.

この図11と図16に示す画像に対して、図4のStep22における連結領域のラベリング処理を行い、図12及び図17のそれぞれに示すようなラベル付けを行う。なお、図12及び図17中の丸数字は、同数字が付けられたラベルを意味する。図12の場合には、最も大きな連結領域として陰影がかかった黒画素領域がラベル1となり、次に大きな連結領域として顔面の白画素領域がラベル2となり、その次に大きな連結領域として鼻の穴の黒画素領域がラベル3となり、その次に大きな連結領域として首の明るい部分の白画素領域がラベル4となる。図17の場合には、最も大きな連結領域として陰影がかかった黒画素領域がラベル1となり、次に大きな連結領域として顔面の白画素領域がラベル2となり、その次に大きな連結領域として鼻の穴の黒画素領域がラベル3となる。   The images shown in FIGS. 11 and 16 are labeled as shown in FIGS. 12 and 17 by performing a connection area labeling process in Step 22 of FIG. Note that the circled numbers in FIGS. 12 and 17 mean labels with the same numbers. In the case of FIG. 12, the shaded black pixel area is the label 1 as the largest connected area, the white pixel area of the face is the label 2 as the next largest connected area, and the nose hole as the next largest connected area. The black pixel area is labeled 3, and the white pixel area of the bright neck is the label 4 as the next largest connected area. In the case of FIG. 17, the black pixel area shaded as the largest connected area is labeled 1, the white pixel area of the face is labeled 2 as the next largest connected area, and the nose hole is the next largest connected area. The black pixel area is labeled 3.

そして、図12と図17のそれぞれに示したようなラベル付けされた連結領域に対して、図5で示した処理フローに従い、図9と図14のそれぞれの切出画像における白画素領域の面積Wと黒画素領域の面積Bを求める。
図9の切出画像の場合には、図12に示すように、白画素領域がラベル2の連結領域となり、黒画素領域がラベル1の連結領域となり、その和の切出画像全体に占める割合が0.99となり、また白画素領域と黒画素領域の比が0.30となるため、陰影除去処理をすべき陰影が存在すると判定される。そして、図9に示す切出画像に対して、一例として図6に示した陰影除去処理(図3のStep13)が実施され、図18(b)に示すような陰影除去処理画像を得る。そして、この図18に示す陰影除去処理画像を用いて、図3のStep14における顔検出が実施される。
Then, according to the processing flow shown in FIG. 5 for the labeled connected areas as shown in FIGS. 12 and 17, the area of the white pixel area in each of the cut-out images in FIGS. 9 and 14. W and the area B of the black pixel region are obtained.
In the case of the cutout image of FIG. 9, as shown in FIG. 12, the white pixel area becomes the connected area of the label 2 and the black pixel area becomes the connected area of the label 1, and the ratio of the sum to the entire cutout image Is 0.99, and the ratio of the white pixel area to the black pixel area is 0.30, so that it is determined that there is a shadow to be subjected to the shadow removal process. Then, as an example, the shadow removal processing (Step 13 in FIG. 3) shown in FIG. 6 is performed on the cut-out image shown in FIG. 9, and a shadow removal processing image as shown in FIG. 18B is obtained. Then, the face detection in Step 14 of FIG. 3 is performed using the shadow removal processing image shown in FIG.

一方、図14に示す切出画像の場合には、図17に示すように、白画素領域がラベル2の連結領域となり、黒画素領域がラベル1の連結領域となり、その和が切出画像全体に占める割合が0.97となり、また白画素領域と黒画素領域の比が0.04となるため、陰影除去処理をすべき陰影が存在しないと判定され、図3のStep13における陰影除去処理は行われず、図14に示す切出画像のまま、図3のStep14の顔検出処理が実施される。   On the other hand, in the case of the cutout image shown in FIG. 14, as shown in FIG. 17, the white pixel area becomes the connected area of the label 2, the black pixel area becomes the connected area of the label 1, and the sum is the entire cutout image. 3 is 0.97, and the ratio of the white pixel area to the black pixel area is 0.04. Therefore, it is determined that there is no shadow to be subjected to the shadow removal process, and the shadow removal process in Step 13 of FIG. The face detection process in Step 14 of FIG. 3 is performed with the cut image shown in FIG. 14 being not performed.

以上説明したように、顔検出装置10は、撮影された画像に対して探索窓を走査し画像を切り出し、その走査切り出しを行った切出画像毎に、顔或いは顔器官の検出に有害な陰影有無判定を行い、除去すべき陰影が存在する切出画像に対してのみ陰影除去処理を行うことにより、従来のように撮影画像全体に対して陰影除去処理を実施するのではなく、顔或いは顔器官の検出に有害な陰影存在領域に限定して陰影除去処理を実施するものである。そのため、例えば、車両運転手の刻々と変化する背景画像の影響を受けることなく、正確かつ効率的に顔領域の陰影除去を行い、顔検出を行うことができる。   As described above, the face detection device 10 scans a search window with respect to a captured image to cut out an image, and for each cut-out image that has been subjected to the scan cut-out, a shadow that is harmful to face or face organ detection. By performing the presence / absence determination and performing the shadow removal process only on the cutout image having the shadow to be removed, the shadow or the face removal is not performed on the entire captured image as in the past. The shadow removal process is performed only in the shadow existing area harmful to the detection of the organ. Therefore, for example, it is possible to accurately and efficiently remove the shadow of the face area and perform face detection without being affected by the background image that changes every moment of the vehicle driver.

本発明は、車内の運転者等の顔に陰影が生じ背景が刻々と変化する環境において、顔の撮像画像から陰影を効率的かつ正確に除去して顔検出を行う顔検出装置に利用することができる。   INDUSTRIAL APPLICABILITY The present invention is used for a face detection device that detects a face by efficiently and accurately removing a shadow from a captured image of a face in an environment in which a shadow is generated on the face of a driver or the like in a vehicle and the background changes every moment Can do.

本発明の実施の形態に係る顔検出装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the face detection apparatus which concerns on embodiment of this invention. 同実施の形態に係る顔検出装置の陰影有無判定部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the shadow presence determination part of the face detection apparatus which concerns on the embodiment. 同実施の形態に係る顔検出装置が行う顔検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the face detection process which the face detection apparatus which concerns on the embodiment performs. 同実施の形態に係る陰影有無判定部が行う陰影判定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the shadow determination process which the shadow presence determination part which concerns on the embodiment performs. 同実施の形態に係る白画素領域の面積と黒画素領域の面積の求め方を示すフローチャートである。It is a flowchart which shows how to obtain | require the area of a white pixel area | region and the area of a black pixel area | region which concerns on the embodiment. 同実施の形態に係る陰影除去部が行う陰影除去処理を示すフローチャートである。It is a flowchart which shows the shadow removal process which the shadow removal part which concerns on the embodiment performs. 顔面上の陰影例を示す図である。It is a figure which shows the example of a shadow on the face. 探索窓の走査位置が運転者の顔領域にある場合の一例を示す図である。It is a figure which shows an example in case the scanning position of a search window exists in a driver | operator's face area. 図8に示す探索窓の切出画像を示す図である。It is a figure which shows the cutout image of the search window shown in FIG. 図9に示す切出画像の2値化による明暗領域分割処理画像を示す図である。FIG. 10 is a diagram illustrating a light / dark region division processing image obtained by binarizing the cut image illustrated in FIG. 9. 図10に示す画像の収縮・膨張処理によるノイズ除去処理画像を示す図である。It is a figure which shows the noise removal process image by the shrinkage | contraction / expansion process of the image shown in FIG. 図11に示す画像の連結領域へのラベリングの一例を示す図である。It is a figure which shows an example of the labeling to the connection area | region of the image shown in FIG. 探索窓の走査位置が運転者の顔領域にない場合の一例を示す図である。It is a figure which shows an example when the scanning position of a search window does not exist in a driver | operator's face area. 図13に示す探索窓の切出画像を示す図である。It is a figure which shows the cutout image of the search window shown in FIG. 図14に示す切出画像の2値化による明暗領域分割処理画像を示す図である。It is a figure which shows the brightness-and-darkness area | region division processing image by binarization of the cut-out image shown in FIG. 図15に示す画像の収縮・膨張処理によるノイズ除去処理画像を示す図である。It is a figure which shows the noise removal process image by the shrinkage | contraction / expansion process of the image shown in FIG. 図16に示す画像の連結領域へのラベリングの一例を示す図である。It is a figure which shows an example of the labeling to the connection area | region of the image shown in FIG. (a)は切出画像であり、(b)は(a)の切出画像に対する陰影除去処理実施後の陰影除去処理画像である。(A) is a clipped image, and (b) is a shadow removal processed image after the shadow removal processing is performed on the clipped image of (a).

符号の説明Explanation of symbols

10 顔検出装置
11 顔画像入力部
12 画像切出部
13 陰影有無判定部
14 陰影除去部
15 顔検出部
104 陰影除去部
131 明暗分類機能
131 面積計算機能
132 面積比較機能
1311 2値化機能
1312 ノイズ除去機能
1313 面積計算機能
1321 占有面積判定機能
1322 面積比判定機能
DESCRIPTION OF SYMBOLS 10 Face detection apparatus 11 Face image input part 12 Image extraction part 13 Shadow presence determination part 14 Shadow removal part 15 Face detection part 104 Shadow removal part 131 Light / dark classification function 131 Area calculation function 132 Area comparison function 1311 Binarization function 1312 Noise Removal function 1313 Area calculation function 1321 Occupied area determination function 1322 Area ratio determination function

Claims (10)

顔を含む画像を入力する顔画像入力手段と、前記顔画像入力手段により入力された画像から陰影を除去する陰影除去手段と、入力された画像から顔を検出する顔検出手段とを備えた顔検出装置において、
前記顔画像入力手段により入力された画像から顔検出の対象となる画像を切り出す画像切出手段と、
前記画像切出手段により切り出された切出画像毎に、前記陰影除去手段により除去されるべき陰影があるか否かの判定を行う陰影有無判定手段と
を備え
前記陰影有無判定手段は、
前記切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する明暗分類手段と、
前記明暗分類手段により明暗分類された領域の面積を比較することにより前記切出画像内に陰影があるか否かを判定する面積比較手段とを備えることを特徴とする顔検出装置。
A face comprising face image input means for inputting an image including a face, shadow removal means for removing a shadow from the image input by the face image input means, and face detection means for detecting a face from the input image In the detection device,
Image cutout means for cutting out an image to be subjected to face detection from the image input by the face image input means;
A shadow presence / absence determining means for determining whether or not there is a shadow to be removed by the shadow removing means for each of the cut images cut out by the image cutting means ,
The shade presence determination means
A light / dark classification means for classifying the cut-out image into a light area and a dark area having a relatively light brightness;
A face detection apparatus comprising: an area comparison unit that determines whether or not there is a shadow in the cut image by comparing areas of regions classified by the light / dark classification unit.
前記明暗分類手段は、The light / dark classification means includes:
前記切出画像内の各画素を白画素又は黒画素に置換する2値化処理を行う2値化手段と、Binarization means for performing binarization processing for replacing each pixel in the cut-out image with a white pixel or a black pixel;
前記2値化手段により2値化処理が行われた切出画像からノイズを除去するノイズ除去手段と、Noise removing means for removing noise from the clipped image that has been binarized by the binarizing means;
前記ノイズ除去手段によりノイズが除去された切出画像について、白画素が連続して分布している明領域又は黒画素が連続して分布している暗領域を特定し、各領域毎に面積を計算する面積算出手段とを備えることを特徴とする請求項1に記載の顔検出装置。For the cut image from which noise has been removed by the noise removing means, a bright region in which white pixels are continuously distributed or a dark region in which black pixels are continuously distributed is specified, and an area is determined for each region. The face detection apparatus according to claim 1, further comprising an area calculation unit for calculating.
前記面積比較手段は、The area comparing means includes
前記明暗分類手段により明暗分類がなされた領域のうち、面積が最も大きい第一の領域と、該第一の領域よりも面積が小さくかつ該第一の領域とは異なる明暗分類がなされた第二の領域と、を足し合わせた面積が、前記切出画像の面積に対して第一の所定の値以上の割合を占めるかを判定する占有面積判定手段と、Of the areas classified by the light / dark classification means, the first area having the largest area and the second area having a smaller area than the first area and a light / dark classification different from the first area. Occupying area determination means for determining whether the area obtained by adding together the area of occupies a ratio equal to or greater than a first predetermined value with respect to the area of the cut image;
前記第二の領域に対する前記第一の領域の面積比が第二の所定の範囲内にあるかを判定する面積比判定手段とを備えることを特徴とする請求項1に記載の顔検出装置。The face detection apparatus according to claim 1, further comprising an area ratio determination unit that determines whether an area ratio of the first region to the second region is within a second predetermined range.
前記第一の所定の値が0.5以上であることを特徴とする請求項3に記載の顔検出装置。The face detection apparatus according to claim 3, wherein the first predetermined value is 0.5 or more. 前記第二の所定の範囲が0.1から1.0までの範囲であることを特徴とする請求項3に記載の顔検出装置。The face detection apparatus according to claim 3, wherein the second predetermined range is a range from 0.1 to 1.0. 前記陰影有無判定手段は、前記占有面積判定手段によって前記第一の領域と前記第二の領域とを足し合わせた面積の前記切出画像に占める割合が前記第一の所定の値以上であると判定された場合、かつ、前記面積比判定手段によって前記第二の領域に対する前記第一の領域の面積比が第二の所定の範囲内にあると判定された場合に、陰影有りと判定することを特徴とする請求項3から5の何れか1項に記載の顔検出装置。The shadow presence / absence determining means has a ratio of the area obtained by adding the first area and the second area to the cut-out image by the occupied area determining means is equal to or greater than the first predetermined value. When it is determined, and when the area ratio determining means determines that the area ratio of the first region to the second region is within a second predetermined range, it is determined that there is a shadow. The face detection device according to claim 3, wherein: 前記顔画像入力手段は、車両の運転者の顔を含む画像を入力することを特徴とする請求項1から6の何れか1項に記載の顔検出装置。The face detection apparatus according to claim 1, wherein the face image input unit inputs an image including a face of a driver of the vehicle. 請求項1から6の何れか1項に記載の顔検出装置を備えることを特徴とする車両。A vehicle comprising the face detection device according to any one of claims 1 to 6. 顔を含む画像を入力する顔画像入力ステップと、
前記顔画像入力ステップにおいて入力された画像から顔検出の対象となる画像を切り出す画像切出ステップと、
前記画像切出ステップにおいて切り出された切出画像毎に、陰影有無の判定を行う陰影有無判定ステップと、
前記陰影有無判定ステップにおいて切出画像に陰影が有ると判定された場合に、該切出画像から陰影を除去する陰影除去ステップと、
前記陰影有無判定ステップにおいて陰影が有ると判定された場合は前記陰影除去ステップにおいて陰影が除去された切出画像から顔を検出し、前記陰影有無判定ステップにおいて陰影が無いと判定された場合は陰影が除去されていない切出画像から顔を検出する顔検出ステップとを有し、
前記陰影有無判定ステップは、
前記切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する明暗分類ステップと、
前記明暗分類ステップにおいて明暗分類された領域の面積を比較することにより前記切出画像内に陰影があるか否かを判定する面積比較ステップとを有することを特徴とする顔検出方法。
A face image input step for inputting an image including a face;
An image cutout step of cutting out an image to be face-detected from the image input in the face image input step;
A shadow presence / absence determination step for determining the presence / absence of a shadow for each cut image cut out in the image cutting step
A shadow removal step of removing a shadow from the cut image when it is determined that the cut image has a shadow in the shadow presence determination step;
When it is determined that there is a shadow in the shadow presence / absence determination step, a face is detected from the cut image from which the shadow is removed in the shadow removal step, and when it is determined that there is no shadow in the shadow presence / absence determination step And a face detection step for detecting a face from the cut-out image from which the image is not removed,
The shadow presence determination step includes
A light / dark classification step for classifying the cut-out image into a light area having relatively lightness and a dark area having relatively darkness;
A face detection method comprising: an area comparison step of determining whether or not there is a shadow in the cut-out image by comparing areas of regions classified in the light / dark classification step .
コンピュータに、
顔を含む画像を入力する顔画像入力ステップと、
前記顔画像入力ステップにおいて入力された画像から顔検出の対象となる画像を切り出す画像切出ステップと、
前記画像切出ステップにおいて切り出された切出画像毎に、陰影有無の判定処理を行う陰影有無判定ステップと、
前記陰影有無判定ステップにおいて陰影が有ると判定された切出画像から陰影を除去する陰影除去ステップと、
前記陰影除去ステップにおいて陰影が除去された切出画像から顔を検出する顔検出ステップとを実行させ
前記陰影有無判定ステップにおいては、コンピュータに、
前記切出画像を、明度が比較的明るい明領域と比較的暗い暗領域とに分類する明暗分類ステップと、
前記明暗分類ステップにおいて明暗分類された領域の面積を比較することにより前記切出画像内に陰影があるか否かを判定する面積比較ステップとを実行させるための顔検出プログラム。
On the computer,
A face image input step for inputting an image including a face;
An image cutout step of cutting out an image to be face-detected from the image input in the face image input step;
A shadow presence / absence determination step for performing a shadow presence / absence determination process for each cut image cut out in the image cutting step;
A shadow removal step of removing a shadow from the cut image determined to have a shadow in the shadow presence determination step;
A face detection step of detecting a face from the cut image from which the shadow has been removed in the shadow removal step ,
In the shadow presence determination step, the computer
A light / dark classification step for classifying the cut-out image into a light area having relatively lightness and a dark area having relatively darkness;
A face detection program for executing an area comparison step of determining whether or not there is a shadow in the cut-out image by comparing the areas of the regions classified in the light / dark classification step .
JP2007328784A 2007-12-20 2007-12-20 Face detection device, face detection method, and face detection program Expired - Fee Related JP4676978B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007328784A JP4676978B2 (en) 2007-12-20 2007-12-20 Face detection device, face detection method, and face detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007328784A JP4676978B2 (en) 2007-12-20 2007-12-20 Face detection device, face detection method, and face detection program

Publications (2)

Publication Number Publication Date
JP2009151539A JP2009151539A (en) 2009-07-09
JP4676978B2 true JP4676978B2 (en) 2011-04-27

Family

ID=40920632

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007328784A Expired - Fee Related JP4676978B2 (en) 2007-12-20 2007-12-20 Face detection device, face detection method, and face detection program

Country Status (1)

Country Link
JP (1) JP4676978B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011078041A (en) * 2009-10-02 2011-04-14 Sanyo Electric Co Ltd Image processing apparatus and electronic camera
JP5528172B2 (en) * 2010-03-30 2014-06-25 セコム株式会社 Face image processing device
EP2590140A1 (en) 2011-09-05 2013-05-08 Morpho, Inc. Facial authentication system, facial authentication method, and facial authentication program
JP5840431B2 (en) * 2011-09-15 2016-01-06 株式会社ミツトヨ Hardness tester and hardness test method
JP5826611B2 (en) * 2011-11-17 2015-12-02 株式会社ミツトヨ Hardness tester and hardness test method
KR101821650B1 (en) * 2016-07-25 2018-01-24 한양대학교 에리카산학협력단 Image processing apparatus and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007072814A (en) * 2005-09-07 2007-03-22 Toshiba Corp Image processor and its method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007072814A (en) * 2005-09-07 2007-03-22 Toshiba Corp Image processor and its method

Also Published As

Publication number Publication date
JP2009151539A (en) 2009-07-09

Similar Documents

Publication Publication Date Title
US7639878B2 (en) Shadow detection in images
US8102417B2 (en) Eye closure recognition system and method
KR101717613B1 (en) The moving vehicle detection system using an object tracking algorithm based on edge information, and method thereof
CA2775757C (en) Method of processing body inspection image and body inspection apparatus
JP4676978B2 (en) Face detection device, face detection method, and face detection program
CN101593276B (en) Video OCR image-text separation method and system
US8599257B2 (en) Vehicle detection device, vehicle detection method, and vehicle detection program
CN105488492B (en) A kind of color image preprocess method, roads recognition method and relevant apparatus
US9965695B1 (en) Document image binarization method based on content type separation
KR101498975B1 (en) Lane Departure Warning System
US7720281B2 (en) Visual characteristics-based news anchorperson segment detection method
JP4674179B2 (en) Shadow recognition method and shadow boundary extraction method
Gilly et al. A survey on license plate recognition systems
JP4864043B2 (en) Image processing apparatus, method, and program
US20230206659A1 (en) Method for extracting characters from vehicle license plate, and license plate character extraction device for performing method
KR101574874B1 (en) Method and apparatus for character segmentation of license plate
CN114596329A (en) Gas image enhancement and gas leakage detection method and system
Lee et al. Traffic light detection and recognition based on Haar-like features
KR101523765B1 (en) Enhanced Method for Detecting Iris from Smartphone Images in Real-Time
JP5732217B2 (en) Image binarization method and image binarization apparatus
CN110321828B (en) Front vehicle detection method based on binocular camera and vehicle bottom shadow
JP2009277001A (en) Image processor
JP2007257242A (en) White line recognition device
JP4253265B2 (en) Shadow detection apparatus, shadow detection method and shadow detection program, image processing apparatus using shadow detection apparatus, image processing method using shadow detection method, and image processing program using shadow detection program
KR101705876B1 (en) Method for detecting pedestrian candidate and method for recognizing pedestrian using the same

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101012

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101210

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

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

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

Free format text: PAYMENT UNTIL: 20140204

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4676978

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees