JP6758263B2 - 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
- JP6758263B2 JP6758263B2 JP2017155605A JP2017155605A JP6758263B2 JP 6758263 B2 JP6758263 B2 JP 6758263B2 JP 2017155605 A JP2017155605 A JP 2017155605A JP 2017155605 A JP2017155605 A JP 2017155605A JP 6758263 B2 JP6758263 B2 JP 6758263B2
- Authority
- JP
- Japan
- Prior art keywords
- ellipse
- image
- plane
- object detection
- designated color
- 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.)
- Active
Links
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、画像から円柱状又は球状の物体を検出する技術に関する。 The present invention relates to a technique for detecting a columnar or spherical object from an image.
現在、スポーツ競技や監視分野において、カメラで撮影された映像から実空間に存在する物体の位置を特定し、更には当該物体の位置を追跡することが行われている。具体的には、実空間を撮像したカメラから入力された少なくとも1つ以上の画像から、空間内に存在する円柱体又は球体の物体を検出し、当該物体の情報を画面に出力する技術が研究開発されている。 Currently, in the field of sports competition and surveillance, the position of an object existing in real space is specified from an image taken by a camera, and the position of the object is tracked. Specifically, research and development is being conducted on a technique for detecting a cylindrical or spherical object existing in space from at least one or more images input from a camera that images real space, and outputting the information of the object to a screen. It is being developed.
例えば、非特許文献1には、非特許文献2のMean shift法を用いて、底面の法線方向が床平面の法線と平行になるように配置された円柱物体を検出する技術が開示されている。Mean shift法ではテンプレートとなる指定領域内から特徴量を抽出し、これに類する特徴量を有する領域を現在処理中の画像から検出し、当該処理中の画像内からテンプレートに該当する位置を円柱物体として推定する。特徴量には、指定領域内の色情報から作成したヒストグラムが用いられることが多い。但し、背景等に類似色のパターンが存在する場合には誤検出が発生することがある。そこで、非特許文献1では、色情報にエッジ情報も加えて作成したヒストグラムを用いることで、高精度な円柱物体の検出を実現している。
For example, Non-Patent
従来の方法では、指定領域内のエッジ情報から作成したヒストグラムを用いて、底面の法線方向が床平面の法線と平行になるように配置された円柱物体を検出している。 In the conventional method, a histogram created from the edge information in the designated area is used to detect a cylindrical object arranged so that the normal direction of the bottom surface is parallel to the normal direction of the floor plane.
しかしながら、背景に検出対象の円柱物体と類似の形状パターンが存在する場合、エッジ情報のみの利用では検出対象を誤検出するといった課題がある。また、ヒストグラム表現には幾何的な情報が失われているため、周囲に存在する円柱形状ではない形状パターンを有する物体から生成されたヒストグラムが、円柱物体から作成したものと類することで、検出対象の誤検出が生じるといった課題もある。 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 other than the cylindrical shape existing around it can be detected by making it similar to the one created from a cylindrical object. There is also a problem that false detection occurs.
また、別の問題として、現在の画像を撮影したカメラの向きが、テンプレートとなる画像を撮影した時のカメラの向きと異なる場合、円柱物体から抽出されるエッジの向きと強さが両者間で異なるため、円柱物体の検出漏れが生じるといった課題がある。円柱物体を円柱軸の向きとカメラの光軸が合致するように撮影した場合は撮影画像上で真円として観測されるが、斜めから撮影した画像上では楕円形状として観測されてしまい、エッジの大きさが真円よりも大きく異なってしまう。前者をテンプレートとし、後者を入力画像とした場合は、円柱物体の誤検出が生じることになる。 Another problem is that if the orientation of the camera that took the current image is different from the orientation of the camera when the template image was taken, the orientation and strength of the edges extracted from the cylindrical object will be between the two. Since they are different, there is a problem that detection omission of a cylindrical object occurs. When a cylindrical object is photographed so that the direction of the cylindrical axis and the optical axis of the camera match, it is observed as a perfect circle on the captured image, but it is observed as an ellipse on the image captured at an angle, and the edge The size is much different than a perfect circle. If the former is used as a template and the latter is used as an input image, erroneous detection of a cylindrical object will occur.
本発明は、上記事情を鑑みてなされたものであり、背景又は周囲に被写体である円柱体又は球体の形状に類似の形状パターンがある場合や、円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像の場合であっても、被写体を撮影した少なくとも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 bottom surface of the cylinder and the optical axis of the camera are different. Even in the case of an input image taken from a direction that does not match, a cylinder that exists on a plane in which the normal direction of the bottom surface existing in space is known and parallel to the bottom surface from at least one or more images of the subject. The purpose is to accurately detect a body or sphere and output information on that object.
以上の課題を解決するため、請求項1に係る物体検出装置は、画像から円柱状又は球状の物体を検出する物体検出装置において、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換する射影変換部と、前記正面画像から前記平面の前に位置する前景領域を抽出する前景抽出部と、前記前景領域から指定色に合致する指定色領域を抽出する指定色抽出部と、前記指定色領域を取り囲む輪郭を楕円で近似する輪郭検出部と、前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力する形状検証部と、を備えることを特徴とする。
In order to solve the above problems, the object detection device according to
請求項2に係る物体検出装置は、請求項1に記載の物体検出装置において、前記楕円の位置を射影変換前の座標系の位置に逆変換し、前記楕円を成す円柱体又は球体の前記平面からの高さに基づく所定のオフセット値を加えた後に、射影変換後の座標系の位置に戻す検出位置補正部を更に備えることを特徴とする。
The object detection device according to
請求項3に係る物体検出方法は、画像から円柱状又は球状の物体を検出する物体検出方法において、コンピュータが、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換するステップと、前記正面画像から前記平面の前に位置する前景領域を抽出するステップと、前記前景領域から指定色に合致する指定色領域を抽出するステップと、前記指定色領域を取り囲む輪郭を楕円で近似するステップと、前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力するステップと、を行うことを特徴とする。
The object detection method according to
請求項4に係る物体検出プログラムは、請求項1又は2に記載の物体検出装置としてコンピュータを機能させることを特徴とする。
The object detection program according to
本発明によれば、画像から円柱体又は球体を正確に検出することができる。 According to the present invention, a cylinder or a sphere can be accurately detected 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. Therefore, in the present invention, an original image taken from an angle oblique to a plane in space is projected and converted into a front image taken from an angle perpendicular to the plane, and the front image is projected to the front of the plane. The foreground area located in is extracted, the specified color area matching 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 or not 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 projected and converted into the front image, the shape of the subject can be grasped in the original shape, and the cylinder to be detected. It is possible to suppress omission of detection of a body or a sphere and reliably detect it. Further, in the present invention, a foreground region is extracted from the front image, an object is detected from the foreground region using color and contour information, and it is verified whether or not the shape of the detected object is circular. It is possible to suppress excessive detection in which an object other than a body or a sphere is also detected. As a result, the accuracy of detecting a cylinder or a sphere from an image can be improved.
以下、図面を参照しながら、一実施の形態に係る物体検出装置、物体検出方法及び物体検出プログラムについて説明する。後述する各実施形態では、図1に示すような、x’−y’平面を床面とする(x’,y’,z’)座標系の実空間において、当該実空間を当該実空間のz’軸と光軸Aが合致しないカメラ3で撮影した入力画像から、実空間内での円柱底面の法線方向が床面に対して鉛直上向きなz’軸の正方向であって、円柱底面と平行な平面である床面上に存在する円柱物体5a,5b,5cを対象物体として検出する。
Hereinafter, the object detection device, the object detection method, and the object detection program according to the embodiment will be described with reference to the drawings. In each embodiment described later, in the real space of the coordinate system having the x'-y'plane as the floor surface (x', y', z') as shown in FIG. 1, the real space is the real space. From the input image taken by the
例えば、カーリング競技で用いられる氷上のストーンを検出する場合に用いることができる。円柱物体以外に、ビリヤード競技やゲートボール競技で用いられる球体を対象物体としてもよい。 For example, it can be used to detect stones on ice used in curling competitions. In addition to the cylindrical object, a sphere used in billiard competition or gateball competition may be the target object.
なお、上記入力画像は、実空間内のx’−y’平面に対して斜めの角度から撮影された原画像と言い換えることができる。 The input image can be rephrased as an original image taken from an oblique angle with respect to the x'-y'plane in the real space.
<第1の実施形態>
図2は、第1の実施形態に係る物体検出装置1の機能ブロック構成を示す図である。当該物体検出装置1は、画像から円柱状又は球状の物体を検出する装置であって、図2に示すように、射影変換部11と、前景抽出部12と、指定色抽出部13と、輪郭検出部14と、形状検証部15と、メモリ16と、を備えて構成される。
<First Embodiment>
FIG. 2 is a diagram showing a functional block configuration of the
射影変換部11は、少なくとも1つ以上の入力画像を入力し、射影変換行列を算出して、算出した射影変換行列を用いて所定の背景画像を幾何変換して背景幾何変換画像としてメモリ16に記録するとともに、前記射影変換行列を用いて入力画像を幾何変換して入力幾何変換画像として出力する機能部である。
The
前景抽出部12は、入力幾何変換画像と背景幾何変換画像とを入力し、当該入力幾何変換画像と当該背景幾何変換画像とを用いて背景差分処理によりx’−y’平面の前に位置する前景領域を抽出し、抽出した前景領域を前景領域画像として出力する機能部である。
The
指定色抽出部13は、前景領域画像を入力するとともに、所定の色情報及び色範囲を入力し、当該色範囲内において前記所定の色に類する指定色領域を前景領域画像から抽出して指定色抽出画像として出力する機能部である。
The designated
輪郭検出部14は、指定色抽出画像を入力し、当該指定色抽出画像内に含まれる全ての指定色領域に亘ってそれぞれの指定色領域を取り囲む輪郭を抽出し、抽出した輪郭を楕円で近似して楕円情報として出力する機能部である。
The
形状検証部15は、全ての楕円情報を入力するとともに、所定の真円度閾値を入力し、それぞれの楕円情報について真円度閾値処理を行うことで処理中の楕円が円形に近いか否かを判定し、当該処理中の楕円が円形に近い場合、当該楕円の楕円情報を物体情報として出力する機能部である。
The
次に、図3のフローチャートを用いて、物体検出装置1で行う物体検出処理について説明する。
Next, the object detection process 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 or more images are 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, S101d;
After that, the
ステップS101e,S101f;
最後に、射影変換部11は、ステップS101cと同様に射影変換行列Hを用いて入力画像も幾何変換を行い、入力幾何変換画像としてメモリ16に記録して処理を終える。本実施形態では、射影変換行列Hを用いて図8に示す入力幾何変換画像が得られたものとする。
Steps S101e, S101f;
Finally, the
これにより、円柱物体を円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像が、円柱底面の法線方向とカメラの光軸が合致する方向から撮影した画像へと射影変換されることになる。言い換えると、空間内のx’−y’平面に対して斜めの角度から撮影された原画像が、当該平面に対して垂直な角度から撮影した正面画像に射影変換されることになる。 As a result, the input image of the cylindrical object taken from the direction in which the normal direction of the bottom of the cylinder and the optical axis of the camera do not match is projected onto the image taken from the direction in which the normal direction of the bottom of the cylinder and the optical axis of the camera match. It will be converted. In other words, the original image taken from an angle oblique to the x'-y'plane in space is projected and transformed into a front image taken 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, in the designated
ステップ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 of FIG.
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 the present embodiment, an input image of a cylindrical object 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 is taken from a direction in which the normal direction of the bottom surface of the cylinder and the optical axis of the camera match. Since the projection is converted into an image, the shape of the subject can be grasped in the original shape, the omission of detection of the cylinder or sphere to be detected can be suppressed, and the detection can be performed reliably.
また、本実施形態によれば、射影変換した画像から前景領域を抽出し、当該前景領域から色と輪郭情報を用いて物体を検出し、検出された物体の形状が円形であるかを検証するので、円柱物体以外の物体が併せて検出されてしまう過剰検出を抑制することができる。 Further, according to the present embodiment, a foreground region is extracted from the projected image, an object is detected from the foreground region using color and contour information, and it is verified whether the shape of the detected object is circular. Therefore, it is possible to suppress excessive detection in which objects other than cylindrical objects are also detected.
その結果、入力画像からの円柱物体の検出精度を向上することができる。球体であっても射影変換後の形状は円柱物体と同様に円形であることから、入力画像内に球体が含まれている場合であっても、当該球体の物体を精度よく検出することができる。 As a result, the accuracy of detecting a cylindrical object from the input image can be improved. Even if it is a sphere, the shape after the projective conversion is circular like a cylindrical object, so even if the input image contains a sphere, the object of the sphere can be detected accurately. ..
<第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 set by projection conversion processing. The subject is a cylindrical object by projecting conversion from the matching direction to the captured image, detecting the object using the color and contour information from the projected image, and performing shape verification on the detected result. Also realized that the detection was performed accurately.
但し、第1の実施形態で用いられる射影変換処理は、被写体が高さのない平面体であることを前提としている。例えば、図5に示した実空間を対象とした場合、(x1,y1)と(x2,y2)と(x3,y3)と(x4,y4)で囲われた平面部分については正確な射影変換処理を行うことができるが、当該平面上に存在する円柱物体や人物等は射影変換後の画像で歪みが生じてしまう。 However, the projective conversion 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 accurate projective conversion processing can be performed on a flat surface portion, a cylindrical object, a person, or the like existing on the flat surface will be distorted in the image after the projective conversion.
そのため、円柱物体の上面が射影変換行列算出のために指定した4点で構成される床の平面よりも高い場所に存在した場合、検出位置と当該平面上の位置の両者にはズレが生じることになる。 Therefore, if the upper surface of the cylindrical object exists at a position higher than the plane of the floor composed of four points specified for calculating the projective transformation matrix, the detection position and the position on the plane may be deviated. become.
その一方で、例えばカーリング競技でストーンの正確な位置を測定したい場合には、試合フィールドとなる平面上において円柱物体の位置を特定しなければならない場合がある。そこで、本実施形態では、図17に示すように、円柱物体又は球体の高さによる検出位置のズレを解消し、検出した円柱物体の中心位置から、射影変換処理で対象とする平面上での中心位置を推定する。 On the other hand, for example, when it is desired to measure the exact position of a stone in a curling competition, it may be necessary to specify the position of a cylindrical object on a plane serving as a 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 the sphere is eliminated, and the center position of the detected cylindrical object is transferred to the plane targeted by the projective conversion process. Estimate the center position.
図18は、第2の実施形態に係る物体検出装置1の構成ブロック構成を示す図である。物体検出装置1は、図18に示すように、第1の実施形態での構成に検出位置補正部17を加えて構成される。
FIG. 18 is a diagram showing 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 projection conversion process performed by the
射影変換部11には、少なくとも1枚以上の画像が入力される。本実施形態では、例えば図5に示した入力画像が入力される。また、本実施形態では、第1の実施形態の処理(図4)に対して、ステップS205,S206を追加している。以降、第1の実施形態と同様のステップ(ステップS201〜S204,S207〜S208)についての説明は割愛し、ステップS205,S206についてのみ説明する。
At least one or more images are 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, the process 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 this 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 projection conversion process. After adding the offset values of, the coordinates after adding the offset values are returned to the coordinates of the projection conversion image coordinate system, so the upper surface of the cylindrical object is higher than the plane composed of the four points specified for calculating the projection conversion matrix. Even if it exists in a 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 serving as the game field can be calculated.
以上、本発明を実施形態の例に基づき具体的に説明したが、上述の実施形態の説明は、本発明を説明するためのものであって、特許請求の範囲に記載の発明を限定し、又は当該範囲を減縮するように解すべきではない。また、本発明の各手段構成は上述の実施形態に限らず、特許請求の範囲に記載の技術的範囲内で種々の変形が可能であることは勿論である。例えば、図3に示したステップS102の前景抽出処理を、ステップS101の射影変換処理の前に行うようにしてもよい。 Although the present invention has been specifically described above based on the example of the embodiment, 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 understood to reduce the range. Further, each means configuration of the present invention is not limited to the above-described embodiment, and it goes without saying that various modifications can be made within the technical scope described in the claims. For example, the foreground extraction process of step S102 shown in FIG. 3 may be performed before the projection conversion process of step S101.
最後に、各実施形態で説明した物体検出装置1は、上記機能を備えるコンピュータ等で実現可能である。また、物体検出装置1としてコンピュータを機能させるための物体検出プログラム、当該物体検出プログラムの記憶媒体を作成することも可能である。
Finally, the
1…物体検出装置
11…射影変換部
12…前景抽出部
13…指定色抽出部
14…輪郭検出部
15…形状検証部
16…メモリ
17…検出位置補正部
1 ...
Claims (4)
空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換する射影変換部と、
前記正面画像から前記平面の前に位置する前景領域を抽出する前景抽出部と、
前記前景領域から指定色に合致する指定色領域を抽出する指定色抽出部と、
前記指定色領域を取り囲む輪郭を楕円で近似する輪郭検出部と、
前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力する形状検証部と、
を備えることを特徴とする物体検出装置。 In an object detection device that detects a columnar or spherical object from an image
A projective converter that 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 region that matches the designated color from the foreground region,
A contour detection unit that approximates the contour surrounding the designated color area with an ellipse,
A shape verification unit that determines whether or not the ellipse is circular, and if the ellipse is circular, outputs the ellipse as a cylindrical or spherical object.
An object detection device comprising.
コンピュータが、
空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換するステップと、
前記正面画像から前記平面の前に位置する前景領域を抽出するステップと、
前記前景領域から指定色に合致する指定色領域を抽出するステップと、
前記指定色領域を取り囲む輪郭を楕円で近似するステップと、
前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力するステップと、
を行うことを特徴とする物体検出方法。 In an object detection method that detects a columnar or spherical object from an image,
The computer
A step of projecting and 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.
A step of extracting a foreground region located in front of the plane from the front image,
A step of extracting a designated color area matching the designated color from the foreground area, and
A step of approximating the contour surrounding the specified color area with an ellipse,
A step of determining whether or not the ellipse is circular, and if the ellipse is circular, a step of outputting the ellipse as a cylindrical or spherical object.
An 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 JP2019036030A (en) | 2019-03-07 |
JP6758263B2 true 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) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7316097B2 (en) * | 2019-05-24 | 2023-07-27 | 日本放送協会 | Object trajectory generator and its program |
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 |
CN114166141B (en) * | 2021-11-23 | 2023-05-26 | 中国直升机设计研究所 | Multi-circular mark detection method for helicopter high-speed rotating blade image |
-
2017
- 2017-08-10 JP JP2017155605A patent/JP6758263B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019036030A (en) | 2019-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6758263B2 (en) | Object detection device, object detection method and object detection program | |
CN108475433B (en) | Method and system for large scale determination of RGBD camera poses | |
JP6942488B2 (en) | Image processing equipment, image processing system, image processing method, and program | |
JP6655878B2 (en) | Image recognition method and apparatus, program | |
JP5699788B2 (en) | Screen area detection method and system | |
US8331619B2 (en) | Image processing apparatus and image processing method | |
JP5837508B2 (en) | Posture state estimation apparatus and posture state estimation method | |
WO2017054314A1 (en) | Building height calculation method and apparatus, and storage medium | |
JP6397354B2 (en) | Human area detection apparatus, method and program | |
JP4597391B2 (en) | Facial region detection apparatus and method, and computer-readable recording medium | |
CN108416291B (en) | Face detection and recognition method, device and system | |
Kanter | Color Crack: Identifying Cracks in Glass | |
CN106919883B (en) | QR code positioning method and device | |
JP2018055367A (en) | Image processing device, image processing method, and program | |
TWI749370B (en) | Face recognition method and computer system using the same | |
JP2015184054A (en) | Identification device, method, and program | |
WO2023019793A1 (en) | Determination method, cleaning robot, and computer storage medium | |
JP2018142828A (en) | Deposit detector and deposit detection method | |
CN108205641B (en) | Gesture image processing method and device | |
US10997743B2 (en) | Attachable matter detection apparatus | |
CN110310336B (en) | Touch projection system and image processing method | |
CN114127798A (en) | Palm segmentation of non-contact fingerprint images | |
JP2005025568A (en) | Head image region extraction device | |
JP5217917B2 (en) | Object detection and tracking device, object detection and tracking method, and object detection and tracking program | |
JP5708305B2 (en) | Image recognition apparatus, image recognition method, and computer program for image recognition |
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 |