Sunday, 8 February 2009

Second Draft

Progress has not been as fast as it ought to have been. Nevertheless, the second draft is as shown below.

CHUNK 22

Introduction

The previous chapter, Chapter 21, described the concept of a coordinating system and the use of pixels for the production of digital images. In this chapter we explain firstly, how the pixel-based approach to digital imaging is used to produce the so-called Raster graphics, and how Raster graphics differ from the other type of digital imagery known as Vector graphics. Secondly, the chapter explains how the techniques of computer imaging are further extended to achieve that more exotic type of computer graphic, - animation.

Raster Graphics

In Raster graphics, an image may be conceptualised as a grid of pixels. which coalesce together to form a smooth, continuous image.

Imagine each pixel as a single light bulb which is capable of acquiring individually, a wide range of different colours by virtue of being controlled by some clever software or some clever programmable graphics card, to which all the bulbs in the matrix are connected. If this grid of bulbs were set up to display, say, concentric red, white and blue circles on a white background, then close up, an observer may only notice different coloured light bulbs without discerning any pattern within them such as concentric circles. However, if the observer were to stand a hundred metres away, to his naked eye, the bulbs will have coalesced into a smooth display of different coloured circles on a white background and he will scarcely be aware that the image that he is seeing consists in fact of a grid of individual light bulbs. A Raster image formed using a matrix of pixels works in much the same way to display an image on the computer screen (or monitor).

The term "Raster" is by no means an innovation of computer graphics. It has in the past been used widely, in the context of the television imaging technique known as "raster scanning" which forms the basis of television pictures. (for the benefit of those interested in the etymology of the word, the term "Raster" is said to have been derived from a Latin root meaning "Rake").
Raster graphics are typically used for photographic images, or images of drawings and paintings in which there is a large variation of colour and contrast. Since, as explained above, the creation of Raster graphics involves the breaking down of an image into large numbers of minute pixels, it follows that a Raster graphic file is required to hold a large amount of data, such as colour, tone and position, for each individual pixel within the image. Raster graphic files therefore tend to be very large in size and consequently, data compression has become an important factor in the file formats that are prescribed for Raster graphics such as JEPG, PNG, BMP, TIFF and GIFF.

Quality of a Raster Image - "dots per inch" and "lines per inch"

Whilst the pixel-grid described above forms the basis of a Raster graphic, its quality is determined chiefly by two measures of pixel density. These are the "Dots per Inch" (dpi) and "Lines per Inch" (lpi).

dpi

The dpi measure refers to the number of pixels (a dot being synonymous with a pixel in this context) contained in each inch of the computer screen that displays the image (usually the computer monitor). It should be appreciated that in modern computers, the display screen is not pre-designed with a fixed number of pixels or dots per inch. The dpi value can be changed dynamically using the computer's software. Some Windows XP laptops, for example, provide an option of using either 96 dpi or 120 dpi. As may be expected, the higher the dpi value, the higher the resolution of the image and correspondingly greater its quality.

lpi

The lpi measure pertains to the quality of the printed image of a Raster graphic rather than its screen display. As with dpi, the higher the lpi value (or lpi "frequency" as it is often referred to) the better the quality of the printed image. There is however, a relationship between dpi and lpi that needs to be taken into account for high quality printing of Raster graphics. The formal mathematical expression for this relationship need not concern us here but as a general rule, for best results, the dpi value of the on-screen image should be set to be twice that of the printer's lpi frequency. Thus if the printer is operating at 200 lpi, the dpi value should be set at 400 dpi.

Raster Graphic File Formats

There is a large variety of file formats used for the storage of bit data pertaining to a Raster graphic. The more commonly used file formats include, JPEG, PNG, BMP, TIFF and GIFF. All of these formats have their own special features that make each of them more suitable for some functions than others. The TIFF format, for example, is more suited for printing of Raster graphics, while JEPG is considered more appropriate for Web operations involving “continuous tone” Raster graphics. Being Raster graphics file formats, all of these are concerned with the handling of "bitmap" data (bitmap being an alternative term for a pixel-grid). However, they vary in the their file structures and the techniques that they use for organising pixel data within their file structure. The TIFF format, for example, uses tags to locate image data, where as BMP employs indexing. All use varying levels of data compression to achieve file size reduction. These formats are briefly described below.

JEPG

JPEG is an acronym for Joint Photographic Experts Group, a committee that produced the standard in 1992. Given its ancestry with the Joint Photographic Experts Group, it is not surprising that the JPEG format is widely used for photographic images. Raster graphic files created using the JPEG standard typically have the file extension ".jpg", although ".jepg" is also encountered. The main differentiator of the JEPG format, from the others mentioned above, lies in the technique that it uses to achieve data compression. JPEG format holds the bit information pertaining to an image in a highly compressed mode making the image file very compact and thereby improving immensely its file transfer speed. The latter is particularly significant for downloading and uploading image data to the Internet, where the bandwidth, particularly for home computers, tends to be limited (despite the advent of Broadband). The drawback of JPEG format’s high compression is that it is prone to loosing data in decompression, which in turn leads to the loss of some quality in the image that is subsequently displayed. (In computer graphics jargon, JEPG data compression is said to be "lossy"). Because of its tendency to loose bit data through compression, JEPG is not considered suitable for drawings such as maps where colours are sharply contrasted.

BMP

The BMP format (short for Bitmap) originated with Microsoft Windows but is also used by many image processing applications that are not native to the Windows operating system. The distinguishing characteristic of the BMP format has been its use of indexing for recording the colour value of the pixels, rather than recording these values individually for each pixel. The drawback of the format however, has been its relatively inefficient compression technique.

Examples of Raster images


Vector Graphics

Whereas in Raster graphics an image is implemented as a matrix of pixels, in Vector graphics, the image is described by a set of mathematical expressions that plot the points (or nodes), lines and curves that form the shape of the image, using Cartesian co-ordinates. The shape of the image thus produced, is then filled (rendered) with the required pixel detail at run time to produce the completed image.

To illustrate the difference between Raster and a Vector graphics, consider the Raster image referred to above. This image consists of three concentric red, white and blue circles on a white rectangular background. When rendering this image as a Raster graphic, the computer file that describes this image is required essentially to hold pixel data for every individual pixel that forms the pixel-grid (bitmap) for the image. This approach contrasts with that used for Vector graphics. If the same image were to be rendered as a Vector graphic, then the computer file for the image would essentially contain information about the nodes that form the four corners of the rectangle, the node that forms the centre of the concentric circles, together with the mathematical equations that plot the four lines of the rectangle, and the three concentric circles.

The mathematical equations would be of the form:

Y = mX + c for the four lines connecting the nodes of the rectangle
where m is slope of the line and c the offset (where the line meets the X-axis)

(X² + Y² ) = r² for the three concentric circles
where r is the radius of the circle

Additionally, of course the graphic image file would contain information about the colour attributes of the circles.

No comments:

Post a Comment