JP6758263B2 - Object detection device, object detection method and object detection program - Google Patents

Object detection device, object detection method and object detection program Download PDF

Info

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
Application number
JP2017155605A
Other languages
Japanese (ja)
Other versions
JP2019036030A (en
Inventor
島村 潤
潤 島村
徹郎 徳永
徹郎 徳永
喜秀 外村
喜秀 外村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017155605A priority Critical patent/JP6758263B2/en
Publication of JP2019036030A publication Critical patent/JP2019036030A/en
Application granted granted Critical
Publication of JP6758263B2 publication Critical patent/JP6758263B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 Document 1 discloses a technique for detecting a cylindrical object arranged so that the normal direction of the bottom surface is parallel to the normal line of the floor plane by using the Mean shift method of Non-Patent Document 2. ing. In the Mean shift method, a feature amount is extracted from a designated area that serves as a template, a region having a feature amount similar to this is detected from the image currently being processed, and a position corresponding to the template is set as a cylindrical object from the image being processed. Estimate as. A histogram created from the color information in the designated area is often used as the feature amount. However, erroneous detection may occur when a pattern of a similar color exists in the background or the like. Therefore, in Non-Patent Document 1, highly accurate detection of a cylindrical object is realized by using a histogram created by adding edge information to color information.

J. Kim、外3名、“Curling Stone Tracking by an Algorithm Using Appearance and Colour Features”、Proceedings of the World Congress on Electrical Engineering and Computer Systems and Science(EECSS 2015)、Paper No. 334、2015年7月J. Kim, 3 outsiders, “Curling Stone Tracking by an Algorithm Using Appearance and Color Features”, Proceedings of the World Congress on Electrical Engineering and Computer Systems and Science (EECSS 2015), Paper No. 334, July 2015 D. Comaniciu、外2名、“Real-time Tracking of Non-rigid Objects Using Mean Shift”、Proceedings of IEEE Conference on Computer Vision and Pattern Recognition、2015年、p.142-p.149D. Comaniciu, 2 outsiders, “Real-time Tracking of Non-rigid Objects Using Mean Shift”, Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2015, p.142-p.149

従来の方法では、指定領域内のエッジ情報から作成したヒストグラムを用いて、底面の法線方向が床平面の法線と平行になるように配置された円柱物体を検出している。 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 claim 1 is an object detection device that detects a cylindrical or spherical object from an image, and is an original image taken from an oblique angle with respect to a plane in space. Is designated from the foreground region, a projection conversion unit that casts and transforms the front image taken from an angle perpendicular to the plane, and a foreground extraction unit that extracts the 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 color, a contour detection unit that approximates the contour surrounding the designated color region with an ellipse, and a determination whether or not the ellipse is circular, and the ellipse is circular. In the case of, it is characterized by including a shape verification unit that outputs the ellipse as a cylindrical or spherical object.

請求項2に係る物体検出装置は、請求項1に記載の物体検出装置において、前記楕円の位置を射影変換前の座標系の位置に逆変換し、前記楕円を成す円柱体又は球体の前記平面からの高さに基づく所定のオフセット値を加えた後に、射影変換後の座標系の位置に戻す検出位置補正部を更に備えることを特徴とする。 The object detection device according to claim 2 is the object detection device according to claim 1, wherein the position of the ellipse is inversely converted to the position of the coordinate system before the projection conversion, and the plane of the cylinder or sphere forming the ellipse. It is characterized by further including a detection position correction unit that returns to the position of the coordinate system after the projection conversion after adding a predetermined offset value based on the height from.

請求項3に係る物体検出方法は、画像から円柱状又は球状の物体を検出する物体検出方法において、コンピュータが、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換するステップと、前記正面画像から前記平面の前に位置する前景領域を抽出するステップと、前記前景領域から指定色に合致する指定色領域を抽出するステップと、前記指定色領域を取り囲む輪郭を楕円で近似するステップと、前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力するステップと、を行うことを特徴とする。 The object detection method according to claim 3 is an object detection method for detecting a cylindrical or spherical object from an image, in which a computer captures an original image taken from an oblique angle with respect to a plane in space on the plane. A step of projecting and converting to a front image taken from a vertical angle, a step of extracting a foreground region located in front of the plane from the front image, and an extraction of a designated color region matching a designated color from the foreground region. Steps to be performed, a step of approximating the contour surrounding the designated color region with an ellipse, and determining whether or not the ellipse is circular, and if the ellipse is circular, the ellipse is output as a cylindrical or spherical object. It is characterized by performing steps and performing.

請求項4に係る物体検出プログラムは、請求項1又は2に記載の物体検出装置としてコンピュータを機能させることを特徴とする。 The object detection program according to claim 4 is characterized in that the computer functions as the object detection device according to claim 1 or 2.

本発明によれば、画像から円柱体又は球体を正確に検出することができる。 According to the present invention, a cylinder or a sphere can be accurately detected from an image.

各実施形態で用いる実空間と入力画像の例を示す図である。It is a figure which shows the example of the real space and the input image used in each embodiment. 物体検出装置の機能ブロック構成を示す図である。It is a figure which shows the functional block composition of the object detection apparatus. 物体検出処理のフローチャートを示す図である。It is a figure which shows the flowchart of the object detection process. 射影変換処理のフローチャートを示す図である。It is a figure which shows the flowchart of the projection conversion processing. 入力画像の例を示す図である。It is a figure which shows the example of the input image. 背景画像の例を示す図である。It is a figure which shows the example of the background image. 背景幾何変換画像の例を示す図である。It is a figure which shows the example of the background geometric transformation image. 入力幾何変換画像の例を示す図である。It is a figure which shows the example of the input geometric transformation image. 前景抽出処理のフローチャートを示す図である。It is a figure which shows the flowchart of the foreground extraction processing. 前景領域画像の例を示す図である。It is a figure which shows the example of the foreground area image. 指定色抽出処理のフローチャートを示す図である。It is a figure which shows the flowchart of the designated color extraction process. 指定色抽出画像の例を示す図である。It is a figure which shows the example of the designated color extraction image. 輪郭検出処理のフローチャートを示す図である。It is a figure which shows the flowchart of the contour detection process. 輪郭抽出画像の例を示す図である。It is a figure which shows the example of the contour extraction image. 楕円近似画像の例を示す図である。It is a figure which shows the example of the ellipse approximation image. 形状検証処理のフローチャートを示す図である。It is a figure which shows the flowchart of the shape verification process. 円柱物体の高さによる座標系間での中心位置のズレの例を示す図である。It is a figure which shows the example of the deviation of the center position between the coordinate systems by the height of a cylindrical object. 物体検出装置の機能ブロック構成(第2の実施形態)を示す図である。It is a figure which shows the functional block composition (second embodiment) of the object detection apparatus. 射影変換処理のフローチャート(第2の実施形態)を示す図である。It is a figure which shows the flowchart (second embodiment) of a projective transformation process. 検出位置補正処理のフローチャートを示す図である。It is a figure which shows the flowchart of the detection position correction processing. オフセット値の例を示す図である。It is a figure which shows the example of the offset value. 射影変換画像座標系から入力画像座標系への位置座標の変換例を示す図である。It is a figure which shows the conversion example of the position coordinate from a projective conversion image coordinate system to an input image coordinate system. 入力画像座標系から射影変換画像座標系への位置座標の変換例を示す図である。It is a figure which shows the conversion example of the position coordinate from the input image coordinate system to the projective conversion image coordinate system.

本発明は、上述した通り、画像からの円柱体又は球体の検出精度を改善することを目的とする。そのため、本発明は、空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換し、当該正面画像から前記平面の前に位置する前景領域を抽出し、当該前景領域から指定色に合致する指定色領域を抽出し、当該指定色領域を取り囲む輪郭を楕円で近似し、当該楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力する。 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 camera 3 in which the z'axis and the optical axis A do not match, the normal direction of the bottom surface of the cylinder in the real space is the positive direction of the z'axis vertically upward with respect to the floor surface, and the cylinder. Cylindrical objects 5a, 5b, and 5c existing on the floor surface, which is a plane parallel to the bottom surface, are detected as target objects.

例えば、カーリング競技で用いられる氷上のストーンを検出する場合に用いることができる。円柱物体以外に、ビリヤード競技やゲートボール競技で用いられる球体を対象物体としてもよい。 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 object detection device 1 according to the first embodiment. The object detection device 1 is a device that detects a cylindrical or spherical object from an image, and as shown in FIG. 2, has a projection conversion unit 11, a foreground extraction unit 12, a designated color extraction unit 13, and a contour. It is configured to include a detection unit 14, a shape verification unit 15, and a memory 16.

射影変換部11は、少なくとも1つ以上の入力画像を入力し、射影変換行列を算出して、算出した射影変換行列を用いて所定の背景画像を幾何変換して背景幾何変換画像としてメモリ16に記録するとともに、前記射影変換行列を用いて入力画像を幾何変換して入力幾何変換画像として出力する機能部である。 The projective transformation unit 11 inputs at least one or more input images, calculates a projective transformation matrix, geometrically transforms a predetermined background image using the calculated projective transformation matrix, and stores the background geometrically transformed image in the memory 16. It is a functional unit that records and geometrically transforms an input image using the projective transformation matrix and outputs it as an input geometrically transformed image.

前景抽出部12は、入力幾何変換画像と背景幾何変換画像とを入力し、当該入力幾何変換画像と当該背景幾何変換画像とを用いて背景差分処理によりx’−y’平面の前に位置する前景領域を抽出し、抽出した前景領域を前景領域画像として出力する機能部である。 The foreground extraction unit 12 inputs the input geometric transformation image and the background geometric transformation image, and is located in front of the x'-y'plane by background subtraction processing using the input geometry transformation image and the background geometry transformation image. This is a functional unit that extracts the foreground area and outputs the extracted foreground area as a foreground area image.

指定色抽出部13は、前景領域画像を入力するとともに、所定の色情報及び色範囲を入力し、当該色範囲内において前記所定の色に類する指定色領域を前景領域画像から抽出して指定色抽出画像として出力する機能部である。 The designated color extraction unit 13 inputs a foreground region image, inputs predetermined color information and a color range, extracts a designated color region similar to the predetermined color within the color range from the foreground region image, and specifies a designated color. This is a functional unit that outputs as an extracted image.

輪郭検出部14は、指定色抽出画像を入力し、当該指定色抽出画像内に含まれる全ての指定色領域に亘ってそれぞれの指定色領域を取り囲む輪郭を抽出し、抽出した輪郭を楕円で近似して楕円情報として出力する機能部である。 The contour detection unit 14 inputs a designated color extracted image, extracts a contour surrounding each designated color region over all the designated color regions included in the designated color extracted image, and approximates the extracted contour with an ellipse. It is a functional part that outputs as ellipse information.

形状検証部15は、全ての楕円情報を入力するとともに、所定の真円度閾値を入力し、それぞれの楕円情報について真円度閾値処理を行うことで処理中の楕円が円形に近いか否かを判定し、当該処理中の楕円が円形に近い場合、当該楕円の楕円情報を物体情報として出力する機能部である。 The shape verification unit 15 inputs all the ellipse information, inputs a predetermined roundness threshold value, and performs roundness threshold value processing on each ellipse information to determine whether or not the ellipse being processed is close to a circle. Is determined, and when the ellipse being processed is close to a circle, it is a functional unit that outputs ellipse information of the ellipse as object information.

次に、図3のフローチャートを用いて、物体検出装置1で行う物体検出処理について説明する。 Next, the object detection process performed by the object detection device 1 will be described with reference to the flowchart of FIG.

ステップS101;
まず、射影変換部11が起動される。射影変換部11で行う射影変換処理を図4のフローチャートを用いて説明する。
Step S101;
First, the projective conversion unit 11 is activated. The projective conversion process performed by the projective conversion unit 11 will be described with reference to the flowchart of FIG.

ステップS101a;
射影変換部11には、少なくとも1枚以上の画像が入力される。本実施形態では、例えば図5に示す入力画像が入力される。射影変換部11は、起動が初回の場合、所定の4点の対応点を入力する。本実施形態では、対応点として、例えば、(x,y)→(x’,y’)、(x,y)→(x’,y’)、(x,y)→(x’,y’)、(x,y)→(x’,y’)が指定される。記号“→”は、実空間と入力画像との対応を示す。(x’,y’)、(x’,y’)、(x’,y’)、(x’,y’)は、それぞれ、(x,y)、(x,y)、(x,y)、(x,y)に対応する実空間内の点であり、円柱底面と平行な平面上の点である。
Step S101a;
At least one or more images are input to the projective conversion unit 11. In this embodiment, for example, the input image shown in FIG. 5 is input. The projective conversion unit 11 inputs predetermined four corresponding points when the activation is the first time. In the present embodiment, as corresponding points, for example, (x 1 , y 1 ) → (x ′ 1 , y ′ 1 ), (x 2 , y 2 ) → (x ′ 2 , y ′ 2 ), (x 3 ). , y 3) → (x ' 3, y' 3), are designated (x 4, y 4) → (x '4, y' 4). The symbol “→” indicates the correspondence between the real space and the input image. (X '1, y' 1 ), (x '2, y' 2), (x '3, y' 3), (x '4, y' 4) , respectively, (x 1, y 1) , (X 2 , y 2 ), (x 3 , y 3 ), (x 4 , y 4 ) in real space, and points on a plane parallel to the bottom surface of the cylinder.

ステップS101b;
次に、射影変換部11は、射影変換行列Hを算出する。射影変換行列はホモグラフィとも呼ばれ、被写体が平面の時に、参照画像から入力画像内の被写体への幾何的な変換を表す行列であり、例えば3×3の行列で表現される。当該射影変換行列は、入力画像内の認識対象と参照画像で、4つ以上の対応する点(同一である点)があれば求められることができる。射影変換部11では、前述の4つの対応点を用いて射影変換行列Hを算出する。
Step S101b;
Next, the projective transformation unit 11 calculates the projective transformation matrix H. The projective transformation matrix is also called homography, and is a matrix representing the geometric transformation from the reference image to the subject in the input image when the subject is a plane, and is represented by, for example, a 3 × 3 matrix. The projective transformation matrix can be obtained if there are four or more corresponding points (points that are the same) in the recognition target and the reference image in the input image. The projective transformation unit 11 calculates the projective transformation matrix H using the above-mentioned four corresponding points.

ステップS101c,S101d;
その後、射影変換部11は、算出した射影変換行列Hを用いて所定の背景画像の幾何変換を行い、背景幾何変換画像としてメモリ16に記録する。本実施形態では、図6に示す背景画像が予め与えられており、射影変換行列Hを用いて図7に示す背景幾何変換画像が得られたものとする。
Steps S101c, S101d;
After that, the projective transformation unit 11 performs geometric transformation of a predetermined background image using the calculated projective transformation matrix H, and records it in the memory 16 as a background geometric transformation image. In the present embodiment, the background image shown in FIG. 6 is given in advance, and it is assumed that the background geometric transformation image shown in FIG. 7 is obtained by using the projective transformation matrix H.

ステップS101e,S101f;
最後に、射影変換部11は、ステップS101cと同様に射影変換行列Hを用いて入力画像も幾何変換を行い、入力幾何変換画像としてメモリ16に記録して処理を終える。本実施形態では、射影変換行列Hを用いて図8に示す入力幾何変換画像が得られたものとする。
Steps S101e, S101f;
Finally, the projective transformation unit 11 geometrically transforms the input image using the projective transformation matrix H in the same manner as in step S101c, and records the input geometrically transformed image in the memory 16 to finish the process. In this embodiment, it is assumed that the input geometric transformation image shown in FIG. 8 is obtained by using the projective transformation matrix H.

これにより、円柱物体を円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像が、円柱底面の法線方向とカメラの光軸が合致する方向から撮影した画像へと射影変換されることになる。言い換えると、空間内の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 foreground extraction unit 12 is activated. The foreground extraction process performed by the foreground extraction unit 12 will be described with reference to the flowchart of FIG.

ステップS102a;
前景抽出部12は、メモリ16から読み出した背景幾何変換画像と入力幾何変換画像を入力する。本実施形態では、図7に示した背景幾何変換画像と、図8に示した入力幾何変換画像と、が入力される。
Step S102a;
The foreground extraction unit 12 inputs the background geometric transformation image read from the memory 16 and the input geometric transformation image. In the present embodiment, the background geometric transformation image shown in FIG. 7 and the input geometric transformation image shown in FIG. 8 are input.

ステップS102b;
次に、前景抽出部12は、入力した2つの変換画像を用いて背景差分処理を行う。当該背景差分処理は、背景幾何変換画像と入力幾何変換画像とで互いに同一の位置に対応する画素の差分の絶対値を求めることで実現できる。
Step S102b;
Next, the foreground extraction unit 12 performs background subtraction processing using the two input converted images. The background subtraction processing can be realized by obtaining the absolute value of the difference between the pixels corresponding to the same positions in the background geometric transformation image and the input geometric transformation image.

ステップS102c;
次に、前景抽出部12は、背景差分処理によって得られる差分画像は細かなノイズが含まれることが多いため、差分画像に対してスムージング処理を行う。スムージング処理は、例えば、ガウシアンフィルタを差分画像に対して適用することで実現できる。差分画像に含まれるノイズが少ない場合、処理速度を優先してスムージング処理をスキップしてもよい。
Step S102c;
Next, the foreground extraction unit 12 performs smoothing processing on the difference image because the difference image obtained by the background subtraction processing often contains fine noise. The smoothing process can be realized, for example, by applying a Gaussian filter to the difference image. If the noise contained in the difference image is small, the smoothing process may be skipped with priority given to the processing speed.

ステップS102d;
次に、前景抽出部12は、差分画像に対して所定の閾値による二値化処理を行うことで、前景画素の位置を示すマスク画像を得る。
Step S102d;
Next, the foreground extraction unit 12 obtains a mask image indicating the position of the foreground pixel by performing a binarization process on the difference image according to a predetermined threshold value.

ステップS102e;
次に、前景抽出部12は、入力幾何変換画像とマスク画像から前景画素を抽出する。この処理は、例えば、入力幾何変換画像とマスク画像のアンド演算処理によって実現できる。
Step S102e;
Next, the foreground extraction unit 12 extracts foreground pixels from the input geometric transformation image and the mask image. This process can be realized by, for example, an AND operation process of the input geometric transformation image and the mask image.

ステップS102f;
最後に、前景抽出部12は、抽出した前景画素から構成される画像を前景領域画像としてメモリ16に記録して処理を終える。本実施形態では、図10に示す前景領域画像が得られるものとする。図10に示すように、ステップS102によって誤検出の原因となりうる背景パターンがあらかじめ除去される。
Step S102f;
Finally, the foreground extraction unit 12 records the image composed of the extracted foreground pixels as a foreground area image in the memory 16 and finishes the process. In this embodiment, it is assumed that the foreground region image shown in FIG. 10 can be obtained. As shown in FIG. 10, the background pattern that may cause erroneous detection is removed in advance by step S102.

図3のステップS103;
次に、指定色抽出部13が起動される。指定色抽出部13で行う指定色抽出処理を図11のフローチャートを用いて説明する。
Step S103 of FIG. 3;
Next, the designated color extraction unit 13 is activated. The designated color extraction process performed by the designated color extraction unit 13 will be described with reference to the flowchart of FIG.

ステップ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 color extraction unit 13 inputs predetermined color information and a foreground area image. The predetermined color information is a value indicating the color of the object to be detected, and has two values, a minimum value and a maximum value, for each predetermined color. For example, when the object to be detected is blue, the minimum value (0,0,200) and the maximum value (0,0,255) are set in RGB notation. In the case of red, the lowest value (200,0,0) and the highest value (255,0,0) are also expressed in RGB. Although it has been described in RGB notation for simplification of the explanation, it may be expressed in other color spaces such as HSV, HLS, and LAB. In that case, the color space of the foreground area image is also converted.

ステップS103b;
次に、指定色抽出部13は、前景領域画像と色情報から指定色に該当の領域を抽出する。この処理は、前景領域画像のある画素に対して、その画素値が前記色情報の最高値と最低値の間に収まる場合は抽出することを、全画素に対して行うことで実現できる。全画素に対して行った結果得られる画像を指定色抽出画像と呼ぶ。
Step S103b;
Next, the designated color extraction unit 13 extracts a region corresponding to the designated color from the foreground region image and the color information. This process can be realized by performing extraction on all the pixels of a pixel in the foreground region image when the pixel value falls between the maximum value and the minimum value of the color information. The image obtained as a result of performing for all pixels is called a designated color extraction image.

ステップS103c;
次に、指定色抽出部13は、画像上での色情報は実環境の照明の影響等により変化することがあり、抽出された画素には欠損や過剰な抽出が行なわれることが多いため、指定色抽出画像に対してスムージング処理を行う。スムージング処理は、例えば、ガウシアンフィルタやメディアンフィルタを適用したり、モフォロジ演算を適用したりすることによって実現できる。ステップS102cと同様に、処理速度を優先してスムージング処理をスキップしてもよい。
Step S103c;
Next, in the designated color extraction unit 13, the color information on the image may change due to the influence of lighting in the actual environment, and the extracted pixels are often missing or excessively extracted. Performs smoothing processing on the specified color extracted image. The smoothing process can be realized, for example, by applying a Gaussian filter or a median filter, or by applying a morphology operation. Similar to step S102c, the smoothing process may be skipped with priority given to the processing speed.

ステップS103d;
最後に、指定色抽出部13は、指定色抽出画像をメモリ16に記録して処理を終える。本実施形態では、検出したい物体の色として青と赤の2色があり、その色情報として前述のRGB値を用いたものとする。これにより、指定色抽出画像として図12(a),(b)に示す画像が得られる。
Step S103d;
Finally, the designated color extraction unit 13 records the designated color extraction image in the memory 16 and finishes the process. In the present embodiment, there are two colors of an object to be detected, blue and red, and the above-mentioned RGB values are used as the color information. As a result, the images shown in FIGS. 12A and 12B can be obtained as the designated color extraction images.

図3のステップS104;
次に、輪郭検出部14が起動される。輪郭検出部14で行う輪郭検出処理を図13のフローチャートを用いて説明する。
Step S104 of FIG. 3;
Next, the contour detection unit 14 is activated. The contour detection process performed by the contour detection unit 14 will be described with reference to the flowchart of FIG.

ステップS104a;
輪郭検出部14は、指定色抽出画像を入力する。
Step S104a;
The contour detection unit 14 inputs a designated color extraction image.

ステップS104b;
次に、輪郭検出部14は、入力した指定色抽出画像をグレースケールに変換し、所定の閾値で二値化する。
Step S104b;
Next, the contour detection unit 14 converts the input designated color extraction image into grayscale and binarizes it with a predetermined threshold value.

ステップ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 contour detection unit 14 extracts contours surrounding each of the designated color regions included in the binarized image. This process can be achieved, for example, by the method of reference (Suzuki, S, 1 outsider, “Topological Structural Analysis of Digitized Binary Images by Border Following”, CVGIP 30 1, 1985, p.32-p.46). .. In the present embodiment, the contours shown in FIGS. 14A and 14B can be obtained for each of the two designated color extraction images.

ステップ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 contour detection unit 14 approximates all the extracted contours with ellipses, outputs ellipse information of the approximated ellipses, and finishes the process. Here, the ellipse information is information including at least the center coordinates of the ellipse, the major axis and the minor axis of the ellipse, and the rotation angle of the ellipse. For example, the process of approximating the contour with an ellipse is described in References (Andrew W, 1 outsider, "A Buyer's Guide to Conic Fitting", Proc.5th British Machine Vision Conference, Birmingham, 1995, p.513- p.522. ) Can be achieved. In the present embodiment, the ellipses shown in FIGS. 15A and 15B are obtained for each of the two designated color extraction images.

図3のステップS105;
次に、形状検証部15が起動される。形状検証部15で行う形状検証処理を図16のフローチャートを用いて説明する。
Step S105 of FIG.
Next, the shape verification unit 15 is activated. The shape verification process performed by the shape verification unit 15 will be described with reference to the flowchart of FIG.

ステップS105a;
形状検証部15は、全ての楕円情報と所定の真円度閾値とを入力する。
Step S105a;
The shape verification unit 15 inputs all ellipse information and a predetermined roundness threshold value.

ステップS105b〜S105d;
次に、形状検証部15は、それぞれの楕円情報について真円度閾値処理を行うことで、処理中の楕円が円形に近いかどうかを判定する。真円度閾値処理は例えば、楕円の長径に対する短径の比が1.0に近いかどうかによって計ることができる。この場合、真円度閾値処理は、短径÷長径>閾値なら円形に近いと判定する。円形に近いと判定された楕円の全てを物体情報として出力し処理を終える。本実施形態では、図15(a),(b)に示した5a,5b,5cがそれぞれ円形物体情報としてその中心座標、楕円の長径と短径、楕円の回転角度が出力される。ヒト型を楕円で近似した5dは円形に近くないので、その物体情報が出力されることはない。
Steps S105b to S105d;
Next, the shape verification unit 15 performs roundness threshold processing on each ellipse information to determine whether or not the ellipse being processed is close to a circle. The roundness threshold processing can be measured, for example, by whether the ratio of the minor axis to the major axis of the ellipse is close to 1.0. In this case, the roundness threshold processing determines that it is close to a circle if the minor axis ÷ major axis> threshold value. All the ellipses judged to be close to a circle are output as object information and the process is completed. In the present embodiment, the center coordinates, the major axis and the minor axis of the ellipse, and the rotation angle of the ellipse are output as circular object information for 5a, 5b, and 5c shown in FIGS. 15A and 15B, respectively. Since 5d, which is an approximation of the human shape with an ellipse, is not close to a circle, its object information is not output.

以上、第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に示した実空間を対象とした場合、(x,y)と(x,y)と(x,y)と(x,y)で囲われた平面部分については正確な射影変換処理を行うことができるが、当該平面上に存在する円柱物体や人物等は射影変換後の画像で歪みが生じてしまう。 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 object detection device 1 according to the second embodiment. As shown in FIG. 18, the object detection device 1 is configured by adding the detection position correction unit 17 to the configuration of the first embodiment.

検出位置補正部17は、形状検証部15から出力される物体情報を入力し、検出していた物体の位置の補正を行い、位置補正後の物体情報を出力する機能部である。 The detection position correction unit 17 is a functional unit that inputs the object information output from the shape verification unit 15, corrects the position of the detected object, and outputs the object information after the position correction.

次に、物体検出装置1で行う物体検出処理について説明する。本実施形態では、第1の実施形態と異なる処理を行う射影変換部11と、第2の構成形態で追加した検出位置補正部17と、の各処理について説明する。 Next, the object detection process performed by the object detection device 1 will be described. In this embodiment, each process of the projective conversion unit 11 that performs processing different from that of the first embodiment and the detection position correction unit 17 added in the second configuration will be described.

まず、図19のフローチャートを用いて、射影変換部11で行う射影変換処理を説明する。 First, the projection conversion process performed by the projection conversion unit 11 will be described with reference to the flowchart of FIG.

射影変換部11には、少なくとも1枚以上の画像が入力される。本実施形態では、例えば図5に示した入力画像が入力される。また、本実施形態では、第1の実施形態の処理(図4)に対して、ステップS205,S206を追加している。以降、第1の実施形態と同様のステップ(ステップS201〜S204,S207〜S208)についての説明は割愛し、ステップS205,S206についてのみ説明する。 At least one or more images are input to the projective conversion unit 11. In this embodiment, for example, the input image shown in FIG. 5 is input. Further, in the present embodiment, steps S205 and S206 are added to the process (FIG. 4) of the first embodiment. Hereinafter, the description of the same steps (steps S201 to S204, S207 to S208) as in the first embodiment will be omitted, and only steps S205 and S206 will be described.

ステップS205;
射影変換部11は、ステップS202で算出した射影変換行列Hから逆行列H−1を算出する。逆行列H−1は、射影変換された画像から入力画像への幾何変換を表現する行列であり、例えば、H−1×(x’,y’,1)^T=(x,y,1)となる。
Step S205;
The projective transformation unit 11 calculates the inverse matrix H -1 from the projective transformation matrix H calculated in step S202. The inverse matrix H -1 is a matrix representing the geometric transformation to the input image from the projection transformation image, for example, H -1 × (x '1 , y' 1, 1) ^ T = (x 1, y 1 , 1).

ステップS206;
次に、射影変換部11は、算出済みの射影変換行列Hと、当該射影変換行列Hの逆行列H−1をメモリ16に記録する。
Step S206;
Next, the projective transformation unit 11 records the calculated projective transformation matrix H and the inverse matrix H -1 of the projective transformation matrix H in the memory 16.

次に、図20のフローチャートを用いて、検出位置補正部17で行う処理を説明する。 Next, the process performed by the detection position correction unit 17 will be described with reference to the flowchart of FIG.

ステップS301;
検出位置補正部17は、形状検証処理を終えた全ての物体情報と、所定のオフセットを入力する。ここで、オフセットとは、図21に示すように、円柱物体の高さを考慮して、例えば、入力画像上での物体の中心位置から、射影変換処理で対象とする平面上での中心位置までのオフセット値(円柱物体のx’−y’平面からの高さに基づく所定のオフセット値)であり、例えば両点を通るベクトルdとして表現できる。
Step S301;
The detection position correction unit 17 inputs all the object information for which the shape verification process has been completed and a predetermined offset. Here, as shown in FIG. 21, the offset means, for example, from the center position of the object on the input image to the center position on the plane targeted by the projection conversion process in consideration of the height of the cylindrical object. It is an offset value up to (a predetermined offset value based on the height of the cylindrical object from the x'-y'plane), and can be expressed as, for example, a vector d passing through both points.

ステップS302;
次に、検出位置補正部17は、或る1つの物体について以降の処理を行う。
Step S302;
Next, the detection position correction unit 17 performs the subsequent processing on a certain object.

ステップS303;
まず、検出位置補正部17は、物体の中心位置の座標を、逆行列H−1を用いて射影変換前の入力画像座標系の座標に逆変換する。本実施形態では、図22に示すように、検出された物体の中心位置の座標が(c’,c’)であり、逆行列H−1により(c,c)に変換されたものとする。
Step S303;
First, the detection position correction unit 17 inversely converts the coordinates of the center position of the object to the coordinates of the input image coordinate system before the projection conversion using the inverse matrix H- 1 . In the present embodiment, as shown in FIG. 22, the coordinates of the center position of the detected object are (c x ', cy '), and are converted into (c x , cy ) by the inverse matrix H- 1. It shall be.

ステップS304;
次に、検出位置補正部17は、変換された座標に所定のオフセットを加算する。本実施形態では、オフセットdとして(d,d)が予め与えられているものとし、加算後の座標は(c+d,c+d)となる。
Step S304;
Next, the detection position correction unit 17 adds a predetermined offset to the converted coordinates. In the present embodiment, it is assumed that (d x , dy ) is given in advance as the offset d, and the coordinates after the addition are (c x + d x , cy + dy ).

ステップS305;
次に、検出位置補正部17は、座標(c+d,c+d)を射影変換行列Hを用いて射影変換画像座標系に再変換する。本実施形態では、図23に示すように射影変換処理で対象とする平面上での中心位置の推定結果として((c+d)’,(c+d)’)が算出されることになる。
Step S305;
Next, the detection position correction unit 17 reconverts the coordinates (c x + d x , cy + dy ) into the projective transformation image coordinate system using the projective transformation matrix H. In the present embodiment, as shown in FIG. 23, ((c x + d x )', ( cy + d y )') is calculated as the estimation result of the center position on the target plane in the projective transformation process. become.

ステップS306;
次に、検出位置補正部17は、再変換された座標値を処理対象の物体の中心位置の新たな座標として更新し、メモリ16に記憶する。
Step S306;
Next, the detection position correction unit 17 updates the reconverted coordinate values as new coordinates of the center position of the object to be processed and stores them in the memory 16.

ステップS307;
検出位置補正部17は、以上の処理を入力された全ての物体に亘って処理を行い、最後にメモリ16に記憶されている物体情報を全て出力して処理を終える。
Step S307;
The detection position correction unit 17 performs the above processing on all the input objects, and finally outputs all the object information stored in the memory 16 to finish the processing.

以上、第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 object detection device 1 described in each embodiment can be realized by a computer or the like having the above functions. It is also possible to create an object detection program for operating the computer as the object detection device 1 and a storage medium for the object detection program.

1…物体検出装置
11…射影変換部
12…前景抽出部
13…指定色抽出部
14…輪郭検出部
15…形状検証部
16…メモリ
17…検出位置補正部
1 ... Object detection device 11 ... Projection conversion unit 12 ... Foreground extraction unit 13 ... Designated color extraction unit 14 ... Contour detection unit 15 ... Shape verification unit 16 ... Memory 17 ... Detection position correction unit

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.
前記楕円の位置を射影変換前の座標系の位置に逆変換し、前記楕円を成す円柱体又は球体の前記平面からの高さに基づく所定のオフセット値を加えた後に、射影変換後の座標系の位置に戻す検出位置補正部を更に備えることを特徴とする請求項1に記載の物体検出装置。 The position of the ellipse is inversely converted to the position of the coordinate system before the projective transformation, and a predetermined offset value based on the height of the cylinder or sphere forming the ellipse from the plane is added, and then the coordinate system after the projective transformation. The object detection device according to claim 1, further comprising a detection position correction unit for returning to the position of. 画像から円柱状又は球状の物体を検出する物体検出方法において、
コンピュータが、
空間内の平面に対して斜めの角度から撮影された原画像を、前記平面に対して垂直な角度から撮影した正面画像に射影変換するステップと、
前記正面画像から前記平面の前に位置する前景領域を抽出するステップと、
前記前景領域から指定色に合致する指定色領域を抽出するステップと、
前記指定色領域を取り囲む輪郭を楕円で近似するステップと、
前記楕円が円形であるか否かを判定し、前記楕円が円形の場合、前記楕円を円柱体又は球体の物体として出力するステップと、
を行うことを特徴とする物体検出方法。
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.
請求項1又は2に記載の物体検出装置としてコンピュータを機能させることを特徴とする物体検出プログラム。 An object detection program according to claim 1 or 2, wherein the computer functions as the object detection device.
JP2017155605A 2017-08-10 2017-08-10 Object detection device, object detection method and object detection program Active JP6758263B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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