JP2018088049A - Device, method and program for image processing - Google Patents
Device, method and program for image processing Download PDFInfo
- Publication number
- JP2018088049A JP2018088049A JP2016230046A JP2016230046A JP2018088049A JP 2018088049 A JP2018088049 A JP 2018088049A JP 2016230046 A JP2016230046 A JP 2016230046A JP 2016230046 A JP2016230046 A JP 2016230046A JP 2018088049 A JP2018088049 A JP 2018088049A
- Authority
- JP
- Japan
- Prior art keywords
- human body
- distance
- image
- person
- area
- 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
Links
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、画像から被写体等の領域を検出する画像処理装置、画像処理方法及びプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program for detecting a region such as a subject from an image.
画像から特定の被写体画像を自動的に検出する技術は、画像検索、物体検知、物体認識、物体追跡など様々な分野に応用される。このような技術の例として画像の中から特に人物領域を検出(以後、人体検出と称す。)する方法が非特許文献1に開示されている。この方法では、入力画像から抽出した多数の検出ウインドウを、予め膨大な数の人物画像を用いて学習した辞書データと照合することによって人物領域の検出を実現している。さらに、特許文献1では、積分画像を利用して人物の検出に有効なHistgram of Oriented Gradients(以後HOGと称す。)特徴量を求め、アダブースト学習で得たカスケード型識別器を適用することで高速化を実現している。カスケード型識別器を用いた識別方法は、複数の識別器を直列に結合することによって効率よく検出対象を絞り込んでいく方法である。 A technique for automatically detecting a specific subject image from an image is applied to various fields such as image retrieval, object detection, object recognition, and object tracking. As an example of such a technique, Non-Patent Document 1 discloses a method for detecting a human area from an image (hereinafter referred to as human body detection). In this method, detection of a person region is realized by collating a large number of detection windows extracted from an input image with dictionary data learned in advance using a huge number of person images. Furthermore, in Patent Document 1, a feature amount of Histogram of Oriented Gradients (hereinafter referred to as HOG) that is effective for human detection is obtained by using an integral image, and a cascade type discriminator obtained by Adaboost learning is applied for high speed. Has been realized. The identification method using a cascade classifier is a method of narrowing down detection targets efficiently by connecting a plurality of classifiers in series.
以上述べてきた方法では、検出結果として得られる被写体の位置と、画像内の実際の被写体の位置とでずれが生じてしまうという問題がある。例えば、従来手法を用いた人体検出の場合、検出結果として得られる人体の頭頂部の位置と、画像内の実際の人体の頭頂部の位置とがずれてしまうことがある。これは、従来手法の人体検出では、髪型や帽子等、様々に変化する可能性のある人体の頭頂部を検出する必要があるため、頭部等の特定輪郭の位置を正確に検出するのではなく、検出対象の領域内に人体頭部の大まかな輪郭があることを検出しているためである。 In the method described above, there is a problem that a deviation occurs between the position of the subject obtained as a detection result and the position of the actual subject in the image. For example, in the case of human body detection using a conventional method, the position of the top of the human body obtained as a detection result may be displaced from the actual position of the top of the human body in the image. This is because the human body detection of the conventional method needs to detect the top of the human body that may change variously, such as the hairstyle and hat, so it is not possible to accurately detect the position of a specific contour such as the head. This is because it is detected that there is a rough outline of the human head in the region to be detected.
そこで、本発明は、画像から人体等の領域を正確に検出可能にすることを目的とする。 Therefore, an object of the present invention is to make it possible to accurately detect a region such as a human body from an image.
本発明は、入力画像から被写体に関する第一の領域を検出する第一の検出手段と、前記入力画像から前記被写体に関する複数の第二の領域を検出する第二の検出手段と、前記第一の検出手段により検出された前記第一の領域と、前記第二の検出手段により検出された複数の前記第二の領域のそれぞれとの間の距離を算出する距離算出手段と、前記距離算出手段により算出される距離に対する条件を設定する条件設定手段と、前記第二の検出手段により検出された前記複数の第二の領域の中で、前記距離算出手段により算出された距離が、前記距離に対する条件を満たさない第二の領域を、削除する削除手段と、を有することを特徴とする。 The present invention provides a first detection means for detecting a first area related to a subject from an input image, a second detection means for detecting a plurality of second areas related to the subject from the input image, and the first A distance calculating unit that calculates a distance between the first region detected by the detecting unit and each of the plurality of second regions detected by the second detecting unit; and the distance calculating unit. Condition setting means for setting a condition for the calculated distance, and the distance calculated by the distance calculation means among the plurality of second areas detected by the second detection means is a condition for the distance And deleting means for deleting the second area that does not satisfy the condition.
本発明によれば、画像から人体等の領域を正確に検出可能となる。 According to the present invention, a region such as a human body can be accurately detected from an image.
以下、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。
本実施形態の画像処理装置は、一例として、デジタルカメラやデジタルビデオカメラ、カメラ機能を備えたスマートフォンやタブレット端末等の各種携帯端末、工業用カメラ、車載カメラ、医療用カメラ等に適用可能である。特に、本実施形態の画像処理装置は、画像から人物画像(以下、単に人物とする。)などの特定の被写体領域又は被写体の一部領域を検出する機能を有する。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
As an example, the image processing apparatus of the present embodiment can be applied to a digital camera, a digital video camera, various mobile terminals such as a smartphone or a tablet terminal having a camera function, an industrial camera, an in-vehicle camera, a medical camera, and the like. . In particular, the image processing apparatus according to the present embodiment has a function of detecting a specific subject area such as a person image (hereinafter simply referred to as a person) or a partial area of the subject from the image.
図1は、本実施形態に係る画像処理装置の概略的なハードウェア構成図である。本実施形態の画像処理装置は、CPU(Central Processing Unit)101、記憶装置102、入力装置103、及び出力装置104を含んで構成される。なお、各装置は互いに通信可能に構成され、バス等により接続されている。
FIG. 1 is a schematic hardware configuration diagram of an image processing apparatus according to the present embodiment. The image processing apparatus according to the present embodiment includes a CPU (Central Processing Unit) 101, a
CPU101は、画像処理装置の動作をコントロールし、記憶装置102に格納されたプログラムの実行等を行う。記憶装置102は、磁気記憶装置、半導体メモリ等のストレージデバイスであり、CPU101の動作に基づき読み込まれたプログラムや長時間記憶しなくてはならないデータ等を記憶する。また、記憶装置102は、図示しない撮像装置(カメラ)により撮影された画像データも記憶する。本実施形態では、CPU101が記憶装置102に格納されたプログラムの手順に従って処理を行うことによって、画像処理装置の後述する機能及びフローチャートに係る処理が実現される。
The
入力装置103は、マウス、キーボード、タッチパネルデバイス、ボタン等であり、ユーザから各種の指示が入力される。また、入力装置103は、画像を撮影する撮像装置(カメラ)を含んでいてもよい。撮像装置は、公知のCCD素子などの撮像素子を有して構成されており画像の撮影を行う。出力装置104は、液晶パネル、外部モニタ等であり、各種の情報を出力する。
The
なお、画像処理装置のハードウェア構成は、上述した構成に限られるものではない。例えば、各種の装置間で通信を行うためのI/O装置を備えてもよい。I/O装置は、メモリーカード、USBケーブル等の入出力部、有線、無線等による送受信部などである。 Note that the hardware configuration of the image processing apparatus is not limited to the above-described configuration. For example, an I / O device for performing communication between various devices may be provided. The I / O device is a memory card, an input / output unit such as a USB cable, a wired / wireless transmission / reception unit, or the like.
図2は、本実施形態に係る画像処理装置の機能構成を示す機能ブロック図である。図2の機能ブロックは、本実施形態の画像処理装置の例えば図1のCPU101が、記憶装置102に格納されたコンピュータプログラムを読み込んで実行することにより、ソフトウェア構成として構築されてもよい。もちろん、図2の機能ブロックは、全てがハードウェア構成又はソフトウェア構成として構築されていてもよいし、一部がハードウェア、残りがソフトウェアで構成されてもよい。また、図2に示した構成は一例であり、例えば各ブロックのうち幾つかが統合されていてもよく、各ブロックの機能を実現可能な構成であれば、如何なる構成が採用されていてもよい。
FIG. 2 is a functional block diagram showing a functional configuration of the image processing apparatus according to the present embodiment. 2 may be constructed as a software configuration by, for example, the
図2において、画像入力部201は、本実施形態において画像処理の対象となる画像を取得する。画像入力部201が取得する画像は、図1の記憶装置102から読み出された画像や、カメラにより撮像された画像などである。
顔検出部202は、画像入力部201により取得された入力画像から、人物の顔領域を検出する。顔検出部202は、入力画像の中に複数の人物が存在している場合には、それら人物毎の顔領域を検出する。顔検出部202における顔検出処理の詳細は後述する。そして、顔検出部202は、人物毎に検出した顔領域の情報を、距離算出部204に出力する。
In FIG. 2, an
The
人体検出部203は、画像入力部201の入力画像から複数の人体領域を検出する。人体検出部203は、入力画像の中に複数の人物が存在している場合、それら人物毎に複数の人体領域を検出する。人体検出部203における人体領域の検出処理の詳細は後述する。そして、人体検出部203は、人物毎に検出した複数の人体領域の情報を、顔人体距離算出部204に出力する。
The human
距離算出部204は、顔検出部202で検出された顔領域と、人体検出部203で検出された複数の人体領域とに基づき、それら顔領域と複数の人体領域との間の距離を算出する。距離算出部204は、入力画像の中に複数の人物が存在していた場合には、それらの人物毎に、顔領域と複数の人体領域との間の距離を算出する。なお、顔領域と人体領域との間の距離(以下、顔人体距離とする。)の定義と、距離算出部204における顔人体距離の算出処理の詳細は後述する。そして、距離算出部204は、人物毎の顔領域及び複数の人体領域の情報と、それら人物毎の顔領域と複数の人体領域との間の顔人体距離の情報とを、削除部206に出力する。
The
条件設定部205は、顔人体距離に対する条件(以下、距離条件とする。)を設定し、その距離条件の情報を削除部206に出力する。条件設定部205における距離条件の詳細は後述する。
The
削除部206は、顔人体距離と距離条件の情報とに基づき、複数の人体領域の中から、人体領域としては不適合とみなせる人体領域を削除する。削除部206は、入力画像の中に複数の人物が存在していた場合には、それら人物毎に、複数の人体領域の中から、人体領域としては不適合とみなせる人体領域を削除する。削除部206における不適合領域の削除処理の詳細は後述する。そして、削除部206は、人物毎に不適合な人体領域が削除された後の残りの複数の人体領域の情報を、統合処理部207に出力する。
The deleting
統合処理部207は、削除部206による不適合領域を削除した後の、複数の人体領域の中から、それら複数の人体領域の位置とサイズの関係に基づき、一つの人体領域を決定する。統合処理部207は、入力画像の中に複数の人物が存在していた場合には、それら人物毎に、複数の人体領域の中から一つの人体領域を決定、つまり一人の人物について一つの人体領域を決定する。統合処理部207における検出結果の統合処理の詳細は後述する。本実施形態において、統合処理部207により人物毎に決定された一つの人体領域を、各人物において最終的に得られた人体領域の情報として出力する。
The
図3は、図2の機能ブロックにより表される本実施形態の画像処理装置における画像処理の流れを示すフローチャートである。なお、図3のフローチャートの処理は、ハードウェア構成により実現される場合だけでなく、CPU等がコンピュータプログラムを実行することにより実現されてもよい。これらのことは、後述する他のフローチャートにおいても同様とする。 FIG. 3 is a flowchart showing the flow of image processing in the image processing apparatus of the present embodiment represented by the functional blocks of FIG. Note that the processing of the flowchart in FIG. 3 is not only realized by a hardware configuration, but may be realized by a CPU or the like executing a computer program. The same applies to other flowcharts described later.
図3のステップS301では、顔検出部202は、画像入力部201からの入力画像に対し、顔検出処理を実行する。本実施形態における顔検出処理は、公知の方法を用いることができ、例えば、顔画像に対するテンプレートマッチングを用いる方法や、予め機械学習した特徴抽出フィルタを検出器として用いる方法などが適用可能である。本実施形態では、これら公知の顔検出処理の何れを用いてもよく、特定の顔検出方式に限定されるものではない。顔検出部202により検出された顔領域の情報は、距離算出部204に送られる。ステップS301の後、画像処理装置の処理は、人体検出部203にて行われるステップS302の処理に進む。
In step S <b> 301 of FIG. 3, the
図3のステップS302では、人体検出部203は、画像入力部201からの入力画像に対して人体検出処理を実行する。本実施形態における人体検出処理では、例えば、人物の肩から頭部にかけての形状、つまりΩ(オメガ)形状を検出する手法を例に挙げて、以下の説明を行う。
In step S <b> 302 of FIG. 3, the human
図4は、図3のステップS302の人体検出処理の詳細なフローチャートである。
図4のステップS401では、人体検出部203は、画像入力部201からの入力画像を所定の異なる倍率毎に縮小した複数の縮小画像を生成する。これは、様々な大きさの人物を検出するために、複数サイズの各画像に対して順次、人体検出処理を行うようにするためである。ステップS401の後、人体検出部203は、ステップS402に処理を進める。
FIG. 4 is a detailed flowchart of the human body detection process in step S302 of FIG.
In step S401 in FIG. 4, the human
ステップS402において、人体検出部203は、ステップS401で生成した複数の縮小画像の中から、以降の処理の対象となる画像(以下、処理対象画像とする。)を1枚設定する。ステップS402の後、人体検出部203は、ステップS403に処理を進める。
ステップS403では、人体検出部203は、ステップS402で設定した処理対象画像に対し、所定の大きさの部分領域を設定する。以降、この部分領域を検出ウインドウと呼ぶ。ステップS403の後、人体検出部203は、ステップS404に処理を進める。
In step S402, the human
In step S403, the human
ステップS404では、人体検出部203は、人体の認識モデルを用い、検出ウインドウ内に人体領域とみなせる候補領域が含まれるか否かの人体判別処理を行う。ここで、図5は、ステップS401で画像入力部201から供給された入力画像510と、その入力画像510を縮小した複数の縮小画像511と、ステップS403で設定された検出ウインドウ502との関係を示す図である。この図5に示すように、ステップS404の人体判別処理は、この検出ウインドウ502を用いて行われる。人体判別処理では縮小画像511の全域が人体検出対象となされるため、人体検出部203は、縮小画像511内において、検出ウインドウ502を図5の矢印501で示すように数画素刻みで走査する。具体的には、人体検出部203は、検出ウインドウ502を、縮小画像511の左端から右横方向に数画素刻みで走査し、右端に到達した後は縦方向に数画素分だけずらして左端に戻し、その後は同様に右横方向に数画素刻みで走査することを繰り返す。
In step S404, the human
また、ステップS404の人体判別処理は、検出ウインドウ502の画像パターンに対して人体認識モデルを適用して尤度(人体らしさ)を出力するものであればどのような方法でもよく、特に限定されるものではない。一例として、ステップS404の人体判別処理としては、前述した非特許文献1に開示されているような方法を用いることができる。なお、非特許文献1には、検出ウインドウ内の複数領域から認識対象に対する尤度を取得し、これら尤度と予め設定した閾値を比較することで検出ウインドウに認識対象が含まれるか否かを判別する方法が開示されている。そして、人体検出部203は、検出ウインドウ502の画像が人体の画像であると判別した場合、その縮小画像511における検出ウインドウ502の位置座標を後段の処理(ステップS407)に渡す。ステップS404の後、人体検出部203は、ステップS405に処理を進める。
The human body discrimination process in step S404 is not particularly limited as long as it applies a human body recognition model to the image pattern in the
ステップS405では、人体検出部203は、縮小画像511内を検出ウインドウ502により全て走査したか否かを判定する。人体検出部203は、ステップS405において走査が終了していないと判定(No)した場合には、前述したステップS403に処理を戻し、ステップS403以降の処理を行う。そして、人体検出部203は、ステップS405において、縮小画像511内の全ての走査が終了したと判定(Yes)した場合には、ステップS406に処理を進める。
In step S <b> 405, the human
ステップS406では、人体検出部203は、入力画像510から生成された複数の縮小画像511の全てに対して、ステップS402からステップS405までの処理が終わったか否かを判定する。人体検出部203は、ステップS406において、全ての縮小画像511に対する処理が終了していないと判定(No)した場合には、ステップS402に処理を戻し、ステップS402以降の処理を行う。そして、人体検出部203は、ステップS406において、全ての縮小画像511に対する処理が終了したと判定(Yes)した場合には、ステップS407に処理を進める。
In step S406, the human
ステップS407では、人体検出部203は、ステップS402からステップS406までの処理により、複数の各縮小画像511からそれぞれ検出された人体領域について、その人体領域の位置座標を元の入力画像510の座標系に変換する。そして、人体検出部203は、それら複数の縮小画像511から検出されてそれぞれ座標変換がなされた後の複数の人体領域を、それぞれ人体領域の候補として、図2の距離算出部204に出力する。このステップS407の処理後、人体検出部203は、図4のフローチャートの処理(図3のステップS302の処理)を終了する。その後、画像処理装置の処理は、距離算出部204にて行われる図3のステップS303に進む。
In step S407, the human
図12(a)は、人体検出部203により入力画像1201から検出された、複数の人体領域1210,1211の候補の一例を示す図である。なお、図12(b)の説明は後述する。図12(a)の例では、入力画像1201内には被写体として二人の人物801,802が写っているとする。人体検出部203は、この入力画像1201から図4のステップS401〜407までの処理により複数の人体領域1210,1211を検出する。ここで、図4のステップS401〜407までの処理では、入力画像1201から複数の縮小画像が生成され、それら複数の縮小画像からそれぞれ複数の人体領域が検出される。また、一つの縮小画像内においても、隣り合う複数の検出ウインドウにおいてそれぞれ人体領域が検出されることがある。このため、結果として、図12(a)に示すように、入力画像1201内の人物801については複数の人体領域1210が検出され、人物802についても複数の人体領域1211が検出される。したがって、人体検出部203から図2の距離算出部204には、一人の人物につき複数検出された人体領域を示す情報が出力される。
FIG. 12A is a diagram illustrating an example of candidates for a plurality of
図3に説明を戻す。図3のステップS303では、距離算出部204は、顔検出部202から供給された顔領域の情報と、人体検出部203から供給された複数の人体領域の情報とを用い、顔と人体の距離(以下、顔人体距離と呼ぶ。)を算出する。本実施形態の場合、人体検出部203は、顔領域の中心点(中心点の座標)と、複数の人体領域の各頭頂部(頭頂点の座標)との間の各距離を、それぞれ顔人体距離として算出する。
Returning to FIG. In step S303 of FIG. 3, the
図6は、顔検出部202にて検出された顔領域602と、人体検出部203にて検出された複数の人体領域の中の一つの人体領域601と、距離算出部204が算出する顔人体距離605との関係を表す図である。図6に示すように、顔人体距離605は、顔領域602の中心点603と人体領域601の頭頂部604との間の距離として求められる。
FIG. 6 shows a
具体的には、距離算出部204は、以下の演算により顔人体距離を算出する。ここで、顔領域602を表す矩形領域の4点(4角)の座標のうち、左上座標をF1(Xf1,Yf1)、右下座標をF2(Xf2,Yf2)とする。また、人体領域601を表す矩形領域の4点(4角)の座標のうち、左上座標をH1(Xh1,Yh1)、右上座標をH2(Xh2,Yh2)とする。この場合、顔領域の中心点の座標は((Xf2−Xf1)/2,(Yf2−Yf1)/2)となり、人体の頭頂部の位置(頭頂点)の座標は((Xh2−Xh1)/2,Yh1))になる。そして、顔人体距離605の値(顔人体距離Lfh)は、下記式(1)により算出することができる。
Lfh=√(((Xf2-Xf1)/2-(Xh2-Xh1)/2)2+((Yf2-Yf1)/2-Yh1))2) 式(1)
Specifically, the
Lfh = √ (((Xf2-Xf1) / 2- (Xh2-Xh1) / 2) 2 + ((Yf2-Yf1) / 2-Yh1)) 2 ) Formula (1)
距離算出部204は、前述したようにして、人物毎に、顔領域と複数の人体領域とについてそれぞれ顔人体距離を算出し、それら顔領域と複数の人体領域の情報と、それぞれ算出した顔人体距離の情報とを、削除部206に出力する。ステップS303の後、画像処理装置の処理は、削除部206にて行われるステップS304に進む。
As described above, the
ステップS304では、削除部206は、人物毎に、ステップS302で検出された複数の人体領域のうち、不適合と判断した人体領域を削除する。具体的には、削除部206は、ステップS303で人体領域毎にそれぞれ算出した顔人体距離が所定の条件を満たすか否かを判定し、顔人体距離が所定の条件を満たさない人体領域については削除する。
In step S304, the
図7は、削除部206における不適合領域の削除処理の詳細なフローチャートである。また、図8は、撮像装置であるカメラ803とそのカメラ803が撮影した被写体である人物801,802との位置関係の一例を示した図である。図8の例では、カメラ803は例えば天井に固定され且つ天井に対して斜め下の前方向を撮影するように設置されている。また、図8の例では、被写体は二人の人物801,802であり、これら人物801,802は、カメラ803の撮影画角内で且つカメラ803からの距離がそれぞれ異なる位置にいるとする。また、図9は、図8に例示したカメラ803により二人の人物801,802が撮影されて得られた画像例を示す図である。図9の画像中の人物801,802は、図8のカメラ803により撮影された人物801,802である。以下、図8、図9の例を参照しながら、図7のフローチャートの処理を説明する。
FIG. 7 is a detailed flowchart of the nonconforming area deletion process in the
図7のステップS701では、削除部206は、条件設定部205により設定される顔人体距離に対する条件(距離条件)を基に、それぞれの人物毎に、顔人体距離に対して適用する所定の条件を決定する。図7のフローチャートに示す不適合領域の削除処理は、複数の人体領域の中から、顔と人体の位置関係が実際にはありえない状況となっている人体領域を検出し、その人体領域を不適として削除する処理である。このため、削除部206は、条件設定部205により設定された距離条件を基に、人物毎に、顔人体距離に対する下限値と上限値を、所定の条件として決定する。
In step S701 in FIG. 7, the
また、削除部206は、顔人体距離に対する所定の条件を、画像内で人体が存在している位置に応じて決定する。本実施形態の場合、撮影により取得された画像が図9に示すような三つの領域901,902,903に分けられ、画像内の人物の位置が、それら領域901,902,903の何れの位置であるかに応じて、顔人体距離に対して適用する所定の条件が決定される。
The
ここで、図8の例では、カメラ803が斜め下の前方向を撮影する向きに設置され、人物801,802の位置がカメラ803の撮影画角内で且つその距離が異なっており、この場合、カメラ803から見下ろす角度が人物801と人物802とで異なる。また、この図8の例の場合、カメラ803が人物801,802を見下ろす角度によって、カメラ803の撮影画像内における人物801,802の位置が異なる。具体的には、カメラ803が見下ろす角度が大きくなる人物801の撮影画像内の位置は、図9に示すように撮影画像の下側の位置となる。一方、カメラ803が見下ろす角度が小さくなる人物802の撮影画像内の位置は、図9に示すように撮影画像の上側の位置となる。また、顔中心と頭頂部との間の顔人体距離に注目すると、図8、図9の例のように、人物801と人物802の撮影画像内の位置によって、それら人物801と人物802のそれぞれの顔人体距離は異なる。具体的には、撮影画像内で下側の位置に写っている人物801の顔人体距離は、撮影画像内で上側の位置に写っている人物802の顔人体距離よりも大きく。このため、本実施形態において、削除部206は、画像内において検出された人体領域の位置に応じて、顔人体距離に対する所定の条件をそれぞれ決定する。例えば、削除部206は、図9に示すように、画像が三つの領域(分割領域901〜903)に分割される場合、人体領域が何れの分割領域901〜903に位置しているかに応じて、顔人体距離に適用する所定の条件を決定する。
Here, in the example of FIG. 8, the
図10は、図8と図9の例において、画像内における人体領域の位置に応じて、顔人体距離に適用する所定の条件の一例を示す図である。図10は、図9の分割領域901,902,903と、それら各分割領域901〜903について顔人体距離Lfhに対する上限値と下限値の条件(条件ID)が対応付けられた対応表を示している。図10の対応表に設定されている条件は、カメラからの距離が近く、カメラが見下ろす角度が大きくなる人物、つまり画像内で下側に位置している人物ほど、顔人体距離Lfhの上限値と下限値が大きくなるような条件となされている。そして、削除部206は、図10に示す対応表を参照し、ステップS302で検出した顔領域の位置が分割領域901〜903の何れに含まれているかに応じて、顔人体距離Lfhに対する所定の条件を決定する。
FIG. 10 is a diagram illustrating an example of a predetermined condition applied to the face human body distance according to the position of the human body region in the image in the examples of FIGS. 8 and 9. FIG. 10 shows a correspondence table in which the divided
一例として、図9の人物802の場合、分割領域901内に顔領域が存在しているため、その人物802の人体領域に対して、削除部206は、顔人体距離Lfhに対する所定の条件として、条件ID(1001)の10=<Lfh<15を決定する。条件ID(1001)では、「10」が顔人体距離Lfhに対する下限値、「15」が顔人体距離Lfhに対する上限値に相当する。また例えば、図9の人物801の場合、分割領域903内に顔領域が存在しているため、削除部206は、顔人体距離Lfhに対する所定の条件として、条件ID(1003)の20=<Lfh<25を決定する。条件ID(1002)では、「20」が顔人体距離Lfhに対する下限値、「25」が顔人体距離Lfhに対する上限値に相当する。
As an example, in the case of the
図10に例示したような対応表の情報は、予め統計的に調べた情報を基に用意しておけばよい。例えば、様々なカメラアングル(カメラが人物を見下ろす際の角度)で撮影した画像と、その画像内に写る人物の顔人体距離の統計値とを基に、対応表を生成し、その対応表の情報を例えば図1の記憶装置102内に格納しておくようにする。なお、図10の例の対応表は、例えば図8のカメラ803に対して用意された対応表であり、このため、カメラが異なる場合やそのカメラの設置方法等が異なれば、対応表も異なるものが使用される。図2の条件設定部205は、設置されたカメラに応じた図10のような対応表を設定し、削除部206は、その対応表を参照して前述のように条件を決定する。ステップS701の後、削除部206は、ステップS702に処理を進める。
The information in the correspondence table illustrated in FIG. 10 may be prepared based on information that has been statistically examined in advance. For example, a correspondence table is generated on the basis of images taken at various camera angles (angles when the camera looks down at a person) and statistics of the human body distance of the person in the image. For example, the information is stored in the
ステップS702では、削除部206は、人物毎に、ステップS302で検出した複数の人体領域の中の一つを、顔人体距離の判定対象の人体領域として設定する。
ここで、図9に例示した人物801,802のうち、人物802の人体領域が、顔人体距離の判定対象として設定されたとする。図11は、人物802の人物領域のみを抜き出して示す図である。図11の例では、前述のステップS301で検出された顔領域1101と、ステップS302で検出された複数の人体領域1102〜1104と、それら複数の人体領域1102〜1104について算出された各顔人体距離1105〜1107とが示されている。
In step S702, the
Here, it is assumed that the human body region of the
図11の例では、三つの人体領域1102〜1104が検出されているため、削除部206は、ステップS702において、それら三つの人体領域1102〜1104の中から、顔人体距離の判定処理の対象とする人体領域を一つずつ順番に設定する。具体的には、削除部206は、人体領域1102〜1104のうち、それぞれの人体領域を表す矩形領域の4点の座標のうち例えば左上座標のY座標値が小さい方から順の人体領域を、顔人体距離の判定対象の人体領域として設定する。図11の例の場合、左上座標のY座標値が小さい順番では人体領域1102,1103,1104の順であるため、ステップS702では、最初に、人体領域1102が判定対象として設定される。ステップS207の後、削除部206は、ステップS703に処理を進める。
In the example of FIG. 11, since three
ステップS703では、削除部206は、ステップS702で顔人体距離の判定対象に設定された人体領域1102について、その人体領域1102の顔人体距離が、ステップS701で決定した条件に該当するか否かを判定する。前述したステップS701では、人体領域1102の人物802に対しては図10の条件ID(1001)が決定されるため、ステップS703では、削除部206は、人体領域1102の顔人体距離Lfhが、条件ID(1001)に該当するか否かを判定する。具体的には、削除部206は、ステップS703において、人体領域1102の顔人体距離Lfh(1005)と条件ID(1001)とを基に、以下の式(2)を満たすか否かを判定する。
10=<Lfh(1105)<15 式(2)
In step S703, the
10 = <Lfh (1105) <15 Formula (2)
そして、削除部206は、式(2)を満たすと判定(Yes)した場合には、人体領域1102は顔の位置に対して正しい位置に存在していると判断して、ステップS705に処理を進める。一方、削除部206は、式(2)を満たさないと判定(No)した場合には、人体領域1102は顔の位置関係が不適と判断して、ステップS704に処理を進める。
If the
ステップS704では、削除部206は、ステップS703で不適と判断された人体領域(この場合は人体領域1102)を削除する。ステップS704の後、削除部206は、ステップS705に処理を進める。
In step S704, the
ステップS705では、削除部206は、ステップS302で検出した複数の人体領域の全てについてステップS702からS704までの処理が終わったか否か判定する。この時点では、図11の人体領域1102しか処理が終わっていないため、削除部206は、ステップS702に処理を戻す。
In step S705, the
この場合、ステップS702において、削除部206は、次の判定対象の人体領域として図11の人体領域1103を設定することになる。そして、削除部206は、前述同様に、人体領域1103についてステップS703,S704の処理を行う。そして、ステップS705からステップS702の処理に戻ると、削除部206は、さらに次の判定対象の人体領域として図11の人体領域1104を設定する。そして、人体領域1104について、ステップS703,S704の処理が行われる。なお、図11の例において、例えば人体領域1102が式(2)の条件を満たさず、人体領域1103,1104が式(2)の条件を満たした場合、人体領域1102が削除され、人体領域1103と1104は残される。
In this case, in step S702, the
また、削除部206は、図9の人物801についてステップS302で検出した各人体領域についても同様に、所定の条件を満たすか否か判定し、条件を満たさない人体領域を不適として削除する。なおこの場合、ステップS703では、人物801から検出された各人体領域について、前述した図10の条件ID(1003)の条件を用いた判定処理が行われる。
Similarly, the
前述したように、削除部206は、人物801と人物802からそれぞれステップS302で検出した複数のそれぞれの人体領域に対し、ステップS702で各々決定した所定の条件を満たすか否か判定し、条件を満たさない人体領域を不適として削除する。
As described above, the
図12(b)は、例えば前述した図12(a)の入力画像1201(つまり削除部206における不適合人体の削除処理前の画像例)に対し、削除部206による不適合人体の削除処理が行われた後の画像1202の一例を示す図である。図12(a)の例では、前述したように人物801,802に対し、それぞれ複数の人体領域1210,1211が検出されている。本実施形態では、削除部206により前述したような人体領域の顔領域の中心に対して不適な位置にある人体領域が削除されることで、図12(b)に示すように、人物801,802に対してそれぞれ人体領域1220,1221が残される。
In FIG. 12B, for example, the non-conforming human body deleting process by the deleting
図3に説明を戻す。図3のステップS304の後、画像処理装置の処理は、統合処理部207にて行われるステップS305に進む。ステップS305では、統合処理部207は、削除部206による不適合領域の削除処理後の人物毎に複数の人体領域を統合処理し、各人物につき一つの人体領域を決定する。具体的には、統合処理部207は、例えばMean−Shift等の手法を用いることにより、一人の人物について一つの人体結果が得られるような統合処理を行う。
Returning to FIG. After step S304 in FIG. 3, the processing of the image processing apparatus proceeds to step S305 performed in the
図13は、前述した図12(a),図12(b)の画像例において、統合処理部207により一人の人物について一つの人体領域が得られた画像例を示している。図13には、人物801については一つの人体領域1310が得られ、人物802についても一つの人体領域1311が得られた例が示されている。すなわち、削除部206からは一人の人物に対して複数の人体領域が出力されているが、統合処理部207は、一人の人物について一つの人体領域を出力する。このように、本実施形態の画像処理装置は、一人の人物につき一つの人体領域の情報を出力する。
FIG. 13 shows an image example in which one human body region is obtained for one person by the
以上説明したように、本実施形態によれば、入力画像から人物毎に複数検出された人体領域のうち、人物毎に顔領域の中心点との間の位置関係が不適な人体領域を削除することで、各人物の顔領域から位置がずれた人体領域が出力されることを防止している。また、本実施形態では、人体領域と顔領域の中心点との間の位置関係に対する条件を、カメラアングルによる人物の見え方の違いに対して適切に決定しているため、精度の高い条件判定が可能となり、不適な人体領域を精度良く削除することができる。 As described above, according to the present embodiment, a human body region having an inappropriate positional relationship with the center point of the face region is deleted for each person from a plurality of human body regions detected for each person from the input image. As a result, it is possible to prevent a human body region whose position is shifted from the face region of each person from being output. In the present embodiment, the condition for the positional relationship between the human body area and the center point of the face area is appropriately determined with respect to the difference in the appearance of the person depending on the camera angle. This makes it possible to delete an inappropriate human body region with high accuracy.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
101 CPU、102 記憶装置、103 入力装置、104 出力装置、201 画像入力部、202 顔検出部、203 人体検出部、204 顔人体距離算出部、205 顔人体距離条件設定部、206 不適合領域削除部、207 検出結果統合処理部 101 CPU, 102 storage device, 103 input device, 104 output device, 201 image input unit, 202 face detection unit, 203 human body detection unit, 204 face human body distance calculation unit, 205 face human body distance condition setting unit, 206 nonconforming region deletion unit , 207 Detection result integration processing unit
Claims (11)
前記入力画像から前記被写体に関する複数の第二の領域を検出する第二の検出手段と、
前記第一の検出手段により検出された前記第一の領域と、前記第二の検出手段により検出された複数の前記第二の領域のそれぞれとの間の距離を算出する距離算出手段と、
前記距離算出手段により算出される距離に対する条件を設定する条件設定手段と、
前記第二の検出手段により検出された前記複数の第二の領域の中で、前記距離算出手段により算出された距離が、前記距離に対する条件を満たさない第二の領域を、削除する削除手段と、
を有することを特徴とする画像処理装置。 First detection means for detecting a first region relating to the subject from the input image;
Second detection means for detecting a plurality of second regions related to the subject from the input image;
Distance calculating means for calculating a distance between the first area detected by the first detecting means and each of the plurality of second areas detected by the second detecting means;
Condition setting means for setting conditions for the distance calculated by the distance calculation means;
Deleting means for deleting a second area in which the distance calculated by the distance calculating means does not satisfy the condition for the distance among the plurality of second areas detected by the second detecting means; ,
An image processing apparatus comprising:
前記第二の検出手段は、前記第二の領域として人物の人体領域を検出し、
前記距離算出手段は、一人の人物につき前記検出された顔領域と複数の人体領域のそれぞれとの間の距離を算出することを特徴とする請求項1又は2に記載の画像処理装置。 The first detection means detects a human face area as the first area,
The second detection means detects a human body region of the person as the second region,
The image processing apparatus according to claim 1, wherein the distance calculating unit calculates a distance between the detected face area and each of a plurality of human body areas for one person.
前記削除手段は、前記入力画像の中の前記人物の位置に応じた条件を満たさない第二の領域を削除することを特徴とする請求項3に記載の画像処理装置。 The condition setting means sets a lower limit value and an upper limit value for the distance between the face area and the human body area as a condition for the distance in association with the position of the person in the input image,
The image processing apparatus according to claim 3, wherein the deletion unit deletes a second area that does not satisfy a condition corresponding to the position of the person in the input image.
前記削除手段は、前記複数の条件の中から、前記入力画像の中の人物の顔領域の位置に応じた条件を満たさない第二の領域を削除することを特徴とする請求項4に記載の画像処理装置。 The condition setting means sets a plurality of conditions in association with the position of a person in the input image as a condition for the distance,
The said deletion means deletes the 2nd area | region which does not satisfy | fill the conditions according to the position of the person's face area | region in the said input image from among these several conditions. Image processing device.
前記入力画像から前記被写体に関する複数の第二の領域を検出する第二の検出工程と、
前記第一の検出工程により検出された前記第一の領域と、前記第二の検出工程により検出された複数の前記第二の領域のそれぞれとの間の距離を算出する距離算出工程と、
前記距離算出工程により算出される距離に対する条件を設定する条件設定工程と、
前記第二の検出工程により検出された前記複数の第二の領域の中で、前記距離算出工程により算出された距離が、前記距離に対する条件を満たさない第二の領域を、削除する削除工程と、
を有することを特徴とする画像処理装置の画像処理方法。 A first detection step of detecting a first region related to the subject from the input image;
A second detection step of detecting a plurality of second regions related to the subject from the input image;
A distance calculation step of calculating a distance between the first region detected by the first detection step and each of the plurality of second regions detected by the second detection step;
A condition setting step for setting a condition for the distance calculated by the distance calculation step;
A deletion step of deleting a second region in which the distance calculated by the distance calculation step does not satisfy the condition for the distance among the plurality of second regions detected by the second detection step; ,
An image processing method for an image processing apparatus, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016230046A JP2018088049A (en) | 2016-11-28 | 2016-11-28 | Device, method and program for image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016230046A JP2018088049A (en) | 2016-11-28 | 2016-11-28 | Device, method and program for image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2018088049A true JP2018088049A (en) | 2018-06-07 |
Family
ID=62493777
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016230046A Pending JP2018088049A (en) | 2016-11-28 | 2016-11-28 | Device, method and program for image processing |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018088049A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110636252A (en) * | 2018-06-21 | 2019-12-31 | 佳能株式会社 | Image processing apparatus, image processing method, and medium |
CN111476160A (en) * | 2020-04-07 | 2020-07-31 | 杭州视在科技有限公司 | Loss function optimization method, model training method, target detection method, and medium |
JP2021033787A (en) * | 2019-08-27 | 2021-03-01 | 富士通クライアントコンピューティング株式会社 | Information processing apparatus and program |
WO2021140590A1 (en) | 2020-01-08 | 2021-07-15 | 日本電気株式会社 | Human detection device, human detection method, and recording medium |
JP2021520015A (en) * | 2018-09-10 | 2021-08-12 | ベイジン センスタイム テクノロジー デベロップメント カンパニー, リミテッド | Image processing methods, devices, terminal equipment, servers and systems |
-
2016
- 2016-11-28 JP JP2016230046A patent/JP2018088049A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110636252A (en) * | 2018-06-21 | 2019-12-31 | 佳能株式会社 | Image processing apparatus, image processing method, and medium |
US11188743B2 (en) | 2018-06-21 | 2021-11-30 | Canon Kabushiki Kaisha | Image processing apparatus and image processing method |
JP2021520015A (en) * | 2018-09-10 | 2021-08-12 | ベイジン センスタイム テクノロジー デベロップメント カンパニー, リミテッド | Image processing methods, devices, terminal equipment, servers and systems |
JP2021033787A (en) * | 2019-08-27 | 2021-03-01 | 富士通クライアントコンピューティング株式会社 | Information processing apparatus and program |
WO2021140590A1 (en) | 2020-01-08 | 2021-07-15 | 日本電気株式会社 | Human detection device, human detection method, and recording medium |
CN111476160A (en) * | 2020-04-07 | 2020-07-31 | 杭州视在科技有限公司 | Loss function optimization method, model training method, target detection method, and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102299847B1 (en) | Face verifying method and apparatus | |
US10423848B2 (en) | Method, system, and computer-readable recording medium for long-distance person identification | |
US10534957B2 (en) | Eyeball movement analysis method and device, and storage medium | |
US11087169B2 (en) | Image processing apparatus that identifies object and method therefor | |
JP4653606B2 (en) | Image recognition apparatus, method and program | |
JP2018088049A (en) | Device, method and program for image processing | |
JP6472184B2 (en) | Object identification device, object identification method, and program | |
JP2004192378A (en) | Face image processor and method therefor | |
US20160217326A1 (en) | Fall detection device, fall detection method, fall detection camera and computer program | |
JP7192582B2 (en) | Object tracking device and object tracking method | |
JP2008059197A (en) | Apparatus, method, computer program and storage medium for collating image | |
US10650234B2 (en) | Eyeball movement capturing method and device, and storage medium | |
CN110069989B (en) | Face image processing method and device and computer readable storage medium | |
JP2015099559A (en) | Image processing apparatus, image processing method, and program | |
JP6071002B2 (en) | Reliability acquisition device, reliability acquisition method, and reliability acquisition program | |
JP6157165B2 (en) | Gaze detection device and imaging device | |
CN109255802B (en) | Pedestrian tracking method, device, computer equipment and storage medium | |
WO2020172870A1 (en) | Method and apparatus for determining motion trajectory of target object | |
JP2015197708A (en) | Object identification device, object identification method, and program | |
JP2009129237A (en) | Image processing apparatus and its method | |
JP2018081402A (en) | Image processing system, image processing method, and program | |
CN111652018B (en) | Face registration method and authentication method | |
KR101542206B1 (en) | Method and system for tracking with extraction object using coarse to fine techniques | |
CN111126102A (en) | Personnel searching method and device and image processing equipment | |
EP3699865B1 (en) | Three-dimensional face shape derivation device, three-dimensional face shape deriving method, and non-transitory computer readable medium |