• No results found

2. GLOBAL OPTICAL TECHNIQUES

2.3 Image processing

Flow images are inherently qualitative - they are easy to assimilate visually by the human eye

and brain, but difficult to analyse quantitatively An image needs to be digitised if it is to be

analysed by a computer. This image digitisation is performed by a frame grabber. This consists 53

of a fast analogue to digital converter (ADC) and a bank of computer memory. The analogue video signal is digitised and then stored, before being transferred to a host computer for further processing. The UK/European video standard is PAL (625 interlaced lines, 25 frames

per second), which if digitised at 768 x 512 pixels (picture elements) and 8 bits per pixel,

requires a conversion sampling rate of around 12 MHz, and storage space of 384 kB per frame.

The image is now in the form of a numerical array within the computer memory. It can be manipulated in many ways to extract a variety of information. Processing operations fall in four basic groups: algebraic operations, geometric operations, filtering and transforming, and feature recognition [53].

Algebraic processing operations consider each pixel separately, with no interaction with its neighbours. Examples are look-up table (LUT) modifications for enhancing image contrast and brightness through the use of false colours and shades to represent particular image intensity values. Also, image arithmetic (such as addition and subtraction) is often used for averaging several frames of a changing image scene or for removing the effect of an unwanted background to emphasise the subject. Both of these techniques are applied here to flow images, and are described in Chapter 5.

Geometric processing operations are similar to algebraic processing methods in that pixels interact only with themselves, but now can change spatial position as a result of the operation. An example is image warping: this is where the image is interpolated onto a new pixel grid, so that distortions can be added or removed. This can be used to compensate for viewing through a refracting medium such as a curved surface, or to change the perspective from one viewing angle to another.

filtering and transforming techniques modify the image by replacing pixels with the result of an arithmetic operation on the surrounding pixels. Filtering operations arc used to remove noise from an image, or to emphasise detail, such as edges of objects. Filtering is performed by convoluting the image with a filter mask, for example, a low pass filter (for smoothing and noise reduction), can be implemented by convoluting the image with this simple mask;

1 I 1 1 I 1 1 I 1

and similarly a high pass (Laplacian) filter;

- 1 - 1 - 1

- I 8 - 1

- I - 1 - I

This type of filter is useful for edge and point detection, and enhancing image sharpness. More complex filters using adaptive masks are also available [54], The high pass filter is used to generate the contour images shown in Chapter 5.

Transforming operations are similar to filtering, but are generally more complex. They are used for more advanced image processing. An example is the Fourier transform, which converts the image into the spatial frequency domain. This is discussed further in the PIV analysis chapter.

The final group of operations is feature recognition. These operations use intensity

thresholding to produce groups of pixels with the same intensity, corresponding to objects in the original image. The connectivity of these groups of pixels is then examined to identify each discrete object. Various parameters can then be derived for each object, such as its position in the image, its size (area in pixels) and shape. Feature recognition is used in the particle tracking algorithm described in the PIV analysis chapter.

2.3.2 Implementation of image processing

The processing algorithms described above are all useful for flow diagnostics. Implementation of these algorithms can be performed in a number of ways.

Where processing time must be minimised, such as in real-time applications where all of the processing must be carried out within one frame time (40 ms for PAL), hardware based processing is often used. Here, customised circuit logic is designed for operations such as liltering, transforming and recognition. Clearly, this is inflexible, and requires a fixed design. The cost and time needed to implement a hardware solution can be high.

Where ultimate speed is not needed, a PC based solution is preferable. PC and related imaging hardware is low cost, and a wide variety is readily available. A bus mounted frame grabber expansion card digitises the video signal, transferring the data to the host processor memory space. The PC CPU can then process the image data as required.

When rapid implementation is needed, a command interpreter/macro based software tool can be used. Here, a sequence of standard image processing functions can be combined to perform the required task.

For these flow studies, a PC based solution was used, and custom-written software was written using the ‘C ’ programming language. This offered good structuring together with highly efficient (and therefore fast) code. Software algorithms were written with the intention of re-usability in mind, so algorithms were coded to be of general application. Descriptions of processing software for specific flow applications follow in the next chapters.