Patent ID: 8594829

Claim:
A sewing machine comprising: an image capturing device that captures a marker arranged on a surface of a sewing target object held by an embroidery frame; an acquisition portion that acquires image data of the marker captured by the image capturing device; a layout determination portion that, if it is assumed that a reference pattern is a pattern that is sewn when a holding position of the sewing target object with respect to the embroidery frame is a first holding position and it is also assumed that a next pattern is a pattern that is sewn subsequently to the reference pattern and that is sewn when the holding position is a second holding position that is different from the first holding position, determines a relative layout including at least one of a position and an angle of the next pattern with respect to a layout including at least one of a position and an angle of the reference pattern; a layout detection portion that, based on the image data acquired by the acquisition portion, detects a layout including at least one of a position and an angle of the marker with respect to the layout of the reference pattern; a storage device that stores the layout of the marker as layout information; a registration portion that registers, in the storage device, information relating to the layout including at least one of the position and the angle of the marker with respect to the layout of the reference pattern that is detected by the layout detection portion, the information being registered as storage information; an update portion that updates the storage information stored in the storage device when the layout including at least one of the position and the angle of the marker with respect to the layout of the reference pattern is newly detected by the layout detection portion; and a setting portion that, when the storage information stored in the storage device is information relating to the marker captured in the second holding position, sets a layout including at least one of a position and an angle of the next pattern with respect to the sewing target object in the second holding position, based on the storage information and on the relative layout of the next pattern with respect to the layout of the reference pattern that is determined by the layout determination portion.