JP2011217229A - Imaging apparatus and display method - Google Patents

Imaging apparatus and display method Download PDF

Info

Publication number
JP2011217229A
JP2011217229A JP2010084925A JP2010084925A JP2011217229A JP 2011217229 A JP2011217229 A JP 2011217229A JP 2010084925 A JP2010084925 A JP 2010084925A JP 2010084925 A JP2010084925 A JP 2010084925A JP 2011217229 A JP2011217229 A JP 2011217229A
Authority
JP
Japan
Prior art keywords
face
image
unit
index
distance
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
JP2010084925A
Other languages
Japanese (ja)
Inventor
Takehiko Kuhara
毅彦 久原
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2010084925A priority Critical patent/JP2011217229A/en
Publication of JP2011217229A publication Critical patent/JP2011217229A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Exposure Control For Cameras (AREA)
  • Focusing (AREA)
  • Indication In Cameras, And Counting Of Exposures (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an imaging apparatus capable of presenting such an image or a video image as not to give a sense of incompatibility to a user.SOLUTION: An imaging apparatus includes: a face detector 14 for detecting the face of a person included in a subject from an input image; a distance measuring unit 15 for measuring a distance between the face detected by the face detector and the imaging apparatus; a face index-adding unit 16 for making an index for the face detected by the face detector different in accordance with the distance measured by the distance measuring unit and for adding that index at a position of the face in the image; and an image display unit 18 for displaying an image of the face to which the index has been added by the face index-adding unit.

Description

本発明は、撮像により得られた画像から人物の顔を検出し、検出した顔に指標を付した画像を表示する撮像装置および表示方法に関する。   The present invention relates to an imaging apparatus and a display method for detecting a human face from an image obtained by imaging and displaying an image with an index on the detected face.

近年、被写体をCCDやMOS型の固体撮像素子を用いて撮像するデジタルカメラやデジタルビデオカメラ等といった撮像装置においては、静止画像や動画像の撮影時に、被写体に含まれる人物の顔を自動的に検出する顔検出機能を有するものが増えている。この顔検出機能を有する撮像装置においては、一般に、検出された顔部分の領域(顔領域)における画像情報に基づきフォーカス制御や露出制御が行われている。   In recent years, in an imaging apparatus such as a digital camera or a digital video camera that images a subject using a CCD or MOS type solid-state imaging device, a person's face included in the subject is automatically captured when a still image or a moving image is captured. An increasing number have face detection functions. In an imaging apparatus having the face detection function, focus control and exposure control are generally performed based on image information in a detected face area (face area).

また、一般に、撮像装置には、そのボディに液晶表示装置が備えられていることが多く、その液晶表示装置には、撮像素子によって捉えられた画像が表示される。顔検出機能を備えたデジタルビデオカメラやデジタルカメラでは、この液晶表示装置に表示される画像に重ねて顔検出枠(例えば、特許文献1参照)や顔検出のマーク(例えば、特許文献2参照)が表示される。   In general, an imaging device is often provided with a liquid crystal display device in its body, and an image captured by the imaging element is displayed on the liquid crystal display device. In a digital video camera or digital camera having a face detection function, a face detection frame (see, for example, Patent Document 1) or a face detection mark (see, for example, Patent Document 2) is superimposed on an image displayed on the liquid crystal display device. Is displayed.

特開2005−286940号公報JP 2005-286940 A 特開2007−201839号公報JP 2007-201839 A

しかしながら、撮像装置からの距離に差がある複数の人物が存在し、各人物の顔検出枠が重なってしまった場合、撮像装置から遠い位置(後方)の人物の顔検出枠が、撮像装置から近い位置(前方)の人物の顔検出枠に重なって表示される。例えば、図12に示すように、撮像装置から近い位置の人物71の顔検出枠73と撮像装置から遠い位置の人物72の顔検出枠74とは独立して表示されるために、撮像装置から遠い位置の顔検出枠74が撮像装置から近い位置の人物71に重なる部分75が存在する。そのため、この重なる部分75の前後の関係が他の部分と異なり、ユーザは、撮像装置の液晶表示装置に表示される画像に違和感を持つことがある。   However, when there are a plurality of persons having a difference in distance from the imaging apparatus and the face detection frames of the persons overlap, the face detection frame of the person far from the imaging apparatus (rear) is separated from the imaging apparatus. It is displayed so as to overlap the face detection frame of the person at the near position (front). For example, as shown in FIG. 12, since the face detection frame 73 of the person 71 at a position close to the imaging device and the face detection frame 74 of the person 72 at a position far from the imaging device are displayed independently, There is a portion 75 where the face detection frame 74 at a distant position overlaps the person 71 at a position close to the imaging device. Therefore, the front-rear relationship of the overlapping portion 75 is different from that of the other portions, and the user may feel uncomfortable with the image displayed on the liquid crystal display device of the imaging device.

また、近年は、ユーザが立体的に視認可能な静止画像(3次元画像)やユーザが立体的に視認可能な動画像(3次元映像)に対する関心が高まっており、3次元画像や3次元映像を撮影できる3次元撮像装置が増えてきている。この3次元撮像装置では、視差を考慮した右目用の画像および左目用の画像を取得して3次元画像が得られるようになっており、その3次元撮像装置には、視差バリア方式を利用した裸眼による立体視を可能にした液晶表示装置が備えられている。   In recent years, there has been an increasing interest in still images (three-dimensional images) that can be viewed three-dimensionally by users and moving images (three-dimensional images) that can be viewed three-dimensionally by users. The number of three-dimensional imaging devices capable of photographing the image has increased. In this three-dimensional imaging device, a right-eye image and a left-eye image in consideration of parallax are obtained to obtain a three-dimensional image. The three-dimensional imaging device uses a parallax barrier method. A liquid crystal display device that enables stereoscopic viewing with the naked eye is provided.

3次元画像や3次元映像の場合、図12に示すように、撮像装置から遠い位置にあるべきものが撮像装置から近い位置にあるものの上に重なるように表示されると、その部分の前後関係が逆転した画像や映像となって立体感が損なわれ、また、その画像や映像を見ているユーザに違和感を与えるため、大きな疲労感が生じる要因になることがある。   In the case of a three-dimensional image or a three-dimensional image, as shown in FIG. 12, when the object that should be far from the imaging device is displayed so as to overlap the object that is closer to the imaging device, the context of the part is displayed. As a result, the stereoscopic effect is lost, and the user who is viewing the image or video feels uncomfortable, which may cause a great feeling of fatigue.

本発明の解決する課題は、ユーザに違和感を与えない画像や映像を提示できる撮像装置および表示方法を提供することにある。   The problem to be solved by the present invention is to provide an imaging apparatus and a display method that can present images and videos that do not give the user a sense of incongruity.

上記の課題を解決するために、本発明は、入力された画像から被写体に含まれる人物の顔を検出する顔検出部と、顔検出部で検出された顔と撮像装置との距離を測定する距離測定部と、距離測定部で測定された距離に応じて顔検出部で検出された顔に対する指標を異ならせ、その指標を前記画像の前記顔の位置に付加する顔指標付加部と、顔指標付加部で指標が付加された顔の画像を表示する画像表示部とを備える。   In order to solve the above problems, the present invention measures a face detection unit that detects a human face included in a subject from an input image, and a distance between the face detected by the face detection unit and the imaging device. A face measuring unit, a face index adding unit for changing an index for the face detected by the face detecting unit according to the distance measured by the distance measuring unit, and adding the index to the face position of the image; And an image display unit that displays a face image to which an index is added by the index adding unit.

本発明は、撮像装置から人物の顔までの距離に応じた方法で顔に指標を表示することにより、ユーザに違和感を与えない画像や映像を提示できる。   The present invention can present an image or video that does not give the user a sense of incongruity by displaying an index on the face by a method according to the distance from the imaging device to the person's face.

本発明の実施例1に係る撮像装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an imaging apparatus according to Embodiment 1 of the present invention. 本発明の実施例1に係る撮像装置の動作を、顔検出枠表示処理を中心に示すフローチャートである。5 is a flowchart illustrating the operation of the imaging apparatus according to the first embodiment of the present invention, centering on face detection frame display processing. 本発明の実施例1に係る撮像装置において顔検出枠が重なった場合の例を示す図である。It is a figure which shows the example when a face detection frame has overlapped in the imaging device which concerns on Example 1 of this invention. 本発明の実施例1に係る撮像装置において顔検出枠の太さで前方後方を区別する例を示す図である。It is a figure which shows the example which distinguishes front and back by the thickness of a face detection frame in the imaging device which concerns on Example 1 of this invention. 本発明の実施例1に係る撮像装置において顔検出枠の色で前方後方を区別する例を示す図である。It is a figure which shows the example which distinguishes front and back with the color of a face detection frame in the imaging device which concerns on Example 1 of this invention. 本発明の実施例2に係る撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device which concerns on Example 2 of this invention. 本発明の実施例2に係る撮像装置において、3次元撮影時における人物の左画像および右画像の位置関係を示す図である。It is a figure which shows the positional relationship of the person's left image and right image at the time of three-dimensional imaging | photography in the imaging device which concerns on Example 2 of this invention. 本発明の実施例2に係る撮像装置において、右画像と左画像とから作図された真上から見た人物と撮像装置との位置関係を示す図である。In the imaging device which concerns on Example 2 of this invention, it is a figure which shows the positional relationship of the person and imaging device which were seen from right above drawn from the right image and the left image. 本発明の実施例3に係る撮像装置において、人物a、人物bおよび人物cの配置を上空から見た図である。In the imaging device according to Example 3 of the present invention, the arrangement of a person a, a person b, and a person c is viewed from above. 本発明の実施例3に係る撮像装置において、左レンズおよび右レンズから撮影した画像内における人物の位置の横軸座標を示す図である。It is a figure which shows the horizontal axis coordinate of the position of the person in the image image | photographed from the left lens and the right lens in the imaging device which concerns on Example 3 of this invention. 本発明の実施例1に係る撮像装置の動作を、顔検出枠表示処理を中心に示すフローチャートである。5 is a flowchart illustrating the operation of the imaging apparatus according to the first embodiment of the present invention, centering on face detection frame display processing. 従来の撮像装置における顔検出枠の表示例を示す図である。It is a figure which shows the example of a display of the face detection frame in the conventional imaging device.

以下、本発明の実施の形態について、図面を参照しながら詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

本発明の実施例1に係る撮像装置は、静止画像または動画像(以下、単に「画像」と総称する)に基づき顔検出枠を表示するようにしたものである。なお、顔検出枠は、指標の一例であり、本発明の「指標」としては、顔検出枠に限定されず、任意の形状のマークや矢印などを用いることができる。   The imaging apparatus according to the first embodiment of the present invention displays a face detection frame based on a still image or a moving image (hereinafter simply referred to as “image”). Note that the face detection frame is an example of an index, and the “index” of the present invention is not limited to the face detection frame, and an arbitrarily shaped mark, arrow, or the like can be used.

図1は、実施例1に係る撮像装置の構成を示すブロック図である。この撮像装置は、レンズ11、画像入力部12、メモリ13、顔検出部14、距離測定部15、顔枠付加部16、画像出力部17、画像表示部18および外部端子出力部19を備えている。   FIG. 1 is a block diagram illustrating the configuration of the imaging apparatus according to the first embodiment. The imaging apparatus includes a lens 11, an image input unit 12, a memory 13, a face detection unit 14, a distance measurement unit 15, a face frame addition unit 16, an image output unit 17, an image display unit 18, and an external terminal output unit 19. Yes.

レンズ11は、被写体の像を撮像素子(図示しない)上に結像させる。撮像素子はレンズによって結像された、被写体からの光に基づく像を電気信号に変換し、出力する。画像入力部12は、撮像素子が出力した電気信号に基づいた1フレームごとの画像データを生成し、メモリ13に出力する。   The lens 11 forms an image of a subject on an image sensor (not shown). The image sensor converts an image based on light from a subject formed by a lens into an electrical signal and outputs the electrical signal. The image input unit 12 generates image data for each frame based on the electrical signal output by the image sensor and outputs the image data to the memory 13.

メモリ13は、画像入力部12から入力される1フレームごとの画像データを一時記憶する。メモリ13に記憶された画像データは、必要に応じて、顔検出部14および顔枠付加部16から読み出される。   The memory 13 temporarily stores image data for each frame input from the image input unit 12. The image data stored in the memory 13 is read from the face detection unit 14 and the face frame addition unit 16 as necessary.

顔検出部14は、メモリ13から読み出した1フレームごとの画像データによって示される画像から、被写体に含まれる人物の顔を検出し、検出した顔の位置の座標を算出する。なお、顔検出部14は、画像の肌色部分を検出したり、パターン認識技術を用いたりして、人物の顔を検出する周知の顔検出技術を用いて、人物の顔を検出する。顔検出部14で算出された座標は、顔位置座標値として距離測定部15に送られる。   The face detection unit 14 detects the face of a person included in the subject from the image indicated by the image data for each frame read from the memory 13, and calculates the coordinates of the position of the detected face. Note that the face detection unit 14 detects a human face by using a well-known face detection technique for detecting a human face by detecting a skin color portion of the image or by using a pattern recognition technique. The coordinates calculated by the face detection unit 14 are sent to the distance measurement unit 15 as face position coordinate values.

距離測定部15は、当該撮像装置から、顔検出部14から送られてきた顔位置座標値によって示される人物の顔までの距離を、以下の周知技術(1)または(2)のいずれかを用いて測定する。なお、(1)の場合、距離測定部15は、顔検出部14が検出した顔にフォーカスが合ったときのレンズ11の位置を取得し、そのレンズ11の位置によって顔までの距離を算出する。
(1)オートフォーカス機能を利用して、人物の顔にフォーカスを合わせることで測定
(2)レーザー距離計測器、GPS、超音波距離計測器等の測定装置を用いて測定
The distance measurement unit 15 calculates the distance from the imaging device to the face of the person indicated by the face position coordinate value sent from the face detection unit 14 using either of the following well-known techniques (1) or (2). Use to measure. In the case of (1), the distance measurement unit 15 acquires the position of the lens 11 when the face detected by the face detection unit 14 is in focus, and calculates the distance to the face based on the position of the lens 11. .
(1) Measured by focusing on a person's face using the autofocus function. (2) Measured using a measuring device such as a laser distance measuring device, GPS, or ultrasonic distance measuring device.

距離測定部15で測定された人物の顔までの距離を示すデータは、顔検出部14から送られてくる顔位置座標値とともに、顔枠付加部16に送られる。   Data indicating the distance to the person's face measured by the distance measuring unit 15 is sent to the face frame adding unit 16 together with the face position coordinate value sent from the face detecting unit 14.

顔枠付加部16は、本発明の顔指標付加部に対応し、メモリ13から読み出した画像データによって示される画像の顔の位置に対応する部分に、距離測定部15から送られてくるデータによって示される距離に応じた顔検出枠を生成して付加(合成)する。顔枠付加部16で顔検出枠が付加された画像を表す画像データは、画像出力部17に送られる。   The face frame adding unit 16 corresponds to the face index adding unit of the present invention, and is based on the data sent from the distance measuring unit 15 to the portion corresponding to the face position of the image indicated by the image data read from the memory 13. A face detection frame corresponding to the indicated distance is generated and added (synthesized). Image data representing the image with the face detection frame added by the face frame adding unit 16 is sent to the image output unit 17.

画像出力部17は、顔枠付加部16から送られてくる画像データに基づき画像データに基づく画像を表示するための表示信号を生成し、その表示信号を画像表示部18および外部端子出力部19に送る。画像表示部18は、例えばLCD(Liquid Crystal Display)や有機エレクトロルミネッセンスディスプレイから構成されており、画像出力部17から送られてくる表示信号にしたがって画面に画像を表示する。外部端子出力部19は、画像出力部17から送られてくる表示信号を外部の表示装置に出力する。   The image output unit 17 generates a display signal for displaying an image based on the image data based on the image data sent from the face frame adding unit 16, and the display signal is displayed on the image display unit 18 and the external terminal output unit 19. Send to. The image display unit 18 includes, for example, an LCD (Liquid Crystal Display) or an organic electroluminescence display, and displays an image on the screen according to a display signal sent from the image output unit 17. The external terminal output unit 19 outputs the display signal sent from the image output unit 17 to an external display device.

次に、上記のように構成される本発明の実施例1に係る撮像装置の動作を、顔検出枠表示処理を中心に、図2に示すフローチャートを参照しながら説明する。   Next, the operation of the imaging apparatus according to the first embodiment of the present invention configured as described above will be described with reference to the flowchart shown in FIG. 2 with a focus on face detection frame display processing.

まず、ユーザによって撮像装置が撮影モードに設定される(ステップS11)。これにより、レンズ11は、被写体の像を撮像素子上に結像させ、画像入力部12は、レンズ11によって撮像素子上に結像された画像を電気信号に変換して1フレーム分の画像データを生成し、メモリ13に送る。メモリ13は、画像入力部12から送られてくる1フレーム分の画像データを一時記憶する。この状態で顔検出枠表示処理が開始される。   First, the imaging device is set to a shooting mode by the user (step S11). As a result, the lens 11 forms an image of the subject on the image sensor, and the image input unit 12 converts the image imaged on the image sensor by the lens 11 into an electrical signal, and image data for one frame. Is sent to the memory 13. The memory 13 temporarily stores image data for one frame sent from the image input unit 12. In this state, the face detection frame display process is started.

顔検出枠表示処理では、まず、顔が検出されたかどうかが調べられる(ステップS12)。すなわち、顔検出部14は、メモリ13から1フレーム分の画像データを読み出し、読み出した画像データによって示される画像の中から全ての人物の顔を検出したかどうかを判断する。この際、顔検出部14は、まだ検出していない人物の顔があると判断すると、その検出していない顔の内、1の人物の顔を検出してその顔の部分の座標を算出し、その座標を示すデータである顔位置座標値を距離測定部15に送る。なお、人物の顔を一つも検出していない状態である初期状態において、全ての人物の顔を検出したと判断した場合(画像に人物が一人も含まれていない場合)は、ステップS12にて待機する。   In the face detection frame display process, first, it is checked whether or not a face has been detected (step S12). That is, the face detection unit 14 reads one frame of image data from the memory 13 and determines whether all human faces have been detected from the images indicated by the read image data. At this time, when the face detection unit 14 determines that there is a face of a person that has not been detected yet, the face detection unit 14 detects the face of one person among the faces that have not been detected and calculates the coordinates of the face part. The face position coordinate value, which is data indicating the coordinates, is sent to the distance measuring unit 15. If it is determined that all human faces have been detected in the initial state where no human faces have been detected (when no person is included in the image), the process proceeds to step S12. stand by.

次にステップS12において、距離計測(計算)が行われる(ステップS13)。すなわち、距離測定部15は、顔検出部14から送られてきた顔位置座標値によって示される撮像装置から人物の顔までの距離を計算する。   Next, in step S12, distance measurement (calculation) is performed (step S13). That is, the distance measuring unit 15 calculates the distance from the imaging device indicated by the face position coordinate value sent from the face detecting unit 14 to the human face.

次いで、顔位置座標と顔までの距離が記憶される(ステップS14)。すなわち、距離計測部15は、ステップS12において顔検出部14から送られてくる顔位置座標値と、ステップS13で計算した人物の顔までの距離を示すデータを記憶する。距離計測部15に記憶された顔位置座標値および距離を示すデータは、顔枠付加部16によって読み出される。その後、ステップS12に戻り、上述した処理が繰り返される。   Next, the face position coordinates and the distance to the face are stored (step S14). That is, the distance measurement unit 15 stores the face position coordinate value sent from the face detection unit 14 in step S12 and data indicating the distance to the human face calculated in step S13. Data indicating the face position coordinate value and the distance stored in the distance measuring unit 15 is read by the face frame adding unit 16. Then, it returns to step S12 and the process mentioned above is repeated.

ステップS12において、顔検出部14によって全ての顔が検出されたと判断されると、1フレームの画像中の全ての顔に対する処理が完了した旨が認識され、次いで、顔検出枠が作成される(ステップS15)。すなわち、顔枠付加部16は、メモリ13から1フレーム分の画像データを読み出し、読み出した画像データによって示される画像に含まれる顔に付加する顔検出枠を、距離測定部15から読み出した顔位置座標値および人物の顔までの距離を示すデータに基づき作成する。この際、顔枠付加部16は、当該撮像装置から顔までの距離に応じて、つまり距離計測部15から送られてくる距離を示すデータに応じて、顔検出枠の太さ、大きさまたは色を変化させても良い。そのように変化させることで、よりユーザに違和感を持たせない画像または映像とすることができる。   In step S12, when it is determined that all faces have been detected by the face detection unit 14, it is recognized that processing has been completed for all faces in the image of one frame, and then a face detection frame is created ( Step S15). That is, the face frame adding unit 16 reads out the image data for one frame from the memory 13, and the face position read out from the distance measuring unit 15 is the face detection frame to be added to the face included in the image indicated by the read image data. It is created based on the coordinate value and data indicating the distance to the person's face. At this time, the face frame adding unit 16 determines the thickness, size, or size of the face detection frame according to the distance from the imaging device to the face, that is, according to the data indicating the distance sent from the distance measuring unit 15. The color may be changed. By changing in such a manner, it is possible to obtain an image or video that does not make the user feel more uncomfortable.

次いで、顔検出枠の重なりがあるかどうかが調べられる(ステップS16)。すなわち、顔枠付加部16は、距離測定部15から読み込んだ顔位置座標値から、例えば図12に示すような、2つ以上の顔検出枠が重なっている部分が存在するかどうかを調べる。   Next, it is checked whether or not there are overlapping face detection frames (step S16). That is, the face frame adding unit 16 checks whether there is a portion where two or more face detection frames overlap as shown in FIG. 12, for example, from the face position coordinate values read from the distance measuring unit 15.

ステップS16において、顔検出枠の重なりがあることが判断されると、後方の顔検出枠の重なり部分が消去される(ステップS17)。すなわち、顔枠付加部16は、例えば図3に示すように、後方の顔検出枠の重なり部分を消去する。一方、ステップS16において、顔枠付加部16によって顔検出枠の重なりがなくなったことが判断されると、ステップS17の処理はスキップされる。   If it is determined in step S16 that the face detection frames overlap, the overlapping portion of the rear face detection frames is erased (step S17). That is, the face frame adding unit 16 erases the overlapping portion of the rear face detection frames, for example, as shown in FIG. On the other hand, if it is determined in step S16 that the face frame adding unit 16 has no overlapping face detection frames, the process in step S17 is skipped.

次いで、顔検出枠が合成される(ステップS18)。すなわち、顔枠付加部16は、メモリ13から読み出した1フレーム分の画像データによって示される画像に、上述した処理によって作成した顔検出枠を合成する。顔枠付加部16で顔検出枠が合成された画像を表す画像データは、画像出力部17に送られる。   Next, the face detection frame is synthesized (step S18). That is, the face frame adding unit 16 synthesizes the face detection frame created by the above-described process with the image indicated by the image data for one frame read from the memory 13. Image data representing the image with the face detection frame synthesized by the face frame adding unit 16 is sent to the image output unit 17.

次いで、画像が表示される(ステップS19)。すなわち、画像出力部17は、顔枠付加部16から送られてくる画像データに基づき表示信号を生成し、画像表示部18に送る。画像表示部18は、画像出力部17から送られてくる表示信号にしたがって、図3に示すような、顔検出枠が付加された画像を画面に表示する。   Next, an image is displayed (step S19). That is, the image output unit 17 generates a display signal based on the image data sent from the face frame adding unit 16 and sends it to the image display unit 18. The image display unit 18 displays an image to which a face detection frame is added as shown in FIG. 3 on the screen in accordance with the display signal sent from the image output unit 17.

このように、本発明の実施例1に係る撮像装置によれば、画像内に存在する検出された全ての顔までの距離を測定(計算)するので、撮像装置に近い位置(前方)の人物71の顔検出枠73と人物81よりも撮像装置から遠い位置(後方)の人物72の顔検出枠74の前後関係を知ることができる。したがって、図3に示すように、前方の顔検出枠73と、その前方の人物よりも撮像装置から遠い位置に位置する後方の人物72の顔検出枠74との交点76の部分から顔検出枠74の一部を消去した顔検出枠74aを生成して画像に付加することによりユーザに違和感を持たせない画像または映像を表示することができる。   As described above, according to the imaging apparatus according to the first embodiment of the present invention, the distance to all detected faces existing in the image is measured (calculated). It is possible to know the front-rear relationship between the face detection frame 73 of the person 71 and the face detection frame 74 of the person 72 at a position farther from the imaging device (backward) than the person 81. Therefore, as shown in FIG. 3, the face detection frame 73 starts from the intersection point 76 between the front face detection frame 73 and the face detection frame 74 of the rear person 72 located farther from the imaging device than the front person. By generating a face detection frame 74a in which a part of 74 is deleted and adding it to the image, it is possible to display an image or video that does not make the user feel uncomfortable.

なお、顔検出枠同士が重ならない場合においても、図4に示すように、顔枠付加部16は、撮像装置に近い位置の人物81の顔検出枠83と人物81よりも撮像装置から遠い位置の人物82の顔検出枠84の枠の太さを変えて表示するようにしても良い。この場合、顔検出枠の太さを人物の顔までの距離に反比例して変更するように構成できる。顔枠付加部16が例えば、撮像装置に近い人物の顔検出枠ほど太くし、撮像装置から遠い人物の顔検出枠ほど細くするという遠近法を利用した顔枠を付加することにより、前後関係が視覚的にわかりやすい画像または映像を表示することができる。さらに、人物までの距離85および86を表示するように構成すれば、ユーザによる撮影の構図等の決定をサポートすることができる。   Even when the face detection frames do not overlap with each other, as shown in FIG. 4, the face frame addition unit 16 has the face detection frame 83 of the person 81 at a position close to the imaging apparatus and a position farther from the imaging apparatus than the person 81. The face detection frame 84 of the person 82 may be displayed with a different frame thickness. In this case, the thickness of the face detection frame can be changed in inverse proportion to the distance to the human face. For example, the face frame adding unit 16 adds a face frame using a perspective method in which the face detection frame of a person close to the imaging device is thicker and the face detection frame of a person farther from the imaging device is thinner, so Visually understandable images or videos can be displayed. Furthermore, if it is configured to display the distances 85 and 86 to the person, it is possible to support the determination of the composition of shooting by the user.

また、図5に示すように、顔枠付加部16が、撮像装置に近い人物に対応するの顔検出枠ほど明るい色の顔枠を付加し、撮像装置から遠い人物に対応する顔検出枠ほど暗い色の顔枠を付加する構成としても良い。このように、人物の顔までの距離に応じて枠の色の明るさを調整して表示することにより、遠近法と同様に、人物の前後関係が視覚的にわかりやくなるという効果がある。   Also, as shown in FIG. 5, the face frame adding unit 16 adds a brighter face frame to a face detection frame corresponding to a person closer to the imaging device, and a face detection frame corresponding to a person farther from the imaging device. A dark face frame may be added. As described above, by adjusting and displaying the brightness of the color of the frame according to the distance to the face of the person, there is an effect that the front-rear relationship of the person can be visually understood as in the perspective method.

以上のように、顔枠付加部16は、距離測定部15で測定された撮像装置から人物の顔までの距離に応じて、顔検出部で検出された顔に対する顔検出枠(指標)を変化させて付加するため、顔検出枠が付加されていてもユーザに違和感を与えない画像や映像を提示できる。   As described above, the face frame adding unit 16 changes the face detection frame (index) for the face detected by the face detecting unit according to the distance from the imaging device measured by the distance measuring unit 15 to the human face. Therefore, even if a face detection frame is added, it is possible to present an image or video that does not give the user a sense of incongruity.

図6は、本発明の実施例2に係る撮像装置の構成を示すブロック図である。この撮像装置は、右レンズ21、左レンズ22、第1画像入力部23、第2画像入力部24、第1メモリ25、第2メモリ26、第1顔検出部27、第2顔検出部28、距離計算部29、第1顔枠付加部30、第2顔枠付加部31、画像出力部32、画像表示部33および外部端子出力部34を備えている。   FIG. 6 is a block diagram illustrating a configuration of the imaging apparatus according to the second embodiment of the present invention. This imaging device includes a right lens 21, a left lens 22, a first image input unit 23, a second image input unit 24, a first memory 25, a second memory 26, a first face detection unit 27, and a second face detection unit 28. , A distance calculation unit 29, a first face frame addition unit 30, a second face frame addition unit 31, an image output unit 32, an image display unit 33, and an external terminal output unit 34.

右レンズ21は、被写体の像を第1の撮像素子(図示しない)上に結像させる。第1の撮像素子は右レンズ21によって結像された被写体からの光に基づく像を電気信号に変換し、第1画像入力部23に入力し、第1画像入力部23は、第1の撮像素子から入力されたその電気信号に基づいて1フレームごとの画像データを生成し、第1メモリ25に送る。   The right lens 21 forms an image of a subject on a first image sensor (not shown). The first image sensor converts an image based on the light from the subject imaged by the right lens 21 into an electrical signal and inputs it to the first image input unit 23. The first image input unit 23 performs the first imaging. Based on the electrical signal input from the element, image data for each frame is generated and sent to the first memory 25.

左レンズ22は、被写体の像を第2の撮像素子(図示しない)上に結像させる。第2の撮像素子は左レンズ22によって結像された被写体からの光に基づく像を電気信号に変換し、第2画像入力部24に入力し、第2画像入力部24は、第2の撮像素子から入力されたその電気信号に基づいて1フレームごとの画像データを生成し、第2メモリ26に送る。   The left lens 22 forms an image of the subject on a second image sensor (not shown). The second image sensor converts an image based on the light from the subject imaged by the left lens 22 into an electrical signal and inputs it to the second image input unit 24. The second image input unit 24 performs the second imaging. Based on the electrical signal input from the element, image data for each frame is generated and sent to the second memory 26.

なお、右レンズ21と左レンズ22とは所定の間隔を空けて配置されており、その間隔は一般的な人の右目と左目との間隔と同程度の間隔であることが望ましい。また、右レンズ21の中心線及び左レンズ22の中心線の方向は変更可能であることが望ましく、図示しないレンズ駆動部は、少なくとも撮像時に、右レンズ21及び左レンズ22を、右レンズ21の中心線と左レンズ22の中心線とがほぼ交わるような向きに位置させる。   The right lens 21 and the left lens 22 are arranged with a predetermined interval, and it is desirable that the interval is approximately the same as the interval between the right eye and the left eye of a general person. In addition, it is desirable that the directions of the center line of the right lens 21 and the center line of the left lens 22 can be changed. The center line and the left lens 22 are positioned so that the center line substantially intersects.

第1メモリ25は、第1画像入力部23から送られてくる1フレームごとの画像データを一時記憶する。第1メモリ25に記憶された画像データは、必要に応じて、第1顔検出部27および第1顔枠付加部30から読み出される。   The first memory 25 temporarily stores image data for each frame sent from the first image input unit 23. The image data stored in the first memory 25 is read from the first face detection unit 27 and the first face frame addition unit 30 as necessary.

第2メモリ26は、第2画像入力部24から送られてくる1フレームごとの画像データを一時記憶する。第2メモリ26に記憶された画像データは、必要に応じて、第2顔検出部28および第2顔枠付加部31から読み出される。   The second memory 26 temporarily stores image data for each frame sent from the second image input unit 24. The image data stored in the second memory 26 is read from the second face detection unit 28 and the second face frame addition unit 31 as necessary.

第1顔検出部27は、第1メモリ25から読み出した1フレームごとの画像データによって示される画像から人物の顔を検出し、検出した顔の位置の座標を算出する。第1顔検出部27で算出された座標は、検出した顔の位置の座標を示すデータである顔位置座標値を距離計算部29に送られる。   The first face detection unit 27 detects the face of a person from the image indicated by the image data for each frame read from the first memory 25, and calculates the coordinates of the position of the detected face. The coordinates calculated by the first face detection unit 27 are sent to the distance calculation unit 29 as face position coordinate values, which are data indicating the coordinates of the detected face position.

第2顔検出部28は、第2メモリ26から読み出した1フレームごとの画像データによって示される画像から人物の顔を検出し、検出した顔の位置の座標を算出する。第2顔検出部28は、検出した顔の位置の座標を示すデータである顔位置座標値を距離計算部29に送られる。   The second face detection unit 28 detects the face of a person from the image indicated by the image data for each frame read from the second memory 26, and calculates the coordinates of the position of the detected face. The second face detection unit 28 sends a face position coordinate value, which is data indicating the coordinates of the detected face position, to the distance calculation unit 29.

距離計算部29は、第1顔検出部27から送られてきた顔位置座標値および第2顔検出部28から送られてきた顔位置座標値を用いて、当該撮像装置から人物の顔までの距離を、三角法に基づいた計算により求める(詳細は後述する)。距離計算部29で計算された距離を示すデータは、第1顔検出部27から送られてくる顔位置座標値と一緒に第1顔枠付加部30に送られるとともに、第2顔検出部28から送られてくる顔位置座標値と一緒に第2顔枠付加部31に送られる。   The distance calculation unit 29 uses the face position coordinate value sent from the first face detection unit 27 and the face position coordinate value sent from the second face detection unit 28, to the person's face from the imaging device. The distance is obtained by calculation based on trigonometry (details will be described later). The data indicating the distance calculated by the distance calculation unit 29 is sent to the first face frame adding unit 30 together with the face position coordinate value sent from the first face detection unit 27 and the second face detection unit 28. Is sent to the second face frame adding unit 31 together with the face position coordinate value sent from.

第1顔枠付加部30は、本発明の顔指標付加部に対応し、第1メモリ25から読み出した1フレーム分の画像データによって示される画像の顔の位置に対応する部分に、距離計算部29から送られてくるデータによって示される距離に応じた顔検出枠を生成して付加(合成)する。第1顔枠付加部30で顔検出枠が付加された画像を表す画像データは、画像出力部32に送られる。   The first face frame addition unit 30 corresponds to the face index addition unit of the present invention, and a distance calculation unit is provided in a portion corresponding to the face position of the image indicated by the image data for one frame read from the first memory 25. A face detection frame corresponding to the distance indicated by the data sent from 29 is generated and added (synthesized). Image data representing the image with the face detection frame added by the first face frame adding unit 30 is sent to the image output unit 32.

第2顔枠付加部31は、本発明の顔指標付加部に対応し、第2メモリ26から読み出した1フレーム分の画像データによって示される画像の顔の位置に対応する部分に、距離計算部29から送られてくるデータによって示される距離に応じた顔枠を生成して付加(合成)する。第2顔枠付加部31で顔枠が付加された画像を表す画像データは、画像出力部32に送られる。   The second face frame addition unit 31 corresponds to the face index addition unit of the present invention, and a distance calculation unit is provided in a portion corresponding to the face position of the image indicated by the image data for one frame read from the second memory 26. A face frame corresponding to the distance indicated by the data sent from 29 is generated and added (synthesized). Image data representing the image with the face frame added by the second face frame adding unit 31 is sent to the image output unit 32.

画像出力部17は、第1顔枠付加部30から送られてくる画像データ及び第2顔枠付加部31から送られてくる画像データの内の少なくとも一方に基づき表示信号を生成し、画像表示部33および外部端子出力部34に送る。画像表示部33は、画像出力部32から送られてくる表示信号にしたがって画面に画像を表示する。また、外部端子信号部34は、画像出力部32から送られてくる表示信号を外部の表示装置に出力する。   The image output unit 17 generates a display signal based on at least one of the image data sent from the first face frame adding unit 30 and the image data sent from the second face frame adding unit 31 to display an image. To the unit 33 and the external terminal output unit 34. The image display unit 33 displays an image on the screen according to a display signal sent from the image output unit 32. The external terminal signal unit 34 outputs a display signal sent from the image output unit 32 to an external display device.

次に、本実施例の距離計算部29が行う、三角法に基づいた計算によって撮像装置から顔までの距離を算出する方法について図7及び図8を用いて説明する。   Next, a method for calculating the distance from the imaging device to the face by calculation based on the trigonometry performed by the distance calculation unit 29 of the present embodiment will be described with reference to FIGS. 7 and 8.

図7(a)は、右レンズ21から得られる右画像、図7(b)は、左レンズ22から得られる左画像を示しており、検出された人物の顔の領域の中心点をAとする。右画像の縦の中心線を線C、左画像の縦の中心線を線Eとし、右画像の右端を線D、左画像の右端を線Fとする。右画像の点Aから水平方向に引いた線と線Cとの交点をK、線Dとの交点をMとし、左画像の点Aから水平方向に引いた線と線Eとの交点をN、線Fとの交点をPとする。   FIG. 7A shows a right image obtained from the right lens 21, and FIG. 7B shows a left image obtained from the left lens 22, where A is the center point of the detected human face area. To do. Let the vertical center line of the right image be line C, the vertical center line of the left image be line E, the right end of the right image be line D, and the right end of the left image be line F. The intersection of a line drawn from the point A of the right image and the line C is K, the intersection of the line D is M, and the intersection of the line drawn from the point A of the left image and the line E is N Let P be the intersection with line F.

距離計算部29は、線Cの座標と第1顔検出部27から送られてくる顔位置座標値とを基に、右右画像における、線分AKの長さと線分AMの長さとの比「R1:R2」を求め、線Eの座標と第2顔検出部28から送られてくる顔位置座標値とを基に、左画像における、線分ANの長さと線分APの長さとの比「R3:R4」を求める。   The distance calculation unit 29 calculates the ratio between the length of the line segment AK and the length of the line segment AM in the right-right image based on the coordinates of the line C and the face position coordinate value sent from the first face detection unit 27. “R1: R2” is obtained, and based on the coordinates of the line E and the face position coordinate value sent from the second face detection unit 28, the length of the line segment AN and the length of the line segment AP in the left image are calculated. The ratio “R3: R4” is determined.

次に図8の説明に移る。図8は、図7(a)に示す右画像と図7(b)に示す左画像とを基に、真上から見た人物と撮像装置との関係を、示したものである。なお、図8において、線および点に付された記号のうち、図7で使用した記号と同じ意味を有するものは、図7で使用した記号と同じ記号が使用されている。図8において、点Iは、撮像装置Gの右レンズ21の中心点を表し、点Hは左レンズ22の中心点を表している。本実施例の撮像装置では、右レンズ21と左レンズ22との向きがなす角(輻輳角)を調整して、3次元画像が作成される。輻輳角をαとし、右レンズ21の中心線と左レンズ22の中心線が交わる点(輻輳点)をBとする。また、右レンズ21と左レンズ22との間隔L1は、一般に、人間の左右の目の間隔と同等に設定され、例えば、約60mmに設定される。右レンズ21の中心線および左レンズ22の中心線から右端までの角度(右側の撮影限界角)βは、レンズの性能より決められる。また、点Iと点Hとを通る線Jと、その線Jと直交しかつ点Aを通る線との交点をQとする。さらに、線分IQの長さをL2、線分AQの長さをL3とする。本実施例の距離測定部29は、このL3の長さを求めることで、撮像装置から人物の顔までの距離を求める。   Next, a description of FIG. FIG. 8 shows the relationship between the person and the imaging device viewed from directly above based on the right image shown in FIG. 7A and the left image shown in FIG. 7B. In FIG. 8, among the symbols attached to the lines and points, those having the same meaning as the symbols used in FIG. 7 are the same as those used in FIG. In FIG. 8, the point I represents the center point of the right lens 21 of the imaging device G, and the point H represents the center point of the left lens 22. In the imaging apparatus of the present embodiment, a three-dimensional image is created by adjusting the angle (convergence angle) formed by the right lens 21 and the left lens 22. Let the convergence angle be α, and let B be the point (convergence point) where the center line of the right lens 21 and the center line of the left lens 22 intersect. Further, the interval L1 between the right lens 21 and the left lens 22 is generally set to be equal to the interval between the left and right eyes of a human, and is set to about 60 mm, for example. The angle (right photographing limit angle) β from the center line of the right lens 21 and the center line of the left lens 22 to the right end is determined by the performance of the lens. Also, let Q be the intersection of a line J passing through the points I and H and a line orthogonal to the line J and passing through the point A. Furthermore, the length of the line segment IQ is L2, and the length of the line segment AQ is L3. The distance measuring unit 29 according to the present embodiment obtains the distance from the imaging device to the person's face by obtaining the length of L3.

次に、L3を求める方法について詳細に説明する。   Next, a method for obtaining L3 will be described in detail.

図7に示す右画像の中心からAまでの長さR1と右画像の右端からAまでの長さR2の比と、直角三角形IKMと、直角三角形IKAの関係より
R1:R1+R2=tan(δ):tan(β)
となり、左画像の中心からAまでの長さR3と左画像の右端からAまでの長さR4の比と、直角三角形HNFと、直角三角形HNAの関係より
R3:R3+R4=tan(ε):tan(β)
となり、直角三角形ANIのIの角度δと直角三角形AKHのHの角度εを求めることができる。
From the ratio of the length R1 from the center of the right image to A and the length R2 from the right end of the right image to A shown in FIG. 7 and the relationship between the right triangle IKM and the right triangle IKA, R1: R1 + R2 = tan (δ) : Tan (β)
From the relationship between the length R3 from the center of the left image to A and the length R4 from the right end of the left image to A, and the relationship between the right triangle HNF and the right triangle HNA, R3: R3 + R4 = tan (ε): tan (Β)
Thus, the angle δ of I of the right triangle ANI and the angle ε of H of the right triangle AKH can be obtained.

次に、二等辺三角形BHIの低角γ、直角三角形AQHのHの角度θと直角三角形AIQのIの角度λは
γ=(180−α)/2
λ=180−(γ+δ)
θ=γ−ε
により求められる。よって、直角三角形AQHと直角三角形AIQの辺と角度より
tan(θ)=L3/(L1+L2)
tan(λ)=L3/L2
の関係が成り立ち、これらの2式から3次元画像撮像装置から人物の顔までの距離L3は以下の式で求めることができる。
L3=tan(λ)×tan(θ)×L1/(tan(λ)−tan(θ))
Next, the low angle γ of the isosceles triangle BHI, the angle θ of H of the right triangle AQH, and the angle λ of I of the right triangle AIQ are γ = (180−α) / 2.
λ = 180− (γ + δ)
θ = γ−ε
It is calculated by. Therefore, from the sides and angles of the right triangle AQH and the right triangle AIQ, tan (θ) = L3 / (L1 + L2)
tan (λ) = L3 / L2
From these two formulas, the distance L3 from the three-dimensional imaging device to the human face can be obtained by the following formula.
L3 = tan (λ) × tan (θ) × L1 / (tan (λ) −tan (θ))

距離計算部29は、各点の座標と、第1顔検出部27及び第2顔検出部28から送られてくる顔位置座標値とを基に、以上のようにしてL3を求めることで、撮像装置から人物の顔までの距離を求める。本実施形態の撮像装置は以上のようにして撮像装置から人物の顔までの距離を求めるので、オートフォーカス機能を用いたり、各種距離計測器を用いたりすることなしに撮像装置から人物の顔までの距離を求めることができる。   The distance calculation unit 29 obtains L3 as described above based on the coordinates of each point and the face position coordinate values sent from the first face detection unit 27 and the second face detection unit 28. The distance from the imaging device to the person's face is obtained. Since the imaging apparatus of the present embodiment obtains the distance from the imaging apparatus to the person's face as described above, the imaging apparatus to the person's face can be obtained without using an autofocus function or using various distance measuring devices. Can be obtained.

なお、3次元画像または3次元映像を撮像できる撮像装置においても、オートフォーカス機能を利用して撮像装置から人物の顔までの距離を測定したり、レーザー距離計等の各種距離計測器を用いて撮像装置から人物の顔までの距離を測定したりしても良い。   Even in an imaging device that can capture a 3D image or a 3D image, the distance from the imaging device to a person's face is measured using an autofocus function, or various distance measuring devices such as a laser distance meter are used. The distance from the imaging device to the person's face may be measured.

3次元画像または3次元映像を撮像できる撮像装置においては、人物の顔までの距離を測定しなくても、右画像と左画像との視差から人物の前後関係を認識できる。本発明の実施例3に係る撮像装置は、右画像と左画像との視差に基づき顔検出枠を表示するようにしたものである。   In an imaging apparatus capable of capturing a 3D image or a 3D image, the front-rear relationship of a person can be recognized from the parallax between the right image and the left image without measuring the distance to the person's face. The imaging apparatus according to Embodiment 3 of the present invention displays a face detection frame based on the parallax between the right image and the left image.

実施例3に係る撮像装置の構成は、図6に示した実施例2に係る撮像装置の構成とほぼ同じである。ただし、本実施例の距離計算部29は、視差計算部として機能する。以下においては、実施例2と相違する距離計算部29の動作を中心に説明する。   The configuration of the imaging apparatus according to the third embodiment is substantially the same as the configuration of the imaging apparatus according to the second embodiment illustrated in FIG. However, the distance calculation unit 29 of this embodiment functions as a parallax calculation unit. In the following, the operation of the distance calculation unit 29 that is different from the second embodiment will be mainly described.

図9は、右レンズ21の中心線と左レンズ22の中心線が所定の輻輳角で交差しているときの人物a、人物bおよび人物cの配置を上空から見た図である。人物aは、左レンズ22で撮影される左画像に含まれる領域の左端dと、左画像の中心を通る中心線eまでの距離の比が13:7の位置に存在する。その人物aを右レンズ21で撮影した場合、左画像に含まれる領域の左端jと中心線kまでの距離の比は6:14になる。同様に、人物bおよび人物cの位置関係は、人物aと合わせて、以下のような比で表すことができる。なお、これらの比は、右レンズ21の中心線と左レンズ22の中心線が交わる点(輻輳点)に応じて変わるため、右レンズ21と左レンズ22の向きを変更可能な場合は、本実施形態の距離計算部29はそのレンズの向きに関する情報を図示しないレンズ制御部から取得し、そのレンズの向きに応じて以下の比を算出することが望ましい。   FIG. 9 is a view of the arrangement of the persons a, b, and c when the center line of the right lens 21 and the center line of the left lens 22 intersect at a predetermined convergence angle as viewed from above. The person a exists at a position where the ratio of the distance from the left end d of the region included in the left image photographed by the left lens 22 to the center line e passing through the center of the left image is 13: 7. When the person a is photographed with the right lens 21, the ratio of the distance from the left end j of the region included in the left image to the center line k is 6:14. Similarly, the positional relationship between the person b and the person c can be expressed by the following ratio together with the person a. Note that these ratios change according to the point (convergence point) where the center line of the right lens 21 and the center line of the left lens 22 intersect, so that if the orientation of the right lens 21 and the left lens 22 can be changed, It is desirable that the distance calculation unit 29 of the embodiment obtains information on the lens orientation from a lens control unit (not shown) and calculates the following ratio according to the lens orientation.

人物a 左画像 d−a:a−e=13:7
右画像 j−a:a−k=6:14
人物b 左画像 f−b:b−g=8:12
右画像 l−b:b−m=11:9
人物c 左画像 h−c:c−i=6:14
右画像 n−c:c−o=12:8
Person a Left image da: ae = 13: 7
Right image j−a: a−k = 6: 14
Person b Left image fb: bg = 8: 12
Right image lb: bm = 11: 9
Person c Left image hc: ci = 6: 14
Right image nc: co = 12: 8

図10(a)は左レンズ22で撮影した画像(左画像)であり、図10(a)は右レンズ21で撮影した画像(右画像)であり、人物a、人物bおよび人物cは、図9に図示する位置で撮影されている。画像の左端の横軸座標を0、中心の横軸座標を100、右端の横軸座標を200とした場合、上記の人物a、人物bおよび人物cの画像位置の比から、各々の横軸座標は以下のように求められる。   FIG. 10A is an image (left image) taken with the left lens 22, FIG. 10A is an image (right image) taken with the right lens 21, and the person a, person b, and person c are: The image is taken at the position shown in FIG. When the horizontal axis coordinate at the left end of the image is 0, the horizontal axis coordinate at the center is 100, and the horizontal axis coordinate at the right end is 200, each horizontal axis is calculated from the ratio of the image positions of the person a, person b, and person c. The coordinates are obtained as follows.

人物a 左画像 65
右画像 30
人物b 左画像 140
右画像 155
人物c 左画像 130
右画像 160
Person a Left image 65
Right image 30
Person b Left image 140
Right image 155
Person c Left image 130
Right image 160

ここで、各人物a〜cそれぞれにおいて、左画像の座標から右画像の座標の差を求めると、
人物a 65−30=+25
人物b 140−155=−15
人物c 130−160=−30
となり、差分値の大きい方が前方にいることがわかる。また、右レンズ21の中心線と左レンズ22の中心線が交わる点(輻輳点)より前方の人物の座標の差分値はプラスになり、後方の差分値はマイナスとなる。
Here, in each of the persons a to c, when the difference between the coordinates of the right image from the coordinates of the left image is obtained,
Person a 65-30 = + 25
Person b 140-155 = -15
Person c 130-160 = -30
Thus, it can be seen that the larger difference value is ahead. Further, the difference value of the coordinates of the person in front of the point (convergence point) where the center line of the right lens 21 and the center line of the left lens 22 intersect is positive, and the difference value of the rear is negative.

この原理を利用することにより、本実施例の距離計算部29は、3次元画像または3次元映像の場合は左右の画像の人物の横軸座標から、各人物の前後関係を求める。その結果、各人物の前後関係に応じて、人物の顔検出枠の太さ、大きさまたは色を変化させることができる。   By using this principle, the distance calculation unit 29 of the present embodiment obtains the front-rear relationship of each person from the horizontal axis coordinates of the person in the left and right images in the case of a three-dimensional image or a three-dimensional image. As a result, the thickness, size, or color of the person's face detection frame can be changed according to the context of each person.

次に、上記のように構成される本発明の実施例3に係る撮像装置の動作を、顔検出枠表示処理を中心に、図11に示すフローチャートを参照しながら説明する。なお、図11に示すフローチャートにおいて、図2のフローチャートに示した実施例1に係る撮像装置の顔検出枠表示処理と同じまたは相当する処理を実行するステップには、図2で使用した符号と同じ符号を付して説明を簡略化する。   Next, the operation of the imaging apparatus according to the third embodiment of the present invention configured as described above will be described with reference to the flowchart shown in FIG. 11 focusing on the face detection frame display processing. In the flowchart shown in FIG. 11, the same reference numerals used in FIG. 2 are used to execute the same or equivalent processing as the face detection frame display processing of the imaging apparatus according to the first embodiment shown in the flowchart of FIG. The description will be simplified with reference numerals.

まず、ユーザによって撮像装置が撮影モードに設定される(ステップS11)。これにより、顔検出枠表示処理が開始される。顔検出枠表示処理では、まず、右画像に含まれる全ての人物の顔を検出したかどうかを判断する(ステップS21)。すなわち、第1顔検出部27は、第1メモリ25から1フレーム分の画像データを読み出し、読み出した画像データによって示される右画像の中から全ての人物の顔を検出したかどうかを調べる。   First, the imaging device is set to a shooting mode by the user (step S11). Thereby, the face detection frame display process is started. In the face detection frame display process, first, it is determined whether all human faces included in the right image have been detected (step S21). That is, the first face detection unit 27 reads image data for one frame from the first memory 25 and checks whether all human faces have been detected from the right image indicated by the read image data.

ステップS21において、まだ検出していない人物の顔があると判断すると、次いで、右画像の顔座標を算出する(ステップS22)。すなわち、第1顔検出部27は、検出していない顔の内、1の人物のを検出し、その顔の横軸座標を算出し、距離計算部29に送る。なお、人物の顔を一つも検出していない状態である初期状態において、全ての人物の顔を検出したと判断した場合(右画像に人物が一人も含まれていない場合)は、ステップS21にて待機する。   If it is determined in step S21 that there is a human face that has not yet been detected, then the face coordinates of the right image are calculated (step S22). That is, the first face detection unit 27 detects one person out of the undetected faces, calculates the horizontal coordinate of the face, and sends it to the distance calculation unit 29. If it is determined that all human faces have been detected in the initial state in which no human faces have been detected (if no right person is included in the right image), the process proceeds to step S21. And wait.

次いで、左画像に含まれる全ての人物の顔を検出したかどうかを判断する(ステップS23)。すなわち、第2顔検出部28は、第2メモリ26から1フレーム分の画像データを読み出し、読み出した画像データによって示される左画像の中から全ての人物の顔を検出したかどうかを調べる。   Next, it is determined whether or not all human faces included in the left image have been detected (step S23). That is, the second face detection unit 28 reads one frame of image data from the second memory 26 and checks whether all human faces have been detected from the left image indicated by the read image data.

ステップS23において、まだ検出していない人物の顔があると判断すると、次いで、左画像の顔座標を算出する(ステップS24)。すなわち、第2顔検出部28は、第1顔検出部27が検出した人物の顔の内、最近検出した顔(この時点で、第1顔検出部27が最後に検出した人物の顔)に対応する左画像内の人物の顔を検出し、その顔の横軸座標を算出し、距離計算部29に送る。   If it is determined in step S23 that there is a human face that has not yet been detected, then the face coordinates of the left image are calculated (step S24). That is, the second face detection unit 28 selects the most recently detected face of the person detected by the first face detection unit 27 (at this time, the face of the person detected last by the first face detection unit 27). The face of the person in the corresponding left image is detected, the horizontal axis coordinate of the face is calculated, and sent to the distance calculation unit 29.

なお、第2顔検出部は、周知のパターンマッチング技術を用いて第1顔検出部27が最近検出した顔と左画像内の各人物の顔が同一か否かを判定して、同一であると判定した顔の横軸座標を算出し、その横軸座標値を示すデータを距離計算部29に送ることが望ましいが、第2顔検出部は、第1顔検出部27が最近検出した顔の座標値と最も近い座標値に対応する顔の座標値を距離計算部29に送っても良い。   The second face detection unit determines whether or not the face recently detected by the first face detection unit 27 and the face of each person in the left image are the same by using a well-known pattern matching technique. It is desirable to calculate the horizontal coordinate of the face determined to be and send the data indicating the horizontal coordinate value to the distance calculation unit 29. However, the second face detection unit detects the face recently detected by the first face detection unit 27. The coordinate value of the face corresponding to the coordinate value closest to the coordinate value may be sent to the distance calculation unit 29.

また、第1顔検出部27が最近検出した顔に対応する左画像内の人物の顔を検出できない場合は、視差の影響により左画像にその顔が含まれていない可能性があるので、その顔に対する顔検出枠は表示しないことが望ましい。   If the face of the person in the left image corresponding to the face recently detected by the first face detection unit 27 cannot be detected, the face may not be included in the left image due to the influence of parallax. It is desirable not to display the face detection frame for the face.

図11の説明に戻り、次いで、左右座標の差分が記憶される(ステップS25)。すなわち、距離計算部29は、ステップS22で第1顔検出部27から送られてきた人物の顔の横軸座標と、その人物の顔に対応する、ステップS24で第2顔検出部28から送られてきた人物の顔の横軸座標との差分を算出して記憶する。この右画像における人物の顔の横軸座標と、その人物の顔の左画像における横軸座標との差分が視差に対応した値となる。その後、ステップS21に戻り、上述した処理が繰り返される。   Returning to the description of FIG. 11, the difference between the left and right coordinates is then stored (step S25). That is, the distance calculation unit 29 corresponds to the horizontal axis coordinate of the person's face sent from the first face detection unit 27 in step S22 and the second face detection unit 28 in step S24 corresponding to the person's face. The difference from the horizontal axis coordinate of the person's face that has been obtained is calculated and stored. The difference between the horizontal axis coordinate of the person's face in the right image and the horizontal axis coordinate of the left image of the person's face is a value corresponding to the parallax. Then, it returns to step S21 and the process mentioned above is repeated.

ステップS21において、右画像から顔が検出されなかった、または、ステップS23において、左画像から顔が検出されなかったことが判断されると、1フレームの画像中の全ての顔に対する処理が完了した旨が認識され、次いで、顔検出枠が作成される(ステップS26)。すなわち、第1顔枠付加部30は、第1メモリ25から1フレーム分の画像データを読み出し、読み出した画像データによって示される画像に含まれる顔に付加する顔検出枠を作成する。この際、第1顔枠付加部30は、視差に応じて、つまり距離計算部29から送られてくる視差を示すデータに応じて、顔検出枠の太さ、大きさまたは色を変化させる。   When it is determined in step S21 that no face has been detected from the right image or in step S23 that no face has been detected from the left image, the processing for all the faces in the image of one frame has been completed. Then, a face detection frame is created (step S26). That is, the first face frame adding unit 30 reads image data for one frame from the first memory 25 and creates a face detection frame to be added to the face included in the image indicated by the read image data. At this time, the first face frame adding unit 30 changes the thickness, size, or color of the face detection frame according to the parallax, that is, according to the data indicating the parallax sent from the distance calculation unit 29.

なお、ステップS26においては、第2顔枠付加部31が、第2メモリ26から1フレーム分の画像データを読み出し、読み出した画像データによって示される画像に含まれる顔に付加する顔検出枠を作成するようにしてもよい。この際、第2顔枠付加部31は、視差に応じて、つまり距離計算部29から送られてくる視差を示すデータに応じて、顔検出枠の太さ、大きさまたは色を変化させる。   In step S26, the second face frame adding unit 31 reads image data for one frame from the second memory 26, and creates a face detection frame to be added to the face included in the image indicated by the read image data. You may make it do. At this time, the second face frame adding unit 31 changes the thickness, size, or color of the face detection frame according to the parallax, that is, according to the data indicating the parallax sent from the distance calculation unit 29.

次いで、顔検出枠の重なりがあるかどうかが調べられる(ステップS16)。すなわち、第1顔枠付加部30は、距離計算部29から送られてくる顔位置座標値から、2つ以上の顔検出枠が重なっているどうかを調べる。なお、ステップS16の処理は、第2顔枠付加部31で行うように構成することもできる。   Next, it is checked whether or not there are overlapping face detection frames (step S16). That is, the first face frame adding unit 30 checks whether two or more face detection frames are overlapped from the face position coordinate values sent from the distance calculation unit 29. In addition, the process of step S16 can also be configured to be performed by the second face frame adding unit 31.

ステップS16において、顔検出枠の重なりがあることが判断されると、後方の顔検出枠の重なり部分が消去される(ステップS17)。すなわち、第1顔枠付加部30は、後方の顔検出枠の重なり部分を消去する。なお、ステップS17の処理は、第2顔枠付加部31で行うように構成することもできる。一方、ステップS16において、顔検出枠の重なりがないことが判断されると、ステップS17の処理はスキップされる。   If it is determined in step S16 that the face detection frames overlap, the overlapping portion of the rear face detection frames is erased (step S17). That is, the first face frame adding unit 30 deletes the overlapping portion of the rear face detection frame. In addition, the process of step S17 can also be configured to be performed by the second face frame adding unit 31. On the other hand, if it is determined in step S16 that the face detection frames do not overlap, the process of step S17 is skipped.

次いで、顔検出枠が合成される(ステップS18)。すなわち、第1顔枠付加部30は、第1メモリ25から読み出した1フレーム分の画像データによって示される画像に、上述した処理によって作成した全ての顔検出枠を合成し、顔検出枠を合成した画像を表す画像データを、画像出力部32に送る。なお、ステップS18においては、第2顔枠付加部31は、第2メモリ26から読み出した1フレーム分の画像データによって示される画像に、上述した処理によって作成した全ての顔検出枠を合成し、顔検出枠を合成した画像を表す画像データを、画像出力部32に送るように構成することもできる。   Next, the face detection frame is synthesized (step S18). That is, the first face frame adding unit 30 combines all the face detection frames created by the above-described process with the image indicated by the image data for one frame read from the first memory 25, and combines the face detection frames. Image data representing the processed image is sent to the image output unit 32. In step S18, the second face frame adding unit 31 synthesizes all the face detection frames created by the above-described process with the image indicated by the image data for one frame read from the second memory 26, Image data representing an image obtained by combining the face detection frames may be sent to the image output unit 32.

次いで、画像が表示される(ステップS19)。これにより、図3に示すような、顔検出枠が付加された画像が画像表示部33の画面に表示される。   Next, an image is displayed (step S19). As a result, an image with a face detection frame added as shown in FIG. 3 is displayed on the screen of the image display unit 33.

以上のように、本実施例の顔枠付加部は、距離計算部29で測定された右画像と左画像との視差に応じて、顔検出部で検出された顔に対する顔検出枠(指標)を変化させて付加するため、顔検出枠が付加されていてもユーザに違和感を与えない画像や映像を提示できる。   As described above, the face frame adding unit according to the present exemplary embodiment has a face detection frame (index) for the face detected by the face detecting unit according to the parallax between the right image and the left image measured by the distance calculating unit 29. Therefore, even if a face detection frame is added, an image or video that does not give the user a sense of incongruity can be presented.

なお、本発明は以上説明した各実施形態に限定されることはなく、本発明の要旨を逸脱しない範囲において種々変更が可能である。   The present invention is not limited to the embodiments described above, and various modifications can be made without departing from the scope of the present invention.

例えば、実施例2及び実施例3において、メモリを2つ有する構成としたが、一つのメモリが、第1メモリ25及び第2メモリ26双方の機能を有するようにしても良い。また、実施例2及び実施例3において、画像入力部を2つ有する構成としたが、一つの画像入力部が第1画像入力部23及び第2画像入力部24双方の機能を有するようにしても良い。また、実施例2及び実施例3において、顔検出部を2つ有する構成としたが、一つの顔検出部が第1顔検出部27及び第2顔検出部28双方の機能を有するようにしても良い。さらに、実施例2及び実施例3において、顔枠付加部を2つ有する構成としたが、一つの顔枠付加部が第1顔枠付加部30及び第2顔枠付加部31双方の機能を有するようにしても良い。また、各実施形態において、顔位置座標とは、一例として、顔を検出した領域の中心の座標であるとする。   For example, in the second and third embodiments, the configuration has two memories, but one memory may have the functions of both the first memory 25 and the second memory 26. Further, in the second and third embodiments, the configuration includes two image input units. However, one image input unit has functions of both the first image input unit 23 and the second image input unit 24. Also good. In the second and third embodiments, the configuration includes two face detection units. However, one face detection unit has functions of both the first face detection unit 27 and the second face detection unit 28. Also good. Furthermore, in Example 2 and Example 3, it was set as the structure which has two face frame addition parts, but one face frame addition part has the function of both the 1st face frame addition part 30 and the 2nd face frame addition part 31. You may make it have. In each embodiment, the face position coordinates are, for example, the coordinates of the center of the area where the face is detected.

本発明は、デジタルカメラやデジタルビデオカメラ等に利用することができる。   The present invention can be used for a digital camera, a digital video camera, and the like.

11 レンズ
12 画像入力部
13 メモリ
14 顔検出部
15 距離測定部
16 顔枠付加部
17 画像出力部
18 画像表示部
19 外部端子出力部
DESCRIPTION OF SYMBOLS 11 Lens 12 Image input part 13 Memory 14 Face detection part 15 Distance measurement part 16 Face frame addition part 17 Image output part 18 Image display part 19 External terminal output part

Claims (6)

撮像装置において、
入力された画像から被写体に含まれる人物の顔を検出する顔検出部と、
前記顔検出部で検出された前記顔と前記撮像装置との距離を測定する距離測定部と、
前記距離測定部で測定された距離に応じて前記顔検出部で検出された前記顔に対する指標を異ならせ、その指標を前記画像の前記顔の位置に付加する顔指標付加部と、
前記顔指標付加部で指標が付加された前記顔の画像を表示する画像表示部と、
を備えることを特徴とする撮像装置。
In the imaging device,
A face detection unit for detecting the face of a person included in the subject from the input image;
A distance measuring unit that measures a distance between the face detected by the face detecting unit and the imaging device;
A face index adding unit that varies an index for the face detected by the face detecting unit according to the distance measured by the distance measuring unit, and adds the index to the position of the face of the image;
An image display unit for displaying an image of the face to which an index is added by the face index adding unit;
An imaging apparatus comprising:
前記顔指標付加部は、前記距離測定部で測定された前記顔までの距離に応じて、前記顔に対応する指標の枠の太さ、指標の大きさまたは指標の色を変化させることを特徴とする請求項1記載の撮像装置。   The face index adding unit changes the thickness of the index frame corresponding to the face, the size of the index, or the color of the index according to the distance to the face measured by the distance measuring unit. The imaging apparatus according to claim 1. 前記顔指標付加部は、前記顔検出部によって複数の顔が検出された場合に、前記距離測定部で測定された前記複数の顔までの距離に基づいて、所定の顔に対応する指標の、前記所定の顔よりも前記撮像装置に近い位置の顔に対応する指標に重なる部分を消去することを特徴とする請求項1記載の撮像装置。   The face index adding unit, when a plurality of faces is detected by the face detection unit, based on the distance to the plurality of faces measured by the distance measurement unit, the index corresponding to a predetermined face, The imaging apparatus according to claim 1, wherein a portion overlapping an index corresponding to a face closer to the imaging apparatus than the predetermined face is erased. 前記距離測定部は、前記顔検出部で検出された顔にフォーカスを合わせることによりその顔までの距離を測定することを特徴とする請求項1記載の撮像装置。   The imaging apparatus according to claim 1, wherein the distance measurement unit measures the distance to the face by focusing on the face detected by the face detection unit. 撮像装置の画像表示部に画像を表示する表示方法において、
入力された画像から人物の顔を検出し、
検出した前記顔と前記撮像装置との距離を測定し、
測定した前記距離に応じて、検出された前記顔に対する指標を変化させ、その指標を前記画像の前記顔の位置に付加し、
前記指標が付加された顔の画像を表示することを特徴とする表示方法。
In a display method for displaying an image on an image display unit of an imaging apparatus,
Detect human faces from input images,
Measure the distance between the detected face and the imaging device,
According to the measured distance, the index for the detected face is changed, the index is added to the position of the face of the image,
A display method comprising displaying an image of a face to which the index is added.
立体的に視認可能な静止画像または立体的に視認可能な動画像を撮像する撮像装置において、
入力された第1画像から人物の顔を検出する第1顔検出部と、
入力された第2画像から前記人物の前記顔を検出する第2顔検出部と、
前記第1顔検出部が検出した前記顔の画像と、前記第2顔検出部が検出した前記顔の画像との視差を計算する視差計算部と、
前記視差計算部で計算された視差に応じて、前記顔に対する指標を変化させ、その指標を、前記第1画像及び前記第2画像の内の少なくとも一方の画像の前記顔の位置に付加する顔指標付加部と、
前記顔指標付加部で指標が付加された前記顔の画像を表示する画像表示部と、
を備えることを特徴とする撮像装置。
In an imaging device that captures a stereoscopically visible still image or a stereoscopically visible moving image,
A first face detecting unit for detecting a human face from the input first image;
A second face detection unit for detecting the face of the person from the input second image;
A parallax calculation unit that calculates parallax between the face image detected by the first face detection unit and the face image detected by the second face detection unit;
A face that changes an index for the face according to the parallax calculated by the parallax calculation unit, and adds the index to the position of the face of at least one of the first image and the second image. An index adding unit;
An image display unit for displaying an image of the face to which an index is added by the face index adding unit;
An imaging apparatus comprising:
JP2010084925A 2010-04-01 2010-04-01 Imaging apparatus and display method Pending JP2011217229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010084925A JP2011217229A (en) 2010-04-01 2010-04-01 Imaging apparatus and display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010084925A JP2011217229A (en) 2010-04-01 2010-04-01 Imaging apparatus and display method

Publications (1)

Publication Number Publication Date
JP2011217229A true JP2011217229A (en) 2011-10-27

Family

ID=44946491

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010084925A Pending JP2011217229A (en) 2010-04-01 2010-04-01 Imaging apparatus and display method

Country Status (1)

Country Link
JP (1) JP2011217229A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9064310B2 (en) 2012-06-15 2015-06-23 Kabushiki Kaisha Toshiba Position estimation device, position estimation method, and computer program product
JP2019033491A (en) * 2016-06-12 2019-02-28 アップル インコーポレイテッドApple Inc. User interface for camera effect
JP2020184725A (en) * 2019-05-09 2020-11-12 東芝テック株式会社 Tracking device and information processing program
JP2020184733A (en) * 2019-05-09 2020-11-12 東芝テック株式会社 Tracking device and information processing program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09200508A (en) * 1996-01-16 1997-07-31 Olympus Optical Co Ltd Image processor
JP2009223835A (en) * 2008-03-18 2009-10-01 Sony Corp Photographing device, image processor, and image processing method and program therefor
JP2009267787A (en) * 2008-04-25 2009-11-12 Sony Corp Composition determination device, composition determination method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09200508A (en) * 1996-01-16 1997-07-31 Olympus Optical Co Ltd Image processor
JP2009223835A (en) * 2008-03-18 2009-10-01 Sony Corp Photographing device, image processor, and image processing method and program therefor
JP2009267787A (en) * 2008-04-25 2009-11-12 Sony Corp Composition determination device, composition determination method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9064310B2 (en) 2012-06-15 2015-06-23 Kabushiki Kaisha Toshiba Position estimation device, position estimation method, and computer program product
JP2019033491A (en) * 2016-06-12 2019-02-28 アップル インコーポレイテッドApple Inc. User interface for camera effect
JP2020184725A (en) * 2019-05-09 2020-11-12 東芝テック株式会社 Tracking device and information processing program
JP2020184733A (en) * 2019-05-09 2020-11-12 東芝テック株式会社 Tracking device and information processing program
JP7253441B2 (en) 2019-05-09 2023-04-06 東芝テック株式会社 Tracking device and information processing program
JP7253440B2 (en) 2019-05-09 2023-04-06 東芝テック株式会社 Tracking device and information processing program

Similar Documents

Publication Publication Date Title
JP4657313B2 (en) Stereoscopic image display apparatus and method, and program
US20160295194A1 (en) Stereoscopic vision system generatng stereoscopic images with a monoscopic endoscope and an external adapter lens and method using the same to generate stereoscopic images
JP2011064894A (en) Stereoscopic image display apparatus
US10942439B2 (en) Real-time tracking for three-dimensional imaging
US20140293007A1 (en) Method and image acquisition system for rendering stereoscopic images from monoscopic images
JP5467993B2 (en) Image processing apparatus, compound-eye digital camera, and program
TW201216204A (en) Method for combining dual-lens images into mono-lens image
US9558719B2 (en) Information processing apparatus
JP2011010126A (en) Image processing apparatus, and image processing method
JP2010181826A (en) Three-dimensional image forming apparatus
JP5840022B2 (en) Stereo image processing device, stereo image imaging device, stereo image display device
JP7271215B2 (en) SYNCHRONIZATION CONTROL DEVICE, SYNCHRONIZATION CONTROL METHOD, AND PROGRAM
JP6155471B2 (en) Image generating apparatus, imaging apparatus, and image generating method
JP2011217229A (en) Imaging apparatus and display method
CN109799899A (en) Interaction control method, device, storage medium and computer equipment
JP2015103991A (en) Image processing apparatus, method and computer program
JP6257260B2 (en) Imaging apparatus and control method thereof
JP2006017632A (en) Three-dimensional image processor, optical axis adjustment method, and optical axis adjustment support method
JP2013074473A (en) Panorama imaging apparatus
JP2006340017A (en) Device and method for stereoscopic video image display
JPH10170227A (en) Display device
JP2006309626A (en) Arbitrary viewpoint image generation device
JP5351878B2 (en) Stereoscopic image display apparatus and method, and program
JP5689693B2 (en) Drawing processor
JPWO2012086298A1 (en) Imaging apparatus, method and program

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120724

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130625

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140225