JP2012086285A - Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program - Google Patents

Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program Download PDF

Info

Publication number
JP2012086285A
JP2012086285A JP2010232961A JP2010232961A JP2012086285A JP 2012086285 A JP2012086285 A JP 2012086285A JP 2010232961 A JP2010232961 A JP 2010232961A JP 2010232961 A JP2010232961 A JP 2010232961A JP 2012086285 A JP2012086285 A JP 2012086285A
Authority
JP
Japan
Prior art keywords
image data
homography matrix
unit
local
image
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
JP2010232961A
Other languages
Japanese (ja)
Inventor
Takashi Minamimoto
高志 南本
Koichi Hashimoto
浩一 橋本
Chuantao Zang
チャンタオ ザン
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 JP2010232961A priority Critical patent/JP2012086285A/en
Publication of JP2012086285A publication Critical patent/JP2012086285A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Manipulator (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To secure real time and implement high-stability tracking.SOLUTION: A homography matrix acquisition device 30 takes in image data to be output from an image pickup device 11. The homography matrix acquisition device 30 computes a local homography matrix for each image data and computes a global homography matrix at a rate lower than that computation rate. The homography matrix acquisition device 30 converts the image data by using the local homography matrix for each image data and obtains correlations with a reference image. When the correlations are high, the local homography matrix computed corresponding to the image data is read out, and when the correlations are low, the latest global homography matrix is read out. A robot control device 45 reads homography matrix data from the homography matrix acquisition device 30, computes the attitude of a robot body 12, and control movements.

Description

本発明は、追跡ロボット装置、追跡ロボット制御方法、追跡ロボット制御プログラム、ホモグラフィー行列取得装置、ホモグラフィー行列取得方法、およびホモグラフィー行列取得プログラムに関する。   The present invention relates to a tracking robot device, a tracking robot control method, a tracking robot control program, a homography matrix acquisition device, a homography matrix acquisition method, and a homography matrix acquisition program.

従来、ハンド部に撮像装置を取り付けたマニピュレーターを制御し、撮像装置の位置および向きを自在に動かして検査対象物体を撮像し、その撮像画像に基づいて外観検査を行う検査システムが知られている(例えば、特許文献1参照)。この特許文献1には、ロボットのアームに取り付けられたカメラがあらかじめ検査対象物体を撮影して得た参照画像を記憶しておき、当該ロボットが、実際の検査対象物体の撮像画像と参照画像とに基づく視覚フィードバック制御に基づいて、アームの姿勢を制御し検査対象物体を追跡する技術が記載されている。   2. Description of the Related Art Conventionally, an inspection system that controls a manipulator having an imaging device attached to a hand unit, freely moves the position and orientation of the imaging device to image an object to be inspected, and performs an appearance inspection based on the captured image is known. (For example, refer to Patent Document 1). In this Patent Document 1, a reference image obtained by photographing an inspection target object in advance by a camera attached to a robot arm is stored, and the robot captures an actual captured image and reference image of the inspection target object. A technique for controlling the posture of an arm and tracking an object to be inspected based on visual feedback control based on the above is described.

特開2003−302345号公報JP 2003-302345 A

しかしながら、上記のような従来の検査システムにおいては、トラッキングのリアルタイム性と安定性とはトレードオフの関係にある。すなわち、トラッキングの処理速度を速くしてリアルタイム性を確保しようとすると、検査対象物体の誤検出数が多くなる一方、トラッキングの処理時間に余裕をもたせると、検査対象物体の誤検出数は少なくなる。   However, in the conventional inspection system as described above, the real-time property of tracking and the stability are in a trade-off relationship. In other words, increasing the tracking processing speed to ensure real-time performance increases the number of erroneous detections of the inspection target object, while increasing the tracking processing time reduces the number of erroneous detections of the inspection target object. .

そこで、本発明は、上記事情に鑑みてなされたものであり、リアルタイム性を確保し且つ安定性の高いトラッキングを行うことのできる、追跡ロボット装置、追跡ロボット制御方法、追跡ロボット制御プログラム、ホモグラフィー行列取得装置、ホモグラフィー行列取得方法、およびホモグラフィー行列取得プログラム、を提供することを目的とする。   Accordingly, the present invention has been made in view of the above circumstances, and can provide a tracking robot apparatus, a tracking robot control method, a tracking robot control program, a homography that can ensure real-time performance and perform highly stable tracking. An object is to provide a matrix acquisition device, a homography matrix acquisition method, and a homography matrix acquisition program.

[1]上記の課題を解決するため、本発明の一態様である追跡ロボット装置は、可動のアーム部とこのアーム部に可動に設けられるハンド部とを備えるロボット本体と、前記ハンド部に設けられ、検査対象物体を撮像して画像データを出力する撮像部と、前記検査対象物体の参照画像データを記憶する参照画像記憶部と、前記撮像部が出力した画像データを取り込む画像データ取得部と、前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、前記ホモグラフィー行列転送部から、前記第1の画像データに対応する局所的ホモグラフィー行列または前記第1の画像データに対応する大域的ホモグラフィー行列を、ホモグラフィー行列データとして読み出し、この読み出したホモグラフィー行列データに基づいて前記ロボット本体の姿勢を計算して、前記ロボット本体の前記アーム部と前記ハンド部との少なくともいずれかの動作を制御するロボット制御部と、を備えることを特徴とする。
[2]上記[1]記載の追跡ロボット装置において、前記画像相関分析部は、前記変換画像データと前記参照画像データとの画像の相関として、正規化相互相関を計算して前記類似度を求めることを特徴とする。
[3]上記[2]記載の追跡ロボット装置において、前記局所的ホモグラフィー行列取得部は、前記第1の画像データと前記参照画像データと該局所的ホモグラフィー行列取得部に記憶された第2の画像データに対応する局所的ホモグラフィー行列とに基づいて、前記第1の画像データに対応する局所的ホモグラフィー行列を計算するための変換行列を計算し、この計算した変換行列と前記第2の画像データに対応する局所的ホモグラフィー行列とに基づいて前記第1の画像データに対応する局所的ホモグラフィー行列を計算することを特徴とする。
[1] In order to solve the above-described problem, a tracking robot apparatus according to one aspect of the present invention includes a robot body including a movable arm portion and a hand portion movably provided on the arm portion, and the hand portion. An imaging unit that images the inspection target object and outputs image data; a reference image storage unit that stores reference image data of the inspection target object; an image data acquisition unit that captures image data output by the imaging unit; , Corresponding to the first image data captured by the image data acquisition unit, the reference image data stored in the reference image storage unit, and the second image data that is past image data than the first image data. A local homography matrix corresponding to the first image data is calculated based on the local homography matrix and the local homography corresponding to the calculated first image data is calculated. Using the local homography matrix acquisition unit for storing the Raffy matrix and the local homography matrix corresponding to the first image data calculated by the local homography matrix acquisition unit, the first image data is obtained. An image data conversion unit that generates converted image data by converting, and analyzes a correlation between the converted image data generated by the image data conversion unit and the reference image data stored in the reference image storage unit An image correlation analysis unit that calculates a degree of similarity, image feature points extracted from the first image data captured by the image data acquisition unit and the reference image data stored in the reference image storage unit, and these A feature point extraction unit for calculating a relative position of the feature point; and a global homology corresponding to the first image data based on the relative position of the feature point calculated by the feature point extraction unit. A global homography matrix acquisition unit that calculates a Luffy matrix and stores a global homography matrix corresponding to the calculated first image data, and the similarity calculated by the image correlation analysis unit exceeds a threshold value Includes reading and storing a local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit, and the similarity calculated by the image correlation analysis unit is equal to or less than the threshold value. A homography matrix transfer unit that reads and stores a global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit, and the homography matrix transfer unit To a local homography matrix corresponding to the first image data or a global homograph corresponding to the first image data. The matrix is read as homography matrix data, the posture of the robot body is calculated based on the read homography matrix data, and the operation of at least one of the arm unit and the hand unit of the robot body is performed. And a robot control unit for controlling.
[2] In the tracking robot device according to [1], the image correlation analysis unit calculates a normalized cross-correlation as an image correlation between the converted image data and the reference image data to obtain the similarity. It is characterized by that.
[3] In the tracking robot device according to the above [2], the local homography matrix acquisition unit stores the first image data, the reference image data, and the second homography matrix acquisition unit stored in the local homography matrix acquisition unit. A transformation matrix for calculating a local homography matrix corresponding to the first image data is calculated based on the local homography matrix corresponding to the image data of the first image data, and the calculated transformation matrix and the second The local homography matrix corresponding to the first image data is calculated based on the local homography matrix corresponding to the image data.

[4]上記の課題を解決するため、本発明の一態様である追跡ロボット制御方法は、可動のアーム部とこのアーム部に可動に設けられるハンド部とを備えるロボット本体の前記ハンド部に設けられた撮像部が、検査対象物体を撮像して画像データを出力する撮像ステップと、前記撮像ステップにおいて出力した画像データを取り込む画像データ取得ステップと、前記画像データ取得ステップにおいて取り込んだ第1の画像データと参照画像記憶部に記憶された参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得ステップと、前記局所的ホモグラフィー行列取得ステップにおいて計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換ステップと、前記画像データ変換ステップにおいて生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析ステップと、前記画像相関分析ステップにおいて計算した前記類似度が閾値を超える場合に、前記局所的ホモグラフィー行列取得ステップにおいて記憶した前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶部に記憶し、前記画像相関分析ステップにおいて計算した前記類似度が前記閾値以下である場合に、前記第1の画像データと前記参照画像記憶部に記憶された参照画像データとの画像の特徴点の相対位置に基づいて計算されて記憶された第1の画像データに対応する大域的ホモグラフィー行列を読み込んで前記記憶部に記憶するホモグラフィー行列転送ステップと、前記ホモグラフィー行列転送ステップにおいて前記記憶部に記憶した、前記第1の画像データに対応する局所的ホモグラフィー行列または前記第1の画像データに対応する大域的ホモグラフィー行列を、ホモグラフィー行列データとして前記記憶部から読み出し、この読み出したホモグラフィー行列データに基づいて前記ロボット本体の姿勢を計算して、前記ロボット本体の前記アーム部と前記ハンド部との少なくともいずれかの動作を制御するロボット制御ステップと、を有することを特徴とする。
[5]上記[4]記載の追跡ロボット制御方法において、前記画像相関分析ステップは、前記変換画像データと前記参照画像データとの画像の相関として、正規化相互相関を計算して前記類似度を求めることを特徴とする。
[6]上記[5]記載の追跡ロボット制御方法において、前記局所的ホモグラフィー行列取得ステップは、前記第1の画像データと前記参照画像データと該局所的ホモグラフィー行列取得ステップにおいて記憶された第2の画像データに対応する局所的ホモグラフィー行列とに基づいて、前記第1の画像データに対応する局所的ホモグラフィー行列を計算するための変換行列を計算し、この計算した変換行列と前記第2の画像データに対応する局所的ホモグラフィー行列とに基づいて前記第1の画像データに対応する局所的ホモグラフィー行列を計算することを特徴とする。
[4] In order to solve the above-described problem, a tracking robot control method according to an aspect of the present invention is provided in the hand portion of a robot body including a movable arm portion and a hand portion movably provided on the arm portion. An imaging step in which the obtained imaging unit images the inspection target object and outputs image data; an image data acquisition step for capturing image data output in the imaging step; and a first image captured in the image data acquisition step The first image data based on the data, the reference image data stored in the reference image storage unit, and the local homography matrix corresponding to the second image data that is image data past the first image data. The local homography matrix corresponding to is calculated, and the local homography matrix corresponding to the calculated first image data is stored. Using the local homography matrix corresponding to the first image data calculated in the local homography matrix acquisition step and the local homography matrix acquisition step to convert and convert the first image data Image data conversion step for generating image data, and calculating the similarity by analyzing the correlation between the converted image data generated in the image data conversion step and the reference image data stored in the reference image storage unit And a local homography matrix corresponding to the first image data stored in the local homography matrix acquisition step when the similarity calculated in the image correlation analysis step exceeds a threshold value. Is stored in the storage unit and calculated in the image correlation analysis step. When the similarity is equal to or less than the threshold, the first image data calculated and stored based on the relative position of the feature point of the image between the first image data and the reference image data stored in the reference image storage unit. A homography matrix transfer step of reading a global homography matrix corresponding to one image data and storing it in the storage unit, and corresponding to the first image data stored in the storage unit in the homography matrix transfer step A local homography matrix or a global homography matrix corresponding to the first image data is read from the storage unit as homography matrix data, and the posture of the robot body is determined based on the read homography matrix data. Calculate and operate at least one of the arm part and the hand part of the robot body And a robot control step for controlling.
[5] In the tracking robot control method according to [4] above, the image correlation analysis step calculates a normalized cross-correlation as an image correlation between the converted image data and the reference image data, and calculates the similarity. It is characterized by seeking.
[6] In the tracking robot control method according to [5] above, the local homography matrix acquisition step includes the first image data, the reference image data, and the local homography matrix acquisition step stored in the local homography matrix acquisition step. A transformation matrix for calculating a local homography matrix corresponding to the first image data is calculated based on the local homography matrix corresponding to the second image data, and the calculated transformation matrix and the first A local homography matrix corresponding to the first image data is calculated based on a local homography matrix corresponding to the second image data.

[7]上記の課題を解決するため、本発明の一態様である追跡ロボット制御プログラムは、可動のアーム部とこのアーム部に可動に設けられるハンド部とを備えるロボット本体と、前記ハンド部に設けられ、検査対象物体を撮像して画像データを出力する撮像部とを制御するための、前記検査対象物体の参照画像データを記憶する参照画像記憶部を備えたコンピューターを、前記撮像部が出力した画像データを取り込む画像データ取得部と、前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、前記ホモグラフィー行列転送部から、前記第1の画像データに対応する局所的ホモグラフィー行列または前記第1の画像データに対応する大域的ホモグラフィー行列を、ホモグラフィー行列データとして読み出し、この読み出したホモグラフィー行列データに基づいて前記ロボット本体の姿勢を計算して、前記ロボット本体の前記アーム部と前記ハンド部との少なくともいずれかの動作を制御するロボット制御部と、として機能させる。
[8]上記[7]記載の追跡ロボット制御プログラムにおいて、前記画像相関分析部は、前記変換画像データと前記参照画像データとの画像の相関として、正規化相互相関を計算して前記類似度を求める。
[9]上記[8]記載の追跡ロボット制御プログラムにおいて、前記局所的ホモグラフィー行列取得部は、前記第1の画像データと前記参照画像データと該局所的ホモグラフィー行列取得部に記憶された第2の画像データに対応する局所的ホモグラフィー行列とに基づいて、前記第1の画像データに対応する局所的ホモグラフィー行列を計算するための変換行列を計算し、この計算した変換行列と前記第2の画像データに対応する局所的ホモグラフィー行列とに基づいて前記第1の画像データに対応する局所的ホモグラフィー行列を計算する。
[7] In order to solve the above problem, a tracking robot control program according to an aspect of the present invention includes a robot body including a movable arm portion and a hand portion movably provided on the arm portion; The imaging unit outputs a computer provided with a reference image storage unit for storing the reference image data of the inspection target object for controlling the imaging unit provided to image the inspection target object and output the image data An image data acquisition unit that captures the image data, the first image data acquired by the image data acquisition unit, the reference image data stored in the reference image storage unit, and a past image than the first image data. Calculating a local homography matrix corresponding to the first image data based on the local homography matrix corresponding to the second image data being data; A local homography matrix acquisition unit that stores a local homography matrix corresponding to the calculated first image data; and a local homography matrix acquisition unit that calculates the local image corresponding to the first image data calculated by the local homography matrix acquisition unit An image data conversion unit that converts the first image data to generate converted image data using a homography matrix, and stores the converted image data generated by the image data conversion unit and the reference image storage unit. An image correlation analysis unit that analyzes the correlation of the image with the reference image data and calculates a similarity, the first image data captured by the image data acquisition unit, and the reference image storage unit Extracting feature points of an image from reference image data and calculating a relative position of these feature points; and a relative position of the feature points calculated by the feature point extraction unit And calculating a global homography matrix corresponding to the first image data, and storing a global homography matrix corresponding to the calculated first image data, and the image If the similarity calculated by the correlation analysis unit exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored, and If the similarity calculated by the image correlation analysis unit is equal to or less than the threshold value, the global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit is read and stored. From the homography matrix transfer unit and the homography matrix transfer unit, the local homography matrix corresponding to the first image data or Reads out a global homography matrix corresponding to the first image data as homography matrix data, calculates the posture of the robot body based on the read homography matrix data, and the arm of the robot body And a robot control unit that controls at least one of the operation of the hand unit.
[8] In the tracking robot control program according to [7], the image correlation analysis unit calculates a normalized cross-correlation as an image correlation between the converted image data and the reference image data, and calculates the similarity. Ask.
[9] In the tracking robot control program according to [8], the local homography matrix acquisition unit is configured to store the first image data, the reference image data, and the local homography matrix acquisition unit stored in the local homography matrix acquisition unit. A transformation matrix for calculating a local homography matrix corresponding to the first image data is calculated based on the local homography matrix corresponding to the second image data, and the calculated transformation matrix and the first A local homography matrix corresponding to the first image data is calculated based on a local homography matrix corresponding to the second image data.

[10]上記の課題を解決するため、本発明の一態様であるホモグラフィー行列取得装置は、参照画像データを記憶する参照画像記憶部と、画像データを取り込む画像データ取得部と、前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、を備えることを特徴とする。   [10] In order to solve the above-described problem, a homography matrix acquisition device according to an aspect of the present invention includes a reference image storage unit that stores reference image data, an image data acquisition unit that captures image data, and the image data. The first image data captured by the acquisition unit, the reference image data stored in the reference image storage unit, and the local homology corresponding to the second image data that is image data that is past the first image data. A local homography matrix acquisition unit for calculating a local homography matrix corresponding to the first image data based on the graphy matrix and storing the local homography matrix corresponding to the calculated first image data; , Using the local homography matrix corresponding to the first image data calculated by the local homography matrix acquisition unit, the first image data. An image data conversion unit that converts the image data to generate converted image data, and analyzes an image correlation between the converted image data generated by the image data conversion unit and the reference image data stored in the reference image storage unit An image correlation analysis unit for calculating a similarity, and extracting image feature points from the first image data captured by the image data acquisition unit and the reference image data stored in the reference image storage unit. A feature point extraction unit that calculates the relative positions of these feature points; and a global homography matrix corresponding to the first image data based on the relative positions of the feature points calculated by the feature point extraction unit; A global homography matrix acquisition unit that stores a global homography matrix corresponding to the calculated first image data, and the similarity calculated by the image correlation analysis unit exceeds a threshold value In this case, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored, and the similarity calculated by the image correlation analysis unit is the threshold value. A homography matrix transfer unit that reads and stores a global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit if And

[11]上記の課題を解決するため、本発明の一態様であるホモグラフィー行列取得方法は、画像データを取り込む画像データ取得ステップと、前記画像データ取得ステップにおいて取り込んだ第1の画像データと参照画像記憶部に記憶された参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得ステップと、前記局所的ホモグラフィー行列取得ステップにおいて計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換ステップと、前記画像データ変換ステップにおいて生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析ステップと、前記画像相関分析ステップにおいて計算した前記類似度が閾値を超える場合に、前記局所的ホモグラフィー行列取得ステップにおいて記憶した前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶部に記憶し、前記画像相関分析ステップにおいて計算した前記類似度が前記閾値以下である場合に、前記第1の画像データと前記参照画像記憶部に記憶された参照画像データとの画像の特徴点の相対位置に基づいて計算されて記憶された第1の画像データに対応する大域的ホモグラフィー行列を読み込んで前記記憶部に記憶するホモグラフィー行列転送ステップと、を有することを特徴とする。   [11] In order to solve the above-described problem, a homography matrix acquisition method according to an aspect of the present invention includes an image data acquisition step of acquiring image data, and first image data acquired in the image data acquisition step and a reference Corresponding to the first image data based on the reference image data stored in the image storage unit and the local homography matrix corresponding to the second image data which is the past image data than the first image data. Calculating a local homography matrix, storing a local homography matrix corresponding to the calculated first image data, and storing the local homography matrix; and calculating the local homography matrix in the local homography matrix acquisition step. Transforming the first image data using a local homography matrix corresponding to one image data; The image data converting step for generating the converted image data, and analyzing the correlation of the image between the converted image data generated in the image data converting step and the reference image data stored in the reference image storage unit to determine the similarity An image correlation analysis step to calculate, and a local homography corresponding to the first image data stored in the local homography matrix acquisition step when the similarity calculated in the image correlation analysis step exceeds a threshold value A matrix is read and stored in a storage unit, and when the similarity calculated in the image correlation analysis step is equal to or less than the threshold value, the first image data and the reference image data stored in the reference image storage unit, Corresponding to the first image data calculated and stored based on the relative positions of the feature points of the image And having a homography matrix transfer step of storing in the storage unit reads the motor chromatography matrix, a.

[12]上記の課題を解決するため、本発明の一態様であるホモグラフィー行列取得プログラムは、参照画像データを記憶する参照画像記憶部を備えたコンピューターを、画像データを取り込む画像データ取得部と、前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、として機能させる。   [12] In order to solve the above-described problem, a homography matrix acquisition program according to an aspect of the present invention includes a computer including a reference image storage unit that stores reference image data, and an image data acquisition unit that captures image data. , Corresponding to the first image data captured by the image data acquisition unit, the reference image data stored in the reference image storage unit, and the second image data that is past image data than the first image data. And calculating a local homography matrix corresponding to the first image data based on the local homography matrix and storing the local homography matrix corresponding to the calculated first image data A local homography line corresponding to the first image data calculated by the matrix acquisition unit and the local homography matrix acquisition unit; And converting the first image data to generate converted image data, the converted image data generated by the image data conversion unit, and the reference stored in the reference image storage unit An image correlation analysis unit that calculates the degree of similarity by analyzing the correlation of the image with the image data, the first image data captured by the image data acquisition unit, and the reference image data stored in the reference image storage unit A feature point extracting unit that extracts feature points of the image and calculating relative positions of the feature points, and corresponds to the first image data based on the relative positions of the feature points calculated by the feature point extracting unit. A global homography matrix acquisition unit that calculates a global homography matrix and stores a global homography matrix corresponding to the calculated first image data, and the image correlation analysis unit calculates When the similarity exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored, and the image correlation analysis unit When the calculated similarity is equal to or less than the threshold value, a homography matrix transfer that reads and stores a global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit Function as part.

ここで、第1の画像データは現在のフレーム画像データであり、第2の画像データは第1の画像データよりも1フレーム前に該当するフレーム画像データである。なお、第2の画像データは第1の画像データよりも2フレーム以上前に該当するフレーム画像データであってもよい。
局所的ホモグラフィー行列は、並進が少なく且つ回転が小さい場合に有効なホモグラフィー行列である。また、大域的ホモグラフィー行列は、並進が多いかまたは回転が大きい場合、または並進が多く回転も大きい場合に用いられるロバストなホモグラフィー行列である。
第1の画像データに対応する局所的ホモグラフィー行列と第1の画像データに対応する大域的ホモグラフィー行列とのいずれのホモグラフィー行列を最終段に記憶するかは、第1の画像データをホモグラフィー行列変換した変換画像と参照画像との類似度に応じて決定する。つまり、変換画像と参照画像との画像相関が高い場合は第1の画像データに対応する局所的ホモグラフィー行列を最終段に記憶し、変換画像と参照画像との画像相関が低い場合は第1の画像データに対応する大域的ホモグラフィー行列を最終段に記憶する。
Here, the first image data is current frame image data, and the second image data is frame image data corresponding to one frame before the first image data. Note that the second image data may be frame image data corresponding to two or more frames before the first image data.
The local homography matrix is a homography matrix effective when the translation is small and the rotation is small. The global homography matrix is a robust homography matrix used when there is a lot of translation or a large rotation, or when there is a lot of translation and a large rotation.
Whether the homography matrix of the local homography matrix corresponding to the first image data or the global homography matrix corresponding to the first image data is stored in the final stage depends on whether the first image data is homologous. It is determined according to the similarity between the converted image obtained by the graphy matrix conversion and the reference image. That is, when the image correlation between the converted image and the reference image is high, a local homography matrix corresponding to the first image data is stored in the last stage, and when the image correlation between the converted image and the reference image is low, the first The global homography matrix corresponding to the image data is stored in the last stage.

一般的に、変換行列を計算してホモグラフィー行列を求める処理は、画像の特徴点を抽出して特徴点の相対位置を計算しこれら特徴点の相対位置によってホモグラフィー行列を求める処理よりもトラッキングの安定性(精度)が低い一方、処理負荷が大幅に軽い。また、変換行列の計算精度は、変換行列を計算するための空間領域が狭い(並進が少なく且つ回転が小さい)ほど高い。
よって、変換行列を計算しホモグラフィー行列を求めて記憶する処理を、変換画像と参照画像との画像相関が高い場合に限ることにより、トラッキングの高い安定性(高い精度)を確保することができる。
In general, the process of calculating the transformation matrix and obtaining the homography matrix is more tracking than the process of extracting the feature points of the image, calculating the relative positions of the feature points, and calculating the homography matrix based on the relative positions of these feature points. While the stability (accuracy) is low, the processing load is significantly lighter. In addition, the calculation accuracy of the transformation matrix is higher as the spatial region for calculating the transformation matrix is narrower (less translation and less rotation).
Therefore, high stability (high accuracy) of tracking can be ensured by limiting the process of calculating the transformation matrix and obtaining and storing the homography matrix only when the image correlation between the transformed image and the reference image is high. .

したがって、本発明の一態様である追跡ロボット装置、追跡ロボット制御方法、追跡ロボット制御プログラム、ホモグラフィー行列取得装置、ホモグラフィー行列取得方法、およびホモグラフィー行列取得プログラムでは、変換画像と参照画像との画像相関が高い場合は、比較的処理負荷の軽い計算処理による局所的ホモグラフィー行列を最終段に記憶し、変換画と参照画像との画像相関が低い場合は、比較的処理負荷の重い大域的ホモグラフィー行列を最終段に記憶するようにした。   Therefore, in the tracking robot device, the tracking robot control method, the tracking robot control program, the homography matrix acquisition device, the homography matrix acquisition method, and the homography matrix acquisition program that are one embodiment of the present invention, When the image correlation is high, the local homography matrix by the calculation processing with a relatively low processing load is stored in the final stage. When the image correlation between the converted image and the reference image is low, the global processing load is relatively heavy. The homography matrix was stored in the last stage.

このように構成したことにより、処理負荷が軽く且つ安定性の高いトラッキングを行うことができる。言い換えると、リアルタイム性を確保し且つ精度の高いトラッキングを行うことができる。これは、例えば、追跡ロボット装置において、検査対象物体の外観検査時間を短くするためにロボット本体の移動速度を速くした場合でも、トラッキングの誤認識が発生せず信頼性の高い外観検査を行うことができる。   With this configuration, tracking with a light processing load and high stability can be performed. In other words, real-time performance can be ensured and highly accurate tracking can be performed. This is because, for example, in a tracking robot apparatus, even if the moving speed of the robot body is increased in order to shorten the appearance inspection time of the object to be inspected, a reliable appearance inspection is performed without causing misrecognition of tracking. Can do.

本発明の一実施形態において、外観検査装置に含まれる検査ロボット装置の概略の外観図である。In one Embodiment of this invention, it is an outline external view of the inspection robot apparatus contained in an external appearance inspection apparatus. 外観検査装置の概略の機能構成を表すブロック図である。It is a block diagram showing the schematic function structure of an external appearance inspection apparatus. ホモグラフィー行列取得装置の機能構成を表すブロック図である。It is a block diagram showing the function structure of a homography matrix acquisition apparatus. ホモグラフィー行列取得装置の、局所的ホモグラフィー行列の計算処理を含む処理の手順を表すフローチャートである。It is a flowchart showing the procedure of the process including the calculation process of a local homography matrix of a homography matrix acquisition apparatus. ホモグラフィー行列取得装置の、大域的ホモグラフィー行列の計算処理の手順を表すフローチャートである。It is a flowchart showing the procedure of the calculation process of the global homography matrix of a homography matrix acquisition apparatus. ロボット制御装置の処理手順を表すフローチャートである。It is a flowchart showing the process sequence of a robot control apparatus. 本発明の一実施形態の第1変形例であるビデオカメラ装置の概略の機能構成を表すブロック図である。It is a block diagram showing the schematic function structure of the video camera apparatus which is the 1st modification of one Embodiment of this invention. 本発明の一実施形態の第2変形例であるビデオカメラ装置の概略の機能構成を表すブロック図であるIt is a block diagram showing the schematic function structure of the video camera apparatus which is the 2nd modification of one Embodiment of this invention.

以下、本発明を実施するための形態について、図面を参照して詳細に説明する。
まず、本発明の一実施形態において用いられるホモグラフィー行列について説明する。三次元空間における撮像装置の座標系をFとし、この撮像装置が任意の点Aを撮像して得る画像における点Aの像をp(ボールド体)=[u 1]とする。なお、“(ボールド体)”との記載は、その記載の直前の文字がボールド体であることを表し、その文字がベクトルまたは行列であることを示す。前記の撮像装置を移動し、その移動先における撮像装置の座標系をFとし、この撮像装置が前記の点Aを撮像して得る画像における点Aの像をp(ボールド体)=[u v 1]とする。また、FとFとの相対距離を表す並進ベクトルをt(ボールド体)とし、姿勢変化を表す回転ベクトルをR(ボールド体)とする。
Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the drawings.
First, the homography matrix used in one embodiment of the present invention will be described. The coordinate system of the imaging device in the three-dimensional space is F *, and the image of the point A in the image obtained by imaging the arbitrary point A by this imaging device is p (bold body) * = [u * v * 1] T To do. The description “(bold)” indicates that the character immediately before the description is bold, and that the character is a vector or a matrix. An image of the point A in an image obtained by moving the image pickup device and imaging the point A by the image pickup device at the movement destination is F (bold body) = [u v 1] T. Also, a translation vector representing the relative distance between F * and F is t (bold body), and a rotation vector representing the posture change is R (bold body).

点Aが平面π上に存在するとき、点p(ボールド体)と点p(ボールド体)との関係を表す式として下記の式(1)が成立する場合を考える。ただし、sは、点Aと2つの座標系FとFとの距離の割合で決まる値である。G(ボールド体)は、ホモグラフィー行列である。 Consider a case where the following expression (1) is established as an expression representing the relationship between the point p (bold body) * and the point p (bold body) when the point A exists on the plane π. However, s is a value determined by the ratio of the distance between the point A and the two coordinate systems F * and F. G (bold) is a homography matrix.

Figure 2012086285
Figure 2012086285

ホモグラフィー行列G(ボールド体)は、3行3列の行列であり、下記の式(2)のように表される。   The homography matrix G (bold body) is a matrix of 3 rows and 3 columns, and is represented by the following formula (2).

Figure 2012086285
Figure 2012086285

また、ホモグラフィー行列G(ボールド体)は、下記の式(3)のように表すことができる。ただし、dは、撮像装置と平面πとの間の距離、n(ボールド体)は、平面πの法線ベクトルである。   In addition, the homography matrix G (bold body) can be expressed as the following equation (3). Here, d is a distance between the imaging device and the plane π, and n (bold body) is a normal vector of the plane π.

Figure 2012086285
Figure 2012086285

ホモグラフィー行列G(ボールド体)を推定することができれば、並進ベクトルt(ボールド体)、回転ベクトルR(ボールド体)、平面πの法線ベクトルn(ボールド体)、および撮像装置と平面πとの間の距離dを計算することができる。   If the homography matrix G (bold body) can be estimated, the translation vector t (bold body), the rotation vector R (bold body), the normal vector n (bold body) of the plane π, and the imaging device and the plane π The distance d between can be calculated.

平面π上に存在する全ての点における、各点の撮像画像への投影点の座標の組を、式(1)を用いて表すと以下のようになる。まず、値sを下記の式(4)のように定義する。   A set of coordinates of projection points on the captured image of each point at all points existing on the plane π is expressed as follows using Expression (1). First, the value s is defined as the following formula (4).

Figure 2012086285
Figure 2012086285

式(1)および式(4)により、下記の式(5)が成立する。ただし、w(ボールド体)は、ホモグラフィー行列G(ボールド体)の関数であり、透視投影変換行列である。この透視投影変換行列を用いて点p(ボールド体)を対応する点p(ボールド体)に変換することを、透視投影変換と呼ぶ。 The following equation (5) is established by the equations (1) and (4). However, w (bold body) is a function of the homography matrix G (bold body) and is a perspective projection transformation matrix. Converting the point p (bold body) * to the corresponding point p (bold body) using this perspective projection transformation matrix is called perspective projection transformation.

Figure 2012086285
Figure 2012086285

式(5)によれば、平面π上に存在する点については、その平面πのホモグラフィー行列が既知であれば、一方の撮像画像上の点に対して他方の撮像画像上の対応する点を一意に求めることができる。
したがって、ホモグラフィー行列を求めることにより、元画像に対して、注目画像がどれだけ並進し、またどれだけ回転しているかを求める、言い換えると、注目領域のトラッキングを行うことができる。
According to Equation (5), for a point existing on the plane π, if the homography matrix of the plane π is known, a point on the other captured image corresponds to a point on the other captured image. Can be obtained uniquely.
Therefore, by obtaining the homography matrix, it is possible to obtain how much the image of interest is translated and how much is rotated with respect to the original image, in other words, the region of interest can be tracked.

次に、本実施形態であるホモグラフィー行列取得装置を適用した追跡ロボット装置を含む外観検査装置について説明する。
図1は、本実施形態において、外観検査装置に含まれる検査ロボット装置の概略の外観図である。同図に示すように、検査ロボット装置10は、ロボット本体12に撮像装置11が取り付けられて構成される。
ロボット本体12は、地面に固定された支持台12aと、旋回および屈伸動作が可能なアーム部12bと、回転および首振り動作が可能なハンド部12cとを含んで構成される。ロボット本体12は、支持台12aとアーム部12bとハンド部12cとの組み合わせによって6軸の自由度を有し、撮像部11の位置および向きを自在に変更することができる。
なお、ロボット本体12の自由度は6軸に限られない。また、支持台12aは、壁や天井等、地面に対して固定された場所に設置してもよい。
Next, an appearance inspection apparatus including a tracking robot apparatus to which the homography matrix acquisition apparatus according to this embodiment is applied will be described.
FIG. 1 is a schematic external view of an inspection robot apparatus included in the external appearance inspection apparatus in the present embodiment. As shown in the figure, the inspection robot device 10 is configured by attaching an imaging device 11 to a robot body 12.
The robot body 12 includes a support base 12a fixed to the ground, an arm portion 12b capable of turning and bending, and a hand portion 12c capable of rotating and swinging. The robot body 12 has six axes of freedom by a combination of the support base 12a, the arm part 12b, and the hand part 12c, and can freely change the position and orientation of the imaging part 11.
The degree of freedom of the robot body 12 is not limited to six axes. Moreover, you may install the support stand 12a in the place fixed with respect to the grounds, such as a wall and a ceiling.

図2は、外観検査装置の概略の機能構成を表すブロック図である。同図に示すように、外観検査装置1は、検査ロボット装置10と、画像解析装置20と、ホモグラフィー行列取得装置30と、ロボット制御装置45とを備える。
検査ロボット装置10は、図1にも示したように、撮像装置11とロボット本体12とを備える。撮像装置11は、検査対象物体を撮像してその画像データを出力する。撮像装置11は、例えば120フレーム/秒(fps;frame per second)のフレームレートで画像データを出力するビデオカメラ装置である。ロボット本体12は、上述したように、取り付けた撮像装置11を自由空間中で自在に移動させるためのロボット(マニピュレーター)である。
FIG. 2 is a block diagram illustrating a schematic functional configuration of the appearance inspection apparatus. As shown in the figure, the appearance inspection apparatus 1 includes an inspection robot apparatus 10, an image analysis apparatus 20, a homography matrix acquisition apparatus 30, and a robot control apparatus 45.
As shown in FIG. 1, the inspection robot device 10 includes an imaging device 11 and a robot body 12. The imaging device 11 images an inspection target object and outputs the image data. The imaging device 11 is a video camera device that outputs image data at a frame rate of 120 frames / second (fps; frame per second), for example. As described above, the robot body 12 is a robot (manipulator) for freely moving the attached imaging device 11 in free space.

画像解析装置20は、検査ロボット装置10の撮像装置11が連続して出力する画像データを順次取り込む。そして、画像解析装置20は、取り込んだ画像データごとに、その画像に含まれる検査対象物体の外観の画像と、あらかじめ記憶したテンプレート画像データのテンプレート画像との比較を行って、検査対象物体の形状の不良等に関する検査結果データを出力する。テンプレート画像は、検査対象物体のリファレンス(例えば、検査対象物体の良品サンプル)を所望の方向から撮像して得られる画像である。   The image analysis device 20 sequentially captures image data continuously output by the imaging device 11 of the inspection robot device 10. Then, the image analysis device 20 compares the appearance image of the inspection target object included in the image with the template image of the template image data stored in advance for each of the captured image data, and determines the shape of the inspection target object. The inspection result data relating to the defect of the product is output. The template image is an image obtained by imaging a reference of an inspection target object (for example, a non-defective sample of the inspection target object) from a desired direction.

ホモグラフィー行列取得装置30は、撮像装置11が連続して出力する画像データを順次取り込む。そして、ホモグラフィー行列取得装置30は、取り込んだ画像データごとに局所的ホモグラフィー行列を計算する。また、ホモグラフィー行列取得装置30は、局所的ホモグラフィー行列を計算するレートよりも低いレートで、大域的ホモグラフィー行列を計算する。   The homography matrix acquisition device 30 sequentially captures image data output continuously by the imaging device 11. Then, the homography matrix acquisition device 30 calculates a local homography matrix for each captured image data. The homography matrix acquisition device 30 calculates the global homography matrix at a rate lower than the rate at which the local homography matrix is calculated.

局所的ホモグラフィー行列の局所的とは、この局所的ホモグラフィー行列を計算するために必要な空間領域が比較的狭いことを意味する。つまり、局所的ホモグラフィー行列は、並進が少なく且つ回転が小さい場合に有効なホモグラフィー行列である。画像データの注目領域と局所的ホモグラフィー行列とに基づいてトラッキングする場合、高い精度のトラッキングを行うことができる。
また、大域的ホモグラフィー行列の大域的とは、この大域的ホモグラフィー行列を計算するために必要な空間領域が比較的広いことを意味する。つまり、大域的ホモグラフィー行列は、並進が多いかまたは回転が大きい場合、または並進が多く回転も大きい場合に用いられるロバストなホモグラフィー行列である。
The locality of the local homography matrix means that a spatial region necessary for calculating the local homography matrix is relatively narrow. That is, the local homography matrix is a homography matrix effective when the translation is small and the rotation is small. When tracking is performed based on a region of interest of image data and a local homography matrix, high-accuracy tracking can be performed.
In addition, the global of the global homography matrix means that a spatial area necessary for calculating the global homography matrix is relatively wide. That is, the global homography matrix is a robust homography matrix that is used when there is a lot of translation or a large rotation, or when there is a lot of translation and a large rotation.

ホモグラフィー行列取得装置30は、撮像装置11から画像データを取り込むごとに、局所的ホモグラフィー行列を計算する。そして、ホモグラフィー行列取得装置30は、その計算した局所的ホモグラフィー行列を用いて画像データを変換し、この変換した画像データの画像(変換画像)と参照画像との相関を求める。そして、相関が高い場合は、当該画像データに対応して計算した局所的ホモグラフィー行列が読み出されるように制御する一方、相関が低い場合は、当該画像データに対応して計算した局所的ホモグラフィー行列の読み出しを禁止し、最新の大域的ホモグラフィー行列が読み出されるように制御する。ホモグラフィー行列取得装置30は、このようにして計算した局所的ホモグラフィー行列または大域的ホモグラフィー行列をホモグラフィー行列データとして出力可能に記憶する。   The homography matrix acquisition device 30 calculates a local homography matrix each time image data is captured from the imaging device 11. Then, the homography matrix acquisition device 30 converts the image data using the calculated local homography matrix, and obtains the correlation between the image of the converted image data (converted image) and the reference image. If the correlation is high, control is performed so that the local homography matrix calculated corresponding to the image data is read out. On the other hand, if the correlation is low, the local homography calculated corresponding to the image data is controlled. The matrix reading is prohibited, and the latest global homography matrix is controlled to be read. The homography matrix acquisition device 30 stores the local homography matrix or the global homography matrix calculated in this way so as to be output as homography matrix data.

ロボット制御装置45は、ホモグラフィー行列取得装置30からホモグラフィー行列データを取り込み、そのホモグラフィー行列データに基づいて、ロボット本体12の姿勢を制御する。   The robot control device 45 takes in the homography matrix data from the homography matrix acquisition device 30 and controls the posture of the robot body 12 based on the homography matrix data.

外観検査装置1において、追跡ロボット装置は、検査ロボット装置10とホモグラフィー行列取得装置30とロボット制御装置45とを含むものである。   In the appearance inspection apparatus 1, the tracking robot apparatus includes an inspection robot apparatus 10, a homography matrix acquisition apparatus 30, and a robot control apparatus 45.

図3は、ホモグラフィー行列取得装置30の機能構成を表すブロック図である。同図に示すように、ホモグラフィー行列取得装置30は、画像データ取得部31と、画像相関分析部32と、画像データ変換部33と、局所的ホモグラフィー行列計算部34と、局所的ホモグラフィー行列記憶部35と、ホモグラフィー行列転送部36と、大域的ホモグラフィー行列記憶部37と、参照画像記憶部38と、特徴点抽出部39と、大域的ホモグラフィー行列計算部40とを備える。   FIG. 3 is a block diagram illustrating a functional configuration of the homography matrix acquisition device 30. As shown in the figure, the homography matrix acquisition device 30 includes an image data acquisition unit 31, an image correlation analysis unit 32, an image data conversion unit 33, a local homography matrix calculation unit 34, and a local homography. A matrix storage unit 35, a homography matrix transfer unit 36, a global homography matrix storage unit 37, a reference image storage unit 38, a feature point extraction unit 39, and a global homography matrix calculation unit 40 are provided.

参照画像記憶部38は、検査対象物体のリファレンス(例えば、検査対象物体の良品サンプル)を所望の方向から撮像して得られる参照画像データを記憶する。参照画像記憶部38は、例えばメモリーで実現される。   The reference image storage unit 38 stores reference image data obtained by imaging a reference of an inspection target object (for example, a non-defective sample of the inspection target object) from a desired direction. The reference image storage unit 38 is realized by a memory, for example.

画像データ取得部31は、検査ロボット装置10の撮像装置11が連続して出力する画像データを順次取り込む。画像データ取得部31は、撮像装置11から画像データ(現在の画像データ;第1の画像データ)を取り込むごとに、この現在の画像データを局所的ホモグラフィー行列計算部34および画像データ変換部33に供給する。また、画像データ取得部31は、局所的ホモグラフィー行列計算部34および画像データ変換部33に供給するレートよりも低いレートで、撮像装置11から取り込んだ画像データ(現在の画像データ)を特徴点抽出部39に供給する。
例えば、撮像装置11が120フレーム/秒のフレームレートで画像データを出力する場合、画像データ取得部31は、そのフレームレートで画像データを順次取り込んで局所的ホモグラフィー行列計算部34および画像データ変換部33に供給する。また、画像データ取得部31は、局所的ホモグラフィー行列計算部34および画像データ変換部33に供給するレートよりも低いレート(例えば、20フレーム/秒または30フレーム/秒)で、撮像装置11から取り込んだ画像データを特徴点抽出部39に供給する。
The image data acquisition unit 31 sequentially captures image data output continuously by the imaging device 11 of the inspection robot device 10. Each time the image data acquisition unit 31 fetches image data (current image data; first image data) from the imaging device 11, the current image data is converted into a local homography matrix calculation unit 34 and an image data conversion unit 33. To supply. Further, the image data acquisition unit 31 uses the image data (current image data) captured from the imaging device 11 at a rate lower than the rate supplied to the local homography matrix calculation unit 34 and the image data conversion unit 33 as a feature point. It supplies to the extraction part 39.
For example, when the imaging apparatus 11 outputs image data at a frame rate of 120 frames / second, the image data acquisition unit 31 sequentially captures image data at the frame rate, and performs local homography matrix calculation unit 34 and image data conversion. To the unit 33. In addition, the image data acquisition unit 31 receives from the imaging device 11 at a rate (for example, 20 frames / second or 30 frames / second) lower than the rate supplied to the local homography matrix calculation unit 34 and the image data conversion unit 33. The captured image data is supplied to the feature point extraction unit 39.

画像データ取得部31は、局所的ホモグラフィー行列計算部34と画像データ変換部33と画像相関分析部32とが実行する処理の時間よりも長い時間の間隔に対応するレートで、現在の画像データを局所的ホモグラフィー行列計算部34および画像データ変換部33に供給する。
また、画像データ取得部31は、特徴点抽出部39と大域的ホモグラフィー行列計算部40とが大域的ホモグラフィー行列を計算することのできる時間よりも長い時間の間隔に対応するレートで、現在の画像データを特徴点抽出部39に供給する。
The image data acquisition unit 31 is configured to display the current image data at a rate corresponding to a time interval longer than the processing time executed by the local homography matrix calculation unit 34, the image data conversion unit 33, and the image correlation analysis unit 32. Is supplied to the local homography matrix calculator 34 and the image data converter 33.
Further, the image data acquisition unit 31 has a rate corresponding to an interval of time longer than the time during which the feature point extraction unit 39 and the global homography matrix calculation unit 40 can calculate the global homography matrix. Is supplied to the feature point extraction unit 39.

画像データ変換部33は、局所的ホモグラフィー行列計算部34から供給される現在の画像データに対応する局所的ホモグラフィー行列と、画像データ取得部31から供給される現在の画像データとを取り込む。画像データ変換部33は、取り込んだ現在の画像データに対応する局所的ホモグラフィー行列を用いて現在の画像データを変換して変換画像データを生成し、この変換画像データを画像相関分析部32に供給する。   The image data conversion unit 33 takes in the local homography matrix corresponding to the current image data supplied from the local homography matrix calculation unit 34 and the current image data supplied from the image data acquisition unit 31. The image data conversion unit 33 converts the current image data using the local homography matrix corresponding to the captured current image data to generate converted image data, and sends the converted image data to the image correlation analysis unit 32. Supply.

画像相関分析部32は、画像データ変換部33から供給される変換画像データと、参照画像記憶部38から読み出す参照画像データとを取り込む。画像相関分析部32は、変換画像データの画像(変換画像)と参照画像データの画像(参照画像)との画像相関を計算(分析)して、変換画像と参照画像との類似度を求める。画像相関分析部32は、画像相関の計算方法として、例えば正規化相互相関(Normalized Cross−Correlation)を適用して類似度を求める。
正規化相互相関によって類似度を計算する式は、例えば、下記の式(6)により表される。ただし、RNCCは類似度、T(i,j)は参照画像の輝度値、I(i,j)は変換画像の輝度値である。
The image correlation analysis unit 32 takes in the converted image data supplied from the image data conversion unit 33 and the reference image data read from the reference image storage unit 38. The image correlation analysis unit 32 calculates (analyzes) the image correlation between the image of the converted image data (converted image) and the image of the reference image data (reference image), and obtains the similarity between the converted image and the reference image. The image correlation analysis unit 32 obtains the similarity by applying, for example, normalized cross-correlation as a method of calculating the image correlation.
A formula for calculating the similarity by the normalized cross-correlation is expressed by, for example, the following formula (6). Here, RNCC is the similarity, T (i, j) is the luminance value of the reference image, and I (i, j) is the luminance value of the converted image.

Figure 2012086285
Figure 2012086285

本実施形態において適用する式(6)によれば、類似度RNCCは、0以上1以下の範囲内の値であり、画像の相関が高いほど1に近い値となる。類似度RNCCが1である場合は、変換画像と参照画像とは一致していることとなる。 According to Expression (6) applied in the present embodiment, the similarity RNCC is a value within a range of 0 or more and 1 or less, and becomes a value closer to 1 as the correlation between images is higher. When the similarity RNCC is 1, the converted image and the reference image match.

なお、画像相関分析部32は、正規化相互相関以外にも、SSD(Sum of Squared Difference)やSAD(Sum of Absolute Difference)等の計算によって類似度を求めてもよい。   In addition to the normalized cross-correlation, the image correlation analysis unit 32 may obtain the similarity by calculation such as SSD (Sum of Squared Difference) or SAD (Sum of Absolute Difference).

画像相関分析部32は、計算した類似度に応じて局所的ホモグラフィー行列の転送制御と、大域的ホモグラフィー行列の転送制御とを切り替える。具体的には、画像相関分析部32は、例えば正規化相互相関を計算して得た類似度RNCCと、あらかじめ記憶した閾値とを比較し、類似度RNCCが閾値よりも大きいと判定した場合は、局所的ホモグラフィー行列の転送制御指示をホモグラフィー行列転送部36に供給する。一方、画像相関分析部32は、類似度RNCCが閾値以下であると判定した場合は、局所的ホモグラフィー行列計算部34が計算した変換行列の精度が比較的低いと判断し、大域的ホモグラフィー行列の転送制御指示をホモグラフィー行列転送部36に供給する。 The image correlation analysis unit 32 switches between local homography matrix transfer control and global homography matrix transfer control according to the calculated similarity. Specifically, the image correlation analysis unit 32 compares, for example, the similarity RNCC obtained by calculating the normalized cross-correlation with a threshold stored in advance, and determines that the similarity RNCC is larger than the threshold. In this case, a local homography matrix transfer control instruction is supplied to the homography matrix transfer unit 36. On the other hand, if the image correlation analysis unit 32 determines that the similarity RNCC is less than or equal to the threshold value, the image correlation analysis unit 32 determines that the accuracy of the transformation matrix calculated by the local homography matrix calculation unit 34 is relatively low, and the global homology. A graphy matrix transfer control instruction is supplied to the homography matrix transfer unit 36.

画像相関分析部32が正規化相互相関を計算する場合、画像相関分析部32は、例えば、類似度RNCCが取り得る値の範囲(0≦RNCC≦1)の中間値である0.5を、閾値として記憶する。ただし、閾値の最適値は、検査対象物体の画質や画像データ取得部31が取り込む画像データのフレームレート等によって変わることがある。よって、画像相関分析部32は、例えば実験的に試行して決定した閾値を記憶する。 When the image correlation analysis unit 32 calculates the normalized cross-correlation, the image correlation analysis unit 32 is, for example, an intermediate value of a range of values that the similarity RNCC can take (0 ≦ R NCC ≦ 1). Is stored as a threshold value. However, the optimum value of the threshold value may vary depending on the image quality of the inspection target object, the frame rate of the image data captured by the image data acquisition unit 31, and the like. Therefore, the image correlation analysis unit 32 stores a threshold value determined through experimental trials, for example.

なお、画像相関分析部32は、画像データの画像全体を用いて画像相関を計算するのではなく、任意の注目領域のみを用いて画像相関を計算してもよい。例えば、画像データの画像の中央付近に任意の大きさの矩形領域を設定し、その矩形領域を画像相関の計算対象領域とする。このように画像相関の計算対象領域を絞ることにより、処理の負荷を軽減することができる。   Note that the image correlation analysis unit 32 may calculate the image correlation using only an arbitrary region of interest instead of calculating the image correlation using the entire image of the image data. For example, a rectangular area having an arbitrary size is set near the center of the image of the image data, and the rectangular area is set as a calculation target area for image correlation. In this way, the processing load can be reduced by narrowing the calculation target area of the image correlation.

局所的ホモグラフィー行列計算部34は、画像データ取得部31から供給される現在の画像データを取り込むと、参照画像記憶部38から参照画像データを読み込むとともに、ホモグラフィー行列転送部36から過去の画像データ(第2の画像データ)に対応する局所的ホモグラフィー行列を取り込む。そして、局所的ホモグラフィー行列計算部34は、過去の画像データに対応する局所的ホモグラフィー行列に基づいて現在の画像データに対応する局所的ホモグラフィー行列を求めるための変換行列を計算する。   When the local homography matrix calculation unit 34 fetches the current image data supplied from the image data acquisition unit 31, the local homography matrix calculation unit 34 reads the reference image data from the reference image storage unit 38 and also stores the past image from the homography matrix transfer unit 36. A local homography matrix corresponding to the data (second image data) is captured. Then, the local homography matrix calculation unit 34 calculates a transformation matrix for obtaining a local homography matrix corresponding to the current image data based on the local homography matrix corresponding to the past image data.

ここで、局所的ホモグラフィー行列計算部34が実行する変換行列の計算の例について以下説明する。
参照画像データの画素数をqとし、参照画像データのi番目の画素をp(ボールド体) とし、画素P(ボールド体) の輝度をI(p(ボールド体) )とする。
Here, an example of conversion matrix calculation executed by the local homography matrix calculation unit 34 will be described below.
The number of pixels of the reference image data is q, the i-th pixel of the reference image data is p (bold body) * i, and the luminance of the pixel P (bold body) * i is I * (p (bold body) * i ). And

局所的ホモグラフィー行列を想定するため、現在の画像データにおける画像の領域は、過去の画像データにおける画像の領域の近傍に存在すると仮定できる。よって、現在の画像データにおける画像の領域と、過去の画像データにおける画像の領域との光量の変化は少ないと仮定でき、下記の式(7)の近似式を用いることができる。ただし、G(ボールド体)(オーバーバー)は、現在の画像データに対応する局所的ホモグラフィー行列であり、G(ボールド体)(ハット)は、過去の画像データに対応する局所的ホモグラフィー行列であり、G(ボールド体)(x(ボールド体))は、変換行列である。   Since a local homography matrix is assumed, it can be assumed that the region of the image in the current image data exists in the vicinity of the region of the image in the past image data. Therefore, it can be assumed that there is little change in the amount of light between the image area in the current image data and the image area in the past image data, and an approximate expression of the following equation (7) can be used. Where G (bold) (overbar) is a local homography matrix corresponding to the current image data, and G (bold) (hat) is a local homography matrix corresponding to past image data. G (bold body) (x (bold body)) is a transformation matrix.

Figure 2012086285
Figure 2012086285

変換行列G(ボールド体)(x(ボールド体))におけるx(ボールド体)は、変換行列G(ボールド体)(x(ボールド体))のパラメータであり、下記の式(8)のように表される。   X (bold body) in the transformation matrix G (bold body) (x (bold body)) is a parameter of the transformation matrix G (bold body) (x (bold body)), and is expressed by the following equation (8). expressed.

Figure 2012086285
Figure 2012086285

変換行列G(ボールド体)(x(ボールド体))はリー群に属し、単位行列I(ボールド体)の近傍に存在する。ここで、行列A(ボールド体)から行列A(ボールド体)までを下記の式(9)のとおりとする。 The transformation matrix G (bold field) (x (bold field)) belongs to the Lie group and exists in the vicinity of the unit matrix I (bold field). Here, the matrix A (bold body) 1 to the matrix A (bold body) 8 are represented by the following equation (9).

Figure 2012086285
Figure 2012086285

式(9)における行列A(ボールド体)から行列A(ボールド体)までは、リー代数の基底である。これら行列A(ボールド体)から行列A(ボールド体)までを用いて、リー代数に属する零行列の近傍に存在する行列A(ボールド体)(x(ボールド体))を下記の式(10)のように表す。 The matrix A (bold field) 1 to the matrix A (bold field) 8 in Equation (9) is the basis of the Lie algebra. Using these matrix A (bold field) 1 to matrix A (bold field) 8 , the matrix A (bold field) (x (bold field)) existing in the vicinity of the zero matrix belonging to the Lie algebra is expressed by the following formula ( 10).

Figure 2012086285
Figure 2012086285

リー群に属する単位行列I(ボールド体)の近傍に存在する変換行列G(ボールド体)(x(ボールド体))と、リー代数に属する零行列の近傍に存在する行列A(ボールド体)(x(ボールド体))との関係は、指数関数を用いて下記の式(11)として表すことができる。   A transformation matrix G (bold field) (x (bold field)) existing in the vicinity of the unit matrix I (bold field) belonging to the Lie group, and a matrix A (bold field) existing in the vicinity of the zero matrix belonging to the Lie algebra ( x (bold body)) can be expressed as an expression (11) below using an exponential function.

Figure 2012086285
Figure 2012086285

現在の画像データに対応する局所的ホモグラフィー行列G(ボールド体)(オーバーバー)を用いて画素P(ボールド体) を透視投影変換する。すなわち、画素P(ボールド体) に対応する画素P(ボールド体)の輝度は、前記の式(5)および式(7)により、下記の式(12)のように表される。 Perspective projection transformation is performed on the pixel P (bold body) * i using the local homography matrix G (bold body) (overbar) corresponding to the current image data. That is, the luminance of the pixel P (bold) i corresponding to the pixel P (bold) * i is the above formula (5) and (7), is expressed by the following equation (12).

Figure 2012086285
Figure 2012086285

よって、対応する画素同士の輝度の差y(x(ボールド体))は、下記の式(13)のように表される。 Therefore, the luminance difference y i (x (bold body)) between corresponding pixels is expressed by the following equation (13).

Figure 2012086285
Figure 2012086285

過去および現在の画像データにおける全ての画素同士の輝度の差をまとめて、下記の式(14)のように表す。   The luminance differences between all the pixels in the past and current image data are collectively expressed as the following formula (14).

Figure 2012086285
Figure 2012086285

局所的ホモグラフィー行列計算部34は、式(14)において、x(ボールド体)=x(ボールド体)のときにy(ボールド体)(x(ボールド体))が下記の式(15)となるx(ボールド体)を計算する。局所的ホモグラフィー行列計算部34は、x(ボールド体)をフィードバックさせて繰り返し計算して収束させる。この収束方法として、例えば、公知のESM(Efficient Second−order Minimization Method)を適用できる。 The local homography matrix calculation unit 34 calculates y (bold body) (x (bold body)) in the following equation (15) when x (bold body) = x (bold body) 0 in equation (14). X (bold body) 0 is calculated. The local homography matrix calculator 34 feeds back x (bold field) 0 and repeatedly calculates and converges it. As this convergence method, for example, a known ESM (Efficient Second-order Minimization Method) can be applied.

Figure 2012086285
Figure 2012086285

局所的ホモグラフィー行列計算部34は、計算したx(ボールド体)を代入した変換行列G(ボールド体)(x(ボールド体))と、過去の画像データに対応する局所的ホモグラフィー行列とを用いて、式(7)を適用して現在の画像データに対応する局所的ホモグラフィー行列を計算する。そして、局所的ホモグラフィー行列計算部34は、この計算した現在の画像データに対応する局所的ホモグラフィー行列を、画像データ変換部33に供給するとともに局所的ホモグラフィー行列記憶部35に記憶させる。 The local homography matrix calculation unit 34 converts the transformation matrix G (bold body) (x (bold body) 0 ) into which the calculated x (bold body) 0 is substituted, and the local homography matrix corresponding to the past image data. Is used to calculate the local homography matrix corresponding to the current image data by applying equation (7). Then, the local homography matrix calculation unit 34 supplies the local homography matrix corresponding to the calculated current image data to the image data conversion unit 33 and stores it in the local homography matrix storage unit 35.

局所的ホモグラフィー行列記憶部35は、局所的ホモグラフィー行列計算部34から供給される現在の画像データに対応する局所的ホモグラフィー行列を記憶する。局所的ホモグラフィー行列記憶部35は、例えば書き込み可能なメモリーで実現される。   The local homography matrix storage unit 35 stores a local homography matrix corresponding to the current image data supplied from the local homography matrix calculation unit 34. The local homography matrix storage unit 35 is realized by a writable memory, for example.

特徴点抽出部39は、画像データ取得部31から供給される現在の画像データを取り込むとともに、参照画像記憶部38から参照画像データを読み込む。そして、特徴点抽出部39は、現在の画像データと参照画像データとから画像の特徴点を抽出し、現在画像と参照画像との特徴点の相対位置を計算する。特徴点抽出部39は、例えば、画像の画素の輝度の変化率が所定値を超える箇所を特徴点として抽出する。また、特徴点抽出部39は、複数の画素を含む小領域ごとに輝度のガウス分布の状態を調べ、SIFT(Scale−Invariant Feature Transform)特徴量を求めて特徴点を抽出してもよい。
特徴量抽出部39は、計算した相対位置の情報を大域的ホモグラフィー行列計算部40に供給する。
The feature point extraction unit 39 captures the current image data supplied from the image data acquisition unit 31 and also reads the reference image data from the reference image storage unit 38. Then, the feature point extraction unit 39 extracts the feature points of the image from the current image data and the reference image data, and calculates the relative positions of the feature points between the current image and the reference image. For example, the feature point extraction unit 39 extracts a point where the rate of change in luminance of the pixels of the image exceeds a predetermined value as a feature point. Further, the feature point extraction unit 39 may examine the state of the Gaussian distribution of luminance for each small region including a plurality of pixels, and may extract feature points by obtaining a SIFT (Scale-Invariant Feature Transform) feature amount.
The feature quantity extraction unit 39 supplies the calculated relative position information to the global homography matrix calculation unit 40.

大域的ホモグラフィー行列計算部40は、特徴点抽出部39から供給される、現在画像と参照画像との特徴点の相対位置の情報を取り込む。大域的ホモグラフィー行列計算部40は、これら現在画像と参照画像との特徴点の相対位置の情報に基づいて、現在の画像データに対応する大域的ホモグラフィー行列を計算し、この大域的ホモグラフィー行列を大域的ホモグラフィー行列記憶部37に記憶させる。   The global homography matrix calculation unit 40 takes in information on the relative positions of the feature points of the current image and the reference image supplied from the feature point extraction unit 39. The global homography matrix calculation unit 40 calculates a global homography matrix corresponding to the current image data based on the information on the relative positions of the feature points of the current image and the reference image, and the global homography. The matrix is stored in the global homography matrix storage unit 37.

大域的ホモグラフィー行列記憶部37は、大域的ホモグラフィー行列計算部40から供給される現在の画像データに対応する大域的ホモグラフィー行列を記憶する。大域的ホモグラフィー行列記憶部37は、例えば書き込み可能なメモリーで実現される。   The global homography matrix storage unit 37 stores a global homography matrix corresponding to the current image data supplied from the global homography matrix calculation unit 40. The global homography matrix storage unit 37 is realized by a writable memory, for example.

ホモグラフィー行列転送部36は、画像相関分析部32の切り替え制御に応じて、局所的ホモグラフィー行列記憶部35に記憶された現在の画像データに対応する局所的ホモグラフィー行列と、大域的ホモグラフィー行列記憶部37に記憶された最新の大域的ホモグラフィー行列とのいずれかを読み込んで、外部に出力可能に保持する。具体的には、ホモグラフィー行列転送部36は、画像相関分析部32から供給される、局所的ホモグラフィー行列の転送制御指示を取り込むと、局所的ホモグラフィー行列記憶部35に記憶された現在の画像データに対応する局所的ホモグラフィー行列を読み込む。また、ホモグラフィー行列転送部36は、大域的ホモグラフィー行列の転送制御指示を取り込むと、大域的ホモグラフィー行列記憶部37に記憶された、最新の大域的ホモグラフィー行列を読み込む。ホモグラフィー行列転送部36は、読み込んだ現在の画像データに対応する局所的ホモグラフィー行列または最新の大域的ホモグラフィー行列を、局所的ホモグラフィー行列データとして外部に出力可能に保持する。   The homography matrix transfer unit 36, according to the switching control of the image correlation analysis unit 32, a local homography matrix corresponding to the current image data stored in the local homography matrix storage unit 35, and a global homography. Any one of the latest global homography matrices stored in the matrix storage unit 37 is read and held so that it can be output to the outside. Specifically, when the homography matrix transfer unit 36 fetches the local homography matrix transfer control instruction supplied from the image correlation analysis unit 32, the current homology matrix storage unit 35 stores the current Read the local homography matrix corresponding to the image data. Further, when the homography matrix transfer unit 36 takes in the transfer control instruction of the global homography matrix, the homography matrix transfer unit 36 reads the latest global homography matrix stored in the global homography matrix storage unit 37. The homography matrix transfer unit 36 holds the local homography matrix corresponding to the read current image data or the latest global homography matrix so that it can be output to the outside as local homography matrix data.

ホモグラフィー行列取得装置30において、局所的ホモグラフィー行列計算部34と局所的ホモグラフィー行列記憶部35とは、局所的ホモグラフィー行列取得部である。また、大域的ホモグラフィー行列計算部40と大域的ホモグラフィー行列記憶部37とは、大域的ホモグラフィー行列取得部である。   In the homography matrix acquisition device 30, the local homography matrix calculation unit 34 and the local homography matrix storage unit 35 are local homography matrix acquisition units. The global homography matrix calculation unit 40 and the global homography matrix storage unit 37 are global homography matrix acquisition units.

次に、ホモグラフィー行列取得装置30の動作について説明する。
図4は、ホモグラフィー行列取得装置30の、局所的ホモグラフィー行列の計算処理を含む処理の手順を表すフローチャートである。また、図5は、ホモグラフィー行列取得装置30の、大域的ホモグラフィー行列の計算処理の手順を表すフローチャートである。本実施形態では、ホモグラフィー行列取得装置30は、図4のフローチャートに示される処理と、図5のフローチャートに示される処理とを、それぞれ独立したスレッドで並列に実行する。
Next, the operation of the homography matrix acquisition device 30 will be described.
FIG. 4 is a flowchart showing a procedure of processing including calculation processing of a local homography matrix of the homography matrix acquisition device 30. FIG. 5 is a flowchart showing the procedure of the global homography matrix calculation process of the homography matrix acquisition apparatus 30. In the present embodiment, the homography matrix acquisition device 30 executes the processing shown in the flowchart of FIG. 4 and the processing shown in the flowchart of FIG. 5 in parallel with independent threads.

まず、図4のフローチャートについて説明する。ステップS101において、画像データ取得部31は、検査ロボット装置10の撮像装置11が出力する画像データ(現在の画像データ;第1の画像データ)を取り込むと、この取り込んだ現在の画像データを局所的ホモグラフィー行列計算部34および画像データ変換部33に供給する。   First, the flowchart of FIG. 4 will be described. In step S101, when the image data acquisition unit 31 captures image data (current image data; first image data) output from the imaging device 11 of the inspection robot apparatus 10, the image data acquisition unit 31 locally captures the captured current image data. This is supplied to the homography matrix calculator 34 and the image data converter 33.

次に、ステップS102において、局所的ホモグラフィー行列計算部34は、画像データ取得部31から供給される現在の画像データを取り込むと、参照画像記憶部38から参照画像データを読み込むとともに、ホモグラフィー行列転送部36から過去の画像データ(第2の画像データ)に対応する局所的ホモグラフィー行列を取り込む。   Next, in step S102, when the local homography matrix calculation unit 34 fetches the current image data supplied from the image data acquisition unit 31, the local homography matrix calculation unit 34 reads the reference image data from the reference image storage unit 38, and the homography matrix. A local homography matrix corresponding to past image data (second image data) is fetched from the transfer unit 36.

次に、ステップS103において、局所的ホモグラフィー行列計算部34は、過去の画像データに対応する局所的ホモグラフィー行列に基づいて現在の画像データに対応する局所的ホモグラフィー行列を求めるための変換行列を計算する。次に、局所的ホモグラフィー行列計算部34は、計算した変換行列と過去の画像データに対応する局所的ホモグラフィー行列とを用いて現在の画像データに対応する局所的ホモグラフィー行列を計算する。次に、局所的ホモグラフィー行列計算部34は、この計算した局所的ホモグラフィー行列を、画像データ変換部33に供給するとともに局所的ホモグラフィー行列記憶部35に記憶させる。   Next, in step S103, the local homography matrix calculation unit 34 obtains a local homography matrix corresponding to the current image data based on the local homography matrix corresponding to the past image data. Calculate Next, the local homography matrix calculator 34 calculates a local homography matrix corresponding to the current image data using the calculated transformation matrix and the local homography matrix corresponding to the past image data. Next, the local homography matrix calculation unit 34 supplies the calculated local homography matrix to the image data conversion unit 33 and stores it in the local homography matrix storage unit 35.

次に、ステップS104において、画像データ変換部33は、局所的ホモグラフィー行列計算部34から供給された現在の画像データに対応する局所的ホモグラフィー行列と、画像データ取得部31から供給された現在の画像データとを取り込む。次に、画像データ変換部33は、現在の画像データに対応する局所的ホモグラフィー行列を用いて現在の画像データを変換して変換画像データを生成し、この変換画像データを画像相関分析部32に供給する。次に、画像相関分析部32は、画像データ変換部33から供給された変換画像データと、参照画像記憶部38から読み出した参照画像データとを取り込む。次に、画像相関分析部32は、変換画像データの画像(変換画像)と参照画像データの画像(参照画像)との画像相関を、例えば正規化相互相関により計算し、変換画像と参照画像との類似度を求める。   Next, in step S <b> 104, the image data conversion unit 33 determines the local homography matrix corresponding to the current image data supplied from the local homography matrix calculation unit 34 and the current data supplied from the image data acquisition unit 31. Image data. Next, the image data conversion unit 33 converts the current image data using the local homography matrix corresponding to the current image data to generate converted image data, and the converted image data is converted into the image correlation analysis unit 32. To supply. Next, the image correlation analysis unit 32 captures the converted image data supplied from the image data conversion unit 33 and the reference image data read from the reference image storage unit 38. Next, the image correlation analysis unit 32 calculates the image correlation between the image of the converted image data (converted image) and the image of the reference image data (reference image) by, for example, normalized cross-correlation, and the converted image and the reference image Find the similarity of.

次に、ステップS105において、画像相関分析部32は、画像相関を計算して得た類似度と、あらかじめ記憶した閾値とを比較し、類似度が閾値よりも大きいと判定した場合は、局所的ホモグラフィー行列の転送制御指示をホモグラフィー行列転送部36に供給してステップS106の処理に移る(S105:YES)。一方、画像相関分析部32は、類似度が閾値以下であると判定した場合は、大域的ホモグラフィー行列の転送制御指示をホモグラフィー行列転送部36に供給してステップS107の処理に移る(S105:NO)。   Next, in step S105, the image correlation analysis unit 32 compares the similarity obtained by calculating the image correlation with a threshold stored in advance and determines that the similarity is greater than the threshold. The homography matrix transfer control instruction is supplied to the homography matrix transfer unit 36, and the process proceeds to step S106 (S105: YES). On the other hand, if the image correlation analysis unit 32 determines that the similarity is equal to or less than the threshold value, the image correlation analysis unit 32 supplies a global homography matrix transfer control instruction to the homography matrix transfer unit 36, and proceeds to the process of step S107 (S105). : NO).

ステップS106において、ホモグラフィー行列転送部36は、画像相関分析部32から供給される、局所的ホモグラフィー行列の転送制御指示を取り込む。次に、ホモグラフィー行列転送部36は、局所的ホモグラフィー行列記憶部35に記憶された現在の画像データに対応する局所的ホモグラフィー行列を読み込んで外部に出力可能に保持する。
ステップS106の処理が終了するとステップS101の処理に戻る。
In step S <b> 106, the homography matrix transfer unit 36 takes in a local homography matrix transfer control instruction supplied from the image correlation analysis unit 32. Next, the homography matrix transfer unit 36 reads a local homography matrix corresponding to the current image data stored in the local homography matrix storage unit 35, and holds it so that it can be output to the outside.
When the process of step S106 ends, the process returns to step S101.

一方、ステップS107において、ホモグラフィー行列転送部36は、画像相関分析部32から供給される、大域的ホモグラフィー行列の転送制御指示を取り込む。次に、ホモグラフィー行列転送部36は、大域的ホモグラフィー行列記憶部37から最新の大域的ホモグラフィー行列を読み込む。   On the other hand, in step S <b> 107, the homography matrix transfer unit 36 takes in a global homography matrix transfer control instruction supplied from the image correlation analysis unit 32. Next, the homography matrix transfer unit 36 reads the latest global homography matrix from the global homography matrix storage unit 37.

次に、ステップS108において、ホモグラフィー行列転送部36は、読み込んだ最新の大域的ホモグラフィー行列を外部に出力可能に保持する。
ステップS108の処理が終了するとステップS101の処理に戻る。
In step S108, the homography matrix transfer unit 36 holds the read global homography matrix so that it can be output to the outside.
When the process of step S108 ends, the process returns to step S101.

次に、図5のフローチャートについて説明する。ステップS201において、画像データ取得部31は、図4のステップS101の処理において局所的ホモグラフィー行列計算部34および画像データ変換部33に供給するレートよりも低いレートで、検査ロボット装置10の撮像装置11が出力する画像データ(現在の画像データ)を取り込むと、その現在の画像データを特徴点抽出部39に供給する。   Next, the flowchart of FIG. 5 will be described. In step S201, the image data acquisition unit 31 has a lower rate than the rate supplied to the local homography matrix calculation unit 34 and the image data conversion unit 33 in the process of step S101 in FIG. When the image data (current image data) output by 11 is captured, the current image data is supplied to the feature point extraction unit 39.

次に、ステップS202において、特徴点抽出部39は、画像データ取得部31から供給される現在の画像データを取り込むとともに、参照画像記憶部38から参照画像データを読み込む。次に、特徴点抽出部39は、現在の画像データと参照画像データとから画像の特徴点を抽出して現在画像と参照画像との特徴点の相対位置を計算し、これら特徴点の相対位置の情報を大域的ホモグラフィー行列計算部40に供給する。   Next, in step S <b> 202, the feature point extraction unit 39 captures the current image data supplied from the image data acquisition unit 31 and reads the reference image data from the reference image storage unit 38. Next, the feature point extraction unit 39 extracts the feature points of the image from the current image data and the reference image data, calculates the relative positions of the feature points between the current image and the reference image, and calculates the relative positions of these feature points. Is supplied to the global homography matrix calculator 40.

次に、ステップS203において、大域的ホモグラフィー行列計算部40は、特徴点抽出部39から供給される、現在画像と参照画像との特徴点の相対位置の情報を取り込む。次に、大域的ホモグラフィー行列計算部40は、これら現在画像と参照画像との特徴点の相対位置の情報に基づいて、現在の画像データに対応する大域的ホモグラフィー行列を計算する。   Next, in step S <b> 203, the global homography matrix calculation unit 40 takes in the information on the relative positions of the feature points of the current image and the reference image supplied from the feature point extraction unit 39. Next, the global homography matrix calculation unit 40 calculates a global homography matrix corresponding to the current image data based on the information on the relative positions of the feature points of the current image and the reference image.

次に、ステップS204において、大域的ホモグラフィー行列計算部40は、計算した大域的ホモグラフィー行列を、大域的ホモグラフィー行列記憶部37に記憶させる。
ステップS204の処理が終了するとステップS201の処理に戻る。
Next, in step S <b> 204, the global homography matrix calculation unit 40 stores the calculated global homography matrix in the global homography matrix storage unit 37.
When the process of step S204 ends, the process returns to step S201.

図4のフローチャートにおいて、ホモグラフィー行列取得装置30がステップS101からステップS106までを繰り返す処理は、例えば、撮像装置11から供給される画像データのフレームレートが120フレーム/秒である場合、そのフレームレートと同一のレートで処理する。一方、図5のフローチャートにおいて、ホモグラフィー行列取得装置30がステップS201からステップS204までを繰り返す処理は、120フレーム/秒のフレームレートよりも低いレート(例えば、20フレーム/秒または30フレーム/秒)で処理する。   In the flowchart of FIG. 4, for example, when the frame rate of the image data supplied from the imaging device 11 is 120 frames / second, the homography matrix acquisition device 30 repeats steps S101 to S106. And process at the same rate. On the other hand, in the flowchart of FIG. 5, the process in which the homography matrix acquisition device 30 repeats steps S201 to S204 is a rate lower than the frame rate of 120 frames / second (for example, 20 frames / second or 30 frames / second). Process with.

よって、ホモグラフィー行列転送部36が、大域的ホモグラフィー行列記憶部37から現在の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶する処理(図4のステップS107およびステップS108の処理)を実行することにより、時間的には若干遅れた大域的ホモグラフィー行列が記憶されることになる。しかし、この若干の時間遅れは、トラッキングのリアルタイム性に影響を及ぼすものではない。   Therefore, a process in which the homography matrix transfer unit 36 reads and stores the global homography matrix corresponding to the current image data from the global homography matrix storage unit 37 (the processes in steps S107 and S108 in FIG. 4). By executing, a global homography matrix slightly delayed in time is stored. However, this slight time delay does not affect the real-time performance of tracking.

次に、ロボット制御装置45の動作について説明する。図6は、ロボット制御装置45の処理手順を表すフローチャートである。同図のフローチャートの処理は、例えば、図4のステップS106およびステップS108の処理の次(ステップS101に戻る前)に実行されるものである。
まず、ステップS301において、ロボット制御装置45は、ホモグラフィー行列取得装置30から現在の画像データに対応するホモグラフィー行列データ、言い換えると、最新のホモグラフィー行列データを取り込む。
Next, the operation of the robot control device 45 will be described. FIG. 6 is a flowchart showing the processing procedure of the robot controller 45. The process of the flowchart of FIG. 9 is executed, for example, after the process of step S106 and step S108 of FIG. 4 (before returning to step S101).
First, in step S301, the robot control device 45 takes in the homography matrix data corresponding to the current image data from the homography matrix acquisition device 30, in other words, the latest homography matrix data.

次に、ステップS302において、ロボット制御装置45は、取り込んだホモグラフィー行列に基づいて検査ロボット装置10のアーム先端の移動速度、つまり撮像装置11の移動速度を計算する。
移動速度は、次のようにして計算することができる。三次元空間における撮像装置11の座標系Fと移動先における撮像装置11の座標系Fとにおける、並進ベクトルの差分e(ボールド体)νと、回転ベクトルの差分e(ボールド体)ωとは、下記の式(16)のように表される。
Next, in step S302, the robot controller 45 calculates the moving speed of the arm tip of the inspection robot apparatus 10, that is, the moving speed of the imaging apparatus 11, based on the acquired homography matrix.
The moving speed can be calculated as follows. A translation vector difference e (bold body) ν and a rotation vector difference e (bold body) ω between the coordinate system F * of the imaging device 11 in the three-dimensional space and the coordinate system F of the imaging device 11 at the destination Is expressed as the following equation (16).

Figure 2012086285
Figure 2012086285

式(16)により、差分を無くす方向に検査ロボット装置10のアーム先端を移動させればよいため、撮像装置11の移動速度は、下記の式(17)のように表される。ただし、νは並進の速度、ωは回転の速度である。   Since the arm tip of the inspection robot apparatus 10 has only to be moved in a direction that eliminates the difference according to Expression (16), the moving speed of the imaging apparatus 11 is expressed as Expression (17) below. Where ν is the speed of translation and ω is the speed of rotation.

Figure 2012086285
Figure 2012086285

次に、ステップS303において、ロボット制御装置45は、撮像装置11の速度に基づいて、ロボット本体12の各関節の移動速度(並進速度および回転速度)を計算する。関節とは、支持台12aとアーム部12bとの連結部分、アーム部12b同士の連結部分、およびアーム部12bとハンド部12cとの連結部分である。
ロボット本体12の各関節の移動速度は、ヤコビ行列を用いて下記の式(18)を計算することにより求めることができる。ただし、J(ボールド体)(ハット)−1は、ヤコビ行列J(ボールド体)(ハット)の逆行列である。
Next, in step S <b> 303, the robot control device 45 calculates the movement speed (translation speed and rotation speed) of each joint of the robot body 12 based on the speed of the imaging device 11. The joint is a connecting portion between the support base 12a and the arm portion 12b, a connecting portion between the arm portions 12b, and a connecting portion between the arm portion 12b and the hand portion 12c.
The movement speed of each joint of the robot body 12 can be obtained by calculating the following equation (18) using the Jacobian matrix. However, J (bold body) (hat) −1 is an inverse matrix of the Jacobian matrix J (bold body) (hat).

Figure 2012086285
Figure 2012086285

つぎに、ステップS304において、ロボット制御装置45は、ロボット本体12の各関節の移動速度(並進速度および回転速度)に基づいてロボット本体12のアーム部12bおよびハンド部12cを制御して動作させる。   Next, in step S304, the robot control device 45 controls and operates the arm portion 12b and the hand portion 12c of the robot body 12 based on the moving speed (translation speed and rotation speed) of each joint of the robot body 12.

一般的に、変換行列を計算してホモグラフィー行列を求める処理は、画像の特徴点を抽出して特徴点の相対位置を計算しこれら特徴点の相対位置によってホモグラフィー行列を求める処理よりもトラッキングの安定性(精度)が低い一方、処理負荷が大幅に軽い。また、変換行列の計算精度は、変換行列を計算するための空間領域が狭い(並進が少なく且つ回転が小さい)ほど高い。
よって、変換行列を計算しホモグラフィー行列を求めて記憶する処理を、変換画像と参照画像との画像相関が高い場合に限ることにより、トラッキングの高い安定性(高い精度)を確保することができる。
したがって、本実施形態では、変換画像と参照画像との画像相関が高い場合は、比較的処理負荷の軽い計算処理による局所的ホモグラフィー行列を出力可能に記憶し、変換画像と参照画像との画像相関が低い場合は、比較的処理負荷の重い大域的ホモグラフィー行列を出力可能に記憶するようにした。
In general, the process of calculating the transformation matrix and obtaining the homography matrix is more tracking than the process of extracting the feature points of the image, calculating the relative positions of the feature points, and calculating the homography matrix based on the relative positions of these feature points. While the stability (accuracy) is low, the processing load is significantly lighter. In addition, the calculation accuracy of the transformation matrix is higher as the spatial region for calculating the transformation matrix is narrower (less translation and less rotation).
Therefore, high stability (high accuracy) of tracking can be ensured by limiting the process of calculating the transformation matrix and obtaining and storing the homography matrix only when the image correlation between the transformed image and the reference image is high. .
Therefore, in the present embodiment, when the image correlation between the converted image and the reference image is high, a local homography matrix by calculation processing with a relatively light processing load is stored so as to be output, and the image of the converted image and the reference image is stored. When the correlation is low, a global homography matrix with a relatively heavy processing load is stored so that it can be output.

以上により、本実施形態によれば、処理負荷が軽く且つ安定性の高いトラッキングを行うことができる。言い換えると、リアルタイム性を確保し且つ精度の高いトラッキングを行うことができる。よって、追跡ロボット装置において、検査対象物体の外観検査時間を短くするためにロボット本体12の移動速度を速くした場合でも、トラッキングの誤認識が発生せず信頼性の高い外観検査を行うことができる。   As described above, according to the present embodiment, tracking with a light processing load and high stability can be performed. In other words, real-time performance can be ensured and highly accurate tracking can be performed. Therefore, in the tracking robot apparatus, even when the moving speed of the robot body 12 is increased in order to shorten the appearance inspection time of the object to be inspected, it is possible to perform a reliable appearance inspection without causing misrecognition of tracking. .

[実施形態の第1の変形例]
上述した実施形態の第1変形例について説明する。本第1変形例は、ホモグラフィー行列取得装置30をハンディータイプのビデオカメラ装置に適用した例である。このビデオカメラ装置は、撮影中にフレーム画像から人物の顔の領域を検出し、その顔領域にピントを自動で合わせる機能を有するものである。
[First Modification of Embodiment]
A first modification of the above-described embodiment will be described. The first modification is an example in which the homography matrix acquisition device 30 is applied to a handy type video camera device. This video camera device has a function of detecting an area of a person's face from a frame image during shooting and automatically focusing on the face area.

図7は、本第1変形例であるビデオカメラ装置の概略の機能構成を表すブロック図である。同図に示すように、ビデオカメラ装置2は、ホモグラフィー行列取得装置30と、レンズ光学系50と、撮像部60と、ピント調節量計算部70と、ピント調節部80と、画像記録奉90とを備える。   FIG. 7 is a block diagram illustrating a schematic functional configuration of the video camera apparatus according to the first modification. As shown in the figure, the video camera device 2 includes a homography matrix acquisition device 30, a lens optical system 50, an imaging unit 60, a focus adjustment amount calculation unit 70, a focus adjustment unit 80, and an image recording service 90. With.

レンズ光学系50は、被写体から到来する光束を集光する。レンズ光学系50は、対物レンズや集束レンズ等のレンズ群を含んで構成される。
撮像部60は、固体撮像素子を備え、レンズ光学系50を通して集光された光束をその固体撮像素子で撮像する。固体撮像素子は、例えば、CMOS(Complementary Metal Oxide Semiconductor)イメージセンサやCCD(Charge Coupled Device)イメージセンサである。撮像部60は、例えば120フレーム/秒のフレームレートで動画を撮像し、画像データを連続的にホモグラフィー行列取得装置30および画像記録部90それぞれに供給する。
画像記録部90は、撮像部60が出力する画像データを、例えば、磁気ハードディスクやメモリーカード等の記録媒体に記録する。
The lens optical system 50 condenses the light flux coming from the subject. The lens optical system 50 includes a lens group such as an objective lens and a focusing lens.
The imaging unit 60 includes a solid-state imaging device, and images the light beam condensed through the lens optical system 50 with the solid-state imaging device. The solid-state image sensor is, for example, a CMOS (Complementary Metal Oxide Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor. The imaging unit 60 captures a moving image at a frame rate of 120 frames / second, for example, and continuously supplies the image data to the homography matrix acquisition device 30 and the image recording unit 90, respectively.
The image recording unit 90 records the image data output from the imaging unit 60 on a recording medium such as a magnetic hard disk or a memory card.

ホモグラフィー行列取得装置30は、前述した一実施形態によるものと同様のものである。ただし、本第1変形例においては、ホモグラフィー行列取得装置30の参照画像記憶部38には、図7には図示しない顔検出処理部が画像データから検出した人物の顔画像データが記憶される。また、ホモグラフィー行列取得装置30の画像相関分析部32は、画像データにおける人物の顔が含まれる小領域(例えば、矩形領域)を用いて画像相関を計算する。ホモグラフィー行列取得装置30は、参照画像記憶部38に記憶された人物の顔画像データと、画像データにおける矩形領域の顔画像データとに基づいて、局所的ホモグラフィー行列および大域的ホモグラフィー行列を計算して記憶する。   The homography matrix acquisition device 30 is the same as that according to the above-described embodiment. However, in the first modification, the face image data of the person detected by the face detection processing unit (not shown in FIG. 7) from the image data is stored in the reference image storage unit 38 of the homography matrix acquisition device 30. . Further, the image correlation analysis unit 32 of the homography matrix acquisition device 30 calculates the image correlation using a small region (for example, a rectangular region) including a human face in the image data. The homography matrix acquisition device 30 calculates a local homography matrix and a global homography matrix based on the face image data of the person stored in the reference image storage unit 38 and the face image data of the rectangular area in the image data. Calculate and store.

ピント調節量計算部70は、ホモグラフィー行列取得装置30からホモグラフィー行列データを取り込む。そして、ピント調節量計算部70は、取り込んだホモグラフィー行列データに基づいてピントを調節すべき画像領域(矩形領域)を特定し、その画像領域に対応する被写体の部位に対するピント調節量を計算する。このピント調節量の計算方法は、公知のオートフォーカス技術による。ピント調節量計算部70は、計算したピント調節量データをピント調節部80に供給する。
ピント調節部80は、ピント調節量計算部70から供給されるピント調節量データに基づいて、ピントを調節すべき画像領域に対応する被写体の部位(人物の顔)に対するピントを調整する。
The focus adjustment amount calculation unit 70 takes in the homography matrix data from the homography matrix acquisition device 30. Then, the focus adjustment amount calculation unit 70 specifies an image region (rectangular region) on which the focus is to be adjusted based on the acquired homography matrix data, and calculates a focus adjustment amount for the portion of the subject corresponding to the image region. . The calculation method of the focus adjustment amount is based on a known autofocus technique. The focus adjustment amount calculation unit 70 supplies the calculated focus adjustment amount data to the focus adjustment unit 80.
Based on the focus adjustment amount data supplied from the focus adjustment amount calculation unit 70, the focus adjustment unit 80 adjusts the focus with respect to the part of the subject (person's face) corresponding to the image area whose focus is to be adjusted.

以上により、本第1の変形例によれば、処理負荷が軽く且つ安定性の高いトラッキングを行うことができる。言い換えると、リアルタイム性を確保し且つ精度の高いトラッキングを行うことができる。よって、ハンディータイプのビデオカメラ装置において、人物の顔が速く移動した場合でも、トラッキングの誤認識が発生せず信頼性の高い自動ピント調節を行うことができる。   As described above, according to the first modification, tracking with a light processing load and high stability can be performed. In other words, real-time performance can be ensured and highly accurate tracking can be performed. Therefore, in a handy-type video camera device, even when a person's face moves quickly, misrecognition of tracking does not occur and highly reliable automatic focus adjustment can be performed.

[実施形態の第2の変形例]
前述した実施形態の第2変形例について説明する。本第2変形例は、ホモグラフィー行列取得装置30を自動姿勢調整可能なビデオカメラ装置に適用した例である。このビデオカメラ装置は、例えばコンピューターのディスプレイ装置上またはその付近に設置されて使用されるものである。このように設置されて使用された場合、ビデオカメラ装置は、撮影中にフレーム画像からコンピューターの操作者である人物の顔の領域を検出し、その顔領域が画像フレームから外れないように当該ビデオカメラ装置の姿勢を調整する機能を有するものである。
[Second Modification of Embodiment]
A second modification of the above-described embodiment will be described. The second modification is an example in which the homography matrix acquisition device 30 is applied to a video camera device capable of automatic posture adjustment. This video camera device is used by being installed on or near a display device of a computer, for example. When installed and used in this way, the video camera device detects the area of the face of the person who is the operator of the computer from the frame image during shooting, and the video area so that the face area does not deviate from the image frame. It has a function of adjusting the posture of the camera device.

図8は、本第2変形例であるビデオカメラ装置の概略の機能構成を表すブロック図である。同図に示すように、ビデオカメラ装置3は、撮像システム100と、ホモグラフィー行列取得装置30と、姿勢調節量計算部110とを備える。   FIG. 8 is a block diagram illustrating a schematic functional configuration of a video camera apparatus according to the second modification. As shown in the figure, the video camera device 3 includes an imaging system 100, a homography matrix acquisition device 30, and a posture adjustment amount calculation unit 110.

撮像システム100は、上述したように、被写体となる人物の顔を撮像可能なように設置される。撮像システム100は、その機能構成として、撮像装置101と、姿勢調節部102とを備える。
撮像装置101は、例えば120フレーム/秒のフレームレートで動画を撮像し、撮像データである画像データを連続的にホモグラフィー行列取得装置30に供給するとともに、外部(例えば、コンピューター)に供給する。
姿勢調節部102は、姿勢調節量計算部110から供給される姿勢調節量データに基づいて、撮像装置101の姿勢、つまり撮像方向を調節する。
As described above, the imaging system 100 is installed so as to be able to capture the face of a person as a subject. The imaging system 100 includes an imaging device 101 and a posture adjustment unit 102 as functional configurations.
The imaging apparatus 101 captures a moving image at a frame rate of 120 frames / second, for example, and continuously supplies image data as imaging data to the homography matrix acquisition apparatus 30 and also supplies it to the outside (for example, a computer).
The attitude adjustment unit 102 adjusts the attitude of the imaging apparatus 101, that is, the imaging direction, based on attitude adjustment amount data supplied from the attitude adjustment amount calculation unit 110.

ホモグラフィー行列取得装置30は、前述した一実施形態によるものと同様のものである。ただし、本第1変形例においては、ホモグラフィー行列取得装置30の参照画像記憶部38には、図8には図示しない顔検出処理部が画像データから検出した人物の顔画像データが記憶される。ホモグラフィー行列取得装置30は、参照画像記憶部38に記憶された人物の顔画像データと、撮像装置101から取り込む画像データとに基づいて、局所的ホモグラフィー行列および大域的ホモグラフィー行列を計算して記憶する。   The homography matrix acquisition device 30 is the same as that according to the above-described embodiment. However, in the first modification, the face image data of the person detected by the face detection processing unit (not shown in FIG. 8) from the image data is stored in the reference image storage unit 38 of the homography matrix acquisition device 30. . The homography matrix acquisition device 30 calculates a local homography matrix and a global homography matrix based on the human face image data stored in the reference image storage unit 38 and the image data captured from the imaging device 101. And remember.

姿勢調節量計算部110は、ホモグラフィー行列取得装置30からホモグラフィー行列データを取り込む。そして、姿勢調節量計算部70は、取り込んだホモグラフィー行列データに基づいて、人物の顔の位置をフレーム画像の中央に一致させるようにフレーム画像の移動方向を特定し、その方向にフレーム画像が移動するように撮像装置101の姿勢の調節量を計算する。姿勢調節量計算部110は、計算した姿勢調節量データを撮像システム100の姿勢調節部102に供給する。   The posture adjustment amount calculation unit 110 takes in the homography matrix data from the homography matrix acquisition device 30. Then, the posture adjustment amount calculation unit 70 identifies the moving direction of the frame image based on the captured homography matrix data so that the position of the person's face matches the center of the frame image, and the frame image is in that direction. The amount of adjustment of the posture of the imaging apparatus 101 is calculated so as to move. The posture adjustment amount calculation unit 110 supplies the calculated posture adjustment amount data to the posture adjustment unit 102 of the imaging system 100.

以上により、本第2の変形例によれば、処理負荷が軽く且つ安定性の高いトラッキングを行うことができる。言い換えると、リアルタイム性を確保し且つ精度の高いトラッキングを行うことができる。よって、自動姿勢調整可能なビデオカメラ装置において、人物の顔が速く移動した場合でも、トラッキングの誤認識が発生せず信頼性の高いビデオカメラ装置の姿勢制御を行うことができる。   As described above, according to the second modification, tracking with a light processing load and high stability can be performed. In other words, real-time performance can be ensured and highly accurate tracking can be performed. Therefore, in a video camera device capable of automatic posture adjustment, even when the face of a person moves fast, misrecognition of tracking does not occur, and the posture control of the video camera device with high reliability can be performed.

なお、上述した一実施形態である追跡ロボット装置の一部、例えば、ホモグラフィー行列取得装置30およびロボット制御装置45の機能をコンピューターで実現するようにしてもよい。この場合、その制御機能を実現するための追跡ロボット制御プログラムをコンピューター読み取り可能な記録媒体に記録して、この記録媒体に記録された追跡ロボット制御プログラムをコンピューターシステムに読み込ませ、実行することによって実現してもよい。   In addition, you may make it implement | achieve the function of a part of tracking robot apparatus which is one Embodiment mentioned above, for example, the function of the homography matrix acquisition apparatus 30 and the robot control apparatus 45 with a computer. In this case, the tracking robot control program for realizing the control function is recorded on a computer-readable recording medium, and the tracking robot control program recorded on the recording medium is read into the computer system and executed. May be.

また、同様に、ホモグラフィー行列取得装置30のみの機能をコンピューターで実現するようにしてもよい。この場合、その制御機能を実現するためのホモグラフィー行列取得プログラムをコンピューター読み取り可能な記録媒体に記録して、この記録媒体に記録されたホモグラフィー行列取得プログラムをコンピューターシステムに読み込ませ、実行することによって実現してもよい。   Similarly, the function of only the homography matrix acquisition device 30 may be realized by a computer. In this case, a homography matrix acquisition program for realizing the control function is recorded on a computer-readable recording medium, and the homography matrix acquisition program recorded on the recording medium is read into a computer system and executed. It may be realized by.

なお、ここでいう「コンピューターシステム」とは、OS(Operating System)や周辺装置のハードウェアを含むものである。また、「コンピューター読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、光ディスク、メモリーカード等の可搬型記録媒体、コンピューターシステムに内蔵される磁気ハードディスク等の記憶装置のことをいう。さらに「コンピューター読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバー装置やクライアントとなるコンピューターシステム内部の揮発性メモリーのように、一定時間プログラムを保持するものを含んでもよい。また上記のプログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピューターシステムにすでに記録されているプログラムとの組み合わせにより実現するものであってもよい。   Note that the “computer system” here includes an OS (Operating System) and hardware of peripheral devices. The “computer-readable recording medium” refers to a portable recording medium such as a flexible disk, a magneto-optical disk, an optical disk, and a memory card, and a storage device such as a magnetic hard disk built in the computer system. Furthermore, a “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, it is possible to include a server that holds a program for a certain period of time, such as a volatile memory inside a computer system that serves as a server device or a client. In addition, the above program may be for realizing a part of the above-described functions, and further, may be realized by combining the above-described functions with a program already recorded in the computer system. .

以上、本発明の実施の形態について図面を参照して詳述したが、具体的な構成はその実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計等も含まれる。   As mentioned above, although embodiment of this invention was explained in full detail with reference to drawings, the specific structure is not restricted to that embodiment, The design of the range which does not deviate from the summary of this invention, etc. are included.

1 外観検査装置
10 検査ロボット装置
11 撮像装置
12 ロボット本体
12a 支持台
12b アーム部
12c ハンド部
20 画像解析装置
30 ホモグラフィー行列取得装置
31 画像データ取得部
32 画像相関分析部
33 変換行列計算部
34 局所的ホモグラフィー行列計算部
35 局所的ホモグラフィー行列記憶部
36 ホモグラフィー行列転送部
37 大域的穂葎フィー行列記憶部
38 参照画像記憶部
39 特徴点抽出部
40 大域的ホモグラフィー行列計算部
45 ロボット制御装置
50 レンズ光学系
60 撮像部
70 ピント調節量計算部
80 ピント調節部
90 画像記録部
100 撮像システム
101 撮像装置
102 姿勢調節部
110 姿勢調節量計算部
DESCRIPTION OF SYMBOLS 1 Appearance inspection apparatus 10 Inspection robot apparatus 11 Imaging apparatus 12 Robot main body 12a Support stand 12b Arm part 12c Hand part 20 Image analysis apparatus 30 Homography matrix acquisition apparatus 31 Image data acquisition part 32 Image correlation analysis part 33 Transformation matrix calculation part 34 Local Homography matrix calculation unit 35 Local homography matrix storage unit 36 Homography matrix transfer unit 37 Global head matrix storage unit 38 Reference image storage unit 39 Feature point extraction unit 40 Global homography matrix calculation unit 45 Robot control Apparatus 50 lens optical system 60 imaging unit 70 focus adjustment amount calculation unit 80 focus adjustment unit 90 image recording unit 100 imaging system 101 imaging device 102 posture adjustment unit 110 posture adjustment amount calculation unit

Claims (12)

可動のアーム部とこのアーム部に可動に設けられるハンド部とを備えるロボット本体と、
前記ハンド部に設けられ、検査対象物体を撮像して画像データを出力する撮像部と、
前記検査対象物体の参照画像データを記憶する参照画像記憶部と、
前記撮像部が出力した画像データを取り込む画像データ取得部と、
前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、
前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、
前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、
前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、
前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、
前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、
前記ホモグラフィー行列転送部から、前記第1の画像データに対応する局所的ホモグラフィー行列または前記第1の画像データに対応する大域的ホモグラフィー行列を、ホモグラフィー行列データとして読み出し、この読み出したホモグラフィー行列データに基づいて前記ロボット本体の姿勢を計算して、前記ロボット本体の前記アーム部と前記ハンド部との少なくともいずれかの動作を制御するロボット制御部と、
を備えることを特徴とする追跡ロボット装置。
A robot body including a movable arm part and a hand part movably provided on the arm part;
An imaging unit that is provided in the hand unit and images the inspection object and outputs image data;
A reference image storage unit that stores reference image data of the inspection object;
An image data acquisition unit that captures image data output by the imaging unit;
The first image data captured by the image data acquisition unit, the reference image data stored in the reference image storage unit, and second image data that is past image data than the first image data. A local homography matrix that calculates a local homography matrix corresponding to the first image data based on the local homography matrix and stores the local homography matrix corresponding to the calculated first image data An acquisition unit;
An image data conversion unit that converts the first image data to generate converted image data using a local homography matrix corresponding to the first image data calculated by the local homography matrix acquisition unit; ,
An image correlation analysis unit that calculates a similarity by analyzing a correlation between the converted image data generated by the image data conversion unit and the reference image data stored in the reference image storage unit;
Feature point extraction that extracts image feature points from the first image data captured by the image data acquisition unit and the reference image data stored in the reference image storage unit, and calculates the relative positions of these feature points And
A global homography matrix corresponding to the first image data is calculated based on the relative position of the feature points calculated by the feature point extraction unit, and a global homography matrix corresponding to the calculated first image data A global homography matrix acquisition unit for storing
When the similarity calculated by the image correlation analysis unit exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored. When the similarity calculated by the image correlation analysis unit is less than or equal to the threshold value, the global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit is read. A homography matrix transfer unit to store in
From the homography matrix transfer unit, a local homography matrix corresponding to the first image data or a global homography matrix corresponding to the first image data is read out as homography matrix data. A robot controller that calculates the posture of the robot body based on graphy matrix data and controls the operation of at least one of the arm unit and the hand unit of the robot body;
A tracking robot apparatus comprising:
前記画像相関分析部は、前記変換画像データと前記参照画像データとの画像の相関として、正規化相互相関を計算して前記類似度を求める
ことを特徴とする請求項1記載の追跡ロボット装置。
The tracking robot apparatus according to claim 1, wherein the image correlation analysis unit obtains the similarity by calculating a normalized cross-correlation as an image correlation between the converted image data and the reference image data.
前記局所的ホモグラフィー行列取得部は、前記第1の画像データと前記参照画像データと該局所的ホモグラフィー行列取得部に記憶された第2の画像データに対応する局所的ホモグラフィー行列とに基づいて、前記第1の画像データに対応する局所的ホモグラフィー行列を計算するための変換行列を計算し、この計算した変換行列と前記第2の画像データに対応する局所的ホモグラフィー行列とに基づいて前記第1の画像データに対応する局所的ホモグラフィー行列を計算する
ことを特徴とする請求項2記載の追跡ロボット装置。
The local homography matrix acquisition unit is based on the first image data, the reference image data, and a local homography matrix corresponding to the second image data stored in the local homography matrix acquisition unit. And calculating a transformation matrix for calculating a local homography matrix corresponding to the first image data, and based on the calculated transformation matrix and the local homography matrix corresponding to the second image data. The tracking robot apparatus according to claim 2, wherein a local homography matrix corresponding to the first image data is calculated.
可動のアーム部とこのアーム部に可動に設けられるハンド部とを備えるロボット本体の前記ハンド部に設けられた撮像部が、検査対象物体を撮像して画像データを出力する撮像ステップと、
前記撮像ステップにおいて出力した画像データを取り込む画像データ取得ステップと、
前記画像データ取得ステップにおいて取り込んだ第1の画像データと参照画像記憶部に記憶された参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得ステップと、
前記局所的ホモグラフィー行列取得ステップにおいて計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換ステップと、
前記画像データ変換ステップにおいて生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析ステップと、
前記画像相関分析ステップにおいて計算した前記類似度が閾値を超える場合に、前記局所的ホモグラフィー行列取得ステップにおいて記憶した前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶部に記憶し、前記画像相関分析ステップにおいて計算した前記類似度が前記閾値以下である場合に、前記第1の画像データと前記参照画像記憶部に記憶された参照画像データとの画像の特徴点の相対位置に基づいて計算されて記憶された第1の画像データに対応する大域的ホモグラフィー行列を読み込んで前記記憶部に記憶するホモグラフィー行列転送ステップと、
前記ホモグラフィー行列転送ステップにおいて前記記憶部に記憶した、前記第1の画像データに対応する局所的ホモグラフィー行列または前記第1の画像データに対応する大域的ホモグラフィー行列を、ホモグラフィー行列データとして前記記憶部から読み出し、この読み出したホモグラフィー行列データに基づいて前記ロボット本体の姿勢を計算して、前記ロボット本体の前記アーム部と前記ハンド部との少なくともいずれかの動作を制御するロボット制御ステップと、
を有することを特徴とする追跡ロボット制御方法。
An imaging step in which an imaging unit provided in the hand unit of the robot body including a movable arm unit and a hand unit movably provided in the arm unit images an inspection target object and outputs image data;
An image data acquisition step for capturing the image data output in the imaging step;
The first image data captured in the image data acquisition step, the reference image data stored in the reference image storage unit, and the local corresponding to the second image data that is past image data than the first image data. A local homography matrix acquisition step of calculating a local homography matrix corresponding to the first image data based on the homography matrix and storing the local homography matrix corresponding to the calculated first image data When,
An image data conversion step of converting the first image data and generating converted image data using the local homography matrix corresponding to the first image data calculated in the local homography matrix acquisition step; ,
An image correlation analysis step of calculating a similarity by analyzing a correlation between the converted image data generated in the image data conversion step and the reference image data stored in the reference image storage unit;
When the similarity calculated in the image correlation analysis step exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition step is read and stored in the storage unit When the similarity calculated in the image correlation analysis step is equal to or less than the threshold value, relative positions of image feature points between the first image data and the reference image data stored in the reference image storage unit A homography matrix transfer step of reading a global homography matrix corresponding to the first image data calculated and stored based on
A local homography matrix corresponding to the first image data or a global homography matrix corresponding to the first image data stored in the storage unit in the homography matrix transfer step is used as homography matrix data. A robot control step of reading from the storage unit, calculating a posture of the robot body based on the read homography matrix data, and controlling at least one of the operation of the arm unit and the hand unit of the robot body When,
A tracking robot control method comprising:
前記画像相関分析ステップは、前記変換画像データと前記参照画像データとの画像の相関として、正規化相互相関を計算して前記類似度を求める
ことを特徴とする請求項4記載の追跡ロボット制御方法。
5. The tracking robot control method according to claim 4, wherein the image correlation analysis step calculates a normalized cross-correlation as a correlation between the converted image data and the reference image data to obtain the similarity. .
前記局所的ホモグラフィー行列取得ステップは、前記第1の画像データと前記参照画像データと該局所的ホモグラフィー行列取得ステップにおいて記憶された第2の画像データに対応する局所的ホモグラフィー行列とに基づいて、前記第1の画像データに対応する局所的ホモグラフィー行列を計算するための変換行列を計算し、この計算した変換行列と前記第2の画像データに対応する局所的ホモグラフィー行列とに基づいて前記第1の画像データに対応する局所的ホモグラフィー行列を計算する
ことを特徴とする請求項5記載の追跡ロボット制御方法。
The local homography matrix acquisition step is based on the first image data, the reference image data, and a local homography matrix corresponding to the second image data stored in the local homography matrix acquisition step. And calculating a transformation matrix for calculating a local homography matrix corresponding to the first image data, and based on the calculated transformation matrix and the local homography matrix corresponding to the second image data. The tracking robot control method according to claim 5, further comprising: calculating a local homography matrix corresponding to the first image data.
可動のアーム部とこのアーム部に可動に設けられるハンド部とを備えるロボット本体と、前記ハンド部に設けられ、検査対象物体を撮像して画像データを出力する撮像部とを制御するための、前記検査対象物体の参照画像データを記憶する参照画像記憶部を備えたコンピューターを、
前記撮像部が出力した画像データを取り込む画像データ取得部と、
前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、
前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、
前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、
前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、
前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、
前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、
前記ホモグラフィー行列転送部から、前記第1の画像データに対応する局所的ホモグラフィー行列または前記第1の画像データに対応する大域的ホモグラフィー行列を、ホモグラフィー行列データとして読み出し、この読み出したホモグラフィー行列データに基づいて前記ロボット本体の姿勢を計算して、前記ロボット本体の前記アーム部と前記ハンド部との少なくともいずれかの動作を制御するロボット制御部と、
として機能させる追跡ロボット制御プログラム。
A robot main body including a movable arm unit and a hand unit that is movably provided on the arm unit, and an imaging unit that is provided in the hand unit and images an inspection target object and outputs image data. A computer comprising a reference image storage unit for storing reference image data of the inspection object,
An image data acquisition unit that captures image data output by the imaging unit;
The first image data captured by the image data acquisition unit, the reference image data stored in the reference image storage unit, and second image data that is past image data than the first image data. A local homography matrix that calculates a local homography matrix corresponding to the first image data based on the local homography matrix and stores the local homography matrix corresponding to the calculated first image data An acquisition unit;
An image data conversion unit that converts the first image data to generate converted image data using a local homography matrix corresponding to the first image data calculated by the local homography matrix acquisition unit; ,
An image correlation analysis unit that calculates a similarity by analyzing a correlation between the converted image data generated by the image data conversion unit and the reference image data stored in the reference image storage unit;
Feature point extraction that extracts image feature points from the first image data captured by the image data acquisition unit and the reference image data stored in the reference image storage unit, and calculates the relative positions of these feature points And
A global homography matrix corresponding to the first image data is calculated based on the relative position of the feature points calculated by the feature point extraction unit, and a global homography matrix corresponding to the calculated first image data A global homography matrix acquisition unit for storing
When the similarity calculated by the image correlation analysis unit exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored. When the similarity calculated by the image correlation analysis unit is less than or equal to the threshold value, the global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit is read. A homography matrix transfer unit to store in
From the homography matrix transfer unit, a local homography matrix corresponding to the first image data or a global homography matrix corresponding to the first image data is read out as homography matrix data. A robot controller that calculates the posture of the robot body based on graphy matrix data and controls the operation of at least one of the arm unit and the hand unit of the robot body;
Tracking robot control program that functions as.
前記画像相関分析部は、前記変換画像データと前記参照画像データとの画像の相関として、正規化相互相関を計算して前記類似度を求める
請求項7記載の追跡ロボット制御プログラム。
The tracking robot control program according to claim 7, wherein the image correlation analysis unit obtains the similarity by calculating a normalized cross-correlation as an image correlation between the converted image data and the reference image data.
前記局所的ホモグラフィー行列取得部は、前記第1の画像データと前記参照画像データと該局所的ホモグラフィー行列取得部に記憶された第2の画像データに対応する局所的ホモグラフィー行列とに基づいて、前記第1の画像データに対応する局所的ホモグラフィー行列を計算するための変換行列を計算し、この計算した変換行列と前記第2の画像データに対応する局所的ホモグラフィー行列とに基づいて前記第1の画像データに対応する局所的ホモグラフィー行列を計算する
請求項8記載の追跡ロボット制御プログラム。
The local homography matrix acquisition unit is based on the first image data, the reference image data, and a local homography matrix corresponding to the second image data stored in the local homography matrix acquisition unit. And calculating a transformation matrix for calculating a local homography matrix corresponding to the first image data, and based on the calculated transformation matrix and the local homography matrix corresponding to the second image data. The tracking robot control program according to claim 8, wherein a local homography matrix corresponding to the first image data is calculated.
参照画像データを記憶する参照画像記憶部と、
画像データを取り込む画像データ取得部と、
前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、
前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、
前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、
前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、
前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、
前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、
を備えることを特徴とするホモグラフィー行列取得装置。
A reference image storage unit for storing reference image data;
An image data acquisition unit for capturing image data;
The first image data captured by the image data acquisition unit, the reference image data stored in the reference image storage unit, and second image data that is past image data than the first image data. A local homography matrix that calculates a local homography matrix corresponding to the first image data based on the local homography matrix and stores the local homography matrix corresponding to the calculated first image data An acquisition unit;
An image data conversion unit that converts the first image data to generate converted image data using a local homography matrix corresponding to the first image data calculated by the local homography matrix acquisition unit; ,
An image correlation analysis unit that calculates a similarity by analyzing a correlation between the converted image data generated by the image data conversion unit and the reference image data stored in the reference image storage unit;
Feature point extraction that extracts image feature points from the first image data captured by the image data acquisition unit and the reference image data stored in the reference image storage unit, and calculates the relative positions of these feature points And
A global homography matrix corresponding to the first image data is calculated based on the relative position of the feature points calculated by the feature point extraction unit, and a global homography matrix corresponding to the calculated first image data A global homography matrix acquisition unit for storing
When the similarity calculated by the image correlation analysis unit exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored. When the similarity calculated by the image correlation analysis unit is less than or equal to the threshold value, the global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit is read. A homography matrix transfer unit to store in
A homography matrix acquisition apparatus comprising:
画像データを取り込む画像データ取得ステップと、
前記画像データ取得ステップにおいて取り込んだ第1の画像データと参照画像記憶部に記憶された参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得ステップと、
前記局所的ホモグラフィー行列取得ステップにおいて計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換ステップと、
前記画像データ変換ステップにおいて生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析ステップと、
前記画像相関分析ステップにおいて計算した前記類似度が閾値を超える場合に、前記局所的ホモグラフィー行列取得ステップにおいて記憶した前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶部に記憶し、前記画像相関分析ステップにおいて計算した前記類似度が前記閾値以下である場合に、前記第1の画像データと前記参照画像記憶部に記憶された参照画像データとの画像の特徴点の相対位置に基づいて計算されて記憶された第1の画像データに対応する大域的ホモグラフィー行列を読み込んで前記記憶部に記憶するホモグラフィー行列転送ステップと、
を有することを特徴とするホモグラフィー行列取得方法。
An image data acquisition step for capturing image data;
The first image data captured in the image data acquisition step, the reference image data stored in the reference image storage unit, and the local corresponding to the second image data that is past image data than the first image data. A local homography matrix acquisition step of calculating a local homography matrix corresponding to the first image data based on the homography matrix and storing the local homography matrix corresponding to the calculated first image data When,
An image data conversion step of converting the first image data and generating converted image data using the local homography matrix corresponding to the first image data calculated in the local homography matrix acquisition step; ,
An image correlation analysis step of calculating a similarity by analyzing a correlation between the converted image data generated in the image data conversion step and the reference image data stored in the reference image storage unit;
When the similarity calculated in the image correlation analysis step exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition step is read and stored in the storage unit When the similarity calculated in the image correlation analysis step is equal to or less than the threshold value, relative positions of image feature points between the first image data and the reference image data stored in the reference image storage unit A homography matrix transfer step of reading a global homography matrix corresponding to the first image data calculated and stored based on
A homography matrix acquisition method characterized by comprising:
参照画像データを記憶する参照画像記憶部を備えたコンピューターを、
画像データを取り込む画像データ取得部と、
前記画像データ取得部が取り込んだ第1の画像データと前記参照画像記憶部に記憶された前記参照画像データと前記第1の画像データよりも過去の画像データである第2の画像データに対応する局所的ホモグラフィー行列とに基づいて第1の画像データに対応する局所的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する局所的ホモグラフィー行列を記憶する局所的ホモグラフィー行列取得部と、
前記局所的ホモグラフィー行列取得部が計算した前記第1の画像データに対応する局所的ホモグラフィー行列を用いて、前記第1の画像データを変換して変換画像データを生成する画像データ変換部と、
前記画像データ変換部が生成した前記変換画像データと前記参照画像記憶部に記憶された前記参照画像データとの画像の相関を分析して類似度を計算する画像相関分析部と、
前記画像データ取得部が取り込んだ前記第1の画像データと前記参照画像記憶部に記憶された前記参照画像データとから画像の特徴点を抽出し、これら特徴点の相対位置を計算する特徴点抽出部と、
前記特徴点抽出部が計算した前記特徴点の相対位置に基づいて第1の画像データに対応する大域的ホモグラフィー行列を計算し、この計算した第1の画像データに対応する大域的ホモグラフィー行列を記憶する大域的ホモグラフィー行列取得部と、
前記画像相関分析部が計算した前記類似度が閾値を超える場合には、前記局所的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する局所的ホモグラフィー行列を読み込んで記憶し、前記画像相関分析部が計算した前記類似度が前記閾値以下である場合には、前記大域的ホモグラフィー行列取得部に記憶された前記第1の画像データに対応する大域的ホモグラフィー行列を読み込んで記憶するホモグラフィー行列転送部と、
として機能させるホモグラフィー行列取得プログラム。
A computer equipped with a reference image storage unit for storing reference image data,
An image data acquisition unit for capturing image data;
The first image data captured by the image data acquisition unit, the reference image data stored in the reference image storage unit, and second image data that is past image data than the first image data. A local homography matrix that calculates a local homography matrix corresponding to the first image data based on the local homography matrix and stores the local homography matrix corresponding to the calculated first image data An acquisition unit;
An image data conversion unit that converts the first image data to generate converted image data using a local homography matrix corresponding to the first image data calculated by the local homography matrix acquisition unit; ,
An image correlation analysis unit that calculates a similarity by analyzing a correlation between the converted image data generated by the image data conversion unit and the reference image data stored in the reference image storage unit;
Feature point extraction that extracts image feature points from the first image data captured by the image data acquisition unit and the reference image data stored in the reference image storage unit, and calculates the relative positions of these feature points And
A global homography matrix corresponding to the first image data is calculated based on the relative position of the feature points calculated by the feature point extraction unit, and a global homography matrix corresponding to the calculated first image data A global homography matrix acquisition unit for storing
When the similarity calculated by the image correlation analysis unit exceeds a threshold, the local homography matrix corresponding to the first image data stored in the local homography matrix acquisition unit is read and stored. When the similarity calculated by the image correlation analysis unit is less than or equal to the threshold value, the global homography matrix corresponding to the first image data stored in the global homography matrix acquisition unit is read. A homography matrix transfer unit to store in
Homography matrix acquisition program to function as.
JP2010232961A 2010-10-15 2010-10-15 Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program Withdrawn JP2012086285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010232961A JP2012086285A (en) 2010-10-15 2010-10-15 Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010232961A JP2012086285A (en) 2010-10-15 2010-10-15 Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program

Publications (1)

Publication Number Publication Date
JP2012086285A true JP2012086285A (en) 2012-05-10

Family

ID=46258482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010232961A Withdrawn JP2012086285A (en) 2010-10-15 2010-10-15 Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program

Country Status (1)

Country Link
JP (1) JP2012086285A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104858877A (en) * 2015-04-28 2015-08-26 国家电网公司 Automatic replacement control system for high-voltage line drop switch and control method
CN104942816A (en) * 2015-04-28 2015-09-30 国家电网公司 Automatic changing control system and automatic changing control method on basis of laser technologies for line dropping switches
CN105093934A (en) * 2015-08-17 2015-11-25 哈尔滨工业大学 Distributed finite time tracking control method for multi-robot system in view of interference and model uncertainty
JP2017100242A (en) * 2015-12-02 2017-06-08 グローリー株式会社 Inspection robot system
CN113052900A (en) * 2021-04-23 2021-06-29 深圳市商汤科技有限公司 Position determination method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001195582A (en) * 2000-01-12 2001-07-19 Mixed Reality Systems Laboratory Inc Device and method for detecting image, device and system for three-dimensional display, display controller, and program storage medium
JP2003302345A (en) * 2002-04-11 2003-10-24 Denso Wave Inc Inspection method using robot and inspection system
JP2006146760A (en) * 2004-11-24 2006-06-08 Aisin Seiki Co Ltd Image transformation method and image transformation system
JP2008107860A (en) * 2005-06-20 2008-05-08 Mitsubishi Electric Information Technology Centre Europa Bv Method for estimating transformation between image pair, method for expressing image, device for this method, controller, and computer program
WO2009042265A1 (en) * 2007-09-26 2009-04-02 Honda Motor Co., Ltd. 3d beverage container localizer
JP2010152664A (en) * 2008-12-25 2010-07-08 Nissei Corp Sensorless motor-driven robot using image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001195582A (en) * 2000-01-12 2001-07-19 Mixed Reality Systems Laboratory Inc Device and method for detecting image, device and system for three-dimensional display, display controller, and program storage medium
JP2003302345A (en) * 2002-04-11 2003-10-24 Denso Wave Inc Inspection method using robot and inspection system
JP2006146760A (en) * 2004-11-24 2006-06-08 Aisin Seiki Co Ltd Image transformation method and image transformation system
JP2008107860A (en) * 2005-06-20 2008-05-08 Mitsubishi Electric Information Technology Centre Europa Bv Method for estimating transformation between image pair, method for expressing image, device for this method, controller, and computer program
WO2009042265A1 (en) * 2007-09-26 2009-04-02 Honda Motor Co., Ltd. 3d beverage container localizer
JP2010152664A (en) * 2008-12-25 2010-07-08 Nissei Corp Sensorless motor-driven robot using image

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104858877A (en) * 2015-04-28 2015-08-26 国家电网公司 Automatic replacement control system for high-voltage line drop switch and control method
CN104942816A (en) * 2015-04-28 2015-09-30 国家电网公司 Automatic changing control system and automatic changing control method on basis of laser technologies for line dropping switches
CN105093934A (en) * 2015-08-17 2015-11-25 哈尔滨工业大学 Distributed finite time tracking control method for multi-robot system in view of interference and model uncertainty
CN105093934B (en) * 2015-08-17 2017-08-25 哈尔滨工业大学 Consider interference and the distributed finite time tracking controller design method of multi-robot system of model uncertainty
JP2017100242A (en) * 2015-12-02 2017-06-08 グローリー株式会社 Inspection robot system
CN113052900A (en) * 2021-04-23 2021-06-29 深圳市商汤科技有限公司 Position determination method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111147741B (en) Focusing processing-based anti-shake method and device, electronic equipment and storage medium
KR101964861B1 (en) Cameara apparatus and method for tracking object of the camera apparatus
CN107471218B (en) Binocular vision-based hand-eye coordination method for double-arm robot
JP6090786B2 (en) Background difference extraction apparatus and background difference extraction method
JP6030617B2 (en) Image processing apparatus and image processing method
CN105741325B (en) A kind of method and movable object tracking equipment of tracked mobile target
CN105100580B (en) Monitoring system and control method for monitoring system
WO2019238113A1 (en) Imaging method and apparatus, and terminal and storage medium
JP2016516977A (en) Generating a 3D model of the environment
JP2015070328A (en) Imaging apparatus and control method for the same
JP5799516B2 (en) Robot apparatus, inspection apparatus, inspection program, and inspection method
JP2012185752A (en) Robot device, position/attitude detecting device, position/attitude detecting program, and position/attitude detecting method
JP2012086285A (en) Tracking robot device, tracking robot control method, tracking robot control program, homography matrix acquisition device, homography matrix acquisition method, and homography matrix acquisition program
JP2018189580A (en) Camera calibration device and camera calibration program
JP2014095553A (en) Camera pause estimation device and camera pause estimation program
JP4699056B2 (en) Automatic tracking device and automatic tracking method
JP2019062340A (en) Image shake correction apparatus and control method
WO2020257999A1 (en) Method, apparatus and platform for image processing, and storage medium
JP6178646B2 (en) Imaging apparatus and image shake correction processing method
JP2016081252A (en) Image processor and image processing method
CN114594770A (en) Inspection method for inspection robot without stopping
JP4469757B2 (en) Image processing device
JP7153505B2 (en) moving body
JP7013205B2 (en) Image shake correction device and its control method, image pickup device
JP2020120362A (en) Image processing device, image processing method, and program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20120127

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131011

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140805

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141111

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20141218