JP2011221939A - Object recognition device, object recognition method and program - Google Patents

Object recognition device, object recognition method and program Download PDF

Info

Publication number
JP2011221939A
JP2011221939A JP2010092930A JP2010092930A JP2011221939A JP 2011221939 A JP2011221939 A JP 2011221939A JP 2010092930 A JP2010092930 A JP 2010092930A JP 2010092930 A JP2010092930 A JP 2010092930A JP 2011221939 A JP2011221939 A JP 2011221939A
Authority
JP
Japan
Prior art keywords
point
value
candidate
unit
candidate coordinate
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.)
Withdrawn
Application number
JP2010092930A
Other languages
Japanese (ja)
Inventor
Mitsuhiro Inazumi
満広 稲積
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2010092930A priority Critical patent/JP2011221939A/en
Publication of JP2011221939A publication Critical patent/JP2011221939A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image recognition device capable of performing detection processing even when illuminating directions and illumination light to an object for recognition are different while reducing memory capacity.SOLUTION: The image recognition device has: a feature point data storage part in which feature point data of a plurality of first feature points extracted from a registered image and a displacement vector from the first feature points to a reference point of the registered image is stored; a feature point extraction part which extracts a second feature point of the object for recognition of the input image; a candidate coordinate point calculation part which calculates a candidate coordinate point of a reference point candidate from coordinates of the second feature point and the displacement vector for every rotation angle obtained by sequentially rotating the displacement vector at a preset unit angle centering around the second feature point; a candidate coordinate point voting part which performs voting by individually integrating a cosine value and a sine value of the rotation angle of the displacement vector for every candidate coordinate point; and an object for recognition determination part which detects a candidate coordinate point with the largest numeric value obtained by adding a square value of an integrated value, considers the detected candidate coordinate point as coordinates of the reference point, and detects the rotation angle as a rotation angle to the object for recognition with respect to the registered image.

Description

本発明は、入力される画像において、予め登録された参照物体の位置、姿勢(回転角)及びスケーリングファクターを検出する物体認識装置、物体認識方法及びプログラムに関するものである。   The present invention relates to an object recognition apparatus, an object recognition method, and a program for detecting a position, posture (rotation angle), and scaling factor of a reference object registered in advance in an input image.

撮像装置などから入力される入力画像から、予め登録された参照物体の位置(2次元座標系における位置座標(x,y))、回転角θ及びスケーリングファクターSなどを検出する検出方法として、相関法、フーリエ記述子法、モーメント法、ハフ変換法などがよく知られている。
上述したいずれの検出方法も、登録されている参照物体の登録画像の特徴点は予め抽出されて登録されている。
そして、入力画像内から抽出された認識対象物体の特徴点と、登録されている登録画像の特徴点とを用いて、入力画像内における登録画像に対応した物体の画像の位置、登録画像に対する姿勢、及びスケーリングファクターを求める。
As a detection method for detecting a position of a reference object registered in advance (position coordinates (x, y) in a two-dimensional coordinate system), a rotation angle θ, a scaling factor S, and the like from an input image input from an imaging device or the like, correlation The method, the Fourier descriptor method, the moment method, the Hough transform method, etc. are well known.
In any of the detection methods described above, the feature points of the registered image of the registered reference object are extracted and registered in advance.
Then, using the feature points of the recognition target object extracted from the input image and the feature points of the registered image registered, the position of the image corresponding to the registered image in the input image, and the attitude to the registered image And a scaling factor.

上述した特徴点を用いた検出方法において、ハフ変換法は投票と呼ばれる単純な多数決の原理に基づくものである。 そのため、入力画像内における認識対象物体同士の1部の接触、あるいは重なりなどによる部分的な遮蔽、また画像ノイズなどに対し、認識対象物体の認識処理において頑健な性能を有している。
このハフ変換法において、任意形状を有する認識対象物体の検出を高速に行う方法として一般化ハフ変換法がある(例えば、非特許文献1参照)。
In the detection method using the feature points described above, the Hough transform method is based on a simple majority rule called voting. Therefore, it has robust performance in the recognition target object recognition process against partial occlusion due to contact or overlap of parts of the recognition target objects in the input image, image noise, and the like.
In this Hough transform method, there is a generalized Hough transform method as a method for detecting a recognition target object having an arbitrary shape at high speed (for example, see Non-Patent Document 1).

上記一般化ハフ変換法は、参照物体より抽出された特徴点(ピクセル単位)において、その特徴点における接線と、あるいは法線の角度と、またその特徴点及び物体の基準となる基準点の位置関係とを参照テーブルとして準備する。この基準点は、参照物体の2次元座標への配置位置を示す配置基準点である。
すなわち、モデルとなる登録画像の上記参照テーブルを生成する図10のフローチャートに示すように、登録画像の画像を入力し(ステップS1)、図11に示すように、参照物体の特徴点(P)を2次微分(ラプラシアン)法あるいはモラベック(Moravec)の方法等により抽出する(ステップS2)。つまり、周辺画素との値(画素値)の差の大きな点である輪郭線上の点や、表面状態が大きく変わる点などが特徴点となる。
In the above generalized Hough transform method, in the feature point (pixel unit) extracted from the reference object, the tangent at the feature point or the angle of the normal line, and the position of the reference point serving as the basis of the feature point and the object Prepare the relationship as a reference table. This reference point is an arrangement reference point indicating the arrangement position of the reference object on the two-dimensional coordinates.
That is, as shown in the flowchart of FIG. 10 for generating the reference table of the registered image as a model, the image of the registered image is input (step S1), and the feature point (P) of the reference object as shown in FIG. Is extracted by the second derivative (Laplacian) method or the Moravec method (step S2). In other words, the points on the contour line, which are points having a large difference in value (pixel value) from the surrounding pixels, and the point where the surface state changes greatly are characteristic points.

そして、登録画像における特徴点の2値化処理を予め設定した閾値を用いて行い、2値化データを出力する(ステップS3)。ここで行う2値化手法としては、あらかじめ設定してある閾値による単純2値化法をはじめとして、ある閾値でヒストグラムを2クラスに分割した場合のクラス間分散が最大になるときの閾値を2値化閾値とする大津法(「判別および最小2乗規準に基づく自動しきい値選定法」(大津)、電子通信学会論文誌、Vol.J63−D,No.4.pp.349−356,1980)、あるいは、階調を持つ画像に対して、局所的濃度に応じて閾値を設定する2値化法等が用いられる。   Then, binarization processing of feature points in the registered image is performed using a preset threshold value, and binarized data is output (step S3). As a binarization method performed here, a threshold when the inter-class variance becomes maximum when a histogram is divided into two classes with a certain threshold, including a simple binarization method with a preset threshold, is set to 2. Otsu method as a threshold value (“Automatic threshold selection method based on discrimination and least squares criterion” (Otsu), IEICE Transactions, Vol. J63-D, No. 4. pp. 349-356, 1980), or a binarization method for setting a threshold according to the local density for an image having gradation.

次に、登録画像の各特徴点のデータを記憶する参照テーブルの記憶領域の初期化を行い(ステップS4)、参照物体の基準点を任意の位置、例えば参照物体の重心位置として求める(ステップS5)。 上記基準点から特徴点への変位ベクトルと、特徴点における単位法線ベクトルとからなる特徴点データを求める処理を、全ての2値化データに対して行ったか否かの判定を行い(ステップS6)、全ての2値化データにおける特徴点データの取得処理が終了すると処理を終了し、特徴点データを取得する処理を行っていない2値化データがある場合に処理をステップS7へ進める。   Next, the storage area of the reference table that stores data of each feature point of the registered image is initialized (step S4), and the reference point of the reference object is obtained as an arbitrary position, for example, the barycentric position of the reference object (step S5). ). It is determined whether or not the processing for obtaining the feature point data including the displacement vector from the reference point to the feature point and the unit normal vector at the feature point has been performed for all the binarized data (step S6). ) When the process for acquiring feature point data in all binarized data ends, the process ends. If there is binarized data that has not undergone the process of acquiring feature point data, the process proceeds to step S7.

未処理の2値化データを読み出し(ステップS7)、この2値化データが特徴点であるか否かの判定を上記閾値により行い(ステップS8)、特徴点でない場合に処理をステップS6へ進め、特徴点である場合に処理をステップS9へ進める。
そして、特徴点(図においては単に点とする)における接線あるいは単位法線ベクトルを求め、処理をステップS6へ進める(ステップS9)。
例えば、ステップS9において、点P1における法線ベクトルN1を求め、点P2における法線ベクトルを求め、他の点においても同様に法線ベクトルを求める。これらの法線ベクトルの長さが同一となるように単位法線ベクトルとして規格化し、図12に示すように、特徴点の番号に対応させて、この特徴点における単位法線ベクトルを構成するx成分NXn(1≦n≦Mの整数、Mは特徴点の数)及びy成分NYnと、この特徴点における変位ベクトルDnを構成するx成分DXn及びy成分DYnとの参照テーブルを生成する。
Unprocessed binarized data is read (step S7), and whether or not the binarized data is a feature point is determined based on the threshold value (step S8). If it is not a feature point, the process proceeds to step S6. If it is a feature point, the process proceeds to step S9.
Then, a tangent or unit normal vector at the feature point (simply referred to as a point in the figure) is obtained, and the process proceeds to step S6 (step S9).
For example, in step S9, the normal vector N1 at the point P1 is obtained, the normal vector at the point P2 is obtained, and the normal vectors are similarly obtained at other points. These normal vectors are standardized as unit normal vectors so that the lengths thereof are the same, and as shown in FIG. 12, x corresponding to the feature point numbers and constituting the unit normal vectors at the feature points A reference table of the component NXn (an integer of 1 ≦ n ≦ M, M is the number of feature points), the y component NYn, and the x component DXn and the y component DYn constituting the displacement vector Dn at the feature point is generated.

上記参照テーブルを用いた非特許文献1による画像認識処理は、図13に示すフローチャートの動作により行われる。 撮像装置等から入力画像を入力し(ステップS11)、図14に示すように、入力画像内の認識対象物体の特徴点(Q)を参照画像と同様の方法にて抽出する(ステップS12)。この図14は、認識対象物体の特徴点に対し、登録画像の特徴点を重ね合わせ、その登録画像の特徴点における法線ベクトルの角度を合わせ、登録画像の変位ベクトルの指し示す基準点の位置の投票を行うことを示す概念図である。
そして、入力画像における特徴点の2値化処理を、参照画像の処理と同様に、予め設定した閾値を用いて行い、2値化データを出力する(ステップS13)。
The image recognition process according to Non-Patent Document 1 using the reference table is performed by the operation of the flowchart shown in FIG. An input image is input from the imaging device or the like (step S11), and as shown in FIG. 14, the feature point (Q) of the recognition target object in the input image is extracted by the same method as the reference image (step S12). In FIG. 14, the feature point of the registered image is superimposed on the feature point of the recognition target object, the angle of the normal vector at the feature point of the registered image is matched, and the position of the reference point indicated by the displacement vector of the registered image It is a conceptual diagram which shows performing voting.
Then, the binarization processing of the feature points in the input image is performed using a preset threshold value similarly to the processing of the reference image, and binarized data is output (step S13).

次に、基準点の候補に対して投票を行う投票空間(図15の投票空間の概念図にある回転角度毎の基準点の座標を示す2次元平面)の記憶領域の初期化を行う(ステップS14)。
上記基準点から特徴点への変位ベクトルと、特徴点における単位法線ベクトルとからなる特徴点データを求める処理を、全ての2値化データに対して行ったか否かの判定を行い(ステップS15)、全ての2値化データに対する特徴点データの取得処理が終了した場合に処理を終了し、特徴点データを取得する処理を行っていない2値化データがある場合に処理をステップS16へ進める。
Next, the storage area of the voting space (two-dimensional plane showing the coordinates of the reference point for each rotation angle in the voting space conceptual diagram of FIG. 15) for voting on the reference point candidates is initialized (step S14).
It is determined whether or not the processing for obtaining the feature point data including the displacement vector from the reference point to the feature point and the unit normal vector at the feature point has been performed for all the binarized data (step S15). ) When the feature point data acquisition process for all binarized data has been completed, the process ends. When there is binarized data for which feature point data acquisition processing has not been performed, the process proceeds to step S16. .

未処理の2値化データを読み出し(ステップS16)、この2値化データが特徴点であるか否かの判定を上記閾値により行い(ステップS17)、特徴点でない場合、つまり閾値よりも小さい場合に処理をステップS15へ進め、特徴点である場合、つまり閾値以上の場合に処理をステップS18へ進める。
そして、特徴点の単位法線ベクトルを求め、処理をステップ19へ進める(ステップS18)。
登録画像の全ての特徴点を用いて、認識対象物体の選択された特徴点に対応した基準点の投票処理を行ったか否かの判定を行い(ステップS19)、認識対象物体の選択された特徴点に対して、登録画像の全ての特徴点を用いた投票処理が終了した場合、処理をステップS15へ進め、一方、投票処理に用いられていない登録画像の特徴点が存在する場合、処理をステップS20へ進める。
Unprocessed binarized data is read (step S16), and whether or not the binarized data is a feature point is determined based on the threshold value (step S17). If it is not a feature point, that is, smaller than the threshold value. The process proceeds to step S15, and if it is a feature point, that is, if it is equal to or greater than the threshold value, the process proceeds to step S18.
And the unit normal vector of a feature point is calculated | required and a process is advanced to step 19 (step S18).
It is determined whether or not the reference point voting process corresponding to the selected feature point of the recognition target object has been performed using all the feature points of the registered image (step S19), and the selected feature of the recognition target object is determined. If the voting process using all the feature points of the registered image is completed for the point, the process proceeds to step S15. On the other hand, if there is a feature point of the registered image that is not used for the voting process, the process is performed. Proceed to step S20.

認識対象物体の特徴点に対し、登録画像の特徴点を重ね合わせ、認識対象物体の特徴点における単位法線ベクトルと、登録画像の特徴点における単位法線ベクトルとの角度差(回転角θ)を求める(ステップS20)。   The feature point of the registered image is superimposed on the feature point of the recognition target object, and the angle difference (rotation angle θ) between the unit normal vector at the feature point of the recognition target object and the unit normal vector at the feature point of the registration image Is obtained (step S20).

次に、登録画像の特徴点の変位ベクトルを、特徴点を中心として回転角θ分、以下の式により回転させる(ステップS21)。
認識対象物体の特徴点における単位法線ベクトルと、登録画像の特徴点における単位法線ベクトルとから、COS値とSIN値とを求める。たとえば、図11における点P1が図14における点Q2であると仮定した場合、以下の(1)式により求めることができる。 COS = Nx1×nx2 + Ny1×ny2
SIN = Nx1×ny2 − Ny1×nx2 …(1)
ここで、登録画像の単位法線ベクトルを(Nx1,Ny1)とし、認識対象物体の単位法線ベクトルを(nx2,ny2)とする。 ここで、変位ベクトルも同様に、特徴点に対して回転角θにより回転するため、回転させた変位ベクトルの成分dx及びdyは、以下の(2)式により求めることができる。
dx = COS×DX − SIN×DY
dy = SIN×DX + COS×DY …(2)
ここで、登録画像の変位ベクトルを(DX,DY)としている。
Next, the displacement vector of the feature point of the registered image is rotated by the following equation about the feature point by the rotation angle θ (step S21).
A COS value and a SIN value are obtained from the unit normal vector at the feature point of the recognition target object and the unit normal vector at the feature point of the registered image. For example, when it is assumed that the point P1 in FIG. 11 is the point Q2 in FIG. 14, it can be obtained by the following equation (1). COS = Nx1 x nx2 + Ny1 x ny2
SIN = Nx1 × ny2−Ny1 × nx2 (1)
Here, the unit normal vector of the registered image is (Nx1, Ny1), and the unit normal vector of the recognition target object is (nx2, ny2). Here, since the displacement vector is also rotated with respect to the feature point by the rotation angle θ, the components dx and dy of the rotated displacement vector can be obtained by the following equation (2).
dx = COS × DX−SIN × DY
dy = SIN × DX + COS × DY (2)
Here, the displacement vector of the registered image is (DX, DY).

入力画像の認識対象物体の特徴点の位置対して、上記回転させた変位ベクトルを、以下の式のように加えて、基準点の候補位置を求める(ステップS22)。 上述した式により、点Q2の座標を(Qx,Qy)とすると、認識対象物体の基準点の候補は以下の(3)式により求められる。
Rx = Qx + dx
Ry = Qy + dy …(3)
The candidate position of the reference point is obtained by adding the rotated displacement vector to the position of the feature point of the recognition target object in the input image as shown in the following equation (step S22). If the coordinates of the point Q2 are (Qx, Qy) according to the above-described equation, the reference point candidate of the recognition target object is obtained by the following equation (3).
Rx = Qx + dx
Ry = Qy + dy (3)

そして、回転角θに対応する2次元平面の座標に対し、上記基準点の候補の位置(Rx,Ry)に「1」を加算、すなわち投票を行う(ステップS23)。 上述したように、非特許文献1の方法においては、各特徴点における登録画像と認識対象物体とのそれぞれの法線の角度を合わせて(この際の回転角が姿勢となる)変位ベクトルの示す基準点の位置の投票を行う。
この結果、重ね合わせた特徴点が登録画像と認識対象物体とで対応している場合、法線ベクトルの角度を合わせると、登録画像の変位ベクトルが同一の点の方向を向き、その指し示す先の基準点が重なり合うため、投票数がピークとなる位置を、認識対象物体の基準点の位置として検出するとともに、その際の回転角を登録画像に対する姿勢として得ることができる。この処理により、登録画像と入力画像における認識対象物体との認識処理を非常に効率良く行う。
Then, “1” is added to the position (Rx, Ry) of the reference point candidate with respect to the coordinates of the two-dimensional plane corresponding to the rotation angle θ, that is, voting is performed (step S23). As described above, in the method of Non-Patent Document 1, a displacement vector indicating the angle of each normal line of a registered image and a recognition target object at each feature point (the rotation angle at this time becomes a posture) is shown. Vote for the location of the reference point.
As a result, when the superimposed feature points correspond to the registered image and the recognition target object, when the normal vector angle is adjusted, the displacement vector of the registered image points in the direction of the same point, Since the reference points overlap, it is possible to detect the position where the number of votes is the peak as the position of the reference point of the recognition target object, and to obtain the rotation angle at that time as the posture with respect to the registered image. By this process, the recognition process between the registered image and the recognition target object in the input image is performed very efficiently.

しかしながら、この投票空間の次元を考えると、スケーリングファクターSを考慮しない場合であっても、図15に示すように、データ構成が縦位置(縦座標)、横位置(横座標)、回転角の3次元となる。また、スケーリングファクターによるサイズ変化も、物体検出において考慮すると1次元が加わり、4次元となる。
このため、実際の物体認識に対して応用する場合、3次元及び4次元の投票空間を構成するために非常に多くのメモリーを必要とすることになる。以降の説明においては、スケーリングファクターの次元を除いた3次元の投票空間に対して評価を行う。
However, considering the dimension of this voting space, even if the scaling factor S is not taken into consideration, as shown in FIG. 15, the data structure is vertical position (vertical coordinate), horizontal position (horizontal coordinate), and rotation angle. 3D. In addition, when the size change due to the scaling factor is also taken into consideration in the object detection, one dimension is added and becomes four dimensions.
For this reason, when applied to actual object recognition, a very large amount of memory is required to construct three-dimensional and four-dimensional voting spaces. In the following description, evaluation is performed on a three-dimensional voting space excluding the dimension of the scaling factor.

この3次元の投票空間の場合、上記非特許文献1の方法においては、「NX×NY×NA×NV」のビット数が必要となる。ここで、入力画像における認識対象物体の2次元座標における位置、及び登録画像に対する回転角の検出結果を示す際、2次元座標のx軸(横軸)の検出位置の分割数(分解能に対応)である座標点数NX、y軸(縦軸)の検出位置の分割数である座標点数NY、回転角度の検出角度の分割数である角度分割NA、それぞれの投票数を蓄積するメモリーのビット数NV(通常は2バイトあるいは4バイト)である。
すなわち、非特許文献1においては、認識対象物体の候補の位置及び角度ごとに、ぞれぞれの投票に対応させているため、多くのメモリー容量が必要となる。
この多くのメモリー容量を削減するため、物体検出候補の位置ごとに物体検出候補の回転角度θに対応するCOS値及びSIN値を単に積算する方法がある(たとえば、特許文献1参照)。
In the case of this three-dimensional voting space, the number of bits “NX × NY × NA × NV” is required in the method of Non-Patent Document 1. Here, when the position of the recognition target object in the input image in the two-dimensional coordinates and the detection result of the rotation angle with respect to the registered image are shown, the number of divisions of the detection position of the x-axis (horizontal axis) of the two-dimensional coordinates (corresponding to the resolution) The number of coordinate points NX, the number of coordinate points NY that is the number of divisions of the detection position of the y-axis (vertical axis), the angle division NA that is the number of divisions of the detection angle of the rotation angle, and the number of bits NV of the memory that accumulates the number of votes (Normally 2 bytes or 4 bytes).
That is, in Non-Patent Document 1, a large amount of memory capacity is required because each vote corresponds to each position and angle of a recognition target object candidate.
In order to reduce this large memory capacity, there is a method of simply integrating the COS value and the SIN value corresponding to the rotation angle θ of the object detection candidate for each position of the object detection candidate (see, for example, Patent Document 1).

特許文献1を用いた画像認識処理は、図16に示すフローチャートの動作により行われる。
撮像装置等から入力画像を入力し(ステップS31)、図14に示すように、入力画像内の認識対象物体の特徴点を参照画像と同様の方法にて抽出する(ステップS32)。
そして、入力画像における特徴点の2値化処理を、参照画像の処理と同様に、予め設定した閾値を用いて行い、2値化データを出力する(ステップS33)。
Image recognition processing using Patent Document 1 is performed by the operation of the flowchart shown in FIG.
An input image is input from an imaging device or the like (step S31), and as shown in FIG. 14, feature points of the recognition target object in the input image are extracted by the same method as the reference image (step S32).
Then, the binarization processing of the feature points in the input image is performed using a preset threshold value similarly to the processing of the reference image, and binarized data is output (step S33).

次に、基準点の候補に対して投票を行う投票空間(後述するCOS値及びSIN値を積算するそれぞれの2次元平面)の記憶領域の初期化を行う(ステップS34)。
各特徴点におけるCOS値及びSIN値それぞれを、上記基準点の候補の位置に対して積算する処理を、全ての2値化データに対して行ったか否かの判定を行い(ステップS35)、全ての2値化データに対する上記COS値及びSIN値の積算処理が終了した場合に処理を終了し、上記COS値及びSIN値の積算処理を行っていない2値化データがある場合に処理をステップS36へ進める。
Next, the storage area of the voting space for voting on the reference point candidates (each two-dimensional plane for accumulating COS values and SIN values described later) is initialized (step S34).
It is determined whether or not the process of integrating the COS value and SIN value at each feature point with respect to the position of the reference point candidate is performed for all binarized data (step S35). When the COS value and SIN value integration process for the binarized data is completed, the process ends. When there is binarized data that has not been subjected to the COS value and SIN value integration process, the process proceeds to step S36. Proceed to

未処理の2値化データを読み出し(ステップS36)、この2値化データが特徴点であるか否かの判定を上記閾値により行い(ステップS37)、特徴点でない場合に処理をステップS35へ進め、特徴点である場合に処理をステップS38へ進める。
そして、特徴点の単位法線ベクトルを求め、処理をステップ39へ進める(ステップS18)。
登録画像の全ての特徴点を用いて、認識対象物体の選択された特徴点に対応した基準点にCOS値及びSIN値の積算処理を行ったか否かの判定を行い(ステップS39)、認識対象物体の選択された特徴点に対して、登録画像の全ての特徴点を用いた積算処理が終了した場合、処理をステップS35へ進め、一方、積算処理に用いられていない登録画像の特徴点が存在する場合、処理をステップS40へ進める。
Unprocessed binarized data is read (step S36), and whether or not the binarized data is a feature point is determined based on the threshold value (step S37). If it is not a feature point, the process proceeds to step S35. If it is a feature point, the process proceeds to step S38.
And the unit normal vector of a feature point is calculated | required and a process is advanced to step 39 (step S18).
Using all the feature points of the registered image, it is determined whether or not the COS value and the SIN value have been added to the reference point corresponding to the selected feature point of the recognition target object (step S39). When the integration process using all the feature points of the registered image is completed for the selected feature point of the object, the process proceeds to step S35, while there are feature points of the registered image that are not used for the integration process. If it exists, the process proceeds to step S40.

入力画像における認識対象物体の特徴点の単位法線ベクトル(nx,ny)と、登録画像の特徴点の単位法線ベクトル(Nx,Ny)とから、以下の(4)式により、各特徴点におけるCOS値及びSIN値を求める(ステップS40)。
COS = Nx×nx + Ny×ny
SIN = Nx×ny − Ny×nx …(4)
Based on the unit normal vector (nx, ny) of the feature point of the recognition target object in the input image and the unit normal vector (Nx, Ny) of the feature point of the registered image, A COS value and a SIN value are obtained (step S40).
COS = Nx × nx + Ny × ny
SIN = Nx × ny−Ny × nx (4)

(4)式により求めたCOS値及びSIN値と、重ね合わせた登録画像の特徴点の変位ベクトル(DX,DY)とから、回転角θにより回転させた変位ベクトル(dx,dy)を、下記(5)式により求める。
dx = COS×DX − SIN×DY
dy = SIN×DX + COS×DY …(5)
The displacement vector (dx, dy) rotated by the rotation angle θ from the COS value and SIN value obtained by the equation (4) and the displacement vector (DX, DY) of the feature point of the registered image that has been superimposed is expressed as follows: Obtained by equation (5).
dx = COS × DX−SIN × DY
dy = SIN × DX + COS × DY (5)

そして、入力画像における認識対象物体の特徴点(Qx,Qy)と、回転させた変位ベクトル(dx,dy)とから、以下の(6)式により、基準点位置の候補の位置を求める。 Rx = Qx + dx
Ry = Qy + dy …(6)
この得られた基準点位置の候補の位置(Rx,Ry)に対して、COS(θ)とSIN(θ)とを、図17に示すように、それぞれCOS(θ)の投票空間と、SIN(θ)の投票空間に積算する。 この結果、投票空間としてのメモリー容量は、「NX×NY×2×(積算のためのビット数)」で得られることになる。積算するビット数については双方ともに2から4ビットであるため、角度分解数NAを360とし1度の分解能を有すると考えると、特許文献1の方法は非特許文献1に比較して、1/180のメモリー容量にて実現することができる。ここで、2はCOS値、SIN値それぞれの積算を行う2つの2次元座標を示している。
Then, from the feature point (Qx, Qy) of the recognition target object in the input image and the rotated displacement vector (dx, dy), the position of the reference point position candidate is obtained by the following equation (6). Rx = Qx + dx
Ry = Qy + dy (6)
With respect to the obtained candidate position (Rx, Ry) of the reference point position, COS (θ) and SIN (θ) are respectively represented as voting space of COS (θ) and SIN as shown in FIG. It accumulates in the voting space of (θ). As a result, the memory capacity as the voting space is obtained by “NX × NY × 2 × (number of bits for integration)”. Since the number of bits to be integrated is both 2 to 4 bits, the angle resolution number NA is set to 360 and the resolution of 1 degree is considered. It can be realized with a memory capacity of 180. Here, 2 indicates two two-dimensional coordinates for integrating the COS value and the SIN value, respectively.

この投票処理により、認識対象物体の基準点の候補の点が登録画像に対して回転角θを有する真の基準点である場合、その候補の点に対して登録画像の各特徴点の全てからの回転角θの投票が大部分を占めることが考えらる。このため、真の基準点である点におけるCOS値とSIN値とのそれぞれの積算値は、その認識対象物体の回転角θの投票が大部分を占めることにより、その回転角θに対応するCOS値、SIN値の整数倍、投票数倍に近づくことになる。その結果、COS積算値、SIN積算値のいずれかまたは両方においてピークを得ることができる。
したがって、COS積算値、SIN積算値のピーク位置が入力画像における認識対象物体の基準点であり、その基準点に積算されたCOS値の積算値とSIN値の積算値との比、すなわちtan−1(SIN値の積算値/COS値の積算値)により回転角θを求めることができる。
By this voting process, when the candidate point of the reference point of the recognition target object is a true reference point having a rotation angle θ with respect to the registered image, from all of the feature points of the registered image with respect to the candidate point. It can be considered that the majority of the votes of the rotation angle θ are. For this reason, each of the integrated values of the COS value and the SIN value at the point that is the true reference point is determined by the vote of the rotation angle θ of the recognition target object, and the COS corresponding to the rotation angle θ. Value, an integer multiple of the SIN value, and the number of votes. As a result, a peak can be obtained in one or both of the COS integrated value and the SIN integrated value.
Therefore, the peak position of the COS integrated value and the SIN integrated value is the reference point of the recognition target object in the input image, and the ratio between the integrated value of the COS value integrated to the reference point and the integrated value of the SIN value, that is, tan − The rotation angle θ can be obtained from 1 (integrated value of SIN value / integrated value of COS value).

一方、基準点の候補の点が真の基準点でない場合、認識対象物体の特徴点における投票が誤投票であったり、あるいはノイズに起因するものとなり、投票される回転角θは一様乱数的な分布を有すると仮定される。
この結果、この真の基準点でない点でのCOS値及びSIN値の積算は、それぞれCOS関数、SIN関数を0度から360度までを一様な重みで単純に積分した値の整数倍となることが期待され、積算値は0に近づくことになる。
また、任意形状を有する認識対象物体の検出を行うための方法としては、相関法または畳込みが用いられている(例えば、非特許文献2参照)。
On the other hand, if the reference point candidate point is not a true reference point, the vote at the feature point of the recognition target object may be a false vote or may be caused by noise, and the voted rotation angle θ is uniformly random. It is assumed to have a distribution.
As a result, the integration of the COS value and the SIN value at a point that is not the true reference point is an integral multiple of the COS function and the SIN function, each of which is simply integrated from 0 degrees to 360 degrees with a uniform weight. It is expected that the integrated value will approach zero.
As a method for detecting a recognition target object having an arbitrary shape, a correlation method or convolution is used (for example, see Non-Patent Document 2).

特開2007−128374号公報JP 2007-128374 A

D.H.Ballard,”Generalizing The Hough Transform To Detect Arbitrary Shapes”,Pattern Recongition,Vol.13,no.2,pp.111-122,1981D.H. Ballard, “Generalizing The Hough Transform To Detect Arbitrary Shapes”, Pattern Recongition, Vol. 13, no. 2, pp. 111-122, 1981 ”新編画像解析ハンドブック”、2004、東京大学出版会、第2部第4章「マッチング」“New Image Analysis Handbook”, 2004, University of Tokyo Press, Part 2, Chapter 4, “Matching”

しかしながら、特許文献1及び非特許文献1に示す物体認識方法にあっては、登録画像画像に対する入力画像における認識対象物体の回転角を元にして、変位ベクトルを回転させ、基準点の候補点を算出するため、登録画像から抽出した特徴点と、その特徴点における法線(または接線)のベクトル情報を必要としている。
このため、登録画像の特徴点毎に法線(または接線)のベクトル情報を得るための処理が必要となる。
また、登録画像と、入力画像とを撮像した際の、認識対象物体に対する照明方向や照明光の違いにより、計算から得られる法線ベクトルや接線の数値に系統的な誤差が発生することが考えられる。
However, in the object recognition methods shown in Patent Document 1 and Non-Patent Document 1, the displacement vector is rotated based on the rotation angle of the recognition target object in the input image with respect to the registered image image, and the reference point candidate points are obtained. In order to calculate, the feature point extracted from the registered image and the vector information of the normal (or tangent) at the feature point are required.
For this reason, a process for obtaining normal (or tangent) vector information for each feature point of the registered image is required.
In addition, systematic errors may occur in the normal vectors and tangent values obtained from calculations due to differences in the illumination direction and illumination light for the recognition target object when the registered image and the input image are captured. It is done.

また、登録画像と、入力画像とを撮像した際の、撮像距離が異なるなどの条件により、認識対象物体の見かけの大きさ(サイズ)の違いに対応するスケーリングに対しても誤差が発生することが考えられる。
すなわち、すでに説明したように、任意の特徴点におけるへクトルの大きさ、法線ベクトルの推定は、その点近傍の輝度の変化により求められる。
したがって、照明条件の変化により、法線ベクトルなどが大きな影響を受けることになる。
図18は、入力画像の大きさが異なった場合において、入力画像を撮像する画素の分解能が等しいために誤差が発生することを示す概念図である。図18に示されるように、撮像素子の画素の分解能は、抽出しようとする画像の大きさの変化に対して一定である。図18(a)の登録画像に対して、図18(b)のように入力画像が縮小したり、図18(c)のように入力画像が拡大していると、仮に同じ画像が同じ点に存在していたとしても、その物体の撮像素子上の大きさに依存し、各特徴点における法線ベクトルは近傍画像の輝度値の変化により異なる値となる。
上述したような誤差により、入力される入力画像の見かけ上の大きさの変化(すなわちスケーリング)が存在する場合、登録画像の特徴点における法線ベクトルと、入力画像の特徴点における法線ベクトルとを用いて、基準点の候補座標における投票処理を行った結果にも誤差が発生することになる。
In addition, due to conditions such as different imaging distances when the registered image and the input image are captured, an error also occurs in scaling corresponding to the difference in the apparent size (size) of the recognition target object. Can be considered.
That is, as already described, the estimation of the magnitude of the vector and the normal vector at an arbitrary feature point can be obtained by the change in luminance near that point.
Therefore, the normal vector and the like are greatly affected by changes in the illumination conditions.
FIG. 18 is a conceptual diagram showing that an error occurs because the resolution of pixels that capture an input image is equal when the sizes of the input images are different. As shown in FIG. 18, the resolution of the pixels of the image sensor is constant with respect to the change in the size of the image to be extracted. If the input image is reduced as shown in FIG. 18B or the input image is enlarged as shown in FIG. 18C with respect to the registered image shown in FIG. The normal vector at each feature point varies depending on the change in the luminance value of the neighboring image, depending on the size of the object on the image sensor.
If there is a change in the apparent size of the input image (ie, scaling) due to the error as described above, the normal vector at the feature point of the registered image and the normal vector at the feature point of the input image An error also occurs in the result of voting using reference point candidate coordinates.

また、特許文献1の物体認識方法は、特徴点における投票の動作が、正しい位置の回転角θ以外において等方的に行われ、投票結果が平均化されて「0」に近づくことが期待されている。
しかしながら、登録画像と入力画像の認識対象物体とにおける法線ベクトルの誤差により、誤った座標において大量の投票による積算が行われると、認識対象物体の検出処理が正しく行われないことになる。
また、特許文献1の物体認識方法は、入力画像に複数の認識対象物体が存在し、これらの認識対象物体が重なり合ったり、近接して配置されている場合、誤った座標に大量の投票による積算が行われ、認識対象物体の検出処理を正しく行うことができない。このとき、投票処理自体は正常に行われるために、その検出結果が正しいか否かを直接に検出することができない。
In the object recognition method of Patent Document 1, the voting operation at the feature point is performed isotropically except for the rotation angle θ at the correct position, and the voting results are expected to be averaged and approach “0”. ing.
However, due to an error in the normal vector between the registered image and the recognition target object of the input image, if a large number of votes are accumulated at incorrect coordinates, the recognition target object detection process will not be performed correctly.
Further, the object recognition method disclosed in Patent Document 1 includes a plurality of recognition target objects in an input image, and when these recognition target objects overlap or are arranged close to each other, integration by a large number of votes at incorrect coordinates. The recognition target object detection process cannot be performed correctly. At this time, since the voting process itself is normally performed, it cannot be directly detected whether or not the detection result is correct.

図19を用いて、特許文献1が認識処理を行えない場合を説明する。図19は、認識対象物体の構成及び配置について説明する概念図である。
図19(a)のモデル1と図19(b)モデル2とは、基準点を重心とし、同一の位置に基準点がある登録画像である。 図19(c)は、同じ登録画像のモデル1が回転角θを0度と180度として重なっている場合を示している。この場合、特許文献1においては0度と180度との積算が同一の座標にて重なるため、COS値、SIN値ともに平均化されて「0」となり、正確な検出が出来ない。
また、図19(d)は、モデル1が0度で配置され、モデル2が180度で配置されている。この場合も基準点が同一であるため、図19(c)と同様な状態となり、モデル1及びモデル2の双方共に検出することができない可能性が高い。
The case where patent document 1 cannot perform a recognition process is demonstrated using FIG. FIG. 19 is a conceptual diagram illustrating the configuration and arrangement of a recognition target object.
Model 1 in FIG. 19A and model 2 in FIG. 19B are registered images having the reference point at the center and the reference point at the same position. FIG. 19C shows a case where the models 1 of the same registered image overlap with each other with the rotation angles θ set to 0 degrees and 180 degrees. In this case, in Patent Document 1, since the integration of 0 degrees and 180 degrees overlaps at the same coordinate, both the COS value and the SIN value are averaged to “0”, and accurate detection cannot be performed.
In FIG. 19D, model 1 is arranged at 0 degrees and model 2 is arranged at 180 degrees. Also in this case, since the reference points are the same, the state is the same as in FIG. 19C, and it is highly possible that neither model 1 nor model 2 can be detected.

一方、非特許文献2の物体認識方法は、相関法を用いるために、特徴点における法線ベクトルや接線を必要としないため、特許文献1及び非特許文献1における問題が発生することはない。
しかしながら、単純な相関法の場合、非特許文献1に記載されている計算量を低減する手法、及び特許文献1に記載されているメモリー容量を削減する方法が用いられていない。
すなわち、相関法においては、登録画像の全ての回転角θ毎に設けられた、基準点の2次元の候補座標に対して投票を行って行くためメモリー容量を多く必要とし、かつ相関値の計算において大量の演算処理を行う必要がある。
On the other hand, since the object recognition method of Non-Patent Document 2 uses a correlation method and does not require normal vectors or tangents at feature points, problems in Patent Document 1 and Non-Patent Document 1 do not occur.
However, in the case of the simple correlation method, the method for reducing the calculation amount described in Non-Patent Document 1 and the method for reducing the memory capacity described in Patent Document 1 are not used.
In other words, in the correlation method, a large amount of memory capacity is required for voting on the two-dimensional candidate coordinates of the reference point provided for every rotation angle θ of the registered image, and calculation of correlation values is performed. It is necessary to perform a large amount of arithmetic processing in

本発明は、このような事情に鑑みてなされたもので、その目的は、画像認識に必要な計算量及びメモリー容量を低減し、かつ認識対象物体に対する照明方向や照明光が異なったとしても、この認識対象物体の検出処理を行うことが可能な画像認識装置、画像認識方法及びプログラムを提供することにある。   The present invention has been made in view of such circumstances, and its purpose is to reduce the amount of calculation and memory capacity required for image recognition, and even if the illumination direction and illumination light for the recognition target object are different, An object of the present invention is to provide an image recognition apparatus, an image recognition method, and a program capable of performing this recognition target object detection processing.

本発明の物体認識装置は、登録画像より抽出した複数の第1の特徴点と、前記第1の特徴点から当該登録画像の基準点への変位ベクトルとからなる特徴点データが記憶される特徴点データ記憶部と、入力画像より第2の特徴点を抽出する特徴点抽出部と、前記第2の特徴点毎に、当該第2の特徴点を回転中心として、前記第1の特徴点全ての前記変位ベクトルの各々を予め設定した単位角度にて順次回転させ、回転させた回転角毎において、前記第2の特徴点の座標と前記変位ベクトルとから基準点の候補である候補座標点を算出する候補座標点算出部と、前記候補座標点毎に、前記変位ベクトルの回転角に対応した余弦値と正弦値とによる投票値を個別に積算する候補座標点投票部と、余弦値と正弦値との積算値の自乗値を加算した数値が最大である候補座標点を、前記候補座標点のなかから検出して、検出された候補座標点を基準点の座標とし、当該座標点に対応する回転角を、前記登録画像に対する前記入力画像の回転角として検出する認識対象物体判定部とを有することを特徴とする。
本発明の物体認識方法は、登録画像データ生成部が、登録画像より抽出した複数の第1の特徴点と、前記第1の特徴点から当該登録画像の基準点への変位ベクトルとからなる特徴点データが記憶される特徴点データ記憶過程と、特徴点抽出部が、入力画像より第2の特徴点を抽出する特徴点抽出過程と、候補座標点算出部が、前記第2の特徴点毎に、当該第2の特徴点を回転中心として、前記第1の特徴点全ての前記変位ベクトルの各々を予め設定した単位角度にて順次回転させ、回転させた回転角毎において、前記第2の特徴点の座標と前記変位ベクトルとから基準点の候補である候補座標点を算出する候補座標点算出過程と、候補座標点投票部が前記候補座標点毎に、前記変位ベクトルの回転角に対応した余弦値と正弦値とによる投票値を個別に積算する候補座標点投票過程と、対象物体判定部が、余弦値と正弦値との積算値の自乗値を加算した数値が最大である候補座標点を、前記候補座標点のなかから検出して、検出された候補座標点を基準点の座標とし、当該座標点に対応する回転角を、前記登録画像に対する前記入力画像の回転角として検出する認識対象物体判定過程とを有することを特徴とする。
本発明のプログラムは、登録画像データ生成部が、登録画像より抽出した複数の第1の特徴点と、前記第1の特徴点から当該登録画像の基準点への変位ベクトルとからなる特徴点データが記憶される特徴点データ記憶処理と、特徴点抽出部が、入力画像より第2の特徴点を抽出する特徴点抽出処理と、候補座標点算出部が、前記第2の特徴点毎に、当該第2の特徴点を回転中心として、前記第1の特徴点全ての前記変位ベクトルの各々を予め設定した単位角度にて順次回転させ、回転させた回転角毎において、前記第2の特徴点の座標と前記変位ベクトルとから基準点の候補である候補座標点を算出する候補座標点算出処理と、候補座標点投票部が前記候補座標点毎に、前記変位ベクトルの回転角に対応した余弦値と正弦値とによる投票値を個別に積算する候補座標点投票処理と、対象物体判定部が、余弦値と正弦値との積算値の自乗値を加算した数値が最大である候補座標点を、前記候補座標点のなかから検出して、検出された候補座標点を基準点の座標とし、当該座標点に対応する回転角を、前記登録画像に対する前記入力画像の回転角として検出する認識対象物体判定処理とをコンピュータに実行させるプログラムである。
上述した構成により、本発明の物体認識装置によれば、変位ベクトルの角度を用いて物体の姿勢を検出するため、法線ベクトルなどを用いる従来に比較して、照明などの変化に対して頑健な物体検出を行うことができる。
また、本発明の物体認識装置によれば、登録画像の変位ベクトルの角度からの回転させた角度における余弦値及び正弦値の各々の積算を行うため、この余弦値及び正弦値から回転角度を求めることができるため、登録画像に対する入力画像の姿勢変位の角度を、回転角度として容易に求めることができる。
The object recognition apparatus of the present invention stores feature point data including a plurality of first feature points extracted from a registered image and a displacement vector from the first feature point to a reference point of the registered image. A point data storage unit, a feature point extraction unit that extracts a second feature point from the input image, and for each of the second feature points, all the first feature points with the second feature point as a rotation center Each of the displacement vectors is sequentially rotated at a preset unit angle, and for each rotated angle, candidate coordinate points that are candidates for reference points are determined from the coordinates of the second feature point and the displacement vector. A candidate coordinate point calculation unit for calculating, a candidate coordinate point voting unit for individually integrating voting values based on a cosine value and a sine value corresponding to the rotation angle of the displacement vector for each candidate coordinate point, a cosine value and a sine The value obtained by adding the square value of the integrated value with the value is A candidate coordinate point that is large is detected from among the candidate coordinate points, and the detected candidate coordinate point is used as a reference point coordinate, and a rotation angle corresponding to the coordinate point is set as the rotation angle of the input image with respect to the registered image. And a recognition target object determination unit that detects the rotation angle.
In the object recognition method of the present invention, the registered image data generation unit includes a plurality of first feature points extracted from the registered image, and a displacement vector from the first feature point to a reference point of the registered image. A feature point data storing process in which point data is stored, a feature point extracting unit extracting a second feature point from the input image, and a candidate coordinate point calculating unit for each second feature point Further, with the second feature point as the rotation center, each of the displacement vectors of all the first feature points is sequentially rotated by a preset unit angle, and for each rotated rotation angle, the second feature point is A candidate coordinate point calculation process for calculating a candidate coordinate point that is a candidate for a reference point from the coordinates of a feature point and the displacement vector, and a candidate coordinate point voting unit corresponding to the rotation angle of the displacement vector for each candidate coordinate point Voting value based on cosine value and sine value Candidate coordinate point voting process for individual accumulation, and the target object determination unit detects the candidate coordinate point having the maximum numerical value obtained by adding the square value of the accumulated value of the cosine value and the sine value from the candidate coordinate points. And a recognition target object determining step of detecting the detected candidate coordinate point as a reference point coordinate and detecting a rotation angle corresponding to the coordinate point as a rotation angle of the input image with respect to the registered image. And
The program of the present invention is a feature point data comprising a plurality of first feature points extracted from a registered image by a registered image data generation unit and a displacement vector from the first feature point to a reference point of the registered image. For each of the second feature points, a feature point extraction process for extracting a second feature point from the input image, and a candidate coordinate point calculation unit for each of the second feature points. With the second feature point as the center of rotation, each of the displacement vectors of all the first feature points is sequentially rotated at a preset unit angle, and the second feature point at each rotated rotation angle. A candidate coordinate point calculation process for calculating a candidate coordinate point that is a candidate for a reference point from the coordinates and the displacement vector, and a candidate coordinate point voting unit corresponding to the rotation angle of the displacement vector for each candidate coordinate point Value and sine value The candidate coordinate point voting process to be separately accumulated, and the target object determination unit detects the candidate coordinate point having the maximum value obtained by adding the square value of the accumulated value of the cosine value and the sine value from the candidate coordinate points. A program for causing a computer to execute recognition target object determination processing in which a detected candidate coordinate point is used as a reference point coordinate and a rotation angle corresponding to the coordinate point is detected as a rotation angle of the input image with respect to the registered image. It is.
With the configuration described above, according to the object recognition device of the present invention, the posture of the object is detected using the angle of the displacement vector. Object detection can be performed.
Further, according to the object recognition apparatus of the present invention, since the cosine value and the sine value at each angle rotated from the angle of the displacement vector of the registered image are integrated, the rotation angle is obtained from the cosine value and the sine value. Therefore, the angle of the attitude displacement of the input image with respect to the registered image can be easily obtained as the rotation angle.

本発明の物体認識装置は、2次元座標系における前記変位ベクトルの単位ベクトルのx方向の成分と、y方向の成分とを、登録画像における前記変位ベクトルの余弦値、正弦値として用い、投票値として用いる前記変位ベクトルの回転角に対応した余弦値と正弦値とを算出することを特徴とする。
本発明の物体認識装置によれば、変位ベクトルの角度を用いて物体の姿勢を検出するための投票値を算出するため、法線ベクトルなどを用いる従来に比較して、照明などの変化に対して頑健な物体検出を行うことができる。
The object recognition apparatus of the present invention uses the x-direction component and the y-direction component of the unit vector of the displacement vector in the two-dimensional coordinate system as the cosine value and sine value of the displacement vector in the registered image, and the vote value And calculating a cosine value and a sine value corresponding to the rotation angle of the displacement vector.
According to the object recognition apparatus of the present invention, the voting value for detecting the posture of the object is calculated using the angle of the displacement vector. And robust object detection.

本発明の物体認識装置は、前記候補座標点投票部が、前記登録画像における前記変位ベクトルの角度を第1の角度とし、当該変位ベクトルを単位角度づつ回転させる回転角を第2の角度とした場合、第1の角度と単位角度毎に増加する第2の角度とから前記変位ベクトルの回転させた際の余弦値及び正弦値の値を予め計算して記憶していることを特徴とする。
この構成により、本発明の物体認識装置によれば、変位ベクトルの長さを半径とする円上の候補座標点に順次投票値を積算する構成であり、予め記憶されている変位ベクトルの角度と単位回転角度とに対応する余弦値及び正弦値を投票値とするため、候補座標点に対して積算する投票値を計算する時間を短縮し、処理を高速化することができる。
In the object recognition device of the present invention, the candidate coordinate point voting unit sets the angle of the displacement vector in the registered image as a first angle, and sets the rotation angle for rotating the displacement vector by a unit angle as a second angle. In this case, the cosine value and the sine value when the displacement vector is rotated are calculated and stored in advance from the first angle and the second angle that increases for each unit angle.
With this configuration, according to the object recognition device of the present invention, the vote value is sequentially integrated to the candidate coordinate points on the circle whose radius is the length of the displacement vector, and the displacement vector angle stored in advance is Since the cosine value and sine value corresponding to the unit rotation angle are used as voting values, it is possible to shorten the time for calculating the voting values to be integrated with respect to the candidate coordinate points, and to speed up the processing.

本発明の物体認識装置は、前記候補座標点算出部が、前記変位ベクトルの長さを予め設定された倍率範囲で伸縮及び伸張し、最長の長さ及び最短の長さの範囲における候補座標点を座標点範囲とし、当該座標点範囲における前記登録画像における変位ベクトルの長さに対応する座標点を当該座標点範囲を代表とする候補点座標とし、当該座標点範囲における候補点座標値に対する全ての投票値を積算することを特徴とする。
この構成により、本発明の物体認識装置によれば、登録画像に対して入力画像がスケーリングされている場合においても、予め設定された倍率範囲の伸縮及び伸張であれば、容易に頑健な物体検出を行うことができ、かつスケーリングに対応したメモリを用意する必要がないため、投票用のメモリを削減することができる。
In the object recognition apparatus of the present invention, the candidate coordinate point calculation unit expands and contracts the length of the displacement vector within a preset magnification range, and the candidate coordinate points in the range of the longest length and the shortest length. Is a coordinate point range, coordinate points corresponding to the length of the displacement vector in the registered image in the coordinate point range are candidate point coordinates represented by the coordinate point range, and all of the candidate point coordinate values in the coordinate point range The voting value of is integrated.
With this configuration, according to the object recognition device of the present invention, even when the input image is scaled with respect to the registered image, it is possible to easily and robustly detect an object as long as the magnification range is expanded and contracted in advance. Since it is not necessary to prepare a memory corresponding to scaling, the voting memory can be reduced.

本発明の物体認識装置は、候補座標点投票部が、
乱数を発生させ、余弦値と正弦値の各々の絶対値と前記乱数とを比較し、当該乱数の方が大きいとき投票値を0と定義し、当該乱数の方が小さいとき、余弦値が正の場合に当該余弦値に対応する投票値を1と定義し、正弦値が正の場合に当該正弦値に対応する投票値を1と定義し、余弦値が負の場合に当該余弦値に対応する投票値を−1と定義し、正弦値が負の場合に当該正弦値に対応する投票値を−1と定義することを特徴とする。
この構成により、本発明の物体認識装置によれば、複数のパーソナルコンピュータを用いて分散処理を行う場合、投票値の積算を行っている間の中間投票結果を保持するためのメモリ量を低減し、各パーソナルコンピュータ間において投票結果を集計する際の通信量を削減することができる。
In the object recognition device of the present invention, the candidate coordinate point voting unit
A random number is generated, the absolute value of each cosine value and sine value is compared with the random number, the voting value is defined as 0 when the random number is larger, and the cosine value is positive when the random number is smaller. In this case, the voting value corresponding to the cosine value is defined as 1, the voting value corresponding to the sine value is defined as 1 when the sine value is positive, and the cosine value corresponds to the case when the cosine value is negative. The voting value to be defined is defined as -1, and when the sine value is negative, the voting value corresponding to the sine value is defined as -1.
With this configuration, according to the object recognition device of the present invention, when distributed processing is performed using a plurality of personal computers, the amount of memory for holding intermediate vote results while the vote values are being accumulated is reduced. Therefore, it is possible to reduce the amount of communication when counting the voting results between the personal computers.

この発明の第1の実施形態による物体識別装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the object identification device by 1st Embodiment of this invention. 登録画像から抽出する第1の特徴点から基準点Rの相対的な位置を示す変位ベクトルを説明する図である。It is a figure explaining the displacement vector which shows the relative position of the reference point R from the 1st feature point extracted from a registration image. 、第1の特徴点の変位ベクトルの単位ベクトルにおけるx方向単位成分及びy方向単位成分と変位ベクトルとを示す、特徴点データ記憶部2に記憶される第1の特徴点テーブルの構造を示す図である。The figure which shows the structure of the 1st feature point table memorize | stored in the feature point data storage part 2 which shows the x direction unit component in the unit vector of the displacement vector of a 1st feature point, the y direction unit component, and a displacement vector. It is. 入力画像の第2の特徴点に第1の特徴点を重ねて、入力画像の基準点の候補である候補座標点を求め方を説明する図である。It is a figure explaining how to obtain the candidate coordinate point which is the candidate of the reference point of the input image by superimposing the first feature point on the second feature point of the input image. 第1の実施形態における認識対象物体の入力画像と登録画像との認識処理を動作例を説明するフローチャートである。It is a flowchart explaining the example of an operation | movement of the recognition process of the input image and registration image of the recognition target object in 1st Embodiment. 入力画像の第2の特徴点P1及びP2の各々の座標点に、登録画像の第1の特徴点を重ね、投票値を演算した結果を示す図である。It is a figure which shows the result of having calculated the vote value by superimposing the 1st feature point of a registration image on each coordinate point of 2nd feature point P1 and P2 of an input image. 入力画像の登録画像に対するスケーリングを考慮した物体認識を行う処理を説明する図である。It is a figure explaining the process which performs the object recognition in consideration of the scaling with respect to the registration image of an input image. 第2の実施形態における認識対象物体の入力画像と登録画像との認識処理を動作例を説明するフローチャートである。It is a flowchart explaining the example of an operation | movement of the recognition process of the input image and registration image of the recognition target object in 2nd Embodiment. 第3の実施形態における認識対象物体の入力画像と登録画像との認識処理を動作例を説明するフローチャートである。It is a flowchart explaining the example of an operation | movement of the recognition process of the input image and registration image of a recognition target object in 3rd Embodiment. 登録画像の第1の特徴点の抽出と、この第1の特徴点における特徴点データの抽出の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of extraction of the 1st feature point of a registration image, and extraction of the feature point data in this 1st feature point. 特徴点データの抽出を説明する概念図である。It is a conceptual diagram explaining extraction of feature point data. 特徴点データが記憶されるテーブル構成を示す概念図である。It is a conceptual diagram which shows the table structure in which feature point data are memorize | stored. 非特許文献1の一般化ハフ変換を用いた画像認識処理の動作を示すフローチャートである。10 is a flowchart showing an operation of image recognition processing using generalized Hough transform of Non-Patent Document 1. 図13における基準点の投票処理を説明する概念図である。It is a conceptual diagram explaining the voting process of the reference point in FIG. 非特許文献1の一般化ハフ変換における画像認識の際に必要となるメモリー容量を説明する概念図である。It is a conceptual diagram explaining the memory capacity required in the case of the image recognition in the generalized Hough conversion of a nonpatent literature 1. 特許文献1における画像認識処理の動作を説明するフローチャートである。10 is a flowchart for explaining the operation of image recognition processing in Patent Document 1. 特許文献1におけるCOS値及びSIN値の積算処理を説明する概念図である。It is a conceptual diagram explaining the integration | accumulation process of the COS value and SIN value in patent document 1. FIG. 入力画像の大きさが異なった場合において、入力画像を撮像する画素の分解能が等しいために誤差が発生することを示す図である。It is a figure which shows that an error generate | occur | produces when the magnitude | size of an input image differs because the resolution of the pixel which images an input image is equal. 認識対象物体の構成及び配置について説明する概念図である。It is a conceptual diagram explaining the structure and arrangement | positioning of a recognition target object.

以下、図面を参照して、本発明の実施の形態について説明する。図1は、この発明の一実施形態による物体認識装置の構成例を示す概略ブロック図である。
この図において、本実施形態による物体認識装置は、登録画像データ生成部1、特徴点データ記憶部2及び物体認識部3とを有している。
登録画像データ生成部1は、登録画像より抽出した特徴点を第1の特徴点の配列として抽出し、登録画像の基準点(例えば、登録画像の重心)Oを設定し、第1特徴点から基準点への変位ベクトルを求め、変位ベクトルの大きさを求める。
図2は、本実施形態における登録画像から抽出する第1の特徴点から基準点Oの相対的な位置を示す変位ベクトルを説明する図である。上記基準点は、登録画像の2次元座標への配置位置を示す配置基準点である。また、基準点Oは、変換画像が配置された2次元座標上の任意の点で良く、例えば、変換画像の重心を基準点としても良い。
この図2には、例えば、特徴点P1から基準点Oへの変位ベクトルR1、特徴点P2から基準点Oへの変位ベクトルR2が示されている。変位ベクトルの角度θは、図2の変位ベクトルR1及びR2を例とするように、軸の正の向きから時計の針の回る方向と逆方向に形成される角度として設定される。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic block diagram showing a configuration example of an object recognition apparatus according to an embodiment of the present invention.
In this figure, the object recognition apparatus according to the present embodiment has a registered image data generation unit 1, a feature point data storage unit 2, and an object recognition unit 3.
The registered image data generation unit 1 extracts feature points extracted from the registered image as an array of first feature points, sets a reference point (for example, the center of gravity of the registered image) O of the registered image, and starts from the first feature points. The displacement vector to the reference point is obtained, and the magnitude of the displacement vector is obtained.
FIG. 2 is a diagram for explaining a displacement vector indicating a relative position of the reference point O from the first feature point extracted from the registered image in the present embodiment. The reference point is an arrangement reference point indicating the arrangement position of the registered image on the two-dimensional coordinates. The reference point O may be an arbitrary point on the two-dimensional coordinate where the converted image is arranged. For example, the center of gravity of the converted image may be used as the reference point.
In FIG. 2, for example, a displacement vector R1 from the feature point P1 to the reference point O and a displacement vector R2 from the feature point P2 to the reference point O are shown. The angle θ of the displacement vector is set as an angle formed from the positive direction of the shaft in the direction opposite to the direction in which the timepiece of the watch rotates, taking the displacement vectors R1 and R2 of FIG. 2 as an example.

また、図1に戻り、登録画像データ生成部1は、変位ベクトルの単位ベクトルを求め、この単位ベクトルのx方向単位成分(2次元座標系において変位ベクトルのx軸に平行な方向の成分)及びy方向単位成分(2次元座標系において変位ベクトルのy軸に平行な方向の成分)を求める。
登録画像データ生成部1は、求めた変位ベクトル及び変位ベクトルの単位ベクトルにおけるx方向単位成分及びy方向単位成分を、第1の特徴点の識別情報である特徴点番号に対応させて、第1の特徴点毎に特徴点データ記憶部2に記憶させる。
図3は、第1の特徴点毎に、第1の特徴点の変位ベクトルの単位ベクトルにおけるx方向単位成分及びy方向単位成分と変位ベクトルとを示す、特徴点データ記憶部2に記憶される第1の特徴点テーブルの構造を示す図である。図3に示すように、特徴点毎に変位ベクトルの単位ベクトルにおけるx方向単位成分及びy方向単位成分と、変位ベクトルとが、特徴点番号に対応して、第1の特徴点テーブルとして記憶されている。
Returning to FIG. 1, the registered image data generation unit 1 obtains a unit vector of the displacement vector, and obtains an x-direction unit component of this unit vector (a component in the direction parallel to the x-axis of the displacement vector in the two-dimensional coordinate system) and A y-direction unit component (a component in a direction parallel to the y-axis of the displacement vector in the two-dimensional coordinate system) is obtained.
The registered image data generation unit 1 associates the obtained displacement vector and the x-direction unit component and the y-direction unit component in the unit vector of the displacement vector with the feature point number that is identification information of the first feature point, Each feature point is stored in the feature point data storage unit 2.
FIG. 3 shows, for each first feature point, the feature point data storage unit 2 that shows the x-direction unit component, the y-direction unit component, and the displacement vector in the unit vector of the displacement vector of the first feature point. It is a figure which shows the structure of a 1st feature point table. As shown in FIG. 3, the x-direction unit component and the y-direction unit component in the unit vector of the displacement vector and the displacement vector for each feature point are stored as a first feature point table corresponding to the feature point number. ing.

物体認識部3は、入力画像における認識対象物体より抽出した第2の特徴点を配列として求める。
また、物体認識部3は、第2の特徴点に変換画像の第1の特徴点を重ね合わせ、第1の特徴点からの変位ベクトルにより認識対象物体の基準点の候補座標点を求め、この候補座標点に対する投票結果により、認識対象物体と登録画像との相関を判定していく。
以下、上述した登録画像データ生成部1及び物体認識部3の構成を詳細に説明する。
The object recognition unit 3 obtains the second feature points extracted from the recognition target objects in the input image as an array.
Further, the object recognition unit 3 superimposes the first feature point of the converted image on the second feature point, obtains a candidate coordinate point of the reference point of the recognition target object from the displacement vector from the first feature point, The correlation between the recognition target object and the registered image is determined based on the voting result for the candidate coordinate points.
Hereinafter, the configuration of the registered image data generation unit 1 and the object recognition unit 3 described above will be described in detail.

登録画像データ生成部1は、登録画像取得部11、特徴点抽出部12、特徴点2値化部13及び変位ベクトル抽出部14を有している。この登録画像データ生成部1における登録画像取得部11、特徴点抽出部12、特徴点2値化部13の動作は、特許文献1にて説明した図10のフローチャートの動作と同様である。
登録画像取得部11は、撮像装置あるいはCADシステムから、後に認識対象物体を認識するために用いる登録画像の画像データを入力する。
特徴点抽出部12は、上記登録画像の第1の特徴点(ピクセル単位)を、非特許文献1における特徴抽出にて説明した2次微分(ラプラシアン)法あるいはモラベックの方法などを用いて抽出する。
The registered image data generation unit 1 includes a registered image acquisition unit 11, a feature point extraction unit 12, a feature point binarization unit 13, and a displacement vector extraction unit 14. The operations of the registered image acquisition unit 11, the feature point extraction unit 12, and the feature point binarization unit 13 in the registered image data generation unit 1 are the same as the operations in the flowchart of FIG.
The registered image acquisition unit 11 inputs image data of a registered image to be used later for recognizing the recognition target object from the imaging device or the CAD system.
The feature point extraction unit 12 extracts the first feature point (pixel unit) of the registered image using the second-order differential (Laplacian) method or the Morabek method described in the feature extraction in Non-Patent Document 1. .

特徴点2値化部13は、登録画像の第1の特徴点のピクセルと、第1の特徴点以外のピクセルとの階調度による2値化を行う。例えば、特徴点2値化部13は、予め設定した階調度の閾値により、第1の特徴点のピクセルの階調度を「1」、第1の特徴点以外のピクセルの階調度を「0」とする。ここで、予め設定した閾値は、一般化ハフ変換法にて説明した2値化処理を行う閾値を用いる。
変位ベクトル抽出部14は、第1の特徴点毎に、第1の特徴点から基準点への変位ベクトルを求める。また、変位ベクトル抽出部14は、得られた変位ベクトルと、変位ベクトルの単位ベクトルにおけるx方向単位成分とy方向単位成分を第1の特徴点データとして、特徴点番号に対応した第1の特徴点テーブルとして特徴点データ記憶部2へ書き込んで記憶させる。
The feature point binarization unit 13 performs binarization based on the gradation between the pixel of the first feature point of the registered image and the pixels other than the first feature point. For example, the feature point binarization unit 13 sets the gradation level of the pixel of the first feature point to “1” and the gradation level of the pixels other than the first feature point to “0” based on a threshold value of the gradation level set in advance. And Here, as the preset threshold value, a threshold value for performing the binarization processing described in the generalized Hough transform method is used.
The displacement vector extraction unit 14 obtains a displacement vector from the first feature point to the reference point for each first feature point. Further, the displacement vector extraction unit 14 uses the obtained displacement vector and the x-direction unit component and the y-direction unit component in the unit vector of the displacement vector as first feature point data, and the first feature corresponding to the feature point number. It is written and stored in the feature point data storage unit 2 as a point table.

次に、物体認識部3は、入力画像取得部31、特徴点抽出部32、特徴点2値化部33、候補座標点演算部34、候補座標点投票部35、認識対象物体判定部36を有している。 入力画像取得部31は、カメラなどの撮像装置から、認識対象物体を含んだ入力画像の画像データを入力する。
特徴点抽出部32は、上記入力画像における認識対象物体の第2の特徴点(ピクセル単位)の座標値を、上記特徴点抽出部12と同様の手法を用いて抽出する。
Next, the object recognition unit 3 includes an input image acquisition unit 31, a feature point extraction unit 32, a feature point binarization unit 33, a candidate coordinate point calculation unit 34, a candidate coordinate point voting unit 35, and a recognition target object determination unit 36. Have. The input image acquisition unit 31 inputs image data of an input image including a recognition target object from an imaging device such as a camera.
The feature point extraction unit 32 extracts the coordinate value of the second feature point (pixel unit) of the recognition target object in the input image using the same method as the feature point extraction unit 12.

特徴点2値化部33は、認識対象物体の第2の特徴点のピクセルと、第2の特徴点以外のピクセルとの階調度による2値化を行う。例えば、特徴点2値化部33は、予め設定した階調度の閾値により、第2の特徴点のピクセルの階調度を「1」、第2の特徴点以外のピクセルの階調度を「0」とする。ここで、予め設定した閾値は、特徴点2値化部13と同様の数値を用いる。   The feature point binarization unit 33 performs binarization based on the gradation of pixels of the second feature point of the recognition target object and pixels other than the second feature point. For example, the feature point binarization unit 33 sets the gradation levels of the pixels of the second feature point to “1” and the gradation levels of the pixels other than the second feature point to “0” based on a threshold value of the gradation level set in advance. And Here, a numerical value similar to that of the feature point binarization unit 13 is used as the preset threshold value.

候補座標点演算部34は、第2の特徴点の座標値と、第1の特徴点の座標値とを重ならせ、第2の特徴点を中心として、登録画像の変位ベクトルを角度θから回転角φ分回転させた際の、変位ベクトルRが示す基準点の候補座標である候補座標点のx座標値Xposを、以下の(7)式により求める。
pos=Rcos(φ)+X …(7)
この(7)式で、Rは変位ベクトルの長さであり、角度φは回転中心を第2の特徴点として、登録画像の変位ベクトルを角度θから回転させる回転角の角度であり、Xは第2の特徴点のx座標値である。
また、候補座標点演算部34は、、第2の特徴点の座標値と、第1の特徴点の座標値とを重ならせ、第2の特徴点を中心として、登録画像の変位ベクトルを角度θから回転角φ分回転させた際の、変位ベクトルRが示す基準点の候補座標である候補座標点のy座標値Yposを、以下の(8)式により求める。
pos=Rsin(φ)+Y …(8)
この(8)式で、Rは変位ベクトルの長さであり、角度φは回転中心を第2の特徴点として登録画像の変位ベクトルの角度θの位置から回転させる回転角の角度であり、Yは第2の特徴点のy座標値である。
The candidate coordinate point calculation unit 34 superimposes the coordinate value of the second feature point and the coordinate value of the first feature point, and calculates the displacement vector of the registered image from the angle θ around the second feature point. The x coordinate value X pos of the candidate coordinate point, which is the candidate coordinate of the reference point indicated by the displacement vector R when rotated by the rotation angle φ, is obtained by the following equation (7).
X pos = R cos (φ) + X (7)
In this equation (7), R is the length of the displacement vector, the angle φ is the angle of the rotation angle that rotates the displacement vector of the registered image from the angle θ with the rotation center as the second feature point, and X is This is the x coordinate value of the second feature point.
Further, the candidate coordinate point calculation unit 34 superimposes the coordinate value of the second feature point and the coordinate value of the first feature point, and calculates the displacement vector of the registered image with the second feature point as the center. The y-coordinate value Y pos of the candidate coordinate point, which is the candidate coordinate of the reference point indicated by the displacement vector R when rotated by the rotation angle φ from the angle θ, is obtained by the following equation (8).
Y pos = Rsin (φ) + Y (8)
In this equation (8), R is the length of the displacement vector, the angle φ is the angle of the rotation angle that is rotated from the position of the displacement vector angle θ of the registered image with the rotation center as the second feature point, and Y Is the y coordinate value of the second feature point.

図4は、入力画像の第2の特徴点に第1の特徴点を重ねて、上述した(7)式及び(8)式から候補座標点を求めることを示す図である。この図において、
第2の特徴点がP1が第1の特徴点P1である場合、候補座標点演算部34は、半径R(変位ベクトルR)の円C上に配列される候補座標点を、単位角度ずつ回転させた際の回転角φ毎に、(7)式及び(8)式により計算する。
例えば、第2の特徴点P1が第1の特徴点1である場合、円C11上に配列される候補演算点が求められる。一方、第2の特徴点P1が第1の特徴点2である場合、円C12上に配列される候補演算点が求められる。入力画像の第2の特徴点P1が登録画像の第1の特徴点1であるとき、変位ベクトルの角度θはθ1であり、入力画像の第2の特徴点P1が登録画像の第1の特徴点2であるとき、変位ベクトルの角度θはθである。
同様に、第2の特徴点P2が第1の特徴点1である場合、円C21上に配列される候補演算点が求められる。一方、第2の特徴点P2が第1の特徴点2である場合、円C22上に配列される候補演算点が求められる。
例えば、回転角φを変化させる単位角度を1度とした場合、0度から359度までの角度φによる候補座標点が上述した円上に計算される。
FIG. 4 is a diagram illustrating obtaining candidate coordinate points from the above-described equations (7) and (8) by superimposing the first feature points on the second feature points of the input image. In this figure,
When the second feature point P1 is the first feature point P1, the candidate coordinate point calculation unit 34 rotates the candidate coordinate points arranged on the circle C having the radius R (displacement vector R) by unit angle. For each rotation angle φ at the time of calculation, the calculation is performed using the equations (7) and (8).
For example, when the second feature point P1 is the first feature point 1, candidate calculation points arranged on the circle C11 are obtained. On the other hand, when the second feature point P1 is the first feature point 2, candidate calculation points arranged on the circle C12 are obtained. When the second feature point P1 of the input image is the first feature point 1 of the registered image, the angle θ of the displacement vector is θ1, and the second feature point P1 of the input image is the first feature point of the registered image. When it is point 2, the angle θ of the displacement vector is θ.
Similarly, when the second feature point P2 is the first feature point 1, candidate calculation points arranged on the circle C21 are obtained. On the other hand, when the second feature point P2 is the first feature point 2, candidate calculation points arranged on the circle C22 are obtained.
For example, when the unit angle for changing the rotation angle φ is 1 degree, candidate coordinate points with an angle φ from 0 degree to 359 degrees are calculated on the above-described circle.

また、変位ベクトルの角度θを求め、この角度θを基準値として変換画像の回転角φを単位角度毎に回転させた場合、例えば単位角度を1度とした場合φが0から359までのcos値を、予め候補座標点演算部34内部の記憶部に設定しておくことより、候補座標点演算部34は、各角度φにおけるX座標値Xposを(7)式から容易に算出できることになる。同様に、単位角度を1度とした場合φが0から359までのsin値を、予め候補座標点演算部34内部の記憶部に設定しておくことにり、各角度φにおけるY座標値Yposを(8)式により容易に算出できることになる。 Further, when the angle θ of the displacement vector is obtained and the rotation angle φ of the converted image is rotated for each unit angle using the angle θ as a reference value, for example, when the unit angle is 1 degree, cos from 0 to 359 is obtained. By setting the value in the storage unit inside the candidate coordinate point calculation unit 34 in advance, the candidate coordinate point calculation unit 34 can easily calculate the X coordinate value X pos at each angle φ from the equation (7). Become. Similarly, when the unit angle is set to 1 degree, a sine value with φ ranging from 0 to 359 is set in advance in the storage unit inside the candidate coordinate point calculation unit 34, so that the Y coordinate value Y at each angle φ is set. pos can be easily calculated by the equation (8).

図1に戻り、候補座標点投票部35は、図17のcos面及びsin面における候補座標点の座標位置に投票する投票値の計算を以下の(9)式及び(10)式により行う。
Cos=cos(θ−φ)=Ux・cos(φ)+Uy・sin(φ) …(9)
Sin=sin(θ−φ)=Uy・cos(φ)−Ux・sin(φ) …(10)
ここで、図3の第1の特徴点テーブルに記載されているように、各第1の特徴点の変位ベクトルの単位ベクトルにおけるx方向単位成分とy方向単位成分とにより、Ux=sin(θ)とされ、Uy=cos(θ)とされる。また、投票値は浮動小数点あるいは固定小数点の形式の数値データとして求められる。
本実施形態においては、候補座標点投票部35は、(9)式により計算した投票値である余弦値Cosと、(10)式により計算した投票値である正弦値Sinとの各々を、各々Cos面及びSin面それぞれにおける候補座標点演算部34が計算した候補座標点に積算する。すなわち、候補座標点投票部35は、Cos面及びSin面における各々の座標点に対応した記憶テーブルにおいて、候補座標点と同様の座標値を有する座標点に対応する部分に投票値を積算する。
Returning to FIG. 1, the candidate coordinate point voting unit 35 calculates the voting value to vote for the coordinate position of the candidate coordinate point on the cos plane and the sin plane of FIG. 17 by the following formulas (9) and (10).
Cos = cos (θ−φ) = Ux · cos (φ) + Uy · sin (φ) (9)
Sin = sin (θ−φ) = Uy · cos (φ) −Ux · sin (φ) (10)
Here, as described in the first feature point table in FIG. 3, Ux = sin (θ) by the x-direction unit component and the y-direction unit component in the unit vector of the displacement vector of each first feature point. ) And Uy = cos (θ). The vote value is obtained as numerical data in a floating-point or fixed-point format.
In the present embodiment, the candidate coordinate point voting unit 35 obtains each of the cosine value Cos that is the voting value calculated by the equation (9) and the sine value Sin that is the voting value calculated by the equation (10). The candidate coordinate points on the Cos plane and Sin plane are added to the candidate coordinate points calculated by the calculation unit 34. That is, the candidate coordinate point voting unit 35 accumulates voting values in a portion corresponding to a coordinate point having the same coordinate value as that of the candidate coordinate point in the storage table corresponding to each coordinate point on the Cos plane and the Sin plane.

認識対象物体判定部36は、上述したCos面及びSin面における同一の座標値の候補座標点となっている座標点を順次選択し、Cos面の候補座標点において積算された投票値の自乗値と、Sin面の候補座標点において積算された投票値の自乗値とを求め、それぞれの自乗値を加算する。
また、認識対象物体判定部36は、予め設定したピーク値を超える候補座標点を、入力画像の基準点として検出する。
また、認識対象物体判定部36は、ピーク位置の積算された余弦値Cosと正弦値Sinとを用いて、入力画像の登録画像に対する回転角φを、以下の(11)式により求める。
φ=tan−1(Sin/Cos) …(11)
上述した処理により、入力画像の基準点の座標と、入力画像の登録画像に対する回転角を求めることができる。
The recognition target object determination unit 36 sequentially selects coordinate points that are candidate coordinate points of the same coordinate value on the Cos plane and the Sin plane described above, and the square value of the vote value accumulated at the candidate coordinate points of the Cos plane. And the square value of the voting value accumulated at the candidate coordinate points on the Sin plane, and the respective square values are added.
Further, the recognition target object determination unit 36 detects candidate coordinate points exceeding a preset peak value as reference points of the input image.
In addition, the recognition target object determination unit 36 uses the cosine value Cos and the sine value Sin obtained by integrating the peak positions to obtain the rotation angle φ of the input image with respect to the registered image according to the following expression (11).
φ = tan −1 (Sin / Cos) (11)
Through the processing described above, the coordinates of the reference point of the input image and the rotation angle of the input image with respect to the registered image can be obtained.

また、物体認識部3に接続されている詳細検出部37は、認識対象物体の位置を詳細に知る必要がある場合、上記認識対象物体判定部36が抽出した基準点及び回転角θを、より認識対象物体の配置された位置を詳細に抽出する処理を行う。
そのため、詳細な認識対象物体の配置位置の抽出の必要がなければ、詳細検出部37を設ける必要はない。
Further, when it is necessary for the detail detection unit 37 connected to the object recognition unit 3 to know the position of the recognition target object in detail, the reference point and the rotation angle θ extracted by the recognition target object determination unit 36 are A process for extracting in detail the position where the recognition target object is arranged is performed.
Therefore, if there is no need to extract the detailed arrangement position of the recognition target object, it is not necessary to provide the detail detection unit 37.

次に、本実施形態における認識対象物体の入力画像と登録画像との認識処理を図5を用いて説明する。この図5は、上記認識処理の動作例を説明するフローチャートである。
入力画像取得部31は、図示しない撮像装置から入力画像を入力し、例えばピクセルで表現された画像データとして特徴点抽出部32及び候補座標点演算部34へ出力する(ステップS51)。
入力画像が入力されると、特徴点抽出部32は、入力画像における認識対象物体の第2の特徴点を抽出し、抽出した入力画像を特徴点2値化部33へ出力する(ステップS52)。
次に、特徴点2値化部33は、入力される入力画像の各ピクセルに対し、第2の特徴点のピクセルと、それ以外のピクセルとの階調度の2値化を行い、内部の記憶部に記憶する(ステップS53)。ここで行う2値化については従来例の図13のフローチャートにて説明した処理と同様である。
Next, the recognition process between the input image of the recognition target object and the registered image in the present embodiment will be described with reference to FIG. FIG. 5 is a flowchart for explaining an operation example of the recognition process.
The input image acquisition unit 31 inputs an input image from an imaging device (not shown), and outputs it to the feature point extraction unit 32 and the candidate coordinate point calculation unit 34 as image data expressed by pixels, for example (step S51).
When the input image is input, the feature point extraction unit 32 extracts the second feature point of the recognition target object in the input image and outputs the extracted input image to the feature point binarization unit 33 (step S52). .
Next, the feature point binarization unit 33 binarizes the gradation of the pixel of the second feature point and the other pixels for each pixel of the input image to be input, and stores it internally. (Step S53). The binarization performed here is the same as the processing described in the flowchart of FIG. 13 of the conventional example.

そして、候補座標点投票部35は、Cos平面及びSin平面の各々における各座標点に対応する記憶テーブルを初期化、すなわち各座標点の座標値における積算値を「0」とする(ステップS54)。
次に、候補座標点演算部34は、入力画像の全てのピクセルの2値化データに対して、第2の特徴点における評価値としての投票処理を行ったか否かの判定を行い(ステップS55)、入力画像の全てのピクセルの2値化データに対し、第2の特徴点における投票を行った場合に認識処理を終了し、一方、特徴点における投票を行なっていないピクセルが存在する場合、処理をステップS56へ進める。
ここで、特徴点における評価値の算出を行っていないピクセルの検出は、たとえば、y軸の軸座標を固定してx軸の軸座標に対応したピクセルを順番に処理し、固定したy軸の軸座標に対応するx軸の軸座標における処理が終了すると、y軸の軸座標を一つ変化させて、x軸の軸座標に対応したピクセルを順番に処理するようにする。これにより、x軸及びy軸におけるピクセルの数により、上述したx軸の軸座標とy軸の軸座標との組合せのループを組むことにより、終了時点を検出することができる。
Then, the candidate coordinate point voting unit 35 initializes a storage table corresponding to each coordinate point in each of the Cos plane and the Sin plane, that is, sets the integrated value in the coordinate value of each coordinate point to “0” (step S54). .
Next, the candidate coordinate point calculation unit 34 determines whether or not the voting process as the evaluation value at the second feature point has been performed on the binarized data of all the pixels of the input image (step S55). ), When the voting at the second feature point is performed on the binarized data of all the pixels of the input image, while the recognition process is finished, on the other hand, when there is a pixel that has not been voted at the feature point, The process proceeds to step S56.
Here, the detection of the pixel for which the evaluation value is not calculated at the feature point is performed by, for example, fixing the y-axis axis coordinates and sequentially processing the pixels corresponding to the x-axis axis coordinates. When the processing on the x-axis axis coordinates corresponding to the axis coordinates is completed, the y-axis axis coordinates are changed by one, and the pixels corresponding to the x-axis axis coordinates are sequentially processed. Thus, the end point can be detected by forming a loop of the combination of the x-axis coordinate and the y-axis coordinate according to the number of pixels on the x-axis and the y-axis.

次に、候補座標点演算部34は、特徴点2値化部33から未処理のピクセルの2値化データを読みだし(ステップS56)、読みだした2値化データが予め設定した閾値を超え、このピクセルが第2の特徴点であるか否かの判定を行う(ステップS57)。
このとき、候補座標点演算部34は、読みだしたピクセルが第2の特徴点である場合、処理をステップS58へ進め、このピクセルが第2の特徴点でない場合、処理をステップS55へ進める。
ピクセルが第2の特徴点である場合、候補座標点演算部34は、入力画像の第2の特徴点の座標おいて、登録画像の全ての第1の特徴点の候補座標点の算出及びこの算出した候補座標点での投票値の積算の処理を行ったか否かの判定を行い(ステップS58)、処理が行われていない第1の特徴点が残っていない場合、処理をステップS55へ進め、処理が行われていない第1の特徴点が残っている場合、残っている座標点に対応した変位ベクトルを特徴点データ記憶部2から読み出し、回転角φを「0」に初期化して処理をステップS59へ進める。
Next, the candidate coordinate point calculation unit 34 reads the unprocessed pixel binarization data from the feature point binarization unit 33 (step S56), and the read binarization data exceeds a preset threshold value. Then, it is determined whether or not this pixel is the second feature point (step S57).
At this time, if the read pixel is the second feature point, the candidate coordinate point calculation unit 34 advances the process to step S58, and if the pixel is not the second feature point, advances the process to step S55.
When the pixel is the second feature point, the candidate coordinate point calculation unit 34 calculates the candidate coordinate points of all the first feature points of the registered image in the coordinates of the second feature points of the input image, and this It is determined whether or not the voting value accumulation process at the calculated candidate coordinate points has been performed (step S58). If there is no first feature point that has not been processed, the process proceeds to step S55. If the first feature point that has not been processed remains, the displacement vector corresponding to the remaining coordinate point is read from the feature point data storage unit 2 and the rotation angle φ is initialized to “0”. Advances to step S59.

次に、候補座標点演算部34は、上記変位ベクトルを単位角度(例えば、1度)ずつ回転させ、0から360度(処理としては、単位角度が1度の場合、0度から359度までの1度刻みの回転角φ)まで回転角φが変化したことにより、変位ベクトルの長さを半径とする円上における候補座標点の全てを生成したか否かの判定を行い(ステップS59)、単位角度毎に0から360度までの全ての回転角φに対し、その第1の特徴点における変位ベクトルを回転させた場合、処理をステップS58へ進め、一方、回転角φが0から360まで変化しておらず完全に変位ベクトルが回転していない場合、変位ベクトルの回転角を単位角度分だけ回転させ、処理をステップS60へ進める。   Next, the candidate coordinate point calculation unit 34 rotates the displacement vector by a unit angle (for example, 1 degree) by 0 to 360 degrees (for processing, when the unit angle is 1 degree, from 0 degree to 359 degrees) It is determined whether all the candidate coordinate points on the circle whose radius is the length of the displacement vector have been generated due to the change in the rotation angle φ to the rotation angle φ in increments of 1 degree (step S59). When the displacement vector at the first feature point is rotated for all rotation angles φ from 0 to 360 degrees per unit angle, the process proceeds to step S58, while the rotation angle φ is 0 to 360. If the displacement vector is not completely rotated, the rotation angle of the displacement vector is rotated by the unit angle, and the process proceeds to step S60.

候補座標点投票部35は、モデルデータである登録画像の第1の特徴点における変位ベクトルの単位ベクトルと、回転角度φとから、投票値である余弦値Cosと正弦値Sinとを、(9)式及び(10)式の各々から算出する(ステップS60)。
図6は、入力画像の第2の特徴点P1及びP2の各々の座標点に、登録画像の第1の特徴点を重ね、投票値を演算した結果を示す図である。図6(a)がcos面に対する投票値である余弦値Cosの計算結果を示し、図6(b)がSin面に対する投票値である正弦値Sinの計算結果を示している。
例えば、図6(a)のCos面の候補座標点に対する投票処理において、候補座標点投票部35は、第2の特徴点P1が第1の特徴点1である場合、点A方向に変位ベクトルの単位ベクトルが向いているため、点Aにおいてφが0度であるため変位ベクトルの単位ベクトルにおけるx方向単位成分Uxもcos(φ)も「1」であり、(9)式から投票値を「1」として算出する。一方、候補座標点投票部35は、点Bにおいてφが90度の場合、変位ベクトルの単位ベクトルにおけるy方向単位成分Uyが0であり、sin(φ)が1であるため、投票値として「0」を算出。
The candidate coordinate point voting unit 35 calculates a cosine value Cos and a sine value Sin, which are voting values, from the unit vector of the displacement vector at the first feature point of the registered image, which is model data, and the rotation angle φ. ) And (10) are calculated (step S60).
FIG. 6 is a diagram illustrating a result of calculating the vote value by superimposing the first feature point of the registered image on the coordinate points of the second feature points P1 and P2 of the input image. FIG. 6A shows the calculation result of the cosine value Cos that is the vote value for the cos plane, and FIG. 6B shows the calculation result of the sine value Sin that is the vote value for the Sin plane.
For example, in the voting process for the candidate coordinate points on the Cos plane in FIG. 6A, the candidate coordinate point voting unit 35 determines that the displacement vector in the direction of the point A when the second feature point P1 is the first feature point 1. Since the unit vector of is oriented so that φ is 0 degree at the point A, both the x-direction unit component Ux and cos (φ) in the unit vector of the displacement vector are “1”. Calculated as “1”. On the other hand, when φ is 90 degrees at the point B, the candidate coordinate point voting unit 35 has the y-direction unit component Uy in the unit vector of the displacement vector as 0 and sin (φ) as 1. Calculate “0”.

また、例えば、図6(a)のCos面における候補座標点に対する投票処理において、候補座標点投票部35は、第2の特徴点P1が第1の特徴点2である場合、点A’方向に変位ベクトルの単位ベクトルが向いているため、点A’においてφが0度であるため単位ベクトルにおけるx方向単位成分Uxもcos(φ)も「1」であり、投票値を「1」として算出する。一方、候補座標点投票部35は、点B’においてφが90度の場合、単位ベクトルにおけるy方向単位成分Uyが0であり、sin(φ)が1であるため、投票値として「0」を算出する。
図6(b)のSin面における候補座標点に対する投票処理の場合も、上述した図6(a)のcos面における候補座標点に対する投票処理と同様に、候補座標点投票部35は、(10)式のから投票値を算出する
Further, for example, in the voting process for the candidate coordinate point on the Cos plane in FIG. 6A, the candidate coordinate point voting unit 35 determines the direction of the point A ′ when the second feature point P1 is the first feature point 2. Since the unit vector of the displacement vector is oriented at the point A ′, φ is 0 degree at the point A ′, and therefore the x-direction unit component Ux and cos (φ) in the unit vector are “1”, and the vote value is “1”. calculate. On the other hand, when φ is 90 degrees at the point B ′, the candidate coordinate point voting unit 35 has “0” as the voting value because the y-direction unit component Uy in the unit vector is 0 and sin (φ) is 1. Is calculated.
In the case of the voting process for the candidate coordinate points on the Sin plane in FIG. 6B, the candidate coordinate point voting unit 35 (10) is similar to the voting process for the candidate coordinate points on the cos plane in FIG. ) Calculate the vote value from the formula

次に、候補座標点演算部34は、モデルデータである登録画像の第1の特徴点における変位ベクトルと、回転角度φとから、候補座標点演算部34が求めた余弦値Cosと正弦値Sinとを投票するCos面及びSin面における候補座標点の座標値を、(7)式及び(8)式の各々から算出する(ステップS60)。
例えば、候補座標点演算部34は、入力画像の第2の特徴点P1が特徴点1である場合、第1の特徴点1における変位ベクトルR1と、回転角φとにより、(7)式及び(8)式により、Cos面及びSin面の各々における候補座標点として、回転角φが0度の場合に、変位ベクトルの角度(θ1−0=θ)として点Aの座標点を候補座標点として求め、回転角φが90度の場合に、変位ベクトルの角度(θ1−90)として点Bの座標点を候補座標点として求める。
また、候補座標点演算部34は、入力画像の第2の特徴点P1が特徴点2である場合、第1の特徴点2における変位ベクトルR2と、回転角φとにより、(7)式及び(8)式により、Cos面及びSin面の各々における候補座標点として、回転角φが0度の場合に、変位ベクトルの角度(θ2−0=θ)として点A’の座標点を候補座標点として求め、回転角φが90度の場合に、変位ベクトルの角度(θ2−90)として点B’の座標点を候補座標点として求める。
Next, the candidate coordinate point calculation unit 34 calculates the cosine value Cos and the sine value Sin obtained by the candidate coordinate point calculation unit 34 from the displacement vector at the first feature point of the registered image, which is model data, and the rotation angle φ. The coordinate values of the candidate coordinate points on the Cos surface and the Sin surface for voting are calculated from each of the equations (7) and (8) (step S60).
For example, when the second feature point P1 of the input image is the feature point 1, the candidate coordinate point calculation unit 34 uses the displacement vector R1 at the first feature point 1 and the rotation angle φ to As a candidate coordinate point in each of the Cos plane and the Sin plane, when the rotation angle φ is 0 degree, the coordinate point of the point A is set as the displacement vector angle (θ1-0 = θ) as a candidate coordinate point When the rotation angle φ is 90 degrees, the coordinate point of point B is obtained as a candidate coordinate point as the angle (θ1-90) of the displacement vector.
Further, when the second feature point P1 of the input image is the feature point 2, the candidate coordinate point calculation unit 34 uses the displacement vector R2 at the first feature point 2 and the rotation angle φ to As a candidate coordinate point on each of the Cos plane and the Sin plane, when the rotation angle φ is 0 degree, the coordinate point of the point A ′ is set as the candidate coordinate point (θ2−0 = θ) as a candidate coordinate point. When the rotation angle φ is 90 degrees, the coordinate point of the point B ′ is obtained as a candidate coordinate point as the angle (θ2-90) of the displacement vector.

例えば、候補座標点演算部34は、入力画像の第2の特徴点P2が特徴点2である場合、第1の特徴点2における変位ベクトルR2と、回転角φとにより、(7)式及び(8)式により、Cos面及びSin面の各々における候補座標点として、回転角φが0度の場合に、変位ベクトルの角度(θ2−0=θ)として点Aの座標点を候補座標点として求める。
また、候補座標点演算部34は、入力画像の第2の特徴点P2が特徴点1である場合、第1の特徴点1における変位ベクトルR1と、回転角φとにより、(7)式及び(8)式により、Cos面及びSin面の各々における候補座標点として、回転角φが90度の場合に、変位ベクトルの角度(θ1−90)点Dの座標点を候補座標点として求める。
For example, when the second feature point P2 of the input image is the feature point 2, the candidate coordinate point calculation unit 34 uses the displacement vector R2 at the first feature point 2 and the rotation angle φ to As a candidate coordinate point in each of the Cos plane and the Sin plane, when the rotation angle φ is 0 degree, the coordinate point of the point A is set as the displacement vector angle (θ2-0 = θ) as a candidate coordinate point. Asking.
Further, when the second feature point P2 of the input image is the feature point 1, the candidate coordinate point calculation unit 34 uses the displacement vector R1 at the first feature point 1 and the rotation angle φ to Using the equation (8), as a candidate coordinate point on each of the Cos plane and the Sin plane, when the rotation angle φ is 90 degrees, the coordinate point of the angle (θ1-90) point D of the displacement vector is obtained as a candidate coordinate point.

候補座標点投票部35は、候補座標点演算部34が求めたCos面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である余弦値を積算する。
また、候補座標点投票部35は、候補座標点演算部34が求めたSin面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である正弦値を積算する(ステップS61)。
The candidate coordinate point voting unit 35 adds the cosine value, which is the vote value, to the coordinate value of the storage table corresponding to the candidate coordinate point on the Cos surface obtained by the candidate coordinate point calculation unit 34.
Further, the candidate coordinate point voting unit 35 integrates the sine value as the vote value with respect to the coordinate value of the storage table corresponding to the candidate coordinate point of the Sin surface obtained by the candidate coordinate point calculating unit 34 (step S61). .

上述した第1の実施形態の物体認識装置によれば、変位ベクトルの角度を用いて物体の姿勢を検出するため、法線ベクトルなどを用いる従来に比較して、照明などの変化に対して頑健な物体検出を行うことができる。
また、本発明の物体認識装置によれば、入力画像が登録画像の姿勢に対して回転した状態にあっても、登録画像の変位ベクトルの角度からの回転させた角度における余弦値及び正弦値の各々の積算を、第2の特徴点を中心として変位ベクトルを回転させ、回転角度毎に候補座標点の算出を行い、算出された候補座標点に対し、この候補座標点を算出した際の回転角度毎の余弦値及び正弦値を求め、対応する候補座標点に積算しているため、回転角度を正接により容易に求めることが可能であり、登録画像に対する入力画像の姿勢変位の角度を、回転角度として容易に求めることができる。
According to the object recognition apparatus of the first embodiment described above, since the posture of the object is detected using the angle of the displacement vector, it is more robust against changes in illumination or the like than in the conventional case using a normal vector or the like. Object detection can be performed.
Further, according to the object recognition device of the present invention, even when the input image is rotated with respect to the posture of the registered image, the cosine value and the sine value at the rotated angle from the angle of the displacement vector of the registered image are obtained. Each integration is performed by rotating the displacement vector around the second feature point, calculating candidate coordinate points for each rotation angle, and rotating the candidate coordinate points for the calculated candidate coordinate points. Since the cosine value and sine value for each angle are obtained and integrated with the corresponding candidate coordinate points, the rotation angle can be easily obtained by tangent, and the orientation displacement angle of the input image with respect to the registered image can be rotated. It can be easily obtained as an angle.

<第2の実施形態>
次に、本発明の第2の実施形態による物体認識装置を説明する。第2の実施形態による物体識別装置は、第1の実施形態と同様の構成であり、同様の物体認識処理を行う。以下、第1の実施形態と異なる処理の点のみを説明する。
第2の実施形態による物体認識装置が第1の実施形態と異なる点は、入力画像の登録画像に対するスケーリングを考慮した認識を行うことにある。これにより、第2の実施形態の物体認識装置は、入力画像が登録画像に対して拡大あるいは縮小されている場合にも、検出を可能とする。
<Second Embodiment>
Next, an object recognition apparatus according to a second embodiment of the present invention will be described. The object identification device according to the second embodiment has the same configuration as that of the first embodiment, and performs the same object recognition process. Hereinafter, only processing points different from the first embodiment will be described.
The object recognition apparatus according to the second embodiment is different from the first embodiment in that recognition is performed in consideration of scaling of an input image with respect to a registered image. Thereby, the object recognition apparatus of the second embodiment enables detection even when the input image is enlarged or reduced with respect to the registered image.

図7は、入力画像の登録画像に対するスケーリングを考慮した物体認識を行う処理を説明する図である。
図7(a)は、候補座標点が第1の特徴テーブルに記載されている変位ベクトルの長さR1を90%以上100%未満の縮小領域、100%から110%の範囲の拡大領域において変化させる。そして、候補座標点演算部34は、予め第1の特徴点テーブルに記憶された変位ベクトルの角度θから回転角度φを単位角度変化させる毎に、変化結果の変位ベクトル方向に縮小領域及び拡大領域で得られる座標点を候補座標点とする。ここで、図7(a)においては、第2の特徴点P1を中心とした所定の幅を有する環状の領域が2つ記載されているが、内側の環状の領域が変位ベクトルの長さRを90%から100%とした縮小領域の候補座標点の集合、また外側の環状の領域が変位ベクトルの長さRを100%から110%とした拡大領域の候補座標点の集合である。
FIG. 7 is a diagram for explaining processing for performing object recognition in consideration of scaling of a registered image of an input image.
FIG. 7 (a) shows that the candidate coordinate points change in a displacement vector length R1 described in the first feature table in a reduced region of 90% or more and less than 100%, and an enlarged region in the range of 100% to 110%. Let Then, every time the rotation angle φ is changed by the unit angle from the angle θ of the displacement vector stored in the first feature point table in advance, the candidate coordinate point calculation unit 34 reduces and enlarges the reduced region and the enlarged region in the direction of the displacement vector. The coordinate points obtained in step 1 are set as candidate coordinate points. Here, in FIG. 7A, two annular regions having a predetermined width centered on the second feature point P1 are shown, but the inner annular region is the length R of the displacement vector. Is a set of candidate coordinate points in the reduced area with 90% to 100%, and the outer annular area is a set of candidate coordinate points in the enlarged area with the displacement vector length R from 100% to 110%.

また、候補座標点投票部35は、回転角度φの単位角度変化毎に計算する投票値である余弦値Cos及び正弦値Sinを、候補座標点演算部34が求めた縮小領域及び拡大領域で得られる候補座標点全てに積算処理を行う。
図7(b)は、入力画像が登録画像の95%の大きさに縮小されて入力された際に、図7(a)と同様に、候補座標点の位置として、第1の特徴テーブルに記載されている変位ベクトルの長さR1を90%以上100%未満の縮小領域、100%から110%の範囲の拡大領域において、候補座標点演算部34が算出した結果を示す図である。ここで、図7(b)においては、第2の特徴点P1を中心とした所定の幅を有する環状の領域が2つ記載されているが、内側の環状の領域が変位ベクトルの長さRを90%から100%とした縮小領域の候補座標点の集合、また外側の環状の領域が変位ベクトルの長さRを100%から110%とした拡大領域の候補座標点の集合である。図7(b)においては、変位ベクトルの長さRは第1の特徴テーブルに記載されている変位ベクトルのものをそのまま用い、図7(a)と同様な拡大領域及び縮小領域の計算をし、一方入力画像が95%に縮小されているため、拡大領域と縮小領域とがオーバーラップする領域が発生する。
Further, the candidate coordinate point voting unit 35 obtains the cosine value Cos and the sine value Sin, which are voting values calculated for each unit angle change of the rotation angle φ, in the reduced region and the enlarged region obtained by the candidate coordinate point calculation unit 34. Integration processing is performed on all candidate coordinate points.
FIG. 7B shows the position of the candidate coordinate point in the first feature table as in FIG. 7A when the input image is reduced to 95% of the registered image and input. It is a figure which shows the result which the candidate coordinate point calculating part 34 computed in the reduction | restoration area | region where the length R1 of the displacement vector described is 90 to 100%, and the expansion area | region of the range of 100% to 110%. Here, in FIG. 7B, two annular regions having a predetermined width centered on the second feature point P1 are shown, but the inner annular region is the length R of the displacement vector. Is a set of candidate coordinate points in the reduced area with 90% to 100%, and the outer annular area is a set of candidate coordinate points in the enlarged area with the displacement vector length R from 100% to 110%. In FIG. 7B, the length R of the displacement vector is the same as that of the displacement vector described in the first feature table, and the enlargement area and the reduction area are calculated in the same manner as in FIG. On the other hand, since the input image is reduced to 95%, an area where the enlarged area and the reduced area overlap is generated.

次に、本第2の実施形態における認識対象物体の入力画像と登録画像との認識処理を図8を用いて説明する。この図8は、上記認識処理の動作例を説明するフローチャートである。
入力画像取得部31は、図示しない撮像装置から入力画像を入力し、例えばピクセルで表現された画像データとして特徴点抽出部32及び候補座標点演算部34へ出力する。
入力画像が入力されると、特徴点抽出部32は、入力画像における認識対象物体の第2の特徴点を抽出し、抽出した入力画像を特徴点2値化部33へ出力する。
次に、特徴点2値化部33は、入力される入力画像の各ピクセルに対し、第2の特徴点のピクセルと、それ以外のピクセルとの階調度の2値化を行い、内部の記憶部に記憶する(ステップS71)。ここで行う2値化については従来例の図13のフローチャートにて説明した処理と同様である。
Next, a recognition process between the input image of the recognition target object and the registered image in the second embodiment will be described with reference to FIG. FIG. 8 is a flowchart for explaining an operation example of the recognition process.
The input image acquisition unit 31 inputs an input image from an imaging device (not shown), and outputs the input image to the feature point extraction unit 32 and the candidate coordinate point calculation unit 34 as image data expressed by pixels, for example.
When the input image is input, the feature point extraction unit 32 extracts the second feature point of the recognition target object in the input image, and outputs the extracted input image to the feature point binarization unit 33.
Next, the feature point binarization unit 33 binarizes the gradation of the pixel of the second feature point and the other pixels for each pixel of the input image to be input, and stores it internally. (Step S71). The binarization performed here is the same as the processing described in the flowchart of FIG. 13 of the conventional example.

そして、候補座標点投票部35は、Cos平面及びSin平面の各々における各座標点に対応する記憶テーブルを初期化、すなわち各座標点の座標値における積算値を「0」とする(ステップS72)。
次に、候補座標点演算部34は、入力画像の全てのピクセルの2値化データに対して、第2の特徴点における評価値(投票値)としての投票処理を行ったか否かの判定を行い(ステップS73)、入力画像の全てのピクセルの2値化データに対し、第2の特徴点における投票を行った場合に認識処理を終了し、一方、特徴点における投票を行なっていないピクセルが存在する場合、処理をステップS74へ進める。
ここで、特徴点における評価値の算出を行っていないピクセルの検出は、第1の実施形態と同様であるため、説明を省略する。
Then, the candidate coordinate point voting unit 35 initializes the storage table corresponding to each coordinate point in each of the Cos plane and the Sin plane, that is, sets the integrated value in the coordinate value of each coordinate point to “0” (step S72). .
Next, the candidate coordinate point calculation unit 34 determines whether or not voting processing as an evaluation value (voting value) at the second feature point has been performed on the binarized data of all the pixels of the input image. If the second feature point is voted on the binarized data of all the pixels of the input image (step S73), the recognition process is terminated, while the pixels that have not been voted on the feature point If it exists, the process proceeds to step S74.
Here, detection of pixels for which evaluation values at feature points are not calculated is the same as in the first embodiment, and thus description thereof is omitted.

次に、候補座標点演算部34は、特徴点2値化部33から未処理のピクセルの2値化データを読みだし(ステップS74)、読みだした2値化データが予め設定した閾値を超え、このピクセルが第2の特徴点であるか否かの判定を行う(ステップS75)。
このとき、候補座標点演算部34は、読みだしたピクセルが第2の特徴点である場合、処理をステップS76へ進め、このピクセルが第2の特徴点でない場合、処理をステップS73へ進める。
ピクセルが第2の特徴点である場合、候補座標点演算部34は、入力画像の第2の特徴点の座標おいて、登録画像の全ての第1の特徴点の候補座標点の算出及び投票値の積算の処理を行ったか否かの判定を行い(ステップS76)、処理が行われていない第1の特徴点が残っていない場合、処理をステップS73へ進め、処理が行われていない第1の特徴点が残っている場合、残っている座標点に対応した変位ベクトルを特徴点データ記憶部2から読み出し、回転角φを「0」に初期化して処理をステップS77へ進める。
Next, the candidate coordinate point calculation unit 34 reads the unprocessed pixel binarization data from the feature point binarization unit 33 (step S74), and the read binarization data exceeds a preset threshold value. Then, it is determined whether or not this pixel is the second feature point (step S75).
At this time, if the read pixel is the second feature point, the candidate coordinate point calculation unit 34 advances the process to step S76. If the pixel is not the second feature point, the candidate coordinate point calculation unit 34 advances the process to step S73.
When the pixel is the second feature point, the candidate coordinate point calculation unit 34 calculates and votes the candidate coordinate points of all the first feature points of the registered image in the coordinates of the second feature point of the input image. It is determined whether or not a value integration process has been performed (step S76). If there is no first feature point that has not been processed, the process proceeds to step S73, and the process has not been performed. If one feature point remains, the displacement vector corresponding to the remaining coordinate point is read from the feature point data storage unit 2, the rotation angle φ is initialized to “0”, and the process proceeds to step S77.

次に、候補座標点演算部34は、上記変位ベクトルを単位角度(例えば、1度)ずつ回転させ、0から360度まで回転角φが変化したことにより、変位ベクトルの長さRを半径とする円上における候補座標点の全てを生成したか否かの判定を行い(ステップS77)、単位角度毎に0から360度までの全ての回転角φに対し、その第1の特徴点における変位ベクトルを回転させた場合、処理をステップS76へ進め、一方、回転角φが0から360まで変化しておらず完全に変位ベクトルが回転していない場合、変位ベクトルの回転角を単位角度分だけ回転させ、処理をステップS78へ進める。   Next, the candidate coordinate point calculation unit 34 rotates the displacement vector by a unit angle (for example, 1 degree) and changes the rotation angle φ from 0 to 360 degrees. It is determined whether or not all candidate coordinate points on the circle to be generated have been generated (step S77), and the displacement at the first feature point for all the rotation angles φ from 0 to 360 degrees per unit angle. If the vector is rotated, the process proceeds to step S76. On the other hand, if the rotation angle φ has not changed from 0 to 360 and the displacement vector has not completely rotated, the rotation angle of the displacement vector is the unit angle. Rotate and proceed to step S78.

候補座標点投票部35は、モデルデータである登録画像の第1の特徴点における変位ベクトルの単位ベクトルと、回転角度φとから、投票値である余弦値Cosと正弦値Sinとを、(9)式及び(10)式の各々から算出する(ステップS78)。
このステップS78における投票値の算出については、第1の実施形態と同様であり、図6(a)及び図6(b)にて説明した候補座標点演算部34による投票値の計算と同様の処理が行われる。
The candidate coordinate point voting unit 35 calculates a cosine value Cos and a sine value Sin, which are voting values, from the unit vector of the displacement vector at the first feature point of the registered image, which is model data, and the rotation angle φ (9). ) And (10) (step S78).
The calculation of the voting value in step S78 is the same as in the first embodiment, and is the same as the calculation of the voting value by the candidate coordinate point calculation unit 34 described with reference to FIGS. 6 (a) and 6 (b). Processing is performed.

次に、候補座標点演算部34は、候補座標値を計算する際、変位ベクトルの長さRを所定のスケーリング範囲で測定したか否かの判定を行う(ステップS79)。
このとき、候補座標点演算部34は、スケーリング範囲内における後述する係数αの数値において、係数の範囲を超えたか否かを判定し、範囲すべての係数を変位ベクトルの長さRに乗じて候補点座標を計算した場合、係数αを初期値に戻して処理をステップS77へ進め、一方、範囲すべての係数を変位ベクトルの長さRに乗じて候補点座標を計算していない場合、係数αを予め設定した数値分増加させて、処理をステップS80へ進める。
Next, when calculating the candidate coordinate value, the candidate coordinate point calculation unit 34 determines whether or not the length R of the displacement vector is measured within a predetermined scaling range (step S79).
At this time, the candidate coordinate point calculation unit 34 determines whether or not a later-described coefficient α in the scaling range exceeds the coefficient range, and multiplies the coefficients in the range by the length R of the displacement vector to obtain a candidate. When the point coordinates are calculated, the coefficient α is returned to the initial value and the process proceeds to step S77. On the other hand, when the candidate point coordinates are not calculated by multiplying all the coefficients of the range by the length R of the displacement vector, the coefficient α Is increased by a preset numerical value, and the process proceeds to step S80.

例えば、入力画像が登録画像の大きさに対して、候補座標点演算部34は、スケーリング範囲として、+/−10%、すなわち0.9Rから1.1Rまでの変位ベクトルの長さと、回転角φと、第2の特徴点の座標値とから、(7)式及び(8)式を用いて求めた座標点を、候補座標点とする。このとき、係数αの範囲が0.9≦α≦1.1と設定されている場合、係数αの初期値を0.9とし、係数αが1.1を超えたか否かにより、係数の範囲を超えたか否かを判定を行う。
このとき、スケーリング範囲の係数α(0.9≦α≦1.1)として、変位ベクトルの長さRに乗算する係数αを、0.05刻みで変化させた場合、候補座標点として回転角φにおける変位ベクトルの方向に、0.9Rから1.1Rまでの範囲で、0.05R刻みで20個の候補座標点が生成されることになる。
For example, when the input image is the size of the registered image, the candidate coordinate point calculation unit 34 has a scaling range of +/− 10%, that is, the length of the displacement vector from 0.9R to 1.1R, and the rotation angle. A coordinate point obtained from φ and the coordinate value of the second feature point using the equations (7) and (8) is set as a candidate coordinate point. At this time, if the range of the coefficient α is set as 0.9 ≦ α ≦ 1.1, the initial value of the coefficient α is set to 0.9, and the coefficient α depends on whether the coefficient α exceeds 1.1. It is determined whether or not the range has been exceeded.
At this time, when the coefficient α to be multiplied by the displacement vector length R is changed in increments of 0.05 as the scaling range coefficient α (0.9 ≦ α ≦ 1.1), the rotation angle is used as a candidate coordinate point. In the direction of the displacement vector at φ, 20 candidate coordinate points are generated in increments of 0.05R in the range from 0.9R to 1.1R.

次に、候補座標点演算部34は、モデルデータである登録画像の第1の特徴点における変位ベクトルと、回転角度φとから、候補座標点演算部34が求めた余弦値Cosと正弦値Sinとを投票するcos面及びsin面の座標値を、(7)式及び(8)式の各々から算出する(ステップS80)。このとき、候補座標点演算部34は、変位ベクトルの長さRにはステップS79において係数αが乗算されたα・Rを用いて、候補点座標の座標値の計算を行う。   Next, the candidate coordinate point calculation unit 34 calculates the cosine value Cos and the sine value Sin obtained by the candidate coordinate point calculation unit 34 from the displacement vector at the first feature point of the registered image, which is model data, and the rotation angle φ. The coordinate values of the cos plane and the sin plane for voting are calculated from each of the expressions (7) and (8) (step S80). At this time, the candidate coordinate point calculation unit 34 calculates the coordinate value of the candidate point coordinates using α · R obtained by multiplying the length R of the displacement vector by the coefficient α in step S79.

候補座標点投票部35は、候補座標点演算部34が求めたCos面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である余弦値を積算する。
また、候補座標点投票部35は、候補座標点演算部34が求めた全てのSin面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である正弦値を積算する(ステップS81)。
このとき、Cos面及びSin面全てにおいて、候補座標点投票部35は、候補座標点演算部34が求めた係数αの範囲内で、係数αを予め設定した刻みにて順次増加させた変位ベクトルの長さRの各々により、(7)式及び(9)式を用いて求めた全ての候補座標点に対して積算する。
The candidate coordinate point voting unit 35 adds the cosine value, which is the vote value, to the coordinate value of the storage table corresponding to the candidate coordinate point on the Cos surface obtained by the candidate coordinate point calculation unit 34.
Further, the candidate coordinate point voting unit 35 integrates the sine value, which is the vote value, with respect to the coordinate values of the storage table corresponding to all the candidate coordinate points of the Sin plane obtained by the candidate coordinate point calculation unit 34 (step S81).
At this time, in all of the Cos plane and the Sin plane, the candidate coordinate point voting unit 35 sequentially increases the coefficient α in increments set in advance within the range of the coefficient α obtained by the candidate coordinate point calculation unit 34. Are integrated with respect to all candidate coordinate points obtained using the equations (7) and (9).

上述した構成により、本実施形態の物体認識装置によれば、すでに説明した第1の実施形態の効果に加え、登録画像に対して入力画像がスケーリングされている場合においても、予め設定された倍率範囲の伸縮及び伸張であれば、容易に頑健な物体検出を行うことができ、かつスケーリングに対応したメモリを用意する必要がないため、投票用のメモリを削減することができる。   With the configuration described above, according to the object recognition device of the present embodiment, in addition to the effects of the first embodiment described above, a preset magnification can be used even when the input image is scaled with respect to the registered image. If the range is expanded and contracted, robust object detection can be easily performed, and since it is not necessary to prepare a memory corresponding to scaling, the memory for voting can be reduced.

<第3の実施形態>
次に、本発明の第3の実施形態による物体認識装置を説明する。第3の実施形態による物体識別装置は、第1の実施形態と同様の構成であり、同様の物体認識処理を行う。以下、第1の実施形態と異なる処理の点のみを説明する。
第3の実施形態が第1の実施形態と異なる点は、候補座標点投票部35が、変位ベクトルの単位ベクトルと、回転角度φとを用いて(9)式及び(10)式から求めた余弦値Cosと正弦値Sinとの各々を、それぞれCos面、Sin面に投票するのではなく、以下の(11)式及び(12)式から得られた結果を投票値とする。
if(Rnd()>Abs(Cos))then C=0 elsC=Sign(Cos) …(11)
if(Rnd()>Abs(Sin))then S=0 elsS=Sign(Sin) …(12)
<Third Embodiment>
Next, an object recognition apparatus according to a third embodiment of the present invention will be described. The object identification device according to the third embodiment has the same configuration as that of the first embodiment, and performs the same object recognition process. Hereinafter, only processing points different from the first embodiment will be described.
The difference between the third embodiment and the first embodiment is that the candidate coordinate point voting unit 35 uses the unit vector of the displacement vector and the rotation angle φ to obtain from the equations (9) and (10). Instead of voting each of the cosine value Cos and the sine value Sin on the Cos plane and the Sin plane, the results obtained from the following formulas (11) and (12) are used as voting values.
if (Rnd ()> Abs (Cos)) then C = 0 elsC = Sign (Cos) (11)
if (Rnd ()> Abs (Sin)) then S = 0 elsS = Sign (Sin) (12)

(11)式及び(12)式におけるRnd()は、0から1までの乱数を発生する関数である。また、Abs(X)はXの絶対値を算出する関数である。Sign(Y)はYの符号値を求める関数であり、Yが正の数値であれば1、Yが0であれば0、Yが負であれば−1を返す。
このため、候補座標点投票部35は、(11)式を用い、関数Rnd()の発生した乱数が余弦値Cosより大きい場合、投票値Cを0として出力し、関数Rnd()の発生した乱数が余弦値Cosより小さい場合、関数Sign(Cos)が求める余弦値Cosの符号値を投票値Cとして出力する。
同様に、候補座標点投票部35は、(12)式を用い、関数Rnd()の発生した乱数が正弦値Sinより大きい場合、投票値Sを0として出力し、関数Rnd()の発生した乱数が正弦値Sinより小さい場合、関数Sign(Sin)が求める正弦値Sinの符号値を投票値Sとして出力する。
このとき、入力画像の基準点となる候補点座標には多数の同一の角度の余弦値、あるいは正弦値の投票が集中し、確率的な投票を行ったとしても最終的な積算値は第1及び第2の実施形態において求めた余弦値Cos及び正弦値Sinに漸近することとなる。一方、入力画像の基準点以外の候補座標点においては、原理的にはランダムな角度の余弦値及び正弦値が積算されることになり、最終的に「0」に漸近することになる。
Rnd () in the equations (11) and (12) is a function that generates a random number from 0 to 1. Abs (X) is a function for calculating the absolute value of X. Sign (Y) is a function for obtaining the sign value of Y, and returns 1 if Y is a positive numerical value, 0 if Y is 0, and -1 if Y is negative.
Therefore, the candidate coordinate point voting unit 35 uses the expression (11), and when the random number generated by the function Rnd () is larger than the cosine value Cos, the candidate coordinate point voting unit 35 outputs the voting value C as 0 and the function Rnd () is generated. When the random number is smaller than the cosine value Cos, the sign value of the cosine value Cos obtained by the function Sign (Cos) is output as the vote value C.
Similarly, the candidate coordinate point voting unit 35 uses the expression (12), and when the random number generated by the function Rnd () is larger than the sine value Sin, the candidate coordinate point voting unit 35 outputs the vote value S as 0 and the function Rnd () is generated. When the random number is smaller than the sine value Sin, the sign value of the sine value Sin obtained by the function Sign (Sin) is output as the vote value S.
At this time, a large number of cosine or sine value votes having the same angle are concentrated on the candidate point coordinates serving as the reference point of the input image, and even if a stochastic vote is performed, the final integrated value is the first. In addition, the cosine value Cos and the sine value Sin obtained in the second embodiment are asymptotic. On the other hand, at the candidate coordinate points other than the reference point of the input image, in principle, the cosine value and sine value of random angles are integrated, and asymptotically approaches “0”.

すなわち、第1の実施形態における浮動小数点あるいは固定小数点ではなく、投票値を確率から得られる数値としたものである。投票値としては、余弦値Cos及び正弦値Sinの符号値により求められる+1、0、−1の種類が用いられる。すでに述べたように、乱数と比較して大きいか否かにより、投票値が積算されるかあるいは積算されなかが決定される。
この+1、0、−1の種類による投票により、投票の中間メモリ値を削減することが可能となり、投票処理を複数のパーソナルコンピュータ(以下、PC)により分散して行う場合、それぞれのPCが処理するデータ量を少なくすることができる。したがって、各PCにおける投票の中間値を小さくすることができ、いずれかのPCにおいて集計を行う際、送受信するデータ容量を低下させるため、物体認識の処理を高速化させることができる。
That is, instead of the floating point or fixed point in the first embodiment, the vote value is a numerical value obtained from the probability. As the voting value, +1, 0, and −1 types obtained from the sign values of the cosine value Cos and the sine value Sin are used. As described above, whether or not the vote values are accumulated is determined depending on whether or not it is larger than the random number.
The voting by the types of +1, 0, and -1 makes it possible to reduce the intermediate memory value of voting. When voting processing is performed in a distributed manner by a plurality of personal computers (hereinafter referred to as PCs), each PC performs processing. The amount of data to be reduced can be reduced. Therefore, the intermediate value of voting in each PC can be reduced, and when performing aggregation in any PC, the data capacity to be transmitted / received is reduced, so that the object recognition process can be speeded up.

次に、本第3の実施形態における認識対象物体の入力画像と登録画像との認識処理を図9を用いて説明する。この図9は、上記認識処理の動作例を説明するフローチャートである。
この図9において、ステップS91からステップS98までの各々は、第2の実施形態における図8のフローチャートにおけるステップS71からステップS78までのそれぞれと同様のため、説明を省略する。
ステップS98において余弦値Cos及び正弦値Sinを求めた後、候補座標点投票部35は、算出した余弦値Cosから(11)式を用い、投票値Cを求め、同様に、算出した正弦値Sinから(12)式を用い、投票値Sを求める(ステップS99)。
Next, a recognition process between the input image of the recognition target object and the registered image in the third embodiment will be described with reference to FIG. FIG. 9 is a flowchart for explaining an operation example of the recognition process.
In FIG. 9, steps S91 to S98 are the same as steps S71 to S78 in the flowchart of FIG. 8 according to the second embodiment, and a description thereof will be omitted.
After obtaining the cosine value Cos and the sine value Sin in step S98, the candidate coordinate point voting unit 35 obtains the vote value C from the calculated cosine value Cos using the equation (11), and similarly calculates the calculated sine value Sin. To (12) to obtain a vote value S (step S99).

次に、候補座標点演算部34は、モデルデータである登録画像の第1の特徴点における変位ベクトルと、回転角度φとから、候補座標点演算部34が求めた余弦値Cosと正弦値Sinとを投票するCos面及びSin面における候補座標点の座標値を、(7)式及び(8)式の各々から算出する(ステップS100)。
候補座標点投票部35は、候補座標点演算部34が求めたCos面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である余弦値を積算する。
また、候補座標点投票部35は、候補座標点演算部34が求めた全てのSin面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である正弦値を積算する(ステップS101)。
Next, the candidate coordinate point calculation unit 34 calculates the cosine value Cos and the sine value Sin obtained by the candidate coordinate point calculation unit 34 from the displacement vector at the first feature point of the registered image, which is model data, and the rotation angle φ. The coordinate values of the candidate coordinate points on the Cos plane and the Sin plane for voting are calculated from each of the expressions (7) and (8) (step S100).
The candidate coordinate point voting unit 35 adds the cosine value, which is the vote value, to the coordinate value of the storage table corresponding to the candidate coordinate point on the Cos surface obtained by the candidate coordinate point calculation unit 34.
Further, the candidate coordinate point voting unit 35 integrates the sine value, which is the vote value, with respect to the coordinate values of the storage table corresponding to all the candidate coordinate points of the Sin plane obtained by the candidate coordinate point calculation unit 34 (step S101).

上述した構成により、本実施形態の物体認識装置によれば、第1の実施形態の効果に加え、複数のパーソナルコンピュータを用いて分散処理を行う場合、投票値の積算を行っている間の中間投票結果を保持するためのメモリ量を低減し、各パーソナルコンピュータ間において投票結果を集計する際の通信量を削減することができる。   With the configuration described above, according to the object recognition device of the present embodiment, in addition to the effects of the first embodiment, when distributed processing is performed using a plurality of personal computers, an intermediate period during which vote values are accumulated It is possible to reduce the amount of memory for holding the voting results and reduce the amount of communication when counting the voting results between the personal computers.

<第4の実施形態>
次に、本発明の第4の実施形態による物体認識装置を説明する。第4の実施形態による物体識別装置は、第2の実施形態と同様の構成であり、同様の物体認識処理を行う。以下、第2の実施形態と異なる処理の点のみを説明する。
第4の実施形態は、図8のフローチャートにおいて、ステップS78において求めた余弦値Cosと正弦値Sinとをそのまま投票するのではなく、第3の実施形態と同様に、投票値Cと投票値Sとの各々を、(11)式、(12)式により求めて、候補座標点に投票する。
<Fourth Embodiment>
Next, an object recognition apparatus according to a fourth embodiment of the present invention will be described. The object identification device according to the fourth embodiment has the same configuration as that of the second embodiment, and performs the same object recognition process. Only processing points different from those of the second embodiment will be described below.
In the flowchart of FIG. 8, the fourth embodiment does not vote the cosine value Cos and the sine value Sin obtained in step S78 as they are, but, similarly to the third embodiment, the vote value C and the vote value S. Are obtained by the equations (11) and (12), and the candidate coordinate points are voted.

したがって、候補座標点演算部34は、入力画像の登録画像に対するスケーリングを考慮し、変位ベクトルRに対して予め設定した範囲内において、刻み幅分増加させた係数αを順次乗算し、変位ベクトルの角度θに回転角φを加算した角度の変位ベクトル方向に、複数の候補座標点を求める。
そして、候補座標点投票部35は、候補座標点演算部34が求めたcos面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である余弦値を積算する。
また、候補座標点投票部35は、候補座標点演算部34が求めた全てのsin面の候補座標点に対応した、記憶テーブルの座標値に対し、投票値である正弦値を積算する。
このとき、Cos面及びSin面全てにおいて、候補座標点投票部35は、候補座標点演算部34が求めた係数αの範囲内で、係数αを予め設定した刻みにて順次増加させた変位ベクトルの長さRの各々により、(7)式及び(9)式を用いて求めた全ての候補座標点に対して積算する。
Therefore, the candidate coordinate point calculation unit 34 considers scaling of the input image with respect to the registered image and sequentially multiplies the displacement vector R by a coefficient α increased by a step size within a preset range. A plurality of candidate coordinate points are obtained in the direction of the displacement vector of the angle obtained by adding the rotation angle φ to the angle θ.
Then, the candidate coordinate point voting unit 35 adds the cosine value that is the vote value to the coordinate value of the storage table corresponding to the candidate coordinate point of the cos surface obtained by the candidate coordinate point calculating unit 34.
Further, the candidate coordinate point voting unit 35 accumulates the sine value as the vote value with respect to the coordinate values of the storage table corresponding to all the candidate coordinate points on the sine plane obtained by the candidate coordinate point calculating unit 34.
At this time, in all of the Cos plane and the Sin plane, the candidate coordinate point voting unit 35 sequentially increases the coefficient α in increments set in advance within the range of the coefficient α obtained by the candidate coordinate point calculation unit 34. Are integrated with respect to all candidate coordinate points obtained using the equations (7) and (9).

また、図1における物体認識装置の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより物体認識の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。   Further, the program for realizing the function of the object recognition apparatus in FIG. 1 is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed to execute object recognition. Processing may be performed. Here, the “computer system” includes an OS and hardware such as peripheral devices.

また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory in a computer system serving as a server or a client in that case, and a program that holds a program for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.

以上、この発明の実施形態を図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes design and the like within a scope not departing from the gist of the present invention.

1…登録画像データ生成部 2…特徴点データ記憶部 3…物体認識部 11…登録画像取得部 12…特徴点抽出部 13…特徴点2値化部 31…入力画像取得部 32…特徴点抽出部 33…特徴点2値化部 34…候補座標点演算部 35…候補座標点投票部 36…認識対象物体判定部   DESCRIPTION OF SYMBOLS 1 ... Registered image data generation part 2 ... Feature point data storage part 3 ... Object recognition part 11 ... Registered image acquisition part 12 ... Feature point extraction part 13 ... Feature point binarization part 31 ... Input image acquisition part 32 ... Feature point extraction Unit 33 ... Feature point binarization unit 34 ... Candidate coordinate point calculation unit 35 ... Candidate coordinate point voting unit 36 ... Recognition target object determination unit

Claims (7)

登録画像より抽出した複数の第1の特徴点と、前記第1の特徴点から当該登録画像の基準点への変位ベクトルとからなる特徴点データが記憶される特徴点データ記憶部と、
入力画像より第2の特徴点を抽出する特徴点抽出部と、
前記第2の特徴点毎に、当該第2の特徴点を回転中心として、前記第1の特徴点全ての前記変位ベクトルの各々を予め設定した単位角度にて順次回転させ、回転させた回転角毎において、前記第2の特徴点の座標と前記変位ベクトルとから基準点の候補である候補座標点を算出する候補座標点算出部と、
前記候補座標点毎に、前記変位ベクトルの回転角に対応した余弦値と正弦値とによる投票値を個別に積算する候補座標点投票部と、
余弦値と正弦値との積算値の自乗値を加算した数値が最大である候補座標点を、前記候補座標点のなかから検出して、検出された候補座標点を基準点の座標とし、当該座標点に対応する回転角を、前記登録画像に対する前記入力画像の回転角として検出する認識対象物体判定部と
を有することを特徴とする物体認識装置。
A feature point data storage unit for storing feature point data including a plurality of first feature points extracted from a registered image and a displacement vector from the first feature point to a reference point of the registered image;
A feature point extraction unit for extracting a second feature point from the input image;
For each of the second feature points, each of the displacement vectors of all the first feature points is sequentially rotated by a preset unit angle with the second feature point as a rotation center, and the rotation angle is rotated. A candidate coordinate point calculation unit that calculates a candidate coordinate point that is a candidate for a reference point from the coordinates of the second feature point and the displacement vector;
A candidate coordinate point voting unit that individually accumulates voting values based on cosine values and sine values corresponding to the rotation angles of the displacement vectors, for each candidate coordinate point;
The candidate coordinate point having the maximum numerical value obtained by adding the square value of the integrated value of the cosine value and the sine value is detected from the candidate coordinate points, and the detected candidate coordinate point is used as the coordinate of the reference point. An object recognition apparatus comprising: a recognition target object determination unit that detects a rotation angle corresponding to a coordinate point as a rotation angle of the input image with respect to the registered image.
2次元座標系における前記変位ベクトルの単位ベクトルのx方向の成分と、y方向の成分とを、登録画像における前記変位ベクトルの余弦値、正弦値として用い、投票値として用いる前記変位ベクトルの回転角に対応した余弦値と正弦値とを算出することを特徴とする請求項1に記載の物体認識装置。   The rotation angle of the displacement vector used as a voting value using the x-direction component and the y-direction component of the unit vector of the displacement vector in the two-dimensional coordinate system as the cosine value and sine value of the displacement vector in the registered image The object recognition apparatus according to claim 1, wherein a cosine value and a sine value corresponding to are calculated. 前記候補座標点投票部が、
前記登録画像における前記変位ベクトルの角度を第1の角度とし、当該変位ベクトルを単位角度づつ回転させる回転角を第2の角度とした場合、
第1の角度と単位角度毎に増加する第2の角度とから前記変位ベクトルの回転させた際の余弦値及び正弦値の値を予め計算して記憶していることを特徴とする請求項2に記載の物体認識装置。
The candidate coordinate point voting unit,
When the angle of the displacement vector in the registered image is the first angle and the rotation angle for rotating the displacement vector by unit angle is the second angle,
3. A cosine value and a sine value when the displacement vector is rotated from a first angle and a second angle that increases for each unit angle are calculated and stored in advance. The object recognition apparatus described in 1.
前記候補座標点算出部が、
前記変位ベクトルの長さを予め設定された倍率範囲で伸縮及び伸張し、最長の長さ及び最短の長さの範囲における候補座標点を座標点範囲とし、当該座標点範囲における前記登録画像における変位ベクトルの長さに対応する座標点を当該座標点範囲を代表とする候補点座標とし、当該座標点範囲における候補点座標値に対する全ての投票値を積算することを特徴とする請求項1から請求項3のいずれか一項に記載の物体認識装置。
The candidate coordinate point calculation unit
The length of the displacement vector is expanded and contracted within a preset magnification range, and the candidate coordinate point in the longest length and shortest length range is taken as a coordinate point range, and the displacement in the registered image in the coordinate point range The coordinate point corresponding to the length of the vector is set as a candidate point coordinate represented by the coordinate point range, and all voting values for the candidate point coordinate values in the coordinate point range are integrated. Item 4. The object recognition device according to any one of Items 3 to 3.
候補座標点投票部が、
乱数を発生させ、余弦値と正弦値の各々の絶対値と前記乱数とを比較し、当該乱数の方が大きいとき投票値を0と定義し、当該乱数の方が小さいとき、余弦値が正の場合に当該余弦値に対応する投票値を1と定義し、正弦値が正の場合に当該正弦値に対応する投票値を1と定義し、余弦値が負の場合に当該余弦値に対応する投票値を−1と定義し、正弦値が負の場合に当該正弦値に対応する投票値を−1と定義することを特徴とする請求項1から請求項4のいずれか一項に記載の物体認識装置。
The candidate coordinate point voting section
A random number is generated, the absolute value of each cosine value and sine value is compared with the random number, the voting value is defined as 0 when the random number is larger, and the cosine value is positive when the random number is smaller. In this case, the voting value corresponding to the cosine value is defined as 1, the voting value corresponding to the sine value is defined as 1 when the sine value is positive, and the cosine value corresponds to the case when the cosine value is negative. The voting value to be defined is defined as -1, and when the sine value is negative, the voting value corresponding to the sine value is defined as -1. Object recognition device.
登録画像データ生成部が、登録画像より抽出した複数の第1の特徴点と、前記第1の特徴点から当該登録画像の基準点への変位ベクトルとからなる特徴点データが記憶される特徴点データ記憶過程と、
特徴点抽出部が、入力画像より第2の特徴点を抽出する特徴点抽出過程と、
候補座標点算出部が、前記第2の特徴点毎に、当該第2の特徴点を回転中心として、前記第1の特徴点全ての前記変位ベクトルの各々を予め設定した単位角度にて順次回転させ、回転させた回転角毎において、前記第2の特徴点の座標と前記変位ベクトルとから基準点の候補である候補座標点を算出する候補座標点算出過程と、
候補座標点投票部が前記候補座標点毎に、前記変位ベクトルの回転角に対応した余弦値と正弦値とによる投票値を個別に積算する候補座標点投票過程と、
対象物体判定部が、余弦値と正弦値との積算値の自乗値を加算した数値が最大である候補座標点を、前記候補座標点のなかから検出して、検出された候補座標点を基準点の座標とし、当該座標点に対応する回転角を、前記登録画像に対する前記入力画像の回転角として検出する認識対象物体判定過程と
を有することを特徴とする物体認識方法。
Feature points in which feature point data including a plurality of first feature points extracted from the registered image by the registered image data generation unit and displacement vectors from the first feature points to the reference points of the registered images are stored. Data storage process;
A feature point extraction process in which a feature point extraction unit extracts a second feature point from the input image;
The candidate coordinate point calculation unit sequentially rotates each of the displacement vectors of all the first feature points by a preset unit angle with the second feature point as the rotation center for each of the second feature points. A candidate coordinate point calculation process for calculating a candidate coordinate point that is a candidate for a reference point from the coordinates of the second feature point and the displacement vector at each rotated rotation angle;
A candidate coordinate point voting process in which the candidate coordinate point voting unit individually accumulates voting values based on a cosine value and a sine value corresponding to the rotation angle of the displacement vector for each candidate coordinate point;
The target object determination unit detects the candidate coordinate point having the maximum numerical value obtained by adding the square value of the integrated value of the cosine value and the sine value from the candidate coordinate points, and uses the detected candidate coordinate point as a reference And a recognition target object determination step of detecting a rotation angle corresponding to the coordinate point as a rotation angle of the input image with respect to the registered image.
登録画像データ生成部が、登録画像より抽出した複数の第1の特徴点と、前記第1の特徴点から当該登録画像の基準点への変位ベクトルとからなる特徴点データが記憶される特徴点データ記憶処理と、
特徴点抽出部が、入力画像より第2の特徴点を抽出する特徴点抽出処理と、
候補座標点算出部が、前記第2の特徴点毎に、当該第2の特徴点を回転中心として、前記第1の特徴点全ての前記変位ベクトルの各々を予め設定した単位角度にて順次回転させ、回転させた回転角毎において、前記第2の特徴点の座標と前記変位ベクトルとから基準点の候補である候補座標点を算出する候補座標点算出処理と、
候補座標点投票部が前記候補座標点毎に、前記変位ベクトルの回転角に対応した余弦値と正弦値とによる投票値を個別に積算する候補座標点投票処理と、
対象物体判定部が、余弦値と正弦値との積算値の自乗値を加算した数値が最大である候補座標点を、前記候補座標点のなかから検出して、検出された候補座標点を基準点の座標とし、当該座標点に対応する回転角を、前記登録画像に対する前記入力画像の回転角として検出する認識対象物体判定処理と
をコンピュータに実行させるプログラム。
Feature points in which feature point data including a plurality of first feature points extracted from the registered image by the registered image data generation unit and displacement vectors from the first feature points to the reference points of the registered images are stored. Data storage processing;
A feature point extraction unit that extracts a second feature point from the input image;
The candidate coordinate point calculation unit sequentially rotates each of the displacement vectors of all the first feature points by a preset unit angle with the second feature point as the rotation center for each of the second feature points. A candidate coordinate point calculation process for calculating a candidate coordinate point that is a candidate for a reference point from the coordinates of the second feature point and the displacement vector at each rotated rotation angle;
Candidate coordinate point voting process in which the candidate coordinate point voting unit individually accumulates voting values based on the cosine value and sine value corresponding to the rotation angle of the displacement vector for each candidate coordinate point;
The target object determination unit detects the candidate coordinate point having the maximum numerical value obtained by adding the square value of the integrated value of the cosine value and the sine value from the candidate coordinate points, and uses the detected candidate coordinate point as a reference A program for causing a computer to execute recognition target object determination processing for detecting a rotation angle corresponding to the coordinate point as a rotation angle of the input image with respect to the registered image.
JP2010092930A 2010-04-14 2010-04-14 Object recognition device, object recognition method and program Withdrawn JP2011221939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010092930A JP2011221939A (en) 2010-04-14 2010-04-14 Object recognition device, object recognition method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010092930A JP2011221939A (en) 2010-04-14 2010-04-14 Object recognition device, object recognition method and program

Publications (1)

Publication Number Publication Date
JP2011221939A true JP2011221939A (en) 2011-11-04

Family

ID=45038824

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010092930A Withdrawn JP2011221939A (en) 2010-04-14 2010-04-14 Object recognition device, object recognition method and program

Country Status (1)

Country Link
JP (1) JP2011221939A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114492668A (en) * 2022-02-16 2022-05-13 平安科技(深圳)有限公司 Attitude similarity judgment method, data processing device and storage medium
WO2023105274A1 (en) * 2021-12-10 2023-06-15 Sensetime International Pte. Ltd. Object recognition method, apparatus, device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023105274A1 (en) * 2021-12-10 2023-06-15 Sensetime International Pte. Ltd. Object recognition method, apparatus, device and storage medium
CN114492668A (en) * 2022-02-16 2022-05-13 平安科技(深圳)有限公司 Attitude similarity judgment method, data processing device and storage medium
CN114492668B (en) * 2022-02-16 2024-05-14 平安科技(深圳)有限公司 Method for judging attitude similarity, data processing device and storage medium

Similar Documents

Publication Publication Date Title
US10334168B2 (en) Threshold determination in a RANSAC algorithm
JP5705147B2 (en) Representing 3D objects or objects using descriptors
Habib et al. Automatic calibration of low-cost digital cameras
KR101531618B1 (en) Method and system for comparing images
CN110348454A (en) Match local image characteristics descriptor
WO2016199605A1 (en) Image processing device, method, and program
KR20140014298A (en) Planar mapping and tracking for mobile devices
CN112348863B (en) Image alignment method, image alignment device and terminal equipment
CN109919971B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US20120182442A1 (en) Hardware generation of image descriptors
CN112270719B (en) Camera calibration method, device and system
JP7280385B2 (en) Visual positioning method and related apparatus, equipment and computer readable storage medium
US9865061B2 (en) Constructing a 3D structure
CN106257497B (en) Matching method and device for image homonymy points
CN107133986B (en) A kind of camera calibration method based on two-dimensional calibrations object
JP6017343B2 (en) Database generation device, camera posture estimation device, database generation method, camera posture estimation method, and program
JP2014102746A (en) Subject recognition device and subject recognition program
Zhao et al. Metric calibration of unfocused plenoptic cameras for three-dimensional shape measurement
Uhlig et al. A calibration method for the generalized imaging model with uncertain calibration target coordinates
Thiruselvam et al. Feature‐assisted stereo correlation
JP2011221939A (en) Object recognition device, object recognition method and program
Lin et al. New method for subpixel image matching with rotation invariance by combining the parametric template method and the ring projection transform process
Toschi et al. Improving automated 3D reconstruction methods via vision metrology
Karimi et al. A new method for automatic and accurate coded target recognition in oblique images to improve augmented reality precision
JP6080424B2 (en) Corresponding point search device, program thereof, and camera parameter estimation device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130702