Hacker News new | past | comments | ask | show | jobs | submit login
Interesting concept of generating every image possible (webdevrefinery.com)
7 points by raydar on March 18, 2012 | hide | past | favorite | 7 comments



If one could write a fit function that returns a value correlated to the meaning of such random image, some genetic algorithm could be used. Also, this would be a perfect project to finally nuke copyright on images. Could also work with random texts, code, etc. Even better, a random piece of code could be evaluated on a simple "does it compile" basis. Hmm, I better get to work.


Along the same lines, read Borges' "The Library of Babel", from 1941.

Quoting from the Wikipedia description: "Despite — indeed, because of — this glut of information, all books are totally useless to the reader, leaving the librarians in a state of suicidal despair."


A million monkeys indeed...


Obviously this guy and his readers know nothing about math. Th number of possible images (400 by 400 with 24-bit color) is in fact 16,777,216^(400*400), which is an outrageously huge number. You can reduce this slightly by accounting for symmetry.


I wonder if this would be explorable for some much tinier subset of the space of images. Like maybe 32 x 32 greyscale JPEG images with some limit on compressed size that keeps it to interesting images.

I'm specifically suggesting JPEG because it is a compression method based on human perception, so if we focus only on easily JPEG compressed images, we should eliminate a lot of the image that look like snow on a TV, and restrict more to images that look vaguely like something.

Unfortunately, I don't remember enough details of how JPEG compression works to make a reasonable guess how many possible JPEGs this is, and whether we are getting into numbers small enough to be feasible.


A very quick approximation seems to indicate it still isn't feasible. I saved 2 32x32 JPEGs using Gimp at quality 30. One is a cutout of a face from a photo, the other is random noise generated using the filter in Gimp. The resulting JPEG files were 427 bytes for the face, and 525 for completely random.

Now, I have no idea how much of that is the header. So, to help guess that, I saved a solid white 32px image with the same settings, and it was 164 bytes.

Worst case, generating every possible 427 byte file at one hundred per second, would take ~ 4.8×10^1008 × universe age (per http://www.wolframalpha.com/input/?i=2^%28427*8%29+%2F+100+p...)

Even if we figure all 164 bytes of the white file is header info, that leaves 263 bytes of image data in the face image, which would take ~ 5.4×10^613 × universe age. (Per http://www.wolframalpha.com/input/?i=2^%28263*8%29+%2F+100+p...)

If we got down to an 8 by 8 pixel black and white image, and generating 1 billion per second, it would still take 6 centuries. (per http://www.wolframalpha.com/input/?i=2^%288*8%29+%2F+1000000...)

So even a massively reduced version of the problem is still ridiculously impossible to explore.


Exactly, it would take you longer than the universe has been alive to look at that many images. Not worth trying.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: