Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Picture combinations too low ?

  1. Aug 25, 2010 #1
    I would like do estimate the total number of different pictures I can represent by choosing a specific resolution and color depth, the number I'm getting seems somewhat low, so I'm wondering what am I doing wrong ?

    Let the picture size be 45x45pixels with a color depth of 8 bits (2^8 = 256 different colors).
    So 45x45=2025 total pixels. Each pixel can have 1 out of 256 colors assigned with repetition (for example, I can have a white image) and the order is important (for images which at least 1 pixel have a different assigned color) but reflected images could be discarded. I'm including an example to give size perception.

    Therefore, the total number of combinations will be 2^8^2025 = 4.8521x104876

    I was expecting a much larger number, one current processors could not calculate directly, any thoughts ?

    Attached Files:

  2. jcsd
  3. Aug 25, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    The image you give is an *indexed* gif: there are only 256 total colors, but there are 2^24 colors to choose from. So there are (2^24 choose 256) ≈ 3 × 10^1342 different palates, and each palate has 256^2025 possibilities, for roughly (2^24 choose 256) × 256^2025 ≈ 1.9 × 10^6219 total pictures. (It's not exact because some pictures with different palates are the same, but the difference is small since most pictures will use all the colors.)

    Is that small? I don't know. For comparison, there are 10^20 to 10^30 specks of dust on the Earth and about 10^80 particles in the universe, so it's certainly large compared to anything physical. But there are 10^4279358 ways to play the "choose a million friends on Earth" game, so it's small compared to that.
    Last edited: Aug 25, 2010
  4. Aug 26, 2010 #3
    You are right, 256 colors were choosen from a larger palette, so this should be considered.

    I think I'm feeling it is a small number, because the subject in the attached example could be photographed under slightly different angles, magnifications and lighting conditions and that would create a very large combination, but probably small compared to the total pixel\pallete combinations you calculated.

    So, considering that at this resolution each pixel is insensitive to the camera movement, when this movement is smaller than, let's say 2mm in any one of the three directions, one could draw a sphere with the center on the subject focal plane and the radius towards the camera sensor. If the radius is known, it is possible to distribute a finite number of points on the imaginary sphere surface, where each point represents the sensor position. Given a maximum and minimum range for the sphere radius, one could calculate the total number of different pictures that could be taken. Now I have the sense that this number is really insignificant if compared with the total estimated combinations for this resolution.

    With this in mind, I'm starting to feel what would be the probability of generating one specific variation of the picture by rendering a random sequence of pixel colors.

    I'm satisfied, thanks for your time.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook