MarginallyClever / weaving_algorithm

weaving thread between nails in a circle to produce an image.
GNU General Public License v2.0
163 stars 49 forks source link

RGB version? #3

Open ofou opened 5 years ago

ofou commented 5 years ago

I was wondering if it's possible to make a RGB version of this algorithm using 3 threads instead of one. It would be amazing if this is possible. Have you thought about it?

i-make-robots commented 5 years ago

I see how that would be possible. If you don’t see an update in a week, ping me.

On Aug 4, 2019, at 11:57 AM, Omar Francisco Olivares notifications@github.com wrote:

I was wondering if it's possible to make a RGB version of this algorithm using 3 threads instead of one. It would be amazing if this is possible. Have you thought about it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

whitecherep commented 5 years ago

Is it possible to make not just Red Green Blue version, but colorful (depends how many colors picture require or you set for example 3-5 colors in settings)? In order to receive something like this https://www.youtube.com/watch?v=J7bALdSkPow https://www.youtube.com/watch?v=i8N4TmOMTLA https://www.youtube.com/watch?v=r3_dS1gvYLU https://www.youtube.com/watch?v=iv_x1uJDvO8

i-make-robots commented 5 years ago

I can see how it would be done. I'm crazy busy until tuesday but after that I can actually write code. Before then, let's work out a few details. How would you decide what colors to start with, and when to stop using each color?

On Fri, Aug 9, 2019 at 5:58 AM whitecherep notifications@github.com wrote:

Is it possible to make not just Red Green Blue version, but colorful (depends how many colors picture require or you set for example 3-5 colors in settings)? In order to receive something like this https://www.youtube.com/watch?v=J7bALdSkPow https://www.youtube.com/watch?v=i8N4TmOMTLA https://www.youtube.com/watch?v=r3_dS1gvYLU https://www.youtube.com/watch?v=iv_x1uJDvO8

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBQCS4PVJZGDU6ZRTUTQDVSWTA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD36S7QA#issuecomment-519909312, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFRBQ4B3VAIFUSTISJONLQDVSWTANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

whitecherep commented 5 years ago

maybe before scan an image you can choose (or change in code) something like modes: fast(3 colors), medium(4 colors), exact(5 colors) or just simply set number of colors in code "colors: 3" or "colors: 5", etc. And when program scans the image it chooses main 3-4-5 colors(depending to what number you set in code) of the image you need in order to replicate the picture in choosen quality.

i-make-robots commented 5 years ago

sure. I could build a histogram to find the most obvious colors, and then just tell the user "get these N colors". What about when to stop using a color?

On Fri, Aug 9, 2019 at 11:28 AM whitecherep notifications@github.com wrote:

maybe before scan an image you can choose (or change in code) something like modes: fast(3 colors), medium(4 colors), exact(5 colors) or just simply set number of colors in code "colors: 3" or "colors: 5", etc. And when program scans the image it chooses main 3-4-5 colors(depending to what number you set in code) of the image you need in order to replicate the picture in choosen quality.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBWL3LVXGXH665BJJPLQDWZOXA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD37N35I#issuecomment-520019445, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFRBRUH4GKIC43EI5N4SLQDWZOXANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

whitecherep commented 5 years ago

hm.. not sure about this) maybe you already have something in mind?

i-make-robots commented 5 years ago

So I put in some work in this. I saw Instagram user @art.nitka has figured it out. She’s not sharing her technique. I tried to write a version that used black string AND white string, but it didn’t work well. She’s got a tricky method for switching colours. The order of strings means that some strings cover others in a way that improves the results. I don’t get how they calculate it, except by brute force trying everything. My method was trying to look at the amount of a color left in the original image + the amount of error in the finished weave. Results looked bad.

On Aug 30, 2019, at 3:04 AM, whitecherep notifications@github.com wrote:

hm.. not sure about this) maybe you already have something in mind?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

i-make-robots commented 5 years ago

I just counted one of her pieces. She has 188 nails around the edge. I usually math with way more! Hmm... doesn’t solve anything, it’s just an interesting data point.

On Aug 30, 2019, at 7:11 AM, Dan Royer dan@marginallyclever.com wrote:

So I put in some work in this. I saw Instagram user @art.nitka has figured it out. She’s not sharing her technique. I tried to write a version that used black string AND white string, but it didn’t work well. She’s got a tricky method for switching colours. The order of strings means that some strings cover others in a way that improves the results. I don’t get how they calculate it, except by brute force trying everything. My method was trying to look at the amount of a color left in the original image + the amount of error in the finished weave. Results looked bad.

On Aug 30, 2019, at 3:04 AM, whitecherep notifications@github.com wrote:

hm.. not sure about this) maybe you already have something in mind?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

whitecherep commented 5 years ago

I found some other code on github but can't get it work/install the script as I am not familiar with programming, but maybe this code will help you to figure out how is it possible to make it in your script? https://github.com/MaloDrougard/knit https://github.com/MaloDrougard/knit/wiki/Installation-of-openframework-qtcreator-knitApp

i-make-robots commented 5 years ago

Huh. Exactly the same as my algorithm but all three colours run in parallel.

On Aug 30, 2019, at 7:22 AM, whitecherep notifications@github.com wrote:

I found some other code on github but can't get it work/install the script as I am not familiar with programming, but maybe this code will help you to figure out how is it possible to make it in your script? https://github.com/MaloDrougard/knit https://github.com/MaloDrougard/knit/wiki/Installation-of-openframework-qtcreator-knitApp

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

i-make-robots commented 5 years ago

committed a change that should get you closer to what you seek.

On Fri, Aug 30, 2019 at 10:19 AM Dan Royer dan@marginallyclever.com wrote:

Huh. Exactly the same as my algorithm but all three colours run in parallel.

On Aug 30, 2019, at 7:22 AM, whitecherep notifications@github.com wrote:

I found some other code on github but can't get it work/install the script as I am not familiar with programming, but maybe this code will help you to figure out how is it possible to make it in your script? https://github.com/MaloDrougard/knit

https://github.com/MaloDrougard/knit/wiki/Installation-of-openframework-qtcreator-knitApp

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBTT24L6ON66ZVPVDFLQHEUI7A5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5RZPDQ#issuecomment-526620558, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFRBQX77NJ5V7H7XKJUCTQHEUI7ANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

whitecherep commented 5 years ago

Nice work. I have found that she uses max 8000 lines. Here is a result on 8000 lines by your algorithm (she used black, white, yellow, green and red). One thing is maybe that she uses grey/coffee color canvas so it helps and add one more color close to skin color but I am not sure it helps at all. another thing I guess thier algorithm may work like layer after layer. For example you knit some lines in black color then some pack of lines by red, then pack/layer with yellow, then again layer of black, etc but not like different color lines everytime line by line because in this case whole picture will take a lot of time, not just a few of days. mona_preview изображение

i-make-robots commented 5 years ago

It may also help to stop (click) the simulation earlier. I find I only get maybe 25-50% done before I feel it is at its best.

On Mon, Sep 2, 2019 at 2:12 PM whitecherep notifications@github.com wrote:

Nice work. I have found that she uses max 8000 lines. Here is a result on 8000 lines by your algorithm (she used black, white, yellow, green and red). One thing is maybe that she uses grey/coffee color canvas so it helps and add one more color close to skin color but I am not sure it helps at all. another thing I guess thier algorithm may work like layer after layer. For example you knit some lines in black color then some pack of lines by red, then pack/layer with yellow, then again layer of black, etc but not like different color lines everytime line by line because in this case whole picture will take a lot of time, not just a few of days. [image: mona_preview] https://user-images.githubusercontent.com/8123601/64133288-bcc4ee80-cddd-11e9-9460-d123f3c701a6.png [image: изображение] https://user-images.githubusercontent.com/8123601/64133331-0c0b1f00-cdde-11e9-98ea-dab90a1b8d3e.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBU6ZNGBFCEH6XJBCJTQHV6VLA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WRTJY#issuecomment-527243687, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFRBQKQY5PHS473VVTSH3QHV6VLANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

whitecherep commented 5 years ago

seems you have updated black/white algorithm to colors too? Here is (3rd from the left) a version by that algorithm (maybe even better?) изображение image

fanqieo commented 5 years ago

I like your program very much Let's say I set 30,000 lines and I only execute 2,000 lines and I'm done weaving_algorithm_circle

i-make-robots commented 5 years ago

click to start. click to stop.

I suspect there's a way to do even better. say you get some lines and it's pretty good... but obviously it would be better if some lines were in a different order (on top of each other). So I wonder if it's worth sorting the list of approved lines so different lines are on top and then checking if it is closer to the original image.

On Thu, Sep 5, 2019 at 10:08 PM fanqieo notifications@github.com wrote:

I like your program very much Let's say I set 30,000 lines and I only execute 2,000 lines and I'm done weaving_algorithm_circle

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBWWZCO35G3O2EEV2GDQIHQUXA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6BXU5A#issuecomment-528710260, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFRBWWUBA2PCAXXQ53BZ3QIHQUXANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

i-make-robots commented 5 years ago

the mona lisa picture gives me a lot of trouble. I can only assume they made it work by choosing a very dark canvas to start. canvas color and thread color makes a HUGE difference.

On Thu, Sep 5, 2019 at 10:51 PM Dan Royer dan@marginallyclever.com wrote:

click to start. click to stop.

I suspect there's a way to do even better. say you get some lines and it's pretty good... but obviously it would be better if some lines were in a different order (on top of each other). So I wonder if it's worth sorting the list of approved lines so different lines are on top and then checking if it is closer to the original image.

On Thu, Sep 5, 2019 at 10:08 PM fanqieo notifications@github.com wrote:

I like your program very much Let's say I set 30,000 lines and I only execute 2,000 lines and I'm done weaving_algorithm_circle

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBWWZCO35G3O2EEV2GDQIHQUXA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6BXU5A#issuecomment-528710260, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFRBWWUBA2PCAXXQ53BZ3QIHQUXANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

fanqieo commented 5 years ago

Will the program continue to adjust? Look forward to.

Neyestan commented 4 years ago

Hi, I have made one of these (one string color) for my daughter. I used 256 nails, 4000 lines and 3046 meters of thread and it took me 53 hours to finish it.. I am very much interested to make one in color but definitely not in 30000 lines. IMG_2809 IMG_2933 1200 lines - 2 1600 lines - 2 2200 lines - 2 3000 lines - 1 4000 lines

i-make-robots commented 4 years ago

Can I share this on my blog, please?

On Fri, Nov 29, 2019 at 3:35 PM Neyestan notifications@github.com wrote:

Hi, I have made one of these (one string color) for my daughter. I used 256 nails, 4000 lines and 3046 meters of thread and it took me 53 hours to finish it.. I am very much interested to make one in color but definitely not in 30000 lines. [image: IMG_2809] https://user-images.githubusercontent.com/56176934/69892738-1ec3c000-1309-11ea-8be7-2a6f7f316f22.JPG [image: IMG_2933] https://user-images.githubusercontent.com/56176934/69892741-26836480-1309-11ea-8547-340ea3b6194b.JPG [image: 1200 lines - 2] https://user-images.githubusercontent.com/56176934/69892743-2edb9f80-1309-11ea-8689-2d67ee15ae14.JPG [image: 1600 lines - 2] https://user-images.githubusercontent.com/56176934/69892746-31d69000-1309-11ea-8141-8df91a6b142a.JPG [image: 2200 lines - 2] https://user-images.githubusercontent.com/56176934/69892750-34d18080-1309-11ea-810a-bbc542e8ef3f.JPG [image: 3000 lines - 1] https://user-images.githubusercontent.com/56176934/69892753-38fd9e00-1309-11ea-88dd-b1771e9271de.JPG [image: 4000 lines] https://user-images.githubusercontent.com/56176934/69892755-3ef37f00-1309-11ea-9966-d6b83298c3e5.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBULQB3F53VL6KKCUA3QWGRKVA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPVEZA#issuecomment-559895140, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFRBV5EXFRRVRPTFDMZSLQWGRKVANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

Neyestan commented 4 years ago

Yes of course you can.

Neyestan commented 4 years ago

Where is your blog?

i-make-robots commented 4 years ago

Marginallyclever.com

On Fri, Nov 29, 2019 at 3:51 PM Neyestan notifications@github.com wrote:

Where is your blog?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBVQNDUGSSK4ZAUSSF3QWGTIVA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPVPNA#issuecomment-559896500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFRBW3AF4U2PBQEMXYC7DQWGTIVANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

i-make-robots commented 4 years ago

So about the RGB thing... I spent a long time trying to get satisfying results. Even in two colors with white and black thread I have not succeeded. There must be a way to order the sequence of threads so that black and white mix in the right way to get the closest result. HOWEVER sometimes it may be better to let the wrong color through in a few places if the overall effect is improved. I can't imagine how to write a sorting metric that measures this in a reasonable amount of time.

On Fri, Nov 29, 2019 at 10:19 PM Dan Royer dan@marginallyclever.com wrote:

Marginallyclever.com

On Fri, Nov 29, 2019 at 3:51 PM Neyestan notifications@github.com wrote:

Where is your blog?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBVQNDUGSSK4ZAUSSF3QWGTIVA5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPVPNA#issuecomment-559896500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFRBW3AF4U2PBQEMXYC7DQWGTIVANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

i-make-robots commented 4 years ago

@Neyestan : https://www.marginallyclever.com/2019/12/circular-weaving-irl

GalacticJellyfish commented 4 years ago

@Neyestan that looks absolutely gorgeous! Well done!

geekality commented 4 years ago

@Neyestan That looks great, looks like it requires a lot of patience!

amirahar commented 4 years ago

Hi Your work is great I just want some advice from you Can I work in square or rectangle (black and white) Also in the folder below weaving_algorithm_square I don't run the program when I change the photo

Neyestan commented 4 years ago

آقا امیر سلام علیکم،حدس میزنم شما ایرانی و اهل شهرستان اهر هستید.در مورد تصویری که با نخ بر روی دایره ساخته بودم سئوال داشتید.شما میتونید سئوالاتتون را اینجا از من بپرسید.خدانگهدارتون Seyed

On Thursday, February 6, 2020, 08:38:23 AM GMT+1, amirahar <notifications@github.com> wrote:  

Hi Your work is great I just want some advice from you Can I work in square or rectangle (black and white) Also in the folder below weaving_algorithm_square I don't run the program when I change the photo

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

i-make-robots commented 4 years ago

This thread is for rgb version issues.

Please give a more detailed error report in a new issue. Thank you!

On Feb 6, 2020, at 4:54 AM, Neyestan notifications@github.com wrote:

آقا امیر سلام علیکم،حدس میزنم شما ایرانی و اهل شهرستان اهر هستید.در مورد تصویری که با نخ بر روی دایره ساخته بودم سئوال داشتید.شما میتونید سئوالاتتون را اینجا از من بپرسید.خدانگهدارتون Seyed

On Thursday, February 6, 2020, 08:38:23 AM GMT+1, amirahar notifications@github.com wrote:

Hi Your work is great I just want some advice from you Can I work in square or rectangle (black and white) Also in the folder below weaving_algorithm_square I don't run the program when I change the photo

  • Excuse me I don't speak English and wrote with Google Transylite

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

alyyousuf7 commented 4 years ago

@i-make-robots, I have done some work on the colour version. Not specifically RGB, but you get to choose colours yourself. I believe that every picture has different colours, and RGB would not work well. It works on screen, but I don't think it will work with threads. Probably for some pictures, but not many.

My inspiration came from this art piece: https://www.saatchiart.com/art/New-Media-Color-knit-5-Limited-Edition-of-4/858823/6200223/view If you look at the zoomed up version, you can see the colours used to make up the art.

I tried to replicate it (alyyousuf7/Weaver#2) on Lenna's image and the result (at least on Lenna) is really promising.

My repository is, after all, inspired by your work! Hoping to see a new technique regarding this issue.

i-make-robots commented 4 years ago

Hi! Thanks for everything. Nice to meet you!

Lately I’ve been think about a system that starts by placing the threads through the Center first and gradually spiraling outwards. Th is way high detail in the Center is preserved and it’s very quickly apparent if the image is coherent or not.

On Feb 11, 2020, at 1:10 PM, Ali Yousuf notifications@github.com wrote:

 @i-make-robots, I have done some work on the colour version. Not specifically RGB, but you get to choose colours yourself. I believe that every picture has different colours, and RGB would not work well. It works on screen, but I don't think it will work with threads. Probably for some pictures, but not many.

My inspiration came from this art piece: https://www.saatchiart.com/art/New-Media-Color-knit-5-Limited-Edition-of-4/858823/6200223/view If you look at the zoomed up version, you can see the colours used to make up the art.

I tried to replicate it (alyyousuf7/Weaver#2) on Lenna's image and the result (at least on Lenna) is really promising.

Your work is what inspired my repository after all! Hoping to see a new technique regarding this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Neyestan commented 4 years ago

Hi Dan, It's me again. I'm not expert in programming but I have been thinking a lot about how to knit the loom arts in colors. I wonder if we can posterize a picture in different layers (each layer for one color) in Photoshop and then knit each layer separately (of course the layers must be knitted at the same time to blend the colors more naturally). This is how they do it: https://www.youtube.com/watch?v=5Jm88Zom-y4 And I also thought that if we pixelate a picture and reduce the colors to 5 or 6 then we can write a code and address each pixel for every color. Take a look at this: https://www.youtube.com/watch?v=USzbw90wOKM Maybe none of these two thoughts can help.

i-make-robots commented 4 years ago

I’ve had similar thoughts. It’s possible posterizing can help.

I spent a long time playing with the scoring system. For every possible thread, the score says which is the best thread to stitch next. I tried scoring for minimum difference, increased score for accuracy in the Center, and other combinations.

I tried supersampling pixels at any given string position but it wasn’t pleasing.

That’s why now I feel that maybe starting in the Center and winding outwards might work well. The finished area would be off limits to new thread, or possibly there would be extra punishment for crossing the finished zone.

On Feb 12, 2020, at 7:56 AM, Neyestan notifications@github.com wrote:

 Hi Dan, It's me again. I'm not expert in programming but I have been thinking a lot about how to knit the loom arts in colors. I wonder if we can posterize a picture in different layers (each layer for one color) in Photoshop and then knit each layer separately (of course the layers must be knitted at the same time to blend the colors more naturally). This is how they do it: https://www.youtube.com/watch?v=5Jm88Zom-y4 And I also thought that if we pixelate a picture and reduce the colors to 5 or 6 then we can write a code and address each pixel for every color. Take a look at this: https://www.youtube.com/watch?v=USzbw90wOKM Maybe none of these two thoughts can help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

alyyousuf7 commented 4 years ago

@Neyestan, I have done exactly the same thing in one of my example (example02 in my repo’s example.pde file), where you can separate out color channels and weave each individually.

But I’m not very good at Photoshop (in fact, I used Photopea.com as alternative), and I find it extremely difficult to extract color channels from the picture.

i-make-robots commented 4 years ago

create a new spot color channel: https://helpx.adobe.com/photoshop/using/printing-spot-colors.html#about_spot_colors

On Wed, Feb 12, 2020 at 9:05 AM Ali Yousuf notifications@github.com wrote:

@Neyestan https://github.com/Neyestan, I have done exactly the same thing in one of my example (example02 in my repo’s example.pde file), where you can separate out color channels and weave each individually.

But I’m not very good at Photoshop (in fact, I used Photopea.com as alternative), and I find it extremely difficult to extract color channels from the picture.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/weaving_algorithm/issues/3?email_source=notifications&email_token=AALFRBU6KJEYEWQUWKN7DX3RCQT55A5CNFSM4IJGABXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELRR66I#issuecomment-585310073, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALFRBW5PK5VEHVEO7UIC6LRCQT55ANCNFSM4IJGABXA .

--

Dan Royer

Owner

1 (604) 259 9564 <16042599564> dan@marginallyclever.com www.marginallyclever.com https://www.facebook.com/MarginallyClever/ https://www.instagram.com/imakerobots/ https://www.youtube.com/channel/UCfbRxqjuOgE2EzRKxcePArw https://twitter.com/MarginallyC https://github.com/MarginallyClever/

alyyousuf7 commented 4 years ago

My final result (example03) does “some what” similar for separating out the color channels. And weave each one by one.

For color separation, I’m taking a list of colors that you want to weave with. For each color, I create a new image with that color only. And to create such image, I’m applying the “distance” formula in 3D space for each pixel color in the original image with required color for channel separation. Finally make it grayscale.

After I get the images for each color, I use the same technique that I use for regular grayscale image. (example02 / example01)

Now what I’m looking for, is a way where I don’t pick and choose the colors myself, but the program suggests me what colors might give the best result.

There’s one idea on my mind, that is, I provide my program a list of colors of all available colored threads in the market (or at least the ones that I have). Iterate combination of different colors and suggest me the best combination.

Challenge comes in to compute the combinations of colors along with other variables, such as the number of lines for each color.

Mind that the order of color during weaving also matters.

i-make-robots commented 4 years ago

try a histogram?

enomis-93 commented 4 years ago

Hi! I’m new to the community, I don’t know enough about programming, but your idea of image processing leads me to get closer to studying processing. I took a good look at the program you developed, and I was wondering if there was any way that the program could create a series of lines of the same color in sequence. Example 150 black lines, 150 white lines, 150 red lines, until the final image is obtained. I was willing to do some simulations myself, but without the basics of programming, I can’t write the right code to do what I mean.

i-make-robots commented 4 years ago

@Enomis9339 maybe? I'm not certain I understand your algorithm. could you give a pseudocode example, based on the actual code?

My current experiment is to generate all possible strings for each color; score every single string against the original image (where low score means close match); sort them low to high score per-color; and then mix some of each of the strings together, changing the order to move some strings on top of some others.

polemos0108 commented 4 years ago

hello. i am learning programming and i want to male string art portraits. can you tall me how i can add colour in code?

MohammadRNS commented 4 years ago

@i-make-robots Hi Dan. I downloaded processing and tried to run weaving_algorithm_circle.pde. But I encountered the following error message. could you help me? Untitled

MohammadRNS commented 4 years ago

@Neyestan سلام. شما خوبید؟ سال نو بر شما مبارک. شما کد ها رو چطور اجرا کردید؟؟پیغام خطای بالا مواجه نشدید؟؟

i-make-robots commented 4 years ago

looks Like you didn’t use the “clone of download” button and tried to copy the whole web page. The app is barfing because it doesn’t want to eat web code.

On Apr 3, 2020, at 7:13 AM, MohammadRNS notifications@github.com wrote:

 @i-make-robots Hi Dan. I downloaded processing and tried to run weaving_algorithm_circle.pde. But I encountered the following error message. could you help me?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

alyyousuf7 commented 4 years ago

I’m surprised to see that it didn’t complain until 250 lines!

Zanevskiy commented 4 years ago

Hey. Thank you for your work. I would like to ask you to make changes to the code so that the console output is saved in a .txt text file, as in this code https://github.com/christiansiegel/knitter/blob/master/knitter.pde . The last 500 lines are displayed on the console, and if the code writes 3000+ lines, they cannot be found ... I do not know English, I write through Google translator.

alyyousuf7 commented 4 years ago

@Zanevskiy, change your terminal/console settings to display unlimited lines instead of just the last 500 lines.

Zanevskiy commented 4 years ago

@Zanevskiy, change your terminal/console settings to display unlimited lines instead of just the last 500 lines.

Where can I find them? I searched and found nothing. Thank you.

i-make-robots commented 4 years ago

I'm wondering why stuff that isn't about the RGB version is in this thread. Make a new issue, please.

Zanevskiy commented 4 years ago

I'm wondering why stuff that isn't about the RGB version is in this thread. Make a new issue, please.

I'm sorry. in my country, very few people understand processing3, I wanted to ask the creators of the sketch for help. if you can not help me then sorry