**1. How digital images are formed – sampling**

When a continuous wave signal is collected from an analogue system (the microscope) and presented as a digital output, it must be sampled from a continuous stream of data to form a discretely-sampled data set. The photon flux from the microscope field of view is divided into a raster of geometrically-square Cartesian subunits called pixels (picture elements), and the light intensity that falls on each pixel is stored as a number. Each pixel is therefore a sampling point of the original signal.

For the digital image to have any meaning, it must record structure within this intensity coding and thus display contrast. This requires sufficient sampling of the microscopical image. In order to record the image adequately, we must know the resolving power of the microscope, and sample the image so that (a) no high-frequency fine detail is lost nor (b) is spurious information encoded into the digital image by the sampling process. Both these events will occur through undersampling, which leads to aliasing.

An aliased signal provides a poor representation of the analog signal. When aliasing happens, the original analogue signal cannot be correctly reconstructed by the digital dataset. Continuous signals of differing frequency become indistinguishable from one another (aliases of one another) when sampled. The following figure shows an adequately sampled signal (a) and a grossly-under sampled signal (b).

In the figure above a continuous analogue signal (a) is shown in blue. It is shown oversampled in (b), just sufficiently sampled in (c) – the essential shape of the curve is still recorded digitally – and undersampled in (d). In figure (d), which represents the digital image with the lowest number of samples, aliasing has produced a loss of high spatial frequency data (and some loss of contrast overall) while simultaneously introducing spurious lower frequency data that does not actually exist. This effect is manifested by the loss of peaks and troughs (e.g. the last peak of the analogue signal at position 46 is lost whilst the first trough at position 8 is also lost from coarse encoding.

Aliasing can be seen as MoirÃ© fringing in images with regular features. See the example here

For another explanation, see: http://ptolemy.eecs.berkeley.edu/eecs20/week13/moire.html

In both figures, the under-sampled signal appears to have a lower frequency than the actual signal â€” two wavelengths instead of ten in the sine wave figure. **Since under-sampling causes loss of true information and addition of false information into the digital image, why not routinely over-sample?**

Oversampling necessitates smaller pixels. If the pixels sampling the image are too small, the signal transferred will be dimmer, and the contrast of small features will be lost in the noise of the system. Also, over-sampling will cause increased bleaching and phototoxicity of the microscopical image. However, sampling by the extra pixels does not theoretically contribute to the spatial resolution, but may help improve the accuracy of feature measurements taken from a digital image.

There may be no choice but to undersample, especially in live-cell imaging where the prime consideration is to collect a meaningful signal regardless of ultimate resolution of detail (which may not be possible to see because of noise and/or aberrations inherent in the image). Undersampling at spatial frequencies below the Nyquist criterion – using large pixels (e.g by `binning´ the signal) will lose resolving power, but will give a brighter signal, will mean less exposure which in turn leads to less photobleaching and phototoxicity.

#### What, then, is the best rate to sample at?

Ideally, the overall magnification should be such that the smallest resolvable feature in the image is sampled by 4 – 5 pixels across its width. This applies equally in the lateral x, y and also the axial z direction. You therefore need to know the resolution of the microscope objective that you are using.

#### 2. Nyquist sampling criterion

Shannon´s sampling theorem states that in order to reconstruct the analogue signal adequately it must be sampled according to the Nyquist criterion. That is: the sampling interval (pixel size) required to faithfully reconstruct an analogue signal must be at least twice the maximum frequency measured. This is a minimum requirement, and is illustrated in the following figure:

The smallest frequency detected laterally in the x-,y-direction is given by the resolving power of the objective.

The smallest frequency detected axially in the z-direction is given by the depth of field of the objective.

Axial resolution in the z-direction is always worse (by about 2 – 3 times) than lateral x,y resolution.

According to Rayleigh´s criterion the smallest point resolved in the microscope image can just be distinguished from a separate point immediately adjacent to it when the maximum of the intensity distribution of one Airy pattern of the point spread function (PSF) just overlaps the first dark ring (the first minimum) of the other PSF.

Hence the PSF of the smallest resolvable feature must be sampled by a minimum of 4 – 5 pixels across its diameter.

The minimum distance (d) resolved by a given microscope objective in the lateral (x,y) planes is:

where 0,61 is a constant, t is the wavelength of the illuminating radiation, and NA is the numerical aperture of the objective.

There are many equations for the depth of field, which determines axial resolution, and from which the z-axis sampling is determined. The minimum distance (q) resolved by a given microscope objective in the **axial **(z) plane is:

Where h is the refractive index of the immersion medium between the objective and the sample, t is the wavelength of the illuminating radiation, and (NA)2 is the square of the numerical aperture of the objective.

Example figures – for a wavelength (t) of 488 nm

Ideally, as a **minimum requirement**, you should collect sections in the widefield microscope at sampling intervals equal to half the z resolution (depth of field) or in the confocal microscope: half optical slice as determined the pinhole diameter, otherwise, you end up losing resolution along the z-axis.

Where structures lie perfectly orthogonal to the x,y direction of the sampling pixel raster on the CCD faceplate, then Nyquist´s sampling criterion of a pixel size of half the minimum resolved distance holds good. However, biological structures are very rarely laid down geometrically in the image! To adequately sample features that oriented along the diagonal, the size of the sampling pixel must be 1/2.3x or 1/2.8x the minimum resolved distance given in the table above. See page 67 and Figure 4.10 in reference 1, for a further explanation.

#### 3. How to calculate the correct magnification

To ensure that the image is sampled corrected according to Nyquist´s criterion, it is important to calculate the correct objective and magnification changer (if needed) to use depending on which CCD camera is used to capture the image. Likewise, there is an optimum zoom size to use for the confocal.

1. Determine the lateral microscope resolution according to the formula q = 0.61 x lambda/ NA

2. Calculate the smallest detail resolved by the CCD camera. This is equal to p/Mag

Where p = pixel pitch of the CCD camera (e.g. 6,45mm) and Mag = overall magnification (Objective plus any additional magnification introduced by the

mag. changer).

3. Match the microscope resolution with a minimum of 2.3 pixels on the CCD

Mag (obj) x 0.61 x lambda /NA = 2.3x pixel size or Mag = 2.3x pixel size/(0.61x lambda/NA)

#### Example

Thus the 60x objective will undersample with a Nyquist criterion of 2.3 pixels per minimum resolved feature, whereas with a slightly-less rigorous Nyquist sampling, of 2x minimum, the magnification = 61x.

Thus in the first instance, the 60x objective will undersample, and in the second instance with 2x sampling as the Nyquist minimum, the 60x objective will sample adequately (just!).

For low magnification objectives (which have optical indices > 23) use the 1.6x magnification changer to increase the overall magnification so that the minimum distance resolved by the objective is sufficiently sampled by the size of the CCD detector pixel. The optical index is the ratio of (NA/Mag obj) x 1,000. The higher the optical index, the better the objective with more resolved detail transferred to the primary image plane and thence to the CCD faceplate or PMT.

Since the confocal microscope uses a point-detecting PMT not a CCD, and can the image can be continuously zoomed, it is possible to calculate the zoom factor at which the pixel in the confocal image is small enough to sample the specimen. Zoom factors for a standard 512 x 512 frame size are given. For larger pixels (e.g. 256 x 256) increase the frame size. For smaller pixels (e.g. 1024 x 1024) decrease the zoom size.

Jim Pawley advocates always deconvolving confocal data, as well as widefield data, and the arguments are very well presented in his chapter 4 in reference 1. As a general rule of thumb, deconvolve the confocal dataset if the pinhole is set above 2 Airy units. If you do deconvolve, then sample at 4x Nyquist as a minimum.

#### 4. Ideal pixel sampling sizes for widefield and confocal

#### References

1. Pawley, JB (2006) Points, Pixels and Gray Levels: Digitizing Image Data, chapter 4, pages 59-79 in: *Handbook of Biology Confocal Microscopy* 3rd edition. (ed.) JB Pawley. Springer, New York. ISBN = 0-387-25921-X

2. Heitzmann, R (2006) Band Limit and Appropriate Sampling in Microscopy, chapter 3, pages 29-36 in: Cell Biology.

See also: Heintzmann R, Sheppard CJ. (2007) The sampling limit in fluorescence microscopy. *Micron*. __38__(2):145-9.

3. Lanni, F & Keller, E (2005) Microscopy and Microscope Optical Systems, chapter 95, pages 711-765 in: *Imaging in Neuroscience and Development: A Laboratory Manual* (eds.) Yuste, R & Konnerth, A. Cold Spring Harbor Press.

#### On-line tutorials

1. http://micro.magnet.fsu.edu/primer/digitalimaging/digitalimagebasics.html

2. http://micro.magnet.fsu.edu/primer/java/digitalimaging/processing/samplefrequency/index.html