JP2019036030A - 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
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
Application number
JP2017155605A
Other languages
Japanese (ja)
Other versions
JP6758263B2 (en
Inventor
島村 潤
Jun Shimamura
潤 島村
徹郎 徳永
Tetsuo Tokunaga
徹郎 徳永
喜秀 外村
Yoshihide Tonomura
喜秀 外村
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)

Abstract

To improve detection accuracy of a cylindrical body or a spherical body form an image.SOLUTION: An object detection device 1 detects a cylindrical or spherical object from an image, and includes a projection transformation unit 11 which performs projection transformation of an original image which is obtained by imaging an object from an inclined angle with respect to a plane in a space into a front image obtained by imaging the object from a direction perpendicular to the plane, a foreground region extraction unit 12 which extracts a foreground region located in front of the plane from the front image, a designated color extraction unit 13 which extracts a designated color region matching the designated color from the foreground region, a profile detection unit 14 which approximates a profile surrounding the designated color region with an ellipse, and a shape verification unit 15 which determines whether the ellipse is a circle or not, and outputs the ellipse as a cylindrical object of a spherical object if the ellipse is a circle.SELECTED DRAWING: Figure 2

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 Document 1 discloses a technique for detecting a cylindrical object arranged using the Mean shift method of Non-Patent Document 2 so that the normal direction of the bottom surface is parallel to the normal line of the floor plane. ing. In the mean shift method, feature values are extracted from a specified region that is a template, a region having a feature value similar to this is detected from the image currently being processed, and the position corresponding to the template is detected from the image being processed. Estimate as In many cases, a histogram created from color information in a specified area is used as the feature amount. However, erroneous detection may occur when a similar color pattern exists in the background or the like. Therefore, in Non-Patent Document 1, a 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 others, “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 others, “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 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 claim 1 is an object detection apparatus 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 specified from the foreground area, a projection conversion section that performs projective conversion to a front image photographed from an angle perpendicular to the plane, a foreground extraction section that extracts a foreground area located in front of the plane from the front image, and A designated color extraction unit that extracts a designated color region that matches a color; a contour detection unit that approximates an outline surrounding the designated color region by an ellipse; and determines whether the ellipse is a circle, and the ellipse is a circle In the case of (3), a shape verification unit that outputs the ellipse as a cylindrical or spherical object is provided.

請求項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 projective transformation, and the plane of the cylinder or sphere forming the ellipse. A detection position correction unit is further provided that adds a predetermined offset value based on the height from the position and then returns to the position of the coordinate system after the projective transformation.

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

請求項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.

各実施形態で用いる実空間と入力画像の例を示す図である。It is a figure which shows the example of the real space and input image which are used by each embodiment. 物体検出装置の機能ブロック構成を示す図である。It is a figure which shows the functional block structure of an object detection apparatus. 物体検出処理のフローチャートを示す図である。It is a figure which shows the flowchart of an object detection process. 射影変換処理のフローチャートを示す図である。It is a figure which shows the flowchart of a projective transformation process. 入力画像の例を示す図である。It is a figure which shows the example of an input image. 背景画像の例を示す図である。It is a figure which shows the example of a background image. 背景幾何変換画像の例を示す図である。It is a figure which shows the example of a background geometric transformation image. 入力幾何変換画像の例を示す図である。It is a figure which shows the example of an input geometric transformation image. 前景抽出処理のフローチャートを示す図である。It is a figure which shows the flowchart of a foreground extraction process. 前景領域画像の例を示す図である。It is a figure which shows the example of a foreground area | region image. 指定色抽出処理のフローチャートを示す図である。It is a figure which shows the flowchart of a designated color extraction process. 指定色抽出画像の例を示す図である。It is a figure which shows the example of a designated color extraction image. 輪郭検出処理のフローチャートを示す図である。It is a figure which shows the flowchart of an outline detection process. 輪郭抽出画像の例を示す図である。It is a figure which shows the example of an outline extraction image. 楕円近似画像の例を示す図である。It is a figure which shows the example of an ellipse approximate image. 形状検証処理のフローチャートを示す図である。It is a figure which shows the flowchart of a shape verification process. 円柱物体の高さによる座標系間での中心位置のズレの例を示す図である。It is a figure which shows the example of the shift | offset | difference of the center position between coordinate systems by the height of a cylindrical object. 物体検出装置の機能ブロック構成(第2の実施形態)を示す図である。It is a figure which shows the functional block structure (2nd Embodiment) of an object detection apparatus. 射影変換処理のフローチャート(第2の実施形態)を示す図である。It is a figure which shows the flowchart (2nd Embodiment) of a projective transformation process. 検出位置補正処理のフローチャートを示す図である。It is a figure which shows the flowchart of a detection position correction process. オフセット値の例を示す図である。It is a figure which shows the example of an offset value. 射影変換画像座標系から入力画像座標系への位置座標の変換例を示す図である。It is a figure which shows the example of a conversion of the position coordinate from a projective transformation image coordinate system to an input image coordinate system. 入力画像座標系から射影変換画像座標系への位置座標の変換例を示す図である。It is a figure which shows the example of a conversion of the position coordinate from an input image coordinate system to a projective transformation 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. 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 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 real space is the positive direction of the z ′ axis perpendicular to the floor surface, and the cylinder The cylindrical objects 5a, 5b, and 5c existing on the floor surface that is a plane parallel to the bottom surface are detected as target objects.

例えば、カーリング競技で用いられる氷上のストーンを検出する場合に用いることができる。円柱物体以外に、ビリヤード競技やゲートボール競技で用いられる球体を対象物体としてもよい。   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 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, a projective transformation unit 11, a foreground extraction unit 12, a designated color extraction unit 13, and a contour. A detection unit 14, a shape verification unit 15, and a memory 16 are provided.

射影変換部11は、少なくとも1つ以上の入力画像を入力し、射影変換行列を算出して、算出した射影変換行列を用いて所定の背景画像を幾何変換して背景幾何変換画像としてメモリ16に記録するとともに、前記射影変換行列を用いて入力画像を幾何変換して入力幾何変換画像として出力する機能部である。   The projective transformation unit 11 receives 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 it in the memory 16 as a background geometric transformed image. And a functional unit that records and outputs an input geometric conversion image by geometrically converting the input image using the projective transformation matrix.

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

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

輪郭検出部14は、指定色抽出画像を入力し、当該指定色抽出画像内に含まれる全ての指定色領域に亘ってそれぞれの指定色領域を取り囲む輪郭を抽出し、抽出した輪郭を楕円で近似して楕円情報として出力する機能部である。   The contour detection unit 14 inputs a designated color extraction image, extracts a contour surrounding each designated color region over all the designated color regions included in the designated color extraction 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 processing for each ellipse information to determine whether the ellipse being processed is close to a circle. When the ellipse being processed is close to a circle, the ellipse information of the ellipse is output as object information.

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

ステップS101;
まず、射影変換部11が起動される。射影変換部11で行う射影変換処理を図4のフローチャートを用いて説明する。
Step S101;
First, the projective transformation unit 11 is activated. Projection conversion processing performed by the projection 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 image is input to the projective conversion unit 11. In the present embodiment, for example, an input image shown in FIG. 5 is input. The projection conversion unit 11 inputs predetermined four corresponding points when the activation is the first time. In the present embodiment, as the 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 ), (x 4 , y 4 ) → (x ′ 4 , y ′ 4 ) are designated. 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 ) are respectively (x 1 , y 1 ) , (X 2 , y 2 ), (x 3 , y 3 ), (x 4 , y 4 ), points in the 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 a projective transformation matrix H. The projective transformation matrix is also called homography, and is a matrix that represents a geometric transformation from a reference image to a 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 (identical points) between the recognition target and the reference image in the input image. The projective transformation unit 11 calculates a projective transformation matrix H using the above-described four corresponding points.

ステップS101c,S101d;
その後、射影変換部11は、算出した射影変換行列Hを用いて所定の背景画像の幾何変換を行い、背景幾何変換画像としてメモリ16に記録する。本実施形態では、図6に示す背景画像が予め与えられており、射影変換行列Hを用いて図7に示す背景幾何変換画像が得られたものとする。
Steps S101c and S101d;
Thereafter, 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, it is assumed that the background image shown in FIG. 6 is given in advance, and that the background geometric transformation image shown in FIG.

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

これにより、円柱物体を円柱底面の法線方向とカメラの光軸が合致しない方向から撮影した入力画像が、円柱底面の法線方向とカメラの光軸が合致する方向から撮影した画像へと射影変換されることになる。言い換えると、空間内の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 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 and the input geometric transformation image read from the memory 16. 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 difference processing using the input two converted images. The background difference process can be realized by obtaining an absolute value of a difference between pixels corresponding to the same position 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 difference processing often includes fine noise. The smoothing process can be realized, for example, by applying a Gaussian filter to the difference image. When the noise included in the difference image is small, the smoothing process may be skipped giving priority to the processing speed.

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

ステップ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, for example, by 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 an image composed of the extracted foreground pixels as a foreground area image in the memory 16 and ends the process. In the present embodiment, it is assumed that the foreground area image shown in FIG. 10 is obtained. As shown in FIG. 10, a background pattern that may cause a false detection is removed in advance in 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 an 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 lowest value (0,0,200) and the highest value (0,0,255) are displayed in RGB. In the case of red, the lowest value (200, 0, 0) and the highest value (255, 0, 0) are similarly expressed in RGB. For simplicity of explanation, the description has been made using RGB notation, but 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 for all pixels for a pixel in a foreground area image when the pixel value falls between the maximum value and the minimum value of the color information. An image obtained as a result of being performed on all pixels is referred to as a designated color extraction image.

ステップS103c;
次に、指定色抽出部13は、画像上での色情報は実環境の照明の影響等により変化することがあり、抽出された画素には欠損や過剰な抽出が行なわれることが多いため、指定色抽出画像に対してスムージング処理を行う。スムージング処理は、例えば、ガウシアンフィルタやメディアンフィルタを適用したり、モフォロジ演算を適用したりすることによって実現できる。ステップS102cと同様に、処理速度を優先してスムージング処理をスキップしてもよい。
Step S103c;
Next, the specified color extraction unit 13 may change the color information on the image due to the influence of illumination in the real environment, and the extracted pixels are often missing or excessively extracted. Smoothing processing is performed on the specified color extraction image. The smoothing process can be realized, for example, by applying a Gaussian filter or a median filter, or applying a morphology operation. Similarly to step S102c, the smoothing process may be skipped giving priority 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, it is assumed that there are two colors of blue and red as the colors of the object to be detected, and the above-described RGB values are used as the color information. As a result, the images shown in FIGS. 12A and 12B are 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 a gray scale, 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 a contour that surrounds each of the designated color regions included in the binarized image. This processing can be realized, for example, by the method of a reference (Suzuki, S, 1 other, “Topological Structural Analysis of Digitized Binary Images by Border Following”, CVGIP 301, 1985, p.32-p.46). . In this embodiment, the contours shown in FIGS. 14A and 14B are 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 the approximate ellipse ellipse information, and ends the processing. Here, the ellipse information is information including at least the center coordinates of the ellipse, the major axis and minor axis of the ellipse, and the rotation angle of the ellipse. The process of approximating an outline with an ellipse is described in, for example, a reference document (Andrew W, 1 other, “A Buyer's Guide to Conic Fitting”, Proc. 5th British Machine Vision Conference, Birmingham, 1995, p.513-p.522. ). In the present embodiment, 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 in FIG. 3;
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 the 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 determines whether or not the ellipse being processed is close to a circle by performing roundness threshold processing on each of the ellipse information. The roundness threshold processing can be measured, for example, based on 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 value processing is determined to be close to a circle if the minor axis / major axis> threshold value. All ellipses determined to be close to a circle are output as object information, and the process ends. In this embodiment, 5a, 5b, and 5c shown in FIGS. 15A and 15B output the center coordinates, the major and minor diameters of the ellipse, and the rotation angle of the ellipse as circular object information. Since 5d that approximates a human shape by an ellipse is not nearly circular, the object information is not output.

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

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

次に、物体検出装置1で行う物体検出処理について説明する。本実施形態では、第1の実施形態と異なる処理を行う射影変換部11と、第2の構成形態で追加した検出位置補正部17と、の各処理について説明する。   Next, the object detection process performed by the object detection apparatus 1 will be described. In the present embodiment, each process of the projection 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 mode will be described.

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

射影変換部11には、少なくとも1枚以上の画像が入力される。本実施形態では、例えば図5に示した入力画像が入力される。また、本実施形態では、第1の実施形態の処理(図4)に対して、ステップS205,S206を追加している。以降、第1の実施形態と同様のステップ(ステップS201〜S204,S207〜S208)についての説明は割愛し、ステップS205,S206についてのみ説明する。   At least one image is input to the projective conversion unit 11. In the present embodiment, for example, the input image shown in FIG. 5 is input. In this embodiment, steps S205 and S206 are added to the processing of the first embodiment (FIG. 4). Hereinafter, 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 an inverse matrix H −1 from the projective transformation matrix H calculated in step S202. The inverse matrix H −1 is a matrix expressing a geometric transformation from a projective transformed image to an input 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, processing performed by the detection position correction unit 17 will be described using the flowchart of FIG.

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

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

ステップS303;
まず、検出位置補正部17は、物体の中心位置の座標を、逆行列H−1を用いて射影変換前の入力画像座標系の座標に逆変換する。本実施形態では、図22に示すように、検出された物体の中心位置の座標が(c’,c’)であり、逆行列H−1により(c,c)に変換されたものとする。
Step S303;
First, the detection position correcting unit 17 inversely transforms the coordinates of the center position of the object into the coordinates of the input image coordinate system before projective transformation 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. 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 + d y ).

ステップ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 , c y + d y ) into the projective transformation image coordinate system using the projection transformation matrix H. In the present embodiment, as shown in FIG. 23, ((c x + d x ) ′, (c y + 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 re-transformed coordinate value as a new coordinate of the center position of the object to be processed, and stores it 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 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 object detection apparatus 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 causing a computer to function as the object detection apparatus 1 and a storage medium for the object detection program.

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

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

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

Cited By (7)

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