TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: ThreadTone – Halftone images made of thread

303 点作者 theveloped超过 8 年前

23 条评论

amluto超过 8 年前
A couple thoughts:<p>Unless your image library is way fancier than I imagine, you would get a much less biased result if you convert to a linear color space. This code:<p><pre><code> # Invert grayscale image def invertImage(image): return (255-image) </code></pre> doesn&#x27;t accurately compute amount of thread cover desired because &quot;image&quot; isn&#x27;t linear in brightness.<p>For this particular use case, though, you probably want to further transform the output. Suppose that one thread locally reduces light transmission by a factor of k. Then two reduce by k^2 (assuming there&#x27;s enough blurring, everything is purely backlit, no reflections etc), and so on. So n reduces the log of the brightness by n*log(k). I would try calculating -log(luminosity) and fitting threads to that.<p>Finally, this sounds like a wonderful application of compressed sensing. I bet you could get an asymptotically fast algorithm that is reasonably close to optimal.
评论 #13255120 未加载
Someone超过 8 年前
I would look at tomographic reconstruction (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tomographic_reconstruction" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tomographic_reconstruction</a>) algorithms for this for inspiration. This is a very similar problem: what projections best approximate a given image?
评论 #13254230 未加载
评论 #13254236 未加载
vortico超过 8 年前
This is so weird, I just decided to make one of these thread images last night and came up with the same algorithm which runs in about 10 minutes. But I think the loom robot is the real piece of work here. It takes me about an hour to string up 3000 passes manually, but on the other hand, I like my design of nails on a painted piece of plywood better. :) Nice work!
mynegation超过 8 年前
Very interesting! The inspiration behind this post, artist Petros Vrellis, uses computer algorithm too: <a href="http:&#x2F;&#x2F;artof01.com&#x2F;vrellis&#x2F;works&#x2F;knit.html" rel="nofollow">http:&#x2F;&#x2F;artof01.com&#x2F;vrellis&#x2F;works&#x2F;knit.html</a>
sehugg超过 8 年前
I did something like this with a pen plotter and CMYK pens. I biased the random walk to follow&#x2F;bounce off edges.<p><a href="http:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;n7OOd" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;n7OOd</a>
franciscop超过 8 年前
OMG, thank you! I am the creator of <a href="https:&#x2F;&#x2F;comments.network&#x2F;" rel="nofollow">https:&#x2F;&#x2F;comments.network&#x2F;</a> which you are using on the bottom of the article, and it&#x27;s the first time I spot it in the wild! If you have any problem&#x2F;suggestion&#x2F;anything just write me: public@francisco.io<p>BTW I love what you made, have you considered selling those? It looks like it could have a similar business model as instapainting: <a href="http:&#x2F;&#x2F;instapainting.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;instapainting.com&#x2F;</a>
评论 #13255486 未加载
评论 #13255418 未加载
snovv_crash超过 8 年前
Very cool. I wonder if there could be an improvement in image quality if you added some form of lookahead, and chose the path that gives the best results. The branching factor would be horrendous, but I suspect that it could be pruned significantly using some A*-ish cost&#x2F;ordering criterion.
评论 #13254215 未加载
raverbashing超过 8 年前
There seems to be one potential improvement: it seems the original artist algorithm privileges detail in more detailed areas than an overall correctness of line positioning<p>(Might be that it tries to optimize for edge contours)
评论 #13254392 未加载
WhitneyLand超过 8 年前
Tobias I think it&#x27;s extremely cool, nice work.<p>I am curious, how would the final quality of the result be affected by:<p>- Changing the shape to say, a square. Or maybe a circle is optimal given a limited number of points.<p>- Inreasing the number of endpoints. There must be some limit to this. For example, even giving an infinite number of endpoints would not look like a photo, but how much better could it look?
评论 #13254164 未加载
评论 #13254920 未加载
leni536超过 8 年前
As a physicist my first approach would be using Radon transform [1]. Should be tweaked a little, as overlapping threads are not additive in color (for black threads it&#x27;s multiplicative though).<p>[1] <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Radon_transform" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Radon_transform</a>
评论 #13258045 未加载
fiatjaf超过 8 年前
See also <a href="https:&#x2F;&#x2F;github.com&#x2F;fogleman&#x2F;primitive" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fogleman&#x2F;primitive</a>
pavelrub超过 8 年前
Very cool! How much is it affected by the method of new pin selection after each time we add a line? I.e. currently you are doing oldPin = bestPin, and the first pin is selected at random... wouldn&#x27;t it be better to just add lines based on a Hough transform (with rounding to the nearest pins) - starting from the line which covers the maximum number of points, and going down?
评论 #13254387 未加载
rouli超过 8 年前
really nice! in your fitness function - wouldn&#x27;t you prefer to normalize somehow for the the line&#x27;s length? i.e. - longer lines (going between two far away pins) will cover more dark pixels, and are more likely to be picked, even though they might also cover many bright pixels. I wonder if the average darkness of pixels along the line will work better?
评论 #13254233 未加载
i-make-robots超过 8 年前
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=orPiPpaeN3E" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=orPiPpaeN3E</a>
chrischen超过 8 年前
Dis you make the 200 pin loom or buy it? I can&#x27;t seem to find such a product online.
评论 #13254248 未加载
skinner_超过 8 年前
I did something like this myself:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;danielvarga&#x2F;string-art" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;danielvarga&#x2F;string-art</a><p>My algorithm uses a bit fancier math: I reformulate the approximation problem as a sparse least squares problem over positive integers, solve the relaxation, and truncate and quantize the solution. It works quite well in practice, check out the images.
ansek超过 8 年前
That&#x27;s awesome, nice work!<p>Personally, can&#x27;t say I understand image pre-processing well but did you notice that original Petros Vrellis images have deeper black color in some parts like face edges or hair and much lighter parts in cheeks and foreheads which creates a more detailed portrait?<p>Also, this name reminds me Jason Bourne movies as they have Operation Treadstone there.
wtallis超过 8 年前
I wonder if anyone still has some automated wire wrap equipment that could be programmed to do this kind of thing.
mhb超过 8 年前
An interesting modification could be to have a small straight wall instead of each pin. A ball, whose trail remained visible, could bounce off each wall and create the image. The orientation of all the walls would determine what image was produced.
wodenokoto超过 8 年前
I worked on a script to make a similar effect for my avatar picture, but never got it working, so my hat off to the author!
zalq超过 8 年前
This is very, very cool. Thanks for sharing!
Jommi超过 8 年前
we&#x27;re could I get irl versions of this (actually spun, but printed is ok)
评论 #13254259 未加载
thenormal超过 8 年前
Like what you made here.