Page 198 - Computational Colour Science Using MATLAB
P. 198
IMPLEMENTATIONS AND EXAMPLES 185
de = cielabde(labt,labp);
dedc(i) = de;
end
for i=1:24
xyzt = r2xyz(reflck(i,:),400,700,’d65___64’);
xyzp = r2xyz(preflck(i,:),400,700,’d65___64’);
labt = xyz2lab(xyzt,’d65___64’);
labp = xyz2lab(xyzp,’d65___64’);
de = cielabde(labt,labp);
deck(i) = de;
end
10.5.5 Fourier operations on reflectance spectra
The Fourier properties of reflectance spectra may be computed using the
MATLAB function fft. For a more complete description of Fourier analysis of
discrete signals using MATLAB, the reader is directed towards the text by
Carlson (1998). The fft command decomposes a signal into its frequency and
phase components. Equation 10.25 shows a hypothetical reflectance function P
that is a function of wavelength l,
PðlÞ¼ b þ A cosð2pfl þ fÞ. ð10.25Þ
The signal P may be represented entirely by the value of its offset b, its amplitude
A, its frequency f and its phase f. The frequency may be represented in terms of
cycles per nanometer. So, for example, if b ¼ 0.5, A ¼ 0.5, f ¼ 0.005 cyc/nm and
f ¼ 0, then we would obtained the signal shown (between the wavelengths 360
and 780 nm) by Figure 10.10.
The spectrum shown in Figure 10.10 consists of a single spectral frequency of
0.005 cyc/nm or (0.005)*300 ¼ 1.5 cycles in the visible spectrum (400–700 nm).
Fourier analysis involves taking a signal (such as a reflectance curve) and
decomposing it into an amplitude spectrum and a phase spectrum. The
amplitude spectrum provides information about the spectral frequencies that
are present in the reflectance data and the phase spectrum provides information
about the phases of these components. If the data are band limited, then there
will be a limiting spectral frequency (known as the band limit) above which there
is no further energy. The amplitude and frequency information can be obtained
using the following two MATLAB commands,
four___amp = abs(fft(p));
four___phase = angle(fft(p));