Page 189 - Computational Colour Science Using MATLAB
P. 189
176 MULTISPECTRAL IMAGING
xlabel(’wavelength’)
title(’(a)’)
subplot(2,2,2)
plot(w,mspec,’k-’)
xlabel(’wavelength’)
title(’(b)’)
subplot(2,2,3)
plot(w,v,’k-’)
xlabel(’wavelength’)
title(’(c)’)
subplot(2,2,4)
plot(w,v1,’k-’)
xlabel(’wavelength’)
title(’(d)’)
The lower left (c) and lower right (d) panes of Figure 10.6 show the first three
basis functions computed from the raw set of reflectance spectra and from a
centred set of spectra (where the mean is first subtracted), respectively. Although
the two sets of basis functions look quite different if we correct for the arbitrary
sign of the functions it can be seen that there are only small differences between
the two sets of basis functions (Figure 10.7).
10.5.2 Representation of reflectance spectra in a linear model
The computation of the basis functions using svds allows us to write
P ¼ Ba, ð10.15Þ
where P is the w6n matrix of reflectance spectra, B is the w6m matrix of basis
functions, and a is the m6n matrix of coefficients, where n is the number of
samples, w is the number of wavelength intervals at which the samples are
represented and m is the number of basis functions in the linear model. The
coefficient matrix a thus allows each reflectance spectrum to be represented by
just m coefficients. The central goal of PCA is to reduce the dimensionality of a
data set whilst retaining as much as possible of the variation present in the data
set (Jolliffe, 1986). It is relatively straightforward to compute the coefficient
matrix a by rearranging Equation (10.16),
a ¼ B P, ð10.16Þ
þ
where B denotes the pseudoinverse of the matrix of basis functions B. We note,
+
however, that if the basis functions are orthonormal, then Equation (10.16) is
equivalent to Equation (10.17),