JP2010219862A - Face detection device, and imaging apparatus - Google Patents

Face detection device, and imaging apparatus Download PDF

Info

Publication number
JP2010219862A
JP2010219862A JP2009064078A JP2009064078A JP2010219862A JP 2010219862 A JP2010219862 A JP 2010219862A JP 2009064078 A JP2009064078 A JP 2009064078A JP 2009064078 A JP2009064078 A JP 2009064078A JP 2010219862 A JP2010219862 A JP 2010219862A
Authority
JP
Japan
Prior art keywords
image
face
area
face detection
moving object
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.)
Pending
Application number
JP2009064078A
Other languages
Japanese (ja)
Inventor
Junichi Fujita
潤一 藤田
Shingo Kanazawa
伸吾 金沢
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.)
Konica Minolta Opto Inc
Original Assignee
Konica Minolta Opto Inc
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 Konica Minolta Opto Inc filed Critical Konica Minolta Opto Inc
Priority to JP2009064078A priority Critical patent/JP2010219862A/en
Publication of JP2010219862A publication Critical patent/JP2010219862A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately detect the face of an imaged person under backlight. <P>SOLUTION: An imaging apparatus 2 includes a face detection section 41 which detects a moving body from an image imaged by an imaging section 10, calculates an extent of backlight based on luminance information of a moving body area including the detected moving body, determines an offset value for binarization processing corresponding to the calculated extent of backlight, binarizes the image based on the determined offset value, and detects the face of a person of a subject from the binarized image. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、撮像画像から顔を検出する顔検出装置及び撮像装置に関する。   The present invention relates to a face detection apparatus and an imaging apparatus that detect a face from a captured image.

従来、デジタルカメラにおいて、人物を撮像し、撮像した画像中から人物の顔を検出する技術が知られている。また、撮像した画像中から人物の顔を検出し、この検出した顔のエリアの輝度に応じて、人物の顔が適正露出になるよう自動露出制御を行って人物撮影を行うデジタルカメラが知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, a technique for capturing a person in a digital camera and detecting a person's face from the captured image is known. Also known is a digital camera that detects a person's face from the captured image and performs person exposure by performing automatic exposure control so that the person's face is properly exposed according to the brightness of the detected face area. (For example, refer to Patent Document 1).

特開2003−107555号公報JP 2003-107555 A

しかし、従来の顔の検出を利用した露出制御を行う構成では、撮像画像から人物の顔のパターンの検出が困難な逆光時において、人物の顔の検出がうまくできないおそれがあった。このため、逆光時には、人物の顔検出を利用した自動露出制御もうまくできないおそれがあった。   However, in a configuration in which exposure control using conventional face detection is performed, there is a possibility that the detection of a person's face may not be performed well in the backlight when it is difficult to detect the pattern of the person's face from the captured image. For this reason, at the time of backlighting, there is a possibility that automatic exposure control using human face detection cannot be performed well.

本発明の課題は、逆光下においても、撮像した人物の顔を適切に検出することである。   An object of the present invention is to appropriately detect the face of an imaged person even under backlight.

上記課題を解決するため、請求項1に記載の発明の顔検出装置は、
撮像された画像から動体を検出し、当該検出した動体を含む動体エリアの輝度情報に基づいて逆光の度合いを算出し、当該算出した逆光の度合いに応じた2値化処理用のオフセット値を決定し、当該決定したオフセット値に基づいて前記画像を2値化し、当該2値化された画像から被写体の人物の顔を検出する顔検出部を備える。
In order to solve the above-described problem, a face detection device according to claim 1 is provided.
A moving object is detected from the captured image, a backlight level is calculated based on luminance information of a moving object area including the detected moving object, and an offset value for binarization processing is determined according to the calculated backlight level. Then, the image processing apparatus includes a face detection unit that binarizes the image based on the determined offset value and detects the face of the subject person from the binarized image.

請求項2に記載の発明は、請求項1に記載の顔検出装置において、
前記顔検出部は、前記動体エリア内の前記動体が含まれない輝度評価エリアの平均輝度値と、当該動体エリア内の前記動体が含まれる輝度評価エリアの平均輝度値と、の差分値を前記逆光の度合いとして算出する。
According to a second aspect of the present invention, in the face detection device according to the first aspect,
The face detection unit calculates a difference value between an average luminance value of a luminance evaluation area that does not include the moving object in the moving object area and an average luminance value of the luminance evaluation area that includes the moving object in the moving object area. Calculated as the degree of backlight.

請求項3に記載の発明は、請求項1又は2に記載の顔検出装置において、
前記顔検出部は、前記撮像された画像の輝度評価エリアの平均輝度値と、注目画素の平均輝度値と、の差分値を算出し、当該算出した差分値と前記算出されたオフセット値とを比較し、前記差分値が当該オフセット値よりも大きい注目画素を黒画素とし、それ以外の注目画素を白画素として前記画像を2値化する。
The invention according to claim 3 is the face detection apparatus according to claim 1 or 2,
The face detection unit calculates a difference value between an average luminance value of a luminance evaluation area of the captured image and an average luminance value of a target pixel, and calculates the calculated difference value and the calculated offset value. In comparison, the pixel of interest is binarized with a pixel of interest having a difference value larger than the offset value as a black pixel and other pixels of interest as white pixels.

請求項4に記載の発明の撮像装置は、
請求項1から3のいずれか一項に記載の顔検出装置と、
前記画像を撮像する撮像部と、
前記顔検出部により顔が検出されたか否かを判別し、顔が検出された場合に、当該検出された顔のエリアの輝度情報に応じた露出制御を前記撮像部に行う自動露出制御部と、を備える。
An imaging device according to a fourth aspect of the present invention provides:
The face detection device according to any one of claims 1 to 3,
An imaging unit that captures the image;
An automatic exposure control unit that determines whether or not a face has been detected by the face detection unit, and performs exposure control on the imaging unit according to luminance information of the detected face area when a face is detected; .

本発明によれば、逆光下においても、撮像した人物の顔を適切に検出できる。   According to the present invention, it is possible to appropriately detect an image of a person's face even under backlight.

本発明に係る実施の形態の撮像装置を備える自動販売機を示す図である。It is a figure which shows a vending machine provided with the imaging device of embodiment which concerns on this invention. 撮像装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of an imaging device. 自動露出制御処理を示すフローチャートである。It is a flowchart which shows an automatic exposure control process. 画像中の動体エリアを示す図である。It is a figure which shows the moving body area in an image. 2値化処理用の注目画素及び輝度評価エリアを示す図である。It is a figure which shows the attention pixel and luminance evaluation area for a binarization process. 2値化処理用の別の注目画素及び輝度評価エリアを示す図である。It is a figure which shows another attention pixel and brightness | luminance evaluation area for a binarization process. 画像中の全エリアを示す図である。It is a figure which shows all the areas in an image. 画像中の中心エリアを示す図である。It is a figure which shows the center area in an image. 画像中の分割エリアを示す図である。It is a figure which shows the division area in an image.

添付図面を参照して本発明に係る実施の形態を詳細に説明する。なお、本発明は、図示例に限定されるものではない。   Embodiments according to the present invention will be described in detail with reference to the accompanying drawings. The present invention is not limited to the illustrated example.

先ず、図1を参照して、本実施の形態の撮像装置が使用される態様を説明する。図1に、本実施の形態の撮像装置2を備える自動販売機1を示す。   First, with reference to FIG. 1, a mode in which the imaging apparatus of the present embodiment is used will be described. FIG. 1 shows a vending machine 1 including an imaging device 2 according to the present embodiment.

図1に示すように、本実施の形態の撮像装置2は、自動販売機1に固定して設けられている。自動販売機1は、成年の年齢確認が必要な商品としてたばこを販売する自動販売機であるものとする。成年の年齢確認が必要な商品としては、酒等であってもよい。自動販売機1は、商品の顧客である人物3を撮像装置2で撮像し、撮像した画像データを画像解析して人物3の年齢認証を行い、成年であると認証された場合に、商品を販売する。   As shown in FIG. 1, the imaging device 2 of the present embodiment is fixed to a vending machine 1. The vending machine 1 is assumed to be a vending machine that sells cigarettes as a product that requires checking the age of the adult. As a product for which the age verification of the adult is necessary, alcohol or the like may be used. The vending machine 1 images the person 3 who is the customer of the product with the imaging device 2, analyzes the captured image data to perform age authentication of the person 3, and if the product is authenticated as an adult, Sell.

自動販売機1は、屋外に設置されているものとする。このため、時間帯による太陽4の位置によっては、撮像装置2により人物3が逆光下で撮像されるおそれがあるものとする。   It is assumed that the vending machine 1 is installed outdoors. For this reason, it is assumed that the person 3 may be imaged under backlight by the imaging device 2 depending on the position of the sun 4 in the time zone.

次に、図2を参照して、撮像装置2の内部構成を説明する。図2に、撮像装置2の機能構成を示す。撮像装置2は、撮像部10と、信号処理部20と、画像メモリ30と、制御部40と、を備える。   Next, the internal configuration of the imaging apparatus 2 will be described with reference to FIG. FIG. 2 shows a functional configuration of the imaging apparatus 2. The imaging device 2 includes an imaging unit 10, a signal processing unit 20, an image memory 30, and a control unit 40.

撮像部10は、被写体を撮像するデジタルムービーカメラである。撮像部10は、光学系、撮像素子、A/D(Analog to Digital)変換部等を備える。光学系は、各種レンズ、絞り機構等を備える。撮像素子は、CCD(Charge Coupled Device)、CMOS等のイメージセンサであり、光学系により結像された被写体像の光信号をアナログの電気信号に光電変換し、アナログの画像信号(RGBデータ)として出力する。RGBデータは、赤、青、緑の成分の信号で表される画像データである。また、撮像部10の絞り機構の絞り値、撮像素子の露出時間(シャッタスピード)、感度が調整されることにより撮像部10の露出が調整可能であるものとする。A/D変換部は、撮像素子から入力されるアナログの画像信号をデジタルの画像データに変換して出力する。撮像部10は、動画の1フレーム毎の画像データを生成して出力する。撮像部10の撮像スピードは、例えば、30fpsとする。   The imaging unit 10 is a digital movie camera that images a subject. The imaging unit 10 includes an optical system, an imaging device, an A / D (Analog to Digital) conversion unit, and the like. The optical system includes various lenses, a diaphragm mechanism, and the like. The image sensor is an image sensor such as a CCD (Charge Coupled Device), CMOS, etc., and photoelectrically converts the optical signal of the subject image formed by the optical system into an analog electrical signal to obtain an analog image signal (RGB data). Output. RGB data is image data represented by red, blue, and green component signals. Further, it is assumed that the exposure of the imaging unit 10 can be adjusted by adjusting the aperture value of the aperture mechanism of the imaging unit 10, the exposure time (shutter speed) of the imaging device, and the sensitivity. The A / D converter converts an analog image signal input from the image sensor into digital image data and outputs the digital image data. The imaging unit 10 generates and outputs image data for each frame of a moving image. The imaging speed of the imaging unit 10 is, for example, 30 fps.

信号処理部20は、補間処理、色処理(RGBデータからYUVデータへ変換する色差変換処理)、輝度信号処理(エッジ強調処理、ガンマ補正処理)等、各種信号処理の信号処理回路である。信号処理部20は、撮像部10から入力された画像データ(RGBデータ)に各種信号処理を施してYUVデータに変換する。YUVデータは、輝度信号Y、青色成分の色差信号U(Cb)、及び赤色成分の色差信号V(Cr)で表される画像データである。信号処理部20は、変換後のYUVデータを画像メモリ30に記憶していくとともに、認証部(図示略)に出力する。認証部は、信号処理部20から入力された画像データを画像解析し、被写体の人物の年齢認証を行う。   The signal processing unit 20 is a signal processing circuit for various signal processing such as interpolation processing, color processing (color difference conversion processing for converting RGB data into YUV data), luminance signal processing (edge enhancement processing, gamma correction processing), and the like. The signal processing unit 20 performs various types of signal processing on the image data (RGB data) input from the imaging unit 10 and converts the image data into YUV data. The YUV data is image data represented by a luminance signal Y, a blue component color difference signal U (Cb), and a red component color difference signal V (Cr). The signal processing unit 20 stores the converted YUV data in the image memory 30 and outputs it to the authentication unit (not shown). The authentication unit performs image analysis on the image data input from the signal processing unit 20 and performs age authentication of the subject person.

また、信号処理部20は、測光エリア情報(測光エリアの座標情報)が制御部40から入力されると、その座標情報をレジスタ(図示略)に記憶し、当該座標情報に対応する画像データを画像メモリ30から読み出し、前記入力された測光エリア情報に応じて、前記読み出した画像データの画像における測光エリアの輝度情報(平均輝度値)を算出して制御部40に出力する機能を有するものとする。   Further, when photometric area information (photometric area coordinate information) is input from the control unit 40, the signal processing unit 20 stores the coordinate information in a register (not shown), and stores image data corresponding to the coordinate information. It has a function of reading out from the image memory 30 and calculating luminance information (average luminance value) of the photometric area in the image of the read out image data according to the input photometric area information and outputting it to the control unit 40. To do.

画像メモリ30は、RAM(Random Access Memory)で構成され、信号処理部20から出力される1フレーム毎の画像データ(YUVデータ)を一時的に記憶する。   The image memory 30 is composed of a RAM (Random Access Memory), and temporarily stores image data (YUV data) for each frame output from the signal processing unit 20.

制御部40は、撮像装置2の各部を制御する。制御部40は、CPU(Central Processing Unit)、RAM、ROM(Read Only Memory)を有する。制御部40において、ROMに記憶されたプログラムのうち、指定されたプログラムがRAMに展開され、当該展開されたプログラムとCPUとの協働で各種処理が実行される。ROMには、自動露出制御プログラムが記憶されているものとする。制御部40は、自動露出制御プログラムに従い、機能部として、顔検出部41と、自動露出制御部42とを有する。   The control unit 40 controls each unit of the imaging device 2. The control unit 40 includes a CPU (Central Processing Unit), a RAM, and a ROM (Read Only Memory). In the control unit 40, a designated program among the programs stored in the ROM is expanded in the RAM, and various processes are executed in cooperation with the expanded program and the CPU. It is assumed that an automatic exposure control program is stored in the ROM. The control unit 40 includes a face detection unit 41 and an automatic exposure control unit 42 as functional units according to the automatic exposure control program.

顔検出部41は、撮像部10により撮像された画像データの画像から動体を検出し、当該検出した動体を含む動体エリアの輝度情報に基づいて逆光の度合いを算出し、当該算出した逆光の度合いに応じた2値化処理用のオフセット値を決定し、当該決定したオフセット値に基づいて前記画像を2値化し、当該2値化された画像から被写体の人物の顔を検出する。自動露出制御部42は、顔検出部41により顔が検出されたか否かを判別し、顔が検出された場合に、当該検出された顔のエリアの輝度情報に応じた露出制御を撮像部10に行う。   The face detection unit 41 detects a moving object from the image of the image data captured by the imaging unit 10, calculates the degree of backlight based on the luminance information of the moving object area including the detected moving object, and calculates the calculated degree of backlight An offset value for binarization processing corresponding to the image is determined, the image is binarized based on the determined offset value, and the face of the subject person is detected from the binarized image. The automatic exposure control unit 42 determines whether or not a face has been detected by the face detection unit 41. When a face is detected, the image capturing unit 10 performs exposure control according to the luminance information of the detected face area. To do.

次に、図3〜図9を参照して、撮像装置2の動作を説明する。図3に、自動露出制御処理の流れを示す。図4に、画像F中の動体エリア100を示す。図5に、2値化処理用の注目画素201及び輝度評価エリア202を示す。図6に、2値化処理用の注目画素201及び輝度評価エリア203を示す。図7に、画像F中の中心エリア301を示す。図8に、画像F中の全エリア302を示す。図9に、画像F中の分割エリア303を示す。   Next, the operation of the imaging device 2 will be described with reference to FIGS. FIG. 3 shows the flow of the automatic exposure control process. FIG. 4 shows the moving object area 100 in the image F. FIG. 5 shows a pixel of interest 201 and a luminance evaluation area 202 for binarization processing. FIG. 6 shows a pixel of interest 201 and a luminance evaluation area 203 for binarization processing. FIG. 7 shows a central area 301 in the image F. FIG. 8 shows the entire area 302 in the image F. FIG. 9 shows a divided area 303 in the image F.

撮像装置2において、例えば、電源がオン入力されたことをトリガとして、制御部40により、自動露出制御プログラムに基づく自動露出制御処理が実行される。また、電源オンをトリガとして、撮像部10及び信号処理部20により、被写体が撮像されて生成された各フレームの画像データ(YUVデータ)が、撮像順に、画像メモリ30に記憶されていくとともに、認証部へ出力されていく。   In the imaging apparatus 2, for example, the automatic exposure control process based on the automatic exposure control program is executed by the control unit 40, triggered by the power-on input. In addition, the image data (YUV data) of each frame generated by imaging the subject by the imaging unit 10 and the signal processing unit 20 with the power-on as a trigger is stored in the image memory 30 in the imaging order, and Output to the authentication unit.

図3に示すように、先ず、顔検出部41により、読み出されていない最新の1フレームの画像データを含む複数の画像データが画像メモリ30に記憶されているか否かが判別される(ステップS1)。読み出されていない最新の1フレームの画像データを含む複数の画像データが記憶されていない場合(ステップS1;NO)、ステップS1に移行される。   As shown in FIG. 3, first, the face detection unit 41 determines whether or not a plurality of image data including the latest one frame of image data that has not been read is stored in the image memory 30 (step). S1). If a plurality of image data including the latest one frame of image data that has not been read is not stored (step S1; NO), the process proceeds to step S1.

読み出されていない最新の1フレームの画像データを含む複数の画像データが記憶されている場合(ステップS1;YES)、顔検出部41により、画像メモリ30から最新の2フレーム分の画像データが読み出される(ステップS2)。ステップS2は、動体検出処理に用いる複数フレームの画像データを読み出すステップであり、3フレーム以上の画像データが読み出されることとしてもよい。   When a plurality of image data including the latest one frame of image data that has not been read is stored (step S <b> 1; YES), the face detection unit 41 obtains the latest two frames of image data from the image memory 30. Read (step S2). Step S2 is a step of reading out image data of a plurality of frames used for the moving object detection process, and image data of three frames or more may be read out.

そして、顔検出部41により、ステップS2で読み出された画像データの画像に基づいて、動体検出が行われる(ステップS3)。ステップS3では、複数のフレームの画像データにおける複数の画像間で輝度値に所定値以上の変化があるエリアが動体として検出される。ステップS3の動体検出は、公知の動体検出技術により行われる。動体としては、自動販売機1の顧客である人物が想定されている。人物によって背の高さが異なり、また撮像部10のレンズ前で人物が認証用にポーズをとる際にも、画像中の同じ位置に人物(の顔)が位置しないおそれがある。このため、画像内の動体を検出することは、後述する逆光の度合いの算出や、人物の顔検出において有効である。   Then, the moving object detection is performed by the face detection unit 41 based on the image of the image data read in step S2 (step S3). In step S <b> 3, an area in which a luminance value changes more than a predetermined value between a plurality of images in a plurality of frames of image data is detected as a moving object. The moving object detection in step S3 is performed by a known moving object detection technique. As the moving object, a person who is a customer of the vending machine 1 is assumed. The height of the person differs depending on the person, and when the person poses for authentication in front of the lens of the imaging unit 10, the person (face) may not be located at the same position in the image. For this reason, detecting a moving object in an image is effective in calculating the degree of backlight and detecting a human face, which will be described later.

そして、顔検出部41により、ステップS3で動体が検出されたか否かが判別される(ステップS4)。動体が検出されていない場合(ステップS3;NO)、ステップS1に移行される。動体が検出された場合(ステップS3;YES)、ステップS2で読み出された最新の1フレームの画像データの画像中に、ステップS3で検出された動体部分を囲むエリアに動体エリアが決定(設定)される(ステップS5)。   And it is discriminate | determined by the face detection part 41 whether the moving body was detected by step S3 (step S4). When a moving body is not detected (step S3; NO), the process proceeds to step S1. If a moving object is detected (step S3; YES), the moving object area is determined (set) in the area surrounding the moving object part detected in step S3 in the image of the latest one frame of image data read in step S2. (Step S5).

ステップS5では、例えば、図4に示すように、画像F中に動体Mが検出された場合に、動体Mを含む動体エリア100が設定される。動体エリア100には、後述する逆光の度合いの算出用の輝度評価エリア101,102,103を含む。輝度評価エリア101,102,103は、順に、動体エリア100の左上、右上(動体Mが含まれないエリア)、中央下(動体Mが含まれるエリア)に配置されている。   In step S5, for example, as shown in FIG. 4, when the moving object M is detected in the image F, the moving object area 100 including the moving object M is set. The moving object area 100 includes luminance evaluation areas 101, 102, and 103 for calculating the degree of backlight, which will be described later. The luminance evaluation areas 101, 102, and 103 are sequentially arranged at the upper left, upper right (area not including the moving object M), and lower center (area including the moving object M) of the moving object area 100.

そして、顔検出部41により、ステップS5で決定された動体エリア内において、輝度情報が算出される(ステップS6)。具体的には、動体エリア100の輝度評価エリア101,102,103それぞれの画素毎の平均輝度値が算出される。そして、ステップS6で算出された輝度情報から、動体Mが含まれない輝度評価エリア(輝度評価エリア101+輝度評価エリア102)の平均輝度値と、動体Mが含まれる輝度評価エリア(輝度評価エリア103)の平均輝度値と、の差分値が算出される(ステップS7)。ステップS7で算出された差分値は、撮像画像中の逆光の度合いを表す値である。   Then, the luminance information is calculated by the face detection unit 41 in the moving object area determined in step S5 (step S6). Specifically, the average luminance value for each pixel in the luminance evaluation areas 101, 102, 103 of the moving object area 100 is calculated. Then, from the luminance information calculated in step S6, the average luminance value of the luminance evaluation area (luminance evaluation area 101 + luminance evaluation area 102) not including the moving object M and the luminance evaluation area (luminance evaluation area 103) including the moving object M are included. ) And an average luminance value are calculated (step S7). The difference value calculated in step S7 is a value that represents the degree of backlight in the captured image.

そして、ステップS7で算出された差分値(逆光の度合い)に応じたオフセット値が設定される(ステップS8)。より具体的には、逆光の度合いが大きければ大きいほど、オフセット値が小さく設定される。オフセット値は、例えば、0〜8の9段階の値を範囲として設定されるものとする。例えば、差分値が200を超えるような場合は、逆光の度合いが非常に大きいため、オフセット値が0に設定される。また、差分値が130より小さい場合は、逆光の度合いがそれほど大きくないため、オフセット値が8に設定される。通常の照明状態程度では、オフセット値が8程度に設定される。差分値が130〜200の場合は、差分値が130〜200を9等分し、各区分に順にオフセット値が8〜0まで割り当てられ、差分値に対応する区分のオフセット値が設定される。   And the offset value according to the difference value (degree of backlight) calculated at step S7 is set (step S8). More specifically, the greater the degree of backlighting, the smaller the offset value is set. The offset value is set, for example, in a range of 9 levels from 0 to 8. For example, when the difference value exceeds 200, the offset value is set to 0 because the degree of backlighting is very large. If the difference value is smaller than 130, the offset value is set to 8 because the degree of backlighting is not so large. In the normal lighting state, the offset value is set to about 8. When the difference value is 130 to 200, the difference value is divided into nine equal parts, and the offset value is assigned to each section in order from 8 to 0, and the offset value of the section corresponding to the difference value is set.

そして、顔検出部41により、ステップS8で算出されたオフセット値を用いて、ステップS2で読み出された最新の1フレームの画像データに2値化処理が施されて2値化データが取得される(ステップS9)。   Then, the face detection unit 41 uses the offset value calculated in step S8 to perform binarization processing on the latest one frame of image data read out in step S2, thereby obtaining binarized data. (Step S9).

ステップS9では、最新の1フレームの画像データの画像において、例えば、左上の画素が注目画素として選択される。そして、選択中の注目画素の輝度値が取得され、この注目画素に対応する輝度評価エリア内の画素の平均輝度値が算出される。輝度評価エリアは、予め設定されており、例えば、図5に示すように、注目画素201の周りの環状のパターンの輝度評価エリア202が用いられる。また、図6に示すように、注目画素201の上下の矩形のパターンの輝度評価エリア203が用いられることとしてもよい。また、輝度評価エリアの形状及び画素数は、顔検出(のための目、鼻、口の抽出)に適したものであれば、他の輝度評価エリアが用いられることとしてもよい。さらに、複数の輝度評価エリアが重ね合わされる構成としてもよい。   In step S9, for example, the upper left pixel is selected as the target pixel in the image of the latest one frame of image data. Then, the luminance value of the selected target pixel is acquired, and the average luminance value of the pixels in the luminance evaluation area corresponding to the target pixel is calculated. The luminance evaluation area is set in advance. For example, as shown in FIG. 5, a luminance evaluation area 202 having an annular pattern around the target pixel 201 is used. Further, as shown in FIG. 6, a luminance evaluation area 203 having a rectangular pattern above and below the target pixel 201 may be used. In addition, as long as the shape and the number of pixels of the luminance evaluation area are suitable for face detection (extraction of eyes, nose, and mouth), other luminance evaluation areas may be used. Furthermore, a configuration in which a plurality of luminance evaluation areas are overlaid may be employed.

そして、算出された輝度評価エリアの平均輝度値と、取得された選択中の注目画素の輝度値と、の差分値が算出される。そして、算出された差分値について次式(1)が成立するか否かが判別される。
輝度評価エリアの平均輝度値−注目画素の輝度値>ステップS8で設定されたオフセット値 …(1)
Then, a difference value between the calculated average luminance value of the luminance evaluation area and the acquired luminance value of the target pixel being selected is calculated. And it is discriminate | determined whether following Formula (1) is materialized about the calculated difference value.
Average luminance value in luminance evaluation area−luminance value of target pixel> offset value set in step S8 (1)

式(1)を満たす場合、選択中の注目画素位置に黒画素が設定される。式(1)を満たさない場合、選択中の注目画素位置に白画素が設定される。そして、注目画素が右に1画素分移動されて選択され、移動後の注目画素における黒画素又は白画素の設定がなされる。注目画素を移動する際、移動前の注目画素が最も右にある場合、1列下の最も左の画素に移動される。このようにして、注目画素の移動と、黒画素又は白画素の設定とが繰り返されて、黒画素と白画素とからなる画像データである2値化データが生成される。   When Expression (1) is satisfied, a black pixel is set at the selected target pixel position. When the expression (1) is not satisfied, a white pixel is set at the selected target pixel position. Then, the pixel of interest is moved and selected by one pixel to the right, and the black pixel or the white pixel in the pixel of interest after the movement is set. When the pixel of interest is moved, if the pixel of interest before the movement is on the rightmost side, the pixel of interest is moved to the leftmost pixel below one column. In this manner, the movement of the target pixel and the setting of the black pixel or the white pixel are repeated, and binarized data that is image data including the black pixel and the white pixel is generated.

そして、ステップS8で生成された2値化データを用いて顔検出処理がなされる(ステップS10)。ステップS10の顔検出処理は、2値化データから顔エリアの検出を行う公知の顔検出技術が用いられる。顔検出方法としては、例えば、パターンマッチングにより2値化データ中の目、鼻、口を特定し、特定した目、鼻、口を含む顔(のエリア)を検出する方法がある。   Then, face detection processing is performed using the binarized data generated in step S8 (step S10). For the face detection process in step S10, a known face detection technique for detecting a face area from binarized data is used. As a face detection method, for example, there is a method of specifying an eye, nose and mouth in binarized data by pattern matching and detecting a face (area) including the specified eye, nose and mouth.

そして、自動露出制御部42により、ステップS10で顔が検出されたか否かが判別される(ステップS11)。顔が検出された場合(ステップS11;YES)、自動露出制御部42により、ステップS10で検出された顔のエリアの平均輝度値である顔エリアの輝度情報が算出される(ステップS12)。ステップS12では、例えば、ステップS10において得られた顔エリアの座標情報と、画像メモリ30に記憶されている最新の1フレームの画像データとが、信号処理部20に送出される(なお、送出された画像データは、ステップS10の処理において用いられた画像データでもよいし、撮像部10により撮像され生成された最新の画像データを用いてもよい)。信号処理部20により、入力された顔エリアの座標情報に応じて、顔エリアの輝度情報が算出されて自動露出制御部42に出力される。同様に、ステップS6でも、顔検出部41が、信号処理部20に画像データの画像の動体エリア内の輝度評価エリアの輝度情報を算出させる構成となる。   Then, the automatic exposure control unit 42 determines whether or not a face is detected in step S10 (step S11). When a face is detected (step S11; YES), the automatic exposure control unit 42 calculates face area luminance information that is an average luminance value of the face area detected in step S10 (step S12). In step S12, for example, the coordinate information of the face area obtained in step S10 and the latest one frame of image data stored in the image memory 30 are sent to the signal processing unit 20 (note that it is sent out). The image data may be the image data used in the process of step S10, or the latest image data imaged and generated by the imaging unit 10). The signal processing unit 20 calculates the luminance information of the face area according to the input coordinate information of the face area and outputs it to the automatic exposure control unit 42. Similarly, in step S6, the face detection unit 41 causes the signal processing unit 20 to calculate the luminance information of the luminance evaluation area in the moving object area of the image data.

そして、自動露出制御部42により、ステップS12で算出された顔エリアの輝度情報に応じて、撮像部10に自動露出制御が行われ(ステップS13)、ステップS1に移行される。より具体的には、自動露出制御部42により、顔エリアの輝度情報に応じて、撮像部10の絞り機構の絞り値、撮像素子の露出時間、感度が、適切な値に調整されることにより、撮像部10が適切な露出に制御される。   Then, the automatic exposure control unit 42 performs automatic exposure control on the imaging unit 10 according to the luminance information of the face area calculated in step S12 (step S13), and the process proceeds to step S1. More specifically, the automatic exposure control unit 42 adjusts the aperture value of the aperture mechanism, the exposure time of the image sensor, and the sensitivity to appropriate values according to the luminance information of the face area. The imaging unit 10 is controlled to an appropriate exposure.

顔が検出されていない場合(ステップS11;NO)、自動露出制御部42により、予め設定されたデフォルトの測光エリアの平均輝度値である測光エリアの輝度情報が算出され、算出された測光エリアの輝度情報に応じて、撮像部10に自動露出制御が行われ(ステップS14)、ステップS1に移行される。デフォルトの測光エリアは、例えば、図7に示す画像Fの中心に位置する中心エリア301、図8に示す画像Fの全エリア302、又は画像Fを分割した複数の分割エリア303中の選択されたエリアとしてもよく、他のエリアとしてもよい。また、ステップS14では、例えば、自動露出制御部42から測光エリアの座標情報及び画像データが信号処理部20に入力される。信号処理部20により、入力された測光エリアの座標情報に応じて、測光エリアの輝度情報が算出されて自動露出制御部42に出力される。   When the face is not detected (step S11; NO), the automatic exposure control unit 42 calculates the luminance information of the photometric area that is the average luminance value of the default photometric area set in advance, and the calculated photometric area Depending on the luminance information, automatic exposure control is performed on the imaging unit 10 (step S14), and the process proceeds to step S1. The default photometric area is selected from, for example, the center area 301 located at the center of the image F shown in FIG. 7, the whole area 302 of the image F shown in FIG. 8, or a plurality of divided areas 303 obtained by dividing the image F. It may be an area or another area. In step S <b> 14, for example, the coordinate information and image data of the photometric area are input from the automatic exposure control unit 42 to the signal processing unit 20. The signal processing unit 20 calculates luminance information of the photometric area according to the input coordinate information of the photometric area, and outputs it to the automatic exposure control unit 42.

以上、本実施の形態によれば、顔検出部41が、撮像部10で撮像された画像データの画像から動体を検出し、前記撮像された画像データの画像における前記検出した動体を含む動体エリア内の輝度情報に基づく逆光の度合いを算出し、当該算出した逆光の度合いに応じた2値化処理用のオフセット値を決定し、当該決定したオフセット値に基づいて、撮像された画像データの画像を2値化し、当該2値化された画像から被写体の人物の顔を検出する。このため、人物を動体エリアとして特定して逆光の度合いを適切に算出でき、逆光下においても、撮像した人物の顔を適切に検出できる。   As described above, according to the present embodiment, the face detection unit 41 detects a moving object from the image data image captured by the image capturing unit 10, and includes the detected moving object in the captured image data image. The degree of backlight based on the luminance information in the image is calculated, an offset value for binarization processing is determined according to the calculated degree of backlight, and an image of the captured image data is determined based on the determined offset value Is binarized, and the face of the subject person is detected from the binarized image. For this reason, it is possible to appropriately calculate the degree of backlighting by specifying a person as a moving body area, and it is possible to appropriately detect the face of the person who is captured even under backlighting.

また、顔検出部41は、前記撮像された画像の動体エリア100の動体Mが含まれない輝度評価エリア101,102の平均輝度値と、動体Mが含まれる輝度評価エリア103の平均輝度値と、の差分値を逆光の度合いとして算出する。このため、逆光の度合いをより正確に算出できる。   The face detection unit 41 also includes an average luminance value of the luminance evaluation areas 101 and 102 that do not include the moving object M in the moving object area 100 of the captured image, and an average luminance value of the luminance evaluation area 103 that includes the moving object M. Is calculated as the degree of backlight. For this reason, the degree of backlight can be calculated more accurately.

また、顔検出部41は、前記撮像された画像の輝度評価エリア202、203の平均輝度値と、注目画素201の平均輝度値と、の差分値を算出し、当該算出した差分値と前記算出されたオフセット値とを比較し、前記差分値が当該オフセット値よりも大きい注目画素を黒画素とし、それ以外の注目画素を白画素として2値化データを生成する。このため、逆光の度合いに応じたオフセット値を用いて、逆光下においても、適切な2値化データを生成できる。   In addition, the face detection unit 41 calculates a difference value between the average luminance value of the luminance evaluation areas 202 and 203 of the captured image and the average luminance value of the target pixel 201, and the calculated difference value and the calculation Compared with the offset value, binarized data is generated with a pixel of interest whose difference value is larger than the offset value as a black pixel and other pixels of interest as white pixels. For this reason, appropriate binarized data can be generated even under backlight using an offset value corresponding to the degree of backlight.

また、自動露出制御部42が、顔検出部41により顔が検出されたか否かを判別し、顔が検出された場合に、当該検出された顔のエリアの輝度情報に応じた露出制御を撮像部10に行う。このため、逆光下においても、適切に自動露出制御できる。   Further, the automatic exposure control unit 42 determines whether or not a face is detected by the face detection unit 41, and when a face is detected, the exposure control according to the luminance information of the detected face area is captured. To part 10. For this reason, automatic exposure control can be appropriately performed even under backlight.

なお、上記実施の形態における記述は、本発明に係る好適な顔検出装置及び撮像装置の一例であり、これに限定されるものではない。   The description in the above embodiment is an example of a suitable face detection apparatus and imaging apparatus according to the present invention, and the present invention is not limited to this.

例えば、上記実施の形態では、画像の動体エリアの輝度情報の差分値を逆光の度合いとし、当該逆光の度合いに応じて2値化のオフセット値を決定する構成としたが、これに限定されるものではない。例えば、顔検出部41により、図4の動体エリア100の輝度評価エリア101,102,103の平均輝度値がそれぞれ算出され、次式(2)且つ次式(3)を満たす否かに応じて、逆光であるか否かが判別される。
輝度評価エリア101の平均輝度値>輝度評価エリア103の平均輝度値 …(2)
輝度評価エリア102の平均輝度値>輝度評価エリア103の平均輝度値 …(3)
For example, in the above embodiment, the difference value of the luminance information of the moving object area of the image is set as the degree of backlighting, and the binarized offset value is determined according to the degree of backlighting. However, the present invention is not limited thereto. It is not a thing. For example, the face detection unit 41 calculates the average luminance values of the luminance evaluation areas 101, 102, and 103 of the moving object area 100 in FIG. 4, depending on whether or not the following expressions (2) and (3) are satisfied. Then, it is determined whether the light is backlit.
Average luminance value of luminance evaluation area 101> Average luminance value of luminance evaluation area 103 (2)
Average luminance value of luminance evaluation area 102> Average luminance value of luminance evaluation area 103 (3)

顔検出部41により、逆光であると判別された場合に、2値化処理のためのオフセット値が比較的低い値(例えば、3)に設定され、逆光でないと判別された場合に、オフセット値が比較的高い値(例えば、8)に設定されるような構成としてもよい。つまり、(輝度評価エリア101の平均輝度値−輝度評価エリア103の平均輝度値)、(輝度評価エリア102の平均輝度値−輝度評価エリア103の平均輝度値)、をそれぞれ、第1の逆光の度合い、第2の逆光の度合いとし、第1の逆光の度合い及び第2の逆光の度合いがともに0より大きい場合に、オフセット値が3に設定され、それ以外の場合に、オフセット値が8に設定される。   When the face detection unit 41 determines that the light is backlit, the offset value for binarization processing is set to a relatively low value (eg, 3), and when it is determined that the light is not backlit, the offset value May be set to a relatively high value (for example, 8). That is, (average luminance value of luminance evaluation area 101−average luminance value of luminance evaluation area 103) and (average luminance value of luminance evaluation area 102−average luminance value of luminance evaluation area 103) are respectively expressed by the first backlight. The offset value is set to 3 when the first backlight level and the second backlight level are both greater than 0. Otherwise, the offset value is set to 8. Is set.

また、上記実施の形態では、撮像装置2が自動販売機1に設けられる構成としたが、これに限定されるものではない。例えば、銀行、コンビニエンスストア等のATM(Automated Teller Machine)、所定エリアへの入場者の認証装置等、他の顔検出を行う装置に撮像装置2が設けられる構成としてもよい。   Moreover, in the said embodiment, although the imaging device 2 was set as the structure provided in the vending machine 1, it is not limited to this. For example, the imaging device 2 may be provided in another face detection device such as an ATM (Automated Teller Machine) such as a bank or a convenience store, or an authentication device for a visitor to a predetermined area.

また、上記実施の形態では、顔検出部41、自動露出制御部42が、信号処理部20に画像データの画像の特定エリアの輝度情報の算出を行わせる構成としたが、これに限定されるものではない。顔検出部41、自動露出制御部42自体が、画像データの画像の特定エリアの輝度情報を算出する構成としてもよい。   In the above embodiment, the face detection unit 41 and the automatic exposure control unit 42 are configured to cause the signal processing unit 20 to calculate the luminance information of the specific area of the image of the image data. However, the present invention is not limited to this. It is not a thing. The face detection unit 41 and the automatic exposure control unit 42 may be configured to calculate luminance information of a specific area of the image of the image data.

また、以上の実施の形態における撮像装置2を構成する各部の細部構成及び細部動作に関して本発明の趣旨を逸脱することのない範囲で適宜変更可能である。   Further, the detailed configuration and detailed operation of each part constituting the imaging device 2 in the above embodiment can be appropriately changed without departing from the spirit of the present invention.

1 自動販売機
2 撮像装置
10 撮像部
20 信号処理部
30 画像メモリ
40 制御部
41 顔検出部
42 自動露出制御部
3 人物
4 太陽
DESCRIPTION OF SYMBOLS 1 Vending machine 2 Imaging device 10 Imaging part 20 Signal processing part 30 Image memory 40 Control part 41 Face detection part 42 Automatic exposure control part 3 Person 4 Sun

Claims (4)

撮像された画像から動体を検出し、当該検出した動体を含む動体エリアの輝度情報に基づいて逆光の度合いを算出し、当該算出した逆光の度合いに応じた2値化処理用のオフセット値を決定し、当該決定したオフセット値に基づいて前記画像を2値化し、当該2値化された画像から被写体の人物の顔を検出する顔検出部を備える顔検出装置。   A moving object is detected from the captured image, a backlight level is calculated based on luminance information of a moving object area including the detected moving object, and an offset value for binarization processing according to the calculated backlight level is determined. And a face detection device including a face detection unit that binarizes the image based on the determined offset value and detects a face of a person as a subject from the binarized image. 前記顔検出部は、前記動体エリア内の前記動体が含まれない輝度評価エリアの平均輝度値と、当該動体エリア内の前記動体が含まれる輝度評価エリアの平均輝度値と、の差分値を前記逆光の度合いとして算出する請求項1に記載の顔検出装置。   The face detection unit calculates a difference value between an average luminance value of a luminance evaluation area that does not include the moving object in the moving object area and an average luminance value of the luminance evaluation area that includes the moving object in the moving object area. The face detection apparatus according to claim 1, wherein the face detection apparatus calculates the degree of backlight. 前記顔検出部は、前記撮像された画像の輝度評価エリアの平均輝度値と、注目画素の平均輝度値と、の差分値を算出し、当該算出した差分値と前記算出されたオフセット値とを比較し、前記差分値が当該オフセット値よりも大きい注目画素を黒画素とし、それ以外の注目画素を白画素として前記画像を2値化する請求項1又は2に記載の顔検出装置。   The face detection unit calculates a difference value between an average luminance value of a luminance evaluation area of the captured image and an average luminance value of a target pixel, and calculates the calculated difference value and the calculated offset value. The face detection apparatus according to claim 1 or 2, wherein the image is binarized by comparing the pixel of interest having a difference value larger than the offset value as a black pixel and the other pixel of interest as a white pixel. 請求項1から3のいずれか一項に記載の顔検出装置と、
前記画像を撮像する撮像部と、
前記顔検出部により顔が検出されたか否かを判別し、顔が検出された場合に、当該検出された顔のエリアの輝度情報に応じた露出制御を前記撮像部に行う自動露出制御部と、を備える撮像装置。
The face detection device according to any one of claims 1 to 3,
An imaging unit that captures the image;
An automatic exposure control unit that determines whether or not a face has been detected by the face detection unit, and performs exposure control on the imaging unit according to luminance information of the detected face area when a face is detected; An imaging apparatus comprising:
JP2009064078A 2009-03-17 2009-03-17 Face detection device, and imaging apparatus Pending JP2010219862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009064078A JP2010219862A (en) 2009-03-17 2009-03-17 Face detection device, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009064078A JP2010219862A (en) 2009-03-17 2009-03-17 Face detection device, and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2010219862A true JP2010219862A (en) 2010-09-30

Family

ID=42978209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009064078A Pending JP2010219862A (en) 2009-03-17 2009-03-17 Face detection device, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2010219862A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019013A (en) * 2009-07-07 2011-01-27 Ricoh Co Ltd Imaging apparatus, area detection method, and program
JP2012151669A (en) * 2011-01-19 2012-08-09 Mitsubishi Electric Corp Television receiver

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011019013A (en) * 2009-07-07 2011-01-27 Ricoh Co Ltd Imaging apparatus, area detection method, and program
JP2012151669A (en) * 2011-01-19 2012-08-09 Mitsubishi Electric Corp Television receiver

Similar Documents

Publication Publication Date Title
TWI414179B (en) Shooting parameter adjustment method for face detection and image capturing device for face detection
US8243191B2 (en) Imaging apparatus and imaging control method for focusing by determining a focusing position
US8401328B2 (en) Image processing apparatus and image processing method
US20190130169A1 (en) Image processing method and device, readable storage medium and electronic device
US8416987B2 (en) Subject tracking apparatus and control method therefor, image capturing apparatus, and display apparatus
EP1528797B1 (en) Image processing apparatus, image-taking system and image processing method
EP3308537B1 (en) Calibration of defective image sensor elements
KR101441786B1 (en) Subject determination apparatus, subject determination method and recording medium storing program thereof
CN102103754A (en) Subject tracking apparatus, subject region extraction apparatus, and control methods therefor
US9979876B2 (en) Imaging apparatus, imaging method, and storage medium
CN102870402B (en) Imaging device and formation method
US10121067B2 (en) Image processing apparatus that determines processing target area of an image based on degree of saliency, image processing method, and storage medium
CN107018407B (en) Information processing device, evaluation chart, evaluation system, and performance evaluation method
JP5395650B2 (en) Subject area extraction device and control method thereof, subject tracking device, and program
US20170078558A1 (en) Image capturing apparatus, method for controlling an image capturing apparatus, and storage medium
US20150281571A1 (en) Foreign body information detection device and foreign body information detection method of imaging apparatus
JP2017073639A (en) Image processing apparatus, control method thereof and program
JP2010219862A (en) Face detection device, and imaging apparatus
CN108063933B (en) Image processing method and device, computer readable storage medium and computer device
US11575841B2 (en) Information processing apparatus, imaging apparatus, method, and storage medium
JP5222779B2 (en) License plate recognition device
JP2012191595A (en) Imaging apparatus
JP2010219864A (en) Imaging apparatus
CN108335278B (en) Image processing method and device, storage medium and electronic equipment
JP5395651B2 (en) Subject tracking device, control method and program for subject tracking device

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20100913

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20101007