JP2019012040A - Control device and control method - Google Patents

Control device and control method Download PDF

Info

Publication number
JP2019012040A
JP2019012040A JP2017129690A JP2017129690A JP2019012040A JP 2019012040 A JP2019012040 A JP 2019012040A JP 2017129690 A JP2017129690 A JP 2017129690A JP 2017129690 A JP2017129690 A JP 2017129690A JP 2019012040 A JP2019012040 A JP 2019012040A
Authority
JP
Japan
Prior art keywords
cpu
intersection
specifying
coordinates
captured image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017129690A
Other languages
Japanese (ja)
Inventor
将也 ▲高▼須
将也 ▲高▼須
Masaya Takasu
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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2017129690A priority Critical patent/JP2019012040A/en
Priority to CN201810689966.9A priority patent/CN109211126A/en
Publication of JP2019012040A publication Critical patent/JP2019012040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/03Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring coordinates of points

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Sewing Machines And Sewing (AREA)

Abstract

To provide a control device and a control method which can accurately associate a coordinate system of a holding device that holds an object with a coordinate system of a photographic image obtained by photographing the object.SOLUTION: A PC is connected to a suction mechanism that holds a cloth and delivers the cloth to a sewing machine, and a movement mechanism having a photographing section for photographing a chart that has a first reference line L1 and a second reference line L2 crossing each other at an intersection, and performs control of associating an image coordinate system with a device coordinate system. The PC specifies a first midpoint and a second midpoint that are midpoints in a horizontal direction for each of a plurality of positions of the first reference line L1 and the second reference line L2. The PC calculates an average position between each of the specified first midpoint and second midpoint. The PC specifies a first straight line and a second straight line that pass through the average position, and determines a coordinate of the intersection of the first straight line and the second straight line. The PC associates the image coordinate system with the device coordinate system based on the determined coordinate of the intersection.SELECTED DRAWING: Figure 17

Description

本発明は、対象物を保持する保持装置の座標系と、対象物を撮影した撮影画像の座標系とを対応付ける制御を行う制御装置、及び制御方法に関する。   The present invention relates to a control device and a control method for performing control to associate a coordinate system of a holding device that holds an object with a coordinate system of a captured image obtained by photographing the object.

特許文献1は、基板とマスクとを精度良く重ね合わせるアライメント装置を開示する。アライメント装置は、基板に付した基板マーク及び基板角度マークと、マスクに付したマスクマークとを、カメラにより撮影する。アライメント装置は、撮影した夫々の画像から、明部と暗部との境界のデータを微分二値化処理して各マークのエッジ点を特定する。アライメント装置は、特定したエッジ点の座標データから各マークの中心点の座標値を求める。アライメント装置は、求めた各マークの中心点の座標値に基づき、各座標値をカメラ座標系から基板座標系に変換する。   Patent Document 1 discloses an alignment apparatus that accurately superimposes a substrate and a mask. The alignment apparatus photographs a substrate mark and a substrate angle mark attached to the substrate and a mask mark attached to the mask with a camera. The alignment apparatus identifies the edge point of each mark by performing differential binarization processing on the boundary data between the bright part and the dark part from each photographed image. The alignment apparatus obtains the coordinate value of the center point of each mark from the coordinate data of the specified edge point. The alignment apparatus converts each coordinate value from the camera coordinate system to the substrate coordinate system based on the obtained coordinate value of the center point of each mark.

特開2008−7819号公報JP 2008-7819 A

画像の位置をエッジ点に基づいて特定する時、ノッチの発生によりエッジ点の位置が不安定になり、画像の位置を精度良く特定できない時がある。故に、保持部により対象物を保持する保持装置において、対象物を撮影した撮影画像の座標系を保持装置の座標系に対応付ける時、精度が低下する可能性がある。   When the position of the image is specified based on the edge point, the position of the edge point becomes unstable due to the occurrence of a notch, and the position of the image may not be specified with high accuracy. Therefore, in the holding device that holds the object by the holding unit, when the coordinate system of the captured image obtained by photographing the object is associated with the coordinate system of the holding device, the accuracy may be lowered.

本発明の目的は、対象物を保持する保持装置の座標系と、対象物を撮影した撮影画像の座標系とを精度良く対応付けることが可能な制御装置、及び制御方法を提供することである。   An object of the present invention is to provide a control device and a control method capable of accurately associating a coordinate system of a holding device that holds an object with a coordinate system of a captured image obtained by photographing the object.

本発明の第一態様に係る制御装置は、対象物を保持して加工装置に受け渡す保持部と、第一方向に延びる第一基準線と、前記第一方向と交差する第二方向に延びる第二基準線とを有し、且つ、前記第一基準線と前記第二基準線とが交差点で交差するチャートを、前記保持部により保持した状態で撮影する撮影部とを備えた保持装置に接続し、前記撮影部が撮影した撮影画像と前記保持部との夫々の座標系を対応付ける制御を行う制御装置であって、前記撮影画像を解析して前記交差点の座標を決定する決定手段と、前記チャートを保持した前記保持部が複数の位置にある状態の夫々で、前記決定手段により決定した前記交差点の座標と、前記保持部の位置を示す座標とに基づき、前記撮影画像と前記保持部との夫々の座標系を対応付ける制御手段とを備え、前記決定手段は、前記撮影画像に含まれる前記第一基準線上の複数の位置の夫々における、前記第一方向と直交する方向の中点である複数の第一中点を特定する第一特定手段と、前記第一特定手段により特定した前記複数の第一中点の位置の夫々の、前記第一方向と直交する方向における第一平均位置を算出する第一平均算出手段と、前記第一方向に延び、前記第一平均算出手段により算出した前記第一平均位置を通過する第一直線を特定する第二特定手段と、前記撮影画像に含まれる前記第二基準線上の複数の位置の夫々における、前記第二方向と直交する方向の中点である複数の第二中点を特定する第三特定手段と、前記第三特定手段により特定した前記複数の第二中点の位置の夫々の、前記第二方向と直交する方向における第二平均位置を算出する第二平均算出手段と、前記第二方向に延び、前記第二平均算出手段により算出した前記第二平均位置を通過する第二直線を特定する第四特定手段と、前記第二特定手段により特定した前記第一直線と、前記第四特定手段により特定した前記第二直線との交点の座標を、前記交差点の座標として決定する座標決定手段と、を備えたことを特徴とする。   The control device according to the first aspect of the present invention extends in a second direction that intersects the first direction, a holding unit that holds the object and delivers it to the processing device, a first reference line that extends in the first direction, and the first direction. A holding device comprising: a second reference line, and a photographing unit for photographing a chart in which the first reference line and the second reference line intersect at an intersection while being held by the holding unit A control unit that connects and controls to associate the respective coordinate systems of the captured image captured by the imaging unit and the holding unit; and a determination unit that analyzes the captured image and determines the coordinates of the intersection; The captured image and the holding unit based on the coordinates of the intersection determined by the determining unit and the coordinates indicating the position of the holding unit in each of the states where the holding unit holding the chart is in a plurality of positions. Control to associate each coordinate system with And the determining means identifies a plurality of first midpoints that are midpoints in a direction orthogonal to the first direction at each of a plurality of positions on the first reference line included in the captured image. First specifying means for performing, and first average calculating means for calculating a first average position in a direction orthogonal to the first direction of each of the plurality of first midpoint positions specified by the first specifying means; A second specifying means for specifying a first straight line extending in the first direction and passing through the first average position calculated by the first average calculating means; and a plurality of the second reference lines included in the photographed image. Third specifying means for specifying a plurality of second midpoints that are midpoints in a direction orthogonal to the second direction in each of the positions, and positions of the plurality of second midpoints specified by the third specifying means In the direction perpendicular to the second direction. Second average calculating means for calculating the second average position, and fourth specifying means for specifying a second straight line extending in the second direction and passing through the second average position calculated by the second average calculating means; Coordinate determining means for determining the coordinates of the intersection of the first straight line specified by the second specifying means and the second straight line specified by the fourth specifying means as the coordinates of the intersection. Features.

制御装置は、チャートを撮影した撮影画像の第一基準線の中点の第一平均位置を通過する第一直線と、第二基準線の中点の第二平均位置を通過する第二直線との交点の座標を、交差点の座標として特定する。制御装置は、特定した交差点の座標と、保持部によるチャートの移動量とに基づき、撮影画像と保持部との夫々の座標系を対応付ける。これによって、制御装置は、第一基準線と第二基準線とをエッジ検出により検出して交差点の座標を特定する時よりも、交差点の座標を精度よく決定できる。故に、制御装置は、対象物を保持する保持装置の座標系と、対象物を撮影する撮影画像の座標系とを精度良く対応付けることができる。   The control device includes a first straight line that passes through the first average position of the midpoint of the first reference line of the photographed image obtained by photographing the chart, and a second straight line that passes through the second average position of the midpoint of the second reference line. The coordinates of the intersection are specified as the coordinates of the intersection. The control device associates each coordinate system of the captured image with the holding unit based on the coordinates of the specified intersection and the movement amount of the chart by the holding unit. Thereby, the control device can determine the coordinates of the intersection with higher accuracy than when the coordinates of the intersection are specified by detecting the first reference line and the second reference line by edge detection. Therefore, the control device can accurately associate the coordinate system of the holding device that holds the object with the coordinate system of the captured image that images the object.

第一態様において、前記制御手段は、前記チャートを保持した前記保持部が第一基準位置にある状態で、前記撮影部により撮影した前記撮影画像に基づき前記決定手段が決定した第一交差点座標、前記チャートを保持した前記保持部が第二基準位置にある状態で、前記撮影部により撮影した前記撮影画像に基づき前記決定手段が決定した第二交差点座標、前記第一基準位置にある時の前記保持部の位置を示す第一保持部座標、及び、前記第二基準位置にある時の前記保持部の位置を示す第二保持部座標に基づき、前記撮影画像と前記保持部との夫々の座標系を対応付けてもよい。制御装置は、保持部によりチャートを移動する前と後の夫々の位置で撮影画像により撮影した撮影画像に基づき、夫々の位置における交差点の座標(第一交差点座標、第二交差点座標)を決定する。制御装置は、決定した交差点の座標と、保持部の移動前と移動後の夫々の位置を示す座標(第一保持部座標、第二保持部座標)とに基づき、撮影画像と保持部との夫々の座標系を対応付ける。故に、制御部は、交差点と保持部との夫の移動量に基づき、撮影画像と保持部との夫々の座標系を対応付けることができる。   In the first aspect, the control means, the first intersection coordinates determined by the determination means based on the captured image captured by the imaging unit in a state where the holding unit that holds the chart is in a first reference position, The second intersection coordinates determined by the determining means based on the captured image captured by the imaging unit in a state where the holding unit that holds the chart is at the second reference position, Based on the first holding part coordinates indicating the position of the holding part and the second holding part coordinates indicating the position of the holding part when in the second reference position, the coordinates of the captured image and the holding part Systems may be associated. The control device determines the coordinates of the intersection (first intersection coordinates, second intersection coordinates) at each position based on the photographed images taken by the photographed images at the respective positions before and after the chart is moved by the holding unit. . Based on the coordinates of the determined intersection and the coordinates (first holding unit coordinates, second holding unit coordinates) indicating the respective positions before and after the movement of the holding unit, the control device Associate each coordinate system. Therefore, the control unit can associate the coordinate systems of the captured image and the holding unit with each other based on the movement amount of the husband between the intersection and the holding unit.

第一態様において、前記第一方向と前記第二方向とは直交し、前記チャートは、前記第一基準線及び前記第二基準線を囲む四角形の4つの頂点のうち対角に位置する2つの頂点の位置の夫々にマークを有し、前記決定手段は、2つの前記マークを検出する検出手段を更に有し、前記撮影部により撮影した前記撮影画像のうち、前記検出手段により検出した前記2つのマークの夫々の位置を対角の頂点として有する四角形で囲まれた領域を解析して前記交差点の座標を決定してもよい。制御装置は、交差点座標を決定する時に解析対象とする撮影画像の領域を制限できる。故に、制御部は、交差点の座標を決定する為に必要な処理の負荷を軽減できる。   In the first aspect, the first direction and the second direction are orthogonal to each other, and the chart is two diagonally positioned four corners of a quadrangle surrounding the first reference line and the second reference line. Each of the positions of the vertices has a mark, and the determination unit further includes a detection unit that detects two of the marks, and the 2 detected by the detection unit among the captured images captured by the imaging unit. You may determine the coordinate of the said intersection by analyzing the area | region enclosed with the rectangle which has each position of one mark as a diagonal vertex. The control device can limit the area of the captured image to be analyzed when determining the intersection coordinates. Therefore, the control unit can reduce the processing load necessary to determine the coordinates of the intersection.

第一態様において、前記マークは、円環状の曲線を有し、且つ、前記曲線の径方向の長さと、前記曲線で囲まれた内部の径方向の長さの比が所定条件を満たし、前記検出手段は、前記撮影画像を前記第一方向と前記第二方向とに沿って逐次解析することにより、前記曲線の長さと、前記曲線で囲まれた内部の長さとの比が、前記第一方向と前記第二方向との何れにおいても前記所定条件を満たす場合に前記マークを検出してもよい。該時、制御装置は、交差点を決定する為に解析の対象とする撮影画像の領域を、簡易且つ精度良く特定できる。   In the first aspect, the mark has an annular curve, and a ratio of a radial length of the curve to an inner radial length surrounded by the curve satisfies a predetermined condition, The detecting means sequentially analyzes the captured image along the first direction and the second direction, so that a ratio between the length of the curve and the inner length surrounded by the curve is the first. The mark may be detected when the predetermined condition is satisfied in both the direction and the second direction. At this time, the control device can easily and accurately specify the area of the captured image to be analyzed in order to determine the intersection.

本発明の第二態様に係る制御方法は、対象物を保持して加工装置に受け渡す保持部と、第一方向に延びる第一基準線と、前記第一方向と交差する第二方向に延びる第二基準線とを有し、且つ、前記第一基準線と前記第二基準線とが交差点で交差するチャートを、前記保持部により保持した状態で撮影する撮影部とを備えた保持装置に接続し、前記撮影部が撮影した撮影画像と前記保持部との夫々の座標系を対応付ける制御を行う制御装置によって実行される制御方法であって、前記撮影画像を解析して前記交差点の座標を決定する決定ステップと、前記チャートを保持した前記保持部が複数の位置にある状態の夫々で、前記決定ステップにより決定した前記交差点の座標と、前記保持部の位置を示す座標とに基づき、前記撮影画像と前記保持部との夫々の座標系を対応付ける制御ステップとを備え、前記決定ステップは、前記撮影画像に含まれる前記第一基準線上の複数の位置の夫々における、前記第一方向と直交する方向の中点である複数の第一中点を特定する第一特定ステップと、前記第一特定ステップで特定した前記複数の第一中点の位置の夫々の、前記第一方向と直交する方向における第一平均位置を算出する第一平均算出ステップと、前記第一方向に延び、前記第一平均算出ステップで算出した前記第一平均位置を通過する第一直線を特定する第二特定ステップと、前記撮影画像に含まれる前記第二基準線上の複数の位置の夫々における、前記第二方向と直交する方向の中点である複数の第二中点を特定する第三特定ステップと、前記第三特定ステップで特定した前記複数の第二中点の位置の夫々の、前記第二方向と直交する方向における第二平均位置を算出する第二平均算出ステップと、前記第二方向に延び、前記第二平均算出ステップで算出した前記第二平均位置を通過する第二直線を特定する第四特定ステップと、前記第二特定ステップで特定した前記第一直線と、前記第四特定ステップで特定した前記第二直線との交点の座標を、前記交差点の座標として決定する座標決定ステップと、を備えたことを特徴とする。第二態様によれば、第一態様と同様の効果を奏することができる。   The control method according to the second aspect of the present invention extends in a second direction that intersects the first direction, a holding portion that holds the object and delivers it to the processing apparatus, a first reference line that extends in the first direction, and the first direction. A holding device comprising: a second reference line, and a photographing unit for photographing a chart in which the first reference line and the second reference line intersect at an intersection while being held by the holding unit The control method is executed by a control device that connects and controls to associate each coordinate system of the captured image captured by the imaging unit and the holding unit, and analyzes the captured image to determine the coordinates of the intersection Based on the determination step to determine, the coordinates of the intersection determined by the determination step, and the coordinates indicating the position of the holding unit in each of the states where the holding unit holding the chart is in a plurality of positions, Taken image and holding And a control step for associating each of the coordinate systems with each other, wherein the determining step is a midpoint in a direction orthogonal to the first direction at each of a plurality of positions on the first reference line included in the captured image. A first specifying step for specifying a plurality of first midpoints, and a first average position in a direction orthogonal to the first direction of each of the positions of the plurality of first midpoints specified in the first specifying step Included in the captured image, a first specifying step that calculates a first straight line that extends in the first direction and passes through the first average position calculated in the first average calculating step, and A third specifying step for specifying a plurality of second midpoints that are midpoints in a direction orthogonal to the second direction at each of a plurality of positions on the second reference line, and specifying in the third specifying step Said compound A second average calculation step for calculating a second average position in a direction orthogonal to the second direction at each of the positions of the second middle points, and extending in the second direction, and calculating in the second average calculation step The coordinates of the intersection of the fourth specifying step for specifying the second straight line passing through the second average position, the first straight line specified in the second specifying step, and the second straight line specified in the fourth specifying step And a coordinate determining step for determining as a coordinate of the intersection. According to the 2nd aspect, there can exist an effect similar to a 1st aspect.

縫製システム300の斜視図。The perspective view of the sewing system 300. FIG. ミシン1の斜視図。The perspective view of the sewing machine 1. FIG. 水平動機構6の斜視図。The perspective view of the horizontal moving mechanism 6. FIG. 移動装置100の斜視図。The perspective view of the moving apparatus 100. FIG. 布把持装置150の正面図。The front view of the cloth holding apparatus 150. FIG. PC200の電気的構成を示すブロック図。The block diagram which shows the electric constitution of PC200. ミシン1の電気的構成を示すブロック図。FIG. 2 is a block diagram showing an electrical configuration of the sewing machine 1. 移動装置100の電気的構成を示すブロック図。FIG. 3 is a block diagram showing an electrical configuration of the moving apparatus 100. 窓部101、流通板142の平面図。The top view of the window part 101 and the distribution board 142. FIG. チャートSを示す図。The figure which shows the chart S. メイン処理を示す流れ図。The flowchart which shows a main process. 座標取得処理を示す流れ図。The flowchart which shows a coordinate acquisition process. マーク位置検出処理を示す流れ図。The flowchart which shows a mark position detection process. 候補判定処理を示す流れ図。The flowchart which shows a candidate determination process. 直線検出処理を示す流れ図。The flowchart which shows a straight line detection process. マークMの検出方法を説明する為の図。The figure for demonstrating the detection method of the mark M. FIG. 第一中点の特定方法を説明する為の図。The figure for demonstrating the specific method of a 1st midpoint. 第一直線F1の特定方法を説明する為の図。The figure for demonstrating the specific method of the 1st straight line F1. 第二中点の特定方法を説明する為の図。The figure for demonstrating the specific method of a 2nd midpoint. 第二直線F2の特定方法を説明する為の図。The figure for demonstrating the specific method of the 2nd straight line F2. 第一交差点C1と第二交差点C2を説明する為の図。The figure for demonstrating the 1st intersection C1 and the 2nd intersection C2.

図面を参照し本発明の一実施形態を説明する。以下説明は、図中に矢印で示す左右、前後、上下を使用する。   An embodiment of the present invention will be described with reference to the drawings. In the following description, left, right, front, back, and top and bottom indicated by arrows in the figure are used.

<縫製システム300の概要>
図1を参照し、縫製システム300の概略構成を説明する。縫製システム300は、フレーム301、ミシン1、移動装置100、パーソナルコンピュータ(「PC」と称す)200を備える。フレーム301は、鉄又はアルミ製の棒材を矩形に組んだ構造体である。フレーム301は、中段に棚板305を設け、下段に棚板308を設ける。ミシン1は棚板305上に固定する。移動装置100はミシン1の右方に設ける。PC200は棚板308上に配置したノート型のPCであり、ミシン1と移動装置100の動作を制御する。PC200は、ミシン1の制御部50(図7参照)と移動装置100の制御部110(図8参照)の夫々に電気的に接続する。制御部50、110は、棚板305の下部に設けた制御箱307に収容する。
<Outline of the sewing system 300>
A schematic configuration of the sewing system 300 will be described with reference to FIG. The sewing system 300 includes a frame 301, a sewing machine 1, a moving device 100, and a personal computer (referred to as “PC”) 200. The frame 301 is a structure in which iron or aluminum bars are assembled in a rectangular shape. The frame 301 is provided with a shelf board 305 at the middle stage and a shelf board 308 at the lower stage. The sewing machine 1 is fixed on the shelf board 305. The moving device 100 is provided on the right side of the sewing machine 1. The PC 200 is a notebook PC arranged on the shelf board 308 and controls the operations of the sewing machine 1 and the moving device 100. The PC 200 is electrically connected to each of the control unit 50 (see FIG. 7) of the sewing machine 1 and the control unit 110 (see FIG. 8) of the moving device 100. The control units 50 and 110 are accommodated in a control box 307 provided at the lower part of the shelf board 305.

後述するミシン1の補助板5は、布箱102、窓部101、流通板142を備える。布箱102は、ミシン1の右前方に設け、ミシン1の縫製対象物である布105(図9参照)を積み重ねて収容する。本実施形態において、布105はシャツの前身頃である。窓部101は、布箱102の右後方に設ける。窓部101は、円形の強化ガラス又は透明なアクリル板である。流通板142は布箱102後方に設ける。流通板142は、上下方向に開口した複数の孔である通気孔を備える。移動装置100は、布箱102に収容した布105を一枚ずつ移動して窓部101の何れかの位置に載置した後、更に布105を移動して流通板142の何れかの位置に載置する。以下、布箱102に収容した布105の位置を「第一位置」(図9参照)と称す。窓部101において布105を載置する位置を「第二位置」(図9参照)と称す。流通板142において布105を載置する位置を「第三位置」(図9参照)と称す。撮影部117は、移動装置100が第二位置から第三位置に布105を移動する時、布105を撮影する。ミシン1は、第三位置にある布105を受け取り、縫製する。   The auxiliary plate 5 of the sewing machine 1 described later includes a cloth box 102, a window portion 101, and a flow plate 142. The cloth box 102 is provided on the right front side of the sewing machine 1, and stores cloth 105 (see FIG. 9) that is a sewing object of the sewing machine 1 in a stacked manner. In this embodiment, the cloth 105 is the front body of the shirt. The window portion 101 is provided on the right rear side of the cloth box 102. The window part 101 is a circular tempered glass or a transparent acrylic board. The distribution plate 142 is provided behind the cloth box 102. The flow plate 142 includes a plurality of air holes that are open in the vertical direction. The moving device 100 moves the cloth 105 accommodated in the cloth box 102 one by one and places it on any position of the window portion 101, and then moves the cloth 105 to any position on the flow plate 142. Place. Hereinafter, the position of the cloth 105 accommodated in the cloth box 102 is referred to as a “first position” (see FIG. 9). The position where the cloth 105 is placed on the window 101 is referred to as a “second position” (see FIG. 9). The position where the cloth 105 is placed on the flow plate 142 is referred to as a “third position” (see FIG. 9). The photographing unit 117 photographs the cloth 105 when the moving device 100 moves the cloth 105 from the second position to the third position. The sewing machine 1 receives and sews the cloth 105 in the third position.

<ミシン1>
図2、図3を参照しミシン1の機械的構成を説明する。ミシン1はベッド部2、脚柱部3、アーム部4、縫製機構8を備える。ベッド部2は、棚板305(図1参照)上に配置する。ベッド部2は前後方向に延びる。脚柱部3は、ベッド部2後側から上方に延びる。アーム部4は、脚柱部3上端からベッド部2の上面に対向して前方に延び、前端に前端部7を備える。縫製機構8は、ミシンモータ31(図7参照)、主軸、針棒駆動機構、針棒10、垂直釜を備える。ミシンモータ31は脚柱部3内部に設ける。主軸と針棒駆動機構はアーム部4内部に設ける。主軸は前後方向に延びる。主軸の後端部はミシンモータ31に連結し、主軸の前端部は針棒駆動機構に連結する。針棒駆動機構は針棒10と連結する。針棒10は前端部7の下端から下方へ延びる。縫針11は針棒10の下端に装着する。垂直釜は、ベッド部2内部に設ける。垂直釜は、ベッド部2と脚柱部3の内部に設けた連結機構を介して、ミシンモータ31と連結する。
<Sewing machine 1>
The mechanical configuration of the sewing machine 1 will be described with reference to FIGS. The sewing machine 1 includes a bed 2, a pedestal 3, an arm 4, and a sewing mechanism 8. The bed unit 2 is disposed on a shelf board 305 (see FIG. 1). The bed portion 2 extends in the front-rear direction. The pedestal part 3 extends upward from the rear side of the bed part 2. The arm portion 4 extends forward from the upper end of the pedestal portion 3 so as to face the upper surface of the bed portion 2, and includes a front end portion 7 at the front end. The sewing mechanism 8 includes a sewing machine motor 31 (see FIG. 7), a main shaft, a needle bar drive mechanism, a needle bar 10, and a vertical hook. The sewing machine motor 31 is provided inside the pedestal 3. The main shaft and the needle bar drive mechanism are provided inside the arm portion 4. The main shaft extends in the front-rear direction. The rear end portion of the main shaft is connected to the sewing machine motor 31, and the front end portion of the main shaft is connected to the needle bar drive mechanism. The needle bar drive mechanism is connected to the needle bar 10. The needle bar 10 extends downward from the lower end of the front end portion 7. The sewing needle 11 is attached to the lower end of the needle bar 10. The vertical hook is provided inside the bed portion 2. The vertical shuttle is connected to the sewing machine motor 31 via a connecting mechanism provided inside the bed portion 2 and the leg post portion 3.

ミシン1は、ベッド部2の上方に補助板5と水平動機構6を備える。補助板5は針棒10よりも下方に位置し、水平方向に延びる上面を有する。補助板5は針板12を備える。針板12上面と補助板5上面は略同じ高さである。針板12は垂直釜の真上にある。針板12は、縫針11が挿通可能な針穴13を有する。   The sewing machine 1 includes an auxiliary plate 5 and a horizontal movement mechanism 6 above the bed portion 2. The auxiliary plate 5 is located below the needle bar 10 and has an upper surface extending in the horizontal direction. The auxiliary plate 5 includes a needle plate 12. The upper surface of the needle plate 12 and the upper surface of the auxiliary plate 5 are substantially the same height. The needle plate 12 is directly above the vertical hook. The needle plate 12 has a needle hole 13 into which the sewing needle 11 can be inserted.

水平動機構6は、X軸移動機構、X軸モータ32(図7参照)、X移動板、押え腕65、Y移動腕66、Y軸移動機構(図示略)、Y軸モータ34(図7参照)、保持体70を備える。X軸移動機構はベッド部2内部に設ける。X軸モータ32はX軸移動機構と連結するパルスモータである。X軸移動機構は、X軸モータ32を駆動源としてX移動板をX軸方向(左右方向)へ移動する。X移動板の上面は、前後方向に延びるレール(図示略)を備える。レールは、押え腕65を前後方向に移動可能に支持する。押え腕65は、補助板5よりも上方にある。押え腕65は、X移動板と共にX軸方向へ移動する。押え腕65は、左右方向に並ぶ一対のエアシリンダ69を備える。   The horizontal movement mechanism 6 includes an X-axis movement mechanism, an X-axis motor 32 (see FIG. 7), an X movement plate, a presser arm 65, a Y movement arm 66, a Y-axis movement mechanism (not shown), and a Y-axis motor 34 (FIG. 7). A holding body 70. The X-axis moving mechanism is provided inside the bed portion 2. The X-axis motor 32 is a pulse motor connected to the X-axis movement mechanism. The X-axis moving mechanism moves the X moving plate in the X-axis direction (left-right direction) using the X-axis motor 32 as a drive source. The upper surface of the X moving plate includes a rail (not shown) extending in the front-rear direction. The rail supports the presser arm 65 so as to be movable in the front-rear direction. The presser arm 65 is located above the auxiliary plate 5. The presser arm 65 moves in the X-axis direction together with the X moving plate. The presser arm 65 includes a pair of air cylinders 69 arranged in the left-right direction.

Y移動腕66は、支持部67と腕部68を備える。支持部67は左右方向に延びる。支持部67は、押え腕65の後部をX軸方向に移動可能に支持する。腕部68は支持部67後側に連結し、前後方向に延びる。腕部68は、ベッド部2内に設けたY軸移動機構に接続する。Y軸モータ34はY軸移動機構に連結するパルスモータである。Y軸移動機構はY軸モータ34(図7参照)を駆動源として腕部68をY軸方向(前後方向)へ移動する。支持部67は、腕部68の移動に伴いY軸方向へ移動する。押え腕65は、Y移動腕66と共にY軸方向へ移動する。   The Y moving arm 66 includes a support part 67 and an arm part 68. The support part 67 extends in the left-right direction. The support part 67 supports the rear part of the presser arm 65 so as to be movable in the X-axis direction. The arm portion 68 is connected to the rear side of the support portion 67 and extends in the front-rear direction. The arm part 68 is connected to a Y-axis moving mechanism provided in the bed part 2. The Y-axis motor 34 is a pulse motor connected to the Y-axis moving mechanism. The Y-axis moving mechanism moves the arm portion 68 in the Y-axis direction (front-rear direction) using the Y-axis motor 34 (see FIG. 7) as a drive source. The support part 67 moves in the Y-axis direction as the arm part 68 moves. The presser arm 65 moves in the Y-axis direction together with the Y moving arm 66.

保持体70は押え腕65の前端部に取り付ける。保持体70は、昇降板71、エアシリンダ72、押え足73、レール75、スライダ76、押え板74を備える。昇降板71は、一対のエアシリンダ69の夫々のロッドに連結する。昇降板71は、エアシリンダ69の駆動によって上下動する。エアシリンダ72は、左右方向に延び、昇降板71に固定する。押え足73は側面視L字状であり、エアシリンダ72のロッドの左端部に連結する。押え足73はエアシリンダ72の駆動によって左右動する。レール75は左右に延び、押え足73の後面に固定する。スライダ76はレール75に係合し、押え足73を左右動可能に支持する。押え板74は押え足73の下端部に固定する。押え板74は水平方向に配置した板部材であり、平面視矩形状の開口を有する。   The holding body 70 is attached to the front end portion of the presser arm 65. The holding body 70 includes a lifting plate 71, an air cylinder 72, a presser foot 73, a rail 75, a slider 76, and a presser plate 74. The elevating plate 71 is connected to each rod of the pair of air cylinders 69. The elevating plate 71 moves up and down by driving the air cylinder 69. The air cylinder 72 extends in the left-right direction and is fixed to the lifting plate 71. The presser foot 73 is L-shaped in side view and is connected to the left end of the rod of the air cylinder 72. The presser foot 73 moves left and right as the air cylinder 72 is driven. The rail 75 extends to the left and right and is fixed to the rear surface of the presser foot 73. The slider 76 engages with the rail 75 and supports the presser foot 73 so as to be movable in the left-right direction. The presser plate 74 is fixed to the lower end portion of the presser foot 73. The holding plate 74 is a plate member arranged in the horizontal direction and has an opening that is rectangular in plan view.

押え板74は昇降板71と共に上下動する。押え板74は、移動範囲の下端に位置した時、補助板5との間に布105を上下から挟んで保持する。押え板74は、移動範囲の上端に位置した時、補助板5から上方に離れ、布105の保持を解除する。押え足73は、エアシリンダ72の駆動により左右方向に移動する。図3では、移動範囲の右端に位置する押え足73を実線で図示し、移動範囲の左端に位置する押え足73を二点鎖線で示す。押え腕65は、押え板74と補助板5との間に布105を挟んだ状態でX軸モータ32とY軸モータ34の駆動により移動し、第三位置にある布105を、針板12上の針穴13上方に移動する。以下、針板12上の針穴13上方に布105が配置する位置を「第四位置」と称す。   The presser plate 74 moves up and down together with the lift plate 71. When the presser plate 74 is positioned at the lower end of the movement range, the presser plate 74 holds the cloth 105 between the auxiliary plate 5 from above and below. When the presser plate 74 is positioned at the upper end of the moving range, the presser plate 74 moves away from the auxiliary plate 5 and releases the holding of the cloth 105. The presser foot 73 moves in the left-right direction by driving the air cylinder 72. In FIG. 3, the presser foot 73 positioned at the right end of the movement range is indicated by a solid line, and the presser foot 73 positioned at the left end of the movement range is indicated by a two-dot chain line. The presser arm 65 moves by driving the X-axis motor 32 and the Y-axis motor 34 with the cloth 105 sandwiched between the presser plate 74 and the auxiliary plate 5, and moves the cloth 105 in the third position to the needle plate 12. It moves above the upper needle hole 13. Hereinafter, the position where the cloth 105 is arranged above the needle hole 13 on the needle plate 12 is referred to as a “fourth position”.

<移動装置100>
図4、図5を参照し移動装置100の機械的構成を説明する。移動装置100は、布把持装置150、移動機構120、吸着機構130、撮影部117、吸引機構140を備える。布把持装置150は、布箱102で積み重なった複数の布105から一枚の布105を取り出して、第一位置から第二位置迄移動する(図9参照)。布把持装置150は回動機構160、上下エアシリンダ170、把持機構180を備える。回動機構160は台座部161、エアシリンダ162、支柱163、回動腕164を備える。台座部161は補助板5上に固定し、上下方向に延びる棒状の支柱163を回動可能に支持する。支柱163の下端部は台座部161内に配置する。エアシリンダ162は台座部161の側部に設ける。エアシリンダ162のロッド165は台座部161内に配置し、支柱163の前方で左右方向に伸縮する。支柱163の下端部はピニオンギア(図示略)を備える。エアシリンダ162のロッド165はラックギア(図示略)を備える。ラックギアはピニオンギアと噛み合う。支柱163は、エアシリンダ162の駆動により回動する。回動腕164は支柱163の上端部から水平方向に延びる。回動腕164は上下エアシリンダ170を支持する。
<Moving device 100>
The mechanical configuration of the moving device 100 will be described with reference to FIGS. 4 and 5. The moving device 100 includes a cloth gripping device 150, a moving mechanism 120, a suction mechanism 130, a photographing unit 117, and a suction mechanism 140. The cloth gripping device 150 takes out one piece of cloth 105 from the plurality of cloths 105 stacked in the cloth box 102 and moves from the first position to the second position (see FIG. 9). The cloth gripping device 150 includes a rotation mechanism 160, an upper and lower air cylinder 170, and a gripping mechanism 180. The rotation mechanism 160 includes a pedestal portion 161, an air cylinder 162, a column 163, and a rotation arm 164. The pedestal portion 161 is fixed on the auxiliary plate 5 and supports a rod-shaped support column 163 extending in the vertical direction so as to be rotatable. The lower end portion of the column 163 is disposed in the pedestal portion 161. The air cylinder 162 is provided on the side portion of the base portion 161. The rod 165 of the air cylinder 162 is disposed in the pedestal portion 161 and expands and contracts in the left-right direction in front of the support column 163. A lower end portion of the support column 163 includes a pinion gear (not shown). The rod 165 of the air cylinder 162 includes a rack gear (not shown). The rack gear meshes with the pinion gear. The support 163 is rotated by driving the air cylinder 162. The rotating arm 164 extends in the horizontal direction from the upper end portion of the column 163. The rotating arm 164 supports the upper and lower air cylinders 170.

上下エアシリンダ170は角形であり、下方に伸縮する二本のロッド171を備える。把持機構180は、二本のロッド171の下端に接続する。上下エアシリンダ170は、把持機構180を上下動する。把持機構180は、エアシリンダ162の駆動により、上下エアシリンダ170と共に移動する。図4では、上側から見て最も反時計回り方向に移動した把持機構180の位置を実線で示す。該時、把持機構180は平面視で布箱102上方に位置する。図4では、上側から見て最も時計回り方向に移動した把持機構180の位置を二点鎖線で示す。該時、把持機構180は平面視で窓部101上方に位置する。   The upper and lower air cylinders 170 are square and include two rods 171 that expand and contract downward. The gripping mechanism 180 is connected to the lower ends of the two rods 171. The vertical air cylinder 170 moves the gripping mechanism 180 up and down. The gripping mechanism 180 moves together with the upper and lower air cylinders 170 by driving the air cylinder 162. In FIG. 4, the position of the gripping mechanism 180 that has moved most counterclockwise as viewed from above is indicated by a solid line. At this time, the gripping mechanism 180 is positioned above the cloth box 102 in plan view. In FIG. 4, the position of the gripping mechanism 180 that has moved most clockwise as viewed from above is indicated by a two-dot chain line. At this time, the gripping mechanism 180 is positioned above the window portion 101 in plan view.

把持機構180は、支持部181、作動部187A、187B(総称して「作動部187」と称す)を備える。支持部181は左右方向に延び、ロッド171下端に連結する。作動部187Aは支持部181の左部に設け、作動部187Bは支持部181の右部に設ける。作動部187A、187Bの構成は左右対称である。   The gripping mechanism 180 includes a support portion 181 and operation portions 187A and 187B (collectively referred to as “operation portion 187”). The support portion 181 extends in the left-right direction and is connected to the lower end of the rod 171. The operating part 187A is provided on the left part of the support part 181 and the operating part 187B is provided on the right part of the support part 181. The configuration of the operating portions 187A and 187B is symmetrical.

作動部187は、脚部182、保持機構、軸棒185、把持部184、捩りバネを備える。脚部182は、側面視U字状に曲げ加工した板状の部材である。脚部182は、前後方向に対向する板状の部分の夫々に、上下方向に延びる一対の長穴173を有する。支持部181は、前後方向に対向する部分の外側面に、板状の一対の突部159を固定する。突部159は、上下方向に長い長円形状である。支持部181は一対の長穴173に一対の突部159を係合し、脚部182を長穴173の範囲内で上下動可能に支持する。脚部182は、支持部181に対して相対的に上下動する。脚部182は下端部に足部183を有する。足部183下端部は把持部184側に向けて突出する。図5では、移動範囲の上端に位置した脚部182の位置を二点鎖線で示す。図5では、移動範囲の下端に位置した脚部182の位置を実線で図示する。保持機構は公知のノック機構と同様の構成を有する。保持機構は、脚部182を上方に付勢する力が作用する度に、脚部182を保持する位置を、支持部181に対して上側に相対移動した位置又は下側に相対移動した位置に切り替える。軸棒185は、支持部181の前壁と後壁とに支持した前後方向に沿う軸である。軸棒185は把持部184を回動可能に支持する。捩りバネは、軸棒185に設け、把持部184の先端部188が足部183から離隔する向きに把持部184を付勢する。図5では、先端部188が足部183に近接する向きに回動した把持部184の位置を二点鎖線で示す。該時、把持部184は足部183との間に布105を挟む。図5では、先端部188が足部183から離隔する向きに回動した把持部184の位置を実線で示す。   The operating unit 187 includes a leg 182, a holding mechanism, a shaft rod 185, a gripping unit 184, and a torsion spring. The leg portion 182 is a plate-like member that is bent into a U shape when viewed from the side. The leg portion 182 has a pair of elongated holes 173 extending in the vertical direction in each of the plate-like portions facing in the front-rear direction. The support portion 181 fixes a pair of plate-like protrusions 159 to the outer surface of the portion facing in the front-rear direction. The protrusion 159 has an oval shape that is long in the vertical direction. The support portion 181 engages the pair of protrusions 159 with the pair of elongated holes 173, and supports the leg portion 182 within the range of the elongated holes 173 so as to be movable up and down. The leg portion 182 moves up and down relatively with respect to the support portion 181. The leg 182 has a foot 183 at the lower end. The lower end portion of the foot portion 183 protrudes toward the grip portion 184 side. In FIG. 5, the position of the leg 182 located at the upper end of the movement range is indicated by a two-dot chain line. In FIG. 5, the position of the leg 182 located at the lower end of the movement range is illustrated by a solid line. The holding mechanism has the same configuration as a known knock mechanism. Each time a force that urges the leg 182 upward is applied, the holding mechanism moves the position where the leg 182 is held to a position where the leg 182 is moved relative to the upper side or a position where the leg 182 is moved relative to the lower side. Switch. The shaft rod 185 is a shaft along the front-rear direction supported by the front wall and the rear wall of the support portion 181. The shaft rod 185 supports the grip portion 184 so as to be rotatable. The torsion spring is provided on the shaft rod 185 and biases the grip portion 184 in a direction in which the tip end portion 188 of the grip portion 184 is separated from the foot portion 183. In FIG. 5, the position of the grip portion 184 rotated in the direction in which the distal end portion 188 approaches the foot portion 183 is indicated by a two-dot chain line. At this time, the grip portion 184 sandwiches the cloth 105 between the foot portion 183. In FIG. 5, the solid line indicates the position of the grip portion 184 rotated in a direction in which the distal end portion 188 is separated from the foot portion 183.

移動機構120は、第二位置にある布105を第三位置迄移動する(図9参照)。移動機構120は、支柱部131、第一駆動モータ121(図8参照)、第一腕部132、第二腕部133、第二駆動モータ122(図8参照)、第三駆動モータ123(図8参照)、カバー134を有する。支柱部131は上下方向に延びる円筒状であり、下端部を棚板305上に固定する。第一駆動モータ121は支柱部131内部にて支持したパルスモータである。第一駆動モータ121の出力軸は第一軸部125である。第一軸部125は、上下方向を軸方向とし、支柱部131から上方に突出する。第一腕部132は、支柱部131よりも上側に設け、水平方向に延びる。第一腕部132の一端部は、第一軸部125に固定し、水平方向に延びる。第一腕部132は、第一駆動モータ121の駆動により、第一軸部125を中心に回動可能である。   The moving mechanism 120 moves the cloth 105 in the second position to the third position (see FIG. 9). The moving mechanism 120 includes a support 131, a first drive motor 121 (see FIG. 8), a first arm 132, a second arm 133, a second drive motor 122 (see FIG. 8), and a third drive motor 123 (see FIG. 8). 8) and a cover 134. The column portion 131 has a cylindrical shape extending in the vertical direction, and a lower end portion is fixed on the shelf plate 305. The first drive motor 121 is a pulse motor supported inside the column portion 131. The output shaft of the first drive motor 121 is a first shaft portion 125. The first shaft portion 125 protrudes upward from the column portion 131 with the vertical direction as the axial direction. The 1st arm part 132 is provided above the support | pillar part 131, and is extended in a horizontal direction. One end of the first arm portion 132 is fixed to the first shaft portion 125 and extends in the horizontal direction. The first arm portion 132 can be rotated around the first shaft portion 125 by the drive of the first drive motor 121.

第一腕部132の他端部は第二軸部108を備える。第二軸部108は、上下方向に延び、第一腕部132から上方に突出する。第二腕部133は、第一腕部132よりも上側に設ける。第二軸部108は、第二腕部133の一端部を回動可能に支持する。第二腕部133は、第二軸部108から水平方向に延びる。第二駆動モータ122(図8参照)は第二腕部133の一端部内に設けたパルスモータである。第二駆動モータ122は第二軸部108に連結する。第二腕部133は、第二駆動モータ122の駆動により、第二軸部108を中心として第一腕部132に対して相対的に回動する。   The other end portion of the first arm portion 132 includes a second shaft portion 108. The second shaft portion 108 extends in the vertical direction and protrudes upward from the first arm portion 132. The second arm portion 133 is provided above the first arm portion 132. The 2nd axial part 108 supports the one end part of the 2nd arm part 133 so that rotation is possible. The second arm portion 133 extends in the horizontal direction from the second shaft portion 108. The second drive motor 122 (see FIG. 8) is a pulse motor provided in one end portion of the second arm portion 133. The second drive motor 122 is connected to the second shaft portion 108. The second arm portion 133 rotates relative to the first arm portion 132 about the second shaft portion 108 by the drive of the second drive motor 122.

第三駆動モータ123(図8参照)は、第二腕部133の他端部内に設けたパルスモータである。カバー134は筒状であり、第二腕部133の他端部から上方に延びる。カバー134は、内部に螺子軸137を備える。螺子軸137は、上下方向に延び、第二腕部133の他端部にて回動可能に支持する。螺子軸137は第三駆動モータ123と連結する。螺子軸137は、第三駆動モータ123の駆動により、螺子軸137を中心に回動しながら上下動する。   The third drive motor 123 (see FIG. 8) is a pulse motor provided in the other end portion of the second arm portion 133. The cover 134 is cylindrical and extends upward from the other end portion of the second arm portion 133. The cover 134 includes a screw shaft 137 inside. The screw shaft 137 extends in the vertical direction and is rotatably supported by the other end portion of the second arm portion 133. The screw shaft 137 is connected to the third drive motor 123. The screw shaft 137 moves up and down while rotating around the screw shaft 137 by the drive of the third drive motor 123.

吸着機構130は、布105を吸着して保持する。吸着機構130は、螺子軸137の下端部に連結する。吸着機構130は取付台124と帯電装置135を備える。取付台124は平面視略矩形状の板部材である。帯電装置135は平面視略矩形の板状であり、取付台124の下部に固定する。帯電装置135は下面に吸着面136を有する。帯電装置135が駆動することで、吸着面136は静電気を帯び、布105を吸着できる。   The suction mechanism 130 sucks and holds the cloth 105. The suction mechanism 130 is connected to the lower end portion of the screw shaft 137. The suction mechanism 130 includes a mounting base 124 and a charging device 135. The mounting base 124 is a plate member having a substantially rectangular shape in plan view. The charging device 135 has a substantially rectangular plate shape in plan view, and is fixed to the lower portion of the mounting base 124. The charging device 135 has an adsorption surface 136 on the lower surface. When the charging device 135 is driven, the adsorption surface 136 is charged with static electricity and can adsorb the cloth 105.

第一駆動モータ121、第二駆動モータ122の駆動により、吸着機構130の吸着面136は、流通板142の上方に位置する状態と、窓部101の上方に位置する状態(図9参照)との間で移動する。第三駆動モータ123の駆動により、吸着機構130は上下方向に移動する。吸着機構130が移動範囲の上端に位置する時、吸着面136は、補助板5から上方に離れる。吸着機構130が移動範囲の下端に位置する時、吸着面136は、第二位置にある布105を内側に吸着可能である。撮影部117は、窓部101の下方に固定する。撮影部117は、窓部101側の所定の領域(「撮影領域」と称す)を撮影する。   By the driving of the first drive motor 121 and the second drive motor 122, the suction surface 136 of the suction mechanism 130 is positioned above the flow plate 142, and is positioned above the window 101 (see FIG. 9). Move between. By the driving of the third drive motor 123, the suction mechanism 130 moves in the vertical direction. When the suction mechanism 130 is positioned at the upper end of the movement range, the suction surface 136 moves away from the auxiliary plate 5 upward. When the suction mechanism 130 is located at the lower end of the movement range, the suction surface 136 can suck the cloth 105 in the second position inside. The imaging unit 117 is fixed below the window unit 101. The imaging unit 117 captures a predetermined area (referred to as “imaging area”) on the window 101 side.

吸引機構140は、布箱102の後方で補助板5に設ける。吸引機構140は、流通板142、吸引バルブ145(図8参照)を備える。流通板142は、補助板5に固定し、上下方向に開口する通気孔を複数有する。流通板142の上面と補助板5の上面は略同じ高さである。エアは、流通板142の通気孔を通過可能である。吸引バルブ145は流通板142下方に固定する。吸引バルブ145がエアを吸引することで、エアは通気孔を介して吸引バルブ145に流れる。該時、吸引機構140は、第三位置にある布105を流通板142側に吸引して保持する。   The suction mechanism 140 is provided on the auxiliary plate 5 behind the cloth box 102. The suction mechanism 140 includes a flow plate 142 and a suction valve 145 (see FIG. 8). The flow plate 142 is fixed to the auxiliary plate 5 and has a plurality of vent holes that open in the vertical direction. The upper surface of the flow plate 142 and the upper surface of the auxiliary plate 5 are substantially the same height. Air can pass through the ventilation holes of the flow plate 142. The suction valve 145 is fixed below the flow plate 142. As the suction valve 145 sucks air, the air flows to the suction valve 145 through the vent hole. At this time, the suction mechanism 140 sucks and holds the cloth 105 in the third position toward the flow plate 142.

ミシン1のエアシリンダ69、72、移動装置100のエアシリンダ162、上下エアシリンダ170、吸引バルブ145は、夫々、エアチューブを介してエアコンプレッサ(図示略)に接続する。   The air cylinders 69 and 72 of the sewing machine 1, the air cylinder 162 of the moving device 100, the upper and lower air cylinders 170, and the suction valve 145 are each connected to an air compressor (not shown) via an air tube.

<PC200の電気的構成>
図6を参照し、PC200の電気的構成を説明する。PC200はCPU201を備える。CPU201はPC200の制御を司る。CPU201は、チップセット204を介してROM202、RAM203、表示制御部208と電気的に接続する。チップセット204は、CPU201と、ROM202、RAM203との間でデータの送受信を管理する一連の回路群である。ROM202はBIOS等を記憶する。RAM203は、種々の一時データを記憶する。
<Electrical configuration of PC 200>
The electrical configuration of the PC 200 will be described with reference to FIG. The PC 200 includes a CPU 201. The CPU 201 controls the PC 200. The CPU 201 is electrically connected to the ROM 202, RAM 203, and display control unit 208 via the chip set 204. The chip set 204 is a series of circuit groups that manage data transmission / reception between the CPU 201 and the ROM 202 and RAM 203. The ROM 202 stores BIOS and the like. The RAM 203 stores various temporary data.

チップセット204はチップセット205と接続する。CPU201は、チップセット205を介し、記憶装置206、入力部207、表示制御部28、通信I/F210と電気的に接続する。チップセット205は、CPU201と、記憶装置206、入力部207、表示制御部28、通信I/F210との間でデータの送受信を管理する一連の回路群である。記憶装置206は、例えばハードディスクドライブ(HDD)、ソリッドステートドライブ(SSD)等、不揮発性の記憶装置である。記憶装置206は、OS、プログラム、データ等を記憶する。記憶装置206は、PC200に対して着脱可能なメモリカードであってもよい。入力部207は、例えばキーボード、マウス等であり、作業者からの各種指示を検出する。入力部207は、検出した各種指示をCPU201に出力する。表示制御部208は、ディスプレイ209への映像の表示を制御する。通信I/F210は、例えばシリアル通信用のインターフェースである。通信I/F210は、ミシン1、移動装置100に接続する。   The chip set 204 is connected to the chip set 205. The CPU 201 is electrically connected to the storage device 206, the input unit 207, the display control unit 28, and the communication I / F 210 via the chip set 205. The chip set 205 is a series of circuit groups that manage data transmission / reception between the CPU 201, the storage device 206, the input unit 207, the display control unit 28, and the communication I / F 210. The storage device 206 is a nonvolatile storage device such as a hard disk drive (HDD) or a solid state drive (SSD). The storage device 206 stores an OS, a program, data, and the like. The storage device 206 may be a memory card that is removable from the PC 200. The input unit 207 is a keyboard, a mouse, or the like, for example, and detects various instructions from the worker. The input unit 207 outputs various detected instructions to the CPU 201. The display control unit 208 controls display of video on the display 209. The communication I / F 210 is an interface for serial communication, for example. Communication I / F 210 is connected to sewing machine 1 and mobile device 100.

<ミシン1の電気的構成>
図7を参照しミシン1の電気的構成を説明する。ミシン1の制御部50は、CPU51、ROM52、RAM53、記憶装置54、通信I/F55、入出力I/F56、駆動回路57〜59を備える。CPU51、ROM52、RAM53、記憶装置54は、バスを介して入出力I/F56と電気的に接続する。CPU51はミシン1の制御を司り、ROM52が記憶する各種プログラムに従い縫製に関わる各種演算と処理を実行する。ROM52は各種プログラム、各種初期設定パラメータ等を記憶する。RAM53はCPU51の演算結果、ポインタ、カウンタ等を一時的に記憶する。記憶装置54は、不揮発性であり、各種設定情報等を記憶する。
<Electrical configuration of sewing machine 1>
The electrical configuration of the sewing machine 1 will be described with reference to FIG. The control unit 50 of the sewing machine 1 includes a CPU 51, a ROM 52, a RAM 53, a storage device 54, a communication I / F 55, an input / output I / F 56, and drive circuits 57 to 59. The CPU 51, ROM 52, RAM 53, and storage device 54 are electrically connected to the input / output I / F 56 through a bus. The CPU 51 controls the sewing machine 1 and executes various calculations and processes related to sewing according to various programs stored in the ROM 52. The ROM 52 stores various programs, various initial setting parameters, and the like. The RAM 53 temporarily stores calculation results of the CPU 51, pointers, counters, and the like. The storage device 54 is non-volatile and stores various setting information and the like.

通信I/F55は入出力I/F56と電気的に接続する。通信I/F55は、例えばシリアル通信用のインターフェースである。通信I/F55はPC200の通信I/F210に接続する。駆動回路57〜59は入出力I/F56と電気的に接続する。駆動回路57はミシンモータ31と電気的に接続する。CPU51は駆動回路57を制御することで、ミシンモータ31を駆動制御する。駆動回路58はX軸モータ32と電気的に接続する。駆動回路59はY軸モータ34と電気的に接続する。入出力I/F56は、電磁弁38、39と電気的に接続する。電磁弁38は、エアコンプレッサがエアシリンダ69へ供給するエアの供給経路に設ける。CPU51は電磁弁38の開閉によってエアシリンダ69を駆動制御し、押え板74を上下動する。電磁弁39は、エアコンプレッサが保持体70のエアシリンダ72へ供給するエアの供給経路に設ける。CPU51は電磁弁39の開閉によってエアシリンダ72を駆動制御し、押え板74を左右に移動する。   The communication I / F 55 is electrically connected to the input / output I / F 56. The communication I / F 55 is an interface for serial communication, for example. The communication I / F 55 is connected to the communication I / F 210 of the PC 200. The drive circuits 57 to 59 are electrically connected to the input / output I / F 56. The drive circuit 57 is electrically connected to the sewing machine motor 31. The CPU 51 controls the drive of the sewing machine motor 31 by controlling the drive circuit 57. The drive circuit 58 is electrically connected to the X axis motor 32. The drive circuit 59 is electrically connected to the Y axis motor 34. The input / output I / F 56 is electrically connected to the solenoid valves 38 and 39. The solenoid valve 38 is provided in an air supply path that the air compressor supplies to the air cylinder 69. The CPU 51 drives and controls the air cylinder 69 by opening and closing the electromagnetic valve 38 and moves the presser plate 74 up and down. The electromagnetic valve 39 is provided in an air supply path that the air compressor supplies to the air cylinder 72 of the holding body 70. The CPU 51 drives and controls the air cylinder 72 by opening and closing the electromagnetic valve 39 and moves the presser plate 74 to the left and right.

<移動装置100の電気的構成>
図8を参照し移動装置100の電気的構成を説明する。移動装置100の制御部110は、CPU111、ROM112、RAM113、記憶装置119、通信I/F114、入出力I/F115、駆動回路166〜168を備える。CPU111、ROM112、RAM113はバスを介して入出力I/F115と電気的に接続する。CPU111は移動装置100の制御を司り、ROM112が記憶する各種プログラムに従い処理を実行する。ROM112は各種プログラム、各種初期設定パラメータ等を記憶する。RAM113はCPU111の演算結果、各種データ等を一時的に記憶する。記憶装置119は、不揮発性である。通信I/F114は入出力I/F115と電気的に接続する。通信I/F114は例えばシリアル通信用のインターフェースである。通信I/F114はPC200の通信I/F210に接続する。
<Electrical Configuration of Moving Device 100>
The electrical configuration of the moving apparatus 100 will be described with reference to FIG. The control unit 110 of the mobile device 100 includes a CPU 111, ROM 112, RAM 113, storage device 119, communication I / F 114, input / output I / F 115, and drive circuits 166 to 168. The CPU 111, ROM 112, and RAM 113 are electrically connected to the input / output I / F 115 via a bus. The CPU 111 controls the mobile device 100 and executes processing according to various programs stored in the ROM 112. The ROM 112 stores various programs, various initial setting parameters, and the like. The RAM 113 temporarily stores the calculation results of the CPU 111, various data, and the like. The storage device 119 is nonvolatile. Communication I / F 114 is electrically connected to input / output I / F 115. The communication I / F 114 is an interface for serial communication, for example. The communication I / F 114 is connected to the communication I / F 210 of the PC 200.

駆動回路166〜168は入出力I/F115と電気的に接続する。駆動回路166〜168は夫々、第一駆動モータ121、第二駆動モータ122、第三駆動モータ123に接続する。入出力I/F115は、帯電装置135、撮影部117、電磁弁118、151、152と電気的に接続する。CPU201は、帯電装置135、撮影部117、電磁弁118、151、152を駆動する。撮影部117は、吸着機構130の吸着面136と吸着面136に吸着した布105を含む撮影領域を、吸着面136側から撮影する。撮影部117は、撮影画像のデータを生成し、CPU111に出力する。   The drive circuits 166 to 168 are electrically connected to the input / output I / F 115. The drive circuits 166 to 168 are connected to the first drive motor 121, the second drive motor 122, and the third drive motor 123, respectively. The input / output I / F 115 is electrically connected to the charging device 135, the imaging unit 117, and the electromagnetic valves 118, 151, and 152. The CPU 201 drives the charging device 135, the imaging unit 117, and the electromagnetic valves 118, 151, and 152. The imaging unit 117 captures an imaging area including the adsorption surface 136 of the adsorption mechanism 130 and the cloth 105 adsorbed on the adsorption surface 136 from the adsorption surface 136 side. The photographing unit 117 generates photographed image data and outputs it to the CPU 111.

電磁弁118は、エアコンプレッサが吸引バルブ145へ供給するエアの供給経路に設ける。CPU111は電磁弁118を開閉し、吸引バルブ145を駆動制御する。電磁弁151は、エアコンプレッサがエアシリンダ162へ供給するエアの供給経路に設ける。CPU111は電磁弁151を開閉し、エアシリンダ162を駆動制御する。電磁弁152は、エアコンプレッサが上下エアシリンダ170へ供給するエアの供給経路に設ける。CPU111は電磁弁152を開閉し、上下エアシリンダ170を駆動制御する。   The solenoid valve 118 is provided in an air supply path that the air compressor supplies to the suction valve 145. The CPU 111 opens and closes the electromagnetic valve 118 and drives and controls the suction valve 145. The solenoid valve 151 is provided in an air supply path that the air compressor supplies to the air cylinder 162. The CPU 111 opens and closes the electromagnetic valve 151 and controls the driving of the air cylinder 162. The solenoid valve 152 is provided in an air supply path that the air compressor supplies to the upper and lower air cylinders 170. The CPU 111 opens and closes the electromagnetic valve 152 and controls driving of the upper and lower air cylinders 170.

<動作概要(布105の第一位置から第二位置への移動)>
図4、図5、図9を参照し、布把持装置150により布105を第一位置から第二位置に移動する動作を説明する。布把持装置150は、布箱102に積み重なる布105を一枚ずつ把持して移動する。把持機構180は上下エアシリンダ170の駆動により、移動範囲の上端から下端に移動する。脚部182は、足部183が布105に当接した時の力により、支持部181に対して上側に相対移動する。把持部184は、布105に先端部188が当接した時の力により、捩りバネの付勢力に抗して回動する。該時、把持部184の先端部188は足部183に近接し、布105の一部分を足部183との間に挟む。保持機構は、脚部182を保持する位置を、支持部181に対して上側に相対移動した位置に切り替える。次に、把持機構180は上下エアシリンダ170の駆動により、移動範囲の下端から上端に移動する。以上により、布把持装置150は布105を布箱102から取り出す。
<Operation outline (movement of cloth 105 from the first position to the second position)>
The operation of moving the cloth 105 from the first position to the second position by the cloth gripping device 150 will be described with reference to FIGS. The cloth gripping device 150 grips and moves the cloths 105 stacked on the cloth box 102 one by one. The gripping mechanism 180 moves from the upper end to the lower end of the moving range by driving the upper and lower air cylinders 170. The leg part 182 moves relative to the support part 181 upward by the force when the foot part 183 comes into contact with the cloth 105. The gripping part 184 rotates against the urging force of the torsion spring by the force when the tip part 188 comes into contact with the cloth 105. At this time, the distal end portion 188 of the gripping portion 184 is close to the foot portion 183, and a part of the cloth 105 is sandwiched between the foot portion 183. The holding mechanism switches the position where the leg portion 182 is held to a position where the leg portion 182 is relatively moved upward with respect to the support portion 181. Next, the gripping mechanism 180 moves from the lower end to the upper end of the moving range by driving the upper and lower air cylinders 170. As described above, the cloth holding device 150 takes out the cloth 105 from the cloth box 102.

把持機構180はエアシリンダ162の駆動により、上側から見て時計回り方向に移動する。次に、把持機構180は上下エアシリンダ170の駆動により、移動範囲の上端から下端に移動する。把持機構180が移動範囲の下端に到達した時、足部183は布105を介して窓部101と接触する。該時、保持機構は、脚部182を保持する位置を、支持部181に対して下端に相対移動した位置に切り替える。次に、把持機構180はエアシリンダ162の駆動により、移動範囲の下端から上端に移動する。該時、把持部184の先端部188は、捩りバネの付勢力に応じて足部183から離隔し、布105を離す。布105は窓部101の第二位置に載置する。以上により、布105の第一位置から第二位置迄の移動が完了する。   The gripping mechanism 180 moves in the clockwise direction when viewed from above by driving the air cylinder 162. Next, the gripping mechanism 180 moves from the upper end to the lower end of the moving range by driving the upper and lower air cylinders 170. When the gripping mechanism 180 reaches the lower end of the movement range, the foot portion 183 contacts the window portion 101 through the cloth 105. At this time, the holding mechanism switches the position where the leg portion 182 is held to a position moved relative to the lower end with respect to the support portion 181. Next, the gripping mechanism 180 moves from the lower end to the upper end of the moving range by driving the air cylinder 162. At this time, the distal end portion 188 of the gripping portion 184 is separated from the foot portion 183 according to the biasing force of the torsion spring, and the cloth 105 is released. The cloth 105 is placed at the second position of the window portion 101. Thus, the movement of the cloth 105 from the first position to the second position is completed.

<動作概要(布105の第二位置から第三位置への移動、撮影部117による撮影)>
図4、図9を参照し、移動機構120と吸着機構130により、布105を第二位置から第三位置に移動してミシン1に受け渡す動作を説明する。第一腕部132と第二腕部133は、第一駆動モータ121と第二駆動モータ122の駆動により回動する。該時、吸着機構130の吸着面136は窓部101上方に移動する。次に、吸着面136は第三駆動モータ123の駆動により、移動範囲の下端に移動する。吸着面136は、帯電装置135の駆動により静電気を帯びる。第二位置にある布105は吸着面136に吸着する。吸着面136は第三駆動モータ123の駆動により、布105を吸着した状態で移動範囲の上端に移動する。
<Outline of operation (movement of cloth 105 from second position to third position, photographing by photographing unit 117)>
The operation of moving the cloth 105 from the second position to the third position by the moving mechanism 120 and the suction mechanism 130 and delivering it to the sewing machine 1 will be described with reference to FIGS. The first arm portion 132 and the second arm portion 133 are rotated by driving the first drive motor 121 and the second drive motor 122. At this time, the suction surface 136 of the suction mechanism 130 moves above the window portion 101. Next, the suction surface 136 is moved to the lower end of the moving range by the driving of the third drive motor 123. The suction surface 136 is charged with static electricity by driving the charging device 135. The cloth 105 in the second position is attracted to the suction surface 136. The suction surface 136 is moved to the upper end of the movement range while the cloth 105 is sucked by the driving of the third drive motor 123.

移動装置100の撮影部117は窓部101を介して、吸着面136に吸着した布105を撮影する。PC200のCPU201は、撮影部117により撮影した撮影画像のデータを取得し、吸着面136に吸着した布105の位置を検出する。CPU201は、検出した布105の位置に応じ、流通板142の第三位置に布105を載置する為に必要な第一駆動モータ121と第二駆動モータ122の駆動条件を算出する。第一駆動モータ121と第二駆動モータ122は、PC200が算出した駆動条件で駆動し、第一腕部132と第二腕部133を回動する。これにより、吸着面136は第三位置の上方位置迄移動する。次に、吸着面136は第三駆動モータ123の駆動により、布105を吸着した状態で移動範囲の下端に移動する。次に、帯電装置135は駆動を停止する。布105は吸着面136から離れ、PC200により特定した第三位置に載置する。吸引バルブ145は吸引機構140の駆動により、エアを吸引する。該時、第三位置に載置した布105は流通板142に保持する。   The photographing unit 117 of the moving apparatus 100 photographs the cloth 105 adsorbed on the adsorption surface 136 through the window unit 101. The CPU 201 of the PC 200 acquires data of a photographed image photographed by the photographing unit 117 and detects the position of the cloth 105 sucked on the suction surface 136. The CPU 201 calculates the driving conditions of the first drive motor 121 and the second drive motor 122 necessary for placing the cloth 105 on the third position of the flow plate 142 according to the detected position of the cloth 105. The first drive motor 121 and the second drive motor 122 are driven under the drive conditions calculated by the PC 200 to rotate the first arm portion 132 and the second arm portion 133. As a result, the suction surface 136 moves to a position above the third position. Next, the suction surface 136 is moved to the lower end of the movement range while the cloth 105 is sucked by the driving of the third drive motor 123. Next, the charging device 135 stops driving. The cloth 105 moves away from the suction surface 136 and is placed at the third position specified by the PC 200. The suction valve 145 sucks air by driving the suction mechanism 140. At this time, the cloth 105 placed at the third position is held by the flow plate 142.

<動作概要(布105の第三位置から第四位置への移動、ミシン1による縫製動作)>
図2、図3を参照し、ミシン1の縫製動作の概要を説明する。吸引バルブ145は吸引機構140の駆動により、エアの吸引を停止する。該時、第三位置に載置した布105は移動可能となる。押え板74はエアシリンダ72の駆動により、移動範囲の左端から右端に移動する。次に、押え板74はエアシリンダ69の駆動により、移動範囲の下端に移動する。押え板74は、第三位置にある布105を流通板142との間に挟み保持する。次に、押え腕65は、X軸モータ32とY軸モータ34の駆動により、第三位置から針穴13上の第四位置に布105を移動する。次に、ミシンモータ31、X軸モータ32、Y軸モータ34は夫々駆動する。水平動機構6は布105を前後方向と左右方向とに移動し、針棒10と垂直釜は同期駆動する。縫製機構8は縫針11で布105に縫製する。ミシン1は布105に所定の縫目を形成する。縫目が布105に形成した後、押え板74はエアシリンダ72の駆動により、移動範囲の左端に移動する。押え板74はエアシリンダ69の駆動により、移動範囲の上端に移動して布105から離れる。以上により、ミシン1の縫製動作は終了する。
<Outline of operation (movement of cloth 105 from third position to fourth position, sewing operation by sewing machine 1)>
The outline of the sewing operation of the sewing machine 1 will be described with reference to FIGS. The suction valve 145 stops sucking air by driving the suction mechanism 140. At this time, the cloth 105 placed at the third position is movable. The presser plate 74 moves from the left end to the right end of the moving range by driving the air cylinder 72. Next, the presser plate 74 moves to the lower end of the moving range by driving the air cylinder 69. The presser plate 74 holds the cloth 105 in the third position between the presser plate 74 and the flow plate 142. Next, the presser arm 65 moves the cloth 105 from the third position to the fourth position on the needle hole 13 by driving the X-axis motor 32 and the Y-axis motor 34. Next, the sewing machine motor 31, the X-axis motor 32, and the Y-axis motor 34 are driven. The horizontal movement mechanism 6 moves the cloth 105 in the front-rear direction and the left-right direction, and the needle bar 10 and the vertical shuttle are driven synchronously. The sewing mechanism 8 sews the cloth 105 with the sewing needle 11. The sewing machine 1 forms predetermined stitches on the cloth 105. After the stitches are formed on the cloth 105, the presser plate 74 is moved to the left end of the moving range by driving the air cylinder 72. The presser plate 74 moves to the upper end of the moving range and is separated from the cloth 105 by driving the air cylinder 69. Thus, the sewing operation of the sewing machine 1 is completed.

<動作概要(キャリブレーション)>
上述のように、PC200のCPU201は、撮影画像から特定した布105の位置に基づいて、第二位置から第三位置迄布105を移動する為の移動装置100(第一駆動モータ121、第二駆動モータ122)の駆動条件を算出する。該時、CPU201は、撮影画像の座標系(「画像座標系」と称す)と移動装置100の座標系(「装置座標系」と称す)を予め対応付けておく必要がある。該理由は、画像座標系と装置座標系との対応付けがない時、CPU201は、布105を第二位置から第三位置迄移動する時の画像座標系における移動量を撮影画像に基づいて特定できても、該移動量を、装置座標系における移動量に変換できない為である。本実施形態において、CPU201は、後述するメイン処理を実行することにより、画像座標系と装置座標系との対応付けを行う。
<Operation overview (calibration)>
As described above, the CPU 201 of the PC 200 moves the cloth 105 from the second position to the third position based on the position of the cloth 105 identified from the photographed image (the first drive motor 121, the second drive motor 121, and the second drive motor 121). The drive condition of the drive motor 122) is calculated. At this time, the CPU 201 needs to associate the coordinate system of the captured image (referred to as “image coordinate system”) with the coordinate system of the moving apparatus 100 (referred to as “apparatus coordinate system”) in advance. The reason is that when there is no correspondence between the image coordinate system and the apparatus coordinate system, the CPU 201 specifies the amount of movement in the image coordinate system when moving the cloth 105 from the second position to the third position based on the photographed image. This is because the movement amount cannot be converted into the movement amount in the apparatus coordinate system even if it can. In the present embodiment, the CPU 201 associates the image coordinate system with the apparatus coordinate system by executing a main process described later.

図10は、画像座標系と装置座標系との対応付けの過程で使用するチャートSを示す。図10の上側、下側、左側、右側を、夫々、チャートSの上側、下側、左側、右側と定義する。チャートSは、表面に線画を描写した白色の台紙Dである。台紙Dは矩形状を有する。チャートSは、第一基準線L1、第二基準線L2、第一マークM1、第二マークM2を有する。第一基準線L1は、台紙Dの左端部近傍を上下方向に延びる直線である。第二基準線L2は、台紙Dの下端部近傍を左右方向に延びる直線である。第一基準線L1と第二基準線L2とは直交する。第一基準線L1の下端と第二基準線L2の左端は、交差点Cで交差する。   FIG. 10 shows a chart S used in the process of associating the image coordinate system with the apparatus coordinate system. The upper side, lower side, left side, and right side of FIG. 10 are defined as the upper side, lower side, left side, and right side of the chart S, respectively. The chart S is a white mount D in which a line drawing is drawn on the surface. The mount D has a rectangular shape. The chart S has a first reference line L1, a second reference line L2, a first mark M1, and a second mark M2. The first reference line L1 is a straight line extending in the vertical direction near the left end of the mount D. The second reference line L2 is a straight line extending in the left-right direction near the lower end of the mount D. The first reference line L1 and the second reference line L2 are orthogonal to each other. The lower end of the first reference line L1 and the left end of the second reference line L2 intersect at an intersection C.

第一マークM1は、台紙Dの左上の隅近傍、より詳細には、左右方向において第一基準線L1よりも左側、且つ、上下方向において第一基準線L1の上端よりも上側に配置する。第二マークM2は、台紙Dの右下の隅近傍、より詳細には、左右方向において第二基準線L2よりも右側、且つ、上下方向において第二基準線L2の下端よりも下側に配置する。第一マークM1と第二マークM2は夫々、円環状の曲線を有する。第一マークM1と第二マークM2を総称して「マークM」と称す。マークMを形成する曲線の径方向の長さ、即ち、該曲線の太さr2は、該曲線で囲まれた内部の径方向の長さ、即ち、曲線で囲まれた内部の円形部分の半径r1と等しい。該為、半径r1と太さr2の比は、1:1となる。故に、マークMの中心の位置(「中心位置m」と称す)を通ってマークMを横切る線分を定義した時、該線分のうちマークMの曲線と重なる2つの部分a1、a3のそれぞれの長さと、マークMの曲線で囲まれた部分と重なる部分a2の長さとの比a1:a2:a3は、1:2:1となる。   The first mark M1 is disposed near the upper left corner of the mount D, more specifically, on the left side of the first reference line L1 in the left-right direction and above the upper end of the first reference line L1 in the up-down direction. The second mark M2 is arranged in the vicinity of the lower right corner of the mount D, more specifically, on the right side of the second reference line L2 in the left-right direction and below the lower end of the second reference line L2 in the up-down direction. To do. The first mark M1 and the second mark M2 each have an annular curve. The first mark M1 and the second mark M2 are collectively referred to as “mark M”. The length of the curve forming the mark M in the radial direction, that is, the thickness r2 of the curve is the inner radial length surrounded by the curve, that is, the radius of the inner circular portion surrounded by the curve. equal to r1. Therefore, the ratio between the radius r1 and the thickness r2 is 1: 1. Therefore, when a line segment that crosses the mark M through the center position of the mark M (referred to as “center position m”) is defined, each of the two portions a1 and a3 that overlap the curve of the mark M in each of the line segments. And the ratio a1: a2: a3 of the portion a2 that overlaps the portion surrounded by the curve of the mark M is 1: 2: 1.

第一マークM1の中心位置m1から右側に延びる仮想線分Q1と、第二マークM2の中心位置m2から上側に延びる仮想線分Q2は、位置m3で交差する。第一マークM1の中心位置m1から下側に延びる仮想線分Q4と、第二マークM2の中心位置m2から左側に延びる仮想線分Q3は、位置m4で交差する。仮想線分Q1〜Q4は、中心位置m1、m2、位置m3、m4を頂点とする仮想的な正方形を形成する。該正方形は、第一基準線L1と第二基準線L2を外側から囲む。仮想線分Q1〜Q4で囲む領域を、「解析領域Q」と称す。第一マークM1と第二マークM2は、解析領域Qの4つの頂点のうち左上と右下の対角に位置する。   A virtual line segment Q1 extending rightward from the center position m1 of the first mark M1 and a virtual line segment Q2 extending upward from the center position m2 of the second mark M2 intersect at a position m3. A virtual line segment Q4 extending downward from the center position m1 of the first mark M1 and a virtual line segment Q3 extending leftward from the center position m2 of the second mark M2 intersect at the position m4. The virtual line segments Q1 to Q4 form a virtual square with the center positions m1, m2, and the positions m3, m4 as vertices. The square surrounds the first reference line L1 and the second reference line L2 from the outside. A region surrounded by virtual line segments Q1 to Q4 is referred to as “analysis region Q”. The first mark M1 and the second mark M2 are located at the upper left and lower right diagonals of the four vertices of the analysis region Q.

<メイン処理>
図11から図21を参照し、メイン処理を説明する。使用者は画像座標系と装置座標系との対応付けを行う時、吸着機構130の吸着面136にチャートSを接触した状態で、PC200の入力部207に入力操作を行う。CPU201は入力操作を受け付けた時、記憶装置206に記憶したプログラムを実行することでメイン処理を開始する。
<Main processing>
The main process will be described with reference to FIGS. When the user associates the image coordinate system with the apparatus coordinate system, the user performs an input operation on the input unit 207 of the PC 200 while the chart S is in contact with the suction surface 136 of the suction mechanism 130. When the CPU 201 accepts an input operation, the CPU 201 starts a main process by executing a program stored in the storage device 206.

図11に示すように、CPU201は、吸着機構130によりチャートSを吸着面136に吸着する吸着指示を、移動装置100に出力する。移動装置100のCPU111は吸着指示を受信した時、帯電装置135を駆動する。吸着面136は静電気を帯び、チャートSを吸着面136に吸着する(S1)。CPU201は、窓部101上方の所定位置(「第一基準位置」と称す)迄吸着機構130を移動する第一移動指示を、移動装置100に出力する。移動装置100のCPU111は第一移動指示を受信した時、第一駆動モータ121、第二駆動モータ122の駆動により、吸着機構130を第一基準位置に移動する(S11)。該時、チャートSを第一基準位置に配置した状態と称す。   As shown in FIG. 11, the CPU 201 outputs a suction instruction for sucking the chart S to the suction surface 136 by the suction mechanism 130 to the moving device 100. The CPU 111 of the moving device 100 drives the charging device 135 when receiving the suction instruction. The adsorption surface 136 is charged with static electricity, and adsorbs the chart S to the adsorption surface 136 (S1). The CPU 201 outputs a first movement instruction for moving the suction mechanism 130 to a predetermined position (referred to as a “first reference position”) above the window unit 101 to the moving device 100. When receiving the first movement instruction, the CPU 111 of the moving device 100 moves the suction mechanism 130 to the first reference position by driving the first drive motor 121 and the second drive motor 122 (S11). At this time, the chart S is referred to as a state where it is arranged at the first reference position.

CPU201は、撮影部117による撮影を実行する撮影指示を、移動装置100に出力する。移動装置100のCPU111は撮影指示を受信した時、撮影部117を制御して撮影を開始する(S13)。撮影部117は、第一基準位置に配置した状態のチャートSを撮影し、撮影画像のデータを生成する。移動装置100は、撮影部117が生成した撮影画像のデータを取得し、PC200に出力する。PC200のCPU201は撮影画像Gのデータを受信する。図16(A)は、撮影画像Gの一例を示す。撮影画像Gは、チャートSの第一基準線L1、第二基準線L2、第一マークM1、第二マークM2を含む。図16(A)の上側、下側、左側、右側を、夫々、撮影画像Gの上側、下側、左側、右側と定義する。撮影画像Gの左右方向を「水平方向」と称し、撮影画像Gの上下方向を「垂直方向」と称す。図11に示すように、CPU201は、撮影画像Gに基づいて第一交差点C1の位置を示す座標を取得する為、座標取得処理(図12参照)を実行する(S15)。   The CPU 201 outputs a photographing instruction for performing photographing by the photographing unit 117 to the mobile device 100. When receiving the shooting instruction, the CPU 111 of the mobile device 100 controls the shooting unit 117 to start shooting (S13). The imaging unit 117 captures the chart S placed at the first reference position, and generates captured image data. The mobile device 100 acquires the captured image data generated by the imaging unit 117 and outputs the acquired data to the PC 200. The CPU 201 of the PC 200 receives the captured image G data. FIG. 16A shows an example of the captured image G. The captured image G includes a first reference line L1, a second reference line L2, a first mark M1, and a second mark M2 of the chart S. The upper side, lower side, left side, and right side in FIG. 16A are defined as the upper side, lower side, left side, and right side of the captured image G, respectively. The left-right direction of the captured image G is referred to as “horizontal direction”, and the up-down direction of the captured image G is referred to as “vertical direction”. As shown in FIG. 11, the CPU 201 executes coordinate acquisition processing (see FIG. 12) in order to acquire coordinates indicating the position of the first intersection C1 based on the captured image G (S15).

図12を参照し、座標取得処理を説明する。CPU201は、撮影画像Gを二値化する(S31)。CPU201は、二値化した撮影画像Gに基づきマークMの位置を検出する為、マーク位置検出処理(図13参照)を実行する(S33)。以下記載において、二値化後の撮影画像Gを単に撮影画像Gと称す。   The coordinate acquisition process will be described with reference to FIG. The CPU 201 binarizes the captured image G (S31). The CPU 201 executes a mark position detection process (see FIG. 13) in order to detect the position of the mark M based on the binarized captured image G (S33). In the following description, the captured image G after binarization is simply referred to as a captured image G.

図13を参照し、マーク位置検出処理を説明する。CPU201は、撮影画像Gの複数の画素を、水平方向に一列分ずつ取得する。撮影画像Gの複数の画素のうち水平方向の一列分を「水平画素列」と称す。CPU201は、取得した水平画素列を連長圧縮(ランレングス圧縮)し、水平方向に対応するラン情報(「水平ラン情報」と称す)を生成する(S51)。ラン情報は、黒色の画素又は白色画素の一列毎の連続数を含む。例えば図16(B)に示すように、第二マークM2を含む水平画素列hpにおいて、左側から右側に向けて、白色の画素(数字「0」で示す)がN(Nは任意の整数)回連続し、黒色の画素(数字「1」で示す)が3回連続し、白色の画素が6回連続し、黒の画素が3回連続し、白色の画素がN回連続する。該時、CPU201は連長圧縮により、水平画素列hpの水平ラン情報として「0/N、1/3、0/6、1/3、0/N」を生成する。ラン情報のうち「/」の左側の数字「0」は白色を示し、数字「1」は黒色を示す。「/」の右側の数字は、「/」の左側の数字で示す色(白色「0」又は黒色「1」)の画素の連続数を示す。以下、ラン情報における各連続数を「要素」と称す。ラン情報のうち左からi(iは1以上の整数)番目の要素を、「要素(i)」と称す。   The mark position detection process will be described with reference to FIG. The CPU 201 acquires a plurality of pixels of the captured image G for each column in the horizontal direction. Of the plurality of pixels of the photographed image G, one column in the horizontal direction is referred to as a “horizontal pixel column”. The CPU 201 performs continuous length compression (run-length compression) on the acquired horizontal pixel row, and generates run information (referred to as “horizontal run information”) corresponding to the horizontal direction (S51). The run information includes a continuous number of black pixels or white pixels for each column. For example, as shown in FIG. 16B, in the horizontal pixel column hp including the second mark M2, white pixels (indicated by the numeral “0”) are N (N is an arbitrary integer) from the left to the right. The black pixels (indicated by the number “1”) are continued three times, the white pixels are continued six times, the black pixels are continued three times, and the white pixels are continued N times. At this time, the CPU 201 generates “0 / N, 1/3, 0/6, 1/3, 0 / N” as horizontal run information of the horizontal pixel row hp by continuous length compression. In the run information, the number “0” on the left side of “/” indicates white, and the number “1” indicates black. The number on the right side of “/” indicates the continuous number of pixels of the color (white “0” or black “1”) indicated by the number on the left side of “/”. Hereinafter, each continuous number in the run information is referred to as an “element”. The i-th element (i is an integer of 1 or more) from the left in the run information is referred to as “element (i)”.

図13に示すように、CPU201は、撮影画像Gの複数の画素を、垂直方向に一列分ずつ取得する。撮影画像Gの複数の画素のうち垂直方向の一列分を「垂直画素列」と称す。CPU201は取得した垂直画素列を連長圧縮し、垂直方向に対応するラン情報(「垂直ラン情報」と称す)を生成する(S51)。CPU201は、全ての水平画素列に対応する水平ラン情報、及び、全ての垂直画素列に対応する垂直ラン情報を生成した時、生成した水平ラン情報及び垂直ラン情報をRAM203に記憶する。   As illustrated in FIG. 13, the CPU 201 acquires a plurality of pixels of the captured image G by one column in the vertical direction. One column in the vertical direction among the plurality of pixels of the photographed image G is referred to as a “vertical pixel column”. The CPU 201 performs continuous length compression on the acquired vertical pixel row, and generates run information (referred to as “vertical run information”) corresponding to the vertical direction (S51). When the CPU 201 generates horizontal run information corresponding to all horizontal pixel columns and vertical run information corresponding to all vertical pixel columns, the CPU 201 stores the generated horizontal run information and vertical run information in the RAM 203.

CPU201は、撮影画像Gから水平画素列を1つ選択し、対応する水平ラン情報を記憶装置206から取得する(S53)。CPU201は、取得した水平ラン情報に基づいて候補判定処理(図14参照)を実行する(S55)。   The CPU 201 selects one horizontal pixel row from the captured image G, and acquires corresponding horizontal run information from the storage device 206 (S53). CPU201 performs candidate judgment processing (refer to Drawing 14) based on acquired horizontal run information (S55).

図14を参照し、候補判定処理を説明する。CPU201は、RAM203に記憶した変数iに「1」を設定して初期化する。CPU201は、S53の処理により取得した水平ラン情報から要素(i)を取得する(S71)。CPU201は、取得した要素(i)に基づき、黒色の画素の連続数が2以上か判定する(S73)。CPU201は、黒色の画素の連続数が1の時、又は、取得した要素が白色の連続数を示す時、黒色の画素の連続数が2以上連続しないと判定する(S73:NO)。該時、CPU201は処理をS85に進める。CPU201は、黒色の画素の連続数が2以上と判定した時(S73:YES)、処理をS75に進める。   The candidate determination process will be described with reference to FIG. The CPU 201 initializes the variable i stored in the RAM 203 by setting “1”. CPU201 acquires element (i) from horizontal run information acquired by processing of S53 (S71). The CPU 201 determines whether the continuous number of black pixels is 2 or more based on the acquired element (i) (S73). When the continuous number of black pixels is 1 or when the acquired element indicates the continuous number of white, the CPU 201 determines that the continuous number of black pixels is not 2 or more (S73: NO). At this time, the CPU 201 advances the processing to S85. When the CPU 201 determines that the number of continuous black pixels is 2 or more (S73: YES), the CPU 201 advances the process to S75.

CPU201は、RAM203に記憶した水平ラン情報から要素(i+1)を取得し(S75)、要素(i+2)を取得する(S77)。要素(i)は黒色の画素の連続数を示す為、要素(i+1)は白色の画素の連続数を示し、要素(i+2)は黒色の画素の連続数を示す(図16(B)参照)。CPU201は、要素(i)、要素(i+1)、要素(i+2)の比(黒色:白色:黒色)が略1:2:1か判定する(S79)。尚、図10に示すように、マークMの中心位置mを通ってマークMを横切る線分を定義した時、部分a1、a2、a3のそれぞれの長さの比a1:a2:a3は、1:2:1となる。故に、図16(B)に示すように、マークMの中心位置m近傍を通過する水平画素列の水平ラン情報は、マークM近傍で、要素(i)、要素(i+1)、要素(i+2)の比(黒色:白色:黒色)が略1:2:1となる。図14に示すように、CPU201は、要素(i)、要素(i+1)、要素(i+2)の比が略1:2:1と判定した時(S79:YES)、マークMの中心位置mの水平方向の座標を決定する(S81)。より詳細には、CPU201は、以下の式(1)に基づき、撮影画像Gの左端から中心位置mまでの間の水平方向の長さJを、中心位置mの水平方向の座標Jとして算出する。但し、1画素の単位長さをpと表記する。
J=(要素(1)+要素(2)+・・・+(要素(i+1)/2)×p・・・(1)
The CPU 201 acquires the element (i + 1) from the horizontal run information stored in the RAM 203 (S75), and acquires the element (i + 2) (S77). Since the element (i) indicates the continuous number of black pixels, the element (i + 1) indicates the continuous number of white pixels, and the element (i + 2) indicates the continuous number of black pixels (see FIG. 16B). . The CPU 201 determines whether the ratio (black: white: black) of the element (i), the element (i + 1), and the element (i + 2) is approximately 1: 2: 1 (S79). As shown in FIG. 10, when a line segment passing through the center position m of the mark M and crossing the mark M is defined, the length ratio a1: a2: a3 of the portions a1, a2, and a3 is 1 : 2: 1. Therefore, as shown in FIG. 16B, the horizontal run information of the horizontal pixel column passing near the center position m of the mark M is the element (i), the element (i + 1), and the element (i + 2) in the vicinity of the mark M. Ratio (black: white: black) is approximately 1: 2: 1. As shown in FIG. 14, when the CPU 201 determines that the ratio of the element (i), the element (i + 1), and the element (i + 2) is approximately 1: 2: 1 (S79: YES), the CPU 201 The horizontal coordinate is determined (S81). More specifically, the CPU 201 calculates the horizontal length J from the left end of the captured image G to the center position m as the horizontal coordinate J of the center position m based on the following equation (1). . However, the unit length of one pixel is expressed as p.
J = (element (1) + element (2) +... + (Element (i + 1) / 2) × p (1)

CPU201は、マークMの候補を検出したことを示す為、算出した中心位置mの水平方向の座標JをRAM203に記憶する(S83)。CPU201は処理をS85に進める。一方、CPU201は、要素(i)、要素(i+1)、要素(i+2)の比が略1:2:1でないと判定した時(S79:NO)、処理をS85に進める。   In order to indicate that the candidate for the mark M has been detected, the CPU 201 stores the calculated horizontal coordinate J of the center position m in the RAM 203 (S83). CPU201 advances processing to S85. On the other hand, when the CPU 201 determines that the ratio of the element (i), the element (i + 1), and the element (i + 2) is not approximately 1: 2: 1 (S79: NO), the process proceeds to S85.

CPU201は、S53の処理により取得した水平ラン情報から要素を全て取得したか判定する(S85)。CPU201は、取得していない要素が残存すると判定した時(S85:NO)、処理をS87に進める。CPU201は、変数iに1を加算して更新する(S87)。CPU201は、処理をS71に戻す。CPU201は、更新したiに基づき、要素(i)を取得し(S71)、S73〜S83の処理を繰り返す。CPU201は、S53の処理により取得した水平ラン情報から要素を全て取得したと判定した時(S85:YES)、候補判定処理を終了し、処理をマーク位置検出処理(図13参照)に戻す。   The CPU 201 determines whether all elements have been acquired from the horizontal run information acquired by the process of S53 (S85). When the CPU 201 determines that an element that has not been acquired remains (S85: NO), the process proceeds to S87. The CPU 201 updates the variable i by adding 1 (S87). CPU201 returns processing to S71. CPU201 acquires element (i) based on updated i (S71), and repeats processing of S73-S83. When the CPU 201 determines that all the elements have been acquired from the horizontal run information acquired in the process of S53 (S85: YES), the candidate determination process ends, and the process returns to the mark position detection process (see FIG. 13).

図13に示すように、CPU201は、水平ラン情報に基づく候補判定処理(S55)の終了後、候補判定処理によりマークMの候補を検出したか判定する(S57)。CPU201は、マークMの中心位置mに対応する水平方向の座標JをRAM203に記憶していない時、マークMの候補を検出していないと判定する(S57:NO)。該時、CPU201は処理をS67に進める。CPU201は、S53の処理により、撮影画像Gから水平画素列を全て選択し、全ての水平ラン情報を取得したか判定する(S67)。CPU201は、選択していない水平画素列が残存し、水平ラン情報を全て取得していないと判定した時(S67:NO)、処理をS53に戻す。CPU201は、選択していない水平画素列の何れか1つを選択し、対応する水平ラン情報を取得する(S53)。CPU201は、S55〜S65の処理を繰り返す。   As illustrated in FIG. 13, the CPU 201 determines whether a candidate for the mark M is detected by the candidate determination process after the candidate determination process (S55) based on the horizontal run information is completed (S57). When the horizontal coordinate J corresponding to the center position m of the mark M is not stored in the RAM 203, the CPU 201 determines that no candidate for the mark M has been detected (S57: NO). At this time, the CPU 201 advances the processing to S67. The CPU 201 selects all the horizontal pixel rows from the captured image G by the processing of S53, and determines whether all the horizontal run information has been acquired (S67). When the CPU 201 determines that the unselected horizontal pixel column remains and has not acquired all the horizontal run information (S67: NO), the CPU 201 returns the process to S53. The CPU 201 selects any one of the unselected horizontal pixel columns and acquires corresponding horizontal run information (S53). CPU201 repeats the process of S55-S65.

例えばCPU201は、図16(A)に示す撮影画像Gに基づき、水平画素列G11を選択して水平ラン情報を取得し(S53)、候補判定処理を実行する(S55)。該時、CPU201は、第一マークM1の中心位置m1に対応する水平方向の座標J1を算出してRAM203に記憶する(S83)。例えばCPU201は、図16(A)に示す撮影画像Gに基づき、水平画素列G12を選択して水平ラン情報を取得し(S53)、候補判定処理を実行する(S55)。該時、CPU201は、第二マークM2の中心位置m2に対応する水平方向の座標J2を算出してRAM203に記憶する。   For example, the CPU 201 selects the horizontal pixel row G11 based on the captured image G shown in FIG. 16A, acquires horizontal run information (S53), and executes candidate determination processing (S55). At this time, the CPU 201 calculates a horizontal coordinate J1 corresponding to the center position m1 of the first mark M1, and stores it in the RAM 203 (S83). For example, the CPU 201 selects the horizontal pixel row G12 based on the captured image G shown in FIG. 16A, acquires horizontal run information (S53), and executes candidate determination processing (S55). At this time, the CPU 201 calculates a horizontal coordinate J2 corresponding to the center position m2 of the second mark M2, and stores it in the RAM 203.

CPU201は、マークMの中心位置mに対応する水平方向の座標JをRAM203に記憶した時、候補判定処理によりマークMの候補を判定したと判定する(S57:YES)。該時、CPU201は処理をS59に進める。CPU201は、撮影画像Gのうち、RAM203に記憶した座標Jの位置を通って垂直方向に延びる垂直画素列を選択し、対応する垂直ラン情報を記憶装置206から取得する(S59)。CPU201は、取得した垂直ラン情報に基づいて候補判定処理(図14参照)を実行する(S61)。   When the CPU 201 stores the horizontal coordinate J corresponding to the center position m of the mark M in the RAM 203, the CPU 201 determines that the candidate for the mark M has been determined by the candidate determination process (S57: YES). At this time, the CPU 201 advances the processing to S59. The CPU 201 selects a vertical pixel column extending in the vertical direction through the position of the coordinate J stored in the RAM 203 from the captured image G, and acquires corresponding vertical run information from the storage device 206 (S59). The CPU 201 executes candidate determination processing (see FIG. 14) based on the acquired vertical run information (S61).

S61の処理で実行する候補判定処理は、S55の処理で実行する候補判定処理と略同一である。S55の処理で実行する候補判定処理と異なる点は、基準とする方向を水平方向に代えて垂直方向とする点である。図14に示すように、CPU201は、要素(i)、要素(i+1)、要素(i+2)の比が略1:2:1と判定した時(S79:YES)、マークMの中心位置mの垂直方向の座標を決定する(S81)。より詳細には、CPU201は、以下の式(2)に基づき、撮影画像Gの上端から中心位置mまでの間の垂直方向の長さKを、中心位置mの垂直方向の座標Kとして算出する。
K=(要素(1)+要素(2)+・・・(要素(i+1)/2)×p・・・(2)
CPU201は、マークMの候補を検出したことを示す為、中心位置mの垂直方向の座標KをRAM203に記憶する(S83)。
The candidate determination process executed in S61 is substantially the same as the candidate determination process executed in S55. The difference from the candidate determination process executed in the process of S55 is that the reference direction is changed to the vertical direction instead of the horizontal direction. As shown in FIG. 14, when the CPU 201 determines that the ratio of the element (i), the element (i + 1), and the element (i + 2) is approximately 1: 2: 1 (S79: YES), the CPU 201 The vertical coordinate is determined (S81). More specifically, the CPU 201 calculates the vertical length K from the upper end of the captured image G to the central position m as the vertical coordinate K of the central position m based on the following equation (2). .
K = (element (1) + element (2) +... (Element (i + 1) / 2) × p (2)
In order to indicate that the candidate for the mark M has been detected, the CPU 201 stores the vertical coordinate K of the center position m in the RAM 203 (S83).

例えばCPU201は、候補判定処理により座標J1をRAM203に記憶した時、図16(A)に示す撮影画像Gのうち水平方向の座標J1を通る垂直画素列G21を選択して垂直ラン情報を取得し、候補判定処理(図14参照)を実行する(S61)。該時、CPU201は、第一マークM1の中心位置m1に対応する垂直方向の座標K1を算出してRAM203に記憶する(S83)。例えばCPU201は、候補判定処理により座標J2をRAM203に記憶した時、図16(A)に示す撮影画像Gのうち水平方向の座標J2を通る垂直画素列G22を選択して垂直ラン情報を取得し、候補判定処理(図14参照)を実行する(S61)。該時、CPU201は、第二マークM2の中心位置m2に対応する垂直方向の座標K2を算出してRAM203に記憶する(S83)。   For example, when the CPU 201 stores the coordinate J1 in the RAM 203 through the candidate determination process, the CPU 201 selects the vertical pixel row G21 passing through the horizontal coordinate J1 from the photographed image G shown in FIG. The candidate determination process (see FIG. 14) is executed (S61). At this time, the CPU 201 calculates a vertical coordinate K1 corresponding to the center position m1 of the first mark M1, and stores it in the RAM 203 (S83). For example, when the CPU 201 stores the coordinate J2 in the RAM 203 by the candidate determination process, the CPU 201 selects the vertical pixel row G22 passing through the horizontal coordinate J2 from the photographed image G shown in FIG. The candidate determination process (see FIG. 14) is executed (S61). At this time, the CPU 201 calculates a vertical coordinate K2 corresponding to the center position m2 of the second mark M2, and stores it in the RAM 203 (S83).

図13に示すように、CPU201は、垂直ラン情報に基づく候補判定処理(S61)の終了後、候補判定処理によりマークMの候補を検出したか判定する(S63)。CPU201は、マークMの中心位置mに対応する垂直方向の座標KをRAM203に記憶していない時、マークMの候補を検出していないと判定する(S63:NO)。該時、CPU201は処理をS67に進める。CPU201は、マークMの中心位置mに対応する垂直方向の座標KをRAM203に記憶した時、候補判定処理によりマークMの候補を検出したと判定する(S63:YES)。該時、CPU201は処理をS65に進める。   As shown in FIG. 13, the CPU 201 determines whether a candidate for the mark M has been detected by the candidate determination process after the candidate determination process based on the vertical run information (S61) is completed (S63). The CPU 201 determines that the candidate for the mark M is not detected when the vertical coordinate K corresponding to the center position m of the mark M is not stored in the RAM 203 (S63: NO). At this time, the CPU 201 advances the processing to S67. When the CPU 201 stores the vertical coordinate K corresponding to the center position m of the mark M in the RAM 203, the CPU 201 determines that a candidate for the mark M has been detected by the candidate determination process (S63: YES). At this time, the CPU 201 advances the processing to S65.

CPU201は、S83(図14参照)の処理によりRAM203に記憶した座標(J,K)を、マークMの中心位置mの座標として特定する(S65)。該座標(J,K)の基準座標(0,0)は、撮影画像Gの左上の隅である。CPU201は処理をS67に進める。例えばCPU201は、図16(A)に示す撮影画像Gに基づき、水平方向の座標J1及び垂直方向の座標K1をRAM203に記憶した時(S57:YES、S63:YES)、第一マークM1の中心位置m1の座標として(J1,K1)を特定する(S65)。CPU201は、水平方向の座標J2及び垂直方向の座標K2をRAM203に記憶した時(S57:YES、S63:YES)、第二マークM2の中心位置m2の座標として(J2,K2)を特定する(S65)。   The CPU 201 specifies the coordinates (J, K) stored in the RAM 203 by the process of S83 (see FIG. 14) as the coordinates of the center position m of the mark M (S65). The reference coordinate (0, 0) of the coordinate (J, K) is the upper left corner of the captured image G. CPU201 advances processing to S67. For example, when the CPU 201 stores the horizontal coordinate J1 and the vertical coordinate K1 in the RAM 203 based on the captured image G shown in FIG. 16A (S57: YES, S63: YES), the center of the first mark M1 is stored. (J1, K1) is specified as the coordinates of the position m1 (S65). When the CPU 201 stores the horizontal coordinate J2 and the vertical coordinate K2 in the RAM 203 (S57: YES, S63: YES), it specifies (J2, K2) as the coordinates of the center position m2 of the second mark M2 ( S65).

図13に示すように、CPU201は、S53の処理により、撮影画像Gから水平画素列を全て選択し、全ての水平ラン情報を取得したか判定する(S67)。CPU201は、水平画素列を全て選択し、全ての水平ラン情報を取得したと判定した時(S67:YES)、マーク位置検出処理を終了し、処理を座標取得処理(図12参照)に戻す。   As illustrated in FIG. 13, the CPU 201 selects all the horizontal pixel rows from the captured image G and determines whether all horizontal run information has been acquired by the process of S53 (S67). When the CPU 201 selects all the horizontal pixel rows and determines that all the horizontal run information has been acquired (S67: YES), the CPU 201 ends the mark position detection processing and returns the processing to the coordinate acquisition processing (see FIG. 12).

図12に示すように、CPU201は、マーク位置検出処理(S33)の終了後、RAM203に記憶した中心位置m1の座標(J1,K1)(図16(A)参照)と中心位置m2の座標(J2,K2)(図16(A)参照)を取得する。CPU201は、中心位置m1、m2を対角の頂点として有する正方形(図10参照)が囲む解析領域Qを特定する(S35)。図10に示すように解析領域Qは、第一基準線L1及び第二基準線L2を含む。図12に示すように、CPU201は、撮影画像Gのうち解析領域Qから第一基準線L1、第一直線F1(後述)を検出する為、直線検出処理(図15参照)を実行する(S37)。   As shown in FIG. 12, after completing the mark position detection process (S33), the CPU 201 stores the coordinates (J1, K1) (see FIG. 16A) of the center position m1 and the coordinates of the center position m2 (see FIG. 16A) stored in the RAM 203. J2, K2) (see FIG. 16A) is acquired. The CPU 201 specifies an analysis region Q surrounded by a square (see FIG. 10) having the center positions m1 and m2 as diagonal vertices (S35). As shown in FIG. 10, the analysis region Q includes a first reference line L1 and a second reference line L2. As shown in FIG. 12, the CPU 201 executes straight line detection processing (see FIG. 15) in order to detect a first reference line L1 and a first straight line F1 (described later) from the analysis region Q in the captured image G (S37). .

図15を参照し、直線検出処理を説明する。CPU201は、撮影画像Gのうち解析領域Qから水平画素列を一列分ずつ取得する。CPU201は取得した水平画素列を連長圧縮し、水平ラン情報を生成する(S91)。以下、解析領域から生成した水平ラン情報を、「解析水平ラン情報」と称す。CPU201は、生成した解析水平ラン情報をRAM203に記憶する。   The straight line detection process will be described with reference to FIG. The CPU 201 acquires horizontal pixel columns from the analysis region Q in the captured image G one by one. The CPU 201 compresses the acquired horizontal pixel sequence for continuous length and generates horizontal run information (S91). Hereinafter, the horizontal run information generated from the analysis area is referred to as “analysis horizontal run information”. The CPU 201 stores the generated analysis horizontal run information in the RAM 203.

CPU201は、撮影画像Gのうち解析領域Qの左端に対応する仮想線分Q4(図17(A)参照)に定義する第一開始点の数を決定する(S93)。図17(A)に示すように、本実施形態においてCPU201は、第一開始点の数として「4」(第一開始点Ps1、Ps2、Ps3、Ps4)を決定する。尚、第一開始点の数は4つに限定されず、2、3、5つ以上であってもよい。図15に示すように、CPU201は、第一開始点の数「4」の決定後、仮想線分Q4を5(=4+1)等分する各位置を、第一開始点Ps1、Ps2、Ps3、Ps4(図17(A)参照)として決定する(S95)。CPU201は、第一開始点Ps1、Ps2、Ps3、Ps4から右方に延びる線分R1、R2、R3、R4(図17(A)参照)を定義し、更に、定義した線分R1、R2、R3、R4と、撮影画像Gのうち解析領域Qの右端に対応する仮想線分Q2との交点を、第一終了点Pe1、Pe2、Pe3、Pe4(図17(A)参照)として決定する(S97)。尚、図17(A)に示すように、線分R1〜R4は何れも第一基準線L1と交差する。   The CPU 201 determines the number of first start points defined in the virtual line segment Q4 (see FIG. 17A) corresponding to the left end of the analysis region Q in the captured image G (S93). As shown in FIG. 17A, in the present embodiment, the CPU 201 determines “4” (first start points Ps1, Ps2, Ps3, Ps4) as the number of first start points. The number of first start points is not limited to four, and may be two, three, five or more. As shown in FIG. 15, after determining the number of first start points “4”, the CPU 201 divides each position that divides the virtual line segment Q4 into five (= 4 + 1) equal to the first start points Ps1, Ps2, Ps3, It is determined as Ps4 (see FIG. 17A) (S95). The CPU 201 defines line segments R1, R2, R3, R4 (see FIG. 17A) extending rightward from the first start points Ps1, Ps2, Ps3, Ps4, and further defines the defined line segments R1, R2, Intersections between R3, R4 and the virtual line segment Q2 corresponding to the right end of the analysis region Q in the captured image G are determined as first end points Pe1, Pe2, Pe3, Pe4 (see FIG. 17A) (see FIG. 17A). S97). As shown in FIG. 17A, all of the line segments R1 to R4 intersect with the first reference line L1.

図15に示すように、CPU201は、線分R1〜R4の何れかを選択する(S99)。CPU201は、選択した線分R1〜R4と重なる位置にある水平画素列に対応する解析水平ラン情報を、記憶装置206から取得する(S101)。CPU201は、取得した解析水平ラン情報の要素を、第一開始点から第一終了点に向けて順番に探索し、黒色の画素の連続数を示す要素を特定する。   As shown in FIG. 15, the CPU 201 selects any of the line segments R1 to R4 (S99). The CPU 201 acquires analysis horizontal run information corresponding to the horizontal pixel column located at the position overlapping the selected line segments R1 to R4 from the storage device 206 (S101). CPU201 searches the element of the acquired analysis horizontal run information in order toward a 1st end point from a 1st start point, and specifies the element which shows the continuous number of black pixels.

例えば図17(B)に示すように、線分R1〜R4と重なる位置にある水平画素列は、第一基準線L1と交差する。該水平画素列では、左側から右側に向けて、白色の画素(数字「0」で示す)がN回連続し、黒色の画素(数字「1」で示す)が5回連続し、白色の画素がN回連続する。対応する解析水平ラン情報は、「0/N、1/5、0/N」となる。該時、CPU201は、黒色の画素の連続数「5」を示す要素(2)を特定する。尚、解析領域Qの黒色の画素は、常に、第一基準線L1又は第二基準線L2を示す。即ち、解析水平ラン情報において、要素(1)は常に白色の画素の連続数を示し、要素(2)は常に黒色の画素の連続数を示し、要素(3)は常に白色の画素の連続数を示す。故に、CPU201は、取得した解析水平ラン情報の要素(2)を、黒色の画素の連続数を示す要素として特定する。   For example, as shown in FIG. 17B, the horizontal pixel column at the position overlapping the line segments R1 to R4 intersects the first reference line L1. In the horizontal pixel row, from the left side to the right side, white pixels (indicated by the number “0”) continue N times, black pixels (indicated by the number “1”) continue five times, and white pixels Continues N times. The corresponding analysis horizontal run information is “0 / N, 1/5, 0 / N”. At this time, the CPU 201 specifies the element (2) indicating the continuous number “5” of black pixels. Note that the black pixel in the analysis region Q always indicates the first reference line L1 or the second reference line L2. That is, in the analysis horizontal run information, the element (1) always indicates the continuous number of white pixels, the element (2) always indicates the continuous number of black pixels, and the element (3) always indicates the continuous number of white pixels. Indicates. Therefore, the CPU 201 specifies the element (2) of the acquired analysis horizontal run information as an element indicating the continuous number of black pixels.

図15に示すように、CPU201は、特定した要素に基づき、S99の処理により選択した線分R1〜R4の位置における第一基準線L1の水平方向の中点(「第一中点」と称す。)の座標を特定する(S103)。より詳細には、CPU201は、以下の式(3)に基づき、解析領域Qの左端に対応する仮想線分Q4から、第一中点までの間の水平方向の長さV(図17(B)参照)を、第一中点の水平方向の座標Vとして特定する。
V=(要素(1)+要素(2)/2)×p・・・(3)
CPU201は、特定した第一中点の水平方向の座標Vを、RAM203に記憶する。CPU201は処理をS105に進める。CPU201は、S99の処理で線分R1〜R4の全てを選択したか判定する(S105)。CPU201は、選択していない線分が残存すると判定した時(S105:NO)、処理をS99に戻す。CPU201は、選択していない線分R1〜R4の何れかを選択し(S99)、S101、S103の処理を繰り返す。CPU201は、線分R1〜R4の全てを選択したと判定した時(S105:YES)、処理をS107に進める。
As shown in FIG. 15, the CPU 201, based on the specified element, the horizontal midpoint (referred to as “first midpoint”) of the first reference line L1 at the positions of the line segments R1 to R4 selected by the process of S99. .) Is specified (S103). More specifically, the CPU 201 calculates the horizontal length V from the virtual line segment Q4 corresponding to the left end of the analysis region Q to the first midpoint based on the following equation (3) (FIG. 17B )) Is specified as the horizontal coordinate V of the first midpoint.
V = (element (1) + element (2) / 2) × p (3)
The CPU 201 stores the specified horizontal coordinate V of the first middle point in the RAM 203. CPU201 advances processing to S105. The CPU 201 determines whether all the line segments R1 to R4 have been selected in the process of S99 (S105). When the CPU 201 determines that an unselected line segment remains (S105: NO), the process returns to S99. The CPU 201 selects any of the unselected line segments R1 to R4 (S99), and repeats the processes of S101 and S103. When the CPU 201 determines that all of the line segments R1 to R4 have been selected (S105: YES), the process proceeds to S107.

例えば図17(A)に示す例の場合、CPU201は、線分R1〜R4を順番に選択し(S99)、対応する解析水平ラン情報を記憶装置206から取得する(S101)。取得した解析水平ラン情報に基づき、黒色の画素の連続数を示す要素として要素(2)を特定する。CPU201は、選択した線分Rの位置における第一基準線L1の第一中点の水平方向の座標Vを特定する(S103)。以下、線分R1〜R4を選択した時に特定した第一中点の水平方向の座標Vを、夫々、V1、V2、V3、V4と称す。CPU201は、特定した第一中点の水平方向の座標V1〜V4を、RAM203に記憶する。   For example, in the example shown in FIG. 17A, the CPU 201 sequentially selects line segments R1 to R4 (S99), and acquires corresponding analysis horizontal run information from the storage device 206 (S101). Based on the acquired analysis horizontal run information, the element (2) is specified as an element indicating the continuous number of black pixels. The CPU 201 specifies the horizontal coordinate V of the first midpoint of the first reference line L1 at the position of the selected line segment R (S103). Hereinafter, the horizontal coordinates V of the first middle point specified when the line segments R1 to R4 are selected are referred to as V1, V2, V3, and V4, respectively. The CPU 201 stores in the RAM 203 the horizontal coordinates V1 to V4 of the specified first middle point.

図15に示すように、CPU201は、RAM203に記憶した第一中点の水平方向の座標Vの平均値を算出する(S107)。例えば図17(A)に示す例の場合、座標V1〜V4の平均値を、以下の式(4)に基づき算出する(S107)。算出する値を、第一平均長H1と称す。
H1=(V1+V2+V3+V4)/4・・・(4)
As shown in FIG. 15, the CPU 201 calculates the average value of the horizontal coordinates V of the first midpoint stored in the RAM 203 (S107). For example, in the case of the example shown in FIG. 17A, the average value of the coordinates V1 to V4 is calculated based on the following equation (4) (S107). The calculated value is referred to as a first average length H1.
H1 = (V1 + V2 + V3 + V4) / 4 (4)

CPU201は、仮想線分Q4(図18参照)を4等分する3つの位置を決定する。CPU201は、決定した3つの位置のうち上端側の位置を第一特定点Pr1(図18参照)として決定し、下端側の位置を第一特定点Pr2(図18参照)として決定する(S109)。図18に示すように、第一特定点Pr1の座標を(px(1),py(1))とし、第一特定点Pr2の座標を(px(2),py(2))とする。CPU201は、第一特定点Pr1から右方に延びる線分T1を定義し、第一特定点Pr2から右方に延びる線分T2を定義する。CPU201は、線分T1に沿って第一特定点Pr1から第一平均長H1離隔した位置にある点を、第一平均位置Pf1として特定する。CPU201は、線分T2に沿って仮想線分Q4から第一平均長H1離隔した位置にある点を、第一平均位置Pf2として特定する(S111、図15参照)。第一平均位置Pf1の座標は(px(1)+H1,py(1))であり、第一平均位置Pf2の座標は(px(2)+H1,py(2))である。   The CPU 201 determines three positions for dividing the virtual line segment Q4 (see FIG. 18) into four equal parts. The CPU 201 determines the position on the upper end side among the determined three positions as the first specific point Pr1 (see FIG. 18), and determines the position on the lower end side as the first specific point Pr2 (see FIG. 18) (S109). . As shown in FIG. 18, the coordinates of the first specific point Pr1 are (px (1), py (1)), and the coordinates of the first specific point Pr2 are (px (2), py (2)). The CPU 201 defines a line segment T1 extending rightward from the first specific point Pr1 and defines a line segment T2 extending rightward from the first specific point Pr2. The CPU 201 specifies a point at a position separated from the first specific point Pr1 by the first average length H1 along the line segment T1 as the first average position Pf1. CPU201 specifies the point in the position which separated 1st average length H1 from virtual line segment Q4 along line segment T2 as 1st average position Pf2 (refer S111 and Drawing 15). The coordinates of the first average position Pf1 are (px (1) + H1, py (1)), and the coordinates of the first average position Pf2 are (px (2) + H1, py (2)).

図15に示すように、CPU201は、特定した第一平均位置Pf1、Pf2を通過して垂直方向に延びる第一直線F1を示す関数y=A(1)x+B(1)(A(1)、B(1)は夫々定数)を特定する(S113)。より詳細には、CPU201は、y=A(1)x+B(1)の(x,y)に、第一平均位置Pf1、Pf2の夫々の座標(px(1)+H1,py(1))、(px(2)+H1,py(2))を代入し、二次連立方程式を解く。CPU201は、算出した変数A(1),B(1)に基づき、第一直線F1を示すy=A(1)x+B(1)を特定する。CPU201は直線検出処理を終了し、処理を座標取得処理(図12参照)に処理を戻す。   As shown in FIG. 15, the CPU 201 functions y = A (1) x + B (1) (A (1), B) indicating the first straight line F1 that passes through the specified first average positions Pf1, Pf2 and extends in the vertical direction. (1) is a constant) (S113). More specifically, the CPU 201 sets the coordinates (px (1) + H1, py (1)) of the first average positions Pf1 and Pf2 to (x, y) of y = A (1) x + B (1), Substituting (px (2) + H1, py (2)) to solve the quadratic simultaneous equations. The CPU 201 specifies y = A (1) x + B (1) indicating the first straight line F1 based on the calculated variables A (1) and B (1). The CPU 201 ends the straight line detection process, and returns the process to the coordinate acquisition process (see FIG. 12).

図12に示すように、直線検出処理(S37)の実行により第一基準線L1、第一直線F1を検出した後、撮影画像Gのうち解析領域Qから第二基準線L2、第二直線F2(後述)を検出する為、直線検出処理(図15参照)を実行する(S39)。   As shown in FIG. 12, after the first reference line L1 and the first straight line F1 are detected by executing the straight line detection process (S37), the second reference line L2 and the second straight line F2 ( In order to detect (described later), straight line detection processing (see FIG. 15) is executed (S39).

S39の処理で実行する直線検出処理は、S37の処理で実行する直線検出処理と略同一である。S37の処理で実行する直線検出処理と異なる点は、基準とする方向を水平方向に代えて垂直方向とする点である。図15に示すように、CPU201は、撮影画像Gのうち解析領域Qから垂直画素列を一列分ずつ取得する。CPU201は取得した垂直画素列を連長圧縮し、垂直ラン情報を生成する(S91)。以下、解析領域から生成した垂直ラン情報を、「解析垂直ラン情報」と称す。CPU201は、生成した解析垂直ラン情報をRAM203に記憶する。   The straight line detection process executed in S39 is substantially the same as the straight line detection process executed in S37. The difference from the straight line detection process executed in S37 is that the reference direction is changed to the vertical direction instead of the horizontal direction. As illustrated in FIG. 15, the CPU 201 acquires vertical pixel columns from the analysis region Q in the captured image G one column at a time. The CPU 201 performs continuous length compression on the acquired vertical pixel row to generate vertical run information (S91). Hereinafter, the vertical run information generated from the analysis area is referred to as “analysis vertical run information”. The CPU 201 stores the generated analysis vertical run information in the RAM 203.

CPU201は、撮影画像Gのうち解析領域Qの左端に対応する仮想線分Q1(図19参照)に定義する第二開始点の数を決定する(S93)。図19に示すように、本実施形態においてCPU201は、第二開始点の数として「4」(第二開始点Ps5、Ps6、Ps7、Ps8)を決定する。尚、第二開始点の数は4つに限定されず、2、3、5つ以上であってもよい。図15に示すように、CPU201は、第二開始点の数「4」の決定後、仮想線分Q1を5(=4+1)等分する各位置を、第二開始点Ps5、Ps6、Ps7、Ps8(図19参照)として決定する(S95)。CPU201は、第二開始点Ps5、Ps6、Ps7、Ps8から下方に延びる線分R5、R6、R7、R8(図19参照)を定義し、更に、定義した線分R5、R6、R7、R8と、撮影画像Gのうち解析領域Qの下端に対応する仮想線分Q3との交点を、第二終了点Pe5、Pe6、Pe7、Pe8(図19参照)として決定する(S97)。尚、図19に示すように、線分R5〜R8は何れも第二基準線L2と交差する。   The CPU 201 determines the number of second start points defined in the virtual line segment Q1 (see FIG. 19) corresponding to the left end of the analysis region Q in the captured image G (S93). As illustrated in FIG. 19, in the present embodiment, the CPU 201 determines “4” (second start points Ps5, Ps6, Ps7, Ps8) as the number of second start points. The number of second start points is not limited to four, and may be two, three, five or more. As shown in FIG. 15, after determining the number of second start points “4”, the CPU 201 determines the positions where the virtual line segment Q1 is equally divided into 5 (= 4 + 1) as second start points Ps5, Ps6, Ps7, It is determined as Ps8 (see FIG. 19) (S95). The CPU 201 defines line segments R5, R6, R7, R8 (see FIG. 19) extending downward from the second start points Ps5, Ps6, Ps7, Ps8, and further defines the defined line segments R5, R6, R7, R8. Then, the intersection with the virtual line segment Q3 corresponding to the lower end of the analysis region Q in the photographed image G is determined as the second end points Pe5, Pe6, Pe7, Pe8 (see FIG. 19) (S97). As shown in FIG. 19, all of the line segments R5 to R8 intersect with the second reference line L2.

図15に示すように、CPU201は、線分R5〜R8の何れかを選択する(S99)。CPU201は、選択した線分R5〜R8と重なる位置にある垂直画素列に対応する解析垂直ラン情報を、記憶装置206から取得する(S101)。CPU201は、取得した解析垂直ラン情報の要素を、第二開始点から第二終了点に向けて順番に探索し、黒色の画素の連続数を示す要素(2)を特定する。CPU201は、特定した要素(2)に基づき、S99の処理により選択した線分R5〜R8の位置における第二基準線L2の垂直方向の中点(「第二中点」と称す。)の座標を特定する(S103)。より詳細には、CPU201は、以下の式(5)に基づき、解析領域Qの上端に対応する仮想線分Q1から、第二中点までの間の垂直向の長さW(図19参照)を、第二中点の垂直方向の座標Wとして特定する。
W=(要素(1)+要素(2)/2)×p・・・(5)
CPU201は、特定した第二中点の垂直方向の座標Wを、RAM203に記憶する。CPU201は処理をS105に進める。CPU201は、S99の処理で線分R5〜R8の全てを選択したか判定する(S105)。CPU201は、選択していない線分が残存すると判定した時(S105:NO)、処理をS99に戻す。CPU201は、選択していない線分R5〜R8の何れかを選択し(S99)、S101、S103の処理を繰り返す。CPU201は、線分R5〜R8の全てを選択したと判定した時(S105:YES)、処理をS107に進める。
As shown in FIG. 15, the CPU 201 selects any of the line segments R5 to R8 (S99). The CPU 201 acquires analysis vertical run information corresponding to the vertical pixel column located at the position overlapping the selected line segments R5 to R8 from the storage device 206 (S101). The CPU 201 searches the elements of the acquired analysis vertical run information in order from the second start point to the second end point, and specifies the element (2) indicating the continuous number of black pixels. The CPU 201 coordinates the vertical midpoint (referred to as “second midpoint”) of the second reference line L2 at the positions of the line segments R5 to R8 selected by the process of S99 based on the identified element (2). Is specified (S103). More specifically, the CPU 201 calculates the vertical length W from the virtual line segment Q1 corresponding to the upper end of the analysis region Q to the second middle point based on the following equation (5) (see FIG. 19). Is specified as the vertical coordinate W of the second midpoint.
W = (element (1) + element (2) / 2) × p (5)
The CPU 201 stores the coordinate W in the vertical direction of the specified second middle point in the RAM 203. CPU201 advances processing to S105. The CPU 201 determines whether all the line segments R5 to R8 have been selected in the process of S99 (S105). When the CPU 201 determines that an unselected line segment remains (S105: NO), the process returns to S99. The CPU 201 selects any of the unselected line segments R5 to R8 (S99), and repeats the processes of S101 and S103. When the CPU 201 determines that all of the line segments R5 to R8 have been selected (S105: YES), the process proceeds to S107.

例えば図19に示す例の場合、CPU201は、線分R5〜R8を順番に選択し(S99)、対応する解析垂直ラン情報を記憶装置206から取得する(S101)。取得した解析垂直ラン情報に基づき、黒色の画素の連続数を示す要素として要素(2)を特定する。CPU201は、選択した線分R5〜R8の何れかの位置における第二基準線L2の第二中点の垂直方向の座標Wを特定する(S103)。以下、線分R5〜R8を選択した時に特定した第二中点の垂直方向の座標Wを、夫々、W1、W2、W3、W4と称す。CPU201は、特定した第二中点の垂直方向の座標W1〜W4を、RAM203に記憶する。   For example, in the example shown in FIG. 19, the CPU 201 sequentially selects line segments R5 to R8 (S99), and acquires corresponding analysis vertical run information from the storage device 206 (S101). Based on the acquired analysis vertical run information, the element (2) is specified as an element indicating the continuous number of black pixels. The CPU 201 specifies the vertical coordinate W of the second middle point of the second reference line L2 at any position of the selected line segments R5 to R8 (S103). Hereinafter, the vertical coordinates W of the second middle point specified when the line segments R5 to R8 are selected are referred to as W1, W2, W3, and W4, respectively. The CPU 201 stores in the RAM 203 the vertical coordinates W1 to W4 of the specified second middle point.

図15に示すように、CPU201は、RAM203に記憶した第二中点の垂直方向の座標Wの平均値を算出する(S107)。例えば図19に示す例の場合、座標W1〜W4の平均値を、以下の式(6)に基づき算出する(S107)。算出する値を、第二平均長H2と称す。
H2=(W1+W2+W3+W4)/4・・・(6)
As shown in FIG. 15, the CPU 201 calculates the average value of the vertical coordinates W of the second midpoint stored in the RAM 203 (S107). For example, in the case of the example shown in FIG. 19, the average value of the coordinates W1 to W4 is calculated based on the following formula (6) (S107). The calculated value is referred to as the second average length H2.
H2 = (W1 + W2 + W3 + W4) / 4 (6)

CPU201は、仮想線分Q1(図20参照)を4等分する3つの位置を決定する。CPU201は、決定した3つの位置のうち左端側の位置を第二特定点Pr3(図20参照)として決定し、右端側の位置を第二特定点Pr4(図20参照)として決定する(S109)。図20に示すように、第二特定点Pr3の座標を(px(3),py(3))とし、第二特定点Pr4の座標を(px(4),py(4))とする。CPU201は、第二特定点Pr3から下方に延びる線分T3を定義し、第二特定点Pr4から下方に延びる線分T4を定義する。CPU201は、線分T3に沿って第二特定点Pr3から第二平均長H2離隔した位置にある点を、第二平均位置Pf3として特定する。CPU201は、線分T4に沿って第二特定点Pr4から第二平均長H2離隔した位置にある点を、第二平均位置Pf4として特定する(S111、図15参照)。第二平均位置Pf3の座標は(px(3),py(3)+H2)であり、第二平均位置Pf4の座標は(px(4),py(4)+H2)である。   The CPU 201 determines three positions for dividing the virtual line segment Q1 (see FIG. 20) into four equal parts. The CPU 201 determines the position on the left end side among the determined three positions as the second specific point Pr3 (see FIG. 20), and determines the position on the right end side as the second specific point Pr4 (see FIG. 20) (S109). . As shown in FIG. 20, the coordinates of the second specific point Pr3 are (px (3), py (3)), and the coordinates of the second specific point Pr4 are (px (4), py (4)). The CPU 201 defines a line segment T3 extending downward from the second specific point Pr3 and defines a line segment T4 extending downward from the second specific point Pr4. The CPU 201 specifies a point at a position separated from the second specific point Pr3 by the second average length H2 along the line segment T3 as the second average position Pf3. The CPU 201 specifies a point at a position separated from the second specific point Pr4 along the line T4 by the second average length H2 as the second average position Pf4 (see S111, FIG. 15). The coordinates of the second average position Pf3 are (px (3), py (3) + H2), and the coordinates of the second average position Pf4 are (px (4), py (4) + H2).

CPU201は、特定した第二平均位置Pf3、Pf4を通過して水平方向に延びる第二直線F2を示す関数y=A(2)x+B(2)(A(2)、B(2)は定数)を特定する(S113)。より詳細には、CPU201は、y=A(2)x+B(2)の(x,y)に、第二平均位置Pf3、Pf4の夫々の座標(px(3),py(3)+H2)、(px(4),py(4)+H2)を代入し、二次連立方程式を解く。CPU201は、算出した変数A(2),B(2)に基づき、第二直線F2を示すy=A(2)x+B(2)を特定する。CPU201は直線検出処理を終了し、処理を座標取得処理(図12参照)に処理を戻す。   The CPU 201 functions y = A (2) x + B (2) indicating the second straight line F2 that passes through the specified second average positions Pf3 and Pf4 and extends in the horizontal direction (A (2) and B (2) are constants). Is specified (S113). More specifically, the CPU 201 sets the coordinates (px (3), py (3) + H2) of the second average positions Pf3 and Pf4 to (x, y) of y = A (2) x + B (2), Substituting (px (4), py (4) + H2) to solve the quadratic simultaneous equations. The CPU 201 specifies y = A (2) x + B (2) indicating the second straight line F2 based on the calculated variables A (2) and B (2). The CPU 201 ends the straight line detection process, and returns the process to the coordinate acquisition process (see FIG. 12).

図12に示すように、CPU201は、S37の直線検出処理により第一直線F1(y=A(1)x+B(1))(図18参照)を特定し、S39の直線検出処理により第二直線F2(y=A(2)x+B(2))(図20参照)を特定する。CPU201は、第一直線F1と第二直線F2が交差する点の座標を、チャートSを第一基準位置に配置した状態で第一基準線L1と第二基準線L2が交差する第一交差点C1(図21(A)参照)の座標(「第一交差点座標」と称す。)として決定する(S41)。CPU201は、座標取得処理を終了し、処理をメイン処理(図11参照)に戻す。   As shown in FIG. 12, the CPU 201 identifies the first straight line F1 (y = A (1) x + B (1)) (see FIG. 18) by the straight line detection process of S37, and the second straight line F2 by the straight line detection process of S39. (Y = A (2) x + B (2)) (see FIG. 20) is specified. The CPU 201 sets the coordinates of the point where the first straight line F1 and the second straight line F2 intersect at the first intersection C1 (the first reference line L1 and the second reference line L2 intersect with the chart S placed at the first reference position). The coordinates (referred to as “first intersection coordinates”) are determined (see FIG. 21A) (S41). The CPU 201 ends the coordinate acquisition process and returns the process to the main process (see FIG. 11).

図11に示すように、CPU201は、S15の処理により第一交差点座標を算出した後、窓部101上方の所定位置であって第一基準位置と異なる第二基準位置迄吸着機構130を移動する第二移動指示を、移動装置100に出力する。移動装置100のCPU111は第二移動指示を受信した時、第一駆動モータ121、第二駆動モータ122の駆動により、吸着機構130を第二基準位置に移動する(S17)。該時、チャートSを第二基準位置に配置した状態と称す。   As illustrated in FIG. 11, the CPU 201 calculates the first intersection coordinates by the process of S15, and then moves the suction mechanism 130 to a predetermined position above the window 101 and to a second reference position different from the first reference position. The second movement instruction is output to the moving device 100. When receiving the second movement instruction, the CPU 111 of the moving device 100 moves the suction mechanism 130 to the second reference position by driving the first drive motor 121 and the second drive motor 122 (S17). At this time, the chart S is referred to as a state where it is arranged at the second reference position.

CPU201は、撮影部117による撮影を実行する撮影指示を、移動装置100に出力する。移動装置100のCPU111は撮影指示を受信した時、撮影部117を制御して撮影を開始する(S19)。撮影部117は、第二基準位置に配置した状態のチャートSを撮影し、撮影画像のデータを生成する。移動装置100は、撮影部117が生成した撮影画像のデータを取得し、PC200に出力する。PC200のCPU201は撮影画像Gのデータを受信する。CPU201は、撮影画像Gに基づいて第二交差点C2の位置を示す座標を取得する為、座標取得処理(図12参照)を実行する(S21)。CPU201は、S15と同一の処理を実行することにより、チャートSを第二基準位置に配置した状態で第一基準線L1と第二基準線L2が交差する第二交差点C2(図21(B)参照)の座標(「第二交差点座標」と称す)を決定する(S41、図12参照)。   The CPU 201 outputs a photographing instruction for performing photographing by the photographing unit 117 to the mobile device 100. When receiving the shooting instruction, the CPU 111 of the mobile device 100 controls the shooting unit 117 to start shooting (S19). The imaging unit 117 captures the chart S placed at the second reference position, and generates captured image data. The mobile device 100 acquires the captured image data generated by the imaging unit 117 and outputs the acquired data to the PC 200. The CPU 201 of the PC 200 receives the captured image G data. CPU201 performs coordinate acquisition processing (refer to Drawing 12), in order to acquire the coordinates which show the position of the 2nd intersection C2 based on photography picture G (S21). The CPU 201 executes the same processing as S15, thereby the second intersection C2 where the first reference line L1 and the second reference line L2 intersect with the chart S placed at the second reference position (FIG. 21B). The coordinates (referred to as “second intersection coordinates”) are determined (see S41, FIG. 12).

CPU201は、第一基準位置に配置した吸着機構130の位置を装置座標系で示す座標(「第一装置座標」と称す)と、第二基準位置に配置した吸着機構130の位置を装置座標系で示す座標(「第二装置座標」と称す)を、記憶装置206から読み出す。CPU201は、第一装置座標から第二装置座標に向かう装置ベクトルZ1(図21参照)を算出する。装置ベクトルZ1は、第一装置座標から第二装置座標迄吸着機構130を移動した時のチャートSの装置座標系における移動量を示す。CPU201は、第一交差点座標から第二交差点座標に向かう交差点ベクトルZ2(図21参照)を算出する。交差点ベクトルZ2は、第一交差点座標から第二交差点座標迄交差点を移動した時の画像座標系における移動量を示す。CPU201は、交差点ベクトルZ2を装置ベクトルZ1に変化する為の変換行列を算出する。これにより、CPU201は、装置座標系と画像座標系とを対応付ける(S23)。CPU201はメイン処理を終了する。   The CPU 201 uses coordinates indicating the position of the suction mechanism 130 arranged at the first reference position in the apparatus coordinate system (referred to as “first apparatus coordinates”) and the position of the suction mechanism 130 arranged at the second reference position as the apparatus coordinate system. Are read from the storage device 206 (referred to as “second device coordinates”). The CPU 201 calculates a device vector Z1 (see FIG. 21) from the first device coordinates to the second device coordinates. The device vector Z1 indicates the amount of movement of the chart S in the device coordinate system when the suction mechanism 130 is moved from the first device coordinate to the second device coordinate. The CPU 201 calculates an intersection vector Z2 (see FIG. 21) from the first intersection coordinates to the second intersection coordinates. The intersection vector Z2 indicates the amount of movement in the image coordinate system when the intersection is moved from the first intersection coordinate to the second intersection coordinate. The CPU 201 calculates a conversion matrix for changing the intersection vector Z2 to the device vector Z1. As a result, the CPU 201 associates the apparatus coordinate system with the image coordinate system (S23). The CPU 201 ends the main process.

尚、メイン処理の終了後、移動装置100が吸着機構130により布105を第二位置から第三位置に移動する時、撮影部117は、第二位置にある布105を窓部101を介して撮影する。PC200のCPU201は、撮影部117により撮影した撮影画像のデータを取得し、吸着面136に吸着した布105の位置を検出する。CPU201は、検出した布105の位置に応じ、布105を第二位置から第三位置迄移動する時の画像座標系における移動量を特定する。CPU201は、算出した変換行列に基づき、画像座標系における移動量を、装置座標系における移動量に変換する。CPU201は、変換した装置座標系における移動量に基づき、第二位置から第三位置迄布105を移動する為に必要な第一駆動モータ121と第二駆動モータ122の駆動条件を算出する。第一駆動モータ121と第二駆動モータ122は、PC200が算出した駆動条件で駆動し、第一腕部132と第二腕部133を回動する。これにより、吸着機構130の吸着面136は第三位置迄移動する。次に、吸着面136は第三駆動モータ123の駆動により、布105を吸着した状態で移動範囲の下端に移動する。次に、帯電装置135は駆動を停止する。布105は吸着面136から離れ、PC200により特定した第三位置に載置する。   When the moving device 100 moves the cloth 105 from the second position to the third position by the suction mechanism 130 after the main process is finished, the photographing unit 117 moves the cloth 105 at the second position through the window 101. Take a picture. The CPU 201 of the PC 200 acquires data of a photographed image photographed by the photographing unit 117 and detects the position of the cloth 105 sucked on the suction surface 136. The CPU 201 specifies the amount of movement in the image coordinate system when the cloth 105 is moved from the second position to the third position according to the detected position of the cloth 105. The CPU 201 converts the movement amount in the image coordinate system into the movement amount in the apparatus coordinate system based on the calculated conversion matrix. The CPU 201 calculates the driving conditions of the first drive motor 121 and the second drive motor 122 necessary for moving the cloth 105 from the second position to the third position based on the converted movement amount in the apparatus coordinate system. The first drive motor 121 and the second drive motor 122 are driven under the drive conditions calculated by the PC 200 to rotate the first arm portion 132 and the second arm portion 133. As a result, the suction surface 136 of the suction mechanism 130 moves to the third position. Next, the suction surface 136 is moved to the lower end of the movement range while the cloth 105 is sucked by the driving of the third drive motor 123. Next, the charging device 135 stops driving. The cloth 105 moves away from the suction surface 136 and is placed at the third position specified by the PC 200.

<本実施形態の主たる作用、効果>
PC200のCPU201は、チャートSを撮影した撮影画像Gの第一基準線L1の第一中点の第一平均位置を通過する第一直線F1と、第二基準線L2の第二中点の第二平均位置を通過する第二直線F2とを特定する(S113)。CPU201は、特定した第一直線F1と第二直線F2が交差する交差点Cを特定する(S41)。これによりCPU201は、第一基準線L1と第二基準線L2をエッジ検出により検出して交差点Cの座標を特定する時よりも、交差点Cの座標を精度よく決定できる。該理由は、エッジ検出に基づいて交差点Cの座標を特定する時、ノッチの発生により精度が低下する可能性がある為である。
<Main functions and effects of this embodiment>
The CPU 201 of the PC 200 has a first straight line F1 passing through the first average position of the first middle point of the first reference line L1 of the captured image G obtained by photographing the chart S, and the second middle point of the second reference line L2. A second straight line F2 passing through the average position is specified (S113). The CPU 201 identifies an intersection C where the identified first straight line F1 and second straight line F2 intersect (S41). Thereby, the CPU 201 can determine the coordinates of the intersection C more accurately than when the first reference line L1 and the second reference line L2 are detected by edge detection and the coordinates of the intersection C are specified. This is because when the coordinates of the intersection C are specified based on the edge detection, there is a possibility that the accuracy is lowered due to the occurrence of a notch.

CPU201は、第一中点の第一平均位置を通過する第一直線F1と、第二基準線L2の第二中点の第二平均位置を通過する第二直線F2とに基づいて交差点Cを特定することで、1画素の単位長さよりも短い単位で交差点Cの座標を特定できる。故に、CPU201は、交差点Cの座標を精度よく決定できる。   CPU201 specifies intersection C based on the 1st straight line F1 which passes the 1st average position of the 1st middle point, and the 2nd straight line F2 which passes the 2nd average position of the 2nd middle point of the 2nd reference line L2. Thus, the coordinates of the intersection C can be specified in a unit shorter than the unit length of one pixel. Therefore, the CPU 201 can determine the coordinates of the intersection C with high accuracy.

CPU201は、第一基準位置に吸着機構130を配置した時に特定した第一交差点C1の第一交差点座標から、第二基準位置に吸着機構130を配置した時に特定した第二交差点C2の第二交差点座標に向かう交差点ベクトルZ2を算出する。交差点ベクトルZ2は、第一交差点座標から第二交差点座標迄交差点を移動した時の画像座標系における移動量を示す。CPU201は、第一基準位置から第二基準位置迄吸着機構130を移動した時のチャートSの移動量を示す装置ベクトルZ1を算出する。装置ベクトルZ1は、第一装置座標から第二装置座標迄吸着機構130を移動した時のチャートSの装置座標系における移動量を示す。CPU201は、装置ベクトルZ1と交差点ベクトルZ2に基づいて変換行列を算出し、画像座標系と装置座標系とを対応付ける(S23)。故に、CPU201は、布105を吸着する吸着機構130の座標系(装置座標系)と撮影画像Gの座標系(画像座標系)とを精度良く対応付けることができる。CPU201は、画像座標系における第一交差点座標と第二交差点座標との間の移動と、装置座標系における第一装着座標と第二装着座標との間の移動量に基づき、装着座標系と画像座標系とを変換行列によって対応付けることができる。   The CPU 201 determines the second intersection of the second intersection C2 specified when the suction mechanism 130 is disposed at the second reference position from the first intersection coordinates of the first intersection C1 specified when the suction mechanism 130 is disposed at the first reference position. An intersection vector Z2 directed to the coordinates is calculated. The intersection vector Z2 indicates the amount of movement in the image coordinate system when the intersection is moved from the first intersection coordinate to the second intersection coordinate. The CPU 201 calculates a device vector Z1 indicating the amount of movement of the chart S when the suction mechanism 130 is moved from the first reference position to the second reference position. The device vector Z1 indicates the amount of movement of the chart S in the device coordinate system when the suction mechanism 130 is moved from the first device coordinate to the second device coordinate. The CPU 201 calculates a transformation matrix based on the device vector Z1 and the intersection vector Z2, and associates the image coordinate system with the device coordinate system (S23). Therefore, the CPU 201 can accurately associate the coordinate system (device coordinate system) of the suction mechanism 130 that sucks the cloth 105 with the coordinate system (image coordinate system) of the captured image G. The CPU 201 determines whether the mounting coordinate system and the image are based on the movement between the first intersection coordinate and the second intersection coordinate in the image coordinate system and the movement amount between the first mounting coordinate and the second mounting coordinate in the apparatus coordinate system. A coordinate system can be associated with a transformation matrix.

CPU201は、マーク位置検出処理(S33)を実行し、解析領域Qを特定する(S35)。CPU201は、撮影画像Gのうち解析領域Qを解析し、交差点Cを決定する(S41)。該時、CPU201は、交差点Cを決定する時に解析対象とする撮影画像Gの領域を制限できる。故に、CPU201は、第一交差点座標及び第二交差点座標を決定する為に必要な処理の負荷を軽減できる。   CPU201 performs mark position detection processing (S33), and specifies analysis field Q (S35). The CPU 201 analyzes the analysis region Q in the captured image G and determines an intersection C (S41). At this time, the CPU 201 can limit the area of the captured image G to be analyzed when the intersection C is determined. Therefore, the CPU 201 can reduce the processing load necessary for determining the first intersection coordinates and the second intersection coordinates.

マークMの中心位置mを通ってマークMを横切る線分を定義した時、該線分のうちマークMの曲線と重なる2つの部分a1、a3のそれぞれの長さと、マークMの曲線で囲まれた部分と重なる部分a2の長さとの比a1:a2:a3は、1:2:1となる。CPU201は、該比に基づき、マークMの中心位置mの座標を決定する(S81)。該時、CPU201は、交差点Cを決定する為に解析の対象とする解析領域Qを、簡易に特定できる。又、撮影部117とチャートSとの間の距離の変化に応じ、撮影画像G中のマークMの大きさが変化した時も、a1:a2:a3の比は変化しない。故に、CPU201は、撮影部117とチャートSとの間の距離が変化した時も、マークMを精度良く検出できる。   When a line segment that crosses the mark M through the center position m of the mark M is defined, the length of each of the two portions a1 and a3 that overlap the curve of the mark M of the line segment and the curve of the mark M are surrounded. The ratio a1: a2: a3 to the length of the part a2 that overlaps the part is 1: 2: 1. The CPU 201 determines the coordinates of the center position m of the mark M based on the ratio (S81). At this time, the CPU 201 can easily specify the analysis region Q to be analyzed in order to determine the intersection C. Further, even when the size of the mark M in the photographed image G changes according to the change in the distance between the photographing unit 117 and the chart S, the ratio of a1: a2: a3 does not change. Therefore, the CPU 201 can detect the mark M with high accuracy even when the distance between the photographing unit 117 and the chart S changes.

<変形例>
本発明は上記実施形態に限らない。上記メイン処理は、移動装置100のCPU111により実行されてもよい。ミシン1のCPU51、移動装置100のCPU111、PC200のCPU201の代わりに、縫製システム300が備える共通のCPUを設けてもよい。CPU51、111、201が実行する各処理を、共通のCPUが実行してもよい。吸着機構130により第三位置に載置された布105を、ミシン1以外の機器により加工してもよい。該時、ミシン1の代わりに布105を加工する加工装置を設けてもよい。加工装置の具体例として、布を貼り合わせる接着装置、布を切断する切断装置等がある。吸着機構130は、静電気以外の力で吸着面136に布105を吸着してもよい。例えば吸着機構130は、吸着面136に設けた孔からエアを吸引することで、吸着面136に布105を吸着してもよい。又例えば吸着機構130は、一時的な接着が可能な接着剤により吸着面136に布105を吸着してもよい。
<Modification>
The present invention is not limited to the above embodiment. The main process may be executed by the CPU 111 of the mobile device 100. Instead of the CPU 51 of the sewing machine 1, the CPU 111 of the moving apparatus 100, and the CPU 201 of the PC 200, a common CPU provided in the sewing system 300 may be provided. A common CPU may execute each process executed by the CPUs 51, 111, and 201. The cloth 105 placed at the third position by the suction mechanism 130 may be processed by a device other than the sewing machine 1. At this time, a processing device for processing the cloth 105 instead of the sewing machine 1 may be provided. Specific examples of the processing apparatus include a bonding apparatus that bonds cloths, a cutting apparatus that cuts cloths, and the like. The suction mechanism 130 may suck the cloth 105 on the suction surface 136 with a force other than static electricity. For example, the suction mechanism 130 may suck the cloth 105 on the suction surface 136 by sucking air from a hole provided on the suction surface 136. Further, for example, the suction mechanism 130 may suck the cloth 105 on the suction surface 136 with an adhesive capable of temporary bonding.

CPU201は、吸着機構130を第一基準位置と第二基準位置との夫々に配置した時にチャートSを撮影し、第一交差点座標及び第二交差点座標を算出した。CPU201は、異なる3つ以上の位置に配置したチャートSを撮影し、交差点座標を算出してもよい。CPU201は、算出した3つ以上の交差点座標に基づき、交差点ベクトルを装置ベクトルに変化する為の変換行列を算出し、装置座標系と画像座標系とを対応付けてもよい。   The CPU 201 photographed the chart S when the suction mechanism 130 was disposed at each of the first reference position and the second reference position, and calculated the first intersection coordinates and the second intersection coordinates. The CPU 201 may shoot the charts S arranged at three or more different positions and calculate the intersection coordinates. The CPU 201 may calculate a transformation matrix for changing the intersection vector into the device vector based on the calculated three or more intersection coordinates, and may associate the device coordinate system with the image coordinate system.

チャートSの第一基準線L1と第二基準線L2は直交する時に限らない。即ち、第一基準線L1と第二基準線L2のなす角度は90度以外でもよい。マークMの数は2つに限らない。例えばチャートSは、解析領域Qの四隅の夫々にマークMを有していてもよい。マークMの中心位置mを通ってマークMを横切る線分を定義した時、該線分のうちマークMの曲線と重なる2つの部分a1、a3のそれぞれの長さと、マークMの曲線で囲まれた部分と重なる部分a2の長さとの比a1:a2:a3は、1:2:1に限らず、他の値であってもよいことは言うまでもない。   The first reference line L1 and the second reference line L2 of the chart S are not limited to being orthogonal. That is, the angle formed by the first reference line L1 and the second reference line L2 may be other than 90 degrees. The number of marks M is not limited to two. For example, the chart S may have marks M at each of the four corners of the analysis region Q. When a line segment that crosses the mark M through the center position m of the mark M is defined, the lengths of the two portions a1 and a3 that overlap the curve of the mark M and the curve of the mark M are surrounded by the line segment. It goes without saying that the ratio a1: a2: a3 to the length of the part a2 overlapping with the other part is not limited to 1: 2: 1 but may be other values.

CPU201は、周知のパターンマッチング技術を適用することで、マークMを検出してもよい。CPU201は、検出したマークMの大きさが所定範囲内の時、検出したマークMに基づいて解析領域Qを検出し、所定範囲外の時、解析領域Qを検出しなくてもよい。CPU201は、撮影画像G全体を解析することで交差点Cを決定してもよい。該時、チャートSはマークMを有さなくてもよい。   The CPU 201 may detect the mark M by applying a known pattern matching technique. The CPU 201 may detect the analysis region Q based on the detected mark M when the size of the detected mark M is within a predetermined range, and may not detect the analysis region Q when it is outside the predetermined range. The CPU 201 may determine the intersection C by analyzing the entire captured image G. At this time, the chart S may not have the mark M.

CPU201は、S95の処理で第一開始点、第二開始点を決定する時、仮想線分Q1、Q4を開始点の数に応じて等分しなくてもよい。CPU201は、S109の処理で第一特定点、第二特定点を決定する時、仮想線分Q1、Q4を4等分する3つの位置に基づき決定しなくてもよい。   When the CPU 201 determines the first start point and the second start point in the process of S95, the virtual line segments Q1 and Q4 may not be equally divided according to the number of start points. When determining the first specific point and the second specific point in the process of S109, the CPU 201 may not determine based on the three positions that divide the virtual line segments Q1 and Q4 into four equal parts.

<その他>
PC200は本発明の「制御装置」の一例である。吸着機構130は本発明の「保持部」の一例である。吸着面136は本発明の「保持面」の一例である。布105は本発明の「対象物」の一例である。ミシン1は本発明の「加工装置」の一例である。移動装置100は本発明の「保持装置」の一例である。上下方向は本発明の「第一方向」の一例である。左右方向は本発明の「第二方向」の一例である。S15、S21の処理を行うCPU201は本発明の「決定手段」の一例である。S23の処理を行うCPU201は本発明の「制御手段」の一例である。S103の処理を行うCPU201は本発明の「第一特定手段」「第三特定手段」の一例である。S107の処理を行うCPU201は本発明の「第一平均算出手段」「第二平均算出手段」の一例である。S109の処理を行うCPU201は本発明の「第二特定手段」「第四特定手段」の一例である。S41の処理を行うCPU201は本発明の「座標決定手段」の一例である。S33の処理を行うCPU201は本発明の「検出手段」の一例である。S15、S21の処理は本発明の「決定ステップ」の一例である。S23の処理は本発明の「制御ステップ」の一例である。S103の処理は本発明の「第一特定ステップ」「第三特定ステップ」の一例である。S107の処理は本発明の「第一平均算出ステップ」「第二平均算出ステップ」の一例である。S109の処理は本発明の「第二特定ステップ」「第四特定ステップ」の一例である。S41の処理は本発明の「座標決定手段ステップ」の一例である。
<Others>
The PC 200 is an example of the “control device” in the present invention. The suction mechanism 130 is an example of the “holding unit” in the present invention. The suction surface 136 is an example of the “holding surface” in the present invention. The cloth 105 is an example of the “object” in the present invention. The sewing machine 1 is an example of the “processing apparatus” in the present invention. The moving device 100 is an example of the “holding device” in the present invention. The vertical direction is an example of the “first direction” in the present invention. The left-right direction is an example of the “second direction” in the present invention. The CPU 201 that performs the processes of S15 and S21 is an example of the “determination unit” in the present invention. The CPU 201 that performs the process of S23 is an example of the “control unit” in the present invention. The CPU 201 that performs the process of S103 is an example of the “first specifying unit” or “third specifying unit” in the present invention. The CPU 201 that performs the process of S107 is an example of the “first average calculation unit” or “second average calculation unit” in the present invention. The CPU 201 that performs the processing of S109 is an example of the “second specifying unit” or “fourth specifying unit” in the present invention. The CPU 201 that performs the process of S41 is an example of the “coordinate determination unit” in the present invention. The CPU 201 that performs the process of S33 is an example of the “detection unit” in the present invention. The processing of S15 and S21 is an example of the “decision step” in the present invention. The process of S23 is an example of the “control step” in the present invention. The process of S103 is an example of the “first specific step” and “third specific step” in the present invention. The process of S107 is an example of the “first average calculation step” and “second average calculation step” in the present invention. The process of S109 is an example of the “second specific step” and the “fourth specific step” in the present invention. The process of S41 is an example of the “coordinate determination means step” in the present invention.

1 :ミシン
100 :移動装置
105 :布
117 :撮影部
130 :吸着機構
200 :PC
201 :CPU
C :交差点
C1 :第一交差点
C2 :第二交差点
F1 :第一直線
F2 :第二直線
G :撮影画像
M :マーク
M1 :第一マーク
M2 :第二マーク
S :チャート
1: Sewing machine 100: Moving device 105: Cloth 117: Imaging unit 130: Suction mechanism 200: PC
201: CPU
C: intersection C1: first intersection C2: second intersection F1: first straight line F2: second straight line G: photographed image M: mark M1: first mark M2: second mark S: chart

Claims (5)

対象物を保持して加工装置に受け渡す保持部と、
第一方向に延びる第一基準線と、前記第一方向と交差する第二方向に延びる第二基準線とを有し、且つ、前記第一基準線と前記第二基準線とが交差点で交差するチャートを、前記保持部により保持した状態で撮影する撮影部と
を備えた保持装置に接続し、前記撮影部が撮影した撮影画像と前記保持部との夫々の座標系を対応付ける制御を行う制御装置であって、
前記撮影画像を解析して前記交差点の座標を決定する決定手段と、
前記チャートを保持した前記保持部が複数の位置にある状態の夫々で、前記決定手段により決定した前記交差点の座標と、前記保持部の位置を示す座標とに基づき、前記撮影画像と前記保持部との夫々の座標系を対応付ける制御手段と
を備え、
前記決定手段は、
前記撮影画像に含まれる前記第一基準線上の複数の位置の夫々における、前記第一方向と直交する方向の中点である複数の第一中点を特定する第一特定手段と、
前記第一特定手段により特定した前記複数の第一中点の位置の夫々の、前記第一方向と直交する方向における第一平均位置を算出する第一平均算出手段と、
前記第一方向に延び、前記第一平均算出手段により算出した前記第一平均位置を通過する第一直線を特定する第二特定手段と、
前記撮影画像に含まれる前記第二基準線上の複数の位置の夫々における、前記第二方向と直交する方向の中点である複数の第二中点を特定する第三特定手段と、
前記第三特定手段により特定した前記複数の第二中点の位置の夫々の、前記第二方向と直交する方向における第二平均位置を算出する第二平均算出手段と、
前記第二方向に延び、前記第二平均算出手段により算出した前記第二平均位置を通過する第二直線を特定する第四特定手段と、
前記第二特定手段により特定した前記第一直線と、前記第四特定手段により特定した前記第二直線との交点の座標を、前記交差点の座標として決定する座標決定手段と、
を備えたことを特徴とする制御装置。
A holding unit for holding the object and transferring it to the processing apparatus;
A first reference line extending in a first direction and a second reference line extending in a second direction intersecting the first direction, and the first reference line and the second reference line intersect at an intersection; Is connected to a holding device including a photographing unit for photographing in a state where the chart is held by the holding unit, and performs control for associating the coordinate system of the captured image photographed by the photographing unit and the holding unit A device,
Determining means for analyzing the captured image and determining coordinates of the intersection;
The captured image and the holding unit based on the coordinates of the intersection determined by the determining unit and the coordinates indicating the position of the holding unit in each of the states where the holding unit holding the chart is in a plurality of positions. Control means for associating each coordinate system with
The determining means includes
First specifying means for specifying a plurality of first midpoints that are midpoints in a direction orthogonal to the first direction at each of a plurality of positions on the first reference line included in the captured image;
First average calculating means for calculating a first average position in a direction orthogonal to the first direction of each of the positions of the plurality of first midpoints specified by the first specifying means;
Second specifying means for specifying a first straight line extending in the first direction and passing through the first average position calculated by the first average calculating means;
Third specifying means for specifying a plurality of second midpoints that are midpoints in a direction orthogonal to the second direction at each of a plurality of positions on the second reference line included in the captured image;
Second average calculating means for calculating a second average position in a direction orthogonal to the second direction of each of the positions of the plurality of second middle points specified by the third specifying means;
Fourth specifying means for specifying a second straight line extending in the second direction and passing through the second average position calculated by the second average calculating means;
Coordinate determining means for determining the coordinates of the intersection of the first straight line specified by the second specifying means and the second straight line specified by the fourth specifying means as the coordinates of the intersection;
A control device comprising:
前記制御手段は、
前記チャートを保持した前記保持部が第一基準位置にある状態で、前記撮影部により撮影した前記撮影画像に基づき前記決定手段が決定した第一交差点座標、
前記チャートを保持した前記保持部が第二基準位置にある状態で、前記撮影部により撮影した前記撮影画像に基づき前記決定手段が決定した第二交差点座標、
前記第一基準位置にある時の前記保持部の位置を示す第一保持部座標、及び、
前記第二基準位置にある時の前記保持部の位置を示す第二保持部座標に基づき、前記撮影画像と前記保持部との夫々の座標系を対応付けることを特徴とする請求項1に記載の制御装置。
The control means includes
A first intersection coordinate determined by the determining unit based on the captured image captured by the imaging unit in a state where the holding unit holding the chart is at a first reference position;
Second intersection coordinates determined by the determining means based on the captured image captured by the imaging unit in a state where the holding unit that holds the chart is at a second reference position;
First holding unit coordinates indicating the position of the holding unit when in the first reference position; and
The coordinate system of each of the captured image and the holding unit is associated with each other based on a second holding unit coordinate indicating the position of the holding unit when in the second reference position. Control device.
前記第一方向と前記第二方向とは直交し、
前記チャートは、前記第一基準線及び前記第二基準線を囲む四角形の4つの頂点のうち対角に位置する2つの頂点の位置の夫々にマークを有し、
前記決定手段は、
2つの前記マークを検出する検出手段を更に有し、
前記撮影部により撮影した前記撮影画像のうち、前記検出手段により検出した前記2つのマークの夫々の位置を対角の頂点として有する四角形で囲まれた領域を解析して前記交差点の座標を決定することを特徴とする請求項1又は2に記載の制御装置。
The first direction and the second direction are orthogonal to each other,
The chart has a mark at each of the positions of two vertices located diagonally out of four vertices of a quadrangle surrounding the first reference line and the second reference line,
The determining means includes
A detecting means for detecting the two marks;
Of the photographed image photographed by the photographing unit, the coordinates of the intersection are determined by analyzing a region surrounded by a rectangle having the respective positions of the two marks detected by the detecting means as diagonal vertices. The control device according to claim 1 or 2, wherein
前記マークは、
円環状の曲線を有し、且つ、
前記曲線の径方向の長さと、前記曲線で囲まれた内部の径方向の長さの比が所定条件を満たし、
前記検出手段は、
前記撮影画像を前記第一方向と前記第二方向とに沿って逐次解析することにより、前記曲線の長さと、前記曲線で囲まれた内部の長さとの比が、前記第一方向と前記第二方向との何れにおいても前記所定条件を満たす場合に前記マークを検出することを特徴とする請求項3に記載の制御装置。
The mark is
Having an annular curve, and
The ratio of the radial length of the curve to the internal radial length surrounded by the curve satisfies a predetermined condition,
The detection means includes
By sequentially analyzing the captured image along the first direction and the second direction, the ratio between the length of the curve and the inner length surrounded by the curve is the first direction and the first direction. The control device according to claim 3, wherein the mark is detected when the predetermined condition is satisfied in both directions.
対象物を保持して加工装置に受け渡す保持部と、
第一方向に延びる第一基準線と、前記第一方向と交差する第二方向に延びる第二基準線とを有し、且つ、前記第一基準線と前記第二基準線とが交差点で交差するチャートを、前記保持部により保持した状態で撮影する撮影部と
を備えた保持装置に接続し、前記撮影部が撮影した撮影画像と前記保持部との夫々の座標系を対応付ける制御を行う制御装置によって実行される制御方法であって、
前記撮影画像を解析して前記交差点の座標を決定する決定ステップと、
前記チャートを保持した前記保持部が複数の位置にある状態の夫々で、前記決定ステップにより決定した前記交差点の座標と、前記保持部の位置を示す座標とに基づき、前記撮影画像と前記保持部との夫々の座標系を対応付ける制御ステップと
を備え、
前記決定ステップは、
前記撮影画像に含まれる前記第一基準線上の複数の位置の夫々における、前記第一方向と直交する方向の中点である複数の第一中点を特定する第一特定ステップと、
前記第一特定ステップで特定した前記複数の第一中点の位置の夫々の、前記第一方向と直交する方向における第一平均位置を算出する第一平均算出ステップと、
前記第一方向に延び、前記第一平均算出ステップで算出した前記第一平均位置を通過する第一直線を特定する第二特定ステップと、
前記撮影画像に含まれる前記第二基準線上の複数の位置の夫々における、前記第二方向と直交する方向の中点である複数の第二中点を特定する第三特定ステップと、
前記第三特定ステップで特定した前記複数の第二中点の位置の夫々の、前記第二方向と直交する方向における第二平均位置を算出する第二平均算出ステップと、
前記第二方向に延び、前記第二平均算出ステップで算出した前記第二平均位置を通過する第二直線を特定する第四特定ステップと、
前記第二特定ステップで特定した前記第一直線と、前記第四特定ステップで特定した前記第二直線との交点の座標を、前記交差点の座標として決定する座標決定ステップと、
を備えたことを特徴とする制御方法。
A holding unit for holding the object and transferring it to the processing apparatus;
A first reference line extending in a first direction and a second reference line extending in a second direction intersecting the first direction, and the first reference line and the second reference line intersect at an intersection; Is connected to a holding device including a photographing unit for photographing in a state where the chart is held by the holding unit, and performs control for associating the coordinate system of the captured image photographed by the photographing unit and the holding unit A control method executed by an apparatus,
A determination step of analyzing the captured image to determine coordinates of the intersection;
The captured image and the holding unit are based on the coordinates of the intersection determined by the determining step and the coordinates indicating the position of the holding unit in each of the states where the holding unit holding the chart is in a plurality of positions. And a control step for associating each coordinate system with
The determining step includes
A first specifying step of specifying a plurality of first midpoints that are midpoints in a direction orthogonal to the first direction at each of a plurality of positions on the first reference line included in the captured image;
A first average calculating step of calculating a first average position in a direction orthogonal to the first direction of each of the plurality of first midpoint positions specified in the first specifying step;
A second specifying step for specifying a first straight line extending in the first direction and passing through the first average position calculated in the first average calculating step;
A third specifying step of specifying a plurality of second midpoints that are midpoints in a direction orthogonal to the second direction at each of a plurality of positions on the second reference line included in the captured image;
A second average calculating step of calculating a second average position in a direction orthogonal to the second direction of each of the positions of the plurality of second middle points specified in the third specifying step;
A fourth specifying step for specifying a second straight line extending in the second direction and passing through the second average position calculated in the second average calculating step;
A coordinate determining step for determining the coordinates of the intersection of the first straight line specified in the second specifying step and the second straight line specified in the fourth specifying step as the coordinates of the intersection;
A control method comprising:
JP2017129690A 2017-06-30 2017-06-30 Control device and control method Pending JP2019012040A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017129690A JP2019012040A (en) 2017-06-30 2017-06-30 Control device and control method
CN201810689966.9A CN109211126A (en) 2017-06-30 2018-06-28 control device and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017129690A JP2019012040A (en) 2017-06-30 2017-06-30 Control device and control method

Publications (1)

Publication Number Publication Date
JP2019012040A true JP2019012040A (en) 2019-01-24

Family

ID=64989854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017129690A Pending JP2019012040A (en) 2017-06-30 2017-06-30 Control device and control method

Country Status (2)

Country Link
JP (1) JP2019012040A (en)
CN (1) CN109211126A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021137421A1 (en) * 2020-01-02 2021-07-08 송해붕 Method for manufacturing embroidery pattern or quilting pattern in fabric for vehicle interior material

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113997059A (en) * 2021-11-02 2022-02-01 珠海格力智能装备有限公司 Compressor workpiece assembling method, device and system and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4592021B2 (en) * 2006-06-29 2010-12-01 トッキ株式会社 Alignment apparatus and method
JP4487000B2 (en) * 2007-07-31 2010-06-23 シャープ株式会社 Image processing apparatus, image forming apparatus, image processing method, image processing system, image processing program, and recording medium thereof
CN101770641B (en) * 2008-12-26 2012-08-29 中国科学院沈阳自动化研究所 Rapid extracting method for structure light welding seam image characteristic points
JP6113742B2 (en) * 2012-10-29 2017-04-12 ローツェ株式会社 Semiconductor substrate position detection apparatus and position detection method
JP6403434B2 (en) * 2014-05-28 2018-10-10 ヤマハ発動機株式会社 Component mounting method and component mounting apparatus
JP6407826B2 (en) * 2015-09-03 2018-10-17 ファナック株式会社 Coordinate system setting method, coordinate system setting device, and robot system provided with coordinate system setting device
CN106097348B (en) * 2016-06-13 2019-03-05 大连理工大学 A kind of fusion method of three-dimensional laser point cloud and two dimensional image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021137421A1 (en) * 2020-01-02 2021-07-08 송해붕 Method for manufacturing embroidery pattern or quilting pattern in fabric for vehicle interior material

Also Published As

Publication number Publication date
CN109211126A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
US11544874B2 (en) System and method for calibration of machine vision cameras along at least three discrete planes
TWI672206B (en) Method and apparatus of non-contact tool center point calibration for a mechanical arm, and a mechanical arm system with said calibration function
CN101946117B (en) Light projection device and illumination device
CN103838437B (en) Touch positioning control method based on projection image
US8612046B2 (en) Sewing machine and non-transitory computer-readable storage medium storing sewing machine control program
US8738173B2 (en) Sewing machine and non-transitory computer-readable storage medium storing sewing machine control program
US10380764B2 (en) System and method for performing vision system planar hand-eye calibration from straight line features
JP2013002956A (en) Image processing device, image processing method, and program
CN107431788A (en) The alignment of the pallet based on image and tube seat positioning in vision system
JP2019012040A (en) Control device and control method
JPWO2009150721A1 (en) Method and apparatus for creating electronic component mounting data
CN110446905A (en) Position detecting device and method for detecting position
CN109715307A (en) Bending machine with workspace image capture device and the method for indicating workspace
TW201447468A (en) Panorama photographing method
JP2019177099A (en) Cloth conveyance system and cloth conveyance method
JP2013228232A (en) Substrate appearance inspection method
JP2019132731A (en) Position specifying device and position specifying method
JP2013218423A (en) Directional video control device and method
JP2007095764A (en) Image recognition apparatus and image recognition method
JP2019012039A (en) Detection device and detection method
JP6202875B2 (en) Image measuring apparatus and control program therefor
JP7090219B2 (en) Positioning method and position specifying device
JP2018171342A (en) Master image generation system and sewing system
JP2018171341A (en) Sewing system
JP7019065B2 (en) Production optimization system for component mounting line