
The Girl with the Brick Earring - plumbumsel
http://lucaswoltmann.de/art%27n%27images/2017/04/08/the-girl-with-the-brick-earring.html
======
pzone
Yikes, doing a color conversion by nearest-neighbor RGB is guaranteed to give
odd results like this. The entire center of her dress has undershot the
blackpoint and is washed out entirely in black, and the representation of the
headdress is extremely high variance. These are similar problems to people
what people face attempting to print out digital photos or artwork without
properly managed color.

At a minimum you would want to adjust the color gamut of the image by hand to
line up with the lego color gamut so the end result is more pleasing, more
concretely that means spending some time on the hue/saturation/lightness/color
curve filters until those conversion artifacts are minimized. A more
theoretically interesting way to do it would be to use a gamut matching
algorithm with a discrete color space defined by the available lego bricks.

[http://www.colourphil.co.uk/rendering_intents.shtml](http://www.colourphil.co.uk/rendering_intents.shtml)
[http://cs.haifa.ac.il/hagit/courses/ist/Lectures/IST12_Color...](http://cs.haifa.ac.il/hagit/courses/ist/Lectures/IST12_ColorManagementx4.pdf)

------
jerrre
Everybody here is drawn to the picking of the colors. But the optimization of
the different sized pieces also seems like a very fun problem to work on!

And taking the step to actually getting out of the digital world is something
everybody should probably do more often!

~~~
256
This is indeed an interesting problem. If you just want to minimize the number
of rectangles there is a neat solution on stackoverflow [1] that uses minimum
vertex cover (equivalently, bipartite maximum matching).

[1] [https://stackoverflow.com/a/6634668](https://stackoverflow.com/a/6634668)

~~~
mythas
But the goal here really isn’t to minimize the number of pieces used. It is to
minimize total cost of covering the space. This makes things much more complex
as it turns into some weird variant of a knapsack problem.

------
dzpower
On a similar theme, what began as a weekend hack to help my wife design a
patchwork quilt based on an image of Groucho Marx ended up as
[https://www.youpatch.com](https://www.youpatch.com).

In this case, the aggregation algorithm not only creates rectangular areas,
but also avoids the need for the quilter to have to sew Y-seams.

Here's my talk from RacketCon:
[https://www.youtube.com/watch?v=8psnTEjYIEA](https://www.youtube.com/watch?v=8psnTEjYIEA)

------
minikomi
I think this is my favorite pixel art rendition of that painting:

[http://tokyopixel.jp/?pid=107779066](http://tokyopixel.jp/?pid=107779066)

~~~
FraKtus
Yes this is nicer!

------
anc84
> This is done by finding the nearest neighbours in the RGB space.

Noooooo. RGB is not useful for anything but computer displays. Always use a
suitable color space if you want to _calculate_ with color values. Eg a CieLAB
one or similar.

~~~
codingdave
But RGB is simple code. I have run a site for years that converts photos into
craft designs, and calculates with RGB. It might not be the best solution, and
there are concerns with the color matching....but it is good enough to have
now produced over 580K designs, gotten positive feedback, and has resulted in
small side income for years. (And I recently sold the site.)

Sometimes "good enough" works.

~~~
kurthr
XYZ (or Yuv) is also simple, since it is a single 3x3 matrix conversion away
from RGB and it is relevant to huuman perception rather than display
capability. In some cases people may not notice, but it others RGB-NN is
clearly not the best... so why not try a bit harder, when it's a few lines of
code and opcodes.

------
Theodores
Funny but true, the Daily Mail beat you to it:

[http://www.dailymail.co.uk/femail/article-2533341/Italian-
ar...](http://www.dailymail.co.uk/femail/article-2533341/Italian-artist-Marco-
Sodano-pixelates-famous-paintings-using-Lego.html)

There are a few other pictures and how well the medium of Lego works for
pixelated art.

There are a few people on this thread posting 'things made with Lego' which is
a different thing to using Lego for pixelated art.

I think that you could build a small business out of making pixelated Lego for
people wanting to buy their new-borns some Lego. Imagine if in the bedroom the
Lego starts as a bright picture on the wall, out of reach. Then when they can
reach it then see what happens. If they have no Lego then do they work out
that you can make things with it? Or do we need marketing and instructions
with box artwork?

Also interesting would be a Lego sorting machine that you tipped random bricks
into for it to then print out as pixelated art. It would scan the bricks and
then show you exactly what images you could make from the bricks and also
dither a given image to the palette and availability provided by the bricks
dropped into the sorter.

~~~
royalityfun
Funny², because that was my first inspiration, but as of my understanding he
is not using "real" LEGO colours.

~~~
Theodores
I think you and I would have built some amazing Lego together had time and
geography brought us together in childhood times. There are rules of
aesthetics with Lego that a lot of people/kids just did not get. If building a
house then the colours would have to be right, or best given available bricks.
Some kids just put stuff together with any colours. Not good design. I can't
remember guidance from parents on brick colour etiquette and style, that was
something we worked out to do, or not, as the case may be.

------
cousin_it
Nice programming exercise, but I just want to say that Lego can be more than
glorified pixels. If you take advantage of all it offers, it becomes a
creative medium of its own:
[https://i.pinimg.com/564x/04/74/44/0474444cf5278174b50a135f6...](https://i.pinimg.com/564x/04/74/44/0474444cf5278174b50a135f67628435.jpg)

~~~
vanderZwan
Technically, that's comparing a painting to a sculpture. Although Lego is
obviously a "sculpture first" kind of medium.

------
jacquesm
Interesting. Lego mosaic makers are one of the more frequent customers that I
have for the output of the sorter. They take many kilos of plates and tiles in
a single order.

~~~
vnchr
Very cool project btw, really liked your write ups. Here’s an article for
those unfamiliar: [https://spectrum.ieee.org/geek-life/hands-on/how-i-built-
an-...](https://spectrum.ieee.org/geek-life/hands-on/how-i-built-an-ai-to-
sort-2-tons-of-lego-pieces)

Made any updates to your neural net implementation? I’m working through some
deep learning intro courses right now, and I can better appreciate your
approach.

~~~
jacquesm
Way too many VC's doing just one more deal before the end of the year so we're
swamped with other work. But that translates into a slump in Jan / Feb so
probably I'll have some more free time then to work on it. What also doesn't
help is that I moved it out of the house because it became faster and faster
and as a result louder as well. About 4000 parts / hour now :)

~~~
pbhjpbhj
Are there any other commercial lego sorters?

~~~
jacquesm
No.

------
beaconstudios
I wonder what it would look like scaled up to a higher resolution with a
dithering algorithm applied. With the extremely limited palette of lego bricks
you'd have to get pretty creative with the dithering to get an accurate
representation, it seems like a fun problem.

~~~
dsr_
Or you can take less literal approaches.

Here's a portrait of R2D2:
[https://www.flickr.com/photos/152507766@N07/32877646570/](https://www.flickr.com/photos/152507766@N07/32877646570/)

and here's the Millenium Falcon:
[https://www.flickr.com/photos/legocityson/37717492631/in/dat...](https://www.flickr.com/photos/legocityson/37717492631/in/dateposted/)

and Groucho Marx:
[https://www.flickr.com/photos/125619484@N02/29571498821](https://www.flickr.com/photos/125619484@N02/29571498821)

and a self-portrait (not me):
[https://www.flickr.com/photos/142720019@N08/33587002231/in/d...](https://www.flickr.com/photos/142720019@N08/33587002231/in/dateposted/)

~~~
pbhjpbhj
My friend does lego brick art works,
[https://www.pinterest.co.uk/oxfordbrickart/lego-
mosaics/](https://www.pinterest.co.uk/oxfordbrickart/lego-mosaics/), I prefer
his R2' but over all the greyscale ones seem better, particularly Holly
Golightly[1] and the Cyberman (separate pictures!).

[1]
[https://www.youtube.com/watch?v=k9ENEj33t4M](https://www.youtube.com/watch?v=k9ENEj33t4M)
construction video

------
plumbumsel
Cool approach to quantize and pixelated an image to make it look like it is
made out of LEGO. The number of bricks used in reduced by applying the notion
of graph connectivity. You even get an order list for Bricklink to build the
image with LEGO on your own.

------
zeristor
I believe the code is on github if you want to star it:

[https://github.com/lucaswo/legofy](https://github.com/lucaswo/legofy)

------
kadrian
Great project!

This has been done for 3D models as well.
[https://brickify.it/](https://brickify.it/)

The idea was to build most of the model from Lego and 3D-print only the
complicated / detailed parts.

------
royalityfun
For those interested: This is what my wall looks like.
[https://imgur.com/a/anSU4](https://imgur.com/a/anSU4)

------
chisleu
I feel like the resolution was more of a problem than the color limitations.

------
ImJasonH
I made a simple browser-based tool like this for Perler beads and crosstitch
thread colors:
[http://www.imjasonh.com/projects/crafty](http://www.imjasonh.com/projects/crafty)

------
nickcw
If you squint at the final result it is really quite good! A fun article :-)

------
vittore
Reminded me of a present my wife got me few ears ago - she resized the image
of Dance by Matisse into something close to 80 x 60 pixels, cut off color
squares and created pixelated picture ~ 4 on 3 feets.

~~~
nodeflixnchill
photos?

------
kevin_thibedeau
This could use a POV-Ray render.

------
oever
I thought this story would be about mobile phones.

~~~
colejohnson66
How?

~~~
oever
If you talk on the mobile phone constantly, it looks like you have a brick
earring.

~~~
qbrass
More so in the 80's.

