5 ms·
Primitive – recreate your photos with vector-based geometric primitives
- deleted 8y ago[deleted]
- nzjrs 8y agoI'm struggling to find again a c++ implementation of this I saw on github a while back. Does HN the hive mind remember?
- zchrykng 8y agoResistance is futile, you will be assimilated. (sorry couldn't resist, and don't know where the c++ implementation is)
- fogleman 8y agoThe core of Primitive is open source, written in Go. https://github.com/fogleman/primitive https://github.com/fogleman/primitive Only the UI is closed source. It's written in Objective-C and basically shells out to the Go code.
- JoshuaJB 8y agoI was just poking through some of the code and noticed that there seem to a lot of open bugfix PRs [1]. Have you thought about going through and upstreaming some of them? Many of them seem like quick reviews. Edit: Also, if you would like some help maintaining it, I imagine plenty of fellow HN-ers (including me) would love to help. [1] https://github.com/fogleman/primitive/pulls?q=is%3Aopen+is%3Apr https://github.com/fogleman/primitive/pulls?q=is%3Aopen+is%3...
- idle_zealot 8y agoI noticed the PRs too. Looks like one of the people submitting them has also been maintaining their own branch[1] with a bunch merged. [1] https://github.com/bmaltais/primitive https://github.com/bmaltais/primitive
- pRusya 8y agoAnd here is the original post by the author https://news.ycombinator.com/item?id=12539109 https://news.ycombinator.com/item?id=12539109
- gameguy43 8y agoThis sort of thing is useful for showing placeholder images while high-res images load: https://jmperezperez.com/svg-placeholders/ https://jmperezperez.com/svg-placeholders/
- leetbulb 8y agoUnmaintained at this point, but here's a Webpack loader that does this: https://github.com/technopagan/sqip https://github.com/technopagan/sqip
- aurelian15 8y agoI've written my own placeholder image generator based on Delaunay triangulation inspired by this blog-post. The generator produces reasonable placeholder images at about 300 bytes. The overall effect is not as nice as the images produced by Primitive though. However, Delaunay triangulation is deterministic and relatively fast. Furthermore, the triangles can be efficiently serialized as triangle strips. In case anyone is interested, the code is on GitHub [1]. [1] https://github.com/astoeckel/aequipedis/ https://github.com/astoeckel/aequipedis/
- minimaxir 8y agoAn unexpected benefit of Primitive is that it helps create really cool animations (both by screen-recording the Primitive app as it renders the shapes for the image, and by working with SVG animation libraries on the web). I played around with it a couple years ago (https://minimaxir.com/2016/12/primitive/ https://minimaxir.com/2016/12/primitive/) and it worked out surprisingly well.
- fractallyte 8y agoYou might be interested in Synthetik Studio Artist (https://synthetik.com/ https://synthetik.com/). Among (many!) other things, it can process images and animations and output SVG. There are operations that produce Primitive-style pictures, but also a huge number of others. And it's customizable! A graphics rabbit-hole...
- jnurmine 8y agoRoger Alsing (Johansson) did this in 2008: https://rogerjohansson.blog/2008/12/07/genetic-programming-evolution-of-mona-lisa/ https://rogerjohansson.blog/2008/12/07/genetic-programming-e...
- fogleman 8y agoIndeed. I mentioned that in the README: https://github.com/fogleman/primitive#inspiration https://github.com/fogleman/primitive#inspiration
- jnurmine 8y agoI did skim that file through but missed it, sorry. It's worth pointing out in the comments here in case others miss it. The comparison is interesting since your rectangle version has superior image quality compared to Alsings. If I squint my eyes it is hard to tell a difference to the original picture. It looks blurred the "right way" somehow.
- ASipos 8y agoMy thoughts exactly.
- matthewfcarlson 8y agoI modified this to try and compare against the last image it generated and feed it images via ffmpeg from a movie. Ultimately the results were still a little too choppy for video but the effect was very cool. The processing time was also incredibly long because lowering the polygon count made it very hard to tell what was moving.
- hckr1292 8y agoCould you post a video clip of the output? It sounds like the effect from "A Scanner Darkly" perhaps -- loved that effect in that movie!
- kccqzy 8y agoAlmost a decade ago I remember using an online service called Vector Magic to do this kind of stuff. At that time it was considered the state-of-the-art auto tracer. Is this noticeably better than Vector Magic when using Bezier curves?
- ficklepickle 8y agoI keep a windows xp VM around almost exclusively for Vector Magic. I've never tried it with photos though. Mostly for improving the quality of logos by vectorizing then exporting a higher-res PNG. Maybe I will finally be able to get rid of it. I can't tell right now, I think Primitive is being hugged to death currently.
- proxygeek 8y agoVector magic runs perfectly fine and does a great job even in high Res photos on Win 10. About 90 seconds for 2048x1433 image with some intricate details at high quality setting (as compared to offered medium and low quality settings) with unlimited colours. But results are still pretty nice even at low quality setting with limited colour palette. Hardly takes 15 secs.
- KiDD 8y agoPlease build iOS version!
- real-hacker 8y agoRediscovered, posted multiple times on HN.