by VikingCoder · 3y ago · 0 comments
However... I was wishing the recreation had been done in software rather than in Photoshop.
I was hoping that some clever image processing would result in a Github Repository of a program that could take any photograph of a pixel image, and reproduce the original pixels. Handling all of the distortions along the way...
HN is wild.
If there were a tool that would help me do this, there are situations where I would use it.
I actually wrote a tool that took a PNG and helped me break out the original sprites, backgrounds, and fonts from an old video game. But I recognize that doing this from a photograph is a couple orders of magnitude more difficult.
If anyone is looking for a technical challenge, and has the relevant skills, here I am highlighting how amazing I think it would be.
..instead, I will spend a month and a half writing a piece of software to reproduce the pixel art for me.
:^)
Commentary by those who don't care enough to invest a day doing it, that also haven't done it, and that are being critical of the work seems pathetic and sad.
The work itself is inspiring and joyful.
I hope I'm inspiring someone else to put in a parallel effort, with a different form of artistry - writing image processing rather than staring at Photoshop.
If the artist took my comment as critical, I apologize - not my intent at all.
Then run through each pixel again, and set it to the closest matching value from your palette. Done!
...but on the other hand, with a high enough quality photograph, and a low enough resolution original image... it sure seems possible.
The first pass might be off - I can imagine adjusting the grid size to skip the scan lines for more accuracy. But the final result will be very close with 5% of the work involved. The guy has spent a day and a half for a task that should take less than an hour at most.
Even non-fisheye lenses have some distortion, but look at how wacky the grid can appear here:
https://docs.nvidia.com/vpi/image-003.jpg
And it gets worse if you only see the grid, and don't know how it was cropped out of the photo it was taken from (if it was off-center).
But yeah, I think we're all on the same page that some entrepreneurial image processing expert could make fairly quick work of the problem.
1. Color correct for the CMYK printing process
2. Load image as a pixel matrix
3. Unwrap pixel matrix into a pixel vector
4. Convert the pixel vector to HSV representation
5. Group each pixel into a palette slot by plugging the H/S dimensions into K-means with 32 as the target (ignoring L for clustering to account for scanlines/flicker)
6. For each palette slot, calculate the "true" HSV value by taking the group's median H/S values and the mean V value
7. Convert HSV representation to 12-bit RGB colorspace
After running a Fourier transform you only need to paint over the obvious bright spots to remove these regular artefacts (see the linked article for a demonstration).