Friday, 21 September 2007

Every Possible Picture Available! (Theoretically)

The title of this post describes what "All Known Images" is about. Consider a catalogue of every single possible picture regardless of the reality of the actual picture. It would make the content of the likes of Flickr and Google Images insignificant.

How could this be achieved?

Well, it's theoretically possible, although admittedly far from being feasible.

In this digital camera age most people are familiar with the megapixel resolution of cameras and comfortable with such terms, so I'll just give a brief introduction to what is meant by resolution for anyone who is not familiar with the term.

A picture can be represented by a grid of coloured dots (pixels). The bigger the grid and the larger the number of colours available the better the quality of the picture. Computer monitors are commonly 1024x768 pixels. This means there are 1024 pixels across the width and 768 pixels for the height giving a total of 786432 pixels (in photographic terms 1 megapixel is 1048576 pixels).

The picture below shows a grid of 2x2 (the pixels are exploded to allow a better explanation) using only the colours red and blue. The top left image shows all pixels set as blue, the one just to its right shows the top left corner pixel as red and all the others as blue, and so on. With 2 colours on a 2x2 grid there are 16 possible pictures, although I use the term picture loosely. Non of the examples shown are likely to find their way into the finalists of a photography competition.

By extending the above to a grid larger than 2x2 (say 50x50) then we have the image size as that shown in the random picture generator. This still only uses two colours but, as can be seen from the previous post, there are a frighteningly large number of possible images of 50x50 in only two colours. Extending the concept further to a standard VGA image (640x480) in 256 colours (this is way short of photographic quality) and we start to reach extremely large numbers of possible images. I am still looking for a calculator that can perform the calculation to get an actual answer for this. The calculation is a function of both colours and pixel resolution. For N colours and a resolution of R pixels the number of possible pictures is NR. It should now be clear why this is not feasible, but just in case, consider : -

  • the length of time taken to create all these images.
  • the disk storage required to hold all the images
  • the checking of the images to determine which are valid images.
When I first thought of this concept some 25 years ago it was for creating character sets on an 8x8 grid using only black and white. Subsequent blogs will discuss my revisits to the problem over the subsequent years.

9 comments:

Anonymous said...

I tried writing a program to do this... My plan was to make a video of every possibility in a 1 bit 8x8 grid. Once I decided on a 30 fps video with each frame being a unique pattern, I realised I didn't have 19.5 trillion years to watch it, I gave up. :p

ZANGIN said...

So 2^64 possible combinations for a 1 bit 8X8 black and white image..

It boggles the mind.

So build a generator with a scroll bar:) something that scrolls from 0 to image #0 to image # 18446744073709551616.

This way we don't have to worry about FPS.. just scroll until you see something recognizable. haha. at least you can skip ahead.

This gives me an idea. I'm sure it would be somewhat easy to build some sort of "static filter" to remove a lot of the images that appear to be random/unrecognizable images. Most of what is generated would be unrecognizable to the human brain.

It would be kind of like reverse of an image recognizer. Start with a database of known images (as many as possible), and then do a "doesnt look like" search to get rid of all the garbage (if that makes any sense?). heh.


I don't think the issue is the # of images per second, etc. We have lots of computing power out there that can produce the images.. the key is developing something that can distinguish between an image that looks like TV static compared to something that is recognizable.

I'm all for pursuing this pixel dream!

ZANGIN said...

Think about the field of vision that a human has, and the depth of color we can see and process at the speed we do, and the 'memory' required to store the images we process, if it were all done by a computer. It's amazing that it all fits in our head.

I'm by no means an expert on the human brain. It's beyond mind boggling.

Eventually, somebody may invent some sort of biological processor that more like our brains, then the problem of computational power or storage won't be the limiting factor!

You could take very CPU ever built and it doesn't even come close to what the human brain can do.

Whoever invents a biological cpu will be infamous. It would probably be the beginning of the end, because that's when machines will take over the world!

zangin said...

Correction to last post .. "You could take very" should be "You could take every"

Anonymous said...

Damn, it's been 3 months already? Are you still playing around with this zangin?

bluHatter said...

I've been thinking about this myself for several years. Strange we had the same idea. I've been thinking of scaling down the grid to something very small (say maybe 16x16 @ 256 colors) and seeing if it would be feasible. The pictures wouldn't be photo quality, but some things would still be recognizable. Still a lot of possibilities.

To solve this problem we need a few supercomputers with these abilities:

-trillions of terabytes of storage space
-artificial intelligence good enough to recognize possible recognizable patterns, to sort noise from the rest
-a stable program for cycling through all possibilities

Maybe a mass-cpu sharing "supercomputer" would do the trick for processing (much like we saw with SETA), but we'd still need storage space... This requirement could be reduced if the AI in our program was good enough to only transmit and store the images that weren't just noise.

Julian said...

We were talking about this idea, I calculated the number of possible images, the number is 750692 digits long, so I can't post it here.

Anonymous said...

To think... we could generate images of every human face ever to exist, every alien, every surface of every planet, every cat hugging every dog, and every cat hugging every dog with every alien and human in the background. Crikey.

Anonymous said...

http://code.google.com/p/every-picture