3c72 Image Processing, Practical Two - Image Warping

5%, To be set ~20/11/02, to be completed by 6/12/02.


1. Objective

The aim of this second practical is to provide a further opportunity for you to use some of the basic image processing operations discussed in the first few lectures, in particular, pixel-wise operations. As in the first practical, it requires you to acquire images on the Silicon Graphics workstations, to use some of the functions available in the IDL image processing and data visualisation environment to manipulate these, to output the results and to reflect and, where appropriate, comment on what you have done.

As in the first practical, you will need to acquire suitable images using the Silicon Graphics workstations equipped with an IndyCam and convert them to grey-level images suitable for loading into the IDL environment. As in the first practical, remember to use a format that will provide the resolution (number of pixels), accuracy (number of levels of quantisation) and colour representation required.

2. Procedure

Carry out each of the steps listed below and write a brief report containing:

Your demonstrator and assistant for this practical is Ben Dias. Please click here to read some instructions prepared for you regarding image capture and preparation, as well as a series of comments about miscellaneous technical issues of this practical and the closely related one designed for the masters students.

3. Exercises

3.1 Image Acquisition

As in the first practical, acquire and store suitable grey-level images of a hand (for example, your own) and a face (more amusing if it's someone else's). By "suitable", I mean under appropriate lighting and imaging conditions such that the hand and face fill a reasonably large proportion of the field of view, that detail within each image can be seen, such as facial features, and that the images are not too dark (ie, above the noise level) without being too bright (ie, reaching the maximum signal level of the camera). In view of the exercises to be carried out, you might grab several examples of each image so that you can choose the one best suited to each exercise. You may use the images acquired for the first practical if you think they are suitable.

If your images don't work well, try the jpeg example image of me (bernard0.jpg) and the image of Charlie (charliegrey.tif) in my public_html directory. The former is a colour image and will need converting to a grey-level image. Alternatively, try changing each colour channel separately or just have fun using the colour editor in xv.

3.2 Geometric Transformations

Select an area of detail on one of your hand and one of your face images and blow it up by a factor of two in each linear dimension. Do this using nearest-neighbour, bilinear and bicubic interpolation, using suitable functions from IDL (eg "congrid"). Describe what differences you would expect to see in the different methods of interpolation. Are such differences visible in your example? Comment on their presence or absence. What happens if you blow up the image by a further factor of two or more in each linear dimension?

3.3 Image Warping

Subject one of your face images to a 45 degree shear on the x-axis by defining a suitable linear (affine) transformation of the image co-ordinates. Comment on whether you think it is necessary to use interpolation in order to compute the destination image in this case. Discuss what would have to be done for a 30 degree shear. Investigate whether there are any IDL functions that you can use to help carry out such image shears.

3.4 Image Rotation by Shearing

Use a combination of several 45 degree shears to carry out a 90 degree rotation. Think carefully about how many shears are needed. Use xv or functions provided in IDL to check your results. Comment on whether you think this is a good way of carrying out a 90 degree rotation? Comment also on whether you think it is a good way of carrying out image rotations in general.

3.5 Manual Warping

Define a set of control points on one of your face images and use them to warp it in whatever way you please. There are IDL functions which can be used for this, but check how they work. In particular, do they only work when you have enough control points to make the transformation determined or overdetermined? Will they work or not if too few control points are used? Describe, as far as you can, what is happening during the transformation.

Reporting

As previously, it is recommended that College PCs be used for report preparation as software available on them for document preparation is usually more extensive and more appropriate for this kind of task (eg Word) than that on the workstations. It also frees the workstations for more serious use by others. If desired, image data, either acquired images or results, may be transferred to PCs by ftp and then included (in a suitable format; see above) in your report, using the facilities available, for example in Word. Whilst this can undoubtedly lead to satisfyingly pretty output, this is not the point of these exercises and it can be much more efficient (for you) to print images directly from the workstations and include them in the report as separate pages, for example in the results section.

In fact, in general beware of labouring long and hard to produce a pretty report. There is a rapidly diminishing rate of return for such efforts. Evidence that the exercise has been completed and content of the report is much more important than presentation.

Bernard Buxton
October 2001

Image capture and preparation