JP2019036030A - Object detection device, object detection method and object detection program - Google Patents
Object detection device, object detection method and object detection program Download PDFInfo
- Publication number
- JP2019036030A JP2019036030A JP2017155605A JP2017155605A JP2019036030A JP 2019036030 A JP2019036030 A JP 2019036030A JP 2017155605 A JP2017155605 A JP 2017155605A JP 2017155605 A JP2017155605 A JP 2017155605A JP 2019036030 A JP2019036030 A JP 2019036030A
- Authority
- JP
- Japan
- Prior art keywords
- ellipse
- image
- plane
- object detection
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、画像から円柱状又は球状の物体を検出する技術に関する。 The present invention relates to a technique for detecting a cylindrical or spherical object from an image.
現在、スポーツ競技や監視分野において、カメラで撮影された映像から実空間に存在する物体の位置を特定し、更には当該物体の位置を追跡することが行われている。具体的には、実空間を撮像したカメラから入力された少なくとも1つ以上の画像から、空間内に存在する円柱体又は球体の物体を検出し、当該物体の情報を画面に出力する技術が研究開発されている。 Currently, in sports competitions and surveillance fields, the position of an object that exists in real space is identified from video captured by a camera, and further, the position of the object is tracked. Specifically, research is being conducted on a technique for detecting a cylindrical or spherical object existing in space from at least one image input from a camera that captures real space, and outputting information on the object to the screen. Has been developed.
例えば、非特許文献1には、非特許文献2のMean shift法を用いて、底面の法線方向が床平面の法線と平行になるように配置された円柱物体を検出する技術が開示されている。Mean shift法ではテンプレートとなる指定領域内から特徴量を抽出し、これに類する特徴量を有する領域を現在処理中の画像から検出し、当該処理中の画像内からテンプレートに該当する位置を円柱物体として推定する。特徴量には、指定領域内の色情報から作成したヒストグラムが用いられることが多い。但し、背景等に類似色のパターンが存在する場合には誤検出が発生することがある。そこで、非特許文献1では、色情報にエッジ情報も加えて作成したヒストグラムを用いることで、高精度な円柱物体の検出を実現している。
For example, Non-Patent
従来の方法では、指定領域内のエッジ情報から作成したヒストグラムを用いて、底面の法線方向が床平面の法線と平行になるように配置された円柱物体を検出している。 In the conventional method, a cylindrical object arranged so that the normal direction of the bottom surface is parallel to the normal line of the floor plane is detected using a histogram created from edge information in the designated area.
しかしながら、背景に検出対象の円柱物体と類似の形状パターンが存在する場合、エッジ情報のみの利用では検出対象を誤検出するといった課題がある。また、ヒストグラム表現には幾何的な情報が失われているため、周囲に存在する円柱形状ではない形状パターンを有する物体から生成されたヒストグラムが、円柱物体から作成したものと類することで、検出対象の誤検出が生じるといった課題もある。 However, when a shape pattern similar to the cylindrical object to be detected exists in the background, there is a problem that the detection target is erroneously detected by using only the edge information. In addition, since geometric information is lost in the histogram representation, the histogram generated from an object having a shape pattern that is not a cylindrical shape that exists in the surrounding area is similar to that created from a cylindrical object, so that the detection target There is also a problem that false detection occurs.
また、別の問題として、現在の画像を撮影したカメラの向きが、テンプレートとなる画像を撮影した時のカメラの向きと異なる場合、円柱物体から抽出されるエッジの向きと強さが両者間で異なるため、円柱物体の検出漏れが生じるといった課題がある。円柱物体を円柱軸の向きとカメラの光軸が合致するように撮影した場合は撮影画像上で真円として観測されるが、斜めから撮影した画像上では楕円形状として観測されてしまい、エッジの大きさが真円よりも大きく異なってしまう。前者をテンプレートとし、後者を入力画像とした場合は、円柱物体の誤検出が生じることになる。 Another problem is that if the orientation of the camera that captured the current image is different from the orientation of the camera when the template image was captured, the orientation and strength of the edges extracted from the cylindrical object are Since they are different, there is a problem in that detection of a cylindrical object is leaked. When a cylindrical object is photographed so that the direction of the cylinder axis coincides with the optical axis of the camera, it is observed as a perfect circle on the photographed image. The size is much different from the perfect circle. When the former is used as a template and the latter is used as an input image, erroneous detection of a cylindrical object occurs.
本発明は、上記事情を鑑みてなされたものであり、背景又は周囲に被写体である円柱体又は球体の形状に類似の形状パターンがある場合や、円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像の場合であっても、被写体を撮影した少なくとも1つ以上の画像から、空間内に存在する底面の法線方向が既知かつ底面と平行な平面上に存在する円柱体又は球体を正確に検出し、その物体の情報を出力することを目的とする。 The present invention has been made in view of the above circumstances, and when there is a shape pattern similar to the shape of a cylinder or sphere as a subject in the background or surroundings, or when the normal direction of the cylinder bottom and the optical axis of the camera are Even in the case of an input image taken from a direction that does not match, a cylinder in which the normal direction of the bottom surface existing in the space is known and parallel to the bottom surface from at least one image obtained by photographing the subject The object is to accurately detect a body or a sphere and output information on the object.
以上の課題を解決するため、請求項1に係る物体検出装置は、画像から円柱状又は球状の物体を検出する物体検出装置において、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換する射影変換部と、前記正面画像から前記平面の前に位置する前景領域を抽出する前景抽出部と、前記前景領域から指定色に合致する指定色領域を抽出する指定色抽出部と、前記指定色領域を取り囲む輪郭を楕円で近似する輪郭検出部と、前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力する形状検証部と、を備えることを特徴とする。
In order to solve the above problems, an object detection apparatus according to
請求項2に係る物体検出装置は、請求項1に記載の物体検出装置において、前記楕円の位置を射影変換前の座標系の位置に逆変換し、前記楕円を成す円柱体又は球体の前記平面からの高さに基づく所定のオフセット値を加えた後に、射影変換後の座標系の位置に戻す検出位置補正部を更に備えることを特徴とする。
The object detection device according to
請求項3に係る物体検出方法は、画像から円柱状又は球状の物体を検出する物体検出方法において、コンピュータが、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換するステップと、前記正面画像から前記平面の前に位置する前景領域を抽出するステップと、前記前景領域から指定色に合致する指定色領域を抽出するステップと、前記指定色領域を取り囲む輪郭を楕円で近似するステップと、前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力するステップと、を行うことを特徴とする。
The object detection method according to
請求項4に係る物体検出プログラムは、請求項1又は2に記載の物体検出装置としてコンピュータを機能させることを特徴とする。 According to a fourth aspect of the invention, an object detection program causes a computer to function as the object detection device according to the first or second aspect.
本発明によれば、画像から円柱体又は球体を正確に検出することができる。 According to the present invention, it is possible to accurately detect a cylinder or a sphere from an image.
本発明は、上述した通り、画像からの円柱体又は球体の検出精度を改善することを目的とする。そのため、本発明は、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換し、当該正面画像から前記平面の前に位置する前景領域を抽出し、当該前景領域から指定色に合致する指定色領域を抽出し、当該指定色領域を取り囲む輪郭を楕円で近似し、当該楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力する。 As described above, an object of the present invention is to improve the detection accuracy of a cylinder or a sphere from an image. For this reason, the present invention projects and transforms an original image taken from an oblique angle with respect to a plane in space into a front image taken from an angle perpendicular to the plane, Is extracted from the foreground area, the specified color area that matches the specified color is extracted from the foreground area, the outline surrounding the specified color area is approximated by an ellipse, and it is determined whether the ellipse is circular. When the ellipse is circular, the ellipse is output as a cylindrical or spherical object.
つまり、本発明では、空間内の平面に対して斜めの角度から撮影された原画像を正面画像に射影変換するので、被写体の形状を本来の形状で把握することができ、検出対象である円柱体又は球体の検出漏れを抑制し、確実に検出することができる。また、本発明では、正面画像から前景領域を抽出し、当該前景領域から色と輪郭情報を用いて物体を検出し、検出された物体の形状が円形であるか否かを検証するので、円柱体又は球体以外の物体が併せて検出されてしまう過剰検出を抑制することができる。その結果、画像からの円柱体又は球体の検出精度を向上することができる。 That is, in the present invention, since the original image taken from an oblique angle with respect to the plane in the space is projectively converted to the front image, the shape of the subject can be grasped in its original shape, and the detection target cylinder The detection omission of a body or a sphere can be suppressed, and detection can be performed reliably. In the present invention, the foreground region is extracted from the front image, the object is detected from the foreground region using the color and the contour information, and it is verified whether or not the shape of the detected object is a circle. It is possible to suppress overdetection in which an object other than a body or a sphere is detected together. As a result, it is possible to improve the detection accuracy of the cylinder or sphere from the image.
以下、図面を参照しながら、一実施の形態に係る物体検出装置、物体検出方法及び物体検出プログラムについて説明する。後述する各実施形態では、図1に示すような、x’−y’平面を床面とする(x’,y’,z’)座標系の実空間において、当該実空間を当該実空間のz’軸と光軸Aが合致しないカメラ3で撮影した入力画像から、実空間内での円柱底面の法線方向が床面に対して鉛直上向きなz’軸の正方向であって、円柱底面と平行な平面である床面上に存在する円柱物体5a,5b,5cを対象物体として検出する。
Hereinafter, an object detection device, an object detection method, and an object detection program according to an embodiment will be described with reference to the drawings. In each embodiment to be described later, in the real space of the (x ′, y ′, z ′) coordinate system having the x′-y ′ plane as the floor as shown in FIG. From the input image taken by the
例えば、カーリング競技で用いられる氷上のストーンを検出する場合に用いることができる。円柱物体以外に、ビリヤード競技やゲートボール競技で用いられる球体を対象物体としてもよい。 For example, it can be used when detecting stones on ice used in curling competitions. In addition to the cylindrical object, a sphere used in a billiard game or a gateball game may be used as a target object.
なお、上記入力画像は、実空間内のx’−y’平面に対して斜めの角度から撮影された原画像と言い換えることができる。 In addition, the said input image can be paraphrased in other words as the original image image | photographed from the diagonal angle with respect to x'-y 'plane in real space.
<第1の実施形態>
図2は、第1の実施形態に係る物体検出装置1の機能ブロック構成を示す図である。当該物体検出装置1は、画像から円柱状又は球状の物体を検出する装置であって、図2に示すように、射影変換部11と、前景抽出部12と、指定色抽出部13と、輪郭検出部14と、形状検証部15と、メモリ16と、を備えて構成される。
<First Embodiment>
FIG. 2 is a diagram illustrating a functional block configuration of the
射影変換部11は、少なくとも1つ以上の入力画像を入力し、射影変換行列を算出して、算出した射影変換行列を用いて所定の背景画像を幾何変換して背景幾何変換画像としてメモリ16に記録するとともに、前記射影変換行列を用いて入力画像を幾何変換して入力幾何変換画像として出力する機能部である。
The
前景抽出部12は、入力幾何変換画像と背景幾何変換画像とを入力し、当該入力幾何変換画像と当該背景幾何変換画像とを用いて背景差分処理によりx’−y’平面の前に位置する前景領域を抽出し、抽出した前景領域を前景領域画像として出力する機能部である。
The
指定色抽出部13は、前景領域画像を入力するとともに、所定の色情報及び色範囲を入力し、当該色範囲内において前記所定の色に類する指定色領域を前景領域画像から抽出して指定色抽出画像として出力する機能部である。
The designated
輪郭検出部14は、指定色抽出画像を入力し、当該指定色抽出画像内に含まれる全ての指定色領域に亘ってそれぞれの指定色領域を取り囲む輪郭を抽出し、抽出した輪郭を楕円で近似して楕円情報として出力する機能部である。
The
形状検証部15は、全ての楕円情報を入力するとともに、所定の真円度閾値を入力し、それぞれの楕円情報について真円度閾値処理を行うことで処理中の楕円が円形に近いか否かを判定し、当該処理中の楕円が円形に近い場合、当該楕円の楕円情報を物体情報として出力する機能部である。
The
次に、図3のフローチャートを用いて、物体検出装置1で行う物体検出処理について説明する。
Next, object detection processing performed by the
ステップS101;
まず、射影変換部11が起動される。射影変換部11で行う射影変換処理を図4のフローチャートを用いて説明する。
Step S101;
First, the
ステップS101a;
射影変換部11には、少なくとも1枚以上の画像が入力される。本実施形態では、例えば図5に示す入力画像が入力される。射影変換部11は、起動が初回の場合、所定の4点の対応点を入力する。本実施形態では、対応点として、例えば、(x1,y1)→(x’1,y’1)、(x2,y2)→(x’2,y’2)、(x3,y3)→(x’3,y’3)、(x4,y4)→(x’4,y’4)が指定される。記号“→”は、実空間と入力画像との対応を示す。(x’1,y’1)、(x’2,y’2)、(x’3,y’3)、(x’4,y’4)は、それぞれ、(x1,y1)、(x2,y2)、(x3,y3)、(x4,y4)に対応する実空間内の点であり、円柱底面と平行な平面上の点である。
Step S101a;
At least one image is input to the
ステップS101b;
次に、射影変換部11は、射影変換行列Hを算出する。射影変換行列はホモグラフィとも呼ばれ、被写体が平面の時に、参照画像から入力画像内の被写体への幾何的な変換を表す行列であり、例えば3×3の行列で表現される。当該射影変換行列は、入力画像内の認識対象と参照画像で、4つ以上の対応する点(同一である点)があれば求められることができる。射影変換部11では、前述の4つの対応点を用いて射影変換行列Hを算出する。
Step S101b;
Next, the
ステップS101c,S101d;
その後、射影変換部11は、算出した射影変換行列Hを用いて所定の背景画像の幾何変換を行い、背景幾何変換画像としてメモリ16に記録する。本実施形態では、図6に示す背景画像が予め与えられており、射影変換行列Hを用いて図7に示す背景幾何変換画像が得られたものとする。
Steps S101c and S101d;
Thereafter, the
ステップS101e,S101f;
最後に、射影変換部11は、ステップS101cと同様に射影変換行列Hを用いて入力画像も幾何変換を行い、入力幾何変換画像としてメモリ16に記録して処理を終える。本実施形態では、射影変換行列Hを用いて図8に示す入力幾何変換画像が得られたものとする。
Steps S101e, S101f;
Finally, the
これにより、円柱物体を円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像が、円柱底面の法線方向とカメラの光軸が合致する方向から撮影した画像へと射影変換されることになる。言い換えると、空間内のx’−y’平面に対して斜めの角度から撮影された原画像が、当該平面に対して垂直な角度から撮影した正面画像に射影変換されることになる。 As a result, an input image obtained by photographing a cylindrical object from a direction in which the normal direction of the bottom surface of the cylinder and the optical axis of the camera do not match is projected onto an image captured from a direction in which the normal direction of the bottom surface of the cylinder matches the optical axis of the camera. Will be converted. In other words, an original image captured from an oblique angle with respect to the x′-y ′ plane in the space is projectively transformed into a front image captured from an angle perpendicular to the plane.
図3のステップS102;
次に、前景抽出部12が起動される。前景抽出部12で行う前景抽出処理を図9のフローチャートを用いて説明する。
Step S102 of FIG. 3;
Next, the
ステップS102a;
前景抽出部12は、メモリ16から読み出した背景幾何変換画像と入力幾何変換画像を入力する。本実施形態では、図7に示した背景幾何変換画像と、図8に示した入力幾何変換画像と、が入力される。
Step S102a;
The
ステップS102b;
次に、前景抽出部12は、入力した2つの変換画像を用いて背景差分処理を行う。当該背景差分処理は、背景幾何変換画像と入力幾何変換画像とで互いに同一の位置に対応する画素の差分の絶対値を求めることで実現できる。
Step S102b;
Next, the
ステップS102c;
次に、前景抽出部12は、背景差分処理によって得られる差分画像は細かなノイズが含まれることが多いため、差分画像に対してスムージング処理を行う。スムージング処理は、例えば、ガウシアンフィルタを差分画像に対して適用することで実現できる。差分画像に含まれるノイズが少ない場合、処理速度を優先してスムージング処理をスキップしてもよい。
Step S102c;
Next, the
ステップS102d;
次に、前景抽出部12は、差分画像に対して所定の閾値による二値化処理を行うことで、前景画素の位置を示すマスク画像を得る。
Step S102d;
Next, the
ステップS102e;
次に、前景抽出部12は、入力幾何変換画像とマスク画像から前景画素を抽出する。この処理は、例えば、入力幾何変換画像とマスク画像のアンド演算処理によって実現できる。
Step S102e;
Next, the
ステップS102f;
最後に、前景抽出部12は、抽出した前景画素から構成される画像を前景領域画像としてメモリ16に記録して処理を終える。本実施形態では、図10に示す前景領域画像が得られるものとする。図10に示すように、ステップS102によって誤検出の原因となりうる背景パターンがあらかじめ除去される。
Step S102f;
Finally, the
図3のステップS103;
次に、指定色抽出部13が起動される。指定色抽出部13で行う指定色抽出処理を図11のフローチャートを用いて説明する。
Step S103 of FIG. 3;
Next, the designated
ステップS103a;
指定色抽出部13は、所定の色情報と前景領域画像とを入力する。所定の色情報とは、検出したい物体の色を示す値であり、所定の色毎に、最低値と最高値の2つの値を有する。例えば、検出したい物体が青色の場合、RGB表記で最低値(0,0,200)、最高値(0,0,255)となる。赤色の場合は、同じくRGB表記で最低値(200,0,0)、最高値(255,0,0)となる。説明の簡単化のためRGB表記で説明したが、HSVやHLS、LAB等の他の色空間による表現でもよい。その場合、前景領域画像の色空間も併せて変換する。
Step S103a;
The designated
ステップS103b;
次に、指定色抽出部13は、前景領域画像と色情報から指定色に該当の領域を抽出する。この処理は、前景領域画像のある画素に対して、その画素値が前記色情報の最高値と最低値の間に収まる場合は抽出することを、全画素に対して行うことで実現できる。全画素に対して行った結果得られる画像を指定色抽出画像と呼ぶ。
Step S103b;
Next, the designated
ステップS103c;
次に、指定色抽出部13は、画像上での色情報は実環境の照明の影響等により変化することがあり、抽出された画素には欠損や過剰な抽出が行なわれることが多いため、指定色抽出画像に対してスムージング処理を行う。スムージング処理は、例えば、ガウシアンフィルタやメディアンフィルタを適用したり、モフォロジ演算を適用したりすることによって実現できる。ステップS102cと同様に、処理速度を優先してスムージング処理をスキップしてもよい。
Step S103c;
Next, the specified
ステップS103d;
最後に、指定色抽出部13は、指定色抽出画像をメモリ16に記録して処理を終える。本実施形態では、検出したい物体の色として青と赤の2色があり、その色情報として前述のRGB値を用いたものとする。これにより、指定色抽出画像として図12(a),(b)に示す画像が得られる。
Step S103d;
Finally, the designated
図3のステップS104;
次に、輪郭検出部14が起動される。輪郭検出部14で行う輪郭検出処理を図13のフローチャートを用いて説明する。
Step S104 of FIG. 3;
Next, the
ステップS104a;
輪郭検出部14は、指定色抽出画像を入力する。
Step S104a;
The
ステップS104b;
次に、輪郭検出部14は、入力した指定色抽出画像をグレースケールに変換し、所定の閾値で二値化する。
Step S104b;
Next, the
ステップS104c;
次に、輪郭検出部14は、二値化後の画像内に含まれる全ての指定色領域に亘ってそれぞれの領域を取り囲む輪郭を抽出する。この処理は、例えば、参考文献(Suzuki, S、外1名、“Topological Structural Analysis of Digitized Binary Images by Border Following”、CVGIP 30 1、1985年、p.32- p.46)の方法によって実現できる。本実施形態では、2色の指定色抽出画像それぞれに対して、図14(a),(b)に示す輪郭が得られる。
Step S104c;
Next, the
ステップS104d;
最後に、輪郭検出部14は、抽出した全ての輪郭について楕円で近似し、近似した楕円の楕円情報を出力して処理を終える。ここで、楕円情報とは、少なくとも、楕円の中心座標、楕円の長径と短径、楕円の回転角度を含む情報である。輪郭を楕円で近似する処理は、例えば、参考文献(Andrew W、外1名、“A Buyer’s Guide to Conic Fitting”、Proc.5th British Machine Vision Conference、Birmingham、1995年、p.513- p.522)の方法によって実現できる。本実施形態では、2色の指定色抽出画像それぞれに対して、図15(a),(b)に示す楕円が得られる。
Step S104d;
Finally, the
図3のステップS105;
次に、形状検証部15が起動される。形状検証部15で行う形状検証処理を図16のフローチャートを用いて説明する。
Step S105 in FIG. 3;
Next, the
ステップS105a;
形状検証部15は、全ての楕円情報と所定の真円度閾値とを入力する。
Step S105a;
The
ステップS105b〜S105d;
次に、形状検証部15は、それぞれの楕円情報について真円度閾値処理を行うことで、処理中の楕円が円形に近いかどうかを判定する。真円度閾値処理は例えば、楕円の長径に対する短径の比が1.0に近いかどうかによって計ることができる。この場合、真円度閾値処理は、短径÷長径>閾値なら円形に近いと判定する。円形に近いと判定された楕円の全てを物体情報として出力し処理を終える。本実施形態では、図15(a),(b)に示した5a,5b,5cがそれぞれ円形物体情報としてその中心座標、楕円の長径と短径、楕円の回転角度が出力される。ヒト型を楕円で近似した5dは円形に近くないので、その物体情報が出力されることはない。
Steps S105b to S105d;
Next, the
以上、第1の実施形態について説明した。 The first embodiment has been described above.
本実施形態によれば、円柱物体を円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像を、円柱底面の法線方向とカメラの光軸が合致する方向から撮影した画像へと射影変換するので、被写体の形状を本来の形状で把握することができ、検出対象である円柱体又は球体の検出漏れを抑制し、確実に検出することができる。 According to this embodiment, an input image obtained by photographing a cylindrical object from a direction in which the normal direction of the bottom surface of the cylinder and the optical axis of the camera do not match is captured from a direction in which the normal direction of the bottom surface of the cylinder matches the optical axis of the camera. Since projective conversion into an image is performed, the shape of the subject can be grasped in its original shape, and the detection omission of the cylinder or sphere that is the detection target can be suppressed and reliably detected.
また、本実施形態によれば、射影変換した画像から前景領域を抽出し、当該前景領域から色と輪郭情報を用いて物体を検出し、検出された物体の形状が円形であるかを検証するので、円柱物体以外の物体が併せて検出されてしまう過剰検出を抑制することができる。 Further, according to the present embodiment, a foreground area is extracted from a projective-transformed image, an object is detected from the foreground area using color and contour information, and whether or not the shape of the detected object is circular is verified. Therefore, it is possible to suppress over-detection in which objects other than cylindrical objects are detected together.
その結果、入力画像からの円柱物体の検出精度を向上することができる。球体であっても射影変換後の形状は円柱物体と同様に円形であることから、入力画像内に球体が含まれている場合であっても、当該球体の物体を精度よく検出することができる。 As a result, it is possible to improve the detection accuracy of the cylindrical object from the input image. Even in the case of a sphere, the shape after projective transformation is circular as in the case of a cylindrical object. Therefore, even if the input image includes a sphere, the object of the sphere can be detected with high accuracy. .
<第2の実施形態>
第1の実施形態では、円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像の場合でも、当該画像を射影変換処理により円柱底面の法線方向とカメラの光軸が合致する方向から撮影した画像へと射影変換し、射影変換した画像から色と輪郭情報を用いて物体を検出し、検出した結果に対して形状検証を行うことで、被写体が円柱物体であっても、その検出を正確に行うことを実現した。
<Second Embodiment>
In the first embodiment, even in the case of an input image taken from a direction in which the normal direction of the bottom surface of the cylinder and the optical axis of the camera do not match, the normal direction of the bottom surface of the cylinder and the optical axis of the camera are converted by projective transformation processing. Projective transformation from the matching direction to an image taken, and detecting an object from the projected image using color and contour information, and verifying the shape of the detected result, the subject is a cylindrical object In addition, it realized that the detection was performed accurately.
但し、第1の実施形態で用いられる射影変換処理は、被写体が高さのない平面体であることを前提としている。例えば、図5に示した実空間を対象とした場合、(x1,y1)と(x2,y2)と(x3,y3)と(x4,y4)で囲われた平面部分については正確な射影変換処理を行うことができるが、当該平面上に存在する円柱物体や人物等は射影変換後の画像で歪みが生じてしまう。 However, the projective transformation process used in the first embodiment is based on the premise that the subject is a flat body having no height. For example, when the real space shown in FIG. 5 is targeted, it is surrounded by (x 1 , y 1 ), (x 2 , y 2 ), (x 3 , y 3 ), and (x 4 , y 4 ). Although an accurate projective transformation process can be performed on the plane portion, a cylindrical object or a person existing on the plane is distorted in the image after the projective transformation.
そのため、円柱物体の上面が射影変換行列算出のために指定した4点で構成される床の平面よりも高い場所に存在した場合、検出位置と当該平面上の位置の両者にはズレが生じることになる。 Therefore, if the upper surface of the cylindrical object is higher than the floor plane composed of the four points specified for projective transformation matrix calculation, the detection position and the position on the plane will be misaligned. become.
その一方で、例えばカーリング競技でストーンの正確な位置を測定したい場合には、試合フィールドとなる平面上において円柱物体の位置を特定しなければならない場合がある。そこで、本実施形態では、図17に示すように、円柱物体又は球体の高さによる検出位置のズレを解消し、検出した円柱物体の中心位置から、射影変換処理で対象とする平面上での中心位置を推定する。 On the other hand, for example, when it is desired to measure the exact position of the stone in a curling competition, it may be necessary to specify the position of the cylindrical object on the plane that becomes the game field. Therefore, in the present embodiment, as shown in FIG. 17, the deviation of the detection position due to the height of the cylindrical object or sphere is eliminated, and the center position of the detected cylindrical object is used to perform projection conversion processing on the target plane. Estimate the center position.
図18は、第2の実施形態に係る物体検出装置1の構成ブロック構成を示す図である。物体検出装置1は、図18に示すように、第1の実施形態での構成に検出位置補正部17を加えて構成される。
FIG. 18 is a diagram illustrating a configuration block configuration of the
検出位置補正部17は、形状検証部15から出力される物体情報を入力し、検出していた物体の位置の補正を行い、位置補正後の物体情報を出力する機能部である。
The detection
次に、物体検出装置1で行う物体検出処理について説明する。本実施形態では、第1の実施形態と異なる処理を行う射影変換部11と、第2の構成形態で追加した検出位置補正部17と、の各処理について説明する。
Next, the object detection process performed by the
まず、図19のフローチャートを用いて、射影変換部11で行う射影変換処理を説明する。
First, the projective transformation process performed by the
射影変換部11には、少なくとも1枚以上の画像が入力される。本実施形態では、例えば図5に示した入力画像が入力される。また、本実施形態では、第1の実施形態の処理(図4)に対して、ステップS205,S206を追加している。以降、第1の実施形態と同様のステップ(ステップS201〜S204,S207〜S208)についての説明は割愛し、ステップS205,S206についてのみ説明する。
At least one image is input to the
ステップS205;
射影変換部11は、ステップS202で算出した射影変換行列Hから逆行列H−1を算出する。逆行列H−1は、射影変換された画像から入力画像への幾何変換を表現する行列であり、例えば、H−1×(x’1,y’1,1)^T=(x1,y1,1)となる。
Step S205;
The
ステップS206;
次に、射影変換部11は、算出済みの射影変換行列Hと、当該射影変換行列Hの逆行列H−1をメモリ16に記録する。
Step S206;
Next, the
次に、図20のフローチャートを用いて、検出位置補正部17で行う処理を説明する。
Next, processing performed by the detection
ステップS301;
検出位置補正部17は、形状検証処理を終えた全ての物体情報と、所定のオフセットを入力する。ここで、オフセットとは、図21に示すように、円柱物体の高さを考慮して、例えば、入力画像上での物体の中心位置から、射影変換処理で対象とする平面上での中心位置までのオフセット値(円柱物体のx’−y’平面からの高さに基づく所定のオフセット値)であり、例えば両点を通るベクトルdとして表現できる。
Step S301;
The detection
ステップS302;
次に、検出位置補正部17は、或る1つの物体について以降の処理を行う。
Step S302;
Next, the detection
ステップS303;
まず、検出位置補正部17は、物体の中心位置の座標を、逆行列H−1を用いて射影変換前の入力画像座標系の座標に逆変換する。本実施形態では、図22に示すように、検出された物体の中心位置の座標が(cx’,cy’)であり、逆行列H−1により(cx,cy)に変換されたものとする。
Step S303;
First, the detection
ステップS304;
次に、検出位置補正部17は、変換された座標に所定のオフセットを加算する。本実施形態では、オフセットdとして(dx,dy)が予め与えられているものとし、加算後の座標は(cx+dx,cy+dy)となる。
Step S304;
Next, the detection
ステップS305;
次に、検出位置補正部17は、座標(cx+dx,cy+dy)を射影変換行列Hを用いて射影変換画像座標系に再変換する。本実施形態では、図23に示すように射影変換処理で対象とする平面上での中心位置の推定結果として((cx+dx)’,(cy+dy)’)が算出されることになる。
Step S305;
Next, the detection
ステップS306;
次に、検出位置補正部17は、再変換された座標値を処理対象の物体の中心位置の新たな座標として更新し、メモリ16に記憶する。
Step S306;
Next, the detection
ステップS307;
検出位置補正部17は、以上の処理を入力された全ての物体に亘って処理を行い、最後にメモリ16に記憶されている物体情報を全て出力して処理を終える。
Step S307;
The detection
以上、第2の実施形態について説明した。 The second embodiment has been described above.
本実施形態によれば、物体の中心位置の座標を入力画像座標系の座標に逆変換し、入力画像上での物体の中心位置から、射影変換処理で対象とする平面上での中心位置までのオフセット値を加算した後に、オフセット値加算後の座標を射影変換画像座標系の座標に戻すので、円柱物体の上面が射影変換行列算出のために指定した4点で構成される平面よりも高い場所に存在した場合であっても、当該平面上での中心位置の推定が可能となり、例えばカーリング競技において、試合フィールドとなる平面上でのストーンの正確な位置を算出することができる。 According to the present embodiment, the coordinates of the center position of the object are inversely converted to the coordinates of the input image coordinate system, and from the center position of the object on the input image to the center position on the target plane in the projective transformation process. After adding the offset value, the coordinates after adding the offset value are returned to the coordinates of the projective transformation image coordinate system, so that the upper surface of the cylindrical object is higher than the plane composed of the four points designated for the projective transformation matrix calculation. Even if it exists in the place, the center position on the plane can be estimated, and for example, in a curling competition, the exact position of the stone on the plane that becomes the game field can be calculated.
以上、本発明を実施形態の例に基づき具体的に説明したが、上述の実施形態の説明は、本発明を説明するためのものであって、特許請求の範囲に記載の発明を限定し、又は当該範囲を減縮するように解すべきではない。また、本発明の各手段構成は上述の実施形態に限らず、特許請求の範囲に記載の技術的範囲内で種々の変形が可能であることは勿論である。例えば、図3に示したステップS102の前景抽出処理を、ステップS101の射影変換処理の前に行うようにしてもよい。 As described above, the present invention has been specifically described based on the example of the embodiment. However, the above description of the embodiment is for explaining the present invention, and limits the invention described in the claims. Or it should not be construed to reduce the scope. Moreover, each means structure of this invention is not restricted to the above-mentioned embodiment, Of course, various deformation | transformation are possible within the technical scope as described in a claim. For example, the foreground extraction process in step S102 shown in FIG. 3 may be performed before the projective conversion process in step S101.
最後に、各実施形態で説明した物体検出装置1は、上記機能を備えるコンピュータ等で実現可能である。また、物体検出装置1としてコンピュータを機能させるための物体検出プログラム、当該物体検出プログラムの記憶媒体を作成することも可能である。
Finally, the
1…物体検出装置
11…射影変換部
12…前景抽出部
13…指定色抽出部
14…輪郭検出部
15…形状検証部
16…メモリ
17…検出位置補正部
DESCRIPTION OF
Claims (4)
空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換する射影変換部と、
前記正面画像から前記平面の前に位置する前景領域を抽出する前景抽出部と、
前記前景領域から指定色に合致する指定色領域を抽出する指定色抽出部と、
前記指定色領域を取り囲む輪郭を楕円で近似する輪郭検出部と、
前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力する形状検証部と、
を備えることを特徴とする物体検出装置。 In an object detection device for detecting a cylindrical or spherical object from an image,
A projective transformation unit that projectively transforms an original image taken from an oblique angle with respect to a plane in space into a front image taken from an angle perpendicular to the plane;
A foreground extraction unit that extracts a foreground region located in front of the plane from the front image;
A designated color extraction unit that extracts a designated color area that matches the designated color from the foreground area;
An outline detector that approximates an outline surrounding the specified color area with an ellipse;
It is determined whether or not the ellipse is a circle, and if the ellipse is a circle, a shape verification unit that outputs the ellipse as a cylinder or a sphere object;
An object detection apparatus comprising:
コンピュータが、
空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換するステップと、
前記正面画像から前記平面の前に位置する前景領域を抽出するステップと、
前記前景領域から指定色に合致する指定色領域を抽出するステップと、
前記指定色領域を取り囲む輪郭を楕円で近似するステップと、
前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力するステップと、
を行うことを特徴とする物体検出方法。 In an object detection method for detecting a cylindrical or spherical object from an image,
Computer
Projectively transforming an original image taken from an angle oblique to a plane in space into a front image taken from an angle perpendicular to the plane;
Extracting a foreground region located in front of the plane from the front image;
Extracting a designated color area that matches a designated color from the foreground area;
Approximating an outline surrounding the specified color area with an ellipse;
Determining whether the ellipse is circular, and if the ellipse is circular, outputting the ellipse as a cylindrical or spherical object;
The object detection method characterized by performing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017155605A JP6758263B2 (en) | 2017-08-10 | 2017-08-10 | Object detection device, object detection method and object detection program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017155605A JP6758263B2 (en) | 2017-08-10 | 2017-08-10 | Object detection device, object detection method and object detection program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019036030A true JP2019036030A (en) | 2019-03-07 |
JP6758263B2 JP6758263B2 (en) | 2020-09-23 |
Family
ID=65637404
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017155605A Active JP6758263B2 (en) | 2017-08-10 | 2017-08-10 | Object detection device, object detection method and object detection program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6758263B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111160242A (en) * | 2019-12-27 | 2020-05-15 | 上海眼控科技股份有限公司 | Image target detection method, system, electronic terminal and storage medium |
JP2020191036A (en) * | 2019-05-24 | 2020-11-26 | 日本放送協会 | Object locus generation device and program |
JP2021066382A (en) * | 2019-10-25 | 2021-04-30 | 株式会社京三製作所 | Lock deviation measuring apparatus, lock deviation measuring system, and lock deviation measuring method |
CN114166141A (en) * | 2021-11-23 | 2022-03-11 | 中国直升机设计研究所 | Multi-circle mark detection method for helicopter high-speed rotating blade image |
-
2017
- 2017-08-10 JP JP2017155605A patent/JP6758263B2/en active Active
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020191036A (en) * | 2019-05-24 | 2020-11-26 | 日本放送協会 | Object locus generation device and program |
JP7316097B2 (en) | 2019-05-24 | 2023-07-27 | 日本放送協会 | Object trajectory generator and its program |
JP2021066382A (en) * | 2019-10-25 | 2021-04-30 | 株式会社京三製作所 | Lock deviation measuring apparatus, lock deviation measuring system, and lock deviation measuring method |
JP7477280B2 (en) | 2019-10-25 | 2024-05-01 | 株式会社京三製作所 | Lock deviation measuring device, lock deviation measuring system, and lock deviation measuring method |
CN111160242A (en) * | 2019-12-27 | 2020-05-15 | 上海眼控科技股份有限公司 | Image target detection method, system, electronic terminal and storage medium |
CN114166141A (en) * | 2021-11-23 | 2022-03-11 | 中国直升机设计研究所 | Multi-circle mark detection method for helicopter high-speed rotating blade image |
CN114166141B (en) * | 2021-11-23 | 2023-05-26 | 中国直升机设计研究所 | Multi-circular mark detection method for helicopter high-speed rotating blade image |
Also Published As
Publication number | Publication date |
---|---|
JP6758263B2 (en) | 2020-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108475433B (en) | Method and system for large scale determination of RGBD camera poses | |
JP5542889B2 (en) | Image processing device | |
JP5837508B2 (en) | Posture state estimation apparatus and posture state estimation method | |
JP5699788B2 (en) | Screen area detection method and system | |
JP6758263B2 (en) | Object detection device, object detection method and object detection program | |
TW201627950A (en) | Method for optimizing occlusion in augmented reality based on depth camera | |
JP6515039B2 (en) | Program, apparatus and method for calculating a normal vector of a planar object to be reflected in a continuous captured image | |
JP2021108193A (en) | Image processing device, image processing method, and program | |
CN112396050B (en) | Image processing method, device and storage medium | |
JP2020197989A5 (en) | Image processing systems, image processing methods, and programs | |
JP4427052B2 (en) | Image processing apparatus and area tracking program | |
TWI749370B (en) | Face recognition method and computer system using the same | |
WO2018027527A1 (en) | Optical system imaging quality detection method and apparatus | |
CN108205641B (en) | Gesture image processing method and device | |
US10997743B2 (en) | Attachable matter detection apparatus | |
CN110310336B (en) | Touch projection system and image processing method | |
CN109741370B (en) | Target tracking method and device | |
TWI620147B (en) | Image synthesis method for synthesizing people | |
JP5708305B2 (en) | Image recognition apparatus, image recognition method, and computer program for image recognition | |
Abdusalomov et al. | Review on various widely used shadow detection methods to identify a shadow from images | |
JP2010113562A (en) | Apparatus, method and program for detecting and tracking object | |
US9665938B2 (en) | Image processing apparatus and specific figure detecting method | |
JP2013029996A (en) | Image processing device | |
US20170068856A1 (en) | Method for the three-dimensional detection of objects | |
JP5643147B2 (en) | Motion vector detection apparatus, motion vector detection method, and motion vector detection program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190724 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200813 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20200825 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200901 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6758263 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |