{"id":1869,"date":"2022-12-20T15:26:13","date_gmt":"2022-12-20T15:26:13","guid":{"rendered":"https:\/\/www.hannahdee.eu\/blog\/?p=1869"},"modified":"2025-01-07T19:03:30","modified_gmt":"2025-01-07T19:03:30","slug":"more-embroidery","status":"publish","type":"post","link":"https:\/\/www.hannahdee.wales\/blog\/?p=1869","title":{"rendered":"More embroidery"},"content":{"rendered":"\n<p>Over the last couple of months I have been intermittently playing with code and with the embroidery machine, and there are a few things I&#8217;ve learned. <\/p>\n\n\n\n<p>Here&#8217;s a blow-by-blow account of creating an embroidered image from a photo:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/\/orig-1024x863.png\" alt=\"Original image\" class=\"wp-image-1868\"\/><figcaption class=\"wp-element-caption\">A teenage boy with a massive log<\/figcaption><\/figure>\n\n\n\n<p>First I cut out the image I was interested in using GIMP, and then blurred it to reduce the amount of detail. With my blurred image, I then ran Watershed to segment it into coloured blocks or regions. This gave me something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/\/henryblocks.png\" alt=\"Watershed segmentation of image\" class=\"wp-image-1863\" title=\"Watershed segmentation of image\" srcset=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/henryblocks.png 1024w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/henryblocks-300x244.png 300w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/henryblocks-768x624.png 768w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/henryblocks-425x345.png 425w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Watershed segmentation of image<\/figcaption><\/figure>\n\n\n\n<p>This original attempt at a pattern was &#8211; with hindsight &#8211; too complex. However I didn&#8217;t know that at the time so I went straight to embroidery, and imported it into Inkscape, used Ink\/stitch to create a pattern, then tried to sew it on the machine. Thread jams ensued. The interaction between an idea and the execution is not that easy when you need it to work with thread.<\/p>\n\n\n\n<p>Next step &#8211; try to remove any overlapping blocks. SO back to the GIMP and I applied morphological operations (select then shrink selection a few times) to ensure there were no overlapping regions or indeed regions too close to each other.  My design now looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/\/henryblocks-1.png\" alt=\"Watershed segmentation of the cut out image.\" class=\"wp-image-1871\"\/><figcaption class=\"wp-element-caption\">Watershed segmentation of the cut out image with added whitespace to ensure thread regions don&#8217;t overlap.<\/figcaption><\/figure>\n\n\n\n<p>This still wasn&#8217;t quite right when it came to sewing. I got a jam again, with this one, and actually had a person in the makerspace with me so can show a video here illustrating how to unjam the machine.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"untangling a knot by the bobbin in a Brother Innovis 880e\" width=\"1260\" height=\"709\" src=\"https:\/\/www.youtube.com\/embed\/V524vo7MZDo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">Me trying to unblock the machine<\/figcaption><\/figure>\n\n\n\n<p>So, back again to the drawing board again. This time the task was to simplify and to remove more overlapping blocks. I went for Inkscape&#8217;s simplify path option, and then hand-edited the paths in Inkscape to fiddle with control points and make sure there really were no overlapping sections. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"999\" height=\"724\" src=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/\/svg-simplified-screenshot.png\" alt=\"simplified SVG version\" class=\"wp-image-1865\" srcset=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/svg-simplified-screenshot.png 999w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/svg-simplified-screenshot-300x217.png 300w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/svg-simplified-screenshot-768x557.png 768w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/svg-simplified-screenshot-425x308.png 425w, https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/svg-simplified-screenshot-550x400.png 550w\" sizes=\"auto, (max-width: 999px) 100vw, 999px\" \/><figcaption class=\"wp-element-caption\">A simplified further version. Curves much more curvy, no overlapping sections at all<\/figcaption><\/figure>\n\n\n\n<p>One of the things that the Ink\/stitch plugin gives you is the option to simulate the stitch pattern, so I gave that a go. Here is a video showing where the machine&#8217;s going to stitch and what order the sections are going to be in.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Preview of embroidery from Ink\/stitch\" width=\"1260\" height=\"709\" src=\"https:\/\/www.youtube.com\/embed\/xH5oMJYPAVU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">A preview of the order of the embroidery<\/figcaption><\/figure>\n\n\n\n<p>And finally, having watched the preview to check there were no overlapping sections, I managed to get the machine to sew it. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.hannahdee.wales\/blog\/wp-content\/uploads\/\/final_emb.jpg\" alt=\"Embroidered final version\" class=\"wp-image-1867\"\/><figcaption class=\"wp-element-caption\">Embroidered final version<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Over the last couple of months I have been intermittently playing with code and with the embroidery machine, and there are a few things I&#8217;ve learned. Here&#8217;s a blow-by-blow account of creating an embroidered image from a photo: First I cut out the image I was interested in using GIMP, and then blurred it to reduce the amount of detail. With my blurred image, I then ran Watershed to segment it into coloured blocks or regions. This gave me something like this: This original attempt at a pattern was &#8211; with hindsight &#8211; too complex. However I didn&#8217;t know that at the time so I<span class=\"more-link\"><a href=\"https:\/\/www.hannahdee.wales\/blog\/?p=1869\">Read More &rarr;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":1866,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[43,155,149],"class_list":["entry","author-handee","post-1869","post","type-post","status-publish","format-standard","has-post-thumbnail","category-geekiness","tag-computing","tag-embroidery","tag-makerspace"],"_links":{"self":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1869"}],"version-history":[{"count":7,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1869\/revisions"}],"predecessor-version":[{"id":1998,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1869\/revisions\/1998"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=\/wp\/v2\/media\/1866"}],"wp:attachment":[{"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hannahdee.wales\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}