5. Compression - How We Can Be Fooled

At the start of the 1950s, photography was still either in the hands of professionals, who made you pose as still as possible while they grovelled for several minutes under a dark sheet behind a mahogony and glass box, or for the amateur there was the box camera - literally a small box 10 to 15 cm on the side with film exposed on one wall of the box while the shutter was opened in a hole on the opposite wall. Primitive.

This was very much improved by the advent of the Kodak Brownie 127 in 1952. A more robust, easier to hold, and somewhat smaller black plastic camera with lens and viewfinder (not through the lens), with carrying strap and bag. Operation was still manual, but you were at least blocked from exposing the same piece of film twice. By now also colour film was available at reasonable prices.

By 1963 there was a further improvement with the Kodak Instamatic, about half the size of the 127, with two light settings and the possibility to attach, via a "hot shoe" connector, a separately powered flash gun. The film was loaded via a cartridge, which removed the complexity of threading film. This was the first "point and shoot" camera, making home photography very popular. By 1972 the Instamatic had evolved into a true pocket camera with the possibility to attach a flash cube, retaining the now smaller cartridge format.

After that not much happened in mass user photography until the invention of the first fully digital camera, the Fujifilm Fujix DS-1P in 1988, which was able to save 10 photographs. It did this to a 2 MB memory card, and the pictures were in their raw pixel by pixel format. The camera was never marketed, due to the storage problem, although the rest of the technology was ready for digital photography. It would take a further 7 years until Casio came out with the CV-10 (which also included an LCD preview screen) which would conquer that problem. Digital cameras have since come to dominate the personal camera market. Pocket digital cameras had their heyday until being overtaken by the capability of smartphones, from about 2012 onwards. Noteworthy among them was the Casio Exilim range of very rapid reaction cameras, such as the ZR-10, which also allowed high-speed video up to 480 fps. Single lens reflex cameras also now have digital variants, and the "GoPro" robust compact film camera has led the way in recording sport from the participant's viewpoint.

Before this period computers could import analogue camera photographs or other graphic material by scanning them line by line to make a digital picture. To do that in high definition requires a scan at typically a minimum of 150 lines per inch, and 150 pixels per line inch, with more often being desirable, so a typical 24 square inch picture required quite a large file to contain the digital information. For each pixel it was necessary to represent the red, green and blue colour components, with their amplitude. With one 8 bit byte of colour data per pixel, i.e. 256 colours or grey shades, such a picture would require 540 kB of data. With three bytes per colour, one for each primary colour - "millions of colours", it would be 1.62 MB per picture. This makes the 2MB memory card of the Fujix look decidedly weak. And while computers were not so constrained, storage of photos could quickly overwhelm their disk capacity at the time, typically 20 GB at maximum.

Fortunately various methods of compression had been invented as a workaround. One was to use only 256 colour shades, which still gave quite a good representation, and then to record adjacent pixels individually only if they were different to the previous and next pixel. Otherwise one recorded how many pixels there were in a row of that colour. Unless a picture was particularly fine-grained, this led to a significant storage reduction. An improvement to this procedure, the Graphics Interchange Format (GIF), introduced by the Compuserve internet service provider (the people who would give you a temporary IP address for access over the telephone lines) in 1987, was to insert a 4 kB "lookup table" at the start of the file. The first 256 bytes of the lookup table would be the individual palette of 256 colours, but after that the pattern of colour combinations that occurred in adjacent pixels would be added as they occurred in the picture encoding, so each pattern could thereafter be referred to by just a single byte. Once the lookup table space was used up, it was back to the previous method. This GIF compression made a significant impact on file size compared to the original uncompressed file, partly due to the colour palette reduction, and partly due to the encoding, and factors of 5 were not uncommon. The GIF standard also allowed multiple pictures to be stored in the same file, and a sequence number attached to each picture. This enabled GIF files to be used for short animations, showing the pictures in sequence. These GIF files are still used today, for instance to make short animations of objects on a smartphone. The advantage of GIF compression was that it was lossless for the detail of the picture, except for the loss of the colour range. In many cases this was enough, particularly for pictures of computer screens, which at the time were often restricted to showing only 256 colours anyway. It is also helped by the fact that the eye is less sensitive to slight differences in colour than it is to slight differences in brightness.

To do better would require a different approach. The Joint Photographic Experts Group (JPEG) established a new standard for encoding a picture in 1992. This discarded high frequency changes in colour or intensity in a controlled way which maintains the essence of pictorial material convincing for the human eye while saving considerable filespace (e.g. reduction factors of 10). First the RGB colour palette range is worked out and then converted to an equivalent luminance blue-difference red-difference colour palette. (This is why when adjusting your computer screen you are usually invited to set the white point as it sets the luminance level.) The resolution of the blue- and red-difference signal was then reduced by a factor of 2 to 3. This sets the colour palette that would be used for the full picture. Then the picture is split into 8x8 pixel blocks and for each block the luminance, blue-difference and red-difference signal frequency of variation across the block is calculated. The resolution in the frequency domain is then reduced, so the detail of low frequency variations in the picture is favoured over high frequency variations, which are even discarded at the greatest compression, which can be controlled. Then all the information is encoded by a compact algorithm and the whole stored in the file. This significant reduction in size has become the dominant means of image compression for the internet and for digital photography. It is good for any image, but can produce artefacts (shadowing) if used at high compression setting to compress drawings with a lot of high frequency changes in intensity e.g. line drawings.

By 1995 the Motion Picture Experts Group (MPEG) had built on the JPEG work to produce a compression standard for video, initially (MPEG-1) for low resolution video 352 x 288 x 25 frames per seconds (fps) in 1993, suitable for video on compact disks but by 1995 (MPEG-2) up to 1920 x 1080 x 25 fps which covered all the available television broadcasting, terrestrial or satellite, and was suitable for storage on DVDs. Each frame of the video is encoded by the JPEG technique, but only the differences from "key frames" (set depending on the degree of frame to frame difference) needs to be stored thereafter, thus greatly reducing the data stream. This opened up the market for TV programmes and films to be stored on DVDs, and also the possibility of recording TV programmes in this format on computers. A further refinement, MPEG-4, was introduced in 1998, which allowed more advanced compression techniques with higher computational requirements, and incorporated the ability to manage rights and provide copy protection. The MPEG algorithms are "asymmetric", because it takes more computing power to encode the video stream than to decode it.

Building on the concept of JPEG compression, in 1993 a standard for audio compression, MP3 (more correctly known as MPEG1 Audio Layer 3), was established largely based on work at the Fraunhofer Institute for Integrated Circuits in Erlangen. This recognised that lower frequency notes mask higher frequency ones (probably because we mentally fill in the harmonics based on our experience of normal sound), and allowed significant (typically 10 times) compression of CD quality digital audio. A three minute CD quality audio file, typically 30 MB in size, could be reduced to 3 MB. This made it much easier to transmit good quality audio material over the internet and to store more of it on devices at much higher density, subsequently sparking the societal revolution in music sharing, publishing, and personal use mentioned previously.

At the time these compression techniques were invented their impact on the growth of their respective media propagation was vital. Storage space and internet bandwidth were heavily constrained, and anything that could alleviate that was welcome. That we could be so easily fooled into thinking we were seeing or hearing an unadulterated original, was unexpected at the outset, but critical to our current lifestyle, where these compression techniques allow us to carry with us our personal collections of photos, videos and music stored on our phones, and to stream video from broadcasters and social media, still greatly enriching our life experiences today.

Chapter 4 Contents Chapter 6