[go: up one dir, main page]

JP2017182113A - Work determination apparatus and method - Google Patents

Work determination apparatus and method Download PDF

Info

Publication number
JP2017182113A
JP2017182113A JP2016063152A JP2016063152A JP2017182113A JP 2017182113 A JP2017182113 A JP 2017182113A JP 2016063152 A JP2016063152 A JP 2016063152A JP 2016063152 A JP2016063152 A JP 2016063152A JP 2017182113 A JP2017182113 A JP 2017182113A
Authority
JP
Japan
Prior art keywords
image
template
edge
workpiece
work
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.)
Pending
Application number
JP2016063152A
Other languages
Japanese (ja)
Inventor
尚史 三浦
Hisafumi Miura
尚史 三浦
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.)
Amada Co Ltd
Original Assignee
Amada Holdings Co Ltd
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 Amada Holdings Co Ltd filed Critical Amada Holdings Co Ltd
Priority to JP2016063152A priority Critical patent/JP2017182113A/en
Publication of JP2017182113A publication Critical patent/JP2017182113A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Manipulator (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a work determination device can determine whether a work is arranged at a loading site in a state where a front/rear of the work is correctly put in place.SOLUTION: A template image edge detection unit 34 is configured to generate a template edge image for making the template edge image perform pattern matching relative to a work arranged in a loading site, and a work shot image edge detection unit 35 is configured to generate a work shot edge image of work shot image data having a work shot. A work location detection unit 361 is configured to make template edge image match the work shot edge image to detect a position of the work. A front/rear determination-purpose characteristic image extraction unit 38 is configured to generate a template rear image; subtract an edge where a template image and a template rear image overlap with each other from the template image to extract a front/rear determination-purpose characteristic image. A front/rear determination unit 362 is configured to move the front/rear determination-purpose characteristic image to a position of the work; calculate a similarity degree between the work shot edge image and the front/rear determination-purpose characteristic image, and determine a front and rear of the work.SELECTED DRAWING: Figure 4

Description

本発明は、ワークが載置場所に表裏が正しい状態で配置されているかを判定することができるワーク判定装置及び方法に関する。   The present invention relates to a workpiece determination apparatus and method that can determine whether a workpiece is placed in a correct state at a placement place.

ベンディングマシン等の加工機で金属のワークを加工する際に、所定の載置場所に配置されているワークをワーク保持用ロボットで保持させて、加工機に搬入することがある。この場合、画像演算処理装置が、パターンマッチング用のテンプレート画像と、載置場所に配置されているワークをカメラによって撮影した撮影画像とをパターンマッチングさせることによって、ワークが載置場所内のどこにどのような向きで配置されているかを検出することができる。   When a metal workpiece is machined by a processing machine such as a bending machine, a workpiece placed at a predetermined placement location may be held by a workpiece holding robot and carried into the machining machine. In this case, the image calculation processing device performs pattern matching between the template image for pattern matching and a photographed image obtained by photographing the work placed at the placement place with the camera, so that where the work is located in the placement place. It can be detected whether it is arranged in such an orientation.

特開平7−319525号公報JP 7-319525 A 特開2000−288974号公報JP 2000-288974 A

作業者が誤って載置場所にワークを裏向きに配置してしまうことがある。ワークの表面と裏面とで特徴差が小さいと、表向きに配置されたワークと裏向きに配置されたワークとで、画像演算処理装置によるテンプレート画像とワークの撮影画像とのパターンマッチングによる合致率に大差が出ないことがある。   An operator may mistakenly place the work face down on the placement location. If the feature difference between the front and back surfaces of the workpiece is small, the matching rate is determined by pattern matching between the template image and the captured image of the workpiece between the workpiece placed face up and the workpiece placed face down. There may be no big difference.

すると、裏向きに配置されたワークがワーク保持用ロボットで保持されて加工機によって加工されてしまう。裏向きに配置されたワークが加工された製品は不良品となってしまう。   Then, the work arranged face down is held by the work holding robot and processed by the processing machine. A product obtained by processing a work placed face down will be a defective product.

このような問題を解決するために、ワークの表面用及び裏面用それぞれのテンプレート画像を用意し、ワークの撮影画像と表面用及び裏面用それぞれのテンプレート画像とをパターンマッチングさせることが考えられる。ワークの撮影画像と表面用のテンプレート画像とのパターンマッチングによる合致率が、ワークの撮影画像と裏面用のテンプレート画像とのパターンマッチングによる合致率よりも高ければ、ワークは正しく表向きに配置されていると判定することができる。   In order to solve such a problem, it is conceivable to prepare template images for the front surface and the back surface of the workpiece, and pattern-match the photographed image of the workpiece with the template images for the front surface and the back surface. If the matching rate by pattern matching between the photographed image of the workpiece and the template image for the front surface is higher than the matching rate by pattern matching between the photographed image of the workpiece and the template image for the back surface, the workpiece is correctly placed face up. Can be determined.

しかしながら、ワークの撮影画像と表面用及び裏面用それぞれのテンプレート画像とをパターンマッチングさせる方法では、パターンマッチングに要する処理時間が2倍必要となり、非効率的である。パターンマッチングに要する処理時間をさほど増大させることなく、効率的かつ的確にワークの表裏を判定する方法が求められる。   However, the method of performing pattern matching between the photographed image of the workpiece and the template images for the front and back surfaces requires two times the processing time required for pattern matching, which is inefficient. There is a need for a method for efficiently and accurately determining the front and back of a workpiece without significantly increasing the processing time required for pattern matching.

本発明は、ワークが載置場所に表裏が正しい状態で配置されているかを効率的かつ的確に判定することができるワーク判定装置及び方法を提供することを目的とする。   An object of this invention is to provide the workpiece determination apparatus and method which can determine efficiently and correctly whether the workpiece | work is arrange | positioned in the state where the front and back are correct in the mounting place.

本発明は、上述した従来の技術の課題を解決するため、載置場所に配置されているワークとパターンマッチングさせるためのテンプレート画像のエッジを検出して、テンプレートエッジ画像を生成するテンプレート画像エッジ検出部と、前記載置場所に配置されているワークを撮影したワーク撮影画像データのエッジを検出して、ワーク撮影エッジ画像を生成するワーク撮影画像エッジ検出部と、前記テンプレートエッジ画像と前記ワーク撮影エッジ画像とをマッチングさせて、前記載置場所に配置されている前記ワークの位置を検出するワーク位置検出部と、前記テンプレート画像の表裏を反転させて前記ワークの裏面を示すテンプレート裏画像を生成し、前記テンプレート画像から、前記テンプレート画像と前記テンプレート裏画像とが重なり合うエッジを差し引くことにより、前記ワークの表裏を判定するための表裏判定用特徴画像を抽出する表裏判定用特徴画像抽出部と、前記表裏判定用特徴画像を前記ワーク位置検出部によって検出された前記ワークの位置に移動させ、前記ワーク撮影エッジ画像と前記表裏判定用特徴画像との類似度を算出して、類似度に基づいて前記載置場所に配置されている前記ワークの表裏を判定する表裏判定部とを備えることを特徴とするワーク判定装置を提供する。   In order to solve the above-described problems of the related art, the present invention detects a template image edge for pattern matching with a workpiece placed at a placement location, and generates a template edge image. A workpiece photographed image edge detection unit that detects an edge of workpiece photographed image data obtained by photographing the workpiece placed at the above-described placement location, and generates a workpiece photographed edge image, the template edge image, and the workpiece photographed A workpiece position detection unit that detects the position of the workpiece arranged at the placement location by matching with an edge image, and generates a template back image showing the back side of the workpiece by inverting the front and back of the template image From the template image, the template image and the template back image are A feature image extracting unit for front / back determination for extracting a front / back determination feature image for determining the front / back of the workpiece by subtracting improper edges, and the feature image for front / back determination detected by the workpiece position detection unit. The workpiece is moved to the position of the workpiece, the degree of similarity between the workpiece photographing edge image and the feature image for front / back determination is calculated, and the front / back of the workpiece arranged at the above-described placement location is determined based on the similarity. Provided is a workpiece determination device including a front / back determination unit.

また、本発明は、上述した従来の技術の課題を解決するため、載置場所に配置されているワークとパターンマッチングさせるためのテンプレート画像のエッジを検出して、テンプレートエッジ画像を生成するテンプレート画像エッジ検出工程と、前記載置場所に配置されているワークを撮影したワーク撮影画像データのエッジを検出して、ワーク撮影エッジ画像を生成するワーク撮影画像エッジ検出工程と、前記テンプレートエッジ画像と前記ワーク撮影エッジ画像とをマッチングさせて、前記載置場所に配置されている前記ワークの位置を検出するワーク位置検出工程と、前記テンプレート画像の表裏を反転させて前記ワークの裏面を示すテンプレート裏画像を生成し、前記テンプレート画像から、前記テンプレート画像と前記テンプレート裏画像とが重なり合うエッジを差し引くことにより、前記ワークの表裏を判定するための表裏判定用特徴画像を抽出する表裏判定用特徴画像抽出工程と、前記表裏判定用特徴画像を前記ワーク位置検出工程にて検出された前記ワークの位置に移動させ、前記ワーク撮影エッジ画像と前記表裏判定用特徴画像との類似度を算出して、類似度に基づいて前記載置場所に配置されている前記ワークの表裏を判定する表裏判定工程とを含むことを特徴とするワーク判定方法を提供する。   In addition, in order to solve the above-described problems of the conventional technology, the present invention detects a template image edge for pattern matching with a workpiece placed at a placement place, and generates a template edge image. An edge detection step, a workpiece photographed image edge detection step for generating a workpiece photographed edge image by detecting an edge of the workpiece photographed image data obtained by photographing the workpiece arranged at the above-described placement location, the template edge image, and the template image A workpiece position detecting step for detecting the position of the workpiece arranged at the placement location by matching the workpiece photographing edge image, and a template back image showing the back side of the workpiece by inverting the front and back of the template image And generating the template image and the template from the template image. A feature image extracting step for front / back determination for extracting a front / back determination feature image for determining the front / back of the workpiece by subtracting an edge that overlaps the back / back image, and the feature image for front / back determination to the workpiece position detection step. To the position of the workpiece detected in this way, calculate the similarity between the workpiece photographing edge image and the front / back feature image, and based on the similarity, There is provided a workpiece determination method including a front / back determination step of determining a front / back side.

本発明のワーク判定装置及び方法によれば、ワークが載置場所に表裏が正しい状態で配置されているかを効率的かつ的確に判定することができる。   According to the workpiece determination apparatus and method of the present invention, it is possible to efficiently and accurately determine whether a workpiece is placed in a correct state at the place where the workpiece is placed.

加工システムの全体的な構成例を示す斜視図である。It is a perspective view showing the example of the whole composition of a processing system. 加工システムで加工するワークの一例を示す斜視図である。It is a perspective view which shows an example of the workpiece | work processed with a processing system. 一実施形態のワーク判定装置及びワーク保持用ロボットの制御装置を含む加工システムの全体的な構成例を示すブロック図である。1 is a block diagram illustrating an example of an overall configuration of a machining system including a workpiece determination device and a workpiece holding robot control device according to an embodiment. 図3の画像演算処理装置3及びロボット制御装置5の内部構成例を示すブロック図である。FIG. 4 is a block diagram illustrating an internal configuration example of the image arithmetic processing device 3 and the robot control device 5 of FIG. 3. 一実施形態のワーク判定装置の動作及び一実施形態のワーク判定方法を説明するための第1の部分的なフローチャートである。It is a 1st partial flowchart for demonstrating the operation | movement of the workpiece | work determination apparatus of one Embodiment, and the workpiece | work determination method of one Embodiment. 一実施形態のワーク判定装置の動作及び一実施形態のワーク判定方法を説明するための第2の部分的なフローチャートである。It is a 2nd partial flowchart for demonstrating the operation | movement of the workpiece | work determination apparatus of one Embodiment, and the workpiece | work determination method of one Embodiment. 一実施形態のワーク判定装置の動作及び一実施形態のワーク判定方法を説明するための第3の部分的なフローチャートである。It is a 3rd partial flowchart for demonstrating the operation | movement of the workpiece | work determination apparatus of one Embodiment, and the workpiece | work determination method of one Embodiment. 一実施形態のワーク判定装置の動作及び一実施形態のワーク判定方法を説明するための第4の部分的なフローチャートである。It is a 4th partial flowchart for demonstrating the operation | movement of the workpiece | work determination apparatus of one Embodiment, and the workpiece | work determination method of one Embodiment. 一実施形態のワーク判定装置及び方法で用いるワーク撮影画像の一例を示す図である。It is a figure which shows an example of the workpiece | work imaging | photography image used with the workpiece | work determination apparatus and method of one Embodiment. 一実施形態のワーク判定装置及び方法で用いるテンプレート画像を示す図である。It is a figure which shows the template image used with the workpiece | work determination apparatus and method of one Embodiment. 一実施形態のワーク判定装置及び方法で用いる塗りつぶしテンプレート画像を示す図である。It is a figure which shows the filling template image used with the workpiece | work determination apparatus and method of one Embodiment. 一実施形態のワーク判定装置及び方法で用いるテンプレート裏画像を示す図である。It is a figure which shows the template back image used with the workpiece | work determination apparatus and method of one Embodiment. 塗りつぶしテンプレート画像とテンプレート裏画像とをマッチング処理した状態を示す図である。It is a figure which shows the state which matched the fill template image and the template back image. 塗りつぶしテンプレート画像とテンプレート裏画像との重なりエッジを示す図である。It is a figure which shows the overlapping edge of a filling template image and a template back image. 塗りつぶしテンプレート画像から重なりエッジを差し引くことによって抽出される表裏判定用特徴画像を示す図である。It is a figure which shows the feature image for front / back determination extracted by subtracting an overlapping edge from a filling template image. 塗りつぶしテンプレート画像及びワーク撮影画像のエッジを検出するために用いる係数行列の一例を示す図である。It is a figure which shows an example of the coefficient matrix used in order to detect the edge of a filling template image and a workpiece | work imaging | photography image. 塗りつぶしテンプレート画像またはワーク撮影画像のエッジのエッジ強度を説明するための図である。It is a figure for demonstrating the edge strength of the edge of a filling template image or a workpiece | work imaging | photography image. テンプレート画像と塗りつぶしテンプレート画像のそれぞれをソーベル(Sobel)変換した状態を比較するための図である。It is a figure for comparing the state which carried out Sobel conversion of each of a template image and a filling template image. テンプレートエッジ画像とワーク撮影エッジ画像とのマッチング処理を説明し、テンプレートエッジ画像の位置が、テンプレートエッジ画像とワーク撮影エッジ画像との類似度が比較的小さくなる位置にある状態を示す概念図である。FIG. 5 is a conceptual diagram illustrating a state in which the template edge image and the workpiece photographing edge image are matched, and the position of the template edge image is at a position where the similarity between the template edge image and the workpiece photographing edge image is relatively small. . テンプレートエッジ画像とワーク撮影エッジ画像とのマッチング処理を説明し、テンプレートエッジ画像の位置が、テンプレートエッジ画像とワーク撮影エッジ画像との類似度が比較的大きくなる位置にある状態を示す概念図である。FIG. 6 is a conceptual diagram illustrating a matching process between a template edge image and a workpiece photographing edge image, and showing a state where the position of the template edge image is at a position where the similarity between the template edge image and the workpiece photographing edge image is relatively large. . ローディング台にワークが表向きに配置されているときのワーク撮影エッジ画像と、ローディング台にワークが裏向きに配置されているときのワーク撮影エッジ画像とを示す図である。It is a figure which shows the workpiece | work imaging | photography edge image when the workpiece | work is arrange | positioned face-up on a loading stand, and the workpiece | work imaging | photography edge image when a workpiece | work is arrange | positioned face-down on a loading stand. 表裏判定用特徴画像の拡大及び回転を示す図である。It is a figure which shows expansion and rotation of the feature image for front / back determination. ローディング台にワークが表向きに配置されているときのワーク撮影エッジ画像と拡大及び回転させた表裏判定用特徴画像との類似度を算出する処理と、ローディング台にワークが裏向きに配置されているときのワーク撮影エッジ画像と拡大及び回転させた表裏判定用特徴画像との類似度を算出する処理とを説明するための図である。A process of calculating the similarity between the workpiece photographing edge image when the workpiece is placed face up on the loading table and the enlarged and rotated feature image for front / back determination, and the workpiece is placed face down on the loading table. It is a figure for demonstrating the process which calculates the similarity degree of the workpiece | work imaging | photography edge image and the enlarged and rotated feature image for front and back determination.

以下、一実施形態のワーク判定装置及び方法について、添付図面を参照して説明する。   Hereinafter, a workpiece determination apparatus and method according to an embodiment will be described with reference to the accompanying drawings.

まず、図1を用いて、載置場所に配置されているワークをワーク保持用ロボットで保持させて、加工機に搬入するように構成されている加工システムの全体的な構成例を説明する。図1に示す構成例において、加工機10はベンディングマシンであり、ワーク保持用ロボット20は、ワークを吸着または把持してベンディングマシンへと搬送するワーク搬送ロボットである。   First, an example of the overall configuration of a machining system configured to hold a workpiece placed at a placement place with a workpiece holding robot and carry it into a processing machine will be described with reference to FIG. In the configuration example shown in FIG. 1, the processing machine 10 is a bending machine, and the workpiece holding robot 20 is a workpiece transfer robot that sucks or grips the workpiece and transfers it to the bending machine.

加工機はベンディングマシンに限定されることはなく、パンチングマシン、レーザマシン等の任意の加工機でよい。   The processing machine is not limited to a bending machine, and may be any processing machine such as a punching machine or a laser machine.

加工機10は、上下方向に移動自在の上部テーブル101と、固定されている下部テーブル102とを有する。上部テーブル101にはパンチ金型Tpが装着され、下部テーブル102にはダイ金型Tdが装着されている。加工機10には、後述するNC装置2(図3に図示)と接続された表示・操作部21(操作ペンダント)が装着されている。   The processing machine 10 includes an upper table 101 that is movable in the vertical direction and a fixed lower table 102. A punch die Tp is attached to the upper table 101, and a die die Td is attached to the lower table 102. The processing machine 10 is equipped with a display / operation unit 21 (operation pendant) connected to an NC device 2 (shown in FIG. 3) described later.

加工機10の前方には、多関節のワーク保持用ロボット20が設置されている。ワーク保持用ロボット20はガイドレール201上に配置されており、ガイドレール201に沿って移動自在に構成されている。   An articulated workpiece holding robot 20 is installed in front of the processing machine 10. The workpiece holding robot 20 is disposed on the guide rail 201 and is configured to be movable along the guide rail 201.

ワーク保持用ロボット20の前方には、ワークWの載置場所であるローディング台30が設置されている。ワークWは、図2に示すような所定の形状を有する金属の板材である。ここでは、ワークWは矩形状であり、部分的な切り起こし部W0を有する。切り起こし部W0は、細長く切り欠いた矩形状の穴W01と、穴W01の両端に連結し、穴W01の長手方向と直交する方向に伸びた切り込みW02及びW03を有する。ローディング台30には、複数枚のワークWが積み重ねられている。   In front of the workpiece holding robot 20, a loading table 30, which is a place where the workpiece W is placed, is installed. The workpiece W is a metal plate material having a predetermined shape as shown in FIG. Here, the workpiece W has a rectangular shape and has a partial cut-and-raised portion W0. The cut-and-raised portion W0 has a rectangular hole W01 that is elongated and cut, and cuts W02 and W03 that are connected to both ends of the hole W01 and extend in a direction perpendicular to the longitudinal direction of the hole W01. A plurality of workpieces W are stacked on the loading table 30.

複数枚のワークWは、ローディング台30に、面方向の位置がずれないように正確に積み重ねられているとは限らず、図1に示すように、面方向の位置がずれた状態で積み重ねられていることがある。ワークWが図1に示すように配置されている状態が、ワークWが正しく表向きに配置されている状態であるとする。   The plurality of workpieces W are not necessarily accurately stacked on the loading table 30 so that the positions in the surface direction do not shift, but are stacked with the positions in the surface direction shifted as shown in FIG. May have. It is assumed that the state in which the workpiece W is arranged as shown in FIG. 1 is the state in which the workpiece W is correctly arranged face up.

ローディング台30の近傍には、ローディング台30の設置面に対して所定の高さまで延びる支柱401が配置されている。支柱401は、所定の高さまで垂直方向に延び、ローディング台30側に水平方向に折れ曲がり、さらに、加工機10の方向へと折れ曲がっている。支柱401の先端部には、カメラ4が装着されている。   A column 401 extending to a predetermined height with respect to the installation surface of the loading table 30 is disposed in the vicinity of the loading table 30. The support column 401 extends in a vertical direction up to a predetermined height, is bent in the horizontal direction toward the loading table 30, and is further bent in the direction of the processing machine 10. The camera 4 is attached to the tip of the column 401.

カメラ4は、ローディング台30に置かれたワークWを撮影するように構成されている。ローディング台30上でのワークWの位置はずれることがあるから、カメラ4は、ローディング台30の全体を撮影するのがよい。例えば、ローディング台30の角部P0の位置を、カメラ4がローディング台30を撮影した撮影画像の原点とする。ワーク保持用ロボット20の原点位置は、撮影画像の原点と一致するように設定されている。   The camera 4 is configured to photograph the workpiece W placed on the loading table 30. Since the position of the workpiece W on the loading table 30 may be off, the camera 4 should take an image of the entire loading table 30. For example, the position of the corner P0 of the loading table 30 is set as the origin of the captured image obtained by the camera 4 capturing the loading table 30. The origin position of the workpiece holding robot 20 is set to coincide with the origin of the photographed image.

図3を用いて、加工機10及びワーク保持用ロボット20を制御する制御装置の構成及び動作を説明する。図3において、CAM1は、図示していないCADで生成されたワークWを示すCADデータを保持している。NC装置2は、加工機10を制御する。表示・操作部21は、NC装置2に接続されている。   The configuration and operation of a control device that controls the processing machine 10 and the workpiece holding robot 20 will be described with reference to FIG. In FIG. 3, CAM 1 holds CAD data indicating a work W generated by a CAD (not shown). The NC device 2 controls the processing machine 10. The display / operation unit 21 is connected to the NC device 2.

NC装置2には、画像演算処理装置3とロボット制御装置5が接続されている。画像演算処理装置3は、本実施形態のワーク判定装置を構成する。画像演算処理装置3は、例えばパーソナルコンピュータで構成することができる。画像演算処理装置3には、カメラ4が接続されている。   An image arithmetic processing device 3 and a robot control device 5 are connected to the NC device 2. The image arithmetic processing device 3 constitutes a work determination device of the present embodiment. The image arithmetic processing device 3 can be constituted by a personal computer, for example. A camera 4 is connected to the image arithmetic processing device 3.

後述するように、画像演算処理装置3は、ローディング台30に置かれたワークWの位置を検出し、検出した位置情報をロボット制御装置5に供給する。画像演算処理装置3は、ワークWの位置を検出するのに併せて、ワークWがローディング台30に表裏が正しい状態で配置されているかを判定する。ロボット制御装置5は、ワークWが表向きに配置されていれば、ワークWの位置情報に基づいてワーク保持用ロボット20を制御する。   As will be described later, the image calculation processing device 3 detects the position of the workpiece W placed on the loading table 30 and supplies the detected position information to the robot control device 5. In addition to detecting the position of the workpiece W, the image arithmetic processing device 3 determines whether the workpiece W is arranged on the loading table 30 with the front and back sides being correct. The robot controller 5 controls the workpiece holding robot 20 based on the position information of the workpiece W if the workpiece W is arranged face up.

図3に示す構成例では、加工機10を制御するNC装置2と、ワーク判定装置を構成する画像演算処理装置3と、ワーク保持用ロボット20を制御するロボット制御装置5とを別々に設けているが、これは単なる一例である。   In the configuration example shown in FIG. 3, the NC device 2 that controls the processing machine 10, the image arithmetic processing device 3 that constitutes the workpiece determination device, and the robot control device 5 that controls the workpiece holding robot 20 are provided separately. This is just an example.

NC装置2に画像演算処理装置3の機能を持たせることによって、NC装置2がワーク判定装置を構成してもよい。NC装置2とロボット制御装置5とが一体化されていてもよい。ロボット制御装置5に画像演算処理装置3の機能を持たせることによって、ロボット制御装置5がワーク判定装置を構成してもよい。   The NC device 2 may constitute a work determination device by providing the NC device 2 with the function of the image arithmetic processing device 3. The NC device 2 and the robot control device 5 may be integrated. The robot control device 5 may constitute a workpiece determination device by providing the robot control device 5 with the function of the image arithmetic processing device 3.

図3において、CAM1は、CADデータをNC装置2に転送する。NC装置2は、受け取ったCADデータを画像演算処理装置3に転送する。   In FIG. 3, the CAM 1 transfers CAD data to the NC device 2. The NC device 2 transfers the received CAD data to the image arithmetic processing device 3.

図4を用いて、画像演算処理装置3の機能的な内部構成を説明する。図4に示すように、画像演算処理装置3は、テンプレート画像作成部31,テンプレート画像塗りつぶし部32,テンプレート画像拡大縮小・回転処理部33,テンプレート画像エッジ検出部34を有する。   A functional internal configuration of the image arithmetic processing device 3 will be described with reference to FIG. As illustrated in FIG. 4, the image calculation processing device 3 includes a template image creation unit 31, a template image filling unit 32, a template image enlargement / reduction / rotation processing unit 33, and a template image edge detection unit 34.

また、画像演算処理装置3は、ワーク撮影画像エッジ検出部35,マッチング処理部36,表裏判定用特徴画像抽出部38を有する。マッチング処理部36は、ワーク位置検出部361と表裏判定部362とを含む。   Further, the image arithmetic processing device 3 includes a workpiece photographed image edge detection unit 35, a matching processing unit 36, and a front / back determination feature image extraction unit 38. The matching processing unit 36 includes a workpiece position detection unit 361 and a front / back determination unit 362.

テンプレート画像作成部31〜マッチング処理部36、及び、表裏判定用特徴画像抽出部38のそれぞれは、ソフトウェアモジュールによって構成することができる。テンプレート画像作成部31〜マッチング処理部36、及び、表裏判定用特徴画像抽出部38の少なくとも一部をハードウェアによって構成してもよい。ソフトウェアとハードウェアとを組み合わせてもよく、両者の使い分けは任意である。   Each of the template image creation unit 31 to the matching processing unit 36 and the front / back determination feature image extraction unit 38 can be configured by a software module. At least a part of the template image creation unit 31 to the matching processing unit 36 and the front / back determination feature image extraction unit 38 may be configured by hardware. Software and hardware may be combined, and the proper use of both is arbitrary.

図4に示す画像演算処理装置3の動作を、図5A〜図5Dのフローチャートを参照しながら説明する。図5Aにおいて、ワーク撮影画像エッジ検出部35は、ステップS10にて、カメラ4より出力されたワーク撮影画像データを取得する。ワーク撮影画像データは、カメラ4がローディング台30に置かれたワークWを撮影したデジタル静止画像データである。   4 will be described with reference to the flowcharts of FIGS. 5A to 5D. In FIG. 5A, the workpiece photographed image edge detection unit 35 acquires workpiece photographed image data output from the camera 4 in step S10. The work photographed image data is digital still image data obtained by photographing the work W placed on the loading table 30 by the camera 4.

図6は、ワーク撮影画像データが示すワーク撮影画像W30を概念的に示している。ワーク撮影画像W30は、ローディング台30上で最上位に配置されたワークWの画像を含む。   FIG. 6 conceptually shows the workpiece photographed image W30 indicated by the workpiece photographed image data. The workpiece photographed image W30 includes an image of the workpiece W arranged at the top on the loading table 30.

テンプレート画像作成部31は、ステップS21にて、NC装置2より転送されたCADデータを取得する。テンプレート画像作成部31は、ステップS22にて、CADデータを画像データに変換して、図7に示すようなテンプレート画像TWを作成する(テンプレート画像作成工程)。テンプレート画像TWは、ワークWを示すワーク線画像ImWを含む。図7〜図12,図19及び図20において、一点鎖線で示す矩形はそれぞれの画像(画像データ)の外縁を示している。   The template image creation unit 31 acquires the CAD data transferred from the NC device 2 in step S21. In step S22, the template image creation unit 31 converts CAD data into image data to create a template image TW as shown in FIG. 7 (template image creation step). The template image TW includes a work line image ImW showing the work W. 7 to 12, 19, and 20, a rectangle indicated by an alternate long and short dash line indicates an outer edge of each image (image data).

CADデータは、例えば、ワークWの形状の各点を示す座標がCSV形式で表されているデータである。テンプレート画像作成部31は、CSV形式のデータに基づいてワークWの形状を示すワーク線画像ImWを含むテンプレート画像TWを作成する。ワーク線画像ImWは、ワークWの外形線を示す画像である。ワークWは図2に示すように面内に切り起こし部W0を有するので、ワーク線画像ImWは、切り起こし部W0を示す切り起こし画像ImW0を含む。   The CAD data is, for example, data in which coordinates indicating each point of the shape of the workpiece W are expressed in CSV format. The template image creation unit 31 creates a template image TW including a work line image ImW indicating the shape of the work W based on the CSV format data. The work line image ImW is an image showing the outline of the work W. Since the workpiece W has a cut-and-raised portion W0 in the plane as shown in FIG. 2, the workpiece line image ImW includes a cut-and-raised image ImW0 showing the cut-and-raised portion W0.

このときのワーク線画像ImWの大きさは、ワークWの実寸に即した大きさである必要がある。そこで、予め1画素当たりの長さを求めておけば、テンプレート画像作成部31は、ワークWの寸法を何画素で表現すればよいかを算出することができる。テンプレート画像作成部31は、算出した画素数となるようにワーク線画像ImWを描画する。   At this time, the size of the workpiece line image ImW needs to be a size corresponding to the actual size of the workpiece W. Therefore, if the length per pixel is obtained in advance, the template image creation unit 31 can calculate how many pixels the dimension of the workpiece W should be expressed. The template image creation unit 31 draws the work line image ImW so as to have the calculated number of pixels.

具体的には、1画素の長さが0.5mmに相当し、ワークWの所定部分の長さが10cmであったとすれば、その部分を200画素で表現すればよい。   Specifically, if the length of one pixel corresponds to 0.5 mm and the length of a predetermined portion of the workpiece W is 10 cm, that portion may be expressed by 200 pixels.

テンプレート画像塗りつぶし部32は、ステップS23にて、ワーク線画像ImWの内部を例えば白で塗りつぶす(塗りつぶしテンプレート画像作成工程)。図8は、ワーク線画像ImWの外形線の内部を塗りつぶしたワーク塗りつぶし画像ImWwを含むテンプレート画像TWwを示している。図8におけるハッチングは、ワーク線画像ImWの内部を塗りつぶしていることを示す。以下、テンプレート画像TWwを塗りつぶしテンプレート画像TWwと称することとする。   In step S23, the template image filling unit 32 fills the inside of the work line image ImW with, for example, white (filling template image creating step). FIG. 8 shows a template image TWw including a workpiece fill image ImWw in which the inside of the outline of the workpiece line image ImW is filled. The hatching in FIG. 8 indicates that the inside of the work line image ImW is filled. Hereinafter, the template image TWw will be referred to as a filled template image TWw.

図8に示すように、切り起こし画像ImW0の内部は塗りつぶさないのがよい。テンプレート画像塗りつぶし部32は、ワーク線画像ImWの外形線の内部で、内部に存在する閉じた領域以外を所定の色で塗りつぶせばよい。ワーク線画像ImWの内部を塗りつぶしてワーク塗りつぶし画像ImWwとする理由については後述する。   As shown in FIG. 8, the inside of the cut and raised image ImW0 should not be filled. The template image filling unit 32 may fill a portion other than the closed region existing inside the outline of the work line image ImW with a predetermined color. The reason for filling the inside of the work line image ImW to make the work filled image ImWw will be described later.

図5AにおけるステップS21〜S23は、CADデータに基づいて、パターンマッチング用のテンプレート画像(塗りつぶしテンプレート画像TWw)を作成する塗りつぶしテンプレート画像作成処理を示している。   Steps S21 to S23 in FIG. 5A show a fill template image creation process for creating a pattern matching template image (fill template image TWw) based on CAD data.

ところで、CADデータに基づいてパターンマッチング用のテンプレート画像を作成するのではなく、予め、作業者が、カメラによってワークを撮影してパターンマッチング用のテンプレート画像を作成してもよい。但し、作業者が、ワークを撮影してパターンマッチング用のテンプレート画像を作成するのは煩雑である。よって、CADデータに基づいてパターンマッチング用のテンプレート画像を作成することが好ましい。   By the way, instead of creating a pattern matching template image based on CAD data, an operator may previously create a pattern matching template image by photographing a workpiece with a camera. However, it is cumbersome for an operator to photograph a workpiece and create a template image for pattern matching. Therefore, it is preferable to create a template image for pattern matching based on CAD data.

表裏判定用特徴画像抽出部38には、テンプレート画像塗りつぶし部32によって生成された塗りつぶしテンプレート画像TWwが供給される。表裏判定用特徴画像抽出部38には、ステップS31にて、塗りつぶしテンプレート画像TWwをの表裏を反転させることによって、図9に示すテンプレート裏画像ITWwを作成する。テンプレート裏画像ITWwは、ワーク線画像ImWを反転した反転ワーク塗りつぶし画像ImIWwを含む。反転ワーク塗りつぶし画像ImIWwは、反転切り起こし画像ImIW0を含む。   The front / back determination feature image extraction unit 38 is supplied with the filled template image TWw generated by the template image filling unit 32. In step S31, the front / back determination feature image extraction unit 38 creates the template back image ITWw shown in FIG. 9 by inverting the front and back of the filled template image TWw. The template back image ITWw includes an inverted work paint image ImIWw obtained by inverting the work line image ImW. The reverse workpiece filled image ImIWw includes the reverse cut-and-raised image ImIW0.

表裏判定用特徴画像抽出部38は、ステップS32にて、図8に示す塗りつぶしテンプレート画像TWwと、図9に示すテンプレート裏画像ITWwとをマッチングさせる。塗りつぶしテンプレート画像TWwとテンプレート裏画像ITWwとをマッチングさせると、図10に示すようになる。表裏判定用特徴画像抽出部38は、ステップS33にて、図11に示すように、重なり合ったエッジ(重なりエッジ)EOLを抽出する。   In step S32, the front / back determination feature image extraction unit 38 matches the filled template image TWw shown in FIG. 8 with the template back image ITWw shown in FIG. When the filled template image TWw and the template back image ITWw are matched, the result is as shown in FIG. In step S33, the front / back determination feature image extraction unit 38 extracts overlapping edges (overlapping edges) EOL as shown in FIG.

表裏判定用特徴画像抽出部38は、ステップS34にて、塗りつぶしテンプレート画像TWwから重なりエッジEOLを差し引いて、図12に示す表裏判定用特徴画像FWを抽出する(表裏判定用特徴画像抽出工程)。表裏判定用特徴画像FWは、塗りつぶしテンプレート画像TWwから切り起こし画像ImW0のみを抽出した画像に相当する。   In step S34, the front / back determination feature image extraction unit 38 subtracts the overlapping edge EOL from the filled template image TWw to extract the front / back determination feature image FW shown in FIG. 12 (front / back determination feature image extraction step). The front / back determination feature image FW corresponds to an image obtained by cutting and raising only the image ImW0 from the filled template image TWw.

図5AにおけるステップS31〜S34は、塗りつぶしテンプレート画像TWwより表裏判定用特徴画像FWを抽出する表裏判定用特徴画像抽出処理を示している。   Steps S31 to S34 in FIG. 5A show front / back determination feature image extraction processing for extracting the front / back determination feature image FW from the filled template image TWw.

テンプレート画像拡大縮小・回転処理部33は、図5BのステップS41にて、塗りつぶしテンプレート画像TWwを拡大または縮小する最低倍率をmin、最大倍率をmax、倍率の増分をkと設定する。   In step S41 of FIG. 5B, the template image enlargement / reduction / rotation processing unit 33 sets the minimum magnification for enlarging or reducing the filled template image TWw to min, the maximum magnification to max, and the magnification increment to k.

ローディング台30上のワークWをカメラ4で撮影するとき、積み重ねられているワークWの枚数によって最上位のワークWの撮影画像の大きさは変化する。塗りつぶしテンプレート画像TWwを最低倍率minから最大倍率maxの範囲で増分kごとに拡大または縮小させれば、ワークWの撮影画像の大きさが変化しても、塗りつぶしテンプレート画像TWwをワークWの撮影画像の大きさとほぼ一致させることができる。   When the work W on the loading table 30 is photographed by the camera 4, the size of the photographed image of the uppermost work W changes depending on the number of stacked works W. If the fill template image TWw is enlarged or reduced in increments of k in the range from the minimum magnification min to the maximum magnification max, the fill template image TWw is taken as the shot image of the workpiece W even if the size of the shot image of the workpiece W changes. It can be almost matched with the size of.

テンプレート画像拡大縮小・回転処理部33は、ステップS42にて、倍率bをminと設定し、ステップS43にて、塗りつぶしテンプレート画像TWwをb倍する(テンプレート画像拡大縮小工程)。   The template image enlargement / reduction / rotation processing unit 33 sets the magnification b to min in step S42, and in step S43 multiplies the filled template image TWw by b (template image enlargement / reduction step).

テンプレート画像拡大縮小・回転処理部33は、ステップS44にて、塗りつぶしテンプレート画像TWwの角度iを0°に初期化する。例えば、図8に示す塗りつぶしテンプレート画像TWwの左右方向の辺がワーク撮影画像W30の水平方向と平行となる角度を角度0°とすればよい。   In step S44, the template image enlargement / reduction / rotation processing unit 33 initializes the angle i of the filled template image TWw to 0 °. For example, the angle at which the left and right sides of the fill template image TWw shown in FIG. 8 are parallel to the horizontal direction of the workpiece photographed image W30 may be set to 0 °.

テンプレート画像拡大縮小・回転処理部33は、ステップS45にて、塗りつぶしテンプレート画像TWwを角度iだけ回転させる(テンプレート画像回転工程)。但し、ステップS44からステップS45に移行した場合、角度iは0°であるから、実質的には、テンプレート画像拡大縮小・回転処理部33は、塗りつぶしテンプレート画像TWwを回転させない。   In step S45, the template image enlargement / reduction / rotation processing unit 33 rotates the filled template image TWw by an angle i (template image rotation step). However, since the angle i is 0 ° when the process proceeds from step S44 to step S45, the template image enlargement / reduction / rotation processing unit 33 does not substantially rotate the filled template image TWw.

テンプレート画像エッジ検出部34は、図5CのステップS51にて、塗りつぶしテンプレート画像TWwのエッジを検出する(テンプレート画像エッジ検出工程)。テンプレート画像エッジ検出部34は、塗りつぶしテンプレート画像TWwのエッジを検出するために、ソーベル変換を用いるのが好適である。   The template image edge detection unit 34 detects an edge of the filled template image TWw in step S51 of FIG. 5C (template image edge detection step). The template image edge detection unit 34 preferably uses Sobel transformation in order to detect the edge of the filled template image TWw.

図13の(a)は、塗りつぶしテンプレート画像TWwの水平方向のエッジを検出するためのフィルタであり、図13の(b)は塗りつぶしテンプレート画像TWwの垂直方向のエッジを検出するためのフィルタである。それぞれのフィルタは3行3列の係数行列によって構成される。   13A is a filter for detecting the horizontal edge of the filled template image TWw, and FIG. 13B is a filter for detecting the vertical edge of the filled template image TWw. . Each filter is constituted by a coefficient matrix of 3 rows and 3 columns.

テンプレート画像エッジ検出部34は、ある注目画素を中心として、注目画素と、注目画素の上下左右及び斜め方向の8画素との合計9画素に対して、図13の(a)に示すフィルタのそれぞれ対応する位置の係数を乗算する。テンプレート画像エッジ検出部34は、9画素それぞれの乗算結果を加算して水平方向のエッジを検出する。   The template image edge detection unit 34 uses each of the filters shown in FIG. 13A for a total of nine pixels, including a target pixel and eight pixels in the upper, lower, left, right, and diagonal directions around the target pixel. Multiply by the corresponding position coefficient. The template image edge detection unit 34 adds the multiplication results for each of the nine pixels to detect the horizontal edge.

また、テンプレート画像エッジ検出部34は、注目画素を中心とした9画素に対して、図13の(b)のフィルタのそれぞれ対応する位置の係数を乗算する。テンプレート画像エッジ検出部34は、9画素それぞれの乗算結果を加算して垂直方向のエッジを検出する。   Further, the template image edge detection unit 34 multiplies the nine pixels centered on the target pixel by a coefficient at a position corresponding to each of the filters in FIG. The template image edge detection unit 34 adds the multiplication results of each of the nine pixels to detect the vertical edge.

テンプレート画像エッジ検出部34は、検出した水平方向のエッジと垂直方向のエッジとを加算することによって、塗りつぶしテンプレート画像TWwのエッジを検出する。   The template image edge detection unit 34 detects the edge of the filled template image TWw by adding the detected horizontal edge and vertical edge.

このとき、テンプレート画像エッジ検出部34は、エッジを構成するそれぞれの画素において、エッジの強度と勾配方向を算出するのがよい。図14において、それぞれの円は画素を示している。ハッチングを付して示す注目画素に対して、ソーベル変換によって水平方向のエッジの値(エッジ強度Eh)が5、垂直方向のエッジの値(エッジ強度Ev)が1と検出されたとする。   At this time, it is preferable that the template image edge detection unit 34 calculates the edge strength and the gradient direction for each pixel constituting the edge. In FIG. 14, each circle indicates a pixel. Assume that a horizontal edge value (edge intensity Eh) is detected as 5 and a vertical edge value (edge intensity Ev) is 1 as a result of Sobel transformation for a target pixel indicated by hatching.

図14に示すように、水平方向のエッジ強度Ehと、垂直方向のエッジ強度Evは、それぞれ、水平方向のベクトルEh、垂直方向のベクトルEvと考えることができる。   As shown in FIG. 14, the horizontal edge strength Eh and the vertical edge strength Ev can be considered as a horizontal vector Eh and a vertical vector Ev, respectively.

水平方向のベクトルEhと垂直方向のベクトルEvとの合成ベクトルEhvの大きさはそれぞれの画素におけるエッジ強度、合成ベクトルEhvの方向はエッジ勾配方向を示す。エッジ強度Emagnitudeは式(1)で、エッジ勾配方向Edirectionは式(2)で表すことができる。   The magnitude of the combined vector Ehv of the horizontal vector Eh and the vertical vector Ev indicates the edge intensity in each pixel, and the direction of the combined vector Ehv indicates the edge gradient direction. The edge strength Emagnitude can be expressed by Equation (1), and the edge gradient direction Edirection can be expressed by Equation (2).

Figure 2017182113
Figure 2017182113

Figure 2017182113
Figure 2017182113

テンプレート画像エッジ検出部34は、塗りつぶしテンプレート画像TWwのエッジを構成する全ての画素において、エッジ強度Emagnitudeとエッジ勾配方向Edirectionとを求める。   The template image edge detection unit 34 obtains the edge intensity Emagnitude and the edge gradient direction Edirection for all the pixels constituting the edge of the filled template image TWw.

テンプレート画像エッジ検出部34は、エッジ強度Emagnitudeのみを求めてもよく、エッジ勾配方向Edirectionのみを求めてもよい。テンプレート画像エッジ検出部34は、少なくともエッジ強度Emagnitudeを求めるのがよく、エッジ強度Emagnitudeとエッジ勾配方向Edirectionとの双方を求めるとさらによい。   The template image edge detection unit 34 may obtain only the edge strength Emagnitude or may obtain only the edge gradient direction Edirection. The template image edge detection unit 34 preferably obtains at least the edge strength Emagnitude, and more preferably obtains both the edge strength Emagnitude and the edge gradient direction Edirection.

図5Cに戻り、ワーク撮影画像エッジ検出部35は、ステップS52にて、ワーク撮影画像データに基づき、ワーク撮影画像W30のエッジを検出する(ワーク撮影画像エッジ検出工程)。ワーク撮影画像エッジ検出部35は、ワーク撮影画像W30のエッジを検出する前にノイズ低減処理を施してもよい。   Returning to FIG. 5C, in step S52, the workpiece photographed image edge detection unit 35 detects the edge of the workpiece photographed image W30 based on the workpiece photographed image data (work photographed image edge detection step). The workpiece photographed image edge detection unit 35 may perform noise reduction processing before detecting the edge of the workpiece photographed image W30.

ワーク撮影画像エッジ検出部35は、テンプレート画像エッジ検出部34と同様に、図13の(a)及び(b)のフィルタを用いるソーベル変換によってワーク撮影画像W30のエッジを検出する。ワーク撮影画像エッジ検出部35は、テンプレート画像エッジ検出部34と同様に、ワーク撮影画像W30のエッジを構成する全ての画素において、エッジ強度Emagnitudeとエッジ勾配方向Edirectionとを求めるのがよい。   Similar to the template image edge detection unit 34, the workpiece photographed image edge detection unit 35 detects the edge of the workpiece photographed image W30 by Sobel transformation using the filters of FIGS. 13A and 13B. Similarly to the template image edge detection unit 34, the workpiece photographed image edge detection unit 35 may obtain the edge intensity Emagnitude and the edge gradient direction Edirection in all the pixels constituting the edge of the workpiece photographed image W30.

ワーク撮影画像エッジ検出部35は、エッジ強度Emagnitudeのみを求めてもよく、エッジ勾配方向Edirectionのみを求めてもよい。ワーク撮影画像エッジ検出部35は、少なくともエッジ強度Emagnitudeを求めるのがよく、エッジ強度Emagnitudeとエッジ勾配方向Edirectionとの双方を求めるとさらによい。   The workpiece photographed image edge detection unit 35 may obtain only the edge intensity Emagnitude or may obtain only the edge gradient direction Edirection. The workpiece photographed image edge detection unit 35 preferably obtains at least the edge strength Emagnitude, and more preferably obtains both the edge strength Emagnitude and the edge gradient direction Edirection.

マッチング処理部36は、ステップS53にて、ワーク撮影画像W30のエッジと塗りつぶしテンプレート画像TWwのエッジとをマッチング処理する(マッチング処理工程)。   In step S53, the matching processing unit 36 performs matching processing between the edge of the workpiece photographed image W30 and the edge of the filled template image TWw (matching processing step).

ここで、テンプレート画像塗りつぶし部32がワーク線画像ImWの内部を塗りつぶして塗りつぶしテンプレート画像TWwとする理由を説明する。   Here, the reason why the template image filling unit 32 fills the inside of the work line image ImW to form the filled template image TWw will be described.

図15の(a)は、テンプレート画像TWのエッジ近傍の画素値を示している。図15の(a)の左方向がワーク線画像ImWの外側、右方向がワーク線画像ImWの内側である。テンプレート画像TWをソーベル変換すると、エッジが互いの間に間隔を有する2本線の状態で検出されてしまう。   FIG. 15A shows pixel values near the edge of the template image TW. In FIG. 15A, the left direction is the outside of the work line image ImW, and the right direction is the inside of the work line image ImW. When the template image TW is subjected to Sobel transformation, edges are detected in a state of two lines having an interval between each other.

図15の(b)は、塗りつぶしテンプレート画像TWwのエッジ近傍の画素値を示している。同様に、図15の(b)の左方向がワーク塗りつぶし画像ImWwの外側、右方向がワーク塗りつぶし画像ImWwの内側である。塗りつぶしテンプレート画像TWwをソーベル変換することにより、エッジは太くはなるものの間隔を有さない2本線の状態、即ち、実質的に1本線の状態となり、エッジが適切に検出される。   FIG. 15B shows pixel values in the vicinity of the edge of the filled template image TWw. Similarly, the left direction in FIG. 15B is the outside of the workpiece filled image ImWw, and the right direction is the inside of the workpiece filled image ImWw. By performing Sobel transform on the filled template image TWw, the edges become thick but have no gaps, that is, a substantially single line state, and the edges are appropriately detected.

仮に、マッチング処理部36が、ワーク撮影画像W30のエッジとエッジが間隔を有する2本線の状態で検出されたテンプレート画像TWのエッジとをマッチング処理すると、誤差が発生して適切なマッチング処理が行われない。マッチング処理部36が、ワーク撮影画像W30のエッジと塗りつぶしテンプレート画像TWwのエッジとをマッチング処理することによって、適切なマッチング処理が行われる。   If the matching processing unit 36 performs a matching process between the edge of the workpiece photographed image W30 and the edge of the template image TW detected in a double line state where the edges are spaced, an error occurs and an appropriate matching process is performed. I will not. An appropriate matching process is performed by the matching processing unit 36 performing a matching process on the edge of the workpiece photographed image W30 and the edge of the filled template image TWw.

図16を用いて、マッチング処理部36によるマッチング処理の詳細を説明する。図16において、ETWは、テンプレート画像エッジ検出部34が塗りつぶしテンプレート画像TWwをソーベル変換したテンプレートエッジ画像を概念的に示している。EW30は、ワーク撮影画像W30をソーベル変換したワーク撮影エッジ画像を概念的に示している。   Details of the matching processing by the matching processing unit 36 will be described with reference to FIG. In FIG. 16, ETW conceptually shows a template edge image obtained by Sobel conversion of the filled template image TWw by the template image edge detection unit 34. EW30 conceptually shows a workpiece shooting edge image obtained by performing Sobel transform on the workpiece shooting image W30.

図16においては、理解を容易にするために、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30のそれぞれのエッジを構成する画素を拡大して概念的に示している。   In FIG. 16, in order to facilitate understanding, the pixels constituting the respective edges of the template edge image ETW and the workpiece photographing edge image EW30 are conceptually shown enlarged.

マッチング処理部36は、ワーク撮影エッジ画像EW30の所定位置にテンプレートエッジ画像ETWを配置して両者の類似度を算出し、テンプレートエッジ画像ETWを水平方向または垂直方向に1画素ずつずらしながら両者の類似度を算出する。   The matching processing unit 36 arranges the template edge image ETW at a predetermined position of the workpiece photographing edge image EW30, calculates the similarity between the two, and shifts the template edge image ETW one pixel at a time in the horizontal direction or the vertical direction to determine the similarity between the two. Calculate the degree.

図16に示すように、テンプレートエッジ画像ETWの画素P1とワーク撮影エッジ画像EW30の画素P32とが対応する位置にあるとき、マッチング処理部36は、両者の類似度を算出する。マッチング処理部36は、テンプレートエッジ画像ETWのそれぞれのエッジの画素とワーク撮影エッジ画像EW30の画素との類似度を算出する。   As shown in FIG. 16, when the pixel P1 of the template edge image ETW and the pixel P32 of the workpiece photographing edge image EW30 are at corresponding positions, the matching processing unit 36 calculates the degree of similarity between them. The matching processing unit 36 calculates the degree of similarity between the pixel of each edge of the template edge image ETW and the pixel of the workpiece photographing edge image EW30.

マッチング処理部36は、例えば、テンプレートエッジ画像ETWの画素とワーク撮影エッジ画像EW30の対応する位置の画素の値の差分値を求め、全ての画素について差分値を積分した積分値を、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30との全体の類似度とすることができる。この場合、積分値が小さいほど類似度が高くなる。   For example, the matching processing unit 36 obtains a difference value between the values of the pixel of the template edge image ETW and the pixel at the corresponding position of the workpiece photographing edge image EW30, and calculates an integration value obtained by integrating the difference values for all the pixels as the template edge image. The overall similarity between the ETW and the workpiece photographing edge image EW30 can be set. In this case, the smaller the integral value, the higher the similarity.

図16の場合、ワーク撮影エッジ画像EW30のエッジとテンプレートエッジ画像ETWのエッジとは位置がずれているので、類似度は比較的小さくなる。   In the case of FIG. 16, since the positions of the edge of the workpiece photographing edge image EW30 and the edge of the template edge image ETW are shifted, the degree of similarity is relatively small.

図17は、マッチング処理部36がテンプレートエッジ画像ETWをずらして、テンプレートエッジ画像ETWの画素P1とワーク撮影エッジ画像EW30の画素P312とが対応する位置にある状態を示している。図17の場合、ワーク撮影エッジ画像EW30のエッジとテンプレートエッジ画像ETWのエッジとは位置が近いので、類似度は比較的大きくなる。   FIG. 17 shows a state in which the matching processing unit 36 shifts the template edge image ETW so that the pixel P1 of the template edge image ETW and the pixel P312 of the workpiece photographing edge image EW30 are in corresponding positions. In the case of FIG. 17, since the positions of the edge of the workpiece photographing edge image EW30 and the edge of the template edge image ETW are close to each other, the degree of similarity is relatively large.

このように、マッチング処理部36は、テンプレートエッジ画像ETWを水平方向または垂直方向に1画素ずつずらしながら、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30とが最も類似するテンプレートエッジ画像ETWの位置を探索する。   As described above, the matching processing unit 36 searches for the position of the template edge image ETW that is most similar to the template edge image ETW and the workpiece imaging edge image EW30 while shifting the template edge image ETW pixel by pixel in the horizontal direction or the vertical direction. To do.

マッチング処理部36は、上述した水平方向のエッジ強度Ehと垂直方向のエッジ強度Evとエッジ強度Emagnitudeとを用いて、類似度を算出してもよい。テンプレートエッジ画像ETWにおける画素の水平方向のエッジ強度Eh1、垂直方向のエッジ強度Ev1、エッジ強度EmagnitudeをEm1、ワーク撮影エッジ画像EW30における画素の水平方向のエッジ強度Eh3、垂直方向のエッジ強度Ev3、エッジ強度EmagnitudeをEm3とすると、対応する位置の画素の類似度Dsは、式(3)によって求めることができる。   The matching processing unit 36 may calculate the degree of similarity using the horizontal edge strength Eh, the vertical edge strength Ev, and the edge strength Emagnitude described above. In the template edge image ETW, the horizontal edge strength Eh1, the vertical edge strength Ev1, the edge strength Emagnitude of the pixel in the workpiece photographing edge image EW30, the vertical edge strength Ev3, the edge. When the intensity Emagnitude is Em3, the similarity Ds of the pixel at the corresponding position can be obtained by Expression (3).

Ds=(Eh1×Eh3+Ev1×Ev3)/(Em1×Em3) …(3)   Ds = (Eh1 × Eh3 + Ev1 × Ev3) / (Em1 × Em3) (3)

マッチング処理部36は、テンプレートエッジ画像ETWの全ての画素についてワーク撮影エッジ画像EW30との類似度Dsを求める。マッチング処理部36は、全ての画素について求めた類似度Dsを積分した積分値を、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30との全体の類似度とすることができる。   The matching processing unit 36 obtains the similarity Ds with respect to the workpiece photographing edge image EW30 for all the pixels of the template edge image ETW. The matching processing unit 36 can set the integrated value obtained by integrating the similarity Ds obtained for all the pixels as the overall similarity between the template edge image ETW and the workpiece photographing edge image EW30.

式(3)を用いる場合、画素が類似しているほど、類似度Dsの値が大きくなり、類似度Dsの積分値も大きくなる。以下、式(3)を用いて類似度Dsを求める場合を例として説明する。マッチング処理部36は、さらにエッジ勾配方向Edirectionを比較して類似度を算出してもよい。   When Expression (3) is used, the similarity of the pixels increases as the pixels are similar, and the integrated value of the similarity Ds also increases. Hereinafter, a case where the similarity Ds is obtained using the expression (3) will be described as an example. The matching processing unit 36 may further calculate the similarity by comparing the edge gradient directions Edirection.

図5Cに戻り、マッチング処理部36は、ステップS54にて、最も高い類似度を変数scoreに保存する。マッチング処理部36内のワーク位置検出部361は、ステップS55にて、ワーク撮影エッジ画像EW30に対する最も類似度が高いテンプレートエッジ画像ETWの位置を検出する。これによって、マッチング処理部36(ワーク位置検出部361)は、ローディング台30に置かれた最上位のワークWの位置を検出することができる。   Returning to FIG. 5C, in step S54, the matching processing unit 36 stores the highest similarity in the variable score. In step S55, the workpiece position detection unit 361 in the matching processing unit 36 detects the position of the template edge image ETW having the highest similarity to the workpiece imaging edge image EW30. Thus, the matching processing unit 36 (work position detection unit 361) can detect the position of the uppermost work W placed on the loading table 30.

但し、ステップS55では、1つの選択した角度と大きさの塗りつぶしテンプレート画像TWwに基づくテンプレートエッジ画像ETWによって、ワークWの大まかな位置が検出されているに過ぎない。ワークWの位置が正確に検出されていないこともある。   However, in step S55, the rough position of the workpiece W is merely detected by the template edge image ETW based on the selected template image TWw having the selected angle and size. The position of the workpiece W may not be detected accurately.

図5CにおけるステップS51〜S55は、選択した角度と大きさの塗りつぶしテンプレート画像TWwに基づくテンプレートエッジ画像ETWを用いて、ワーク撮影エッジ画像EW30の位置を探索するワーク撮影エッジ画像位置探索処理を示している。   Steps S51 to S55 in FIG. 5C show a workpiece imaging edge image position search process for searching for the position of the workpiece imaging edge image EW30 using the template edge image ETW based on the filled template image TWw of the selected angle and size. Yes.

マッチング処理部36は、ステップS61にて、最初のマッチング処理であるか否かを判定する。最初のマッチング処理であれば(YES)、即ち、塗りつぶしテンプレート画像TWwの倍率bをmin、角度iを0°としたときのテンプレートエッジ画像ETWを用いたマッチング処理であれば、マッチング処理部36は、ステップS62にて、変数scoreを最大類似度Maxscoreに設定して、処理を図5BのステップS46に戻す。   In step S61, the matching processing unit 36 determines whether it is the first matching process. If it is the first matching process (YES), that is, if it is a matching process using the template edge image ETW when the magnification b of the filled template image TWw is min and the angle i is 0 °, the matching processing unit 36 In step S62, the variable score is set to the maximum similarity Maxscore, and the process returns to step S46 in FIG. 5B.

テンプレート画像拡大縮小・回転処理部33は、ステップS46にて、角度iを1°増大させ、ステップS47にて、塗りつぶしテンプレート画像TWwを360°回転させたか否かを判定する。角度iの増分は1°に限定されない。塗りつぶしテンプレート画像TWwを回転させるのは、ローディング台30上のワークWは種々の角度で配置されている可能性があるからである。   The template image enlargement / reduction / rotation processing unit 33 increases the angle i by 1 ° in step S46, and determines whether or not the filled template image TWw is rotated 360 ° in step S47. The increment of angle i is not limited to 1 °. The reason why the filled template image TWw is rotated is that the workpiece W on the loading table 30 may be arranged at various angles.

塗りつぶしテンプレート画像TWwを360°回転させていなければ(NO)、テンプレート画像拡大縮小・回転処理部33は、ステップS45にて、塗りつぶしテンプレート画像TWwを角度iだけ回転させる。ステップS46からステップS47を経てステップS45に移行した場合、塗りつぶしテンプレート画像TWwは角度iだけ回転される。   If the fill template image TWw has not been rotated 360 ° (NO), the template image enlargement / reduction / rotation processing unit 33 rotates the fill template image TWw by an angle i in step S45. When the process proceeds from step S46 to step S45 through step S47, the filled template image TWw is rotated by an angle i.

ステップS45の後、図5Cのワーク撮影エッジ画像位置探索処理では、角度iを1°とした塗りつぶしテンプレート画像TWwに基づくテンプレートエッジ画像ETWによって最も高い類似度が変数scoreに保存される。また、ワーク撮影エッジ画像位置探索処理では、ワーク撮影エッジ画像EW30に対する最も類似度が高いテンプレートエッジ画像ETWの位置が検出される。   After the step S45, in the workpiece photographing edge image position search process of FIG. 5C, the highest similarity is stored in the variable score by the template edge image ETW based on the filled template image TWw with the angle i being 1 °. In the workpiece photographing edge image position search process, the position of the template edge image ETW having the highest similarity to the workpiece photographing edge image EW30 is detected.

マッチング処理部36は、ステップS61にて、最初のマッチング処理ではない(NO)と判定するので、ステップS63にて、Maxscore<scoreであるか否かを判定する。Maxscore<scoreであれば(YES)、角度iを0°としたときに得られた変数scoreよりも角度iを1°としたときに得られた変数scoreの方が大きいということである。   The matching processing unit 36 determines in step S61 that it is not the first matching process (NO), so in step S63, it determines whether Maxscore <score. If Maxscore <score (YES), the variable score obtained when the angle i is 1 ° is larger than the variable score obtained when the angle i is 0 °.

マッチング処理部36は、ステップS64にて、変数scoreを最大類似度Maxscoreに設定し、このときの倍率b、角度i、テンプレートエッジ画像ETWの検出位置を記憶して、処理を図5BのステップS46に戻す。   In step S64, the matching processing unit 36 sets the variable score to the maximum similarity Maxscore, stores the magnification b, the angle i, and the detection position of the template edge image ETW at this time, and the processing is performed in step S46 of FIG. 5B. Return to.

ステップS63にて、Maxscore<scoreでなければ(NO)、マッチング処理部36は、処理を図5BのステップS46に戻す。   If Maxscore <score is not satisfied in step S63 (NO), the matching processing unit 36 returns the process to step S46 of FIG. 5B.

テンプレート画像拡大縮小・回転処理部33は、ステップS46にて、再び、角度iを1°増大させ、ステップS47にて、塗りつぶしテンプレート画像TWwを360°回転させていなければ(NO)、同様に、図5CのステップS51〜S55及びS61〜S64を繰り返す。   In step S46, the template image enlargement / reduction / rotation processing unit 33 again increases the angle i by 1 °. If the fill template image TWw is not rotated by 360 ° in step S47 (NO), similarly, Steps S51 to S55 and S61 to S64 in FIG. 5C are repeated.

塗りつぶしテンプレート画像TWwを360°回転させるまで図5CのステップS51〜S55及びS61〜S64を繰り返すことにより、それぞれの角度iにおける変数scoreのうち、最大類似度Maxscoreを示す角度iが求められる。   By repeating steps S51 to S55 and S61 to S64 of FIG. 5C until the filled template image TWw is rotated 360 °, an angle i indicating the maximum similarity Maxscore is obtained from the variable scores at the respective angles i.

ステップS47にて塗りつぶしテンプレート画像TWwを360°回転させていれば(YES)、テンプレート画像拡大縮小・回転処理部33は、ステップS48にて、倍率bをkだけ増大させる。テンプレート画像拡大縮小・回転処理部33は、ステップS49にて、倍率bが最大倍率maxより大きくなったか否かを判定する。   If the filled template image TWw has been rotated 360 ° in step S47 (YES), the template image enlargement / reduction / rotation processing unit 33 increases the magnification b by k in step S48. In step S49, the template image enlargement / reduction / rotation processing unit 33 determines whether the magnification b is larger than the maximum magnification max.

倍率bが最大倍率maxより大きくなっていなければ(NO)、テンプレート画像拡大縮小・回転処理部33はステップS44及びS45を繰り返し、マッチング処理部36はステップS51〜S55及びS61〜S64を繰り返す。また、テンプレート画像拡大縮小・回転処理部33はステップS46〜S49を繰り返す。   If the magnification b is not larger than the maximum magnification max (NO), the template image enlargement / reduction / rotation processing unit 33 repeats steps S44 and S45, and the matching processing unit 36 repeats steps S51 to S55 and S61 to S64. Further, the template image enlargement / reduction / rotation processing unit 33 repeats steps S46 to S49.

倍率bが最大倍率maxより大きくなっていれば(YES)、最大倍率maxまでの全ての倍率bで、塗りつぶしテンプレート画像TWwを360°回転させるまでステップS51〜S55及びS61〜S64が繰り返されたということである。   If the magnification b is larger than the maximum magnification max (YES), steps S51 to S55 and S61 to S64 are repeated until the fill template image TWw is rotated 360 ° at all magnifications b up to the maximum magnification max. That is.

このように、ワーク位置検出部361は、テンプレートエッジ画像ETWの複数の大きさ及び複数の角度のうち、大きさと角度の組を1つ選択し、ワーク撮影エッジ画像EW30に対するテンプレートエッジ画像ETWの位置をずらしながら、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30とをマッチングさせる。ワーク位置検出部361は、マッチングの結果、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30との類似度が最も高いテンプレートエッジ画像ETWの位置を予備的にワークWの位置を検出する。   As described above, the workpiece position detection unit 361 selects one set of size and angle from the plurality of sizes and the plurality of angles of the template edge image ETW, and the position of the template edge image ETW with respect to the workpiece photographing edge image EW30. The template edge image ETW and the workpiece photographing edge image EW30 are matched while shifting. As a result of matching, the workpiece position detection unit 361 preliminarily detects the position of the workpiece W from the position of the template edge image ETW having the highest similarity between the template edge image ETW and the workpiece photographing edge image EW30.

ワーク位置検出部361は、大きさと角度の組を順次異ならせて、大きさと角度の複数の組それぞれで、同様にテンプレートエッジ画像ETWとワーク撮影エッジ画像EW30とをマッチングさせて、テンプレートエッジ画像ETWとワーク撮影エッジ画像EW30との類似度が最も高いテンプレートエッジ画像ETWの位置を予備的にワークWの位置を検出する。   The workpiece position detecting unit 361 sequentially changes the size and angle pairs, and similarly matches the template edge image ETW and the workpiece imaging edge image EW30 with each of the plurality of size and angle pairs, thereby obtaining the template edge image ETW. The position of the workpiece W is preliminarily detected from the position of the template edge image ETW having the highest degree of similarity between the workpiece photographing edge image EW30.

ワーク位置検出部361は、複数の組のうち類似度が最も高い組におけるテンプレートエッジ画像ETWの位置を、最終的にローディング台30に置かれたワークWの位置であると検出する(ワーク位置検出工程)。   The workpiece position detection unit 361 detects the position of the template edge image ETW in the group having the highest similarity among the plurality of groups as the position of the workpiece W finally placed on the loading table 30 (work position detection). Process).

式(3)を用いる場合を例とすれば、ワーク位置検出部361は、全ての組のテンプレートエッジ画像ETWによって算出された類似度Dsの積分値のうち、最も大きい値の積分値が得られたテンプレートエッジ画像ETWの位置をワークWの位置と決定すればよい。   Taking the case where Expression (3) is used as an example, the workpiece position detection unit 361 obtains the largest integral value among the integral values of the similarity Ds calculated by all sets of template edge images ETW. The position of the template edge image ETW may be determined as the position of the workpiece W.

以上のようにして、ステップS64では、全ての倍率bと全ての角度iとの組み合わせのうち、最大類似度Maxscoreが得られたときの倍率b、角度i、テンプレートエッジ画像ETWの検出位置が記憶されることになる。   As described above, in step S64, among the combinations of all the magnifications b and all the angles i, the magnification b, the angle i and the detection position of the template edge image ETW when the maximum similarity Maxscore is obtained are stored. Will be.

図5BにおけるステップS41〜S43、S48及びS49は、塗りつぶしテンプレート画像TWwを最低倍率minから最大倍率maxまでの範囲で、増分kごとに拡大または縮小する塗りつぶしテンプレート画像拡大縮小処理を示している。図5CにおけるステップS61〜S64は、最大類似度Maxscoreを示すときの倍率b、角度i、テンプレートエッジ画像ETWの検出位置を検出して記憶する最大類似度条件記憶処理を示している。   Steps S41 to S43, S48, and S49 in FIG. 5B show a filling template image enlarging / reducing process for enlarging or reducing the filling template image TWw for each increment k in the range from the minimum magnification min to the maximum magnification max. Steps S61 to S64 in FIG. 5C show the maximum similarity condition storing process for detecting and storing the magnification b, the angle i, and the detection position of the template edge image ETW when the maximum similarity Maxscore is shown.

ステップS49にて倍率bが最大倍率maxより大きくなっていれば(YES)、マッチング処理部36内の表裏判定部362は、図5DのステップS71にて、表裏判定用特徴画像抽出部38がステップS34にて抽出した表裏判定用特徴画像FWの画素数が0より大きいか否かを判定する。   If the magnification b is larger than the maximum magnification max in step S49 (YES), the front / back determination feature image extraction unit 38 in step S71 in FIG. It is determined whether or not the number of pixels of the front / back determination feature image FW extracted in S34 is greater than zero.

表裏判定用特徴画像FWの画素数が0より大きければ(YES)、表裏判定部362は、ステップS72にて、最大類似度Maxscoreとなったマッチング処理で得られた倍率b、角度i、テンプレートエッジ画像ETWの検出位置を読み出す。表裏判定部362は、ステップS73にて、表裏判定用特徴画像FWを倍率bで拡大または縮小し、角度iだけ回転させ、表裏判定用特徴画像FWをテンプレートエッジ画像ETWの検出位置へと移動させる。   If the number of pixels of the front / back determination feature image FW is greater than 0 (YES), the front / back determination unit 362 calculates the magnification b, the angle i, and the template edge obtained by the matching process having the maximum similarity Maxscore in step S72. The detection position of the image ETW is read out. In step S73, the front / back determination unit 362 enlarges or reduces the front / back determination feature image FW at the magnification b, rotates the feature image FW for front / back determination by the angle i, and moves the front / back determination feature image FW to the detection position of the template edge image ETW. .

表裏判定用特徴画像FWを最大類似度Maxscoreが得られたときの倍率bで拡大または縮小し、角度iだけ回転させることによって、表裏判定用特徴画像FWはワーク撮影画像W30内のワークWの大きさ及び角度に対応した大きさ及び角度となる。テンプレートエッジ画像ETWの検出位置は、ワーク撮影画像W30内のワークWの位置(ローディング台30上のワークWの位置)を示す。よって、表裏判定用特徴画像FWをテンプレートエッジ画像ETWの検出位置へと移動させれば、表裏判定用特徴画像FWはワークWの位置に対応する位置へと移動する。   The front / back determination feature image FW is enlarged or reduced by the magnification b when the maximum similarity Maxscore is obtained, and rotated by the angle i, whereby the front / back determination feature image FW is the size of the workpiece W in the workpiece photographed image W30. The size and angle correspond to the height and angle. The detection position of the template edge image ETW indicates the position of the work W in the work photographed image W30 (the position of the work W on the loading table 30). Therefore, if the front / back determination feature image FW is moved to the detection position of the template edge image ETW, the front / back determination feature image FW moves to a position corresponding to the position of the workpiece W.

表裏判定部362は、ステップS74にて、ワーク撮影エッジ画像EW30と表裏判定用特徴画像FWとの類似度を算出し、ステップS75にて、類似度が所定の閾値以上であるか否かを判定する(表裏判定工程)。ここでも、ワーク撮影エッジ画像EW30と表裏判定用特徴画像FWとが類似すればするほど類似度を示す値が高くなるとする。   The front / back determination unit 362 calculates the similarity between the workpiece photographing edge image EW30 and the front / back determination feature image FW in step S74, and determines whether the similarity is equal to or greater than a predetermined threshold value in step S75. (Front / back determination step). Also here, it is assumed that the value indicating the similarity increases as the workpiece photographing edge image EW30 and the front / back determination feature image FW become similar.

類似度が閾値以上であれば(YES)、ワークWはローディング台30に表裏が正しい状態で配置されているということであり、マッチング処理部36は、処理をステップS81に移行させる。閾値未満であれば(NO)、ワークWはローディング台30に表裏が正しい状態で配置されていないということであり、マッチング処理部36(表裏判定部362)は、処理をステップS82に移行させる。   If the similarity is equal to or greater than the threshold (YES), it means that the workpiece W is arranged on the loading table 30 with the front and back being correct, and the matching processing unit 36 moves the process to step S81. If it is less than the threshold value (NO), it means that the work W is not arranged in the correct state on the loading table 30, and the matching processing unit 36 (front / back determination unit 362) shifts the processing to step S82.

ステップS71にて表裏判定用特徴画像FWの画素数が0より大きくなければ(NO)、表裏判定部362は、ステップS76にて、表裏判定不可であると決定し、処理をステップS81に移行させる。表裏判定用特徴画像FWの画素数が0より大きくない(画素数が0である)ということは、図5AのステップS34にて、ワークWの表裏を判定するための特徴画像が抽出できなかったということである。表向きのワークWとの裏向きのワークWとで形状に差がなければ、表裏判定用特徴画像FWの画素数は0となる。   If the number of pixels of the front / back determination feature image FW is not larger than 0 in step S71 (NO), the front / back determination unit 362 determines that front / back determination is impossible in step S76, and the process proceeds to step S81. . The fact that the number of pixels of the front / back determination feature image FW is not greater than 0 (the number of pixels is 0) indicates that the feature image for determining the front and back of the workpiece W could not be extracted in step S34 of FIG. 5A. That's what it means. If there is no difference in shape between the front-facing work W and the back-facing work W, the number of pixels of the front-back determination feature image FW is zero.

図5DにおけるステップS71〜S76は、ローディング台30に配置されているワークWが正しく表向きに配置されているか否か判定する表裏判定処理を示している。   Steps S71 to S76 in FIG. 5D indicate front / back determination processing for determining whether or not the workpiece W placed on the loading table 30 is correctly placed face up.

マッチング処理部36は、ステップS81にて、ワークWの位置情報(ワーク位置情報)をロボット制御装置5に転送して処理を終了させる。マッチング処理部36(表裏判定部362)は、ステップS82にて、NC装置2に、ワークWが正しく表向きに配置されていないことを示すエラー情報を送信して処理を終了させる。   In step S <b> 81, the matching processing unit 36 transfers the position information (work position information) of the work W to the robot control device 5 and ends the process. In step S 82, the matching processing unit 36 (front / back determination unit 362) transmits error information indicating that the workpiece W is not correctly placed face-up to the NC device 2 and ends the process.

エラー情報を受信したNC装置2は、表示・操作部21にワークWが裏向きに配置されていることを表示させてもよいし、ワーク保持用ロボット20によってワークWを保持させないよう、ロボット制御装置5を制御してもよい。   The NC device 2 that has received the error information may cause the display / operation unit 21 to display that the workpiece W is placed face down, or perform robot control so that the workpiece holding robot 20 does not hold the workpiece W. The device 5 may be controlled.

図18〜図20を用いて、ステップS73〜S75の処理を具体的に説明する。図18の(a)は、ローディング台30にワークWが正しく表向きに配置されているときのワーク撮影エッジ画像EW30を示している。図18の(a)及び(b)においては、簡略化のため、最上位のワークWのワーク撮影エッジ画像EW30のみが示されている。ワーク撮影エッジ画像EW30は、ワークWの外周部のエッジEWと切り起こし部W0のエッジEW0とを含む。   The processing of steps S73 to S75 will be specifically described with reference to FIGS. FIG. 18A shows the workpiece photographing edge image EW30 when the workpiece W is correctly arranged on the loading table 30. In FIGS. 18A and 18B, only the workpiece photographing edge image EW30 of the uppermost workpiece W is shown for simplification. The workpiece photographing edge image EW30 includes an edge EW of the outer periphery of the workpiece W and an edge EW0 of the cut and raised portion W0.

ワークWは、ローディング台30の角部P0(図1参照)を原点(0,0)としたときワークWの左下角部が所定の座標(x,y)に位置して、反時計回りに30°回転しているとする。   The workpiece W is counterclockwise when the corner P0 (see FIG. 1) of the loading table 30 is the origin (0, 0) and the lower left corner of the workpiece W is located at a predetermined coordinate (x, y). It is assumed that it is rotated by 30 °.

図18(b)は、ローディング台30にワークWが誤って裏向きに配置されているときのワーク撮影エッジ画像EW30を示している。ワーク撮影エッジ画像EW30は、ワークWの外周部のエッジEWと切り起こし部W0のエッジEW0とを含む。ここでのエッジEW0は切り起こし部W0をワークWの裏面から見たときのエッジである。同様に、ワークWは左下角部が座標位置(x,y)に位置して、反時計回りに30°回転しているとする。   FIG. 18B shows the workpiece photographing edge image EW30 when the workpiece W is mistakenly placed on the loading table 30 in the reverse direction. The workpiece photographing edge image EW30 includes an edge EW of the outer periphery of the workpiece W and an edge EW0 of the cut and raised portion W0. The edge EW0 here is an edge when the cut and raised portion W0 is viewed from the back surface of the workpiece W. Similarly, it is assumed that the workpiece W is rotated by 30 ° counterclockwise with the lower left corner located at the coordinate position (x, y).

図18の(a)及び(b)の場合、最大類似度Maxscoreが得られたときの角度iは30°である。最大類似度Maxscoreが得られたときの倍率bは1.2であったとする。図19に示すように、表裏判定部362は、表裏判定用特徴画像FWを1.2倍し、反時計回りに30°回転させて、表裏判定用特徴画像FW’とする。表裏判定用特徴画像FWに含まれる切り起こし画像ImW0も1.2倍となり、反時計回りに30°回転して、切り起こし画像ImW0’となる。   In the case of FIGS. 18A and 18B, the angle i when the maximum similarity Maxscore is obtained is 30 °. The magnification b when the maximum similarity Maxscore is obtained is 1.2. As shown in FIG. 19, the front / back determination unit 362 multiplies the front / back determination feature image FW by 1.2 and rotates it 30 ° counterclockwise to obtain a front / back determination feature image FW ′. The cut-and-raised image ImW0 included in the front-and-back determination feature image FW is also 1.2 times, rotated 30 ° counterclockwise to become a cut-and-raised image ImW0 '.

図18の(a)に図19に示す表裏判定用特徴画像FW’を重ねると、図20の(a)のような状態となる。切り起こし部W0のエッジEW0と切り起こし画像ImW0’とは完全には重ならないこともあるが、ここでは便宜上、エッジEW0と切り起こし画像ImW0’とが完全に重なっているとする。   When the front / back determination feature image FW ′ shown in FIG. 19 is superimposed on FIG. 18 (a), the state shown in FIG. 20 (a) is obtained. The edge EW0 of the cut-and-raised portion W0 and the cut-and-raised image ImW0 'may not completely overlap. However, for convenience, it is assumed here that the edge EW0 and the cut-and-raised image ImW0' completely overlap.

表裏判定部362がワーク撮影エッジ画像EW30と表裏判定用特徴画像FW’との類似度を算出すると、エッジEW0と切り起こし画像ImW0’とが重なっているため、類似度は比較的大きな値となり、所定の閾値以上となる。よって、表裏判定部362は、ワークWは表向きに配置されていると判定することができる。   When the front / back determination unit 362 calculates the similarity between the workpiece photographing edge image EW30 and the front / back determination feature image FW ′, the edge EW0 and the cut-out image ImW0 ′ overlap with each other, and the similarity is a relatively large value. It becomes a predetermined threshold value or more. Therefore, the front / back determination unit 362 can determine that the workpiece W is arranged face up.

図18の(b)に図19に示す表裏判定用特徴画像FW’を重ねると、図20の(b)のような状態となる。表裏判定部362がワーク撮影エッジ画像EW30と表裏判定用特徴画像FW’との類似度を算出すると、エッジEW0と切り起こし画像ImW0’とは完全にずれた位置にあるため、類似度は極めて小さい値となり、閾値未満となる。よって、表裏判定部362は、ワークWは裏向きに配置されていると判定することができる。   When the front / back determination feature image FW ′ shown in FIG. 19 is superimposed on FIG. 18B, a state as shown in FIG. 20B is obtained. When the front / back determination unit 362 calculates the similarity between the workpiece photographing edge image EW30 and the front / back determination feature image FW ′, the edge EW0 and the cut-out image ImW0 ′ are completely displaced, and thus the similarity is extremely small. Value, less than the threshold. Therefore, the front / back determination unit 362 can determine that the workpiece W is arranged face down.

図4において、ロボット制御装置5内のロボット座標変換部51は、入力されたワーク位置情報を、ワーク保持用ロボット20をどのように動かすかを決めるロボット座標に変換する。ロボット座標は、ワーク保持用ロボット20の回転角、ガイドレール201上の位置、関節の角度のうちの少なくとも1つである。   In FIG. 4, the robot coordinate conversion unit 51 in the robot control device 5 converts the input workpiece position information into robot coordinates that determine how to move the workpiece holding robot 20. The robot coordinates are at least one of a rotation angle of the workpiece holding robot 20, a position on the guide rail 201, and a joint angle.

ロボット制御装置5は、ロボット座標に基づいてワーク保持用ロボット20を動かし、ローディング台30上の最上位のワークWを保持させる。ワーク保持用ロボット20は、ワークWを加工機10へと搬送し、加工後のワークWを所定の位置に搬出する。   The robot control device 5 moves the workpiece holding robot 20 based on the robot coordinates to hold the uppermost workpiece W on the loading table 30. The workpiece holding robot 20 conveys the workpiece W to the processing machine 10 and unloads the processed workpiece W to a predetermined position.

前述のように、ワーク保持用ロボット20の原点位置は撮影画像の原点と一致しているから、上記のように検出したワークWの位置はそのままワーク保持用ロボット20がワークWを保持する位置となる。   As described above, since the origin position of the workpiece holding robot 20 coincides with the origin of the photographed image, the position of the workpiece W detected as described above is the position where the workpiece holding robot 20 holds the workpiece W as it is. Become.

以上説明したように、本実施形態のワーク判定装置は、表裏判定用特徴画像抽出部38と、表裏判定部362とを備える。表裏判定用特徴画像抽出部38は、テンプレート画像(塗りつぶしテンプレート画像TWw)の表裏を反転させてワークの裏面を示すテンプレート裏画像ITWwを生成する。表裏判定用特徴画像抽出部38は、テンプレート画像から、テンプレート画像とテンプレート裏画像ITWwとの重なりエッジEOLを差し引くことにより、ワークWの表裏を判定するための表裏判定用特徴画像FWを抽出する。   As described above, the workpiece determination apparatus according to this embodiment includes the front / back determination feature image extraction unit 38 and the front / back determination unit 362. The front / back determination feature image extraction unit 38 inverts the front and back of the template image (filled template image TWw) to generate a template back image ITWw indicating the back side of the workpiece. The front / back determination feature image extraction unit 38 extracts a front / back determination feature image FW for determining the front / back of the workpiece W by subtracting the overlapping edge EOL between the template image and the template back image ITWw from the template image.

表裏判定部362は、表裏判定用特徴画像FW(またはFW’)をワーク位置検出部361によって検出されたワークWの位置に移動させ、ワーク撮影エッジ画像EW30と表裏判定用特徴画像FWとの類似度を算出して、類似度に基づいてワークWの表裏を判定する。   The front / back determination unit 362 moves the front / back determination feature image FW (or FW ′) to the position of the workpiece W detected by the workpiece position detection unit 361 and resembles the workpiece photographing edge image EW30 and the front / back determination feature image FW. The degree is calculated, and the front and back of the workpiece W are determined based on the degree of similarity.

従って、本実施形態のワーク判定装置によれば、ワーク撮影画像W30と表面用及び裏面用それぞれのテンプレート画像とをパターンマッチングさせる必要がないため、パターンマッチングに要する処理時間をさほど増大させることなく、効率的かつ的確にワークWの表裏を判定することができる。   Therefore, according to the workpiece determination apparatus of the present embodiment, since it is not necessary to pattern match the workpiece photographed image W30 and the front and back template images, without significantly increasing the processing time required for pattern matching. The front and back of the workpiece W can be determined efficiently and accurately.

本実施形態のワーク判定方法は、ワークWの表裏を判定するための表裏判定用特徴画像FWを抽出する表裏判定用特徴画像抽出工程と、ワーク撮影エッジ画像EW30と表裏判定用特徴画像FW(またはFW’)との類似度に基づいてワークWの表裏を判定する表裏判定工程とを含む。本実施形態のワーク判定方法によれば、効率的かつ的確にワークWの表裏を判定することができる。   The workpiece determination method according to the present embodiment includes a front / back determination feature image extraction step for extracting a front / back determination feature image FW for determining the front / back of the workpiece W, a workpiece imaging edge image EW30, and a front / back determination feature image FW (or And a front / back determination step of determining the front / back of the workpiece W based on the similarity to FW ′). According to the workpiece determination method of this embodiment, the front and back of the workpiece W can be determined efficiently and accurately.

本実施形態のワーク判定装置は、テンプレート画像を所定の大きさの範囲で複数の大きさに拡大または縮小し、複数の角度に回転させるテンプレート画像拡大縮小・回転処理部33を備える構成とすることが好ましい。本実施形態のワーク位置検出方法は、テンプレート画像拡大縮小・回転工程を含む構成とすることが好ましい。   The workpiece determination apparatus according to the present embodiment includes a template image enlargement / reduction / rotation processing unit 33 that enlarges or reduces a template image to a plurality of sizes within a predetermined size range and rotates the template image to a plurality of angles. Is preferred. The workpiece position detection method of the present embodiment preferably includes a template image enlargement / reduction / rotation process.

このように構成すれば、積み重ねられているワークWの枚数によって最上位のワークWの撮影画像の大きさが変化しても、ワークWが任意の角度で配置されていても、ワークWの位置を的確に検出することができる。   If comprised in this way, even if the magnitude | size of the picked-up image of the uppermost workpiece | work W changes with the number of the workpiece | work W piled up, even if the workpiece | work W is arrange | positioned at arbitrary angles, the position of the workpiece | work W Can be accurately detected.

本実施形態のワーク判定装置及び方法は、表裏判定用特徴画像FWを、拡大または縮小したテンプレート画像の大きさに対応するように拡大または縮小し、テンプレート画像の角度に対応するように回転させる。従って、本実施形態のワーク判定装置及び方法によれば、テンプレート画像を拡大または縮小させても、テンプレート画像を回転させても、ワーク撮影エッジ画像EW30と表裏判定用特徴画像FWとの類似度を的確に算出でき、ワークWの表裏を判定することができる。   The workpiece determination apparatus and method according to the present embodiment enlarges or reduces the front / back determination feature image FW so as to correspond to the size of the enlarged or reduced template image, and rotates the feature image FW so as to correspond to the angle of the template image. Therefore, according to the workpiece determination apparatus and method of the present embodiment, the degree of similarity between the workpiece imaging edge image EW30 and the front / back determination feature image FW can be obtained regardless of whether the template image is enlarged or reduced, or the template image is rotated. It can be calculated accurately and the front and back of the workpiece W can be determined.

ところで、載置場所に配置されているワークWとパターンマッチングさせるためのテンプレート画像としては、ワークWの形状を示すCADデータに基づいて作成されたワークWの外形線を線画像で示すテンプレート画像の内部を塗りつぶした塗りつぶしテンプレート画像TWwを用いるのがよい。   By the way, as a template image for pattern matching with the workpiece W arranged at the placement place, a template image that shows the outline of the workpiece W created based on CAD data indicating the shape of the workpiece W as a line image. It is preferable to use a filled template image TWw in which the inside is filled.

塗りつぶしテンプレート画像TWwを用いれば、ワークWを撮影してテンプレート画像を作成するという煩雑な作業が不要となる。ワークWを撮影する場合、一般的には、撮影専用の作業台が用いられる。塗りつぶしテンプレート画像TWwを用いれば、撮影専用の作業台が不要となり、環境が変化しても、テンプレート画像を作成し直す必要はない。塗りつぶしテンプレート画像TWwを用いれば、エッジが適切に検出されるので、ワーク撮影画像W30のエッジと塗りつぶしテンプレート画像TWwのエッジとのマッチングが的確に行われる。   If the filled template image TWw is used, a complicated operation of photographing the workpiece W and creating a template image becomes unnecessary. When photographing the workpiece W, a work table dedicated to photographing is generally used. If the filled template image TWw is used, a work table dedicated to photographing is not necessary, and it is not necessary to recreate the template image even if the environment changes. If the fill template image TWw is used, the edge is appropriately detected, so that the edge of the workpiece photographed image W30 and the edge of the fill template image TWw are accurately matched.

本発明は以上説明した本実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々変更可能である。   The present invention is not limited to the embodiment described above, and various modifications can be made without departing from the scope of the present invention.

1 CAM
2 NC装置
3 画像演算処理装置
4 カメラ
5 ロボット制御装置
10 加工機
20 ワーク保持用ロボット
30 ローディング台(載置場所)
31 テンプレート画像作成部
32 テンプレート画像塗りつぶし部
33 テンプレート画像拡大縮小・回転処理部
34 テンプレート画像エッジ検出部
35 ワーク撮影画像エッジ検出部
36 マッチング処理部
38 表裏判定用特徴画像抽出部
361 ワーク位置検出部
362 表裏判定部
W ワーク
1 CAM
2 NC device 3 Image processing unit 4 Camera 5 Robot control device 10 Processing machine 20 Workpiece holding robot 30 Loading table (placement location)
31 Template image creation unit 32 Template image filling unit 33 Template image enlargement / reduction / rotation processing unit 34 Template image edge detection unit 35 Work photographed image edge detection unit 36 Matching processing unit 38 Front / back determination feature image extraction unit 361 Work position detection unit 362 Front / back judgment part W Workpiece

Claims (8)

載置場所に配置されているワークとパターンマッチングさせるためのテンプレート画像のエッジを検出して、テンプレートエッジ画像を生成するテンプレート画像エッジ検出部と、
前記載置場所に配置されているワークを撮影したワーク撮影画像データのエッジを検出して、ワーク撮影エッジ画像を生成するワーク撮影画像エッジ検出部と、
前記テンプレートエッジ画像と前記ワーク撮影エッジ画像とをマッチングさせて、前記載置場所に配置されている前記ワークの位置を検出するワーク位置検出部と、
前記テンプレート画像の表裏を反転させて前記ワークの裏面を示すテンプレート裏画像を生成し、前記テンプレート画像から、前記テンプレート画像と前記テンプレート裏画像とが重なり合うエッジを差し引くことにより、前記ワークの表裏を判定するための表裏判定用特徴画像を抽出する表裏判定用特徴画像抽出部と、
前記表裏判定用特徴画像を前記ワーク位置検出部によって検出された前記ワークの位置に移動させ、前記ワーク撮影エッジ画像と前記表裏判定用特徴画像との類似度を算出して、類似度に基づいて前記載置場所に配置されている前記ワークの表裏を判定する表裏判定部と、
を備えることを特徴とするワーク判定装置。
A template image edge detection unit that detects the edge of the template image for pattern matching with the workpiece placed at the placement location, and generates a template edge image;
A workpiece photographed image edge detection unit that detects an edge of the workpiece photographed image data obtained by photographing the workpiece arranged in the above-described place and generates a workpiece photographed edge image;
A workpiece position detection unit that matches the template edge image and the workpiece photographing edge image to detect the position of the workpiece arranged at the above-described placement location;
A template back image showing the back side of the workpiece is generated by inverting the front and back sides of the template image, and the front and back sides of the workpiece are determined by subtracting an edge where the template image and the template back image overlap from the template image. A front / back determination feature image extraction unit for extracting a front / back determination feature image for performing,
The front / back determination feature image is moved to the position of the workpiece detected by the workpiece position detection unit, the similarity between the workpiece photographing edge image and the front / back determination feature image is calculated, and based on the similarity A front / back determination unit for determining the front / back of the workpiece arranged at the placement location;
A workpiece determination apparatus comprising:
前記テンプレート画像を所定の大きさの範囲で複数の大きさに拡大または縮小し、複数の角度に回転させるテンプレート画像拡大縮小・回転処理部をさらに備え、
前記テンプレート画像エッジ検出部は、前記テンプレート画像の複数の大きさ及び複数の角度のそれぞれで、前記テンプレート画像のエッジを検出して、複数のテンプレートエッジ画像を生成し、
前記ワーク位置検出部は、前記テンプレートエッジ画像の複数の大きさ及び複数の角度における大きさと角度の複数の組それぞれで、前記ワーク撮影エッジ画像に対する前記テンプレートエッジ画像の位置をずらしながら前記テンプレートエッジ画像と前記ワーク撮影エッジ画像とをマッチングさせたとき、前記テンプレートエッジ画像と前記ワーク撮影エッジ画像との類似度が最も高い前記テンプレートエッジ画像の位置であり、前記複数の組のうち類似度が最も高い組における前記テンプレートエッジ画像の位置を、前記載置場所に配置されている前記ワークの位置であると検出する
ことを特徴とする請求項1に記載のワーク判定装置。
A template image enlargement / reduction / rotation processing unit that enlarges or reduces the template image to a plurality of sizes within a predetermined size range and rotates the template image at a plurality of angles;
The template image edge detection unit detects edges of the template image at each of a plurality of sizes and a plurality of angles of the template image, and generates a plurality of template edge images,
The workpiece position detection unit is configured to shift the position of the template edge image with respect to the workpiece photographing edge image while shifting the position of the template edge image with respect to each of a plurality of sizes and a plurality of sets of sizes and angles at a plurality of angles of the template edge image. Is the position of the template edge image having the highest similarity between the template edge image and the workpiece photographing edge image, and the highest similarity among the plurality of sets. The work determination apparatus according to claim 1, wherein the position of the template edge image in the set is detected as the position of the work placed at the placement location.
前記表裏判定部は、前記表裏判定用特徴画像を、前記類似度が最も高い組の前記テンプレートエッジ画像の大きさに対応するように拡大または縮小し、前記類似度が最も高い組の前記テンプレートエッジ画像の角度だけ回転させ、拡大または縮小及び回転させた前記表裏判定用特徴画像を、前記類似度が最も高い組の前記テンプレートエッジ画像の位置に移動させることを特徴とする請求項2に記載のワーク判定装置。   The front / back determination unit enlarges or reduces the front / back determination feature image so as to correspond to the size of the template edge image of the set with the highest similarity, and the template edge of the set with the highest similarity. 3. The feature image for front / back determination that has been rotated by an angle of an image, and that has been enlarged or reduced and rotated, is moved to the position of the template edge image of the set having the highest degree of similarity. Work determination device. 前記ワークの形状を示すCADデータに基づいて、前記ワークの外形線を線画像で示すテンプレート画像を作成するテンプレート画像作成部と、
前記外形線の内部を所定の色で塗りつぶして、塗りつぶしテンプレート画像を作成するテンプレート画像塗りつぶし部と、
をさらに備え、
前記テンプレート画像エッジ検出部は、前記塗りつぶしテンプレート画像のエッジを検出して、前記塗りつぶしテンプレート画像のエッジを前記テンプレートエッジ画像として用いる
ことを特徴とする請求項1〜3のいずれか1項に記載のワーク判定装置。
A template image creation unit that creates a template image indicating a contour line of the workpiece as a line image based on CAD data indicating the shape of the workpiece;
A template image filling unit that fills the inside of the outline with a predetermined color and creates a filled template image;
Further comprising
The said template image edge detection part detects the edge of the said fill template image, and uses the edge of the said fill template image as the said template edge image. The Claim 1 characterized by the above-mentioned. Work determination device.
載置場所に配置されているワークとパターンマッチングさせるためのテンプレート画像のエッジを検出して、テンプレートエッジ画像を生成するテンプレート画像エッジ検出工程と、
前記載置場所に配置されているワークを撮影したワーク撮影画像データのエッジを検出して、ワーク撮影エッジ画像を生成するワーク撮影画像エッジ検出工程と、
前記テンプレートエッジ画像と前記ワーク撮影エッジ画像とをマッチングさせて、前記載置場所に配置されている前記ワークの位置を検出するワーク位置検出工程と、
前記テンプレート画像の表裏を反転させて前記ワークの裏面を示すテンプレート裏画像を生成し、前記テンプレート画像から、前記テンプレート画像と前記テンプレート裏画像とが重なり合うエッジを差し引くことにより、前記ワークの表裏を判定するための表裏判定用特徴画像を抽出する表裏判定用特徴画像抽出工程と、
前記表裏判定用特徴画像を前記ワーク位置検出工程にて検出された前記ワークの位置に移動させ、前記ワーク撮影エッジ画像と前記表裏判定用特徴画像との類似度を算出して、類似度に基づいて前記載置場所に配置されている前記ワークの表裏を判定する表裏判定工程と、
を含むことを特徴とするワーク判定方法。
A template image edge detection step of detecting a template image edge for pattern matching with a workpiece placed at a placement location and generating a template edge image;
A workpiece photographed image edge detection step of detecting an edge of workpiece photographed image data obtained by photographing the workpiece arranged at the above-mentioned placement location, and generating a workpiece photographed edge image;
Matching the template edge image and the workpiece photographing edge image to detect the position of the workpiece arranged at the placement location, a workpiece position detection step;
A template back image showing the back side of the workpiece is generated by inverting the front and back sides of the template image, and the front and back sides of the workpiece are determined by subtracting an edge where the template image and the template back image overlap from the template image. A feature image extracting step for front / back determination for extracting a front / back determination feature image for performing,
Based on the similarity, the feature image for front / back determination is moved to the position of the workpiece detected in the workpiece position detection step, and the similarity between the workpiece photographing edge image and the feature image for front / back determination is calculated. Front and back determination step for determining the front and back of the work placed at the placement location,
The work determination method characterized by including.
前記テンプレート画像を所定の大きさの範囲で複数の大きさに拡大または縮小し、複数の角度に回転させるテンプレート画像拡大縮小・回転工程をさらに含み、
前記テンプレート画像エッジ検出工程にて、前記テンプレート画像の複数の大きさ及び複数の角度のそれぞれで、前記テンプレート画像のエッジを検出して、複数のテンプレートエッジ画像を生成し、
前記ワーク位置検出工程にて、前記テンプレートエッジ画像の複数の大きさ及び複数の角度における大きさと角度の複数の組それぞれで、前記ワーク撮影エッジ画像に対する前記テンプレートエッジ画像の位置をずらしながら前記テンプレートエッジ画像と前記ワーク撮影エッジ画像とをマッチングさせたとき、前記テンプレートエッジ画像と前記ワーク撮影エッジ画像との類似度が最も高い前記テンプレートエッジ画像の位置であり、前記複数の組のうち類似度が最も高い組における前記テンプレートエッジ画像の位置を、前記載置場所に配置されている前記ワークの位置であると検出する
ことを特徴とする請求項5に記載のワーク判定方法。
The template image further includes a template image enlargement / reduction / rotation step of enlarging or reducing the template image to a plurality of sizes within a predetermined size range and rotating the template image to a plurality of angles,
In the template image edge detection step, an edge of the template image is detected at each of a plurality of sizes and a plurality of angles of the template image to generate a plurality of template edge images,
In the workpiece position detection step, the template edge image is shifted while shifting the position of the template edge image with respect to the workpiece photographing edge image for each of a plurality of sizes of the template edge image and a plurality of sets of sizes and angles at a plurality of angles. When the image and the workpiece photographing edge image are matched, the template edge image has the highest similarity between the template edge image and the workpiece photographing edge image, and the similarity is the highest among the plurality of sets. The work determination method according to claim 5, wherein the position of the template edge image in a high set is detected as the position of the work placed at the placement location.
前記表裏判定工程にて、前記表裏判定用特徴画像を、前記類似度が最も高い組の前記テンプレートエッジ画像の大きさに対応するように拡大または縮小し、前記類似度が最も高い組の前記テンプレートエッジ画像の角度だけ回転させ、拡大または縮小及び回転させた前記表裏判定用特徴画像を、前記類似度が最も高い組の前記テンプレートエッジ画像の位置に移動させることを特徴とする請求項6に記載のワーク判定方法。   In the front / back determination step, the front / back determination feature image is enlarged or reduced so as to correspond to the size of the template edge image having the highest similarity, and the template having the highest similarity is set. The feature image image for front / back determination that has been rotated by an angle of an edge image and enlarged / reduced / rotated is moved to the position of the template edge image of the set having the highest similarity. Work determination method. 前記ワークの形状を示すCADデータに基づいて、前記ワークの外形線を線画像で示すテンプレート画像を作成するテンプレート画像作成工程と、
前記外形線の内部を所定の色で塗りつぶして、塗りつぶしテンプレート画像を作成する塗りつぶしテンプレート画像作成工程と、
をさらに含み、
前記テンプレート画像エッジ検出工程にて、前記塗りつぶしテンプレート画像のエッジを検出して、前記塗りつぶしテンプレート画像のエッジを前記テンプレートエッジ画像として用いる
ことを特徴とする請求項5〜7のいずれか1項に記載のワーク判定方法。
Based on CAD data indicating the shape of the workpiece, a template image creating step for creating a template image showing the outline of the workpiece as a line image;
A fill template image creating step of filling the inside of the outline with a predetermined color and creating a fill template image;
Further including
The edge of the said filling template image is detected in the said template image edge detection process, The edge of the said filling template image is used as the said template edge image. The any one of Claims 5-7 characterized by the above-mentioned. Work determination method.
JP2016063152A 2016-03-28 2016-03-28 Work determination apparatus and method Pending JP2017182113A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016063152A JP2017182113A (en) 2016-03-28 2016-03-28 Work determination apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016063152A JP2017182113A (en) 2016-03-28 2016-03-28 Work determination apparatus and method

Publications (1)

Publication Number Publication Date
JP2017182113A true JP2017182113A (en) 2017-10-05

Family

ID=60004619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016063152A Pending JP2017182113A (en) 2016-03-28 2016-03-28 Work determination apparatus and method

Country Status (1)

Country Link
JP (1) JP2017182113A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019135618A (en) * 2018-02-05 2019-08-15 キヤノン株式会社 Information processing apparatus, system, method of controlling information processing apparatus, and program
CN113349568A (en) * 2020-02-20 2021-09-07 林秀贞 Intelligent storage system and intelligent storage method thereof
WO2023157083A1 (en) * 2022-02-15 2023-08-24 ファナック株式会社 Device for acquiring position of workpiece, control device, robot system, and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019135618A (en) * 2018-02-05 2019-08-15 キヤノン株式会社 Information processing apparatus, system, method of controlling information processing apparatus, and program
CN113349568A (en) * 2020-02-20 2021-09-07 林秀贞 Intelligent storage system and intelligent storage method thereof
CN113349568B (en) * 2020-02-20 2023-08-22 林秀贞 Intelligent storage system and intelligent storage method thereof
WO2023157083A1 (en) * 2022-02-15 2023-08-24 ファナック株式会社 Device for acquiring position of workpiece, control device, robot system, and method
JPWO2023157083A1 (en) * 2022-02-15 2023-08-24

Similar Documents

Publication Publication Date Title
JP4004899B2 (en) Article position / orientation detection apparatus and article removal apparatus
US11625842B2 (en) Image processing apparatus and image processing method
US11654571B2 (en) Three-dimensional data generation device and robot control system
JP6222898B2 (en) Three-dimensional measuring device and robot device
US20170316253A1 (en) Pallet detection using units of physical length
US20150134303A1 (en) Three-dimensional scanning system and method with hole-filling function for point cloud using contact probe
JP6576050B2 (en) Object moving method and system
KR102235999B1 (en) Deformation processing support system and deformation processing support method
JP2017033429A (en) 3D object inspection system
EP3229208A1 (en) Camera pose estimation
CN111742349B (en) Information processing device, information processing method, and information processing storage medium
JP5858773B2 (en) Three-dimensional measurement method, three-dimensional measurement program, and robot apparatus
WO2017115620A1 (en) Deformation work assist system and deformation work assist method
JP2021026599A (en) Image processing system
JP6588270B2 (en) Work position detection apparatus and work position detection method
WO2023224350A3 (en) Method and device for detecting landmark from 3d volume image
JP2017182113A (en) Work determination apparatus and method
CN107442973B (en) Welding bead positioning method and device based on machine vision
CN110853102A (en) Novel robot vision calibration and guide method, device and computer equipment
JP2017173142A (en) Image processing device, image processing method and micro joint cutting system
JPWO2016194078A1 (en) Information processing device
JP2014178967A (en) Three-dimensional object recognition device and three-dimensional object recognition method
JP2015160256A (en) Robot system, processor and control method
JP2015045919A (en) Image recognition method and robot
JP6659641B2 (en) 3D model creation device