JP2010256108A - Distance measuring method - Google Patents

Distance measuring method Download PDF

Info

Publication number
JP2010256108A
JP2010256108A JP2009104794A JP2009104794A JP2010256108A JP 2010256108 A JP2010256108 A JP 2010256108A JP 2009104794 A JP2009104794 A JP 2009104794A JP 2009104794 A JP2009104794 A JP 2009104794A JP 2010256108 A JP2010256108 A JP 2010256108A
Authority
JP
Japan
Prior art keywords
image
imaging device
workpiece
unit
distance
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
JP2009104794A
Other languages
Japanese (ja)
Inventor
Toshinori Nagahashi
敏則 長橋
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 JP2009104794A priority Critical patent/JP2010256108A/en
Publication of JP2010256108A publication Critical patent/JP2010256108A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method which makes a corner part of an object to be measured correspond, with superior quality, to the image of the corner part in an image acquired by photographing the corner part in a stereo measurement method. <P>SOLUTION: The method relates to a distance measuring method for measuring the distance between a workpiece and an image capturing apparatus. The method includes: the reference part setting step in step S1 of setting a reference part by using information on the shape of the workpiece, and forming reference-part images acquired by looking the reference part from a plurality of directions; the imaging step in step S3 of photographing the workpiece from the plurality of directions with the image capturing apparatus, and forming a plurality of photographed images; the reference part detection step in step S4 of detecting the places of reference-part images wherein the reference part is photographed in the plurality of photographed images, by using the reference-part images; and the distance measuring step in step S5 of detecting the distance between the workpiece and the image capturing apparatus by using information on the places of the reference-part images. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、距離測定方法にかかわり、特に撮像装置で撮影した複数の画像を用いて被測定物と撮像装置との距離を測定する方法に関するものである。   The present invention relates to a distance measuring method, and more particularly to a method for measuring the distance between an object to be measured and an imaging device using a plurality of images taken by the imaging device.

撮像装置を用いて複数の場所から被測定物を撮影し、撮像装置から被測定物までの距離を測定するステレオ計測法が知られている。ステレオ計測法は、複数の視点から撮影した画像を用いて撮像装置から被測定物の各測定点までの距離を三角測量の原理により測定する方法である。   A stereo measurement method is known in which an object to be measured is photographed from a plurality of locations using an imaging device, and a distance from the imaging device to the object to be measured is measured. The stereo measurement method is a method of measuring the distance from the imaging device to each measurement point of the object to be measured based on the principle of triangulation using images taken from a plurality of viewpoints.

ステレオ計測法ではある測定点を撮影した測定点像が複数の画像においてどの場所に位置するかを検出する必要がある。この測定点像を検出し易くする方法が特許文献1に開示されている。それによると、2つの方向から撮影した画像を映像信号の周波数成分にて分割して複数水準の画像を形成している。その画像を2次微分処理して3値化処理を行うことによりエッジ(以下角部と称す)を検出している。そして、2つの方向から撮影した画像を比較して測定点像が対応する場所を検出していた。   In the stereo measurement method, it is necessary to detect where a measurement point image obtained by photographing a measurement point is located in a plurality of images. A method for facilitating detection of the measurement point image is disclosed in Patent Document 1. According to this, images taken from two directions are divided by the frequency component of the video signal to form a multi-level image. Edges (hereinafter referred to as corners) are detected by subjecting the image to quadratic differentiation and ternary processing. And the place which the measurement point image respond | corresponded was detected by comparing the image image | photographed from two directions.

特許第3539788号公報Japanese Patent No. 3539788

被測定物に角部が少ないときには、撮影した各画像における角部の像が少なくなる。そして、撮影した複数の画像において被測定物のある角部に対応する角部の場所を検出し難くなる。そのとき、撮像装置と被測定物との距離を誤測定する可能性が高くなる。そして、被測定物のある角部と撮影した画像における角部の像とを品質良く対応させる方法が望まれていた。   When the object to be measured has a small number of corners, the number of corners in each photographed image decreases. And it becomes difficult to detect the location of the corner | angular part corresponding to the corner | angular part with a to-be-measured object in several image | photographed images. At that time, the possibility of erroneous measurement of the distance between the imaging device and the object to be measured increases. There has been a demand for a method of matching a corner portion of the object to be measured with an image of the corner portion in the photographed image with high quality.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態または適用例として実現することが可能である。   SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.

[適用例1]
本適用例にかかる距離測定方法は、被測定物と撮像装置との距離を測定する距離測定方法であって、前記被測定物の形状情報を用いて参照部を設定し、前記参照部を複数の方向から見た参照部画像を生成する参照部設定工程と、前記被測定物を複数の方向から前記撮像装置にて撮影し、複数の撮影画像を生成する撮像工程と、前記参照部画像を用いて複数の前記撮影画像において前記参照部が撮影された参照部像の場所を検出する参照部検出工程と、前記参照部像の場所の情報を用いて前記被測定物と前記撮像装置との距離を検出する距離測定工程と、を有することを特徴とする。
[Application Example 1]
The distance measurement method according to this application example is a distance measurement method for measuring the distance between the object to be measured and the imaging device, and sets a reference unit using shape information of the object to be measured, and includes a plurality of reference units. A reference part setting step for generating a reference part image viewed from the direction of the image, an imaging step for photographing the object to be measured by the imaging device from a plurality of directions and generating a plurality of photographed images, and the reference part image. A reference unit detecting step for detecting a location of a reference portion image obtained by photographing the reference portion in a plurality of the photographed images, and using the information on the location of the reference portion image, the measurement object and the imaging device. And a distance measuring step for detecting the distance.

この距離測定方法によれば、参照部設定工程において参照部画像を生成している。撮像工程において撮影画像を生成し、参照部検出工程では撮影画像における参照部の場所を検出している。このとき、撮影画像において参照部画像と一致もしくは類似する場所を検索することにより参照部像の場所を検出している。   According to this distance measurement method, the reference part image is generated in the reference part setting step. A captured image is generated in the imaging step, and the location of the reference portion in the captured image is detected in the reference portion detection step. At this time, the location of the reference portion image is detected by searching for a location that matches or is similar to the reference portion image in the captured image.

その後、距離測定工程では、被測定物と撮像装置との距離を検出する。撮影画像における参照部の場所が検出されているので、撮像装置の光軸方向に対して参照部が位置する方向を検出することができる。撮影は複数の方向から行われる。そして、撮影するときの撮像装置の位置と撮像装置の光軸方向に対する参照部が位置する方向との複数の情報が得られる。この情報と三角測量法とを用いることにより撮像装置と参照部との距離を算出することができる。従って、撮像装置と被測定物との距離を算出することができる。   Thereafter, in the distance measurement step, the distance between the object to be measured and the imaging device is detected. Since the location of the reference portion in the captured image is detected, the direction in which the reference portion is located with respect to the optical axis direction of the imaging device can be detected. Shooting is performed from a plurality of directions. Then, a plurality of pieces of information on the position of the imaging device at the time of shooting and the direction in which the reference unit is located with respect to the optical axis direction of the imaging device is obtained. By using this information and the triangulation method, the distance between the imaging device and the reference unit can be calculated. Therefore, the distance between the imaging device and the object to be measured can be calculated.

撮影画像において参照部像の場所を検出するとき、撮影画像において参照部画像と一致もしくは類似する場所を検索する。従って、参照部の場所を誤った場所に選定し難くすることができる。   When detecting the location of the reference image in the captured image, a location that matches or is similar to the reference image in the captured image is searched. Therefore, it is possible to make it difficult to select the location of the reference portion as an incorrect location.

[適用例2]
上記適用例にかかる距離測定方法において、前記参照部設定工程では前記被測定物の形状情報を用いて前記被測定物の角部を抽出し、前記参照部は前記角部を含む場所を設定することを特徴とする。
[Application Example 2]
In the distance measurement method according to the application example, in the reference portion setting step, a corner portion of the measurement object is extracted using shape information of the measurement object, and the reference portion sets a location including the corner portion. It is characterized by that.

この距離測定方法によれば、被測定物の形状情報から角部を抽出している。被測定物を撮影するときに角部は輝度の変化する場所になり易い。そして、撮影画像から検索し易い場所となる。従って、角部を含む場所を参照部に設定することにより、参照部を検索し易くすることができる。   According to this distance measuring method, the corner is extracted from the shape information of the object to be measured. When photographing an object to be measured, the corner easily becomes a place where the luminance changes. And it becomes a place where it is easy to search from a picked-up image. Therefore, the reference portion can be easily searched by setting the location including the corner portion as the reference portion.

[適用例3]
上記適用例にかかる距離測定方法において、前記参照部の候補となる場所が複数あるとき、前記角部の形状から前記参照部を選択する選択順位を設定し、前記選択順位の高い前記候補を前記参照部に選択することを特徴とする。
[Application Example 3]
In the distance measurement method according to the application example, when there are a plurality of locations that are candidates for the reference portion, a selection order for selecting the reference portion from the shape of the corner is set, and the candidate with a high selection order is selected as the candidate It selects as a reference part, It is characterized by the above-mentioned.

この距離測定方法によれば、参照部を選択する選択順位が設定されている。従って、参照部の候補となる場所が複数あるときにも、検出し易い参照部を選択することができる。   According to this distance measurement method, the selection order for selecting the reference portion is set. Therefore, even when there are a plurality of locations that are candidates for the reference portion, it is possible to select a reference portion that is easy to detect.

[適用例4]
上記適用例にかかる距離測定方法において、前記参照部画像は前記被測定物の立体モデルを所定の平面に投影したときの画像を演算して形成することを特徴とする。
[Application Example 4]
In the distance measurement method according to the application example described above, the reference portion image is formed by calculating an image when a three-dimensional model of the object to be measured is projected on a predetermined plane.

この距離測定方法によれば、参照部画像は演算して形成される。被測定物を撮影して参照部像を形成するときには、撮影条件により角部が明確に撮影できない場合がある。この方法に比べて、演算して参照部画像を形成する方が精度良く参照部画像を形成することができる。   According to this distance measurement method, the reference portion image is formed by calculation. When the reference object image is formed by photographing the object to be measured, the corner portion may not be clearly photographed depending on photographing conditions. Compared to this method, it is possible to form the reference portion image with higher accuracy by calculating and forming the reference portion image.

[適用例5]
上記適用例にかかる距離測定方法において、前記被測定物を構成する面の法線方向ベクトルと所定の方向を示す単位ベクトルとの内積を演算した内積量を算出し、前記内積量の分布が変化する場所を検索して前記角部を検出することを特徴とする。
[Application Example 5]
In the distance measuring method according to the application example described above, an inner product amount obtained by calculating an inner product of a normal direction vector of a surface constituting the object to be measured and a unit vector indicating a predetermined direction is calculated, and the distribution of the inner product amount is changed. The corner is detected by searching for a place to perform.

この距離測定方法によれば、被測定物を構成する面の法線方向ベクトルと所定の方向を示す単位ベクトルとの内積を演算した内積量を算出している。そして、内積量の分布が変化する場所を角部としている。従って、隣接する面の向きが異なる場所を角部として検出することができる。   According to this distance measuring method, the inner product amount obtained by calculating the inner product of the normal direction vector of the surface constituting the object to be measured and the unit vector indicating the predetermined direction is calculated. And the corner | angular part is the place where distribution of the inner product amount changes. Therefore, a place where the directions of adjacent surfaces are different can be detected as a corner.

ピッキング装置の構成を示す概略斜視図。The schematic perspective view which shows the structure of a picking apparatus. ピッキング装置の電気制御ブロック図。The electric control block diagram of a picking apparatus. ワークをピッキングする工程を示すフローチャート。The flowchart which shows the process of picking a workpiece | work. ワークをピッキングする方法を説明するための模式図。The schematic diagram for demonstrating the method of picking a workpiece | work. ワークをピッキングする方法を説明するための模式図。The schematic diagram for demonstrating the method of picking a workpiece | work. ワークをピッキングする方法を説明するための模式図。The schematic diagram for demonstrating the method of picking a workpiece | work. ワークをピッキングする方法を説明するための模式図。The schematic diagram for demonstrating the method of picking a workpiece | work. ワークをピッキングする方法を説明するための模式図。The schematic diagram for demonstrating the method of picking a workpiece | work. ワークをピッキングする方法を説明するための模式図。The schematic diagram for demonstrating the method of picking a workpiece | work.

以下、具体化した実施形態について図面に従って説明する。尚、各図面における各部材は、各図面上で認識可能な程度の大きさとするため、各部材毎に縮尺を異ならせて図示している。   Hereinafter, specific embodiments will be described with reference to the drawings. In addition, each member in each drawing is illustrated with a different scale for each member in order to make the size recognizable on each drawing.

(実施形態)
本実施形態においてワークの場所を検出してピッキングするピッキング装置と、ワークの場所を特徴的な測定方法を用いて測定した後ピッキングする場合の例について図1〜図9に従って説明する。尚、ピッキング装置にはワークの場所を検出する測定装置が含まれる。
(Embodiment)
A picking apparatus that detects and picks a workpiece location in the present embodiment, and an example of picking after measuring the workpiece location using a characteristic measurement method will be described with reference to FIGS. The picking device includes a measuring device that detects the location of the workpiece.

(ピッキング装置)
まず、ピッキング装置について図1及び図2に従って説明する。図1は、ピッキング装置の構成を示す概略斜視図である。図1に示すように、ピッキング装置1は、主に作業台2、収納台3、測定装置4、ロボット5、制御装置6等により構成されている。
(Picking device)
First, the picking apparatus will be described with reference to FIGS. FIG. 1 is a schematic perspective view showing the configuration of the picking apparatus. As shown in FIG. 1, the picking apparatus 1 is mainly configured by a work table 2, a storage table 3, a measuring device 4, a robot 5, a control device 6, and the like.

作業台2はピッキング装置1の略中央に配置され、直方体形状に形成されている。本実施形態では、この作業台2の長手方向をX方向とし、水平面にてX方向と直交する方向をY方向とする。鉛直方向をZ方向とする。作業台2上には長方形の積載板7が配置されている。そして、積載板7の上には複数の被測定物としてのワーク8が重置されている。このワーク8は一面が四角形の板状に形成され、多方向を向いて積まれている。   The work table 2 is disposed substantially at the center of the picking apparatus 1 and has a rectangular parallelepiped shape. In the present embodiment, the longitudinal direction of the work table 2 is the X direction, and the direction orthogonal to the X direction on the horizontal plane is the Y direction. The vertical direction is the Z direction. A rectangular loading plate 7 is arranged on the work table 2. A plurality of workpieces 8 as objects to be measured are placed on the loading plate 7. The work 8 is formed in a square plate shape on one side and is stacked facing multiple directions.

作業台2のY方向側には測定装置4が配置されている。測定装置4はZ方向に長い直方体状に形成された基台9を備えている。基台9の上側にはXYテーブル10が配置され、XYテーブル10の上には第1支持部11が配置されている。XYテーブル10はX方向に移動する直動機構とY方向に移動する直動機構とを備えている。そして、XYテーブル10は第1支持部11をX方向及びY方向に移動することができる。さらに、XYテーブル10には移動量を検出する検出部を備えている。そして、基台9に対する第1支持部11の位置を検出することができる。   A measuring device 4 is disposed on the Y direction side of the work table 2. The measuring device 4 includes a base 9 formed in a rectangular parallelepiped shape that is long in the Z direction. An XY table 10 is disposed on the upper side of the base 9, and a first support portion 11 is disposed on the XY table 10. The XY table 10 includes a linear motion mechanism that moves in the X direction and a linear motion mechanism that moves in the Y direction. The XY table 10 can move the first support portion 11 in the X direction and the Y direction. Further, the XY table 10 is provided with a detection unit that detects the movement amount. And the position of the 1st support part 11 with respect to the base 9 is detectable.

直動機構は、例えば、1方向に延びるネジ軸(駆動軸)と、同ネジ軸と螺合するボールナットを供えたネジ式直動機構であって、その駆動軸が所定のパルス信号を受けて所定のステップ単位で正逆転する図示しないステップモーターに連結されている。そして、所定のステップ数に相当する駆動信号がステップモーターに入力されると、ステップモーターが正転または反転して、テーブルが同ステップ数に相当する分だけ、往動または復動するようになっている。直動機構はこの機構に限定されない。他にも、直動機構にリニアーモーターを採用することができる。   The linear motion mechanism is, for example, a screw type linear motion mechanism provided with a screw shaft (drive shaft) extending in one direction and a ball nut screwed to the screw shaft, and the drive shaft receives a predetermined pulse signal. Are connected to a step motor (not shown) that rotates forward and backward in predetermined step units. When a drive signal corresponding to a predetermined number of steps is input to the step motor, the step motor rotates forward or reverse, and the table moves forward or backward by an amount corresponding to the number of steps. ing. The linear motion mechanism is not limited to this mechanism. In addition, a linear motor can be used for the linear motion mechanism.

第1支持部11の上には第1支持部回転部12が配置されている。第1支持部回転部12は回転機構を備えている。この回転機構は、例えば、モーター、減速ギア、ローターエンコーダー等から構成されている。そして、回転機構は、XYテーブル10に対して第1支持部11をZ方向を中心にして回転させることができる。   A first support part rotating part 12 is disposed on the first support part 11. The 1st support part rotation part 12 is provided with the rotation mechanism. This rotation mechanism is composed of, for example, a motor, a reduction gear, a rotor encoder, and the like. The rotation mechanism can rotate the first support portion 11 with respect to the XY table 10 around the Z direction.

第1支持部11の作業台2側にはX方向に長く形成された板状の第2支持部13が配置されている。そして、第1支持部11の内部には第2支持部13と対向する場所に第2支持部回転部14が配置されている。第2支持部回転部14は回転機構を備えている。この回転機構は第1支持部回転部12における回転機構と同様の機構を用いることができる。そして、第2支持部回転部14は第1支持部11に対して第2支持部13をY方向を中心にして回転させることができる。   A plate-like second support portion 13 formed long in the X direction is disposed on the work support 2 side of the first support portion 11. A second support rotating unit 14 is disposed in the first support unit 11 at a location facing the second support unit 13. The 2nd support part rotation part 14 is provided with the rotation mechanism. As this rotation mechanism, a mechanism similar to the rotation mechanism in the first support portion rotation unit 12 can be used. And the 2nd support part rotation part 14 can rotate the 2nd support part 13 centering on the Y direction with respect to the 1st support part 11. FIG.

第2支持部13には第1撮像装置15及び第2撮像装置16が配置されている。第1撮像装置15及び第2撮像装置16は作業台2の方向を撮影可能に設置され、積載板7及びワーク8を撮影することができる。第1撮像装置15と第2撮像装置16との間には照明装置17が配置されている。さらに、第1撮像装置15及び第2撮像装置16の両側にも照明装置17が配置されている。照明装置17は積載板7に向けて設置され、積載板7及びワーク8に光を照射する。   A first imaging device 15 and a second imaging device 16 are arranged on the second support portion 13. The first imaging device 15 and the second imaging device 16 are installed so as to be able to photograph the direction of the work table 2 and can photograph the loading plate 7 and the workpiece 8. An illumination device 17 is disposed between the first imaging device 15 and the second imaging device 16. Further, illumination devices 17 are arranged on both sides of the first imaging device 15 and the second imaging device 16. The lighting device 17 is installed toward the stacking plate 7 and irradiates the stacking plate 7 and the work 8 with light.

測定装置4はXYテーブル10、第1支持部回転部12、第2支持部回転部14を駆動させることにより、ワーク8を所望の角度から撮影することが可能になっている。   The measuring device 4 can photograph the workpiece 8 from a desired angle by driving the XY table 10, the first support unit rotating unit 12, and the second support unit rotating unit 14.

作業台2の図中右側にはロボット5が配置されている。本実施形態ではロボット5に垂直多関節ロボットを採用したが、これに限らず、水平他関節型ロボットや直交ロボットを採用することができる。ロボット5には複数のアームが関節を挟んで配置されている。そして、複数のアームの先端には腕部20が配置されている。腕部20は直動機構を備え、直動機構には一対の指部20aが配置されている。この直動機構を駆動することによりロボット5は指部20aの間隔を変更する。そして、腕部20は指部20aの間にワーク8を挟んで把持することができる。   A robot 5 is disposed on the right side of the work table 2 in the figure. In the present embodiment, a vertical articulated robot is used as the robot 5, but the present invention is not limited to this, and a horizontal articulated robot or an orthogonal robot can be used. The robot 5 has a plurality of arms arranged with joints therebetween. And the arm part 20 is arrange | positioned at the front-end | tip of a some arm. The arm portion 20 includes a linear motion mechanism, and a pair of finger portions 20a is disposed in the linear motion mechanism. By driving this linear motion mechanism, the robot 5 changes the interval between the finger portions 20a. And the arm part 20 can hold | grip the workpiece | work 8 between the finger parts 20a.

ロボット5のX方向には収納台3が配置されている。そして、収納台3上にはワーク8が重ねて配置されている。ロボット5は積載板7上のワーク8をピッキングし、ワーク8の向きを揃えて収納台3上に重置する。その結果、収納台3上ではワーク8が整列して配置される。作業台2の図中左側には制御装置6が配置されている。制御装置6は測定装置4及びロボット5の制御を行う装置である。   A storage table 3 is arranged in the X direction of the robot 5. A work 8 is placed on the storage table 3 in an overlapping manner. The robot 5 picks the work 8 on the loading plate 7 and places the work 8 on the storage table 3 with the direction of the work 8 aligned. As a result, the workpieces 8 are arranged and arranged on the storage table 3. A control device 6 is disposed on the left side of the work table 2 in the drawing. The control device 6 is a device that controls the measuring device 4 and the robot 5.

図2は、ピッキング装置の電気制御ブロック図である。図2において、制御装置6はプロセッサーとして各種の演算処理を行うCPU(中央処理装置)21と、各種情報を記憶する記憶部としてのメモリー22とを有する。   FIG. 2 is an electric control block diagram of the picking apparatus. In FIG. 2, the control device 6 includes a CPU (Central Processing Unit) 21 that performs various arithmetic processes as a processor, and a memory 22 as a storage unit that stores various types of information.

測定装置駆動回路23、第1撮像装置15、第2撮像装置16は、入出力インターフェース24及びデータバス25を介してCPU21に接続されている。さらに、入力装置26、表示装置27、ロボット駆動回路28も入出力インターフェース24及びデータバス25を介してCPU21に接続されている。   The measurement device drive circuit 23, the first imaging device 15, and the second imaging device 16 are connected to the CPU 21 via the input / output interface 24 and the data bus 25. Further, the input device 26, the display device 27, and the robot drive circuit 28 are also connected to the CPU 21 via the input / output interface 24 and the data bus 25.

測定装置駆動回路23はXYテーブル10、第1支持部回転部12、第2支持部回転部14と接続されている。そして、測定装置駆動回路23はXYテーブル10、第1支持部回転部12、第2支持部回転部14に設置されたモーターを駆動する回路である。測定装置駆動回路23はXYテーブル10、第1支持部回転部12、第2支持部回転部14が備える位置検出装置の出力を入力する。そして、測定装置駆動回路23は第2支持部13を所望の位置に移動して停止することができる。第2支持部13には第1撮像装置15及び第2撮像装置16が設定されていることから、測定装置駆動回路23は第1撮像装置15及び第2撮像装置16を所望の方向に傾斜させることができる。従って、第1撮像装置15及び第2撮像装置16はワーク8を所望の方向から撮影することができる。   The measurement device drive circuit 23 is connected to the XY table 10, the first support part rotating unit 12, and the second support unit rotating unit 14. The measuring device drive circuit 23 is a circuit that drives motors installed on the XY table 10, the first support unit rotating unit 12, and the second support unit rotating unit 14. The measurement device drive circuit 23 inputs the output of the position detection device provided in the XY table 10, the first support unit rotation unit 12, and the second support unit rotation unit 14. And the measuring device drive circuit 23 can move the 2nd support part 13 to a desired position, and can stop it. Since the first imaging device 15 and the second imaging device 16 are set in the second support unit 13, the measurement device drive circuit 23 tilts the first imaging device 15 and the second imaging device 16 in a desired direction. be able to. Accordingly, the first imaging device 15 and the second imaging device 16 can photograph the workpiece 8 from a desired direction.

第1撮像装置15及び第2撮像装置16は内部にエリアセンサーを備えている。そして、エリアセンサーは、撮影した画像をデジタル信号に変換する変換回路を内蔵する。この変換回路は画像の情報をデジタル信号にして送信する。そして、CPU21から画像を撮影する指示信号を受信すると、画像を撮影した後、その画像のデジタル信号をメモリー22へ送信する。メモリー22は画像のデジタル信号を記憶する。   The first imaging device 15 and the second imaging device 16 include an area sensor inside. The area sensor incorporates a conversion circuit that converts a captured image into a digital signal. This conversion circuit transmits image information as a digital signal. When an instruction signal for capturing an image is received from the CPU 21, the image is captured and a digital signal of the image is transmitted to the memory 22. The memory 22 stores an image digital signal.

第1撮像装置15及び第2撮像装置16はフォーカス機構を備えている。そして、フォーカス機構は、撮像レンズにより投影される画像の焦点が第1撮像装置15及び第2撮像装置16のエリアセンサーにあうように、フォーカス調整を行う。CPU21の指示により、フォーカス機構は画像の焦点が合う場所を変更する。   The first imaging device 15 and the second imaging device 16 are provided with a focus mechanism. Then, the focus mechanism performs focus adjustment so that the focus of the image projected by the imaging lens matches the area sensors of the first imaging device 15 and the second imaging device 16. In accordance with an instruction from the CPU 21, the focus mechanism changes the place where the image is focused.

入力装置26は、ワーク8の形状、測定条件、ロボット5の動作指示等に関する各種データを入力する装置である。入力装置26は、例えば、ワーク8の形状データを外部機器から入力する。表示装置27は、測定条件や作業状況を表示する装置であり、操作者は、表示装置27に表示される情報を基に、入力装置26を用いて入力操作を行う。   The input device 26 is a device for inputting various data related to the shape of the workpiece 8, measurement conditions, operation instructions of the robot 5, and the like. For example, the input device 26 inputs shape data of the workpiece 8 from an external device. The display device 27 is a device that displays measurement conditions and work conditions, and an operator performs an input operation using the input device 26 based on information displayed on the display device 27.

ロボット駆動回路28はロボット5を駆動する回路である。ロボット5には複数のサーボモーターが設置されている。ロボット駆動回路28は各モーターの回転角度を所定の角度になるように制御する。そして、ロボット駆動回路28はロボット5の姿勢を所望の姿勢に制御する。   The robot drive circuit 28 is a circuit that drives the robot 5. The robot 5 is provided with a plurality of servo motors. The robot drive circuit 28 controls the rotation angle of each motor to be a predetermined angle. The robot drive circuit 28 controls the posture of the robot 5 to a desired posture.

メモリー22は、RAM、ROM等といった半導体メモリーや、ハードディスク、CD−ROMといった外部記憶装置を含む概念である。機能的には、ピッキング装置1における動作の制御手順が記述されたプログラムソフト29を記憶する記憶領域が設定される。さらに、ロボット5における各部の寸法やモーターの駆動条件等のロボット関連データ30を記憶するための記憶領域も設定される。他にも、ワーク8の形状を設計したときのワーク形状データ31を記憶するための記憶領域が設定される。   The memory 22 is a concept including a semiconductor memory such as a RAM and a ROM, and an external storage device such as a hard disk and a CD-ROM. Functionally, a storage area for storing the program software 29 in which the operation control procedure in the picking apparatus 1 is described is set. In addition, a storage area for storing robot-related data 30 such as dimensions of each part of the robot 5 and driving conditions of the motor is also set. In addition, a storage area for storing the workpiece shape data 31 when the shape of the workpiece 8 is designed is set.

さらに、第1撮像装置15及び第2撮像装置16が撮影した画像のデータである撮像データ32を記憶するための記憶領域も設定される。さらに、ワーク8の画像から参照部を選択するときに基準となる参照部選択データ33や、参照部を多方向から見た画像を算出したデータである参照部画像データ34等の記憶領域を記憶するための記憶領域が設定される。他にも、CPU21のためのワークエリアやテンポラリーファイル等として機能する記憶領域やその他各種の記憶領域が設定される。   Furthermore, a storage area for storing imaging data 32 that is data of images taken by the first imaging device 15 and the second imaging device 16 is also set. Further, storage areas such as reference portion selection data 33 serving as a reference when selecting a reference portion from the image of the work 8 and reference portion image data 34 which is data obtained by calculating an image obtained by viewing the reference portion from multiple directions are stored. A storage area is set. In addition, a work area for the CPU 21, a storage area that functions as a temporary file, and other various storage areas are set.

CPU21は、メモリー22内に記憶されたプログラムソフト29に従って、ワーク8が位置する場所の高さを測定する制御を行う。そして、最も上に位置するワーク8をピッキングする動作の制御を行うものである。具体的な機能実現部として、ワーク8の設計情報を用いてワーク8の立体形状を構成する角部を解析するワーク形状解析部37を有する。他にも、ワーク8を構成する複数の角部の中から特徴的な場所を参照部として設定する参照部設定部38を有する。   The CPU 21 performs control for measuring the height of the place where the workpiece 8 is located in accordance with the program software 29 stored in the memory 22. And the operation | movement which picks the workpiece | work 8 located in the top is controlled. As a specific function realization part, it has the work shape analysis part 37 which analyzes the corner | angular part which comprises the solid shape of the workpiece | work 8 using the design information of the workpiece | work 8. FIG. In addition, a reference unit setting unit 38 that sets a characteristic place as a reference unit from among a plurality of corners constituting the workpiece 8 is provided.

さらに、測定装置4が撮影する方向の指示信号を測定装置駆動回路23に出力し、第1撮像装置15及び第2撮像装置16にワーク8を撮影する指示信号を出力する撮像制御部39を有する。他にも、撮影した2つの画像における参照部を検出する参照部検出部40を有する。さらに、各画像における参照部の場所の情報を用いて第1撮像装置15及び第2撮像装置16とワーク8との距離を演算する距離演算部41を有する。他にも、ロボット5にピッキングする指示信号を出力するロボット制御部42を有する。   Furthermore, it has an imaging control unit 39 that outputs an instruction signal in the direction in which the measuring device 4 takes an image to the measuring device drive circuit 23 and outputs an instruction signal for taking an image of the workpiece 8 to the first imaging device 15 and the second imaging device 16. . In addition, a reference unit detection unit 40 that detects a reference unit in two captured images is provided. Furthermore, it has the distance calculating part 41 which calculates the distance of the workpiece | work 8 and the 1st imaging device 15 and the 2nd imaging device 16 using the information of the location of the reference part in each image. In addition, a robot control unit 42 that outputs an instruction signal for picking the robot 5 is provided.

(測定方法)
次に、上述したピッキング装置1を使って、第1撮像装置15及び第2撮像装置16とワーク8との距離を測定し、ワーク8をピッキングする方法について図3〜図9にて説明する。図3は、ワークをピッキングする工程を示すフローチャートである。図4〜図9は、ワークをピッキングする方法を説明するための模式図である。
(Measuring method)
Next, a method of measuring the distances between the first imaging device 15 and the second imaging device 16 and the workpiece 8 using the above-described picking device 1 and picking the workpiece 8 will be described with reference to FIGS. FIG. 3 is a flowchart showing a process of picking a workpiece. 4 to 9 are schematic views for explaining a method of picking a workpiece.

図3において、ステップS1は参照部設定工程に相当する。ワーク形状解析部がワークの設計情報を用いてワーク形状を構成する角部を抽出する。次に、参照部設定部が角部からなるパターンの中から参照部を設定する。そして、参照部設定部が参照部を複数の視点から観測するときの画像データを形成する工程である。ステップS2は、ワーク配置工程に相当し、作業台にワークを配置する工程である。次にステップS3に移行する。ステップS3は、撮像工程に相当し、2台の撮像装置を用いてワークを撮影する工程である。次にステップS4に移行する。ステップS4は、参照部検出工程に相当し、撮影した画像内で参照部に相当する像の場所を検出する工程である。次にステップS5に移行する。ステップS5は、距離測定工程に相当し、撮像装置とワークとの距離を演算する工程である。次にステップS6に移行する。   In FIG. 3, step S1 corresponds to a reference part setting step. The workpiece shape analysis unit extracts corner portions constituting the workpiece shape using the workpiece design information. Next, the reference part setting part sets the reference part from the pattern composed of the corners. The reference unit setting unit forms image data when the reference unit is observed from a plurality of viewpoints. Step S2 corresponds to a work placement process, and is a process of placing a work on the work table. Next, the process proceeds to step S3. Step S3 corresponds to an imaging step and is a step of photographing a workpiece using two imaging devices. Next, the process proceeds to step S4. Step S4 corresponds to a reference portion detection step, and is a step of detecting the location of the image corresponding to the reference portion in the photographed image. Next, the process proceeds to step S5. Step S5 corresponds to a distance measurement step, and is a step of calculating the distance between the imaging device and the workpiece. Next, the process proceeds to step S6.

ステップS6は、ワーク移動工程に相当し、ロボットがワークをピッキングして作業台から収納台へ移動する工程である。次にステップS7に移行する。ステップS7は、終了判断工程に相当し、予定したワークを総て移動したかを判断する工程である。まだ移動していないワークがあって移動を継続するとき、ステップS3に移行する。予定した総てのワークを移動したので移動を終了するとき、ワークをピッキングする作業を終了する。以上の工程によりワークをピッキングする作業工程を終了する。   Step S <b> 6 corresponds to a workpiece moving process, in which the robot picks the workpiece and moves from the work table to the storage table. Next, the process proceeds to step S7. Step S7 corresponds to an end determination step, and is a step of determining whether all scheduled workpieces have been moved. When there is a workpiece that has not yet moved and the movement is continued, the process proceeds to step S3. When all the scheduled works have been moved, the work of picking the work is finished when the movement is finished. The work process for picking a workpiece is completed by the above process.

次に、図4〜図9を用いて、図3に示したステップと対応させて、撮像装置とワークとの距離を測定し、ワークをピッキングする方法を詳細に説明する。図4〜図6はステップS1の参照部設定工程に対応する図である。図4(a)に示すようにワーク形状解析部37は仮想空間内にワーク立体像45を形成する。ワーク立体像45は、ワーク形状データ31を用いてワーク8と同じ形状を仮想空間内に形成した像である。ワーク立体像45は複数の角部46及び面47から構成されている。この角部46は隣接する面47が接合する線である。隣接する面47の間が曲面となっているときには、曲面の法線方向の変化が大きい場所を角部46とする。まず、ワーク形状解析部37はワーク立体像45における面47の情報から角部46を抽出する。   Next, a method for measuring the distance between the imaging device and the workpiece and picking the workpiece will be described in detail with reference to FIGS. 4 to 9 in association with the steps shown in FIG. 4 to 6 are diagrams corresponding to the reference unit setting step in step S1. As shown in FIG. 4A, the workpiece shape analysis unit 37 forms a workpiece stereoscopic image 45 in the virtual space. The workpiece three-dimensional image 45 is an image in which the same shape as the workpiece 8 is formed in the virtual space using the workpiece shape data 31. The work stereoscopic image 45 includes a plurality of corner portions 46 and a surface 47. This corner 46 is a line where adjacent surfaces 47 are joined. When the space between adjacent surfaces 47 is a curved surface, a corner 46 is defined as a place where the change in the normal direction of the curved surface is large. First, the workpiece shape analyzing unit 37 extracts the corner 46 from the information on the surface 47 in the workpiece stereoscopic image 45.

図4(b)は図4(a)におけるA−A’線から見た模式断面図である。この断面においてZ方向側には3方向を向く面が配置されている。AからA’側に向けての面47を第1面47a、第2面47b、第3面47c、第4面47dとする。第1面47aと第4面47dとは同一の面である。第1面47aにおける面の法線方向を示す単位ベクトルを法線方向ベクトルとしての第1面ベクトル48aとする。同様に、第2面47b、第3面47c、第4面47dにおける面の法線方向を示す単位ベクトルをそれぞれ法線方向ベクトルとしての第2面ベクトル48b、第3面ベクトル48c、第4面ベクトル48dとする。   FIG. 4B is a schematic cross-sectional view seen from the line A-A ′ in FIG. In this cross section, a surface facing three directions is arranged on the Z direction side. The surface 47 from A to the A ′ side is defined as a first surface 47a, a second surface 47b, a third surface 47c, and a fourth surface 47d. The first surface 47a and the fourth surface 47d are the same surface. A unit vector indicating the normal direction of the surface in the first surface 47a is defined as a first surface vector 48a as a normal direction vector. Similarly, the second surface vector 48b, the third surface vector 48c, and the fourth surface are unit vectors indicating the normal directions of the surfaces of the second surface 47b, the third surface 47c, and the fourth surface 47d, respectively. It is assumed that the vector 48d.

次に、ワーク形状解析部37は単位ベクトルとしての第1参照ベクトル49及び第2参照ベクトル50を設定する。第1参照ベクトル49及び第2参照ベクトル50は第1撮像装置15及び第2撮像装置16が配置された向きに設定されている単位ベクトルである。第1撮像装置15及び第2撮像装置16はワーク8に対する角度を変更可能である。第1参照ベクトル49及び第2参照ベクトル50は第1撮像装置15及び第2撮像装置16が移動する範囲の方向に向くのが好ましい。次に、ワーク形状解析部37は第1参照ベクトル49と第1面ベクトル48a〜第4面ベクトル48dの各ベクトルとの内積を演算する。   Next, the workpiece shape analysis unit 37 sets a first reference vector 49 and a second reference vector 50 as unit vectors. The first reference vector 49 and the second reference vector 50 are unit vectors set in the direction in which the first imaging device 15 and the second imaging device 16 are arranged. The first imaging device 15 and the second imaging device 16 can change the angle with respect to the workpiece 8. The first reference vector 49 and the second reference vector 50 are preferably directed in the direction of the range in which the first imaging device 15 and the second imaging device 16 move. Next, the workpiece shape analysis unit 37 calculates the inner product of the first reference vector 49 and each vector of the first surface vector 48a to the fourth surface vector 48d.

図4(c)は内積の演算を説明するための模式図である。図4(c)を用いて第1参照ベクトル49と第2面ベクトル48bとの内積量51を説明する。第1参照ベクトル49と第2面ベクトル48bとの成す角を交差角度52とする。ワーク形状解析部37は交差角度52の余弦関数を演算することにより内積量51を算出する。ワーク形状解析部37は面47の各場所において内積量51を算出する。   FIG. 4C is a schematic diagram for explaining the calculation of the inner product. The inner product amount 51 of the first reference vector 49 and the second surface vector 48b will be described with reference to FIG. An angle formed by the first reference vector 49 and the second surface vector 48b is defined as an intersection angle 52. The workpiece shape analysis unit 37 calculates the inner product amount 51 by calculating the cosine function of the intersection angle 52. The workpiece shape analysis unit 37 calculates the inner product amount 51 at each location on the surface 47.

図4(d)は第1参照ベクトル49に対する各面の内積量51の推移を示している。縦軸は内積量51を示し、上側は下側より大きな量となっている。横軸は面47の場所を示している。そして、第1内積分布線53は面47の各場所における内積量51の分布を示している。第1内積分布線53が示すように、第1面47a及び第4面47dでは内積量51が同じ量となっている。そして第2面47b及び第3面47cでは内積量51が同じ量となっている。そして、第1面47aと第2面47bとの間では第1内積分布線53が変化している。従って、第1面47aと第2面47bとの間で面47の向きが変化していることが検出できる。そして、この場所が角部46であることが検出される。同様に、第3面47cと第4面47dとの間の場所が角部46であることが検出される。   FIG. 4D shows the transition of the inner product amount 51 of each surface with respect to the first reference vector 49. The vertical axis represents the inner product amount 51, and the upper side is larger than the lower side. The horizontal axis indicates the location of the surface 47. The first inner product distribution line 53 indicates the distribution of the inner product amount 51 at each location on the surface 47. As indicated by the first inner product distribution line 53, the inner product amount 51 is the same in the first surface 47a and the fourth surface 47d. The inner surface amount 51 is the same on the second surface 47b and the third surface 47c. The first inner product distribution line 53 changes between the first surface 47a and the second surface 47b. Therefore, it can be detected that the orientation of the surface 47 changes between the first surface 47a and the second surface 47b. Then, it is detected that this place is the corner 46. Similarly, it is detected that the place between the third surface 47c and the fourth surface 47d is the corner portion 46.

図4(e)は第2参照ベクトル50に対する各面の内積量51の推移を示している。縦軸は内積量51を示し、上側は下側より大きな量となっている。横軸は面47の場所を示している。そして、第2内積分布線54は面47の各場所における内積量51の分布を示している。第2内積分布線54が示すように、第2面47bと第3面47cとの間では第2内積分布線54が変化している。従って、第2面47bと第3面47cとの間で面47の向きが変化していることが検出できる。そして、この場所が角部46であることが検出される。以上のことから、第1面47a〜第4面47dの各面の隣接する場所が角部46であることが検出される。以上のように、ワーク形状解析部37は第1内積分布線53及び第2内積分布線54を用いて角部46を検出する。   FIG. 4E shows the transition of the inner product amount 51 of each surface with respect to the second reference vector 50. The vertical axis represents the inner product amount 51, and the upper side is larger than the lower side. The horizontal axis indicates the location of the surface 47. The second inner product distribution line 54 indicates the distribution of the inner product amount 51 at each location on the surface 47. As indicated by the second inner product distribution line 54, the second inner product distribution line 54 changes between the second surface 47b and the third surface 47c. Therefore, it can be detected that the orientation of the surface 47 is changed between the second surface 47b and the third surface 47c. Then, it is detected that this place is the corner 46. From the above, it is detected that the adjacent portion of each surface of the first surface 47a to the fourth surface 47d is the corner portion 46. As described above, the workpiece shape analyzing unit 37 detects the corner 46 using the first inner product distribution line 53 and the second inner product distribution line 54.

図5(a)はワーク立体像45をZ方向から見た模式平面図である。そして、検出された角部46が明示されている。次に、参照部設定部38が参照候補部55を抽出する。参照候補部55は複数の角部46が交差する場所や角部46が円状になっている場所とする。ワーク立体像45をZ方向から見たとき、9個所の参照候補部55が抽出される。   FIG. 5A is a schematic plan view of the workpiece stereoscopic image 45 viewed from the Z direction. And the detected corner | angular part 46 is specified. Next, the reference part setting part 38 extracts the reference candidate part 55. The reference candidate part 55 is a place where a plurality of corners 46 intersect or a place where the corners 46 are circular. When the workpiece stereoscopic image 45 is viewed from the Z direction, nine reference candidate portions 55 are extracted.

図5(b)は参照部の選択順を示すリストである。図5(b)に示すように、参照部選択リスト56には参照候補部55から参照部を1つ選択するときの条件である項目欄に対して選択順位が設定されている。参照部選択リスト56は参照部選択データ33としてメモリー22に記憶されている。この項目の内容及び選択順位は特に限定されない。ワーク立体像45が複数あるとき、特徴のあるパターンが1個だけ選択されるように設定するのが好ましい。   FIG. 5B is a list showing the selection order of the reference parts. As shown in FIG. 5B, in the reference part selection list 56, a selection order is set for the item field that is a condition for selecting one reference part from the reference candidate part 55. The reference part selection list 56 is stored in the memory 22 as reference part selection data 33. The contents and selection order of this item are not particularly limited. When there are a plurality of workpiece stereoscopic images 45, it is preferable to set so that only one characteristic pattern is selected.

ワーク立体像45における参照候補部55について参照部選択リスト56の選択順位が1番目の項目から順次対象となる候補があるかを参照部設定部38が判断する。そして、4番目の選択順位の項目にある単独の2線交差に相当する場所があるので、参照部設定部38はこの項目に該当する場所を参照部とする。その結果、図5(c)に示すように参照部57が1箇所設定される。そして、参照部57の情報が参照部選択データ33としてメモリー22に記憶される。   For the reference candidate portion 55 in the work stereoscopic image 45, the reference portion setting portion 38 determines whether or not there are candidates that are targets sequentially from the first item in the selection order of the reference portion selection list 56. Since there is a place corresponding to a single two-line intersection in the fourth selection order item, the reference unit setting unit 38 sets a place corresponding to this item as a reference unit. As a result, one reference portion 57 is set as shown in FIG. The information of the reference unit 57 is stored in the memory 22 as reference unit selection data 33.

次に、図6に示すように、参照部設定部38は参照部57を複数の方向から見た参照部画像58を形成する。第1撮像装置15及び第2撮像装置16がワーク8を撮影するときに、第1撮像装置15及び第2撮像装置16とワーク8とが相対する可能性がある方向から見た画像を参照部設定部38が生成し、この画像を参照部画像58とする。従って、参照部画像58はワーク立体像45を所定の平面に投影したときの画像を演算して形成されている。この参照部画像58は多数形成される。そして、参照部設定部38は参照部画像58を参照部画像データ34としてメモリー22に記憶する。   Next, as illustrated in FIG. 6, the reference unit setting unit 38 forms a reference unit image 58 when the reference unit 57 is viewed from a plurality of directions. When the first imaging device 15 and the second imaging device 16 photograph the workpiece 8, an image viewed from the direction in which the first imaging device 15 and the second imaging device 16 and the workpiece 8 may face each other is referred to. The setting unit 38 generates the reference image 58 as a reference image. Accordingly, the reference portion image 58 is formed by calculating an image obtained when the workpiece stereoscopic image 45 is projected onto a predetermined plane. A large number of reference portion images 58 are formed. Then, the reference unit setting unit 38 stores the reference unit image 58 in the memory 22 as the reference unit image data 34.

図7(a)はステップS2のワーク配置工程及びステップS3の撮像工程に対応する図である。図7(a)に示すように、ステップS2において、作業台2上に積載板7が設置される。そして、積載板7上に複数のワーク8が重置される。ワーク8のZ方向には第1撮像装置15、第2撮像装置16、照明装置17がワーク8と対向する場所に配置されている。   FIG. 7A is a diagram corresponding to the workpiece placement process in step S2 and the imaging process in step S3. As shown in FIG. 7A, the loading plate 7 is installed on the work table 2 in step S2. A plurality of workpieces 8 are placed on the stacking plate 7. In the Z direction of the workpiece 8, the first imaging device 15, the second imaging device 16, and the illumination device 17 are arranged at a location facing the workpiece 8.

次に、ステップS3の撮像工程において、撮像制御部39が照明装置17にワーク8に対して光を照射させる。そして、撮像制御部39は第1撮像装置15及び第2撮像装置16にワーク8を撮影させる。撮影した画像は撮像データ32としてメモリー22に記憶される。図7(b)及び図7(c)はステップS3の撮像工程に対応する図である。図7(b)は第1撮像装置15が撮影した撮影画像としての第1画像61を示し、図7(c)は第2撮像装置16が撮影した撮影画像としての第2画像62を示している。   Next, in the imaging process of step S <b> 3, the imaging control unit 39 causes the illumination device 17 to irradiate the work 8 with light. Then, the imaging control unit 39 causes the first imaging device 15 and the second imaging device 16 to image the workpiece 8. The captured image is stored in the memory 22 as the imaging data 32. FIG. 7B and FIG. 7C are diagrams corresponding to the imaging process in step S3. FIG. 7B shows a first image 61 as a photographed image photographed by the first imaging device 15, and FIG. 7C shows a second image 62 as a photographed image photographed by the second imaging device 16. Yes.

撮像制御部39は第1画像61及び第2画像62に輪郭抽出フィルターを適用する。そして、第1画像61及び第2画像62における角部63の線を抽出する。第1画像61及び第2画像62において角部63は明度の分布が大きく変化する場所であり、輪郭抽出フィルターを適用することにより抽出することが可能である。輪郭抽出フィルターには、例えば、Sobelフィルター、Robinsonフィルター、Prewittフィルター、Robertsフィルター、Kirschフィルター等を適用することができる。角部63が円弧状になっている場合には、例えば、画像にハフ変換を適応することにより角部63の線を抽出することができる。   The imaging control unit 39 applies a contour extraction filter to the first image 61 and the second image 62. Then, the line of the corner 63 in the first image 61 and the second image 62 is extracted. In the first image 61 and the second image 62, the corner 63 is a place where the brightness distribution changes greatly, and can be extracted by applying a contour extraction filter. As the contour extraction filter, for example, a Sobel filter, a Robinson filter, a Prewitt filter, a Roberts filter, a Kirsch filter, or the like can be applied. When the corner 63 has an arc shape, for example, the line of the corner 63 can be extracted by applying the Hough transform to the image.

図8(a)及び図8(b)はステップS4の参照部検出工程及びステップS5の距離測定工程に対応する図である。図8(a)及び図8(b)に示すように、ステップS4において、参照部検出部40は第1画像61及び第2画像62から参照部像64を検索する。参照部検出部40はメモリー22の参照部画像データ34から参照部画像58の1つを入力する。そして、参照部検出部40はパターンマッチング法を用いて参照部画像58と一致する画像を検索する。続いて、メモリー22からの参照部画像58を入力し、入力した参照部画像58と一致する画像の検索を繰り返す。その結果、第1画像61及び第2画像62から参照部像64が抽出される。   FIGS. 8A and 8B are diagrams corresponding to the reference portion detection step in step S4 and the distance measurement step in step S5. As shown in FIGS. 8A and 8B, in step S <b> 4, the reference part detection unit 40 searches for the reference part image 64 from the first image 61 and the second image 62. The reference unit detection unit 40 inputs one of the reference unit images 58 from the reference unit image data 34 in the memory 22. Then, the reference portion detection unit 40 searches for an image that matches the reference portion image 58 using a pattern matching method. Subsequently, the reference portion image 58 from the memory 22 is input, and the search for an image that matches the input reference portion image 58 is repeated. As a result, the reference image 64 is extracted from the first image 61 and the second image 62.

次に、ステップS5において、第1画像61及び第2画像62における各参照部像64のX方向の位置を測定する。まず、第1画像61において、第1画像61の左端から各参照部像64までの距離65を検出する。第1画像61はX方向に画素が配列されている。そして、左端から各参照部像64までの画素数を計数することにより、第1画像61における各参照部像64のX方向の位置を検出する。同様に、第2画像62において第2画像62の左端から各参照部像64までの距離65を検出する。   Next, in step S5, the position in the X direction of each reference image 64 in the first image 61 and the second image 62 is measured. First, in the first image 61, the distance 65 from the left end of the first image 61 to each reference part image 64 is detected. In the first image 61, pixels are arranged in the X direction. Then, the position of each reference image 64 in the first image 61 in the X direction is detected by counting the number of pixels from the left end to each reference image 64. Similarly, in the second image 62, the distance 65 from the left end of the second image 62 to each reference part image 64 is detected.

図8(c)及び図9(a)はステップS5の距離測定工程に対応する図である。図8(c)に示すように、ステップS5において、第1撮像装置15に対するワーク8上の参照部8aの方向15aとの光軸15bとのなす角度15cを算出する。このとき、方向15aと光軸15bとがなす角度のうちX方向の成分の角度を角度15cとする。第1撮像装置15の内部には対物レンズ15dとエリアセンサー15eが配置されている。ワーク8の参照部8aにて反射した光は対物レンズ15dを通過してエリアセンサー15e上に結像する。この結像した参照部像64のX方向の場所は距離65として検出されている。対物レンズ15dとエリアセンサー15eとの距離であるレンズセンサー間距離15fは予め設定され、所定の値となっている。そして、エリアセンサー15eにおいてX方向と逆の端と光軸15bとの距離である光軸距離15gも予め設定され、所定の値となっている。   FIG. 8C and FIG. 9A are diagrams corresponding to the distance measuring step in step S5. As shown in FIG. 8C, in step S5, an angle 15c formed by the optical axis 15b and the direction 15a of the reference portion 8a on the work 8 with respect to the first imaging device 15 is calculated. At this time, the angle of the component in the X direction among the angles formed by the direction 15a and the optical axis 15b is defined as an angle 15c. An objective lens 15d and an area sensor 15e are arranged inside the first imaging device 15. The light reflected by the reference portion 8a of the work 8 passes through the objective lens 15d and forms an image on the area sensor 15e. A location in the X direction of the imaged reference portion image 64 is detected as a distance 65. A lens sensor distance 15f, which is a distance between the objective lens 15d and the area sensor 15e, is set in advance and has a predetermined value. In the area sensor 15e, the optical axis distance 15g, which is the distance between the end opposite to the X direction and the optical axis 15b, is also set in advance and has a predetermined value.

距離演算部41は光軸距離15gから距離65を引き算することにより、光軸15bと参照部像64とのX方向の距離である光軸参照部間距離15hを算出する。次に、光軸参照部間距離15hとレンズセンサー間距離15fと三角関数とを用いることにより、距離演算部41は角度15cを算出する。距離演算部41は第2撮像装置16においても同様の演算を行う。そして、第2撮像装置16に対するワーク8上の参照部8aの方向16aとの光軸16bとのなす角度16cを距離演算部41が算出する。   The distance calculation unit 41 subtracts the distance 65 from the optical axis distance 15g to calculate the optical axis reference portion distance 15h, which is the distance in the X direction between the optical axis 15b and the reference portion image 64. Next, the distance calculation unit 41 calculates the angle 15c by using the optical axis reference unit distance 15h, the lens sensor distance 15f, and the trigonometric function. The distance calculation unit 41 performs the same calculation also in the second imaging device 16. Then, the distance calculation unit 41 calculates an angle 16c formed by the optical axis 16b and the direction 16a of the reference unit 8a on the work 8 with respect to the second imaging device 16.

図9(a)に示すように、第1撮像装置15及び第2撮像装置16がX方向に並んで配置されている。そして、第1撮像装置15の光軸15bと第2撮像装置16の光軸16bとの距離である光軸間距離66は予め設定され、所定の値となっている。第1撮像装置15及び第2撮像装置16とワーク8上の参照部8aとの距離を参照部撮像装置間距離67とする。距離演算部41は光軸間距離66、角度15c、角度16cの各値と三角関数とを用いることにより参照部撮像装置間距離67を算出する。   As shown in FIG. 9A, the first imaging device 15 and the second imaging device 16 are arranged side by side in the X direction. The optical axis distance 66, which is the distance between the optical axis 15b of the first imaging device 15 and the optical axis 16b of the second imaging device 16, is set in advance and has a predetermined value. A distance between the first imaging device 15 and the second imaging device 16 and the reference unit 8a on the workpiece 8 is referred to as a reference unit imaging device distance 67. The distance calculating unit 41 calculates the distance 67 between the reference unit imaging devices by using each value of the optical axis distance 66, the angle 15c, the angle 16c, and the trigonometric function.

距離演算部41は複数のワーク8における参照部8aに対して参照部撮像装置間距離67を順次算出する。そして、距離演算部41は複数のワーク8の中で最も第1撮像装置15及び第2撮像装置16に近い場所に位置するワーク8を選出する。   The distance calculating unit 41 sequentially calculates the distance 67 between the reference unit imaging devices with respect to the reference unit 8 a in the plurality of workpieces 8. Then, the distance calculation unit 41 selects a workpiece 8 that is located closest to the first imaging device 15 and the second imaging device 16 among the plurality of workpieces 8.

図9(b)はステップS6のワーク移動工程に対応する図である。図9(b)に示すように、ステップS6において、ロボット制御部42はロボット5を駆動して、腕部20にワーク8を把持させる。このとき、ロボット制御部42は第1撮像装置15及び第2撮像装置16に近いワーク8を把持する。そして、ロボット制御部42はロボット5を移動させて、ワーク8を収納台3の上に載置する。   FIG. 9B is a diagram corresponding to the workpiece moving process in step S6. As shown in FIG. 9B, in step S6, the robot control unit 42 drives the robot 5 to cause the arm unit 20 to grip the workpiece 8. At this time, the robot control unit 42 holds the workpiece 8 close to the first imaging device 15 and the second imaging device 16. Then, the robot control unit 42 moves the robot 5 to place the work 8 on the storage table 3.

続いて、ステップS7の終了判断工程にて、ワーク8の移動を終了する判断を行うとき、作業を終了する。以上の工程によりワークをピッキングする作業工程を終了する。   Subsequently, when it is determined in the end determination step of step S7 that the movement of the workpiece 8 is to be ended, the work is ended. The work process for picking a workpiece is completed by the above process.

上述したように、本実施形態によれば、以下の効果を有する。
(1)本実施形態によれば、ステップS1の参照部設定工程において参照部画像58を生成している。ステップS3の撮像工程において撮影画像を生成し、ステップS4の参照部検出工程では第1画像61及び第2画像62における参照部像64の場所を検出している。このとき、第1画像61及び第2画像62において参照部画像58と一致もしくは類似する場所を検索することにより参照部像64の場所を検出している。従って、参照部像64の場所を誤った場所に選定し難くすることができる。
As described above, this embodiment has the following effects.
(1) According to the present embodiment, the reference portion image 58 is generated in the reference portion setting step of step S1. A captured image is generated in the imaging process of step S3, and the location of the reference part image 64 in the first image 61 and the second image 62 is detected in the reference part detection process of step S4. At this time, the location of the reference image 64 is detected by searching the first image 61 and the second image 62 for a location that matches or is similar to the reference image 58. Accordingly, it is possible to make it difficult to select the location of the reference portion image 64 as an incorrect location.

(2)本実施形態によれば、ワーク立体像45の形状情報から角部46を抽出している。角部46はワーク8を撮影するときに輝度の変化する場所になり易い。そして、第1画像61及び第2画像62から検索し易い場所となる。従って、参照部像64が角部63を含む場所とすることにより、参照部像64を検索し易くすることができる。   (2) According to the present embodiment, the corner 46 is extracted from the shape information of the workpiece stereoscopic image 45. The corner 46 tends to be a place where the luminance changes when the workpiece 8 is photographed. And it becomes a place where it is easy to search from the first image 61 and the second image 62. Therefore, the reference part image 64 can be easily searched by setting the reference part image 64 to include the corner part 63.

(3)本実施形態によれば、参照部選択リスト56に示すように参照部57を選択する選択順位が設定されている。従って、参照部57の候補となる場所が複数あるときにも、参照部設定部38は検出し易い参照部57を選択することができる。   (3) According to this embodiment, as shown in the reference part selection list 56, the selection order for selecting the reference part 57 is set. Therefore, even when there are a plurality of candidate locations for the reference unit 57, the reference unit setting unit 38 can select the reference unit 57 that is easy to detect.

(4)本実施形態によれば、参照部画像58は参照部設定部38により演算して形成される。ワーク8を撮影して参照部像を形成するときには、撮影条件により角部が明確に撮影できない場合がある。この方法に比べて、演算して参照部画像58を形成する方が精度良く参照部画像58を形成することができる。   (4) According to the present embodiment, the reference part image 58 is formed by calculation by the reference part setting unit 38. When the workpiece 8 is photographed to form the reference portion image, the corner portion may not be clearly photographed depending on the photographing conditions. Compared to this method, the reference portion image 58 can be formed with higher accuracy when the reference portion image 58 is formed by calculation.

(5)本実施形態によれば、ワーク立体像45を構成する面47の第1面ベクトル48a〜第4面ベクトル48dと第1参照ベクトル49及び第2参照ベクトル50との内積を演算した内積量51を算出している。そして、第1内積分布線53及び第2内積分布線54が変化する場所を角部46としている。従って、隣接する面47の向きが異なる場所を角部46として検出することができる。   (5) According to the present embodiment, the inner product obtained by calculating the inner product of the first surface vector 48 a to the fourth surface vector 48 d of the surface 47 constituting the workpiece stereoscopic image 45 and the first reference vector 49 and the second reference vector 50. The quantity 51 is calculated. And the corner | angular part 46 is the place where the 1st inner product distribution line 53 and the 2nd inner product distribution line 54 change. Therefore, a place where the direction of the adjacent surface 47 is different can be detected as the corner 46.

(6)本実施形態によれば、第1画像61及び第2画像62において参照部検出部40が参照部画像58と一致する場所を検索している。そして、参照部検出部40は参照部像64を検出している。参照部像64を検出する方法には映像信号の周波数成分にて分割して複数水準の画像を形成する方法がある。その方法では画像を2次微分処理して3値化処理を行うことにより角部を検出している。さらに、2つの画像における角部の位置から参照部を検出している。第1撮像装置15及び第2撮像装置16の視野が広い場合には、この方法に比べて、簡便に参照部を検出することができる。   (6) According to the present embodiment, the reference unit detection unit 40 searches the first image 61 and the second image 62 for a location that matches the reference unit image 58. Then, the reference part detection unit 40 detects the reference part image 64. As a method of detecting the reference image 64, there is a method of forming a multi-level image by dividing the frequency component of the video signal. In this method, a corner portion is detected by performing a second-order differentiation process on the image and performing a ternary process. Further, the reference portion is detected from the position of the corner portion in the two images. When the visual fields of the first imaging device 15 and the second imaging device 16 are wide, the reference portion can be detected more easily than this method.

(7)本実施形態によれば、第1画像61及び第2画像62において参照部検出部40が参照部画像58と一致する場所を検索している。従って、角部46の少ないワーク立体像45の場合にも参照部8aを検出することができる。   (7) According to the present embodiment, the reference unit detection unit 40 searches the first image 61 and the second image 62 for a location that matches the reference unit image 58. Accordingly, the reference portion 8a can be detected even in the case of the workpiece stereoscopic image 45 having a small number of corners 46.

尚、本実施形態は上述した実施形態に限定されるものではなく、種々の変更や改良を加えることも可能である。変形例を以下に述べる。
(変形例1)
前記実施形態では、角部46が交差した場所を参照部57に設定したが、参照部57は特徴的な場所であれば良い。例えば、参照部選択リスト56に示すように円、楕円、多角形等を設定することができる。この角部46は凹部の角でも良く、凸部の角でも良い。また、孔が形成されているときの角部でも良い。
In addition, this embodiment is not limited to embodiment mentioned above, A various change and improvement can also be added. A modification will be described below.
(Modification 1)
In the above embodiment, the place where the corner 46 intersects is set as the reference part 57, but the reference part 57 may be a characteristic place. For example, as shown in the reference part selection list 56, a circle, an ellipse, a polygon, or the like can be set. The corner 46 may be a concave corner or a convex corner. Moreover, the corner | angular part when a hole is formed may be sufficient.

(変形例2)
前記実施形態では、第1撮像装置15の光軸15bと第2撮像装置16の光軸16bとは平行に設置されたが、必ずしも平行でなくとも良い。
(Modification 2)
In the embodiment described above, the optical axis 15b of the first image pickup device 15 and the optical axis 16b of the second image pickup device 16 are installed in parallel.

(変形例3)
前記実施形態では、第1撮像装置15と第2撮像装置16との2台の撮像装置を用いた。撮像装置の台数は2台に限らず、3台以上を用いても良い。そして、1つの撮像装置から参照部8aが撮影できないとき、他の撮像装置から撮影するようにしても良い。各種の形状のワークに対応することができる。
(Modification 3)
In the embodiment, two imaging devices, the first imaging device 15 and the second imaging device 16, are used. The number of imaging devices is not limited to two, and three or more may be used. And when the reference part 8a cannot image | photograph from one imaging device, you may make it image | photograph from another imaging device. It can handle workpieces of various shapes.

(変形例4)
前記実施形態では、第1撮像装置15と第2撮像装置16との2台の撮像装置を用いた。そして、2方向からワーク8を撮影した。撮像装置は1台でも良い。そして、撮像装置を移動することにより、複数の方向からワーク8を撮影しても良い。解像度の高い撮像装置を用いるときには、撮像装置を製造するのが容易ではない。このときには、撮像装置の数を減らすことにより測定装置4を製造し易くすることができる。
(Modification 4)
In the embodiment, two imaging devices, the first imaging device 15 and the second imaging device 16, are used. The workpiece 8 was photographed from two directions. One imaging device may be used. And you may image | photograph the workpiece | work 8 from several directions by moving an imaging device. When an imaging device with high resolution is used, it is not easy to manufacture the imaging device. At this time, the measuring device 4 can be easily manufactured by reducing the number of imaging devices.

(変形例5)
前記実施形態では、角部46から参照部57を選定した。ワーク8にマークを配置して、このマークを参照部57にしても良い。ワーク8に特徴のある角部46がないときにも参照部57を設定することができる。
(Modification 5)
In the embodiment, the reference portion 57 is selected from the corner portion 46. A mark may be arranged on the work 8 and the mark may be used as the reference unit 57. The reference portion 57 can be set even when the workpiece 8 has no characteristic corner portion 46.

8…被測定物としてのワーク、8a,57…参照部、15…第1撮像装置、16…第2撮像装置、45…立体モデルとしてのワーク立体像、46…角部、48a…法線方向ベクトルとしての第1面ベクトル、48b…法線方向ベクトルとしての第2面ベクトル、48c…法線方向ベクトルとしての第3面ベクトル、48d…法線方向ベクトルとしての第4面ベクトル、49…単位ベクトルとしての第1参照ベクトル、50…単位ベクトルとしての第2参照ベクトル、51…内積量、58…参照部画像、61…撮影画像としての第1画像、62…撮影画像としての第2画像、64…参照部像、67…参照部撮像装置間距離。   DESCRIPTION OF SYMBOLS 8 ... Work as a to-be-measured object, 8a, 57 ... Reference part, 15 ... 1st imaging device, 16 ... 2nd imaging device, 45 ... Work solid image as a three-dimensional model, 46 ... Corner | angular part, 48a ... Normal direction First surface vector as vector, 48b ... Second surface vector as normal direction vector, 48c ... Third surface vector as normal direction vector, 48d ... Fourth surface vector as normal direction vector, 49 ... Unit First reference vector as vector, 50... Second reference vector as unit vector, 51... Inner product amount, 58... Reference portion image, 61... First image as captured image, 62. 64: Reference portion image, 67: Distance between reference portion imaging devices.

Claims (5)

被測定物と撮像装置との距離を測定する距離測定方法であって、
前記被測定物の形状情報を用いて参照部を設定し、前記参照部を複数の方向から見た参照部画像を生成する参照部設定工程と、
前記被測定物を複数の方向から前記撮像装置にて撮影し、複数の撮影画像を生成する撮像工程と、
前記参照部画像を用いて複数の前記撮影画像において前記参照部が撮影された参照部像の場所を検出する参照部検出工程と、
前記参照部像の場所の情報を用いて前記被測定物と前記撮像装置との距離を検出する距離測定工程と、を有することを特徴とする距離測定方法。
A distance measuring method for measuring a distance between an object to be measured and an imaging device,
A reference unit setting step for setting a reference unit using shape information of the object to be measured, and generating a reference unit image when the reference unit is viewed from a plurality of directions;
An imaging step of capturing the measured object from a plurality of directions with the imaging device and generating a plurality of captured images;
A reference part detection step of detecting a location of a reference part image obtained by photographing the reference part in the plurality of photographed images using the reference part image;
A distance measuring step of detecting a distance between the object to be measured and the imaging device using information on a location of the reference portion image.
請求項1に記載の距離測定方法であって、
前記参照部設定工程では前記被測定物の形状情報を用いて前記被測定物の角部を抽出し、前記参照部は前記角部を含む場所を設定することを特徴とする距離測定方法。
The distance measuring method according to claim 1,
In the reference part setting step, a corner part of the object to be measured is extracted using shape information of the object to be measured, and the reference part sets a location including the corner part.
請求項2に記載の距離測定方法であって、
前記参照部の候補となる場所が複数あるとき、前記角部の形状から前記参照部を選択する選択順位を設定し、前記選択順位の高い前記候補を前記参照部に選択することを特徴とする距離測定方法。
The distance measuring method according to claim 2,
When there are a plurality of locations that are candidates for the reference portion, a selection order for selecting the reference portion from the shape of the corner is set, and the candidate having a higher selection order is selected as the reference portion. Distance measurement method.
請求項3に記載の距離測定方法であって、
前記参照部画像は前記被測定物の立体モデルを所定の平面に投影したときの画像を演算して形成することを特徴とする距離測定方法。
The distance measuring method according to claim 3,
The distance measurement method according to claim 1, wherein the reference portion image is formed by calculating an image when a three-dimensional model of the object to be measured is projected on a predetermined plane.
請求項4に記載の距離測定方法であって、
前記被測定物を構成する面の法線方向ベクトルと所定の方向を示す単位ベクトルとの内積を演算した内積量を算出し、前記内積量の分布が変化する場所を検索して前記角部を検出することを特徴とする距離測定方法。
The distance measuring method according to claim 4,
The inner product amount is calculated by calculating the inner product of the normal direction vector of the surface constituting the object to be measured and the unit vector indicating a predetermined direction, and the corner portion is searched by searching for a place where the distribution of the inner product amount changes. A distance measuring method characterized by detecting.
JP2009104794A 2009-04-23 2009-04-23 Distance measuring method Withdrawn JP2010256108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009104794A JP2010256108A (en) 2009-04-23 2009-04-23 Distance measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009104794A JP2010256108A (en) 2009-04-23 2009-04-23 Distance measuring method

Publications (1)

Publication Number Publication Date
JP2010256108A true JP2010256108A (en) 2010-11-11

Family

ID=43317203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009104794A Withdrawn JP2010256108A (en) 2009-04-23 2009-04-23 Distance measuring method

Country Status (1)

Country Link
JP (1) JP2010256108A (en)

Similar Documents

Publication Publication Date Title
US11046530B2 (en) Article transfer apparatus, robot system, and article transfer method
US9672630B2 (en) Contour line measurement apparatus and robot system
JP5282717B2 (en) Robot system
CN102735166B (en) Spatial digitizer and robot system
US9679385B2 (en) Three-dimensional measurement apparatus and robot system
CN109118543B (en) System and method for calibrating a machine vision camera along at least three discrete planes
CN111028340A (en) Three-dimensional reconstruction method, device, equipment and system in precision assembly
CN112161619A (en) Pose detection method, three-dimensional scanning path planning method and detection system
JP7353757B2 (en) Methods for measuring artifacts
JP2020047049A (en) Image processing device and image processing method
CN112276936A (en) Three-dimensional data generation device and robot control system
JPH11166818A (en) Calibrating method and device for three-dimensional shape measuring device
JP5222430B1 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
JPS60200111A (en) Apparatus for recognizing three-dimensional object
JP2013130508A (en) Three-dimension measurement method, three-dimension measurement program, and robot device
JP7448633B2 (en) A three-dimensional measuring device that generates position information on the surface of an object based on images captured by multiple cameras.
JPH05196432A (en) Measuring equipment for three-dimensional coordinates
JP2004354320A (en) Recognition verification system for imaging object
WO2020075213A1 (en) Measurement apparatus, measurement method, and microscopic system
JP2010256108A (en) Distance measuring method
JP2697917B2 (en) 3D coordinate measuring device
JP5610579B2 (en) 3D dimension measuring device
TWM538293U (en) Stereoscopic image system with ultra-wide depth
WO2022124232A1 (en) Image processing system and image processing method
JP7450857B2 (en) Measurement parameter optimization method and device, and computer control program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20120703