Pixelation

A pixelated picture of a man

Digital pictures consists of a bunch of dots called pixels. In a color photograph each pixel describes how much red, green and blue should be in the dot. In a black and white photograph, the amounts of red, green and blue in the pixel are equal; thus, the pixel tells how bright the dot should be.

In the above picture, the mean brightness of a 7 X 7 group of pixels (49 pixels) was calculated and the brightness of all 49 pixels in the group was set to the mean. That gets rid of almost 98% of the information in the picture. Remarkably, you can still easily say that the picture is of an old man (and if you know my favorite old man, you can easily guess the name of the guy in the picture).

You can get a better view of the picture with two simple tricks (you can use both simultaneously for even better results). First, squint -- the more of your pupil that you can block with your eye lids, the clearer the picture will be. To make your pupil size even smaller, use a pin to make a pin hole in a piece of paper and then look at the picture through the pin hole. Try it -- it makes a big difference.

The second method is to simply get farther away from the picture. The farther away (within reason) you get, the clearer the picture will become. Try it. Then try it with while squinting (or with the pin hole).

What Is Going On?

Text books often describe retinal ganglion cells as detectors of lines or edges. While they do that, that is but a special case of what they do. They really are spatial frequency detectors. If you need to brush up on spatial frequency in vision, you can do so here. The most important things to remember about spatial frequency in vision are:

Pixelating the picture replaces high spatial frequencies (the lines and edges) with lower spatial frequencies (the uniformly colored squares). (It also introduces high spatial frequencies at the edges of the uniformly colored squares, but these are not important to the visual effect described here -- they are just an artifact / noise of the pixelation process.) Getting rid of the high spatial frequency information makes object recognition more difficult because form perception (one of the steps in object recognition) depends on the lines / edges which go away when the high spatial frequency information goes away.

The two techniques for making the pixelated picture more clear (squinting / pin hole and increasing distance) rely on the same principle -- converting the low spatial frequency information into higher spatial frequency information. This process is most easily shown with the increasing distance method, but the same result holds true when the size of the pupil is reduced by squinting.

Recall that the spatial frequency is the number of light followed by dark bars (the sinusoidal grating) that subtend (cover) 1° of visual angle on the retina (if you need a refresher, go back to the spatial frequency page I talked about above). The visual angle depends on the pictures's size and the viewing distance. As the viewing distance increases, the visual angle decreases. What does this do to the spatial frequencies? At a greater viewing distance, the sinusoidal grating covers less area on the retina. Conversely, you could pack more light followed by dark barks in the same area of the retina. That is, increasing distance increases the spatial frequencies. Increasing the spatial frequencies partially restores the lines and edges in the picture which in turns makes form perception better which in turn makes object recognition better.

Squinting and/or looking through the pin hole reduces the size of your pupil. The larger the pupil is, the more spherical and chromatic aberration there will be in the retinal image. Spherical aberration simply means that the image is out of focus on the retina -- what should be a single point of light on the retina expands into a tiny circle of light. This is more true for light entering near the edge of a lens than light entering at the center of the lens. Chromatic aberration is the same general idea, but instead of depending on where the light enters the lens, it depends on the wavelength of the light -- some wavelengths are displaced more than others. Both types of aberrations result in blurring which is associated with lower spatial frequencies. Thus, when we decrease the size of your pupil, we get rid of some of the blurring due to the spherical and chromatic aberrations.

Make Your Own Pixelated Pictures

You can create your own pixelated picture below. Click on the "Choose File" button to select an existing photograph on your computer and then click on the "Load Image" button. If your photograph is too large to fit on the screen, you can scale down the contents of the web browser with Ctrl - (control minus) in most browsers; Ctrl + will enlarge the contents of the browser. Ctrl 0 will return you to 100%.

Click on the Pixelate button to see the pixelated image. You can drag the "Chunk size" slider to the left (less pixelation) or to the right (more pixelation). Doing so with large pictures and/or slow computers can take a while.

Note: The loaded images do not leave your computer -- they are not uploaded to a server. Any image that is displayed is already on your computer and did not originate from the server that this page resides on. If this page is showing something inappropriate, it is because you put it there.



Chunk size: 10


Right click and select "Save as" (or something similar) to save the pixelated picture.