JP2014030496A - Method for detecting button direction, device for detecting button direction, and device for feeding button - Google Patents

Method for detecting button direction, device for detecting button direction, and device for feeding button Download PDF

Info

Publication number
JP2014030496A
JP2014030496A JP2012171365A JP2012171365A JP2014030496A JP 2014030496 A JP2014030496 A JP 2014030496A JP 2012171365 A JP2012171365 A JP 2012171365A JP 2012171365 A JP2012171365 A JP 2012171365A JP 2014030496 A JP2014030496 A JP 2014030496A
Authority
JP
Japan
Prior art keywords
button
hole
image
detection target
logo
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.)
Granted
Application number
JP2012171365A
Other languages
Japanese (ja)
Other versions
JP6059900B2 (en
Inventor
Kimiko Higa
公子 比嘉
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.)
Juki Corp
Original Assignee
Juki Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Juki Corp filed Critical Juki Corp
Priority to JP2012171365A priority Critical patent/JP6059900B2/en
Publication of JP2014030496A publication Critical patent/JP2014030496A/en
Application granted granted Critical
Publication of JP6059900B2 publication Critical patent/JP6059900B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Sewing Machines And Sewing (AREA)

Abstract

PROBLEM TO BE SOLVED: To detect a button direction (an angle around an axis perpendicular to a front and back surface) from a front surface image of the button with high accuracy and with high efficiency.SOLUTION: Upon the calculation of a relative angle of a detection-objective button to a normal button direction by an image-processing device, if detecting a normal button direction on the basis of a front surface image of a sample button which indicates the normal button direction, specifying the arrangement of a button hole and the rotation symmetry of a logo and obtaining logo characteristics, specifying a position of the button hole from the front surface image of the detection-objective button, calculating a button hole deviation angle to a normal button direction, and specifying which is the highest in degree of correlation when comparing with logo characteristics respectively as for an image in which a position of the button hole of the detection-objective button is made to agree with the normal button direction by rotating by an amount of button hole deviation angle and an image further rotated from there by an amount of relative angle of a rotationally asymmetrical mutual direction, an angle θb which is obtained by adding a rotational angle θm to a button hole deviation angle concerning that is output as a button direction of the detection-objective button.

Description

本発明は、縫製物に縫い付けられるボタンの表裏面に垂直な軸まわりの角度により規定されるボタン方向を検出するボタン方向検出方法及びボタン方向検出装置に関する。   The present invention relates to a button direction detection method and a button direction detection device for detecting a button direction defined by an angle about an axis perpendicular to the front and back surfaces of a button sewn on a sewing product.

縫製分野においては、例えば特許文献1に記載されるように、縫製物にボタンを縫い付けるボタン付けミシンに対してボタンを供給する搬送機構を備えたボタンの供給装置が知られている。
さらには、特許文献2,3,4には、ボタン供給装置にカメラや照明、画像処理装置などを取り付けて、ボタンの表裏判別や穴位置検出を画像処理で行う技術が記載されている。
また、縫製以外の分野において、円状物にリング状に配された文字やラベルの検出やその配置から円状物の方向検出を画像認識で行う手法は多分野で提案されている。
例えば、特許文献5の「光学ディスクのドット文字識別記号認識方法」や、特許文献6の「光学ディスクの識別記号認識方法」にあっては、光ディスク上に配された文字の検出を行い、特許文献7の「缶蓋の製造装置」は、缶蓋に印刷された図柄位置により缶向きを検出する。
In the sewing field, as described in Patent Document 1, for example, a button supply device including a transport mechanism that supplies a button to a button sewing machine that sews a button to a sewing product is known.
Furthermore, Patent Documents 2, 3, and 4 describe a technique in which a button, a camera, illumination, an image processing device, and the like are attached to a button supply device, and button front / back discrimination and hole position detection are performed by image processing.
Further, in fields other than sewing, a technique for detecting characters and labels arranged in a ring shape on a circular object and detecting the direction of the circular object from its arrangement by image recognition has been proposed in many fields.
For example, in the “dot recognition character recognition method for optical discs” in Patent Document 5 and the “identification symbol recognition method for optical discs” in Patent Literature 6, characters placed on the optical disk are detected, The “can lid manufacturing apparatus” in Document 7 detects the direction of the can from the position of the symbol printed on the can lid.

特許第2659439号公報Japanese Patent No. 2659439 特開2010−78562号公報JP 2010-78562 A 特開2010−104569号公報JP 2010-104569 A 特開2010−131178号公報JP 2010-131178 A 特許第3249314号公報Japanese Patent No. 3249314 特許第3258828号公報Japanese Patent No. 3258828 特許第3843228号公報Japanese Patent No. 3844228

しかし、従来のボタン供給装置には、ボタン表裏を判別する機能や縫製時の針落ち位置とボタン穴位置が一致するように供給する機能はあるが、ボタンのロゴ位置を感知してボタン向きを縫製方向に合わせて供給する機能は付いていなかった。その為、ロゴ入りボタンの縫製方向を揃えたい場合は、ボタン供給装置を介さずにミシン操作者が直接ボタン方向を目視で判断し縫製位置にセットしていた。
そのため、カメラや画像処理装置を取り付けたボタン供給装置で、表裏判別や穴位置検出と同時にボタン方向を検出する機能が求められている。
ボタンのロゴの配置形態は様々で、ロゴが円周上の一部に存在するもの(図22(a)(b)(c))もあれば、全円周上に存在するもの(図22(d)(e)(f))もある。また同じロゴが回転対称配置になっているもの(図22(c) (d))、対称性の全くないもの(図22(a)(b)(e))、回転対称配置の中に一部だけ非対称配置のものが混在するもの(図22(f))などがある。ボタンの対称性や方向性はこれらロゴ配置形態だけでなく穴配置との組合せで決まる。
すなわち、ボタン縫製においてはミシン針が上下動して貫通する複数のボタン穴を所定の角度で縫製物に対して降下させること、および、ボタン上のロゴや模様の向きを所定の角度にすること、などが要求されるものの、先に挙げた縫製以外の分野における円状物でリング状に配置された文字やラベルの認識技術では、ボタン穴とロゴとの位置関係あるいはロゴの対称性を考慮した方向検出処理が行えない。
However, the conventional button supply device has a function to distinguish the front and back of the button and a function to supply so that the needle entry position at the time of sewing matches the button hole position. There was no function to supply according to the sewing direction. Therefore, when it is desired to align the sewing direction of the button with the logo, the sewing machine operator directly determines the button direction visually and sets it at the sewing position without using the button supply device.
For this reason, there is a need for a button supply device equipped with a camera and an image processing device to detect the button direction simultaneously with front / back discrimination and hole position detection.
Button logos can be arranged in various forms. Some logos exist on a part of the circumference (FIGS. 22 (a) (b) (c)), while others exist on the whole circumference (FIG. 22). (d) (e) (f)). Also, the same logo is in a rotationally symmetric arrangement (Fig. 22 (c) (d)), there is no symmetry (Fig. 22 (a) (b) (e)), Some of them have asymmetrical arrangements (FIG. 22 (f)). The symmetry and direction of the buttons are determined not only by the logo layout but also by the combination with the hole layout.
That is, in button sewing, a plurality of button holes through which the sewing needle moves up and down is lowered with respect to the sewing product at a predetermined angle, and the direction of the logo or pattern on the button is set to a predetermined angle. , Etc. are required, but the recognition technology for the letters and labels arranged in a ring shape in a circular shape other than the sewing mentioned above considers the positional relationship between the button hole and the logo or the symmetry of the logo. Direction detection processing cannot be performed.

そこで本発明は、縫製物に縫い付けられるボタンの表裏面に垂直な軸まわりの角度により規定されるボタン方向を検出するボタン方向検出方法及びボタン方向検出装置において、ボタン穴とロゴとの位置関係或いはロゴの対称性を考慮して、ボタンの表面画像からそのボタン方向を高精度かつ高効率に検出することを目的とする。   Accordingly, the present invention relates to a button direction detection method and a button direction detection device for detecting a button direction defined by an angle about an axis perpendicular to the front and back surfaces of a button sewn on a sewing product, and a positional relationship between a button hole and a logo. Alternatively, in consideration of the symmetry of the logo, the object is to detect the button direction from the surface image of the button with high accuracy and high efficiency.

請求項1に記載の発明は、縫製物に縫い付けられるボタンの表裏面に垂直な軸まわりの角度により規定されるボタン方向を検出するボタン方向検出方法において、
画像処理装置が、正規のボタン方向に対してボタン方向検出の対象となる検出対象ボタンの相対角を検出対象ボタンのボタン方向として算出するにあたり、
(1)ボタン穴及びロゴを有し正規のボタン方向を教示するように供されたサンプルボタンの表面画像を取得し、
(2)サンプルボタンの表面画像に基づき、正規のボタン方向を検出し、正規のボタン方向におけるボタン穴の配置と、ボタン穴の配置を保ちつつ前記軸まわりに回転させたときのロゴの回転対称性を特定するとともに、正規のボタン方向におけるロゴ特徴を取得しておき、
(3)検出対象ボタンの表面画像を取得し、
(4)検出対象ボタンの表面画像から検出対象ボタンのボタン穴の位置を特定し、
(5)検出対象ボタンのボタン穴の正規のボタン方向におけるボタン穴に対するボタン穴ずれ角を算出し、
(6)前記回転対称性が全方位相互回転対称である場合(例えば図22(d))に、検出対象ボタンの表面画像を前記ボタン穴ずれ角分回転させて検出対象ボタンのボタン穴の位置を正規のボタン方向におけるボタン穴の位置に一致させた画像について、前記ロゴ特徴と比較したときの相関度を算出し所定のしきい値を超えれば前記ボタン穴ずれ角を、検出対象ボタンのボタン方向として出力し、
(7)前記回転対称性が非回転対称の相互方位を有するものである場合に、検出対象ボタンの表面画像を前記ボタン穴ずれ角分回転させて検出対象ボタンのボタン穴の位置を正規のボタン方向におけるボタン穴の位置に一致させた画像と、さらにそこから非回転対称の相互方位の相対角(例えば図22(a)で90°、180°、270°、図22(c)で90°)分だけ回転させたときの画像のそれぞれについて、前記ロゴ特徴と比較したときの相関度を算出し所定のしきい値を超えるものが1つに特定されれば、それについて前記ボタン穴ずれ角分回転させた状態からの回転角を前記ボタン穴ずれ角に加えた角度を、検出対象ボタンのボタン方向として出力することを特徴とする。
The invention according to claim 1 is a button direction detection method for detecting a button direction defined by an angle about an axis perpendicular to the front and back surfaces of a button sewn on a sewing product.
When the image processing apparatus calculates the relative angle of the detection target button as the target of the button direction detection with respect to the normal button direction as the button direction of the detection target button,
(1) Obtain a surface image of a sample button that has a button hole and a logo and is provided to teach the normal button direction;
(2) Based on the surface image of the sample button, the normal button direction is detected, the button hole arrangement in the normal button direction, and the rotational symmetry of the logo when rotated around the axis while maintaining the button hole arrangement In addition to specifying the gender, get the logo features in the normal button direction,
(3) Obtain a surface image of the detection target button,
(4) Identify the position of the button hole of the detection target button from the surface image of the detection target button,
(5) Calculate the button hole deviation angle with respect to the button hole in the normal button direction of the button hole of the detection target button,
(6) When the rotational symmetry is omnidirectional mutual rotational symmetry (for example, FIG. 22 (d)), the surface image of the detection target button is rotated by the button hole shift angle to determine the position of the button hole of the detection target button. For the image in which the position of the button hole in the normal button direction is matched, the degree of correlation when calculating the degree of correlation when compared with the logo feature and exceeding a predetermined threshold value, the button hole deviation angle is determined. Output as direction,
(7) When the rotational symmetry has a non-rotational symmetry mutual orientation, the surface image of the detection target button is rotated by the button hole misalignment angle, and the position of the button hole of the detection target button is determined as a regular button. Image aligned with the position of the buttonhole in the direction, and relative rotationally symmetric relative angles (for example, 90 °, 180 °, 270 ° in FIG. 22A, 90 ° in FIG. 22C) ) For each of the images rotated by an amount corresponding to the logo feature, the degree of correlation when compared with the logo feature is calculated. An angle obtained by adding a rotation angle from a state of being rotated by a minute amount to the button hole deviation angle is output as a button direction of the detection target button.

請求項2に記載の発明は、請求項1に記載のボタン方向検出方法において、
サンプルボタンの表面画像を、ボタン中心を中心としてボタン穴の数と同数の角度範囲に分割した分割領域に分け、異なる分割領域を相互に比較したときの相関度に基づき、ボタン中心を回転中心とした回転対称性を判別することにより前記(2)のロゴの回転対称性の特定を行うことを特徴とする。
The invention according to claim 2 is the button direction detection method according to claim 1,
The surface image of the sample button is divided into divided areas divided into the same number of angle ranges as the number of button holes around the button center, and based on the degree of correlation when different divided areas are compared with each other, the button center is set as the center of rotation. The rotational symmetry of the logo of (2) is specified by discriminating the rotational symmetry.

請求項3に記載の発明は、請求項2に記載のボタン方向検出方法において、
サンプルボタンの表面画像を、ボタン中心を中心とした円周方向に沿って微分してエッジ成分を抽出し、エッジ量が最大となる径区間を特定し、前記分割領域を当該径区間内に限定して相関度を算出することを特徴とする。
The invention according to claim 3 is the button direction detection method according to claim 2,
The edge image is extracted by differentiating the surface image of the sample button along the circumferential direction around the center of the button, the diameter section where the edge amount is maximum is specified, and the divided area is limited to the diameter section. And calculating the degree of correlation.

請求項4に記載の発明は、請求項2又は請求項3に記載のボタン方向検出方法において、
前記分割領域を極座標変換した上で比較して相関度を算出することを特徴とする。
The invention according to claim 4 is the button direction detection method according to claim 2 or claim 3, wherein
The degree of correlation is calculated by performing a polar coordinate conversion on the divided areas and comparing the divided areas.

請求項5に記載の発明は、請求項1に記載のボタン方向検出方法において、
サンプルボタンの表面画像を、ボタン中心を中心とした円周方向に沿って微分してエッジ成分を抽出し、エッジ量が最大となる径区間を特定し、当該径区間の画像から前記(2)のロゴ特徴を取得することを特徴とする。
The invention according to claim 5 is the button direction detection method according to claim 1,
The edge image is extracted by differentiating the surface image of the sample button along the circumferential direction around the center of the button, the diameter section in which the edge amount is maximum is specified, and the above (2) It is characterized by acquiring the logo feature of.

請求項6に記載の発明は、請求項5に記載のボタン方向検出方法において、
前記ロゴ特徴を、ボタン中心を中心として極座標変換して記憶し、
前記(6)(7)において、検出対象ボタンの表面画像の前記ロゴ特徴と比較する画像領域を極座標変換した上で相関度を算出することを特徴とする。
A sixth aspect of the present invention provides the button direction detecting method according to the fifth aspect,
The logo feature is memorized by converting polar coordinates around the center of the button,
In (6) and (7), the degree of correlation is calculated after performing polar coordinate conversion on an image region to be compared with the logo feature of the surface image of the detection target button.

請求項7に記載の発明は、請求項1に記載のボタン方向検出方法において、
前記(1)のサンプルボタンの表面画像の取得を、サンプルボタンの表面を所定の照明で照明してカメラで撮像することにより行い、
前記(3)の検出対象ボタンの表面画像の取得を、検出対象ボタンの表面を前記所定の照明で照明して前記カメラで撮像することにより行うことを特徴とする。
The invention according to claim 7 is the button direction detection method according to claim 1,
The acquisition of the surface image of the sample button of (1) is performed by illuminating the surface of the sample button with a predetermined illumination and capturing it with a camera,
The surface image of the detection target button in (3) is acquired by illuminating the surface of the detection target button with the predetermined illumination and capturing the image with the camera.

請求項8に記載の発明は、請求項1に記載のボタン方向検出方法において、
サンプルボタンの表面画像に基づき、サンプルボタンのボタン穴、ボタン外径を検出し、検出対象ボタンの表面画像に基づき、検出対象ボタンのボタン穴、ボタン外径を検出し、サンプルボタンのボタン穴、ボタン外径と検出対象ボタンのボタン穴、ボタン外径とを比較して異なる場合に、異常を示す情報を出力してボタン方向検出を中断することを特徴とする。
The invention according to claim 8 is the button direction detection method according to claim 1,
Based on the surface image of the sample button, the button hole of the sample button and the button outer diameter are detected. Based on the surface image of the detection target button, the button hole of the detection target button and the button outer diameter are detected. When the button outer diameter is different from the button hole of the detection target button and the button outer diameter, information indicating an abnormality is output and button direction detection is interrupted.

請求項9に記載の発明は、請求項1に記載のボタン方向検出方法において、
前記(6)において所定のしきい値を超えることがない場合、及び前記(7)において所定のしきい値を超えるものが1つに特定されない場合に、異常を示す情報を出力してボタン方向検出を中断することを特徴とする。
The invention according to claim 9 is the button direction detection method according to claim 1,
When the predetermined threshold value is not exceeded in (6) and when no one exceeding the predetermined threshold value is specified in (7), information indicating an abnormality is output and the button direction is output. The detection is interrupted.

請求項10に記載の発明は、請求項1に記載のボタン方向検出方法を実行するボタン方向検出装置であって、
照明装置と、カメラと、画像処理装置とを備え、
前記画像処理装置は、
前記照明装置で照明され前記カメラで撮像されたサンプルボタンの表面画像が入力されて前記(2)を実行し、
前記照明装置で照明され前記カメラで撮像された検出対象ボタンの表面画像が入力されて前記(4)から(7)を実行することを特徴とする。
The invention according to claim 10 is a button direction detection device for executing the button direction detection method according to claim 1,
An illumination device, a camera, and an image processing device;
The image processing apparatus includes:
The surface image of the sample button illuminated by the illumination device and imaged by the camera is input, and the above (2) is executed.
(4) to (7) are executed by inputting a surface image of a detection target button illuminated by the illumination device and imaged by the camera.

請求項11に記載の発明は、請求項10に記載のボタン方向検出装置と、ボタンを所定の供給位置に搬送する搬送機構とを備えるボタン供給装置において、
前記ボタン方向検出装置に前記搬送機構によって搬送されるボタンのボタン方向の検出を行わせることを特徴とする。
Invention of Claim 11 is a button supply apparatus provided with the button direction detection apparatus of Claim 10, and the conveyance mechanism which conveys a button to a predetermined supply position,
The button direction detection device may be configured to detect a button direction of a button conveyed by the conveyance mechanism.

請求項12に記載の発明は、請求項11に記載のボタン供給装置において、
前記画像処理装置が、サンプルボタンの表面画像に基づき、サンプルボタンのボタン穴、ボタン外径を検出し、検出対象ボタンの表面画像に基づき、検出対象ボタンのボタン穴、ボタン外径を検出し、サンプルボタンのボタン穴、ボタン外径と検出対象ボタンのボタン穴、ボタン外径とを比較して異なる場合に、当該検出対象ボタンを前記搬送機構の前記所定の供給位置への搬送経路から排除する機構を有することを特徴とする。
The invention according to claim 12 is the button supply device according to claim 11,
The image processing device detects the button hole and button outer diameter of the sample button based on the surface image of the sample button, detects the button hole and button outer diameter of the detection target button based on the surface image of the detection target button, When the button hole and button outer diameter of the sample button are different from the button hole and button outer diameter of the detection target button, the detection target button is excluded from the transport path to the predetermined supply position of the transport mechanism. It has a mechanism.

請求項13に記載の発明は、請求項11に記載のボタン供給装置において、
前記(6)において所定のしきい値を超えることがない場合、及び前記(7)において所定のしきい値を超えるものが1つに特定されない場合に、当該検出対象ボタンを前記搬送機構の前記所定の供給位置への搬送経路から排除する機構を有することを特徴とする。
The invention according to claim 13 is the button supply device according to claim 11,
When the predetermined threshold value is not exceeded in (6), and when one that exceeds the predetermined threshold value is not specified in (7), the button to be detected is moved to the transport mechanism. It has a mechanism for excluding from the transport path to a predetermined supply position.

請求項1に記載の発明によれば、正規のボタン方向に対してボタン方向検出の対象となる検出対象ボタンの相対角を検出対象ボタンのボタン方向として算出するにあたり、撮像されたサンプルボタンの表面画像に基づき、正規のボタン方向を検出し、正規のボタン方向におけるボタン穴の配置と、ボタン穴の配置を保ちつつ軸まわりに回転させたときのロゴの回転対称性を特定するとともに、正規のボタン方向におけるロゴ特徴を取得しておき、後に撮像された検出対象ボタンの表面画像に基づき、まずはボタン穴の相対性によりボタン穴ずれ角を算出し、回転対称性の内容に応じて必要な回転角だけ回転させつつロゴ特徴と比較することで、高精度かつ高効率に検出対象ボタンのボタン方向を検出することができる。よって、縫製物に対して、ボタン穴およびボタン上のロゴや模様を所定の角度にして縫いつけることが可能になる。   According to the first aspect of the present invention, when calculating the relative angle of the detection target button as the button direction detection target with respect to the normal button direction as the button direction of the detection target button, the surface of the imaged sample button Based on the image, the normal button direction is detected, the button hole arrangement in the normal button direction and the rotational symmetry of the logo when rotated around the axis while maintaining the button hole arrangement are specified, and After acquiring the logo characteristics in the button direction, based on the surface image of the button to be detected that was captured later, first calculate the button hole misalignment angle by the relativity of the button holes, and rotate as necessary according to the contents of the rotational symmetry By comparing with the logo feature while rotating only the corner, the button direction of the detection target button can be detected with high accuracy and high efficiency. Therefore, it is possible to sew the buttonhole and the logo or pattern on the button at a predetermined angle with respect to the sewing product.

請求項2に記載の発明によれば、ボタン中心を中心としてボタン穴の数と同数の角度範囲に分割した分割領域に分け、異なる分割領域を相互に比較するので、画像処理上の効率も高く、確実に回転対称性を判別することができる。   According to the second aspect of the present invention, the image is divided into divided regions divided into the same number of angle ranges as the number of button holes with the button center as the center, and different divided regions are compared with each other. Thus, rotational symmetry can be reliably determined.

請求項3に記載の発明によれば、ロゴの存在によってエッジ量が最大となる径区間を特定し、回転対称性を判別のための分割領域を当該径区間内に限定するので、ロゴの占有度が高くなり、画像処理上で効率よく高精度に回転対称性を判別することができる。   According to the invention described in claim 3, since the diameter section where the edge amount is maximum due to the presence of the logo is specified and the divided area for determining the rotational symmetry is limited to the diameter section, the logo is occupied. The degree of rotation becomes high, and rotational symmetry can be determined efficiently and accurately in image processing.

請求項4に記載の発明によれば、回転対称性を判別のための分割領域を極座標変換するので、計算が容易となる。   According to the fourth aspect of the present invention, since the divided area for determining the rotational symmetry is subjected to polar coordinate conversion, the calculation becomes easy.

請求項5に記載の発明によれば、ロゴの存在によってエッジ量が最大となる径区間を特定し、当該径区間の画像からロゴ特徴を取得するので、ロゴの占有度が高くなり、効率よく高精度にボタン方向を検出することができる。   According to the invention described in claim 5, since the diameter section where the edge amount is maximum due to the presence of the logo is specified and the logo feature is acquired from the image of the diameter section, the degree of logo occupancy is increased and the efficiency is improved. The button direction can be detected with high accuracy.

請求項6に記載の発明によれば、ロゴ特徴及びこれと比較する画像を極座標変換するので、計算が容易となる。   According to the sixth aspect of the present invention, since the logo feature and the image to be compared with this are subjected to polar coordinate conversion, the calculation becomes easy.

請求項7又は10に記載の発明によれば、サンプルボタンの表面画像及び検出対象ボタンの表面画像の撮像条件を一定させることができ、撮像条件の相違に起因する検出誤差を低減できる。   According to the invention described in claim 7 or 10, the imaging conditions of the surface image of the sample button and the surface image of the detection target button can be made constant, and the detection error due to the difference in imaging conditions can be reduced.

請求項8に記載の発明によれば、ボタンの穴や外径に代表されるボタンの外形の違いによって、異常を検出してボタン方向検出を中断し、その検出対象ボタンのロゴを比較するなどの無駄な処理を回避することができ、必要により異常を報知したり、請求項12に記載の発明のように所定の供給位置にボタンが供給されないようにボタンを排除したりすることができる。   According to the invention described in claim 8, the button direction detection is interrupted by detecting the abnormality due to the difference in the button outer shape represented by the button hole and the outer diameter, and the logo of the detection target button is compared. The useless processing can be avoided, the abnormality can be notified if necessary, and the button can be excluded so that the button is not supplied to the predetermined supply position as in the invention described in claim 12.

請求項9に記載の発明によれば、ロゴを比較して一定の同一性信頼度が得られない場合に、異常として検出してボタン方向検出を中断し、その検出対象ボタンのボタン方向を算出し出力するなど無駄な処理を回避することができ、必要により異常を報知したり、請求項13に記載の発明のように所定の供給位置にボタンが供給されないようにボタンを排除したりすることができる。   According to the ninth aspect of the present invention, when a certain degree of identity reliability cannot be obtained by comparing logos, the button direction detection is interrupted and detected as an abnormality, and the button direction of the detection target button is calculated. And wasteful processing such as output can be avoided, an abnormality is notified if necessary, or the button is excluded so that the button is not supplied to a predetermined supply position as in the invention of claim 13. Can do.

請求項11に記載の発明によれば、ボタン供給装置の搬送機構によって搬送されるボタンのボタン方向を検出することができ、検出されたボタン方向に基づきボタン方向を補正するなどの制御手段を構成することができる。   According to the eleventh aspect of the present invention, it is possible to detect the button direction of the button conveyed by the conveyance mechanism of the button supply device, and to configure the control means such as correcting the button direction based on the detected button direction. can do.

本発明の一実施形態に係るボタン方向検出装置の構成ブロック図である。1 is a configuration block diagram of a button direction detection device according to an embodiment of the present invention. 本発明の一実施形態に係るボタン供給装置の平面図である。It is a top view of the button supply apparatus concerning one embodiment of the present invention. 本発明の一実施形態に係るボタン供給装置の正面図(a)及び部分正面図(b)である。It is the front view (a) and partial front view (b) of the button supply apparatus which concern on one Embodiment of this invention. 本発明の一実施形態におけるティーチング処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the teaching process in one Embodiment of this invention. ボタンと背景とが高コントラストである例を示すボタン画像模式図である。It is a button image schematic diagram showing an example in which a button and a background have high contrast. 本発明の一実施形態におけるボタンの外形検出を説明するためのボタン画像模式図である。It is a button image schematic diagram for demonstrating the external shape detection of the button in one Embodiment of this invention. 本発明の一実施形態におけるボタン穴の検出を説明するためのボタン穴部画像模式図である。It is a buttonhole part image schematic diagram for demonstrating the detection of the buttonhole in one Embodiment of this invention. 本発明の一実施形態においてボタン穴探索のために変更される走査線の方向を示す図である。It is a figure which shows the direction of the scanning line changed for buttonhole search in one Embodiment of this invention. 本発明の一実施形態におけるボタン穴の検出を説明するためのボタン穴部画像模式図で、(a)は2つ穴ボタンのものを、(b)は3つ穴ボタンのものを、(c)は4つ穴ボタンのものを示す。FIG. 5 is a schematic diagram of a button hole image for explaining detection of a button hole in an embodiment of the present invention, where (a) shows a two-hole button, (b) shows a three-hole button, (c ) Indicates a four-hole button. (a)は本発明の一実施形態におけるボタン付けミシンが縫製可能な穴配置パターンを示す穴配置図であり、(b)はティーチング処理で撮像されたサンプルボタンの穴配置図である。(a) is a hole arrangement | positioning figure which shows the hole arrangement | positioning pattern which the sewing machine with a button in one Embodiment of this invention can sew, (b) is a hole arrangement | positioning figure of the sample button imaged by teaching process. 本発明の一実施形態において、撮像したボタンの表面画像の模式図(a)と、これを極座標変換した画像の模式図(b)である。In one Embodiment of this invention, it is the schematic diagram (a) of the surface image of the imaged button, and the schematic diagram (b) of the image which carried out the polar coordinate conversion of this. 本発明の一実施形態において、撮像したボタンの表面画像を極座標変換した画像の一例(a)、さらに水平方向(極座標変換前の円周方向)のエッジ成分を抽出した画像(b)、半径方向位置に対するエッジ量分布図(c)である。In one embodiment of the present invention, an example of an image obtained by polar-coordinate conversion of a surface image of a captured button (a), an image (b) obtained by extracting edge components in the horizontal direction (circumferential direction before polar coordinate conversion), and radial direction It is an edge amount distribution diagram (c) with respect to the position. 本発明の一実施形態において、極座標変換画像をロゴ存在径区間に限定してボタン穴数分に分割した様子と示す模式図であり、(a)は2つ穴ボタンのものを、(b)は3つ穴ボタンのものを、(c)は4つ穴ボタンのものを示す。In one Embodiment of this invention, it is a schematic diagram which shows that a polar coordinate conversion image is limited to a logo presence diameter area, and is divided | segmented into the number of button holes, (a) is a thing of a two-hole button, (b) Shows a three-hole button and (c) shows a four-hole button. 図13(c)の例を対象に、ロゴ特徴の抽出対象領域を特定した様子と示す模式図である。FIG. 14 is a schematic diagram showing that a logo feature extraction target area is specified for the example of FIG. 本発明の一実施形態におけるボタン方向検出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the button direction detection process in one Embodiment of this invention. 本発明の一実施形態において、(a)はサンプルボタンの教示に基づき登録された穴配置パターンの例を示すボタン穴模式図、(b)は検出対象ボタン表面とそのボタン穴に合わせた仮座標軸とを描いた模式図、(c)は(b)のロゴ存在径区間を極座標変換した模式図である。In one embodiment of the present invention, (a) is a schematic diagram of a button hole showing an example of a hole arrangement pattern registered based on the teaching of a sample button, and (b) is a provisional coordinate axis that matches the button surface to be detected and the button hole. (C) is a schematic diagram obtained by polar-coordinate conversion of the logo existing diameter section of (b). 本発明の一実施形態において仮座標軸の候補を示すボタン表面模式図(a)(b)(c)(d)である。FIG. 5 is schematic button surface diagrams (a), (b), (c), and (d) showing candidates for temporary coordinate axes in an embodiment of the present invention. 本発明の一実施形態において、(a)は正規のボタン方向に配置されたボタン表面の一例の模式図、(b)は検出対象ボタン表面とそのボタン穴に合わせた仮座標軸とを描いた模式図、(c1)は(a)を(b)の座標に合わせて回転させた図、(c1) を時計回りに90度ずつ回転させた図(c2),(c3),(c4)である。In one embodiment of the present invention, (a) is a schematic diagram of an example of a button surface arranged in a normal button direction, (b) is a schematic diagram depicting a detection target button surface and a provisional coordinate axis aligned with the button hole. Fig. (C1) is a diagram in which (a) is rotated according to the coordinates of (b), and (c1) is a diagram in which (c1) is rotated 90 degrees clockwise (c2), (c3), (c4) . 本発明の一実施形態におけるロゴ角度探索を説明するための極座標変換画像模式図で、(a)は検出対象ボタンに基づくものであり、(b)〜(e)はサンプルボタンに基づく比較照合のためのテンプレートで(b)から順に90度ずらしたものである。It is a polar coordinate conversion image schematic diagram for explaining the logo angle search in one embodiment of the present invention, (a) is based on the detection target button, (b) ~ (e) of the comparison verification based on the sample button This is a template for shifting by 90 degrees in order from (b). 本発明の一実施形態におけるロゴ角度探索を説明するための極座標変換画像模式図で、ロゴが180度回転対称の4つ穴ボタンの場合を示し、(a)は検出対象ボタンに基づくものであり、(b)(c)はサンプルボタンに基づく比較照合のためのテンプレートで(b)から90度ずらしたものが(c)である。In the polar coordinate conversion image schematic diagram for explaining the logo angle search in one embodiment of the present invention, the logo is a 180-degree rotationally symmetric four-hole button, (a) is based on the detection target button , (B) and (c) are templates for comparison and collation based on the sample buttons, and (c) which is shifted by 90 degrees from (b). 本発明の一実施形態において、(a)は正規のボタン方向に配置されたボタン表面の一例の模式図、(b)は正規のボタン方向に対する検出対象ボタンのボタン方向を示す角度θbを図解した模式図である。In one embodiment of the present invention, (a) is a schematic diagram of an example of a button surface arranged in a normal button direction, and (b) illustrates an angle θb indicating the button direction of the detection target button with respect to the normal button direction. It is a schematic diagram. ボタン穴の外周表面部にロゴが形成された4つ穴ボタンの表面模式図である。It is the surface schematic diagram of the four-hole button by which the logo was formed in the outer peripheral surface part of a button hole.

以下に本発明の一実施形態につき図面を参照して説明する。以下は本発明の一実施形態であって本発明を限定するものではない。
本実施形態は、ボタン付けミシンにボタンを搬送する搬送機構を備えたボタン供給装置にボタン方向検出装置を装備したものである。
An embodiment of the present invention will be described below with reference to the drawings. The following is one embodiment of the present invention and does not limit the present invention.
In this embodiment, a button supply device equipped with a transport mechanism for transporting a button to a button sewing machine is equipped with a button direction detection device.

(ボタン方向検出装置の概要)
図1に本実施形態のボタン方向検出装置の構成が示される。図1において1はカメラ、2は照明装置、3は画像処理装置であり、画像処理装置3は、CPU3−1、メモリ3−2、通信ポート3−3等を備える。
通信ポート3−3によりボタン供給装置の制御部(不図示)とコマンドの送受信が可能であり、ボタン方向検出装置が通信ポート3−3を介してボタン供給装置の制御部から表裏判別の要求指示を受けたり、ボタン方向検出装置が通信ポート3−3を介してボタン供給装置の制御部にボタン方向検出結果を返却したりする。
カメラ1や照明装置2は画像処理装置3に接続され、ボタン供給装置から受けた指示をCPU3−1が判断しカメラ1へ撮像指示を出したり照明装置2の点灯時間を制御する。カメラ1で撮像された画像はメモリ3−2内に記憶される。
また、CPU3−1は、撮像された画像に基づき、後に説明する処理を実行する。
(Outline of the button direction detection device)
FIG. 1 shows the configuration of the button direction detection device of the present embodiment. In FIG. 1, 1 is a camera, 2 is an illumination device, 3 is an image processing device, and the image processing device 3 includes a CPU 3-1, a memory 3-2, a communication port 3-3, and the like.
A command can be transmitted to and received from a control unit (not shown) of the button supply device via the communication port 3-3, and the button direction detection device instructs the front / back discrimination request from the control unit of the button supply device via the communication port 3-3. Or the button direction detection device returns the button direction detection result to the control unit of the button supply device via the communication port 3-3.
The camera 1 and the illumination device 2 are connected to the image processing device 3, and the CPU 3-1 determines an instruction received from the button supply device, issues an imaging instruction to the camera 1, and controls the lighting time of the illumination device 2. An image captured by the camera 1 is stored in the memory 3-2.
In addition, the CPU 3-1 executes a process described later based on the captured image.

(ボタン供給装置の概要)
図2及び図3には、ボタン方向検出装置のカメラ1及び照明装置2が設置されたボタン供給装置が示される。以下に説明する機構は一例にすぎない。図2及び図3において13は円筒状のボタン供給部であり、その底面13aに収納されたボタンBを所定の微振動によって内壁面に形成された螺旋状の通路13bに沿って上昇させ搬出口13cから順次連続的に排出することができる。ボタン供給部13はボタン表裏判別機能を有する。
搬出口13cには稼動式のバー101が設置されており、通過ボタンが上面を裏としているとの判別結果である場合、ボタン供給装置の制御部は搬出口13cをバー101で塞ぎ、ボタンを底面13aに落下させる。
逆に上面を表としているとの判別結果である場合、ボタン供給装置の制御部は搬出口13cへガイドするようにバー101を配置し、ボタンを搬出口13cから排出する。
(Outline of the button supply device)
2 and 3 show a button supply device in which the camera 1 and the illumination device 2 of the button direction detection device are installed. The mechanism described below is only an example. 2 and 3, reference numeral 13 denotes a cylindrical button supply unit. The button B accommodated in the bottom surface 13 a is lifted along a spiral passage 13 b formed on the inner wall surface by a predetermined slight vibration, and a carry-out port is provided. It can discharge sequentially from 13c. The button supply unit 13 has a button front / back discrimination function.
When the operation type bar 101 is installed at the carry-out port 13c, and it is determined that the passing button is on the back side, the control unit of the button supply device closes the carry-out port 13c with the bar 101 and presses the button. Drop on the bottom surface 13a.
On the other hand, if the determination result is that the upper surface is the front, the control unit of the button supply device arranges the bar 101 so as to guide to the carry-out port 13c, and discharges the button from the carry-out port 13c.

搬出口13cから排出されたボタンは、ボタン回転搬送機構14のボタン保持部14aに受容されて、ボタン回転搬送機構14によって移動させられ、次のボタン回転搬送機構21のボタン保持部21aに受容され、ボタン回転搬送機構21によって旋回アーム28の先端の係止ピン28aの上部に配される。カメラ1及び照明装置2がその上方に設置されている。
係止ピン28a上部にボタンが供給されるとボタン供給装置の制御部が画像処理装置3に撮像要求を行う。画像処理装置3はカメラ1へ撮像要求を出し、撮像タイミングに合わせて照明装置2を点灯させボタン画像を撮像し、この画像から正規のボタン方向に対する角度を検出し、ボタン供給装置の制御部へ結果を送信する。ボタン供給装置の制御部は係止ピン28aの下部にあるモーター61で係止ピン28aをボタン穴位置に回転させてボタン穴に挿し込んだ後、ボタンを保持したままボタンが正規のボタン方向に配置されるようにボタンを回転させる。ボタンは旋回アーム28によってボタン挟持機構12bに受け渡され、縫製位置(不図示)に設置される。
The button discharged from the carry-out port 13 c is received by the button holding portion 14 a of the button rotation conveyance mechanism 14, moved by the button rotation conveyance mechanism 14, and received by the button holding portion 21 a of the next button rotation conveyance mechanism 21. The button rotation conveyance mechanism 21 is disposed on the top of the locking pin 28 a at the tip of the swivel arm 28. A camera 1 and a lighting device 2 are installed above the camera 1 and the lighting device 2.
When a button is supplied to the upper portion of the locking pin 28a, the control unit of the button supply device makes an image pickup request to the image processing device 3. The image processing device 3 issues an imaging request to the camera 1, lights up the illumination device 2 in accordance with the imaging timing, captures a button image, detects an angle with respect to the normal button direction from this image, and sends it to the control unit of the button supply device. Send the result. The control unit of the button supply device rotates the locking pin 28a to the button hole position by the motor 61 below the locking pin 28a and inserts it into the button hole. Then, the button is held in the normal button direction while holding the button. Rotate the button so that it is positioned. The button is transferred to the button holding mechanism 12b by the turning arm 28 and is set at a sewing position (not shown).

(ボタン方向の検出の詳細)
次に、画像によるボタン方向の検出方法及びボタン方向検出装置の処理内容の詳細について説明する。
ボタン方向の検出は、画像処理装置3が正規のボタン方向等を学習するティーチング処理と、ボタン供給装置の搬送機構によってボタン付けミシンへ搬送される過程でボタンを正規のボタン方向に揃えるためにそのボタンのボタン方向を検出するボタン方向検出処理とを実行することにより行う。ティーチング処理において撮像されるボタンは、ボタン穴及ロゴを有する特定のボタンから選ばれたサンプルボタンであり、撮像面はサンプルボタンの表面である。ティーチング処理を終えることで、特定のボタンのボタン方向検出が行えるようになる。
(Details of button direction detection)
Next, the details of the processing of the button direction detection method and the button direction detection device using an image will be described.
The button direction is detected by the teaching processing in which the image processing device 3 learns the normal button direction and the like so that the buttons are aligned in the normal button direction in the process of being transported to the button sewing machine by the transport mechanism of the button supply device. This is performed by executing button direction detection processing for detecting the button direction of the button. The button imaged in the teaching process is a sample button selected from a specific button having a buttonhole and a logo, and the imaging surface is the surface of the sample button. By completing the teaching process, the button direction of a specific button can be detected.

(ティーチング処理)
まず、ティーチング処理について説明する。ティーチング処理のフローチャートを図4に示す。
ステップS401において、画像形成装置3のCPU3−1は、サンプルボタンの表面を照明装置2に照明させつつカメラ1に撮像させてその表面画像を取得する。この時のサンプルボタンのボタン方向は縫製位置に縫製時の正規のボタン方向に供給されるように設置される。例えば図3のボタン供給装置であればボタン挟持機構12bにボタンを縫製時の正規のボタン方向にセットした状態を、旋回アーム28が係止ピン28aで保持し、そのままカメラ1の下部まで回転させることにより、カメラ1の撮像位置でのサンプルボタンのボタン方向が、縫製時に正しいボタン方向を実現するため正規のボタン方向となる。但し、配置誤差はあるので、後述するように画像処理により修正する。
撮像にあたっては、図5に示すようにボタンと背景とのコントラストを高めるため、例えば図3のボタン供給装置ではカメラ1による撮像においてボタンの背景となる旋回アーム28のボタン保持部などの部材をボタンの色によって黒色か白色かに切替えることが好ましい。
(Teaching process)
First, the teaching process will be described. A flowchart of the teaching process is shown in FIG.
In step S401, the CPU 3-1 of the image forming apparatus 3 causes the camera 1 to capture an image of the surface of the sample button while illuminating the surface of the sample button on the illumination device 2. The button direction of the sample button at this time is set to be supplied to the sewing button at the normal button direction at the time of sewing. For example, in the case of the button supply device of FIG. 3, the state where the button is set in the button holding mechanism 12b in the normal button direction at the time of sewing is held by the turning arm 28 with the locking pin 28a and rotated to the lower part of the camera 1 as it is. Thus, the button direction of the sample button at the imaging position of the camera 1 becomes a normal button direction in order to realize a correct button direction at the time of sewing. However, since there is an arrangement error, it is corrected by image processing as will be described later.
In imaging, in order to increase the contrast between the button and the background as shown in FIG. 5, for example, in the button supply device of FIG. It is preferable to switch the color to black or white depending on the color.

次に、ステップS402においてCPU3−1は、ボタン外径サイズLを算出する。
判別分析法など既知のしきい値取得手段によって背景とボタンの分離濃度を取得し、図5(a)に示すように背景濃度が分離濃度よりも低ければ、分離濃度より高い濃度を、図5(b)に示すように背景濃度が分離濃度よりも高ければ、分離濃度よりも低い濃度を上下左右それぞれの画像端から走査する。
そのように走査して図6に示すようにボタンの上端Y0、下端Y1、左端X0、右端X1を探索し、上下端距離YLと左右端距離XLの平均をボタン外径サイズLとする。
Next, in step S402, the CPU 3-1 calculates the button outer diameter size L.
The separation density of the background and the button is obtained by a known threshold value acquisition means such as a discriminant analysis method. If the background density is lower than the separation density as shown in FIG. If the background density is higher than the separation density as shown in (b), a density lower than the separation density is scanned from the upper, lower, left, and right image ends.
As shown in FIG. 6, the upper end Y0, the lower end Y1, the left end X0, and the right end X1 of the button are searched, and the average of the upper and lower end distance YL and the left and right end distance XL is set as the button outer diameter size L.

次に、ステップS403においてCPU3−1は、ボタンの仮中心位置を算出する。CPU3−1は、ステップS402で算出したボタン左右端、上下端それぞれの中点位置(cx, cy)をボタンの仮中心とする。   Next, in step S403, the CPU 3-1 calculates the temporary center position of the button. The CPU 3-1 uses the midpoint position (cx, cy) of each of the left and right ends and the upper and lower ends of the button calculated in step S 402 as the temporary center of the button.

次に、ステップS404においてCPU3−1は、ボタン穴の数や配置パターンを検出する。CPU3−1は、まずボタン中心(cx, cy)から外側に向かう放射状の任意位置の走査線上に背景(ボタン穴)が存在するかを探索する。
ボタン穴が見つかった場合は、図7に示すように走査線Ln0上でボタン穴とのエッジ位置Ep0,Ep1を検出し、さらにこの中点Mpを通り先の走査線Ln0と直交する別の走査線Ln1上を探索してボタン穴のエッジ位置Ep2,Ep3を検出する。検出した4つのエッジ点Ep0,Ep1,Ep2,Ep3を用いてボタンの中心位置Hcと穴径Hsを算出する。
中心からの走査で穴が見つからなかった場合は、図8に示すように初めの走査線Ln0に対して+90度、-90度、+45度、-45度、+22.5度、-22.5度、+67.5度、-67.5度と順次走査方向を変えて探索する。
1つ目のボタン穴(第1ボタン穴)が検出できた場合、2つ目のボタン穴探索は第1ボタン穴の中心とボタン中心(cx, cy)を結ぶ直線上を走査線としボタン中心(cx, cy)から第1ボタン穴の逆側に探索する。
見つからなかった場合は、ボタン中心(cx, cy)から第1ボタン穴の中心方向に対して±120度の相対角を有する方向に探索し第2、第3のボタン穴を探索する。これにより第2、第3のボタン穴が検出できた場合は、図9(a)に示すように3つ穴ボタンであると確定し、全てのボタン穴が検出されたこととなる。
第1ボタン穴の対角で第2ボタン穴が検出できた場合は、第1ボタン穴の±90度位置で第3、第4ボタンを探索する。第3、第4ボタン穴が検出できれば図9(b)に示すように4つ穴ボタンと確定し、第3、第4ボタン穴が検出できなければ図9(c)に示すように2つ穴ボタンと確定し、全てのボタン穴が検出されたこととなる。
Next, in step S404, the CPU 3-1 detects the number of button holes and the arrangement pattern. First, the CPU 3-1 searches for a background (button hole) on a scanning line at an arbitrary radial position outward from the button center (cx, cy).
When the button hole is found, as shown in FIG. 7, the edge positions Ep0 and Ep1 with the button hole are detected on the scanning line Ln0, and another scan that passes through the midpoint Mp and is orthogonal to the preceding scanning line Ln0. Search on the line Ln1 to detect the edge positions Ep2 and Ep3 of the button holes. The button center position Hc and hole diameter Hs are calculated using the detected four edge points Ep0, Ep1, Ep2, and Ep3.
If no hole is found by scanning from the center, +90 degrees, -90 degrees, +45 degrees, -45 degrees, +22.5 degrees, -22.5 degrees with respect to the first scanning line Ln0 as shown in FIG. , +67.5 degrees, -67.5 degrees and sequentially change the scanning direction.
If the first buttonhole (first buttonhole) is detected, the second buttonhole search uses the scan line as the line connecting the center of the first buttonhole and the center of the button (cx, cy), and the center of the button Search from (cx, cy) to the opposite side of the first buttonhole.
If not found, a search is made in a direction having a relative angle of ± 120 degrees with respect to the center direction of the first button hole from the button center (cx, cy), and the second and third button holes are searched. As a result, when the second and third button holes can be detected, it is determined that the button has three holes as shown in FIG. 9A, and all the button holes have been detected.
If the second button hole can be detected diagonally to the first button hole, the third and fourth buttons are searched at the ± 90 degree position of the first button hole. If the third and fourth button holes can be detected, it is determined that the button has four holes as shown in FIG. 9B, and if the third and fourth button holes cannot be detected, two buttons as shown in FIG. 9C. It is determined that the button is a hole button, and all the button holes have been detected.

次に、ステップS405においてCPU3−1は、ボタン中心の算出と、正規のボタン方向の修正のための傾き角αの算出を行う。ボタン中心は、(cx, cy)を原点とする平面座標においてステップS404で検出したボタン穴の位置座標の平均値とする。
画像処理装置3は、図10(a)に示すようなボタン付けミシンが縫製可能な穴配置パターンを予め記憶しており、これらの穴配置パターンとステップS404で検出したボタン穴の数や位置を照合して、ボタン穴の数が同じで最も配置角度の近い穴配置パターンを特定し、特定した穴配置パターンに対するステップS404で検出した穴配置の傾き角α(例えば図10(b)参照)を算出する。
ボタン挟持機構12bにサンプルボタンをセットした際に配置誤差が生じるおそれがあり、配置誤差が含まれたサンプルボタンのボタン方向をそのまま正規のボタン方向として扱う場合には、ボタン供給装置で供給されるボタンのボタン方向を検出して、正規のボタン方向に配置されるように回転させると、サンプルボタンと同じ配置が再現されて同じ配置誤差が生じることとなる。傾き角αを算出して傾き角αに基づく予めの相殺を行うことで、精度良くボタン方向を検出し、補正することができる。
Next, in step S405, the CPU 3-1 calculates the button center and the inclination angle α for correcting the normal button direction. The button center is the average value of the button hole position coordinates detected in step S404 in the plane coordinates having (cx, cy) as the origin.
The image processing apparatus 3 stores in advance hole arrangement patterns that can be sewn by the button sewing machine as shown in FIG. 10 (a), and the number and positions of these hole arrangement patterns and the button holes detected in step S404. Collation is performed to identify the hole arrangement pattern having the same number of button holes and the closest arrangement angle, and the inclination angle α of the hole arrangement detected in step S404 with respect to the identified hole arrangement pattern (see, for example, FIG. 10B). calculate.
When a sample button is set in the button clamping mechanism 12b, an arrangement error may occur. When the button direction of the sample button including the arrangement error is treated as a normal button direction as it is, it is supplied by the button supply device. When the button direction of the button is detected and rotated so as to be arranged in the normal button direction, the same arrangement as the sample button is reproduced and the same arrangement error occurs. By calculating the tilt angle α and performing pre-cancellation based on the tilt angle α, the button direction can be detected and corrected with high accuracy.

次に、ステップS406においてCPU3−1は、サンプルボタンの表面画像を極座標変換する。図11(a)に示すようにボタン中心からボタン半径(L/2)の範囲を360度に亘り変換する。角度の基点はステップS405で求めた傾き角αだけ進めた位置とする。これにより上述した傾き角αに基づく予めの相殺が完了する。得られた極座標変換画像が図11(b)に示される。
極座標変換画像は横軸を中心からの距離、縦軸を角度とするのが一般的だが、以降の処理効率から図11(b)に示すように横軸を角度(θ)、縦軸を中心からの距離(R)とする。
なお、図11(a)に示すようなXY座標系の元画像から図11(b)に示すような極座標画像(θR座標系画像)への変換は数式1、逆に極座標変換画像からXY座標系の元画像への変換は数式2で行うことができる。
Next, in step S406, the CPU 3-1 converts the surface image of the sample button into polar coordinates. As shown in FIG. 11A, the range from the button center to the button radius (L / 2) is converted over 360 degrees. The base point of the angle is a position advanced by the inclination angle α obtained in step S405. Thereby, the pre-cancellation based on the inclination angle α described above is completed. The obtained polar coordinate conversion image is shown in FIG.
In the polar coordinate conversion image, the horizontal axis is the distance from the center, and the vertical axis is the angle. However, from the following processing efficiency, the horizontal axis is the angle (θ) and the vertical axis is the center as shown in FIG. Distance (R) from
The conversion from the original image of the XY coordinate system as shown in FIG. 11A to the polar image (θR coordinate system image) as shown in FIG. The conversion to the original image of the system can be performed by Equation 2.

次に、ステップS407においてCPU3−1は、ロゴが存在する径区間を特定する。図12(a)のようにボタンの縁凹凸やマーブル模様などが写り込むことがある。そこでロゴ位置を的確に検出しやすくなるように極座標変換画像の水平方向(すなわち元画像上で円周方向)に沿って微分を0≦R≦L/2の範囲で行い図12(b)に示すように水平方向のエッジ成分だけを抽出する。次に図12(c)に示すように、このエッジ成分の各Rの値における総和を求める。ロゴが存在する区間では存在しない区間よりもエッジ量が増えることから、エッジ総和が最大となる径区間(図12(c)にrで表示)をロゴが存在する径区間として特定することができる。   Next, in step S407, the CPU 3-1 identifies a diameter section where the logo exists. As shown in FIG. 12 (a), button edge irregularities and marble patterns may appear. Therefore, differentiation is performed in the range of 0 ≦ R ≦ L / 2 along the horizontal direction of the polar coordinate conversion image (that is, the circumferential direction on the original image) so that the logo position can be easily detected accurately, as shown in FIG. As shown, only the edge component in the horizontal direction is extracted. Next, as shown in FIG. 12 (c), the sum of the R values of the edge components is obtained. In the section where the logo is present, the edge amount is increased as compared with the section where the logo is not present. Therefore, the diameter section where the sum of the edges is maximum (indicated by r in FIG. 12C) can be specified as the diameter section where the logo is present. .

次に、ステップS408においてCPU3−1は、ロゴの回転対称性を判別する。まず極座標変換画像上のロゴ存在径区間内に限定し、ボタン中心を中心としてボタン穴の数と同数の角度範囲に分割した分割領域に分ける。
2つ穴ボタンであれば、図13(a)に示すように180度毎に2分割した分割領域A1,A2に分け、3つ穴ボタンであれば、図13(b)に示すように120度毎に3分割した分割領域A3,A4,A5に分け、4つ穴ボタンであれば、図13(c)に示すように90度毎に4分割した分割領域A6,A7,A8,A9に分ける。
異なる分割領域を相互に比較したときの相関度に基づき、ボタン中心を回転中心とした回転対称性を判別する。相関度の高低の判定は画像処理装置3に記憶された相関判定しきい値を用いて判断する。例えば2つ穴であれば、2つの分割領域A1とA2の相関が高ければロゴは180度回転対称でボタン穴だけで方向を定めることができ、2つの分割領域A1とA2の相関が低ければボタン穴位置だけでは方向を定められない非対称ボタンだと分かる。
同様に3つ穴ボタンも3つの分割領域A3,A4,A5から選んだ2つの分割領域相互の相関が全て組合せ(A3−A4,A3−A5,A4−A5の3つの組合せとなる)で高相関であればボタン穴だけで方向決めができる120度回転対称、相関が低ければ非対称ボタンとなる。
4つ穴ボタンの場合は4つの分割領域A6,A7,A8,A9から選んだ2つの分割領域相互の相関が全て組合せ(6つの組合せとなる)で高ければ90度回転対称でボタン穴位置だけで方向を定めることができ、180度の位置関係にある2つの分割領域A6とA8の相関及び分割領域A7とA9の相関のみが高ければ180度回転対称でボタン穴だけでは方向検出できないが角度制御が半分で済み、これ以外の相関であれば非対称ロゴであることが分かる。
ここで相関算出手法は画像データ同士の正規化相関演算やエッジ成分を抽出してエッジ特徴の相関演算などを用いる。相関判定しきい値は相関算出手法を用いた同工程の過去の実験や検証で得られた経験値とする。
以上により、ボタン穴の配置を保ちつつ軸まわりに回転させたときのロゴの回転対称性を特定することができる。
Next, in step S408, the CPU 3-1 determines the rotational symmetry of the logo. First, it is limited to the logo existing diameter section on the polar coordinate conversion image, and is divided into divided areas divided into the same number of angle ranges as the number of button holes around the button center.
If it is a two-hole button, it is divided into divided areas A1 and A2 divided into two every 180 degrees as shown in FIG. 13A, and if it is a three-hole button, it is 120 as shown in FIG. 13B. If the button is divided into three divided areas A3, A4, and A5 divided every three degrees, and a four-hole button is used, the divided areas A6, A7, A8, and A9 divided into four divided every 90 degrees as shown in FIG. Divide.
Based on the degree of correlation when different divided areas are compared with each other, the rotational symmetry about the button center is determined. Whether the correlation level is high or low is determined using a correlation determination threshold value stored in the image processing apparatus 3. For example, in the case of two holes, if the correlation between the two divided areas A1 and A2 is high, the logo can be rotated 180 degrees and the direction can be determined by only the button hole. If the correlation between the two divided areas A1 and A2 is low, It turns out that it is an asymmetric button whose direction cannot be determined only by the button hole position.
Similarly, the three-hole button also has a high correlation between the two divided regions selected from the three divided regions A3, A4, and A5 (all three combinations of A3-A4, A3-A5, and A4-A5). If it is a correlation, it becomes a 120-degree rotational symmetry in which the direction can be determined only by a button hole, and if the correlation is low, it becomes an asymmetric button.
In the case of a four-hole button, if the correlation between the two divided areas selected from the four divided areas A6, A7, A8, and A9 is all combinations (six combinations), it is 90 degree rotationally symmetric and only the buttonhole position If only the correlation between the two divided areas A6 and A8 and the correlation between the divided areas A7 and A9 are high, the direction cannot be detected by the buttonhole alone. If the control is half, and the correlation is other than this, it can be seen that the logo is asymmetric.
Here, the correlation calculation method uses normalized correlation calculation between image data, edge component extraction, and edge feature correlation calculation. The correlation determination threshold value is an empirical value obtained in past experiments and verifications of the same process using the correlation calculation method.
As described above, it is possible to specify the rotational symmetry of the logo when rotated around the axis while maintaining the arrangement of the button holes.

次に、ステップS409においてCPU3−1は、ロゴ特徴を抽出する。ロゴ特徴の抽出対象領域としてはステップS408の分割領域そのものとしてもよいが、ロゴが局所的な場合はそれに合わせて一部分だけを抽出すると効率的である。例えば図14に示す領域M0,M1のようにステップS408の複数の分割領域を跨った1つの領域としても良い。
設定したロゴ特徴の抽出対象領域の中からロゴ特徴を抽出するが、これはステップS408やステップS1408(後述)の相関算出手法により異なる。例えば画像データ同士の正規化相関演算であれば、対象領域内の画像データがロゴ特徴データとなるし、ロゴのエッジ成分を抽出してエッジ特徴の相関を行うのであれば、対象領域内に存在するエッジ位置やそのエッジ情報(勾配ベクトル強さや向きなど)がロゴ特徴データとなる。
Next, in step S409, the CPU 3-1 extracts a logo feature. The logo feature extraction target area may be the divided area itself in step S408, but if the logo is local, it is efficient to extract only a part in accordance with that. For example, it is good also as one area | region straddling the some division area of step S408 like area | region M0, M1 shown in FIG.
The logo feature is extracted from the set logo feature extraction target region, which differs depending on the correlation calculation method in step S408 or step S1408 (described later). For example, in the case of normalized correlation calculation between image data, the image data in the target area becomes the logo feature data, and if the edge feature of the logo is extracted and correlated with the edge feature, it exists in the target region The edge position and edge information (gradient vector strength, direction, etc.) to be used as the logo feature data.

次に、ステップS410においてCPU3−1は、ボタンデータを登録する。登録するボタンデータは、ステップS402で検出したボタン外径寸、ステップS404で検出したボタン穴の数、ステップS405で探索したボタン穴の配置パターン、ステップS404で検出したボタン穴の径寸、ステップS404で算出した穴の位置から穴間隔、ステップS407で検出したロゴ存在径(図14のMR)とロゴ径範囲(図14のMRw)、ステップS408で特定したロゴの回転対称性(非対称、180度点対称、120度点対称、90度点対称)、ステップS409で抽出したロゴ特徴抽出数、ロゴ特徴の抽出領域の角度(図14のM0θ, M1θ)と角度範囲(図14のM0θw, M1θw)、各抽出領域から得たロゴ特徴データとする。これらのデータを画像処理装置3のメモリ3−2内に記憶し、ティーチング処理を終了する。   Next, in step S410, the CPU 3-1 registers button data. The button data to be registered include the button outer diameter detected in step S402, the number of button holes detected in step S404, the button hole arrangement pattern searched in step S405, the button hole diameter detected in step S404, and step S404. From the hole position calculated in step S407, the logo existing diameter detected in step S407 (MR in FIG. 14) and the logo diameter range (MRw in FIG. 14), and the rotational symmetry of the logo specified in step S408 (asymmetric, 180 degrees). Point symmetry, 120 degree point symmetry, 90 degree point symmetry), number of logo features extracted in step S409, angle of logo feature extraction area (M0θ, M1θ in FIG. 14) and angle range (M0θw, M1θw in FIG. 14) The logo feature data obtained from each extraction area. These data are stored in the memory 3-2 of the image processing apparatus 3, and the teaching process is terminated.

(ボタン方向検出処理)
次に、ボタン方向検出処理について説明する。ボタン方向検出処理のフローチャートを図15に示す。
ボタン方向検出処理のステップS1401〜ステップS1404は、ティーチング処理のステップS401〜ステップS404と同様である。
ステップS1401では、上述したように、係止ピン28a上部にボタンが供給されたときのボタン供給装置の制御部からの撮像要求に契機に、画像処理装置3がカメラ1、照明装置2を制御してボタン画像を撮像する。これによりCPU3−1は、検出対象ボタンの表面画像を取得する。
(Button direction detection process)
Next, the button direction detection process will be described. A flowchart of the button direction detection process is shown in FIG.
Steps S1401 to S1404 of the button direction detection process are the same as steps S401 to S404 of the teaching process.
In step S1401, as described above, the image processing device 3 controls the camera 1 and the illumination device 2 in response to an imaging request from the control unit of the button supply device when the button is supplied to the upper portion of the locking pin 28a. Button image. Thereby, CPU3-1 acquires the surface image of a detection target button.

次に、ステップS1405においてCPU3−1は、検出対象ボタンの外径寸法やボタン穴の配置の不良検査を行う。
検出した外径寸やボタン穴の数、ボタン穴の径寸、ボタン穴の間隔が、ステップS410で登録したサンプルボタンのものとは異なる場合は、異常を示す情報をボタン供給装置の制御部に出力して(S1411)、ボタン方向検出処理を中断する。
ここで各寸法および位置の検査しきい値はボタン供給装置やミシンの物理的制約や縫製物の仕上がり品質の観点から事前に登録され画像処理装置3が記憶しているものとする。
Next, in step S1405, the CPU 3-1 performs a defect inspection of the outer diameter size of the detection target button and the button hole arrangement.
If the detected outer diameter size, number of button holes, button hole diameter size, and button hole interval are different from those of the sample button registered in step S410, information indicating abnormality is sent to the control unit of the button supply device. Output (S1411) and interrupt the button direction detection process.
Here, it is assumed that the inspection threshold value of each dimension and position is registered in advance and stored in the image processing apparatus 3 from the viewpoint of physical restrictions of the button supply device and the sewing machine and the finished quality of the sewing product.

次に、ステップS1406においてCPU3−1は、ボタン穴の仮座標を設定する。
CPU3−1は、検出したボタン穴位置平均からボタン穴中心を算出し、縫製時のボタン穴配置パターン(例えば図16(a))とボタン穴の座標が同一になるような座標軸を設定する(同図(b))。座標軸の向きは図17(a)(b)(c)(d)に示すように複数の候補があるが、いずれを選んでも本処理は成立するので、ここではボタン穴配置パターンからの回転角が最小となるもの(図17(a)、図16(b))を選択する。この回転角がボタン穴ずれ角θxである。ボタン穴ずれ角θxは、検出対象ボタンのボタン穴の正規のボタン方向におけるボタン穴(ボタン穴配置パターンによって示される)に対するボタン穴ずれ角である。CPU3−1はボタン穴ずれ角θxを算出し、メモリ3−2に記憶する。
Next, in step S1406, the CPU 3-1 sets the temporary coordinates of the button hole.
The CPU 3-1 calculates the button hole center from the detected button hole position average, and sets a coordinate axis so that the button hole coordinates at the time of sewing (for example, FIG. 16A) are the same as the button hole coordinates ( (B)). As shown in FIGS. 17 (a), (b), (c), and (d), there are a plurality of candidates for the orientation of the coordinate axes. However, since this process is established regardless of which is selected, the rotation angle from the button hole arrangement pattern is here. Is selected (FIG. 17 (a), FIG. 16 (b)). This rotation angle is the button hole deviation angle θx. The button hole deviation angle θx is a button hole deviation angle with respect to a button hole (indicated by the button hole arrangement pattern) in the normal button direction of the button hole of the detection target button. The CPU 3-1 calculates the button hole deviation angle θx and stores it in the memory 3-2.

次に、ステップS1407においてCPU3−1は、撮像した画像のロゴ存在径区間を抽出し極座標変換する(図16(c))。ロゴ存在径区間の特定及び極座標変換はティーチング処理と同様に行う。
次に、ステップS1408においてCPU3−1は、ロゴ角度探索を行う。
ティーチング処理によりボタン穴とロゴの位置関係は分かっている(例えば図18(a))ので、ボタン穴の位置(図18(b))からロゴの候補位置を特定できる(図18(c1)〜(c4))。図18(b)には検出対象ボタンの表面と仮座標軸を示す。図18(b)と図18(c1)〜(c4)のそれぞれと比較して探索すれば、正解は図18(c3)とわかり、図18(b)の仮座標軸の設定が正規のボタン方向のもの180度異なっていることがわかる。
しかし、CPU3−1は、この探索をステップS1407で生成した極座標変換画像上で行う(図19)。元画像での探索では穴位置に応じてテンプレートを回転させる処理が必要となるが、極座標変換画像上であれば探索時にテンプレートの回転が不要となるためである。ティーチング処理で取得し記憶されているロゴ特徴データをテンプレートとし、まずはロゴ特徴を抽出した角度で相関度を算出する。これは、図19(a)の検出対象ボタンと図19(b)の1回目テンプレートとの相関度を算出することに相当する。図19(b)の1回目テンプレートは、図18(c1)の候補0度に相当する。複数のロゴ特徴を登録した場合は個々のロゴ特徴毎に相関演算するのではなく、複数のロゴ特徴データを1まとめにしたテンプレートデータを生成して相関度を演算する。
次いで穴数に応じてテンプレートをズラして2回目、3回目・・・のテンプレートとしそれぞれ相関度を算出していく(図19の(c)→(d)→(e),図18の(c2)→(c3)→(c4)に相当)。なお、テンプレートをずらす際、極座標変換画像の水平方向が360度を超えてしまう場合があるが、360度を超えたテンプレートを0度から配したり、360度を超える極座標変換画像を作成すれば良い。
Next, in step S1407, the CPU 3-1 extracts a logo existing diameter section of the captured image and performs polar coordinate conversion (FIG. 16 (c)). The identification of the logo existing diameter section and the polar coordinate conversion are performed in the same manner as the teaching process.
Next, in step S1408, the CPU 3-1 performs a logo angle search.
Since the positional relationship between the button hole and the logo is known by the teaching process (for example, FIG. 18 (a)), the candidate position of the logo can be specified from the position of the button hole (FIG. 18 (b)) (FIG. 18 (c1) ˜ (c4)). FIG. 18B shows the surface of the detection target button and the temporary coordinate axis. 18 (b) and FIG. 18 (c1) to (c4), the correct answer is shown in FIG. 18 (c3), and the setting of the temporary coordinate axis in FIG. 18 (b) is the normal button direction. It can be seen that the one is 180 degrees different.
However, the CPU 3-1 performs this search on the polar coordinate conversion image generated in step S1407 (FIG. 19). This is because the search with the original image requires a process of rotating the template according to the hole position, but the template does not need to be rotated during the search on the polar coordinate conversion image. Using the logo feature data acquired and stored in the teaching process as a template, first, the correlation is calculated from the angle at which the logo feature is extracted. This corresponds to calculating the degree of correlation between the detection target button in FIG. 19A and the first template in FIG. 19B. The first template in FIG. 19 (b) corresponds to the candidate 0 degree in FIG. 18 (c1). When a plurality of logo features are registered, a correlation calculation is not performed for each logo feature, but a template data in which a plurality of logo feature data is integrated is generated and a correlation degree is calculated.
Next, the template is shifted in accordance with the number of holes, and the correlation is calculated as the second, third,... Template ((c) → (d) → (e) in FIG. 19, ( c2) → (c3) → (c4)). When shifting the template, the horizontal direction of the polar coordinate conversion image may exceed 360 degrees, but if a template exceeding 360 degrees is arranged from 0 degrees or a polar coordinate conversion image exceeding 360 degrees is created. good.

非回転対称の場合、2つ穴ボタンであれば180度ずらして合計2回、3つ穴ボタンであれば120度ずらして合計3回、4つ穴ボタンであれば90度ずらして合計4回(図19の場合)の探索となる。
また、全方位相互回転対称の場合は、ボタン穴ずれ角θxがボタン方向であると特定することができる。
また以上のいずれでもない場合でも、非回転対称の場合に比較してボタン方向の候補が半分で済む場合もある。例えば4つ穴ボタンであっても180度回転対称ロゴであることが分かっている場合は、図20のように2回の照合で角度が算出できる。
In the case of non-rotation symmetry, if it is a 2-hole button, it is shifted 180 degrees for a total of 2 times, if it is a 3-hole button, it is shifted 120 degrees for a total of 3 times, and if it is a 4-hole button, it is shifted 90 degrees for a total of 4 times The search is (in the case of FIG. 19).
Further, in the case of omnidirectional mutual rotational symmetry, it is possible to specify that the button hole deviation angle θx is the button direction.
Even if none of the above is true, the number of button direction candidates may be half as compared with the case of non-rotation symmetry. For example, even if it is a four-hole button, if it is known that the logo is a 180-degree rotationally symmetric logo, the angle can be calculated by performing the collation twice as shown in FIG.

そのため、ステップS1409においてCPU3−1は、角度算出および異ロゴ判定を次のように行う。
ボタン穴の配置を保ちつつ軸まわりに回転させたときのロゴの回転対称性が、全方位相互回転対称である場合、言い換えれば、ボタン穴が一致する角度ごとにすべて回転対称である場合(2つ穴ボタンの180度回転対称、3つ穴ボタンの120度回転対称、4つ穴ボタンの90度回転対称ロゴが該当する)は、次のように処理する。
CPU3−1は、検出対象ボタンの表面画像をボタン穴ずれ角θx分回転させて検出対象ボタンのボタン穴の位置を正規のボタン方向におけるボタン穴の位置に一致させた画像(図16(b)(c))について、ロゴ特徴と比較したときの相関度を算出する。ティーチング処理のステップS408の相関判定しきい値を用いて、算出した相関度がしきい値を超えるか判断する。
しきい値を超えればサンプルボタンとのロゴ同一性は確保されるので、CPU3−1は、ボタン穴ずれ角θxを、検出対象ボタンのボタン方向として出力する(S1410)。
Therefore, in step S1409, the CPU 3-1 performs angle calculation and different logo determination as follows.
When the rotational symmetry of the logo when rotating around the axis while maintaining the button hole arrangement is omnidirectional mutual rotational symmetry, in other words, when the button holes are all rotationally symmetric at every matching angle (2 The 180-degree rotational symmetry of the three-hole button, the 120-degree rotational symmetry of the three-hole button, and the 90-degree rotational symmetry logo of the four-hole button) are processed as follows.
The CPU 3-1 rotates the surface image of the detection target button by the button hole deviation angle θx to match the position of the button hole of the detection target button with the position of the button hole in the normal button direction (FIG. 16B). For (c)), calculate the degree of correlation when compared with the logo feature. Using the correlation determination threshold value in step S408 of the teaching process, it is determined whether the calculated degree of correlation exceeds the threshold value.
If the threshold value is exceeded, the logo identity with the sample button is secured, so the CPU 3-1 outputs the button hole deviation angle θx as the button direction of the detection target button (S1410).

非回転対称や、4つ穴ボタンで180度回転対称など、回転対称性が非回転対称の相互方位を有するものである場合は、次のように処理する。
CPU3−1は、検出対象ボタンの表面画像をボタン穴ずれ角θx分回転させて検出対象ボタンのボタン穴の位置を正規のボタン方向におけるボタン穴の位置に一致させた画像(図16(b)(c))と、さらにそこから非回転対称の相互方位の相対角(例えば図22(a)で90°、180°、270°、図22(c)で90°)分だけ回転させたときの画像のそれぞれについて、ロゴ特徴と比較したときの相関度を算出する。このときCPU3−1は、ティーチング処理のステップS408の相関判定しきい値を用いて、算出した相関度がしきい値を超えるか判断する。
CPU3−1は、しきい値を超えるものが1つに特定されれば、それについてボタン穴ずれ角θx分回転させた状態からの回転角θmを、ボタン穴ずれ角θxに加えた角度θbを、検出対象ボタンのボタン方向として出力する(図21参照)。
When the rotational symmetry has non-rotational symmetry, such as non-rotational symmetry or 180-degree rotational symmetry with a 4-hole button, the following processing is performed.
The CPU 3-1 rotates the surface image of the detection target button by the button hole deviation angle θx to match the position of the button hole of the detection target button with the position of the button hole in the normal button direction (FIG. 16B). (c)), and further rotated by a relative angle of non-rotationally symmetric mutual orientation (for example, 90 °, 180 °, 270 ° in FIG. 22A, 90 ° in FIG. 22C). For each of the images, the degree of correlation is calculated when compared with the logo feature. At this time, the CPU 3-1 determines whether the calculated degree of correlation exceeds the threshold value using the correlation determination threshold value in step S <b> 408 of the teaching process.
If the CPU 3-1 identifies one that exceeds the threshold value, the CPU 3-1 sets the angle θb obtained by adding the rotation angle θm from the state rotated by the button hole deviation angle θx to the button hole deviation angle θx. The button direction of the detection target button is output (see FIG. 21).

以上のようにして、画像処理装置3が撮像した画像から正規のボタン方向に対する角度を検出する。上述したように、このボタン方向はボタン供給装置の制御部へ送信され、ボタン供給装置の制御部は係止ピン28aの下部にあるモーター61で係止ピン28aをボタン穴位置に回転させてボタン穴に挿し込んだ後、ボタンを保持したままボタンが正規のボタン方向に配置されるようにボタンを回転させる。ボタンは旋回アーム28によってボタン挟持機構12bに受け渡され、縫製位置(不図示)に設置される。   As described above, the angle with respect to the normal button direction is detected from the image captured by the image processing apparatus 3. As described above, this button direction is transmitted to the control unit of the button supply device, and the control unit of the button supply device rotates the locking pin 28a to the button hole position by the motor 61 below the locking pin 28a. After being inserted into the hole, the button is rotated so that the button is arranged in the normal button direction while holding the button. The button is transferred to the button holding mechanism 12b by the turning arm 28 and is set at a sewing position (not shown).

一方、しきい値未満の相関度しか得られなかったり、しきい値を超える相関度を得られた角度が複数あったりすることが生じる。
CPU3−1は、しきい値を超えることがない場合、及びしきい値を超えるものが1つに特定されない場合には、ロゴが異なる場合などに該当するので角度算出を行わず、異常を示す情報を出力して(S1411)、ボタン方向検出を中断する。
On the other hand, only the correlation degree less than the threshold value can be obtained, or there can be a plurality of angles at which the correlation degree exceeding the threshold value is obtained.
If the CPU 3-1 does not exceed the threshold, and if one that exceeds the threshold is not specified as one, it corresponds to the case where the logo is different, etc., so the angle is not calculated and an abnormality is indicated. Information is output (S1411), and button direction detection is interrupted.

ボタン供給装置に、ボタンを搬送機構の縫製位置への搬送経路から排除する排除機構(不図示)を構成しておく。例えば、旋回アーム28を反転させて係止ピン28aを下に向ける機構やエアーをボタンに吹く機構又はそれらの組合せによって実現できる。ステップS1411で異常を示す情報を受信したボタン供給装置の制御部は、この排除機構を制御して、縫製位置への搬送経路から検出対象ボタンを排除する。   The button supply device is configured with an exclusion mechanism (not shown) that excludes the button from the conveyance path to the sewing position of the conveyance mechanism. For example, it can be realized by a mechanism for reversing the turning arm 28 and turning the locking pin 28a downward, a mechanism for blowing air to the button, or a combination thereof. The control unit of the button supply device that has received the information indicating abnormality in step S1411 controls the exclusion mechanism to exclude the detection target button from the conveyance path to the sewing position.

以上の実施形態によれは以下の作用効果が得られる。
(1)ボタンの穴及びロゴの配置によって高精度かつ高効率にボタン方向を検出できるようになったので、ボタン供給装置のボタン方向制御機能によってボタン方向を補正することで、ボタンを縫製時の正規のボタン方向に揃えて縫製位置に自動供給することができる。
(2)ボタン穴又はロゴに形成位置ズレがあったり、外径や穴に異常があったりするボタンを検出できるようになったので、ボタン供給装置が異常ボタンを排除することで、異常ボタンを縫製位置に供給することを回避できる。
According to the above embodiment, the following effects can be obtained.
(1) Since the button direction and button logo can be detected with high accuracy and high efficiency, the button direction is corrected by the button direction control function of the button supply device. It can be automatically fed to the sewing position in line with the normal button direction.
(2) Since it is now possible to detect buttons that are misaligned in the button hole or logo, or have an abnormality in the outer diameter or hole, the button supply device eliminates the abnormal button, so that the abnormal button Supply to the sewing position can be avoided.

1 カメラ
2 照明装置
3 画像処理装置
3−1 CPU
3−2 メモリ
3−3 通信ポート
12b 挟持機構
13 ボタン供給部
13a 底面
13b 通路
13c 搬出口
14 ボタン回転搬送機構
14a ボタン保持部
21 ボタン回転搬送機構
21a ボタン保持部
28 旋回アーム
28a 係止ピン
B ボタン
Ba ボタン穴
α 傾き角
θb ボタン方向を示す角度
θm ロゴ合わせのための回転角
θx ボタン穴ずれ角
1 Camera 2 Illumination Device 3 Image Processing Device 3-1 CPU
3-2 Memory 3-3 Communication port 12b Holding mechanism 13 Button supply unit 13a Bottom surface 13b Passage 13c Unloading port 14 Button rotation conveyance mechanism 14a Button holding unit 21 Button rotation conveyance mechanism 21a Button holding unit 28 Swivel arm 28a Locking pin B Button Ba Button hole α Inclination angle θb Button direction angle θm Rotation angle for logo alignment θx Button hole deviation angle

Claims (13)

縫製物に縫い付けられるボタンの表裏面に垂直な軸まわりの角度により規定されるボタン方向を検出するボタン方向検出方法において、
画像処理装置が、正規のボタン方向に対してボタン方向検出の対象となる検出対象ボタンの相対角を検出対象ボタンのボタン方向として算出するにあたり、
(1)ボタン穴及びロゴを有し正規のボタン方向を教示するように供されたサンプルボタンの表面画像を取得し、
(2)サンプルボタンの表面画像に基づき、正規のボタン方向を検出し、正規のボタン方向におけるボタン穴の配置と、ボタン穴の配置を保ちつつ前記軸まわりに回転させたときのロゴの回転対称性を特定するとともに、正規のボタン方向におけるロゴ特徴を取得しておき、
(3)検出対象ボタンの表面画像を取得し、
(4)検出対象ボタンの表面画像から検出対象ボタンのボタン穴の位置を特定し、
(5)検出対象ボタンのボタン穴の正規のボタン方向におけるボタン穴に対するボタン穴ずれ角を算出し、
(6)前記回転対称性が全方位相互回転対称である場合に、検出対象ボタンの表面画像を前記ボタン穴ずれ角分回転させて検出対象ボタンのボタン穴の位置を正規のボタン方向におけるボタン穴の位置に一致させた画像について、前記ロゴ特徴と比較したときの相関度を算出し所定のしきい値を超えれば前記ボタン穴ずれ角を、検出対象ボタンのボタン方向として出力し、
(7)前記回転対称性が非回転対称の相互方位を有するものである場合に、検出対象ボタンの表面画像を前記ボタン穴ずれ角分回転させて検出対象ボタンのボタン穴の位置を正規のボタン方向におけるボタン穴の位置に一致させた画像と、さらにそこから非回転対称の相互方位の相対角分だけ回転させたときの画像のそれぞれについて、前記ロゴ特徴と比較したときの相関度を算出し所定のしきい値を超えるものが1つに特定されれば、それについて前記ボタン穴ずれ角分回転させた状態からの回転角を前記ボタン穴ずれ角に加えた角度を、検出対象ボタンのボタン方向として出力することを特徴とするボタン方向検出方法。
In a button direction detection method for detecting a button direction defined by an angle around an axis perpendicular to the front and back surfaces of a button sewn on a sewing product,
When the image processing apparatus calculates the relative angle of the detection target button as the target of the button direction detection with respect to the normal button direction as the button direction of the detection target button,
(1) Obtain a surface image of a sample button that has a button hole and a logo and is provided to teach the normal button direction;
(2) Based on the surface image of the sample button, the normal button direction is detected, the button hole arrangement in the normal button direction, and the rotational symmetry of the logo when rotated around the axis while maintaining the button hole arrangement In addition to specifying the gender, get the logo features in the normal button direction,
(3) Obtain a surface image of the detection target button,
(4) Identify the position of the button hole of the detection target button from the surface image of the detection target button,
(5) Calculate the button hole deviation angle with respect to the button hole in the normal button direction of the button hole of the detection target button,
(6) When the rotational symmetry is omnidirectional mutual rotational symmetry, the surface image of the detection target button is rotated by the button hole deviation angle, and the position of the button hole of the detection target button is the button hole in the normal button direction. For the image matched with the position of the logo, if the degree of correlation when compared with the logo feature is calculated and exceeds a predetermined threshold, the button hole deviation angle is output as the button direction of the detection target button,
(7) When the rotational symmetry has a non-rotational symmetry mutual orientation, the surface image of the detection target button is rotated by the button hole misalignment angle, and the position of the button hole of the detection target button is determined as a regular button. Calculate the degree of correlation when comparing the image with the logo feature for the image matched to the position of the buttonhole in the direction and the image rotated by the relative angle of the non-rotationally symmetric mutual orientation. If one that exceeds a predetermined threshold value is specified, the button angle of the detection target button is determined by adding the rotation angle from the state rotated by the button hole deviation angle to the button hole deviation angle. A method for detecting a button direction, wherein the direction is output as a direction.
サンプルボタンの表面画像を、ボタン中心を中心としてボタン穴の数と同数の角度範囲に分割した分割領域に分け、異なる分割領域を相互に比較したときの相関度に基づき、ボタン中心を回転中心とした回転対称性を判別することにより前記(2)のロゴの回転対称性の特定を行うことを特徴とする請求項1に記載のボタン方向検出方法。   The surface image of the sample button is divided into divided areas divided into the same number of angle ranges as the number of button holes around the button center, and based on the degree of correlation when different divided areas are compared with each other, the button center is set as the center of rotation. The button direction detection method according to claim 1, wherein the rotational symmetry of the logo of (2) is specified by determining the rotational symmetry. サンプルボタンの表面画像を、ボタン中心を中心とした円周方向に沿って微分してエッジ成分を抽出し、エッジ量が最大となる径区間を特定し、前記分割領域を当該径区間内に限定して相関度を算出することを特徴とする請求項2に記載のボタン方向検出方法。   The edge image is extracted by differentiating the surface image of the sample button along the circumferential direction around the center of the button, the diameter section where the edge amount is maximum is specified, and the divided area is limited to the diameter section. The button direction detection method according to claim 2, wherein the degree of correlation is calculated. 前記分割領域を極座標変換した上で比較して相関度を算出することを特徴とする請求項2又は請求項3に記載のボタン方向検出方法。   4. The button direction detection method according to claim 2, wherein the correlation degree is calculated by performing a polar coordinate conversion on the divided areas and comparing the divided areas. サンプルボタンの表面画像を、ボタン中心を中心とした円周方向に沿って微分してエッジ成分を抽出し、エッジ量が最大となる径区間を特定し、当該径区間の画像から前記(2)のロゴ特徴を取得することを特徴とする請求項1に記載のボタン方向検出方法。   The edge image is extracted by differentiating the surface image of the sample button along the circumferential direction around the center of the button, the diameter section in which the edge amount is maximum is specified, and the above (2) The button direction detection method according to claim 1, further comprising: obtaining a logo feature of the button. 前記ロゴ特徴を、ボタン中心を中心として極座標変換して記憶し、
前記(6)(7)において、検出対象ボタンの表面画像の前記ロゴ特徴と比較する画像領域を極座標変換した上で相関度を算出することを特徴とする請求項5に記載のボタン方向検出方法。
The logo feature is memorized by converting polar coordinates around the center of the button,
6. The button direction detection method according to claim 5, wherein, in (6) and (7), the degree of correlation is calculated after performing polar coordinate conversion on an image region to be compared with the logo feature of the surface image of the detection target button. .
前記(1)のサンプルボタンの表面画像の取得を、サンプルボタンの表面を所定の照明で照明してカメラで撮像することにより行い、
前記(3)の検出対象ボタンの表面画像の取得を、検出対象ボタンの表面を前記所定の照明で照明して前記カメラで撮像することにより行うことを特徴とする請求項1に記載のボタン方向検出方法。
The acquisition of the surface image of the sample button of (1) is performed by illuminating the surface of the sample button with a predetermined illumination and capturing it with a camera,
2. The button direction according to claim 1, wherein the surface image of the detection target button in (3) is obtained by illuminating the surface of the detection target button with the predetermined illumination and imaging with the camera. Detection method.
サンプルボタンの表面画像に基づき、サンプルボタンのボタン穴、ボタン外径を検出し、検出対象ボタンの表面画像に基づき、検出対象ボタンのボタン穴、ボタン外径を検出し、サンプルボタンのボタン穴、ボタン外径と検出対象ボタンのボタン穴、ボタン外径とを比較して異なる場合に、異常を示す情報を出力してボタン方向検出を中断することを特徴とする請求項1に記載のボタン方向検出方法。   Based on the surface image of the sample button, the button hole of the sample button and the button outer diameter are detected. Based on the surface image of the detection target button, the button hole of the detection target button and the button outer diameter are detected. 2. The button direction according to claim 1, wherein when the button outer diameter is different from the button hole of the detection target button and the button outer diameter, information indicating an abnormality is output to interrupt button direction detection. Detection method. 前記(6)において所定のしきい値を超えることがない場合、及び前記(7)において所定のしきい値を超えるものが1つに特定されない場合に、異常を示す情報を出力してボタン方向検出を中断することを特徴とする請求項1に記載のボタン方向検出方法。   When the predetermined threshold value is not exceeded in (6) and when no one exceeding the predetermined threshold value is specified in (7), information indicating an abnormality is output and the button direction is output. The button direction detection method according to claim 1, wherein the detection is interrupted. 請求項1に記載のボタン方向検出方法を実行するボタン方向検出装置であって、
照明装置と、カメラと、画像処理装置とを備え、
前記画像処理装置は、
前記照明装置で照明され前記カメラで撮像されたサンプルボタンの表面画像が入力されて前記(2)を実行し、
前記照明装置で照明され前記カメラで撮像された検出対象ボタンの表面画像が入力されて前記(4)から(7)を実行することを特徴とするボタン方向検出装置。
A button direction detection device for executing the button direction detection method according to claim 1,
An illumination device, a camera, and an image processing device;
The image processing apparatus includes:
The surface image of the sample button illuminated by the illumination device and imaged by the camera is input, and the above (2) is executed.
A button direction detection device, wherein a surface image of a detection target button illuminated by the illumination device and imaged by the camera is input, and (4) to (7) are executed.
請求項10に記載のボタン方向検出装置と、ボタンを所定の供給位置に搬送する搬送機構とを備えるボタン供給装置において、
前記ボタン方向検出装置に前記搬送機構によって搬送されるボタンのボタン方向の検出を行わせることを特徴とするボタン供給装置。
A button supply device comprising: the button direction detection device according to claim 10; and a transport mechanism that transports the button to a predetermined supply position.
A button supply device that causes the button direction detection device to detect a button direction of a button conveyed by the conveyance mechanism.
前記画像処理装置が、サンプルボタンの表面画像に基づき、サンプルボタンのボタン穴、ボタン外径を検出し、検出対象ボタンの表面画像に基づき、検出対象ボタンのボタン穴、ボタン外径を検出し、サンプルボタンのボタン穴、ボタン外径と検出対象ボタンのボタン穴、ボタン外径とを比較して異なる場合に、当該検出対象ボタンを前記搬送機構の前記所定の供給位置への搬送経路から排除する機構を有することを特徴とする請求項11に記載のボタン供給装置。   The image processing device detects the button hole and button outer diameter of the sample button based on the surface image of the sample button, detects the button hole and button outer diameter of the detection target button based on the surface image of the detection target button, When the button hole and button outer diameter of the sample button are different from the button hole and button outer diameter of the detection target button, the detection target button is excluded from the transport path to the predetermined supply position of the transport mechanism. It has a mechanism, The button supply apparatus of Claim 11 characterized by the above-mentioned. 前記(6)において所定のしきい値を超えることがない場合、及び前記(7)において所定のしきい値を超えるものが1つに特定されない場合に、当該検出対象ボタンを前記搬送機構の前記所定の供給位置への搬送経路から排除する機構を有することを特徴とする請求項11に記載のボタン供給装置。   When the predetermined threshold value is not exceeded in (6), and when one that exceeds the predetermined threshold value is not specified in (7), the button to be detected is moved to the transport mechanism. The button supply apparatus according to claim 11, further comprising a mechanism for excluding from a conveyance path to a predetermined supply position.
JP2012171365A 2012-08-01 2012-08-01 Button direction detection method, button direction detection device, and button supply device Active JP6059900B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012171365A JP6059900B2 (en) 2012-08-01 2012-08-01 Button direction detection method, button direction detection device, and button supply device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012171365A JP6059900B2 (en) 2012-08-01 2012-08-01 Button direction detection method, button direction detection device, and button supply device

Publications (2)

Publication Number Publication Date
JP2014030496A true JP2014030496A (en) 2014-02-20
JP6059900B2 JP6059900B2 (en) 2017-01-11

Family

ID=50280820

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012171365A Active JP6059900B2 (en) 2012-08-01 2012-08-01 Button direction detection method, button direction detection device, and button supply device

Country Status (1)

Country Link
JP (1) JP6059900B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108754880A (en) * 2018-08-20 2018-11-06 常州苏展科技有限公司 A kind of button identification feed device
CN108914395A (en) * 2018-09-17 2018-11-30 温州中科自动化设备有限公司 A kind of automatic feeding of button-sewing machine
CN111208417A (en) * 2020-01-02 2020-05-29 北京百度网讯科技有限公司 Test method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0223197B2 (en) * 1987-02-27 1990-05-23 Juki Kk
JP2010004904A (en) * 2008-06-24 2010-01-14 Juki Corp Button front/back determination method
JP2010012029A (en) * 2008-07-03 2010-01-21 Juki Corp Button feeding device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0223197B2 (en) * 1987-02-27 1990-05-23 Juki Kk
JP2010004904A (en) * 2008-06-24 2010-01-14 Juki Corp Button front/back determination method
JP2010012029A (en) * 2008-07-03 2010-01-21 Juki Corp Button feeding device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108754880A (en) * 2018-08-20 2018-11-06 常州苏展科技有限公司 A kind of button identification feed device
CN108754880B (en) * 2018-08-20 2023-09-26 常州苏展科技有限公司 Button discernment material feeding unit
CN108914395A (en) * 2018-09-17 2018-11-30 温州中科自动化设备有限公司 A kind of automatic feeding of button-sewing machine
CN111208417A (en) * 2020-01-02 2020-05-29 北京百度网讯科技有限公司 Test method, device, equipment and medium

Also Published As

Publication number Publication date
JP6059900B2 (en) 2017-01-11

Similar Documents

Publication Publication Date Title
US7329855B2 (en) Optical inspection of glass bottles using multiple cameras
US7330251B2 (en) Method and apparatus for producing reference image in glass bottle inspecting apparatus
JP5947169B2 (en) Appearance inspection apparatus, appearance inspection method and program
CN105701492B (en) A kind of machine vision recognition system and its implementation
JP2017096749A (en) Positioning method, visual inspection apparatus, program, computer readable recording medium, and visual inspection method
US9639781B2 (en) Systems and methods for classification and alignment of highly similar or self-similar patterns
US11972589B2 (en) Image processing device, work robot, substrate inspection device, and specimen inspection device
CN108353534B (en) Pin front end position image recognition method and pin front end position image recognition system
TWI262288B (en) Apparatus, method, and program for assisting in selection of pattern element for pattern matching
JP6059900B2 (en) Button direction detection method, button direction detection device, and button supply device
JP2014091008A (en) Sewing device
JP2007017424A (en) POSITION ALIGNMENT SYSTEM BY XYtheta STAGE
KR101689980B1 (en) Pattern inspection apparatus and pattern inspection method
JP2008014700A (en) Workpiece inspection method and workpiece inspection device
JP2013134176A (en) Imaging apparatus and imaging method
US11074718B2 (en) Image processing device
JP5960433B2 (en) Image processing apparatus and image processing method
JP2018048968A (en) Inspection device and inspection method
JP2010091525A (en) Pattern matching method of electronic component
KR101559941B1 (en) A system for detecting fault of print pattern
TW201804980A (en) Method for generating template for solid preparation, computer-readable storage media storing program for generating template for solid preparation, method for inspecting print on solid preparation, and device for inspecting print on solid preparation
JP2021096116A (en) Label inspection method and label inspection system
KR20180116406A (en) An inspection information generation device, an inspection information generation method, and a defect inspection device
JP2017181228A (en) Measurement device, measurement method and manufacturing method of article
JP2014057764A (en) Method for determining button front and reverse sides, apparatus for determining button front and reverse sides and apparatus for supplying button

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150717

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160527

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160607

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160715

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20161122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161212

R150 Certificate of patent or registration of utility model

Ref document number: 6059900

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150