JP2021053241A - Sewing data processing device and sewing machine - Google Patents

Sewing data processing device and sewing machine Download PDF

Info

Publication number
JP2021053241A
JP2021053241A JP2019180672A JP2019180672A JP2021053241A JP 2021053241 A JP2021053241 A JP 2021053241A JP 2019180672 A JP2019180672 A JP 2019180672A JP 2019180672 A JP2019180672 A JP 2019180672A JP 2021053241 A JP2021053241 A JP 2021053241A
Authority
JP
Japan
Prior art keywords
sewing
groove
unit
sewing data
holding frame
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
JP2019180672A
Other languages
Japanese (ja)
Inventor
良平 小澤
Ryohei Ozawa
良平 小澤
俊二 内野
Shunji Uchino
俊二 内野
翔平 永井
Shohei Nagai
翔平 永井
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 JP2019180672A priority Critical patent/JP2021053241A/en
Publication of JP2021053241A publication Critical patent/JP2021053241A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a sewing data processing device capable of reducing possibility of a fabric holding frame and a sewing needle interfering with each other, and to provide a sewing machine.SOLUTION: A sewing machine forms a fabric holding frame for holding an object to be sewn. A CPU images a groove into which a sewing needle of the sewing machine can be inserted by an imaging part, and acquires a whole image which is an imaged image including the entire groove (S105-S111). The CPU detects a positional relation between the position of the groove of the whole image and a needle location of coordinate data based on the acquired whole image and the coordinate data which shows the needle location of the sewing needle contained in sewing data (S115, S121). The CPU analyzes the detected positional relation by a statistic method (S113-S129); thereby, the CPU calculates a correction amount of the sewing data (S129). The CPU corrects the sewing data by applying the calculated correction amount (S133).SELECTED DRAWING: Figure 10

Description

本発明は、縫製データ処理装置とミシンに関する。 The present invention relates to a sewing data processing device and a sewing machine.

特許文献1に記載の縫製装置は、布保持枠、カメラ、形状認識部、及びミシン制御部を備える。布保持枠は、複数の当接部、及び複数のエッジ検出用開口部を備える。複数の当接部は、被縫製物の端面に当接する。複数のエッジ検出用開口部は、被縫製物の端位置を露出する。カメラは、複数の当接部が当接し且つ複数のエッジ検出用開口部により端位置が露出した状態で、被縫製物を撮像する。形状認識部は、カメラが撮像した被縫製物の画像データに基づいて被縫製物の端位置を認識する。ミシン制御部は、形状認識部が認識した端位置に基づき縫製パターンデータを作成する。 The sewing device described in Patent Document 1 includes a cloth holding frame, a camera, a shape recognition unit, and a sewing machine control unit. The cloth holding frame includes a plurality of contact portions and a plurality of edge detection openings. The plurality of contact portions abut on the end faces of the sewn object. The plurality of edge detection openings expose the edge positions of the sewn material. The camera takes an image of the sewn object in a state where the plurality of contact portions are in contact with each other and the end positions are exposed by the plurality of edge detection openings. The shape recognition unit recognizes the end position of the sewn object based on the image data of the sewn object captured by the camera. The sewing machine control unit creates sewing pattern data based on the end position recognized by the shape recognition unit.

特開2014−91008号公報Japanese Unexamined Patent Publication No. 2014-91008

上記縫製装置は、布保持枠の寸法精度が悪い場合がある。この場合にも、縫製装置は、被縫製物の端位置を撮影画像から検出し、認識した被縫製物の端位置に基づき作成した縫製パターンデータに基づき縫製を行う。故に、縫製装置は、布保持枠と縫針とが干渉する可能性があった。 The sewing device may have poor dimensional accuracy of the cloth holding frame. In this case as well, the sewing device detects the end position of the sewn object from the captured image and performs sewing based on the sewing pattern data created based on the recognized end position of the sewn object. Therefore, in the sewing device, the cloth holding frame and the sewing needle may interfere with each other.

本発明の目的は、布保持枠と縫針とが干渉する可能性を低減できる縫製データ処理装置とミシンを提供することである。 An object of the present invention is to provide a sewing data processing device and a sewing machine capable of reducing the possibility of interference between the cloth holding frame and the sewing needle.

本発明の請求項1の縫製データ処理装置は、被縫製物に対して縫製を行う為の縫製データを処理する縫製データ処理装置において、前記被縫製物を保持する布保持枠に形成し、ミシンの縫針が挿通可能である溝を撮影部により撮影し、前記溝の全体を含む撮影画像である全体画像を取得する撮影制御部と、前記撮影制御部により取得した前記全体画像と、前記縫製データに含まれる前記縫針の針落ち位置を示す座標データとに基づき、前記全体画像の溝の位置と、前記座標データの前記針落ち位置との位置関係を検出する検出部と、前記検出部により検出した前記位置関係を統計的手法により解析することで、前記縫製データの補正量を算出する第一算出部と、前記第一算出部により算出した前記補正量を適用して、前記縫製データを補正する第一補正部とを備えたことを特徴とする。 The sewing data processing device according to claim 1 of the present invention is a sewing data processing device that processes sewing data for sewing a sewn object, and is formed on a cloth holding frame for holding the sewn object and is a sewing machine. The imaging control unit that photographs the groove through which the sewing needle can be inserted and acquires the entire image that is the captured image including the entire groove, the overall image acquired by the imaging control unit, and the sewing data. Based on the coordinate data indicating the needle drop position of the sewing needle included in the above, the detection unit that detects the positional relationship between the groove position of the entire image and the needle drop position of the coordinate data, and the detection unit detects it. By analyzing the positional relationship obtained by a statistical method, the sewing data is corrected by applying the first calculation unit that calculates the correction amount of the sewing data and the correction amount calculated by the first calculation unit. It is characterized in that it is provided with a first correction unit.

第一態様の縫製データ処理装置は、全体画像の溝の位置と、座標データの針落ち位置との位置関係を検出する。縫製データ処理装置は、該位置関係を統計的手法により解析することで、縫製データの補正量を算出する。縫製データ処理装置は、算出した補正量を適用して、縫製データを補正する。故に、縫製データ処理装置は、布保持枠と縫針とが干渉する可能性を低減できる。 The sewing data processing device of the first aspect detects the positional relationship between the position of the groove in the entire image and the needle drop position of the coordinate data. The sewing data processing device calculates the correction amount of the sewing data by analyzing the positional relationship by a statistical method. The sewing data processing device applies the calculated correction amount to correct the sewing data. Therefore, the sewing data processing device can reduce the possibility of interference between the cloth holding frame and the sewing needle.

請求項2の縫製データ処理装置において、前記撮影制御部は、前記撮影部が前記溝を一部分ずつ複数回撮影することにより生成した複数の分割画像を、前記全体画像として取得し、前記検出部は、前記複数の分割画像の夫々の前記溝の位置に対する、前記座標データの前記針落ち位置の相対位置を、所定の直交座標系及び極座標系により示す移動量に応じて移動する第一検出部と、前記第一検出部により前記相対位置を前記移動量の分移動した状態で、前記複数の分割画像のうち、前記針落ち位置の前記相対位置が前記溝の位置に含まれる前記分割画像の割合を検出する第二検出部と、前記第一検出部による前記移動量に応じた前記針落ち位置の前記相対位置の移動と、前記第二検出部による前記割合の検出とを、複数の前記移動量毎に繰り返す第三検出部とを備え、前記第一算出部は、前記第三検出部により検出した複数の前記割合のうち、最大となる前記割合の前記移動量に応じて、前記補正量を算出する。縫製データ処理装置は、複数の分割画像のうち、針落ち位置の相対位置が溝の位置に含まれる分割画像の割合を検出する。縫製データ処理装置は、移動量に応じた針落ち位置の相対位置の移動と、割合の検出とを、複数の移動量毎に繰り返す。縫製データ処理装置は、検出した複数の割合のうち、最大となる割合の移動量に応じて、補正量を算出する。故に、縫製データ処理装置は、布保持枠と縫針とが干渉する可能性を低減できる。 In the sewing data processing device according to claim 2, the photographing control unit acquires a plurality of divided images generated by the photographing unit taking a plurality of images of the groove one by one, and the detection unit acquires a plurality of divided images as the whole image. With respect to the position of the groove in each of the plurality of divided images, the first detection unit that moves the relative position of the needle drop position of the coordinate data according to the movement amount indicated by the predetermined orthogonal coordinate system and the polar coordinate system. The ratio of the divided image in which the relative position of the needle drop position is included in the groove position among the plurality of divided images in a state where the relative position is moved by the moving amount by the first detection unit. The movement of the relative position of the needle drop position according to the movement amount by the first detection unit and the detection of the ratio by the second detection unit are performed by the second detection unit. The first calculation unit includes a third detection unit that repeats for each quantity, and the first calculation unit has the correction amount according to the movement amount of the ratio that is the maximum among the plurality of the ratios detected by the third detection unit. Is calculated. The sewing data processing device detects the ratio of the divided images in which the relative position of the needle drop position is included in the groove position among the plurality of divided images. The sewing data processing device repeats the movement of the relative position of the needle drop position according to the movement amount and the detection of the ratio for each of the plurality of movement amounts. The sewing data processing device calculates the correction amount according to the movement amount of the maximum ratio among the plurality of detected ratios. Therefore, the sewing data processing device can reduce the possibility of interference between the cloth holding frame and the sewing needle.

請求項3の縫製データ処理装置において、前記第一算出部は、前記第三検出部により検出した前記複数の割合のうち、最大となる前記割合が複数あるか否かを特定する特定部を備え、前記第一算出部は、前記特定部が最大となる前記割合が複数あると判断した場合、最大となる複数の前記割合に対応する前記複数の移動量に応じて、前記補正量を決定する。縫製データ処理装置は、最大となる割合が複数あると判断した場合、最大となる複数の割合に対応する複数の移動量に応じて、補正量を決定する。故に、縫製データ処理装置は、布保持枠と縫針とが干渉する可能性を更に低減できる。 In the sewing data processing apparatus of claim 3, the first calculation unit includes a specific unit that specifies whether or not there is a plurality of the maximum ratios among the plurality of ratios detected by the third detection unit. When the first calculation unit determines that there are a plurality of the ratios that maximize the specific unit, the first calculation unit determines the correction amount according to the plurality of movement amounts corresponding to the plurality of maximum ratios. .. When the sewing data processing device determines that there are a plurality of maximum ratios, the sewing data processing device determines a correction amount according to a plurality of movement amounts corresponding to the plurality of maximum ratios. Therefore, the sewing data processing device can further reduce the possibility of interference between the cloth holding frame and the sewing needle.

請求項4の縫製データ処理装置は、前記撮影制御部により取得した前記全体画像において、前記第一補正部による補正後の前記縫製データの前記針落ち位置が、前記溝の位置に含まれるか否かを判断する判断部と、前記判断部が、前記針落ち位置が前記溝の位置に含まれないと判断した場合、前記溝の位置に含まれない前記針落ち位置について報知する報知部とを備える。縫製データ処理装置は、補正後の縫製データの針落ち位置が、全体画像の溝の位置に含まれないと判断した場合、溝の位置に含まれない針落ち位置について報知する。故に、縫製データ処理装置は、補正後の縫製データにおいて、布保持枠と縫針とが干渉する可能性をユーザに報知できる。 In the sewing data processing device of claim 4, whether or not the needle drop position of the sewing data after correction by the first correction unit is included in the groove position in the overall image acquired by the imaging control unit. A determination unit for determining whether or not, and a notification unit for notifying the needle drop position not included in the groove position when the determination unit determines that the needle drop position is not included in the groove position. Be prepared. When the sewing data processing device determines that the needle drop position of the corrected sewing data is not included in the groove position of the entire image, the sewing data processing device notifies the needle drop position not included in the groove position. Therefore, the sewing data processing device can notify the user of the possibility that the cloth holding frame and the sewing needle interfere with each other in the corrected sewing data.

請求項5の縫製データ処理装置は、前記撮影制御部により取得した前記全体画像において、前記第一補正部による補正後の前記座標データの前記針落ち位置が、前記溝の位置に含まれるか否かを判断する判断部と、前記判断部が前記溝の位置に含まれないと判断した前記針落ち位置を、前記溝の位置に含まれる位置に補正する第二補正部とを備える。縫製データ処理装置は、溝の位置に含まれないと判断した針落ち位置を、溝の位置に含まれる位置に補正する。故に、縫製データ処理装置は、布保持枠と縫針とが干渉する可能性を更に低減できる。 In the sewing data processing device of claim 5, whether or not the needle drop position of the coordinate data corrected by the first correction unit is included in the groove position in the overall image acquired by the imaging control unit. It is provided with a determination unit for determining whether or not, and a second correction unit for correcting the needle drop position determined by the determination unit not to be included in the groove position to a position included in the groove position. The sewing data processing device corrects the needle drop position determined not to be included in the groove position to the position included in the groove position. Therefore, the sewing data processing device can further reduce the possibility of interference between the cloth holding frame and the sewing needle.

請求項6の縫製データ処理装置において、前記撮影制御部は、前記ミシンが前記縫製データに基づき送り機構を駆動して前記布保持枠を移動する時、前記布保持枠の前記溝を撮影し、前記全体画像を取得する。縫製データ処理装置は、ミシンが送り機構を駆動して布保持枠を移動する時、布保持枠の溝を撮影し、全体画像を取得する。故に、縫製データ処理装置は、ミシンが縫製データに基づき送り機構を駆動することにより、効率的に布保持枠の溝の全体を撮影できる。 In the sewing data processing device of claim 6, when the sewing machine drives the feed mechanism to move the cloth holding frame based on the sewing data, the photographing control unit photographs the groove of the cloth holding frame. The whole image is acquired. When the sewing machine drives the feed mechanism to move the cloth holding frame, the sewing data processing device photographs the groove of the cloth holding frame and acquires the entire image. Therefore, the sewing data processing device can efficiently photograph the entire groove of the cloth holding frame by driving the feed mechanism based on the sewing data by the sewing machine.

請求項7の縫製データ処理装置は、前記ミシンが前記送り機構を駆動して前記布保持枠を移動する場合に、前記撮影部の撮影範囲の所定位置を、前記縫製データの仮想的な針落ち位置として前記縫製データを変換する変換部を備える。縫製データ処理装置は、撮影部の撮影範囲の所定位置を、縫製データの仮想的な針落ち位置として、縫製データを変換する。故に、縫製データ処理装置は、縫針の針落ち位置を直接撮影しなくとも、仮想的な針落ち位置と布保持枠とが干渉するか判断できる。 The sewing data processing device according to claim 7 sets a predetermined position in the photographing range of the photographing unit when the sewing machine drives the feed mechanism to move the cloth holding frame, and a virtual needle drop of the sewing data. A conversion unit that converts the sewing data as a position is provided. The sewing data processing device converts the sewing data by setting a predetermined position in the photographing range of the photographing unit as a virtual needle drop position of the sewing data. Therefore, the sewing data processing device can determine whether the virtual needle drop position and the cloth holding frame interfere with each other without directly photographing the needle drop position of the sewing needle.

本発明の請求項8に係るミシンは、請求項1〜7の何れかに記載の縫製データ処理装置と、前記縫製データ処理装置により補正した前記縫製データに基づき、前記被縫製物に縫製を行う縫製制御部とを備えたことを特徴とする。 The sewing machine according to claim 8 of the present invention sews the sewn object based on the sewing data processing device according to any one of claims 1 to 7 and the sewing data corrected by the sewing data processing device. It is characterized by having a sewing control unit.

第二態様のミシンは、請求項1〜7の何れかに記載の縫製データ処理装置により補正した縫製データに基づき縫製できる。故に、ミシンは、請求項1〜7の何れかに記載の縫製データ処理装置と同じ効果を得ることができる。 The sewing machine of the second aspect can be sewn based on the sewing data corrected by the sewing data processing device according to any one of claims 1 to 7. Therefore, the sewing machine can obtain the same effect as the sewing data processing device according to any one of claims 1 to 7.

ミシン1の斜視図。Perspective view of sewing machine 1. ミシン1の前端部7の右側面図。The right side view of the front end portion 7 of the sewing machine 1. 布保持枠80と保持部70の平面図。The plan view of the cloth holding frame 80 and the holding part 70. ミシン1の電気的構成を示すブロック図。The block diagram which shows the electrical structure of the sewing machine 1. 分割画像25Aにおける仮想針落ち位置Pと溝87との位置関係を示す図。The figure which shows the positional relationship between the virtual needle drop position P and the groove 87 in the divided image 25A. 縫製データの仮想針落ち位置Pが、撮影した分割画像25の溝87に含まれない場合における全体画像68を示す図。The figure which shows the whole image 68 in the case where the virtual needle drop position P of sewing data is not included in the groove 87 of the photographed divided image 25. 移動量(X、Y、θ)を適用した縫製データの仮想針落ち位置Pと、撮影した分割画像25の溝87との位置関係を示す図。The figure which shows the positional relationship between the virtual needle drop position P of sewing data to which the movement amount (X, Y, θ) is applied, and the groove 87 of the photographed divided image 25. 移動量(θ)を適用した場合の割合の算出結果を示す図表。The chart which shows the calculation result of the ratio when the movement amount (θ) is applied. メイン処理の流れ図。Flow diagram of main processing. 縫製データ補正処理の流れ図。Flow chart of sewing data correction processing.

図面を参照し、本発明の第一実施形態のミシン1を説明する。図1の上側、下側、左斜め下側、右斜め上側、左斜め上側、右斜め下側は夫々ミシン1の上側、下側、前側、後側、左側、右側である。 The sewing machine 1 of the first embodiment of the present invention will be described with reference to the drawings. The upper side, lower side, diagonally lower left side, diagonally upper right side, diagonally upper left side, and diagonally lower right side of FIG. 1 are the upper side, lower side, front side, rear side, left side, and right side of the sewing machine 1, respectively.

図1〜図3を参照しミシン1の全体構造を説明する。図1に示す如く、ミシン1はベッド部2、脚柱部3、アーム部4を備える。ベッド部2はテーブル95に配置する。ベッド部2は前後方向に延び、内部に垂直釜(垂直回転釜/揺動釜)等を備える。ミシン1はベッド部2の上方に作業台5と送り機構6を備える。作業台5は針板29(図2参照)を備える。針板29は針棒10に装着した縫針11直下の位置に縫針11が挿通可能な針穴28を有する。 The overall structure of the sewing machine 1 will be described with reference to FIGS. 1 to 3. As shown in FIG. 1, the sewing machine 1 includes a bed portion 2, a pedestal portion 3, and an arm portion 4. The bed portion 2 is arranged on the table 95. The bed portion 2 extends in the front-rear direction and is provided with a vertical hook (vertical rotary hook / rocking hook) or the like inside. The sewing machine 1 is provided with a workbench 5 and a feed mechanism 6 above the bed portion 2. The workbench 5 includes a needle plate 29 (see FIG. 2). The needle plate 29 has a needle hole 28 through which the sewing needle 11 can be inserted at a position directly below the sewing needle 11 attached to the needle rod 10.

送り機構6は、保持部70、枠支持部65、昇降部62、押え枠63、エアシリンダ(図示略)、X軸移動機構(図示略)、及びY軸移動機構(図示略)を備える。保持部70は左右方向に延び、布保持枠80を着脱できる。布保持枠80は縫針11が挿通可能な溝87を有し、被縫製物を保持できる。枠支持部65は作業台5の後方に位置する。枠支持部65は前方に延びる腕部64を備え、腕部64下方に保持部70を固定する。腕部64は前端にて昇降部62を支持する。エアシリンダは腕部64に設け且つ昇降部62に接続する。送り機構6はコンプレッサが供給する空気でエアシリンダを駆動する。エアシリンダは昇降部62を昇降する。 The feed mechanism 6 includes a holding portion 70, a frame support portion 65, an elevating portion 62, a holding frame 63, an air cylinder (not shown), an X-axis moving mechanism (not shown), and a Y-axis moving mechanism (not shown). The holding portion 70 extends in the left-right direction, and the cloth holding frame 80 can be attached and detached. The cloth holding frame 80 has a groove 87 through which the sewing needle 11 can be inserted, and can hold the sewn object. The frame support portion 65 is located behind the workbench 5. The frame support portion 65 includes an arm portion 64 extending forward, and a holding portion 70 is fixed below the arm portion 64. The arm portion 64 supports the elevating portion 62 at the front end. The air cylinder is provided on the arm portion 64 and is connected to the elevating portion 62. The feed mechanism 6 drives the air cylinder with the air supplied by the compressor. The air cylinder moves up and down the elevating part 62.

押え枠63は、昇降部62の下端に連結する。押え枠63は矩形枠状の板部材である。縫針11と布保持枠80の干渉を防止する為、縫目を形成可能な縫製領域は布保持枠80の内側の領域よりも小さい。昇降部62が下方に移動すると、押え枠63は下降する。縫製時、押え枠63は布保持枠80を上方から押さえ、布保持枠80が作業台5から浮き上がるのを防止する。送り機構6は枠支持部65が支持する押え枠63と保持部70をX軸方向(左右方向)とY軸方向(前後方向)に移動する。 The presser frame 63 is connected to the lower end of the elevating portion 62. The holding frame 63 is a rectangular frame-shaped plate member. In order to prevent the sewing needle 11 and the cloth holding frame 80 from interfering with each other, the sewing area where the stitch can be formed is smaller than the area inside the cloth holding frame 80. When the elevating part 62 moves downward, the holding frame 63 lowers. At the time of sewing, the presser frame 63 presses the cloth holding frame 80 from above to prevent the cloth holding frame 80 from being lifted from the workbench 5. The feed mechanism 6 moves the holding frame 63 and the holding portion 70 supported by the frame supporting portion 65 in the X-axis direction (left-right direction) and the Y-axis direction (front-back direction).

X軸移動機構とY軸移動機構はベッド部2内部に設ける。X軸移動機構はX軸モータ114(図4参照)を駆動源とし、枠支持部65と保持部70をX軸方向へ移動する。Y軸移動機構はY軸モータ116(図4参照)を駆動源とし、枠支持部65と保持部70をY軸方向へ移動する。 The X-axis moving mechanism and the Y-axis moving mechanism are provided inside the bed portion 2. The X-axis movement mechanism uses the X-axis motor 114 (see FIG. 4) as a drive source, and moves the frame support portion 65 and the holding portion 70 in the X-axis direction. The Y-axis movement mechanism uses the Y-axis motor 116 (see FIG. 4) as a drive source, and moves the frame support portion 65 and the holding portion 70 in the Y-axis direction.

脚柱部3はベッド部2後側から上方に延びる。脚柱部3は内部にミシンモータ112(図4参照)等を備える。アーム部4は脚柱部3上端からベッド部2の上面に対向して前方に延びる。アーム部4は内部に主軸(図示略)を備える。ミシンモータ112は主軸を回転駆動する。 The pedestal portion 3 extends upward from the rear side of the bed portion 2. The pedestal portion 3 includes a sewing machine motor 112 (see FIG. 4) and the like inside. The arm portion 4 extends forward from the upper end of the pedestal portion 3 toward the upper surface of the bed portion 2. The arm portion 4 includes a spindle (not shown) inside. The sewing machine motor 112 rotationally drives the spindle.

図2に示す如く、ミシン1はアーム部4の前端部7に縫製部35(図4参照)、押え棒12、押え足駆動機構(図示略)、撮影部52等を備える。縫製部35は下端に縫針11を装着可能な針棒10を有し、被縫製物に縫目を形成できる。針棒10は前端部7の下端から下方へ延びる。押え棒12は針棒10の左方(図2の背面側)で前端部7下端から下方へ延び、下端に押え足13を装着できる。押え足駆動機構は、主軸の回転駆動に伴う針棒10の上下動に同期して押え棒12を上下動する。 As shown in FIG. 2, the sewing machine 1 includes a sewing portion 35 (see FIG. 4), a pressing rod 12, a pressing foot driving mechanism (not shown), a photographing portion 52, and the like at the front end portion 7 of the arm portion 4. The sewing portion 35 has a needle bar 10 to which the sewing needle 11 can be attached at the lower end, and a stitch can be formed on the object to be sewn. The needle bar 10 extends downward from the lower end of the front end portion 7. The presser bar 12 extends downward from the lower end of the front end portion 7 on the left side (back side in FIG. 2) of the needle bar 10, and the presser foot 13 can be attached to the lower end. The presser foot drive mechanism moves the presser bar 12 up and down in synchronization with the vertical movement of the needle bar 10 accompanying the rotational drive of the spindle.

押え足13は、縫針11が被縫製物から抜ける時に、上方から被縫製物を押えることで、被縫製物が上方へ浮き上がるのを防止する間欠押えである。押え足13の下端部は円筒状の筒部131である。筒部131は間欠的に被縫製物と接触する。筒部131の直径は押え足13の種類により異なり、例えば3〜8mmである。縫針11は筒部131の貫通穴を通って被縫製物に刺さる。縫針11は筒部131下方の針穴28を通って上下動する。 The presser foot 13 is an intermittent presser foot that prevents the sewn object from floating upward by pressing the sewn object from above when the sewing needle 11 comes out of the sewn object. The lower end of the presser foot 13 is a cylindrical tubular portion 131. The tubular portion 131 intermittently comes into contact with the sewn object. The diameter of the tubular portion 131 varies depending on the type of the presser foot 13, and is, for example, 3 to 8 mm. The sewing needle 11 is pierced into the object to be sewn through the through hole of the tubular portion 131. The sewing needle 11 moves up and down through the needle hole 28 below the tubular portion 131.

ミシン1はアーム部4の前端部7右側面に上糸55を案内する為の構成として副糸調子器15、糸調子器16、糸案内17、18、天秤19、糸案内20を備える。上糸55はテーブル95(図1参照)に設けた糸駒立てに載置した糸駒から、副糸調子器15、糸調子器16、糸案内17、糸案内18、天秤19、糸案内20を経由し、縫針11の針孔111に挿通する。 The sewing machine 1 includes an auxiliary thread tensioner 15, a thread tensioner 16, thread guides 17, 18, a balance 19, and a thread guide 20 as a configuration for guiding the needle thread 55 to the right side surface of the front end portion 7 of the arm portion 4. The needle thread 55 is from a thread piece placed on a thread piece stand provided on a table 95 (see FIG. 1), a secondary thread tensioner 15, a thread tensioner 16, a thread guide 17, a thread guide 18, a balance 19, and a thread guide 20. It is inserted into the needle hole 111 of the sewing needle 11 via the above.

撮影部52は、ミシン1の機枠に設けた支持部51に固定する。支持部51は針棒10の前方に設ける。撮影部52は例えば周知のCMOSイメージセンサである。撮影部52のレンズは下方に向き、布保持枠80の溝87を撮影する。 The photographing unit 52 is fixed to the support unit 51 provided on the machine frame of the sewing machine 1. The support portion 51 is provided in front of the needle bar 10. The photographing unit 52 is, for example, a well-known CMOS image sensor. The lens of the photographing unit 52 faces downward and photographs the groove 87 of the cloth holding frame 80.

図3を参照し、布保持枠80、保持部70を説明する。以下説明にて、布保持枠80の向きは、図1に示す保持部70が布保持枠80を保持した時のミシン1の向きに倣う。布保持枠80は矩形板状の下板81と上板82を備える。下板81、上板82は合成樹脂製である。下板81、上板82は例えば金属製であってもよい。上板82の大きさは下板81の大きさよりも小さい。 The cloth holding frame 80 and the holding portion 70 will be described with reference to FIG. In the following description, the orientation of the cloth holding frame 80 follows the orientation of the sewing machine 1 when the holding portion 70 shown in FIG. 1 holds the cloth holding frame 80. The cloth holding frame 80 includes a rectangular plate-shaped lower plate 81 and an upper plate 82. The lower plate 81 and the upper plate 82 are made of synthetic resin. The lower plate 81 and the upper plate 82 may be made of metal, for example. The size of the upper plate 82 is smaller than the size of the lower plate 81.

上板82は中央部に溝87を有する。溝87は、上板82を上下に貫通する。溝87の幅方向の長さは、押え足13の筒部131の直径よりも長く、例えば、5〜20mmである。溝87の幅方向は、溝87の延設方向に対し直交する方向である。溝87は縫製時に縫針11が通過する経路89を囲う。 The upper plate 82 has a groove 87 in the central portion. The groove 87 penetrates the upper plate 82 up and down. The length of the groove 87 in the width direction is longer than the diameter of the tubular portion 131 of the presser foot 13, for example, 5 to 20 mm. The width direction of the groove 87 is a direction orthogonal to the extending direction of the groove 87. The groove 87 surrounds the path 89 through which the sewing needle 11 passes during sewing.

下板81は上板82の下方に配置する。下板81の後端部83は上板82後端の後方に突出する。下板81は後端部83上面に左右方向に延びる金属板84、蝶番85、一対のピン86を備える。上板82は後端の二箇所を蝶番85で下板81の金属板84に固定する。上板82の前端は蝶番85を支点に上下方向に揺動できる。一対のピン86は、金属板84の左右両端部近傍に設ける。一対のピン86は、金属板84上面から上方へ突出する。 The lower plate 81 is arranged below the upper plate 82. The rear end 83 of the lower plate 81 projects rearward of the rear end of the upper plate 82. The lower plate 81 includes a metal plate 84 extending in the left-right direction, a hinge 85, and a pair of pins 86 on the upper surface of the rear end portion 83. The upper plate 82 has two rear ends fixed to the metal plate 84 of the lower plate 81 with hinges 85. The front end of the upper plate 82 can swing in the vertical direction with the hinge 85 as a fulcrum. The pair of pins 86 are provided near the left and right ends of the metal plate 84. The pair of pins 86 project upward from the upper surface of the metal plate 84.

下板81は中央部に溝88と窪み部(図示略)を有する。溝88は下板81を上下方向に貫通する。溝88は、縫製時に縫針11が通過する穴である。溝88の形状は、上板82の溝87の形状と略一致する。窪み部は下板81上面から下面へ向けて窪んだ、被縫製物の特定形状に対応する形状の部分である。貫通穴は窪み部内に形成する。窪み部は縫製中の被縫製物の位置ずれを防ぐ。 The lower plate 81 has a groove 88 and a recess (not shown) in the central portion. The groove 88 penetrates the lower plate 81 in the vertical direction. The groove 88 is a hole through which the sewing needle 11 passes during sewing. The shape of the groove 88 substantially matches the shape of the groove 87 of the upper plate 82. The recessed portion is a portion having a shape corresponding to a specific shape of the sewn object, which is recessed from the upper surface to the lower surface of the lower plate 81. The through hole is formed in the recess. The recessed portion prevents misalignment of the object to be sewn during sewing.

布保持枠80に被縫製物を保持する時、ユーザは上板82下面と下板81上面を離して下板81上の窪み部に被縫製物を嵌め込む。ユーザは上板82下面と下板81上面を近づけて上板82と下板81の間に被縫製物を挟む。布保持枠80を保持部70に装着し、布保持枠80の上面を押え枠63で押えた時、溝87は、押え枠63内側の縫製領域内にある(図1参照)。尚、溝87、88、窪み部の形状、大きさ、配置は布保持枠80の種類に応じて異なる。 When holding the sewn object in the cloth holding frame 80, the user separates the lower surface of the upper plate 82 and the upper surface of the lower plate 81 and fits the sewn object into the recessed portion on the lower plate 81. The user brings the lower surface of the upper plate 82 and the upper surface of the lower plate 81 close to each other and sandwiches the sewn object between the upper plate 82 and the lower plate 81. When the cloth holding frame 80 is attached to the holding portion 70 and the upper surface of the cloth holding frame 80 is pressed by the pressing frame 63, the groove 87 is in the sewing area inside the pressing frame 63 (see FIG. 1). The shapes, sizes, and arrangements of the grooves 87 and 88 and the recesses differ depending on the type of the cloth holding frame 80.

保持部70は、本体部71、エアシリンダ73、左右一対の連結部74、左右一対の把持部75、及び二つのセンサ76を備える。本体部71は左右方向に延びる。本体部71は左右両端部に本体部71を後方に切り欠いた支持溝72を有する。各支持溝72は平面視略U字状であり、前端側が本体部71側面に開放する。エアシリンダ73は本体部71上面の左右方向中央部に設ける。連結部74はエアシリンダ73の左右両端から夫々左右に延びる。左側の連結部74はエアシリンダ73に固定する。右側の連結部74はエアシリンダ73のピストンロッドに固定する。把持部75の一端部は各連結部74の先端部に回動可能に連結する。把持部75の他端部の形状は鉤状である。把持部75は本体部71の左右両端部下方に夫々配置する。把持部75は中央部で本体部71に回動可能に連結する。 The holding portion 70 includes a main body portion 71, an air cylinder 73, a pair of left and right connecting portions 74, a pair of left and right grip portions 75, and two sensors 76. The main body 71 extends in the left-right direction. The main body 71 has support grooves 72 at both left and right ends, with the main body 71 cut out rearward. Each support groove 72 has a substantially U-shape in a plan view, and the front end side opens to the side surface of the main body 71. The air cylinder 73 is provided at the center of the upper surface of the main body 71 in the left-right direction. The connecting portion 74 extends from the left and right ends of the air cylinder 73 to the left and right, respectively. The left connecting portion 74 is fixed to the air cylinder 73. The connecting portion 74 on the right side is fixed to the piston rod of the air cylinder 73. One end of the grip 75 is rotatably connected to the tip of each connecting 74. The shape of the other end of the grip portion 75 is hook-shaped. The grip portions 75 are arranged below the left and right end portions of the main body portion 71, respectively. The grip portion 75 is rotatably connected to the main body portion 71 at the central portion.

エアシリンダ73が駆動しピストンロッドが突出すると、左側の連結部74は左方に移動し、右側の連結部74は右方に移動する。エアシリンダ73の駆動に応じて一対の連結部74が夫々左右に移動すると、一対の把持部75は本体部71の連結位置を中心に夫々回動する。左側の把持部75と右側の把持部75は互いに平面視反対方向に回動する。把持部75は開放位置と把持位置の間で回動する。開放位置は、支持溝72が本体部71前方に開放した状態となる位置である。把持位置は支持溝72前端を塞ぐ位置である。二つのセンサ76は夫々、本体部71左右両端部よりも中央側に設ける周知の近接センサである。 When the air cylinder 73 is driven and the piston rod protrudes, the left connecting portion 74 moves to the left and the right connecting portion 74 moves to the right. When the pair of connecting portions 74 move to the left and right in response to the drive of the air cylinder 73, the pair of gripping portions 75 rotate around the connecting position of the main body portion 71, respectively. The grip portion 75 on the left side and the grip portion 75 on the right side rotate in opposite directions in a plan view. The grip portion 75 rotates between the open position and the grip position. The open position is a position in which the support groove 72 is open to the front of the main body 71. The gripping position is a position that closes the front end of the support groove 72. Each of the two sensors 76 is a well-known proximity sensor provided on the center side of the left and right ends of the main body 71.

布保持枠80を保持部70に装着する時、ユーザはエアシリンダ73を駆動して把持部75を開放位置にし、布保持枠80の各ピン86を対応する支持溝72に嵌める。ユーザはエアシリンダ73を駆動して把持部75を把持位置にし、把持部75と支持溝72で布保持枠80のピン86を把持する。布保持枠80を保持部70に装着した時、二つのセンサ76はオフ状態からオン状態となる。保持部70は溝87、88、窪み部の形状、大きさ、配置が互いに異なる複数種類の布保持枠80の中から選択した1つの布保持枠80を装着できる。 When the cloth holding frame 80 is attached to the holding portion 70, the user drives the air cylinder 73 to open the grip portion 75 and fits each pin 86 of the cloth holding frame 80 into the corresponding support groove 72. The user drives the air cylinder 73 to put the grip portion 75 in the grip position, and grips the pin 86 of the cloth holding frame 80 with the grip portion 75 and the support groove 72. When the cloth holding frame 80 is attached to the holding portion 70, the two sensors 76 go from the off state to the on state. The holding portion 70 can be fitted with one cloth holding frame 80 selected from a plurality of types of cloth holding frames 80 having different shapes, sizes, and arrangements of the grooves 87 and 88 and the recessed portions.

図4を参照しミシン1の電気的構成を説明する。ミシン1の制御装置21は、CPU41、ROM42、RAM43、記憶装置44、入出力インターフェース(I/F)106、駆動回路113、115、117、通信I/F127を備える。CPU41、ROM42、RAM43、記憶装置44は、バス105を介して入出力I/F106に電気的に接続する。CPU41は、ミシン1の制御を司り、ROM42が記憶する各種プログラムに従って、縫製に関わる各種演算と処理を実行する。ROM42は各種プログラム、各種初期設定パラメータを記憶する。RAM43はCPU41の演算結果、ポインタ、カウンタ等を一時的に記憶する。記憶装置44は、複数の模様(縫目線、縫目模様、刺繍模様等)の後述の縫製データ等を記憶する。 The electrical configuration of the sewing machine 1 will be described with reference to FIG. The control device 21 of the sewing machine 1 includes a CPU 41, a ROM 42, a RAM 43, a storage device 44, an input / output interface (I / F) 106, drive circuits 113, 115, 117, and a communication I / F 127. The CPU 41, ROM 42, RAM 43, and storage device 44 are electrically connected to the input / output I / F 106 via the bus 105. The CPU 41 controls the sewing machine 1 and executes various operations and processes related to sewing according to various programs stored in the ROM 42. The ROM 42 stores various programs and various initial setting parameters. The RAM 43 temporarily stores the calculation result of the CPU 41, a pointer, a counter, and the like. The storage device 44 stores sewing data and the like described later for a plurality of patterns (sewing lines, stitch patterns, embroidery patterns, etc.).

駆動回路113、115、117は、入出力I/F106に電気的に接続する。駆動回路113はミシンモータ112に電気的に接続する。CPU41は駆動回路113を介してミシンモータ112を制御する。ミシンモータ112は主軸を回転駆動する。駆動回路115はX軸モータ114に電気的に接続する。駆動回路117はY軸モータ116に電気的に接続する。CPU41は駆動回路115、117を介してX軸モータ114、Y軸モータ116を夫々制御する。X軸モータ114、Y軸モータ116は夫々パルスモータであり、X軸移動機構、Y軸移動機構を駆動することで、布保持枠80をX軸方向、Y軸方向に移動する。CPU41は縫製時にミシンモータ112を駆動して主軸を回転駆動することで、針棒10、押え棒12の上下動と垂直釜の回転を制御する。CPU41は、ミシンモータ112の駆動と同時に縫製データによりX軸モータ114、Y軸モータ116を駆動することで、布保持枠80の位置を制御し、被縫製物上に縫製を行う。 The drive circuits 113, 115 and 117 are electrically connected to the input / output I / F 106. The drive circuit 113 is electrically connected to the sewing machine motor 112. The CPU 41 controls the sewing machine motor 112 via the drive circuit 113. The sewing machine motor 112 rotationally drives the spindle. The drive circuit 115 is electrically connected to the X-axis motor 114. The drive circuit 117 is electrically connected to the Y-axis motor 116. The CPU 41 controls the X-axis motor 114 and the Y-axis motor 116, respectively, via the drive circuits 115 and 117. The X-axis motor 114 and the Y-axis motor 116 are pulse motors, respectively, and move the cloth holding frame 80 in the X-axis direction and the Y-axis direction by driving the X-axis movement mechanism and the Y-axis movement mechanism, respectively. The CPU 41 drives the sewing machine motor 112 to rotate the spindle at the time of sewing, thereby controlling the vertical movement of the needle bar 10 and the presser bar 12 and the rotation of the vertical kettle. The CPU 41 controls the position of the cloth holding frame 80 by driving the X-axis motor 114 and the Y-axis motor 116 based on the sewing data at the same time as driving the sewing machine motor 112, and sew on the object to be sewn.

通信I/F127は入出力I/F106に電気的に接続する。通信I/F127は例えばシリアル通信用のインターフェースである。ミシン1は通信I/F127を介して外部機器に接続可能である。ミシン1はケーブル9を介し操作箱30と接続する。X方向原点センサ118、Y方向原点センサ119、起動スイッチ121、操作パネル8、撮影部52、センサ76は夫々ミシン1の入出力I/F106に電気的に接続する。 The communication I / F 127 is electrically connected to the input / output I / F 106. The communication I / F 127 is, for example, an interface for serial communication. The sewing machine 1 can be connected to an external device via the communication I / F 127. The sewing machine 1 is connected to the operation box 30 via a cable 9. The X-direction origin sensor 118, the Y-direction origin sensor 119, the start switch 121, the operation panel 8, the photographing unit 52, and the sensor 76 are electrically connected to the input / output I / F 106 of the sewing machine 1, respectively.

X方向原点センサ118は原点設定用の周知の構成のセンサであり、X軸移動機構に設ける。Y方向原点センサ119は原点設定用の周知の構成のセンサであり、Y軸移動機構に設ける。起動スイッチ121はテーブル95下方に設置し、ミシン1にコードで接続するペダル式スイッチである。ユーザはミシン1の各種動作(例えば縫製処理)を開始する時に起動スイッチ121を踏み込む。 The X-direction origin sensor 118 is a sensor having a well-known configuration for setting the origin, and is provided in the X-axis moving mechanism. The Y-direction origin sensor 119 is a sensor having a well-known configuration for setting the origin, and is provided in the Y-axis moving mechanism. The start switch 121 is a pedal-type switch installed below the table 95 and connected to the sewing machine 1 with a cord. The user depresses the start switch 121 when starting various operations (for example, sewing process) of the sewing machine 1.

操作パネル8はテーブル95上に設け、各種情報、各種指示を入力する為のキー群と情報表示用のディスプレイを備える。操作箱30は、各種情報、各種指示を入力する為のキー群、及び情報表示用のディスプレイとしてLCD32を備え、LCD32は、通信I/F127を介してCPU41等と接続する。ユーザは情報又は指示を入力する時、操作パネル8又は操作箱30を使用する。操作パネル8、操作箱30は、コードを介して制御箱(図示略)に接続する。制御箱は、テーブル95下方で制御装置21(図4参照)を格納する。 The operation panel 8 is provided on the table 95, and includes a group of keys for inputting various information and various instructions and a display for displaying information. The operation box 30 includes a key group for inputting various information and various instructions, and an LCD 32 as a display for displaying information, and the LCD 32 is connected to a CPU 41 or the like via a communication I / F 127. The user uses the operation panel 8 or the operation box 30 when inputting information or instructions. The operation panel 8 and the operation box 30 are connected to the control box (not shown) via a cord. The control box stores the control device 21 (see FIG. 4) below the table 95.

記憶装置44は、ユーザにより編集した縫製データ、ユーザが入力した各種設定情報等を記憶する。縫製データは、布保持枠80の溝87、88の内側となる経路89に沿って縫目を形成する為のデータである。縫製データは、経路89に沿って縫目を形成する為の複数の針落ち点の位置(以下、「針落ち位置」という。)を、針棒10に対する布保持枠80の相対位置で示すデータである。針落ち位置は、針棒10と共に縫針11が下方に移動した時に、縫針11が刺さることを予定した被縫製物の位置である。 The storage device 44 stores sewing data edited by the user, various setting information input by the user, and the like. The sewing data is data for forming a seam along a path 89 inside the grooves 87 and 88 of the cloth holding frame 80. The sewing data is data showing the positions of a plurality of needle drop points (hereinafter, referred to as "needle drop positions") for forming a stitch along the path 89 as the relative positions of the cloth holding frame 80 with respect to the needle bar 10. Is. The needle drop position is the position of the sewn object that the sewing needle 11 is scheduled to pierce when the sewing needle 11 moves downward together with the needle bar 10.

図3に示す如く、針落ち位置は、座標系39の座標データで示す。座標系39は、X軸モータ114、Y軸モータ116の座標系である。縫製データは、X軸モータ114、Y軸モータ116の夫々の駆動パルス数(回転方向を含む)と「縫製」又は「送り」を示す種別を対応付けて、順に並んでいる。「縫製」は、布保持枠80を移動し且つ縫針11を針落ち位置で被縫製物に刺して縫目を形成する動作である。「送り」は、縫目を形成せず布保持枠80の移動のみ行う動作である。 As shown in FIG. 3, the needle drop position is indicated by the coordinate data of the coordinate system 39. The coordinate system 39 is the coordinate system of the X-axis motor 114 and the Y-axis motor 116. The sewing data are arranged in order in association with the number of drive pulses (including the rotation direction) of each of the X-axis motor 114 and the Y-axis motor 116 and the type indicating "sewing" or "feed". "Sewing" is an operation of moving the cloth holding frame 80 and piercing the sewing needle 11 into the object to be sewn at the needle drop position to form a stitch. The “feed” is an operation in which the cloth holding frame 80 is only moved without forming a seam.

座標系39の原点(X、Y、Z)=(0、0、0)は、布保持枠80が保持部70に装着した状態で、布保持枠80の上板82の中心点が、縫針11の直下にある位置と定めている(図3参照)。つまり、座標系39の原点は、布保持枠80の中心点が、針穴28の真下にある位置である。座標系39では、X軸プラス方向は、ミシン1の左から右に向かう方向である。Y軸プラス方向は、ミシン1の前から後に向かう方向である。送り機構6は、縫製中に布保持枠80をミシン1の上下方向であるZ方向に移動しない。故に、針落ち位置の座標データのZ座標は常に零である。 The origin (X, Y, Z) = (0, 0, 0) of the coordinate system 39 is such that the cloth holding frame 80 is attached to the holding portion 70, and the center point of the upper plate 82 of the cloth holding frame 80 is the sewing needle. It is defined as the position directly below No. 11 (see FIG. 3). That is, the origin of the coordinate system 39 is the position where the center point of the cloth holding frame 80 is directly below the needle hole 28. In the coordinate system 39, the X-axis plus direction is the direction from the left to the right of the sewing machine 1. The Y-axis plus direction is the direction from the front to the back of the sewing machine 1. The feed mechanism 6 does not move the cloth holding frame 80 in the Z direction, which is the vertical direction of the sewing machine 1, during sewing. Therefore, the Z coordinate of the coordinate data of the needle drop position is always zero.

布保持枠80の種類と縫製データは、互いに対応付けて記憶装置44に記憶する。CPU41は縫製データを順に読み出し、座標データが示す針落ち位置が、縫針11の直下に位置するように、順に布保持枠80を移動しながら縫製を行う。縫製データは、上記の他、針落ち位置の座標データと種別を対応付けたデータでもよい。CPU41は、布保持枠80の移動の都度、座標データによりX軸モータ114、Y軸モータ116の夫々の回転方向と駆動パルス数を算出してもよい。 The type of the cloth holding frame 80 and the sewing data are stored in the storage device 44 in association with each other. The CPU 41 reads sewing data in order, and performs sewing while moving the cloth holding frame 80 in order so that the needle drop position indicated by the coordinate data is located directly below the sewing needle 11. In addition to the above, the sewing data may be data in which the coordinate data of the needle drop position is associated with the type. The CPU 41 may calculate the rotation direction and the number of drive pulses of the X-axis motor 114 and the Y-axis motor 116 from the coordinate data each time the cloth holding frame 80 moves.

撮影部52は針棒10の前方となる撮影範囲45(図3参照)を撮影した分割画像25の画像データをCPU41に出力する。分割画像25の撮影座標系は世界座標系と予め対応付ける。世界座標系は空間全体を示す座標系であり、撮影部52の撮影対象の重心等の影響がない座標系である。ミシン1は撮影座標系の座標について、世界座標系を介して座標系39の座標に変換する。撮影範囲45(図3参照)の撮影座標系と世界座標系との対応は記憶装置44が記憶する。従って、ミシン1は、撮影座標系を変換した座標系39と、対応する縫製データの座標系39の座標データに基づき各種処理を実行できる。 The photographing unit 52 outputs the image data of the divided image 25 in which the photographing range 45 (see FIG. 3) in front of the needle bar 10 is photographed to the CPU 41. The shooting coordinate system of the divided image 25 is associated with the world coordinate system in advance. The world coordinate system is a coordinate system that indicates the entire space, and is a coordinate system that is not affected by the center of gravity of the object to be photographed by the photographing unit 52. The sewing machine 1 converts the coordinates of the photographing coordinate system into the coordinates of the coordinate system 39 via the world coordinate system. The storage device 44 stores the correspondence between the shooting coordinate system in the shooting range 45 (see FIG. 3) and the world coordinate system. Therefore, the sewing machine 1 can execute various processes based on the coordinate system 39 obtained by converting the shooting coordinate system and the coordinate data of the corresponding sewing data coordinate system 39.

図5〜図8を参照し、ミシン1の縫製データ補正処理の概要を説明する。ミシン1は、縫製データを処理する縫製データ処理装置としての機能を有する。ミシン1は、布保持枠80の上板82と、針棒10に装着した縫針11及び押え足13の筒部131とが干渉することを防ぐ為の縫製データを作成する。ミシン1は、以下に説明する統計的手法を用いることで、縫製データの補正を実行する。 The outline of the sewing data correction process of the sewing machine 1 will be described with reference to FIGS. 5 to 8. The sewing machine 1 has a function as a sewing data processing device that processes sewing data. The sewing machine 1 creates sewing data for preventing the upper plate 82 of the cloth holding frame 80 from interfering with the sewing needle 11 attached to the needle bar 10 and the tubular portion 131 of the presser foot 13. The sewing machine 1 corrects the sewing data by using the statistical method described below.

全体画像68の取得処理について説明する。縫製前、ミシン1は、例えば一針毎に、縫製データが示す針落ち位置に対応する布保持枠80の溝87を撮影する。該時、ミシン1は、縫製データが示す針落ち位置に対して、前後方向への所定のオフセット量でデータ変換を行う。尚、オフセット量は、前後方向において、縫針11の中心位置と撮影部52の撮像素子の中心位置までの距離L1(図2参照)が適用される。 The acquisition process of the entire image 68 will be described. Before sewing, the sewing machine 1 photographs, for example, the groove 87 of the cloth holding frame 80 corresponding to the needle drop position indicated by the sewing data for each stitch. At this time, the sewing machine 1 performs data conversion with a predetermined offset amount in the front-rear direction with respect to the needle drop position indicated by the sewing data. As the offset amount, the distance L1 (see FIG. 2) between the center position of the sewing needle 11 and the center position of the image sensor of the photographing unit 52 is applied in the front-rear direction.

撮影時、ミシン1は、距離L1を適用した縫製データ(以下、「変換データ」ともいう。)に基づき布保持枠80を移動する。布保持枠80は、元の縫製データで移動する場合に比して距離L1の分前方で移動する。これにより、布保持枠80は、撮影部52の直下に溝87が位置するように移動する。ミシン1は、撮影部52の撮影範囲45の所定位置を、縫製データの仮想的な針落ち位置として縫製データを変換している。 At the time of shooting, the sewing machine 1 moves the cloth holding frame 80 based on sewing data (hereinafter, also referred to as “conversion data”) to which the distance L1 is applied. The cloth holding frame 80 moves forward by a distance L1 as compared with the case where the cloth holding frame 80 moves based on the original sewing data. As a result, the cloth holding frame 80 moves so that the groove 87 is located directly below the photographing unit 52. The sewing machine 1 converts the sewing data by using a predetermined position of the photographing range 45 of the photographing unit 52 as a virtual needle drop position of the sewing data.

ミシン1は、変換データに基づく布保持枠80の移動と、撮影部52による布保持枠80の溝87の分割画像25の撮影を繰り返す。ミシン1は、撮影部52が溝87を一部分ずつ撮影することにより複数の分割画像25を取得する。複数の分割画像25は、溝87の全体を含む全体画像68を構成する。例えば、図6、図7に示す如く、全体画像68は、26回の撮影による分割画像25A〜25Zにより構成する。 The sewing machine 1 repeats the movement of the cloth holding frame 80 based on the conversion data and the photographing of the divided image 25 of the groove 87 of the cloth holding frame 80 by the photographing unit 52. The sewing machine 1 acquires a plurality of divided images 25 by photographing the groove 87 part by part by the photographing unit 52. The plurality of divided images 25 constitute an entire image 68 including the entire groove 87. For example, as shown in FIGS. 6 and 7, the entire image 68 is composed of divided images 25A to 25Z taken 26 times.

図5〜図7を参照して、二値化処理について説明する。ミシン1は、複数の分割画像25に対して二値化処理を実行する。例えばミシン1は、布保持枠80の上板82を黒色、上板82の溝87から外部に露出する被縫製物を白色で示す画像を得る。二値化処理を行った複数の分割画像25のデータは、撮影座標系に対応する座標系39の座標データとして、記憶装置44に夫々記憶する。 The binarization process will be described with reference to FIGS. 5 to 7. The sewing machine 1 executes binarization processing on a plurality of divided images 25. For example, the sewing machine 1 obtains an image showing the upper plate 82 of the cloth holding frame 80 in black and the sewn object exposed to the outside from the groove 87 of the upper plate 82 in white. The data of the plurality of divided images 25 that have been binarized are stored in the storage device 44 as the coordinate data of the coordinate system 39 corresponding to the shooting coordinate system.

図5(a)、(b)を参照して、一枚の分割画像25Aの溝87と設定範囲Cとの位置関係を説明する。図5に示す設定範囲Cは、縫製データが示す仮想針落ち位置Pを中心とする半径Rの円状の範囲である。設定範囲Cは、ミシン1の押え足13が間欠的に被縫製物と接する範囲を含む。図5(a)は、布保持枠80が理想的な位置に配置する場合を想定し、図5(b)は、機器の寸法誤差等の影響により、布保持枠80が理想的な位置からずれて配置する場合を想定する。 The positional relationship between the groove 87 of one divided image 25A and the setting range C will be described with reference to FIGS. 5A and 5B. The setting range C shown in FIG. 5 is a circular range having a radius R centered on the virtual needle drop position P indicated by the sewing data. The setting range C includes a range in which the presser foot 13 of the sewing machine 1 intermittently contacts the sewn object. FIG. 5A assumes a case where the cloth holding frame 80 is arranged at an ideal position, and FIG. 5B shows a case where the cloth holding frame 80 is arranged from an ideal position due to the influence of dimensional error of the device or the like. It is assumed that they are arranged out of alignment.

図5(a)に示す分割画像25Aでは、設定範囲Cは、黒色で示す部分、即ち上板82を含まない。故に、ミシン1は、設定範囲Cが溝87内に収まるので、仮想針落ち位置Pを縫製できると判断する。この場合、布保持枠80と縫針11とが干渉する可能性は低い。 In the divided image 25A shown in FIG. 5A, the setting range C does not include the portion shown in black, that is, the upper plate 82. Therefore, the sewing machine 1 determines that the virtual needle drop position P can be sewn because the set range C fits in the groove 87. In this case, the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other is low.

図5(b)に示す分割画像25Aでは、設定範囲Cは、黒色で示す部分、即ち上板82と一部が重なる。この場合、ミシン1は、設定範囲Cが溝87内に収まらないので、仮想針落ち位置Pを縫製できないと判断する。この場合、布保持枠80と縫針11とが干渉する可能性は高い。 In the divided image 25A shown in FIG. 5B, the setting range C partially overlaps with the black portion, that is, the upper plate 82. In this case, the sewing machine 1 determines that the virtual needle drop position P cannot be sewn because the set range C does not fit in the groove 87. In this case, there is a high possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other.

ミシン1は、例えば、溝87の全体画像68(図6参照)を構成する全ての分割画像25A〜25Zに対して、縫製データにおける仮想針落ち位置P毎に、設定範囲Cとの位置関係を判断していく。例えば、図6に示す分割画像25A〜25Zについて、設定範囲Cと布保持枠80が重なるか否かを判断する。 For example, the sewing machine 1 sets the positional relationship with the set range C for each virtual needle drop position P in the sewing data with respect to all the divided images 25A to 25Z constituting the entire image 68 (see FIG. 6) of the groove 87. I will judge. For example, with respect to the divided images 25A to 25Z shown in FIG. 6, it is determined whether or not the set range C and the cloth holding frame 80 overlap.

割合算出処理について説明する。ミシン1は、全ての分割画像25に対して、対応する仮想針落ち位置Pの設定範囲Cが溝87に収まるかを判断する。ミシン1は、全ての分割画像25のうち、設定範囲Cが溝87に収まると判断した分割画像25の割合を算出する。尚、ミシン1が算出した割合は、記憶装置44に記憶する。 The ratio calculation process will be described. The sewing machine 1 determines whether the set range C of the corresponding virtual needle drop position P fits in the groove 87 for all the divided images 25. The sewing machine 1 calculates the ratio of the divided images 25 that are determined that the set range C fits in the groove 87 among all the divided images 25. The ratio calculated by the sewing machine 1 is stored in the storage device 44.

図6(a)に示す設定範囲Cは、分割画像25Aの上板82を示す黒色で示す部分と干渉しない。図6(b)に示す設定範囲Cは、分割画像25Jの上板82を示す黒色で示す部分と干渉する。図6(c)に示す設定範囲Cは、分割画像25Cの上板82の黒色で示す部分と干渉する。例えば、他の分割画像25において設定範囲Cが黒色で示す部分、即ち上板82と重ならないとする。全ての分割画像25A〜25Zの画像総数は26枚であり、且つ分割画像25J、25Z以外の24枚の分割画像25において設定範囲Cと上板82と重ならない。該時、ミシン1は、全ての分割画像25A〜25Zに対して、縫針11が布保持枠80と干渉しない分割画像25の割合が約92%であると算出する。 The setting range C shown in FIG. 6A does not interfere with the black portion showing the upper plate 82 of the divided image 25A. The setting range C shown in FIG. 6B interferes with the black portion showing the upper plate 82 of the divided image 25J. The setting range C shown in FIG. 6C interferes with the black portion of the upper plate 82 of the divided image 25C. For example, it is assumed that the set range C does not overlap with the portion shown in black in the other divided image 25, that is, the upper plate 82. The total number of images of all the divided images 25A to 25Z is 26, and the set range C and the upper plate 82 do not overlap with the set range C and the upper plate 82 in the 24 divided images 25 other than the divided images 25J and 25Z. At this time, the sewing machine 1 calculates that the ratio of the divided images 25 in which the sewing needle 11 does not interfere with the cloth holding frame 80 is about 92% with respect to all the divided images 25A to 25Z.

算出した割合が100%でない場合、ミシン1は、当該縫製データに基づき縫製を実行すると、縫針11と布保持枠80が干渉する可能性が高い。一方で、ミシン1は、算出した割合が100%である場合、ミシン1は、当該縫製データに基づき縫製を実行すると、縫針11と布保持枠80は干渉せずに縫製できる可能性が高い。 If the calculated ratio is not 100%, the sewing machine 1 is likely to interfere with the sewing needle 11 and the cloth holding frame 80 when sewing is executed based on the sewing data. On the other hand, when the calculated ratio of the sewing machine 1 is 100%, if the sewing machine 1 executes sewing based on the sewing data, there is a high possibility that the sewing needle 11 and the cloth holding frame 80 can be sewn without interfering with each other.

移動量(X、Y、θ)について説明する。ミシン1は、縫製データに対して、所定の直交座標系(X、Y)及び極座標系(θ)により示す移動量の適用が可能である。ミシン1は、複数の分割画像25の夫々の溝87の位置に対する、座標データの仮想針落ち位置Pの相対位置を、所定の移動量(X、Y、θ)に応じて移動する。以下に、詳細に説明する。 The movement amount (X, Y, θ) will be described. The sewing machine 1 can apply the movement amount indicated by the predetermined Cartesian coordinate system (X, Y) and the polar coordinate system (θ) to the sewing data. The sewing machine 1 moves the relative position of the virtual needle drop position P of the coordinate data with respect to the position of each groove 87 of the plurality of divided images 25 according to a predetermined movement amount (X, Y, θ). The details will be described below.

回転方向への傾きを適用するθ適用処理について説明する。ミシン1は、移動量(θ)をパラメータとして、縫製データを複数作成する。極座標系において移動量(θ)は、例えば、平面視において、縫製データの中心位置、即ち、図3における座標系39の原点を中央として、−3°〜3°までを想定する。移動量(θ)の移動量を適用した縫製データは、平面視において、原点(X、Y、θ)=(0、0、0)を中心として、反時計回り方向に−3°、時計回り方向に3°まで縫製データを回転する。例えば縫製データは、−3°〜3°まで1°毎に回転方向への移動量(θ)を適用した6パターン生成する。 The θ application process for applying the inclination in the rotation direction will be described. The sewing machine 1 creates a plurality of sewing data with the movement amount (θ) as a parameter. In the polar coordinate system, the movement amount (θ) is assumed to be, for example, from -3 ° to 3 ° with the center position of the sewing data, that is, the origin of the coordinate system 39 in FIG. 3 as the center in a plan view. The sewing data to which the movement amount of the movement amount (θ) is applied is -3 ° clockwise in the counterclockwise direction with the origin (X, Y, θ) = (0, 0, 0) as the center in the plan view. Rotate the sewing data up to 3 ° in the direction. For example, for sewing data, 6 patterns are generated by applying the amount of movement (θ) in the rotation direction every 1 ° from -3 ° to 3 °.

次いで、ミシン1は、移動量(θ)を適用した縫製データについて、割合算出処理を実行する。例えば、ミシン1は、移動量(θ)を適用した6パターンの縫製データ毎に割合算出処理を実行していく。図8に示す如く、割合算出処理による割合の算出結果は、例えば、移動量(θ)が−3°の場合が58%、移動量(θ)が−2°の場合が85%、移動量(θ)が−1°の場合が91%、移動量(θ)が0°の場合が93%、移動量(θ)が1°の場合が95%、移動量(θ)が2°の場合が98%、移動量(θ)が3°の場合が93%であるとする。この場合、ミシン1は、最も割合の高い移動量(θ)が2°が最適であると判断する。移動量(θ)が2°の補正を適用した縫製データで縫製を実行した場合、仮想針落ち位置Pと布保持枠80の上板82は最も干渉しにくい。 Next, the sewing machine 1 executes a ratio calculation process for the sewing data to which the movement amount (θ) is applied. For example, the sewing machine 1 executes a ratio calculation process for each sewing data of 6 patterns to which the movement amount (θ) is applied. As shown in FIG. 8, the calculation result of the ratio by the ratio calculation process is, for example, 58% when the movement amount (θ) is -3 °, 85% when the movement amount (θ) is -2 °, and the movement amount. When (θ) is -1 °, 91%, when the movement amount (θ) is 0 °, 93%, when the movement amount (θ) is 1 °, 95%, and when the movement amount (θ) is 2 °. It is assumed that the case is 98% and the movement amount (θ) is 93 °. In this case, the sewing machine 1 determines that the optimum movement amount (θ) having the highest ratio is 2 °. When sewing is executed with sewing data to which the movement amount (θ) is corrected to 2 °, the virtual needle drop position P and the upper plate 82 of the cloth holding frame 80 are most unlikely to interfere with each other.

X−Y方向への移動量(X、Y)の決定する為のX−Y特定処理について説明する。ミシン1は、直交座標系における最適なX−Y方向への移動量(X、Y)を決定する。この場合、ミシン1は、θ適用処理で決定した移動量(θ)を適用した縫製データに対して、更にX方向、Y方向への移動量(X、Y)を適用して縫製データを生成する。 The XY identification process for determining the amount of movement (X, Y) in the XY direction will be described. The sewing machine 1 determines the optimum amount of movement (X, Y) in the XY directions in the Cartesian coordinate system. In this case, the sewing machine 1 generates sewing data by further applying the movement amount (X, Y) in the X direction and the Y direction to the sewing data to which the movement amount (θ) determined in the θ application process is applied. To do.

ミシン1は、撮影部52の撮像素子の1ピクセル毎に対応する移動量を、縫製データに適用可能である。X方向への移動量の範囲は、例えば、布保持枠80の原点を中心として、−5〜5ピクセル分の範囲である。Y方向への移動量の範囲は、例えば、布保持枠80の原点を中心として、−5〜5ピクセル分の範囲である。ミシン1は、X方向に10通り、且つY方向に10通りの移動量(X、Y)を組み合わせる。該時、ミシン1は、100パターンの移動量(X、Y)を適用した縫製データを生成する。 The sewing machine 1 can apply the amount of movement corresponding to each pixel of the image sensor of the photographing unit 52 to the sewing data. The range of the amount of movement in the X direction is, for example, a range of −5 to 5 pixels centered on the origin of the cloth holding frame 80. The range of the amount of movement in the Y direction is, for example, a range of −5 to 5 pixels centered on the origin of the cloth holding frame 80. The sewing machine 1 combines 10 movement amounts (X, Y) in the X direction and 10 movement amounts (X, Y) in the Y direction. At this time, the sewing machine 1 generates sewing data to which 100 patterns of movement amounts (X, Y) are applied.

最適な移動量(θ)が2°である場合を想定してより詳細に説明する。ミシン1は、X方向の移動量を−5に設定し、且つY方向への移動量をパラメータとして、(X、Y、θ)=(−5、−5、2°)、(―5、−4、2°)・・・・・(−5、3、2°)、(−5、4、2°)、(5、5、2°)の10パターンの移動量を適用した縫製データを算出する。次いで、ミシン1は、X方向への移動量を−4に設定し、且つY方向への移動量をパラメータとして、(X、Y、θ)=(−4、−5、2°)、(―4、−4、2°)・・・・・(−4、3、2°)、(−4、4、2°)、(−4、5、2°)の10パターンの移動量を適用した縫製データを算出する。このように、ミシン1は、X方向への移動量を1ピクセル分加え、且つY方向への移動量を−5〜5ピクセル分移動した縫製データを算出する。この処理を繰り返すことにより、ミシン1は100パターンの縫製データを作成する。 A more detailed description will be given assuming that the optimum movement amount (θ) is 2 °. In the sewing machine 1, the movement amount in the X direction is set to -5, and the movement amount in the Y direction is used as a parameter, and (X, Y, θ) = (-5, -5, 2 °), (-5, -4, 2 °) ... (-5, 3, 2 °), (-5, 4, 2 °), (5, 5, 2 °) Sewing data applying 10 patterns of movement amount Is calculated. Next, the sewing machine 1 sets the amount of movement in the X direction to -4 and sets the amount of movement in the Y direction as a parameter, and (X, Y, θ) = (-4, -5, 2 °), ( -4, -4, 2 °) ... (-4, 3, 2 °), (-4, 4, 2 °), (-4, 5, 2 °) 10 patterns of movement amount Calculate the applied sewing data. In this way, the sewing machine 1 calculates the sewing data in which the movement amount in the X direction is added by 1 pixel and the movement amount in the Y direction is moved by −5 to 5 pixels. By repeating this process, the sewing machine 1 creates sewing data of 100 patterns.

次いで、ミシン1は、X−Y方向への移動量(X、Y)を適用した夫々の縫製データと溝87の位置に対して、上記した割合算出処理を実行する。例えば、ミシン1は、移動量(X、Y)を適用した100パターンの縫製データに対して、割合算出処理により割合を算出する。 Next, the sewing machine 1 executes the above-mentioned ratio calculation process for each sewing data to which the movement amount (X, Y) in the XY directions is applied and the position of the groove 87. For example, the sewing machine 1 calculates a ratio by a ratio calculation process for sewing data of 100 patterns to which the movement amount (X, Y) is applied.

最大割合特定処理について説明する。ミシン1は、移動量(X、Y、θ)を適用した100パターンの縫製データに対して算出した各割合のうち、最も高い割合を選択する。この場合、最も高い割合が一つのみの場合と、複数ある場合がある。ミシン1は、最も高い割合を一つのみ特定した場合には、特定した1つの割合に対応する移動量(X、Y、θ)を補正量として決定する。即ち、CPU41は、検出した複数の割合のうち、最大となる割合の移動量に応じて、補正量(X、Y、θ)を算出する。 The maximum ratio identification process will be described. The sewing machine 1 selects the highest ratio among the calculated ratios for the sewing data of 100 patterns to which the movement amount (X, Y, θ) is applied. In this case, the highest ratio may be only one or a plurality. When only one of the highest ratios is specified, the sewing machine 1 determines the movement amount (X, Y, θ) corresponding to the specified one ratio as the correction amount. That is, the CPU 41 calculates the correction amount (X, Y, θ) according to the movement amount of the maximum ratio among the plurality of detected ratios.

平均値取得処理について説明する。ミシン1は、最も高い割合が複数ある場合、複数の移動量(X、Y、θ)に対して、更に、X−Y補正処理を実行する。X−Y補正処理では、ミシン1は、複数の最も高い割合のX−Yの移動量(X、Y)について、X方向、及びY方向への移動量の平均値を夫々算出する。ミシン1は、算出した平均値を移動量(X、Y)として決定する。これにより、ミシン1は、決定した移動量(X、Y、θ)について、補正量として決定する。 The average value acquisition process will be described. When the sewing machine 1 has a plurality of the highest ratios, the sewing machine 1 further executes an XY correction process for the plurality of movement amounts (X, Y, θ). In the XY correction process, the sewing machine 1 calculates the average value of the movement amounts in the X direction and the Y direction for each of the plurality of highest ratios of movement amounts of XY (X, Y). The sewing machine 1 determines the calculated average value as the movement amount (X, Y). As a result, the sewing machine 1 determines the determined movement amount (X, Y, θ) as a correction amount.

例えば、ミシン1は、移動量(3、1、2°)を、補正量として決定する(図7参照)。この場合、仮想針落ち位置Pを含む設定範囲Cは、分割画像25A〜25Zの上板82を示す黒色で示す部分に対して夫々干渉しない状態となる。この場合、ミシン1が割合算出処理で算出する割合は、100%となる。この場合、ミシン1は、補正量(X、Y、θ)=(3、1、2°)を適用した縫製データに基づき縫製した場合、縫針11と布保持枠80が干渉する可能性は低い。 For example, the sewing machine 1 determines the movement amount (3, 1, 2 °) as the correction amount (see FIG. 7). In this case, the setting range C including the virtual needle drop position P is in a state of not interfering with the black portion indicating the upper plate 82 of the divided images 25A to 25Z. In this case, the ratio calculated by the sewing machine 1 in the ratio calculation process is 100%. In this case, when the sewing machine 1 is sewn based on the sewing data to which the correction amount (X, Y, θ) = (3, 1, 2 °) is applied, it is unlikely that the sewing needle 11 and the cloth holding frame 80 interfere with each other. ..

<フローチャート>
図9、図10を参照し、ミシン1のメイン処理を説明する。ユーザがミシン1の操作パネル8又は操作箱30を操作して電源を投入すると、ミシン1は、ROM42に記憶した縫製プログラムを読み出して、メイン処理を実行する。メイン処理を実行すると、CPU41は、布保持枠80が保持部70に装着しているか否か判断する(S1)。CPU41はセンサ76の出力値により保持部70に布保持枠80が装着しているか否かを判断する。CPU41はセンサ76が出力するオン信号を検出するまで、S1の判断を継続する(S1:NO)。ユーザは被縫製物を配置した布保持枠80を保持部70に装着する。布保持枠80が保持部70に装着していると判断した場合、即ちセンサ76が出力するオン信号を検出した場合(S1:YES)、CPU41は、布保持枠80の中心点を検出して原点を検出する(S3)。この場合、CPU41は、布保持枠80を駆動して、X方向原点センサ118、Y方向原点センサ119の出力により原点の検出を行う。
<Flowchart>
The main processing of the sewing machine 1 will be described with reference to FIGS. 9 and 10. When the user operates the operation panel 8 or the operation box 30 of the sewing machine 1 to turn on the power, the sewing machine 1 reads the sewing program stored in the ROM 42 and executes the main process. When the main process is executed, the CPU 41 determines whether or not the cloth holding frame 80 is attached to the holding portion 70 (S1). The CPU 41 determines whether or not the cloth holding frame 80 is attached to the holding portion 70 based on the output value of the sensor 76. The CPU 41 continues the determination of S1 until it detects the on signal output by the sensor 76 (S1: NO). The user attaches the cloth holding frame 80 on which the sewn object is placed to the holding portion 70. When it is determined that the cloth holding frame 80 is attached to the holding portion 70, that is, when the on signal output by the sensor 76 is detected (S1: YES), the CPU 41 detects the center point of the cloth holding frame 80. The origin is detected (S3). In this case, the CPU 41 drives the cloth holding frame 80 and detects the origin from the outputs of the X-direction origin sensor 118 and the Y-direction origin sensor 119.

CPU41は、縫製データ及び縫製条件を取得する。縫製データ及び縫製条件等は、ユーザにより選択される。ユーザは操作パネル8又は操作箱30を操作し、布保持枠80の種類に応じた縫製データと縫製条件を指定する。これにより、CPU41は、ユーザが指定した縫製データと縫製条件を取得する(S3)。縫製条件は、設定範囲Cの設定、二値化処理の閾値の設定等を含む。設定範囲Cの設定では、ユーザは、仮想針落ち位置Pを中心とする円の半径Rを設定可能である。閾値の設定では、ユーザは、分割画像25を二値化処理する際に使用する閾値を設定可能である。ユーザは半径R及び閾値を適宜変更してよい。 The CPU 41 acquires sewing data and sewing conditions. Sewing data, sewing conditions, etc. are selected by the user. The user operates the operation panel 8 or the operation box 30 to specify sewing data and sewing conditions according to the type of the cloth holding frame 80. As a result, the CPU 41 acquires the sewing data and the sewing conditions specified by the user (S3). The sewing conditions include the setting of the setting range C, the setting of the threshold value of the binarization process, and the like. In the setting of the setting range C, the user can set the radius R of the circle centered on the virtual needle drop position P. In setting the threshold value, the user can set the threshold value to be used when the divided image 25 is binarized. The user may change the radius R and the threshold value as appropriate.

CPU41は、S5で取得した縫製データ及び縫製条件に基づき縫製データ補正処理(図10参照)を実行する(S7)。縫製データ補正処理を開始すると、CPU41は、変換データを生成する(S101)。CPU41は、変数nを1に設定する(S103)。変数nは、S5の処理で取得した縫製データが含む仮想針落ち位置Pの座標データを、縫製順に読み出す為の変数である。変数nが1である時、CPU41は、変換データに基づき、撮影部52の撮影範囲45(図3参照)が、1番目の針落ち位置を撮影可能な位置に、布保持枠80を移動する(S105)。変数nが1である場合、CPU41は撮影部52を制御し、1番目の針落ち位置付近を撮影し、分割画像25Aの画像データを取得する(S107)。この場合、取得された画像データは記憶装置44に記憶する。 The CPU 41 executes the sewing data correction process (see FIG. 10) based on the sewing data acquired in S5 and the sewing conditions (S7). When the sewing data correction process is started, the CPU 41 generates conversion data (S101). The CPU 41 sets the variable n to 1 (S103). The variable n is a variable for reading the coordinate data of the virtual needle drop position P included in the sewing data acquired in the process of S5 in the sewing order. When the variable n is 1, the CPU 41 moves the cloth holding frame 80 to a position where the shooting range 45 (see FIG. 3) of the shooting unit 52 can shoot the first needle drop position based on the conversion data. (S105). When the variable n is 1, the CPU 41 controls the photographing unit 52, photographs the vicinity of the first needle drop position, and acquires the image data of the divided image 25A (S107). In this case, the acquired image data is stored in the storage device 44.

CPU41は、変数nについて、S5の処理で取得した縫製データのうち、最後の針落ち位置に対応する値かを判断する(S109)。例えば、図6において、最後の針落ち位置に対応する変数nは26であり、分割画像25Zと対応する。CPU41は、変数nが最後の針落ち位置に対応する値ではない場合(S109:NO)、CPU41は、変数nをインクリメントし(S111)、処理をS105に戻す。CPU41は、S105〜S111の処理を、変換データが示す一針毎の針落ち位置に対して、布保持枠80をX−Y方向に移動しながら溝87を撮影していく。 The CPU 41 determines whether the variable n is a value corresponding to the last needle drop position in the sewing data acquired in the process of S5 (S109). For example, in FIG. 6, the variable n corresponding to the last needle drop position is 26, which corresponds to the divided image 25Z. When the variable n is not a value corresponding to the last needle drop position (S109: NO), the CPU 41 increments the variable n (S111) and returns the process to S105. The CPU 41 photographs the groove 87 while moving the cloth holding frame 80 in the XY directions with respect to the needle drop position for each stitch indicated by the conversion data in the processes of S105 to S111.

一方、変数nが最後の値である時(S109:YES)、CPU41は、複数の分割画像25の夫々に対して、S5の処理でユーザにより予め設定された閾値を用いて二値化処理を実行する(S113)。これにより、CPU41は、複数の分割画像25の夫々における溝87の位置を検出する。 On the other hand, when the variable n is the final value (S109: YES), the CPU 41 performs binarization processing on each of the plurality of divided images 25 using the threshold value preset by the user in the processing of S5. Execute (S113). As a result, the CPU 41 detects the position of the groove 87 in each of the plurality of divided images 25.

CPU41は、θ適用処理を実行する(S115)。CPU41は、移動量(θ)を適用した縫製データを複数生成する。CPU41は、移動量(θ)を適用した複数の縫製データに対して割合算出処理を実行する(S117)。これにより、CPU41は、取得した全ての分割画像25のうち、設定範囲Cが溝87に収まると判断した分割画像25の割合を算出する。CPU41は、算出した割合が最大となる移動量(θ)を決定する(S119)。 The CPU 41 executes the θ application process (S115). The CPU 41 generates a plurality of sewing data to which the movement amount (θ) is applied. The CPU 41 executes a ratio calculation process for a plurality of sewing data to which the movement amount (θ) is applied (S117). As a result, the CPU 41 calculates the ratio of the divided images 25 that are determined to fit in the groove 87 among all the acquired divided images 25. The CPU 41 determines the movement amount (θ) at which the calculated ratio is maximized (S119).

CPU41は、X−Y方向への移動量(X、Y)を特定する為のX−Y特定処理を実行する(S121)。これにより、例えば、CPU41は、X−Y方向に夫々−5〜5ピクセルの移動量(X、Y)を適用した100パターンの縫製データを生成する。CPU41は、X−Y方向への移動量(X、Y)を適用した場合の割合算出処理を実行する(S123)。CPU41は、割合が最大となる組み合わせを特定する(S125)。尚、組み合わせとは、S119の処理で決定した移動量(θ)と、S121〜S123の処理で適用するX−Y方向への移動量(X、Y)との組み合わせをいう。 The CPU 41 executes an XY identification process for specifying the amount of movement (X, Y) in the XY directions (S121). As a result, for example, the CPU 41 generates 100 patterns of sewing data in which a movement amount (X, Y) of -5 to 5 pixels is applied in each of the XY directions. The CPU 41 executes a ratio calculation process when the movement amount (X, Y) in the XY directions is applied (S123). The CPU 41 specifies the combination that maximizes the ratio (S125). The combination means a combination of the movement amount (θ) determined in the processing of S119 and the movement amount (X, Y) in the XY directions applied in the processing of S121 to S123.

CPU41は、S125の処理で特定した、割合が最大となる組み合わせが複数あるか否か判断する(S127)。割合が最大となる組み合わせが一つと判断した場合(S127:NO)、CPU41は、割合が最大となる組み合わせを補正量として決定する(S129)。一方、割合が最大となる組み合わせが複数あると判断した場合(S127:YES)、CPU41は、平均値取得処理を実行する(S131)。即ち、CPU41は、最大となる割合が複数あると判断した場合、最大となる複数の割合に対応する複数の移動量に応じて、補正量(X、Y、θ)を決定する。CPU41は、S119で決定した移動量(θ)とS131で取得した平均値(X、Y)との移動量(X、Y、θ)を、補正量として決定する(S129)。CPU41は、S129で決定した補正量(X、Y、θ)を適用して、縫製データを補正する(S133)。CPU41は、縫製データ補正処理を終了して、処理をメイン処理(図9参照)に戻し、S9の処理を実行する。 The CPU 41 determines whether or not there is a plurality of combinations having the maximum ratio specified in the process of S125 (S127). When it is determined that the combination having the maximum ratio is one (S127: NO), the CPU 41 determines the combination having the maximum ratio as the correction amount (S129). On the other hand, when it is determined that there are a plurality of combinations having the maximum ratio (S127: YES), the CPU 41 executes the average value acquisition process (S131). That is, when the CPU 41 determines that there are a plurality of maximum ratios, the CPU 41 determines the correction amount (X, Y, θ) according to the plurality of movement amounts corresponding to the plurality of maximum ratios. The CPU 41 determines the movement amount (X, Y, θ) between the movement amount (θ) determined in S119 and the average value (X, Y) acquired in S131 as the correction amount (S129). The CPU 41 applies the correction amount (X, Y, θ) determined in S129 to correct the sewing data (S133). The CPU 41 ends the sewing data correction process, returns the process to the main process (see FIG. 9), and executes the process of S9.

CPU41は、取得した全体画像68において、補正量(X、Y、θ)を適用した縫製データの針落ち位置が、溝87の位置に含まれるか否かを判断する(S9)。即ち、CPU41は、補正量を適用した縫製データの針落ち位置が、布保持枠80と干渉する可能性があるかを判断する。 The CPU 41 determines whether or not the needle drop position of the sewing data to which the correction amount (X, Y, θ) is applied is included in the position of the groove 87 in the acquired overall image 68 (S9). That is, the CPU 41 determines whether the needle drop position of the sewing data to which the correction amount is applied may interfere with the cloth holding frame 80.

針落ち位置が溝87の位置に含まれないと判断した場合、即ち、布保持枠80と縫針11とが干渉する可能性が高いと判断した場合(S9:NO)、CPU41は、溝87の位置に含まれない針落ち位置について報知する(S23)。例えば、CPU41は、ユーザへの報知の方法として、LCD32にエラーメッセージを表示する。CPU41は、溝87の位置に含まれない針落ち位置について溝87内に含まれるように補正する(S26)。具体的には、CPU41は、溝87の位置に含まれない針落ち位置から最も近い溝87の位置を特定し、該位置に向かう方向に針落ち位置をオフセットする。該時、CPU41は、針落ち位置が溝87内に含まれるまでオフセットし、溝87内に含まれた時の針落ち位置を補正後の針落ち位置として、縫製データを補正する。CPU41は、処理をS1に戻す。 When it is determined that the needle drop position is not included in the position of the groove 87, that is, when it is determined that there is a high possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other (S9: NO), the CPU 41 determines that the groove 87 has a needle drop position. Notifies the needle drop position that is not included in the position (S23). For example, the CPU 41 displays an error message on the LCD 32 as a method of notifying the user. The CPU 41 corrects the needle drop position that is not included in the position of the groove 87 so that it is included in the groove 87 (S26). Specifically, the CPU 41 specifies the position of the groove 87 closest to the needle drop position not included in the groove 87 position, and offsets the needle drop position in the direction toward the position. At this time, the CPU 41 offsets the needle drop position until it is included in the groove 87, and corrects the sewing data by using the needle drop position when the needle drop position is included in the groove 87 as the corrected needle drop position. The CPU 41 returns the process to S1.

一方、S9の処理で、針落ち位置が溝87の位置に含まれる、即ち、布保持枠80と縫針11とが干渉する可能性が低いと判断した場合(S9:YES)、CPU41は、縫製開始の指示を取得したかを判断する(S11)。ユーザは縫製の準備が整ったとき、起動スイッチ121を踏み込むことで、縫製開始の指示を入力する。縫製開始の指示を取得しない時(S11:NO)、CPU41は、縫製開始の指示を待つ。ユーザが起動スイッチ121を踏み込み、縫製開始の指示を取得した時(S11:YES)、CPU41は、変数Nに1を設定する(S13)。変数NはS129で決定した補正量(X、Y、θ)を適用した縫製データが含む針落ち位置の座標を、縫製順に読み出す為の変数である。尚、補正量(X、Y、θ)を適用後の縫製データの針落ち位置の総数は、補正量(X、Y、θ)を適用する前の縫製データの針落ち位置の総数と等しい。従って、変数Nの最後の値は変数nの最後の値と同一である。CPU41は、X軸モータ114、Y軸モータ116を駆動し、縫製順序がN番目の針落ち位置を縫製する為、補正量(X、Y、θ)を適用した縫製データに基づき布保持枠80を移動する(S15)。 On the other hand, when it is determined in the process of S9 that the needle drop position is included in the position of the groove 87, that is, the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other is low (S9: YES), the CPU 41 is sewn. It is determined whether the start instruction has been obtained (S11). When the user is ready for sewing, he / she depresses the start switch 121 to input an instruction to start sewing. When the sewing start instruction is not acquired (S11: NO), the CPU 41 waits for the sewing start instruction. When the user depresses the start switch 121 and obtains the instruction to start sewing (S11: YES), the CPU 41 sets the variable N to 1 (S13). The variable N is a variable for reading out the coordinates of the needle drop position included in the sewing data to which the correction amount (X, Y, θ) determined in S129 is applied, in the sewing order. The total number of needle drop positions in the sewing data after applying the correction amount (X, Y, θ) is equal to the total number of needle drop positions in the sewing data before applying the correction amount (X, Y, θ). Therefore, the last value of the variable N is the same as the last value of the variable n. The CPU 41 drives the X-axis motor 114 and the Y-axis motor 116 to sew the needle drop position in the Nth sewing order. Therefore, the cloth holding frame 80 is based on the sewing data to which the correction amount (X, Y, θ) is applied. (S15).

CPU41は、N番目の針落ち位置を縫製する(S17)。次いで、CPU41は、変数Nが最後の値か判断する(S19)。変数Nが最後の値ではないと判断した場合(S19:NO)、CPU41は、Nをインクリメントする(S21)。CPU41は、処理をS15に戻す。CPU41は、変数Nが最後の値となるまで、S15〜S21の処理を繰り返して、補正量(X、Y、θ)を適用した縫製データに基づき縫製を実行する。変数Nが最後の値と判断した場合(S19:YES)、CPU41は、縫製が完了したとして処理をS1に戻す。 The CPU 41 sews the Nth needle drop position (S17). Next, the CPU 41 determines whether the variable N is the last value (S19). When it is determined that the variable N is not the last value (S19: NO), the CPU 41 increments N (S21). The CPU 41 returns the process to S15. The CPU 41 repeats the processes of S15 to S21 until the variable N reaches the final value, and executes sewing based on the sewing data to which the correction amount (X, Y, θ) is applied. When the variable N is determined to be the last value (S19: YES), the CPU 41 returns the process to S1 assuming that sewing is completed.

<作用効果>
以上説明の如く、CPU41は、全体画像68の溝87の位置と、座標データの仮想針落ち位置Pとの位置関係を検出する(S115、S121)。CPU41は、該位置関係を統計的手法により解析することで(S113〜S129)、縫製データの補正量(X、Y、θ)を算出する(S129)。CPU41は、算出した補正量(X、Y、θ)を適用して、縫製データを補正する(S133)。故に、ミシン1は、布保持枠80と縫針11とが干渉する可能性を低減できる。
<Effect>
As described above, the CPU 41 detects the positional relationship between the position of the groove 87 of the overall image 68 and the virtual needle drop position P of the coordinate data (S115, S121). The CPU 41 calculates the correction amount (X, Y, θ) of the sewing data by analyzing the positional relationship by a statistical method (S113 to S129) (S129). The CPU 41 applies the calculated correction amount (X, Y, θ) to correct the sewing data (S133). Therefore, the sewing machine 1 can reduce the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other.

CPU41は、撮影部52が溝87を一部分ずつ複数回撮影することにより生成した複数の分割画像25を、全体画像68として取得する(S105〜S111)。CPU41は、複数の分割画像25の夫々の溝87の位置に対する、座標データの針落ち位置の相対位置を、所定の直交座標系及び極座標系により示す移動量(X、Y、θ)に応じて移動する(S115、S121)。CPU41は、相対位置を移動量の分移動した状態で、複数の分割画像25のうち、仮想針落ち位置Pの相対位置が溝87の位置に含まれる分割画像25の割合を検出する(S117、S123)。CPU41は、移動量に応じた仮想針落ち位置Pの相対位置の移動と、割合の検出とを、複数の移動量毎に繰り返す。CPU41は、検出した複数の割合のうち、最大となる割合の移動量に応じて、補正量(X、Y、θ)を算出する(S129)。故に、ミシン1は、布保持枠80と縫針11とが干渉する可能性を低減できる。 The CPU 41 acquires a plurality of divided images 25 generated by the photographing unit 52 photographing the groove 87 one by one a plurality of times as the entire image 68 (S105 to S111). The CPU 41 sets the relative position of the needle drop position of the coordinate data with respect to the position of each groove 87 of the plurality of divided images 25 according to the movement amount (X, Y, θ) indicated by a predetermined Cartesian coordinate system and polar coordinate system. Move (S115, S121). The CPU 41 detects the ratio of the divided images 25 in which the relative position of the virtual needle drop position P is included in the position of the groove 87 among the plurality of divided images 25 in a state where the relative position is moved by the amount of movement (S117, S123). The CPU 41 repeats the movement of the relative position of the virtual needle drop position P according to the movement amount and the detection of the ratio for each of the plurality of movement amounts. The CPU 41 calculates a correction amount (X, Y, θ) according to the movement amount of the maximum ratio among the plurality of detected ratios (S129). Therefore, the sewing machine 1 can reduce the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other.

CPU41は、検出した複数の割合のうち、最大となる割合が複数あるか否かを特定する(S127)。CPU41は、最大となる割合が複数あると判断した場合(S127:YES)、最大となる複数の割合に対応する複数の移動量に応じて、補正量(X、Y、θ)を決定する(S129)。故に、ミシン1は、布保持枠80と縫針11とが干渉する可能性を更に低減できる。 The CPU 41 specifies whether or not there is a plurality of maximum ratios among the plurality of detected ratios (S127). When the CPU 41 determines that there are a plurality of maximum ratios (S127: YES), the CPU 41 determines a correction amount (X, Y, θ) according to a plurality of movement amounts corresponding to the plurality of maximum ratios (S127: YES). S129). Therefore, the sewing machine 1 can further reduce the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other.

CPU41は、取得した全体画像68において、補正後の縫製データの針落ち位置が、溝87の位置に含まれるか否かを判断する(S9)。CPU41は、針落ち位置が溝87の位置に含まれないと判断した場合(S9:NO)、溝87の位置に含まれない針落ち位置について報知する(S23)。ミシン1は、溝87の位置に含まれない針落ち位置をユーザに報知するので、補正後の針落ち位置について、布保持枠80と縫針11とが干渉する可能性をユーザに報知できる。 The CPU 41 determines whether or not the needle drop position of the corrected sewing data is included in the position of the groove 87 in the acquired overall image 68 (S9). When the CPU 41 determines that the needle drop position is not included in the groove 87 position (S9: NO), the CPU 41 notifies the needle drop position not included in the groove 87 position (S23). Since the sewing machine 1 notifies the user of the needle drop position that is not included in the position of the groove 87, it is possible to notify the user of the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other regarding the corrected needle drop position.

CPU41は、針落ち位置が溝87の位置に含まれないと判断した場合(S9:NO)、CPU41は、溝87の位置に含まれない針落ち位置について溝87内に含まれるように補正する(S26)。故に、ミシン1は、布保持枠80と縫針11とが干渉する可能性を更に低減できる。 When the CPU 41 determines that the needle drop position is not included in the groove 87 position (S9: NO), the CPU 41 corrects the needle drop position not included in the groove 87 position so that it is included in the groove 87. (S26). Therefore, the sewing machine 1 can further reduce the possibility that the cloth holding frame 80 and the sewing needle 11 interfere with each other.

CPU41は、変換データに基づき送り機構6を駆動して布保持枠80を移動する(S105)。CPU41は、送り機構6を駆動して布保持枠80を移動しながら、布保持枠80の溝87を撮影し、全体画像68を取得する(S105〜S111)。故に、ミシン1は、変換データに基づき送り機構6を駆動することにより、効率的に布保持枠80の溝87の全体を撮影できる。 The CPU 41 drives the feed mechanism 6 based on the conversion data to move the cloth holding frame 80 (S105). The CPU 41 drives the feed mechanism 6 to move the cloth holding frame 80, photographs the groove 87 of the cloth holding frame 80, and acquires the entire image 68 (S105 to S111). Therefore, the sewing machine 1 can efficiently photograph the entire groove 87 of the cloth holding frame 80 by driving the feed mechanism 6 based on the conversion data.

CPU41は、送り機構6を駆動して布保持枠80を移動する場合に、撮影部52の撮影範囲45の所定位置を、縫製データの仮想的な針落ち位置として縫製データを変換する(S101)。故に、ミシン1は、縫針11の針落ち位置を直接撮影しなくとも、仮想的な針落ち位置と布保持枠80とが干渉するか判断できる。 When the feed mechanism 6 is driven to move the cloth holding frame 80, the CPU 41 converts the sewing data into a predetermined position of the photographing range 45 of the photographing unit 52 as a virtual needle drop position of the sewing data (S101). .. Therefore, the sewing machine 1 can determine whether the virtual needle drop position and the cloth holding frame 80 interfere with each other without directly photographing the needle drop position of the sewing needle 11.

<変形例>
本発明は上記実施形態の他に種々の変更が可能である。布保持枠80の大きさ、形状、色等は適宜変更してよい。溝87、88、窪み部の形状、大きさ、配置等は適宜変更してよい。布保持枠80は、ユーザによりミシン1の保持部70に取り付けたがこれに限らず、布保持枠80を供給する供給装置が布保持枠80を保持部70に供給してもよい。撮影部52の撮像素子の種類、配置位置、撮影範囲の大きさ等は適宜変更してよい。例えば、撮像素子の種類は、CMOSイメージセンサであったが、CCD等の他の素子を使用してもよい。また、撮影部52の配置位置は、支持部51の下端に配置したがこれに限らず、布保持枠80の溝87を撮影可能な位置に配置すればよい。撮影部52は、撮影範囲45(図3参照)で示す範囲を撮影したが、撮影範囲45が示す範囲より小さい範囲を撮影してよいし、大きい範囲を撮影してよい。実施形態で挙げた各種数値は単なる例示であり、適宜変更できる。保持部70はエアシリンダ73で駆動したが、モータ、アクチュエータ等を用いて電動で駆動してもよい。
<Modification example>
In addition to the above embodiments, the present invention can be modified in various ways. The size, shape, color, etc. of the cloth holding frame 80 may be changed as appropriate. The shapes, sizes, arrangements, etc. of the grooves 87 and 88 and the recesses may be appropriately changed. The cloth holding frame 80 is attached to the holding portion 70 of the sewing machine 1 by the user, but the present invention is not limited to this, and the supply device for supplying the cloth holding frame 80 may supply the cloth holding frame 80 to the holding portion 70. The type, arrangement position, size of the photographing range, and the like of the image pickup element of the photographing unit 52 may be appropriately changed. For example, the type of the image sensor is a CMOS image sensor, but other elements such as a CCD may be used. Further, the arrangement position of the photographing unit 52 is not limited to the arrangement position at the lower end of the support portion 51, and the groove 87 of the cloth holding frame 80 may be arranged at a position where photography is possible. Although the photographing unit 52 has photographed the range indicated by the photographing range 45 (see FIG. 3), the photographing unit 52 may photograph a range smaller than the range indicated by the photographing range 45, or may photograph a large range. The various numerical values given in the embodiments are merely examples and can be changed as appropriate. Although the holding portion 70 is driven by the air cylinder 73, it may be electrically driven by using a motor, an actuator, or the like.

ミシン1が押え足13を撮影可能である時、ミシン1は分割画像25から押え足13の筒部131の大きさを取得し、取得した大きさに応じて設定範囲Cを自動で設定してもよい。該時、変換データは生成しなくてもよい。設定範囲Cは円状の他、例えば針落ち点を含む楕円状の範囲、多角形状の範囲であってもよい。ミシン1は設定範囲Cを設定可能でなくてもよい。設定範囲Cはデフォルト値を使用すればよい。ミシン1は閾値を設定可能でなくてもよい。閾値はデフォルト値を使用すればよい。閾値は、例えば、所定範囲の濃淡値の部分を抽出可能な画像処理フィルタの閾値であってもよい。 When the sewing machine 1 is capable of photographing the presser foot 13, the sewing machine 1 acquires the size of the tubular portion 131 of the presser foot 13 from the divided image 25, and automatically sets the setting range C according to the acquired size. May be good. At that time, the conversion data does not have to be generated. The setting range C may be a circular range, an elliptical range including a needle drop point, or a polygonal range. The sewing machine 1 does not have to be able to set the setting range C. The default value may be used for the setting range C. The sewing machine 1 does not have to be able to set a threshold value. The default value may be used for the threshold value. The threshold value may be, for example, the threshold value of an image processing filter capable of extracting a portion of a shade value in a predetermined range.

ミシン1は、撮影した複数の分割画像25から溝87の全体画像68(図6参照)を生成せずに、撮影部52は、一回の撮影の実行で、一枚の画像から溝87の全体を含む全体画像68を撮影してもよい。 The sewing machine 1 does not generate the entire image 68 (see FIG. 6) of the groove 87 from the plurality of divided images 25 taken, and the photographing unit 52 executes the shooting once, and the groove 87 is formed from one image. The whole image 68 including the whole may be taken.

二値化処理は、全体画像68を取得した後に複数の分割画像25に対して実行したが、これに限らず、分割画像25を取得しながら二値化処理を行ってもよい。θ適用処理では、縫製データの中心位置(即ち布保持枠80の原点)を回転の中心としたが、例えば、回転の中心は金属板84の中心位置84A(図3参照)でもよい。回転の中心は必要に応じて適宜設定してよい。また、回転方向は、平面視において反時計回り又は時計回りで回転したが、これに限らず、側面視において原点を中心に時計回り又は反時計回りに設定してもよい。移動量(θ)は、−3°〜3°で設定したが、これに限らず、必要に応じて適宜設定してよい。縫製データは、1°毎に移動量(θ)を適用して生成したが、0.1°毎等適宜設定してよい。 The binarization process is executed on a plurality of divided images 25 after acquiring the entire image 68, but the present invention is not limited to this, and the binarization process may be performed while acquiring the divided images 25. In the θ application process, the center position of the sewing data (that is, the origin of the cloth holding frame 80) is set as the center of rotation. For example, the center of rotation may be the center position 84A of the metal plate 84 (see FIG. 3). The center of rotation may be appropriately set as needed. Further, the rotation direction is not limited to the counterclockwise or clockwise rotation in the plan view, but may be set clockwise or counterclockwise around the origin in the side view. The movement amount (θ) is set in the range of -3 ° to 3 °, but is not limited to this, and may be appropriately set as needed. The sewing data is generated by applying the movement amount (θ) every 1 °, but it may be set appropriately such as every 0.1 °.

X−Y決定処理では、平均値に基づきX−Y方向への移動量(X、Y)を決定したが、これに限らず、中央値を取得する等して決定してもよい。平均値取得処理は実行しなくてもよい。該時、複数の割合が最大な移動量のうち何れかを補正量として決定してもよい。縫製データ補正処理では、CPU41は、最適な移動量(θ)を特定した後に、X−Y方向への移動量(X、Y)について特定したがこれに限らない。CPU41は、先に、X−Y方向への移動量(X、Y)を特定した後に、最適な移動量(θ)を特定してもよい。移動量(X、Y)は、夫々−5〜5ピクセル分の範囲としたが、これに限らず−10〜10ピクセル等必要に応じて適宜設定してよい。 In the XY determination process, the amount of movement (X, Y) in the XY directions is determined based on the average value, but the present invention is not limited to this, and the median value may be acquired or the like. The average value acquisition process does not have to be executed. At that time, any one of the movement amounts having a plurality of maximum movements may be determined as the correction amount. In the sewing data correction process, the CPU 41 specifies the optimum movement amount (θ) and then specifies the movement amount (X, Y) in the XY directions, but the present invention is not limited to this. The CPU 41 may first specify the movement amount (X, Y) in the XY directions, and then specify the optimum movement amount (θ). The amount of movement (X, Y) is in the range of -5 to 5 pixels, respectively, but is not limited to this, and may be appropriately set such as -10 to 10 pixels.

報知したエラーメッセージは、LCD32でなく操作パネル8のディスプレイに表示してもよい。CPU41は、ブザーの警告音発信又はランプの発光でエラーを報知してもよい。エラーメッセージを表示する表示部は操作パネル8に設けてもよいし、ミシン1の本体(例えば、アーム部4の上部)に設けてもよい。 The notified error message may be displayed on the display of the operation panel 8 instead of the LCD 32. The CPU 41 may notify an error by transmitting a warning sound of a buzzer or emitting a light of a lamp. The display unit for displaying the error message may be provided on the operation panel 8 or may be provided on the main body of the sewing machine 1 (for example, the upper part of the arm unit 4).

各種プログラムの取得方法、取得経路及び各種プログラムを記憶する機器の各々は、適宜変更してもよい。メイン処理を実行する為のプログラムは、CPU41がプログラムを実行するまでに、ケーブル又は無線通信を介して、他の装置から受信し、不揮発性メモリ等に記憶されてもよい。他の装置は、例えば、PC、及びネットワーク網を介して接続されるサーバ等を含む。縫製データ処理装置は、専用の装置であってもよいし、PC等の汎用の装置であってもよいし、例えば操作箱30が縫製データ処理装置として機能してもよい。 Each of the acquisition method, acquisition route, and device for storing various programs may be appropriately changed. The program for executing the main process may be received from another device via a cable or wireless communication and stored in a non-volatile memory or the like before the CPU 41 executes the program. Other devices include, for example, PCs, servers connected via a network, and the like. The sewing data processing device may be a dedicated device, a general-purpose device such as a PC, or, for example, the operation box 30 may function as a sewing data processing device.

ミシン1の縫製処理の各処理は、CPU41が実行する例に限定されず、一部又は全部を他の電子機器(例えば、ASIC)によって実行してもよい。メイン処理の各処理は、複数の電子機器(例えば、複数のCPU)により分散処理してもよい。縫製処理の各ステップは、必要に応じて順序の変更、ステップの省略、及び追加が可能である。ミシン1上で稼動しているオペレーティングシステム(OS)等が、CPU41からの指令によりメイン処理の一部又は全部を行う態様も、本開示の範囲に含まれる。 Each process of the sewing process of the sewing machine 1 is not limited to the example executed by the CPU 41, and a part or the whole may be executed by another electronic device (for example, ASIC). Each process of the main process may be distributed by a plurality of electronic devices (for example, a plurality of CPUs). Each step of the sewing process can be reordered, steps omitted, and added as needed. The scope of the present disclosure also includes a mode in which an operating system (OS) or the like running on the sewing machine 1 performs a part or all of the main processing according to a command from the CPU 41.

上記実施形態において、ミシン1は、本発明の縫製データ処理装置、ミシンの一例である。撮影部52の撮像素子の中心位置は、本発明の所定位置の一例である。S107〜S111の処理を実行するCPU41は本発明の撮影制御部の一例である。S129を実行するCPU41は本発明の第一算出部の一例である。S133を実行するCPU41は本発明の第一補正部の一例である。S115、S121を実行するCPU41は本発明の第一検出部の一例である。S117、S123を実行するCPU41は本発明の第二検出部の一例である。S115、S121を実行するCPU41は本発明の第三検出部の一例である。S127を実行するCPU41は本発明の特定部の一例である。S9を実行するCPU41は本発明の判断部の一例である。S23を実行するCPU41は本発明の報知部の一例である。S26を実行するCPU41は本発明の第二補正部の一例である。S101を実行するCPU41は本発明の変換部の一例である。S15〜S21を実行するCPU41は本発明の縫製制御部の一例である。 In the above embodiment, the sewing machine 1 is an example of the sewing data processing device and the sewing machine of the present invention. The central position of the image sensor of the photographing unit 52 is an example of a predetermined position of the present invention. The CPU 41 that executes the processes of S107 to S111 is an example of the photographing control unit of the present invention. The CPU 41 that executes S129 is an example of the first calculation unit of the present invention. The CPU 41 that executes S133 is an example of the first correction unit of the present invention. The CPU 41 that executes S115 and S121 is an example of the first detection unit of the present invention. The CPU 41 that executes S117 and S123 is an example of the second detection unit of the present invention. The CPU 41 that executes S115 and S121 is an example of the third detection unit of the present invention. The CPU 41 that executes S127 is an example of a specific part of the present invention. The CPU 41 that executes S9 is an example of the determination unit of the present invention. The CPU 41 that executes S23 is an example of the notification unit of the present invention. The CPU 41 that executes S26 is an example of the second correction unit of the present invention. The CPU 41 that executes S101 is an example of the conversion unit of the present invention. The CPU 41 that executes S15 to S21 is an example of the sewing control unit of the present invention.

1 :ミシン
6 :移動部
10 :針棒
11 :縫針
30 :操作箱
32 :LCD
41 :CPU
42 :ROM
43 :RAM
44 :記憶装置
52 :撮影部
80 :布保持枠
81 :下板
82 :上板
87、88 :溝
1: Sewing machine 6: Moving part 10: Needle bar 11: Sewing needle 30: Operation box 32: LCD
41: CPU
42: ROM
43: RAM
44: Storage device 52: Photographing unit 80: Cloth holding frame 81: Lower plate 82: Upper plate 87, 88: Groove

Claims (8)

被縫製物に対して縫製を行う為の縫製データを処理する縫製データ処理装置において、
前記被縫製物を保持する布保持枠に形成し、ミシンの縫針が挿通可能である溝を撮影部により撮影し、前記溝の全体を含む撮影画像である全体画像を取得する撮影制御部と、
前記撮影制御部により取得した前記全体画像と、前記縫製データに含まれる前記縫針の針落ち位置を示す座標データとに基づき、前記全体画像の溝の位置と、前記座標データの前記針落ち位置との位置関係を検出する検出部と、
前記検出部により検出した前記位置関係を統計的手法により解析することで、前記縫製データの補正量を算出する第一算出部と、
前記第一算出部により算出した前記補正量を適用して、前記縫製データを補正する第一補正部と
を備えたことを特徴とする縫製データ処理装置。
In a sewing data processing device that processes sewing data for sewing a sewn object,
A photographing control unit formed on a cloth holding frame for holding the sewn object, photographing a groove through which the sewing needle of the sewing machine can be inserted by the photographing unit, and acquiring an entire image which is a photographed image including the entire groove.
Based on the whole image acquired by the photographing control unit and the coordinate data indicating the needle drop position of the sewing needle included in the sewing data, the groove position of the whole image and the needle drop position of the coordinate data And the detector that detects the positional relationship of
The first calculation unit that calculates the correction amount of the sewing data by analyzing the positional relationship detected by the detection unit by a statistical method.
A sewing data processing apparatus including a first correction unit that corrects the sewing data by applying the correction amount calculated by the first calculation unit.
前記撮影制御部は、
前記撮影部が前記溝を一部分ずつ複数回撮影することにより生成した複数の分割画像を、前記全体画像として取得し、
前記検出部は、
前記複数の分割画像の夫々の前記溝の位置に対する、前記座標データの前記針落ち位置の相対位置を、所定の直交座標系及び極座標系により示す移動量に応じて移動する第一検出部と、
前記第一検出部により前記相対位置を前記移動量の分移動した状態で、前記複数の分割画像のうち、前記針落ち位置の前記相対位置が前記溝の位置に含まれる前記分割画像の割合を検出する第二検出部と、
前記第一検出部による前記移動量に応じた前記針落ち位置の前記相対位置の移動と、前記第二検出部による前記割合の検出とを、複数の前記移動量毎に繰り返す第三検出部と
を備え、
前記第一算出部は、
前記第三検出部により検出した複数の前記割合のうち、最大となる前記割合の前記移動量に応じて、前記補正量を算出する
ことを特徴とする請求項1に記載の縫製データ処理装置。
The imaging control unit
A plurality of divided images generated by the photographing unit photographing the groove one by one a plurality of times are acquired as the whole image.
The detection unit
A first detection unit that moves the relative position of the needle drop position of the coordinate data with respect to the position of the groove in each of the plurality of divided images according to the amount of movement indicated by a predetermined Cartesian coordinate system and a polar coordinate system.
In a state where the relative position is moved by the movement amount by the first detection unit, the ratio of the divided image in which the relative position of the needle drop position is included in the groove position among the plurality of divided images is determined. The second detector to detect and
With the third detection unit, the movement of the relative position of the needle drop position according to the movement amount by the first detection unit and the detection of the ratio by the second detection unit are repeated for each of the plurality of movement amounts. With
The first calculation unit
The sewing data processing apparatus according to claim 1, wherein the correction amount is calculated according to the movement amount of the ratio that becomes the maximum among the plurality of the ratios detected by the third detection unit.
前記第一算出部は、
前記第三検出部により検出した前記複数の割合のうち、最大となる前記割合が複数あるか否かを特定する特定部を備え、
前記第一算出部は、
前記特定部が最大となる前記割合が複数あると判断した場合、最大となる複数の前記割合に対応する前記複数の移動量に応じて、前記補正量を決定する
ことを特徴とする請求項2に記載の縫製データ処理装置。
The first calculation unit
A specific unit for specifying whether or not there is a plurality of the maximum ratios among the plurality of ratios detected by the third detection unit is provided.
The first calculation unit
2. The second aspect of the present invention is that when it is determined that there are a plurality of the ratios at which the specific portion is maximized, the correction amount is determined according to the plurality of movement amounts corresponding to the plurality of maximum ratios. The sewing data processing device described in.
前記撮影制御部により取得した前記全体画像において、前記第一補正部による補正後の前記縫製データの前記針落ち位置が、前記溝の位置に含まれるか否かを判断する判断部と、
前記判断部が、前記針落ち位置が前記溝の位置に含まれないと判断した場合、前記溝の位置に含まれない前記針落ち位置について報知する報知部と
を備えたことを特徴とする請求項1から3の何れか一つに記載の縫製データ処理装置。
A determination unit for determining whether or not the needle drop position of the sewing data after correction by the first correction unit is included in the groove position in the overall image acquired by the imaging control unit.
The claim is characterized in that when the determination unit determines that the needle drop position is not included in the groove position, the determination unit includes a notification unit that notifies the needle drop position that is not included in the groove position. Item 4. The sewing data processing apparatus according to any one of Items 1 to 3.
前記撮影制御部により取得した前記全体画像において、前記第一補正部による補正後の前記座標データの前記針落ち位置が、前記溝の位置に含まれるか否かを判断する判断部と、
前記判断部が前記溝の位置に含まれないと判断した前記針落ち位置を、前記溝の位置に含まれる位置に補正する第二補正部と
を備えたことを特徴とする請求項1から4の何れか一つに記載の縫製データ処理装置。
A determination unit for determining whether or not the needle drop position of the coordinate data after correction by the first correction unit is included in the groove position in the overall image acquired by the imaging control unit.
Claims 1 to 4 include a second correction unit that corrects the needle drop position determined by the determination unit not to be included in the groove position to a position included in the groove position. The sewing data processing apparatus according to any one of the above.
前記撮影制御部は、
前記ミシンが前記縫製データに基づき送り機構を駆動して前記布保持枠を移動する時、前記布保持枠の前記溝を撮影し、前記全体画像を取得する
ことを特徴とする請求項1から5の何れか一つに記載の縫製データ処理装置。
The imaging control unit
Claims 1 to 5 are characterized in that when the sewing machine drives a feed mechanism based on the sewing data to move the cloth holding frame, the groove of the cloth holding frame is photographed and the entire image is acquired. The sewing data processing device according to any one of the above.
前記ミシンが前記送り機構を駆動して前記布保持枠を移動する場合に、前記撮影部の撮影範囲の所定位置を、前記縫製データの仮想的な針落ち位置として前記縫製データを変換する変換部
を備えたことを特徴とする請求項6に記載の縫製データ処理装置。
When the sewing machine drives the feed mechanism to move the cloth holding frame, a conversion unit that converts the sewing data by setting a predetermined position in the imaging range of the imaging unit as a virtual needle drop position of the sewing data. The sewing data processing apparatus according to claim 6, wherein the sewing data processing apparatus is provided.
請求項1〜7の何れかに記載の縫製データ処理装置と、
前記縫製データ処理装置により補正した前記縫製データに基づき、前記被縫製物に縫製を行う縫製制御部と
を備えたことを特徴とするミシン。
The sewing data processing device according to any one of claims 1 to 7.
A sewing machine including a sewing control unit that sews the sewn object based on the sewn data corrected by the sewn data processing device.
JP2019180672A 2019-09-30 2019-09-30 Sewing data processing device and sewing machine Pending JP2021053241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019180672A JP2021053241A (en) 2019-09-30 2019-09-30 Sewing data processing device and sewing machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019180672A JP2021053241A (en) 2019-09-30 2019-09-30 Sewing data processing device and sewing machine

Publications (1)

Publication Number Publication Date
JP2021053241A true JP2021053241A (en) 2021-04-08

Family

ID=75273103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019180672A Pending JP2021053241A (en) 2019-09-30 2019-09-30 Sewing data processing device and sewing machine

Country Status (1)

Country Link
JP (1) JP2021053241A (en)

Similar Documents

Publication Publication Date Title
US8301292B2 (en) Sewing machine and non-transitory computer-readable medium storing sewing machine control program
EP2366824B1 (en) Sewing machine and sewing machine control program
US8061286B2 (en) Sewing machine and computer-readable medium storing sewing machine control program
US8763542B2 (en) Sewing machine and non-transitory computer-readable medium
US8763541B2 (en) Sewing machine and non-transitory computer-readable medium storing sewing machine control program
US8869721B2 (en) Non-transitory computer-readable medium, sewing machine system, and embroidery frame
US20110048301A1 (en) Sewing machine and computer-readable medium storing sewing machine control program
EP2292825A2 (en) Sewing machine and computer-readable medium storing sewing machine control program
US8738170B2 (en) Sewing machine and an embroidery frame
EP2386673A1 (en) Sewing machine and non-transitory computer-readable medium storing sewing machine control program
JP2014064660A (en) Sewing machine
JP2014155579A (en) Sewing machine, sewing machine program and sewing machine system
JP2014155580A (en) Sewing machine, sewing machine program and sewing machine system
US10450682B2 (en) Sewing machine and non-transitory computer-readable medium
EP2918720B1 (en) Sewing machine and non-transitory computer-readable medium storing computer-readable instructions
US10988879B2 (en) Sewing machine and holder member
US11180879B2 (en) Sewing machine and pattern alignment method
JP2021053241A (en) Sewing data processing device and sewing machine
US11885054B2 (en) Sewing system and sewing machine
JP2011005180A (en) Sewing machine
WO2016129491A1 (en) Cutting device and appliqué sewing method
US20190390383A1 (en) Sewing machine and sewing method
JP2020156831A (en) Sewing data processing device and sewing machine
JP2019107062A (en) sewing machine
US11149369B2 (en) Sewing machine and sewing machine control method