• No results found

Chapter 3 The Best Alignment Metric

3.2 Shape Difference Metric

3.2.4 BAM comparisons

In this section we discuss the performance of BAM, comparing it to other ap- proaches. We measure the speed of some shape distance measures. To do this, we measured the total time taken to compute the distances of 100 pairs, dividing that number by 100 to give a measure of the time to compute the BAM distance once. We ran this process 100 times to create a mean and standard deviation. We calculated that the average time to compute one BAM measurement is 35±1.6µs (microseconds). Below we compare BAM to two other methods (Symmetric Differ- ence and Fourier Descriptors) and discuss the use of Shape Features.

Symmetric Difference

A mathematical interpretation of the value of BAM is the integral of the symmet- ric difference of the two shapes minimised over rotation and translation. We can attempt to compute this value more literally by calculating the size of the sym- metric difference (using the XOR logical operation over matrices) between binary images. We calculate this difference between one target image and a range of rotated images and take the minimum value. The speed and accuracy of this calculation will obviously depend on your choices for the resolution of the binary images and the number of angle options calculated. At a resolution of 128×128 pixels and 10 rotation options, we calculated that the average time to compute one symmetric difference measurement is 53±9.2 ms (milliseconds). Even at this low resolution, computation time is already 1500 times slower than BAM. The result of the com-

putation cost difference is that for a dataset with 10,000 samples computing the pairwise distances with Symmetric Difference would take over a month, whereas with BAM this process would take under an hour. In our analysis of RPE cells we examine a dataset of nearly 38000 cell shapes so this cost is significant.

Comparative performance can be seen in figure 3.2. Subjectively, it seems that there is similar performance between BAM and Symmetric Difference, there is certainly no grounds to justify the extra computation cost.

Fourier Descriptors

A feature set that is commonly used for shape description is Fourier Descriptors. Fourier Descriptors can be generated from the cell outline by performing a Fourier transform, rotation invariance can then be gained by taking the absolute value of the Fourier transform (commonly known as the power spectrum). With the curve represented by a discrete sequence{xn}, we can make use of the fast Fourier

transform

Xk= NX−1

n=0

xne−2πikn/N, (3.6)

from which we can rapidly compute the power spectrum:

Pk =Xk·Xk∗. (3.7)

These features represent the levels of auto-correlation at different frequencies around the cell’s edge. Simply taking the Euclidean distance in this feature space gives us a shape similarity measure. Time experiments reported an average time to compute one FD distance measurement as 7.8±5.4 µs, making it approximately 4.5 times faster than BAM. Figure 3.2 shows the performance of this as a shape similarity measure. For the most part, Fourier Descriptors give perceptually very similar to the performance of BAM. However BAM can be seen (albeit subjectively) to outperform Fourier in rows 5, 8 and 10, at least. This emphasises the fact that aspects of shape information are lost when the phase information is removed, and the power spectrum alone is not enough to faithfully represent shape.

BAM has another advantage, in that it is defined directly on shape space. One goal for our framework is that it could be extended to allow for generation of synthetic contours from arbitrary points in our low-dimensional representation. BAM allows this, since any reversal of an embedding based on BAM maps back into shape space, whereas reversing an embedding based on Fourier Descriptors maps into the space

Best Alignment Metric Symmetric Difference Fourier Descriptors 1st 2nd 3rd 4th 5th 1st 2nd 3rd 4th 5th 1st 2nd 3rd 4th 1 2 3 4 5 6 7 8 9 10 5th

Figure 3.2: Comparative performance of shape distance measures. Each row above shows a randomly selected target RPE cell outline, followed by 5 outlines identified as closest to the target outline (excluding outlines of the same cell as the target) according to 3 different shape distance measures. The difference metrics are the Best Alignment Metric (as defined in section 3.2.2), the Symmetric Difference and Fourier Descriptors (as described in Section 3.2.4).

of power spectra and since the power spectra are missing the phase information, any map back into shape space is not unique.

Earth Mover’s Distance

The Earth Mover’s Distance [Rubner et al., 1998] is an approach used by many in shape analysis. This distance measure computes the difference between two images by calculating the amount of work required to change one image into the other. The analogy goes that one image can be seen as piles of dirt (where the height of a pile corresponds to the pixel intensity), the other as holes in the ground (depth corresponding to pixel intensity). Then if the dirt were laid on top of the holes and the images were identical the holes would fill up perfectly, otherwise, the work required to move the dirt into the holes measures the difference. This method is seen as intuitive and is popular in shape analysis. However, it is not immediately rotation invariant, this invariance must be introduced.

One method for introducing rotation invariance is to convert the images first into a rotation invariant representation, e.g. Fourier Descriptors or Shape Context [Be- longie et al., 2002; Grauman and Darrell, 2004]. Here we run into the same diffi- culties that we discussed for Fourier Descriptors above, in that to generate these representations we must lose some information.

Another way to introduce invariance would be to pre-align the cell images. We propose that the best method for pre-aligning the images would be to actually use BAM (a discussion of alignment of contours is given in section 3.2.1).

Shape Features

A common approach to biological analysis is to focus investigation on features that are known to be particularly important in a given situation. In shape analysis it is no different and with sufficient knowledge and understanding of the system it would be possible to design an incredibly efficient and effective way of differentiating shapes for any given task. However, as we discussed in section 1.4 we wish to develop a framework that can be applied to a situation without anya priori information.

Related documents