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.