1 Introduction

Experimentalists have extensively used thermochromic liquid crystals (TLCs) to provide high-spatial resolution temperature maps for a wide range of flow situations. When illuminated and viewed from specific angles, their spectral reflectivity shifts with temperature. A popular application is to image a TLC-painted surface with a digital camera. The observed color of the crystals over their active range is used to map out large areas with high-resolution temperature maps. However, one of the crucial challenges of this approach is accurately calibrating the TLC response. This is because the observed color of a TLC-painted surface depends not only on temperature but on the angles of illumination and viewing. Figure 1 shows the variation of the wavelength of maximum spectral reflectivity as a function of temperature for a typical TLC-painted sample illuminated by white light. Below the defined activation temperature of the crystals, defined as the smetic phase, the molecules of the material form layers with their long axes (directors) aligned in a certain direction. In this condition, the liquid crystals have a transparent appearance (i.e. optically inactive). As the temperature is increased, the alignment of these layers changes continuously through the material thickness, forming a chiral (twisted) structure. This transition is identified as S-Ch in Fig. 1. This molecular structure has birefringent nature that has high spectral reflectance over a narrow band of wavelengths. Roberts and East (1996) argue that the center of this band can be simply modeled using Bragg diffraction analysis. With increasing temperature, the orientation of this helical structure can change, modifying the spectral reflectance of the liquid crystal sample. With additional heating, the liquid crystal typically undergoes a further phase transition to an isotropic liquid, which is optically inactive. This transition is identified as Ch-I in Fig. 1. If the color change temperature bandwidth is very small (<1°C), the TLCs are called narrow-band. Wide-band liquid crystals typically have an approximate bandwidth of 15°C. This figure demonstrates that the observed color changes from transparent outside the active range to red, green, blue and back to transparent. Baughn (1995) reports that TLCs are applied under or over a thin layer of optically black paint, depending on the direction of viewing. This gives them an easily identified “black” response when inactive. Fergason (1968) developed an analytical expression using Bragg diffraction analysis and Snell’s Law that described the wavelength of maximum spectral reflectivity as a function of these angles. This relationship applies to any TLC, irrespective of its bandwidth.

$$ \lambda = \lambda_{n} \left[\cos\frac{1}{2}\left\{\sin^{-1} \left(\frac{n_{\rm air}}{\overline{n}_{\rm TLC}}\sin \phi_{{\rm TLC},i} \right) - \sin^{-1} \left(\frac{n_{\rm air}}{\overline{n}_{\rm TLC}} \sin \phi_{{\rm TLC},s} \right)\right\}\right] $$
(1)

n air is the index of refraction for air and \(\overline{n}_{\rm TLC}\) is the average index of refraction for TLCs \((\overline{n}_{\rm TLC} \approx 1.5).\) λ is the wavelength of maximum scattering at an angle of incidence of ϕTLC,i and a viewing angle of ϕTLC,s . Figure 2 shows how these angles are defined. λ n is the wavelength of maximum scattering for normal incidence and observation. Figure 3 is a polar plot illustrating the variation of the maximum spectral reflectance wavelength with n air = 1 and \(\overline{n}_{\rm TLC} = 1.5.\) Two cases are shown in this figure, an on-axis arrangement where a white light source and angle of observation are moved together over a TLC-coated isothermal surface (ϕTLC,i = − ϕTLC,s ) and the situation where the white light source is maintained normal to the surface (ϕTLC,i = 0°) and ϕTLC,s is varied. Note that the only condition where the effects of lighting and viewing angles are eliminated is the situation where the camera and illumination source are positioned symmetrically, i.e. ϕTLC,i =  ϕTLC,s . Thus, as the difference between the two angles (|ϕTLC,i − ϕTLC,s |) increases, Eq. 1 and Fig. 2 show that the predicted wavelength decreases monotonically. This is why the predicted reduction in the observed wavelength is larger when ϕTLC,i =  −ϕTLC,s compared to the ϕTLC,i = 0° case. It also is important to note that as ϕTLC,i or ϕTLC,s → 90°, the viewing or illumination view factor approaches zero and no color would be observed. These effects are characteristic of chiral nematic crystals of which TLCs are a subset (Collings and Hird 1997). Therefore, the effects of lighting and viewing angles affect both narrow and wide band crystals. However, these effects can be readily dismissed with narrow-band TLCs as surface temperature is indicated by a color change, as demonstrated by Baughn (1995), Camci et al. (1993) and Drost and Bölcs (1999). This is because the data processing techniques are not based on the measurement of the actual TLC color. Nevertheless, considerable effort must be dedicated to accounting for these issues for wide-band TLCs, where the color of the crystals is used as a temperature indicator. Kodzwa et al. (2007) have reported the application of high-accuracy (±0.1°C) wide-band liquid-crystal thermography using miniature periscopes for a highly curved surface. This paper presents theoretical analyses that were used to support this effort. These results lend insight into how experimenters can achieve the optimal performance with respect to time and accuracy. Furthermore, these relationships may be used to quantify the effects of lighting and viewing angles on temperature measurement. Many of the numerical results presented in this paper are specific to the type TLC paint used in the present research effort. Nevertheless, we believe that these techniques may be be readily applied to different wide-band TLCs that exhibit the similar angular and temperature dependencies because the analytical approach we have developed makes no assumption of the type of TLCs.

Fig. 1
figure 1

Variation of wavelength of maximum reflectance as a function of temperature for a typical TLC mixture (from Parsley 1991a)

Fig. 2
figure 2

Definition of angles ϕTLC,i and ϕTLC,s with respect to a TLC-coated surface

Fig. 3
figure 3

Lighting and viewing angle effects on wavelength of maximum reflectance (derived from Fergason 1968)

2 Technique development

If we image a sample painted with black paint and TLCs illuminated with white light with a three-component CCD camera, the reflected spectrum is decomposed into red, green and blue components by a light-splitting prism. Each component is imaged by a two-dimensional array of pixels that outputs a set of voltages. This is sent to a frame grabber board (digitizer) that converts the three voltage arrays into arrays of integers. These values vary from 0 to 255 for 8-bit digitization. Let MV represent the measured analog voltage for a given channel and \({{\mathcal{Z}}}\) be the integer output of the digitizer. If we assume a linear digitizer response, the following relationship is obtained:

$$ {{\mathcal{Z}}} = 0,\quad {\rm MV}\leq V_{\rm REF,BL} $$
(2)
$${{\mathcal{Z}}} = ({\rm MV} - V_{\rm REF,BL}) \left[\frac{255}{V_{\rm REF,WH} - V_{\rm REF,BL}}\right],\quad V_{\rm REF,BL}\leq {\rm MV}\leq V_{\rm REF,WH} $$
(3)
$${{\mathcal{Z}}} = 255,\quad {\rm MV} \geq V_{\rm REF,WH}. $$
(4)

Here V REF,BL and V REF,WH are termed the black and white reference voltages. These values can be systematically adjusted to improve the resolution of the digitizer. Figure 4 presents typical R, G and B curves for the liquid crystal paint under study (Hallcrest # BM/R25C5W/C17-10). This paint was purchased as a pre-mixed slurry containing droplets of TLCs encapsulated in transparent polymeric spheres with a diameter of \({{\mathcal{O}}}(10)\hbox{-}{\rm{\mu}}\hbox{m}\) and a water-based binder (Parsley (1991a)). This process is called microencapsulation (Parsley (1991b)). It is important to note that the analytical result reported by Fergason (1968) applies to pure TLCs. However, Collings and Hird (1997) suggest that microencapsulation and the binder material primarily affect the brightness of the TLC response, rather than the effects of lighting and viewing angles. Therefore, the procedure presented here should apply to other forms of TLC applications. The paint had a “red start to blue start” range of 25–30°C. This was airbrush-painted as a diluted slurry containing a 2:1 by volume mixture of TLC and distilled water along with a 1:1 volume ratio of Hallcrest BB-G1 black backing paint and distilled water. These layers were directly sprayed onto an isothermal high-conductivity copper surface. Note that the the calibration curves show that the paint could be used over a 15°C temperature range (25°C ≤ T ≤ 39°C). The curves shown in Fig. 4 generally show a rapid rise and fall as the crystal color changes. The effects of lighting and viewing angles, however, are not immediately clear from this figure. As there is no obvious analytical way to use Eq. 1 to predict the effect of these variables on the R, G, B curves, a novel approach was required. This is because the CCD camera effectively applies various filters to the incident spectrum to obtain R, G and B components. Therefore, the system-measured colors are termed as perceived, as they are a representation of the actual TLC sample color. Anderson and Baughn (2005a, b) present experiments and analysis demonstrating the difficulties of accurately modeling the reflected spectrum from a TLC sample.

Fig. 4
figure 4

Exemplary \(\overline{R}, \overline{G}, \overline{B}\) curves

Equation 5 shows the variation of the red color component, R as a function of temperature, illumination angle (ϕTLC,i ) and viewing angle (ϕTLC,s ).

$$ \delta R = \left.\frac{\partial R}{\partial T} \right|_{\phi_{{\rm TLC},i},\phi_{{\rm TLC},s}} \delta T + \left. \frac{\partial R} {\partial \phi_{{\rm TLC},i}}\right|_{T,\phi_{{\rm TLC},s}}\delta \phi_{{\rm TLC},i} + \left.\frac{\partial R}{\partial \phi_{{\rm TLC},s}} \right|_{T,\phi_{{\rm TLC},i}}\delta\phi_{{\rm TLC},s} $$
(5)

This shows that to isolate the effects of illumination and viewing angles, it is best to use temperatures where \(\left.\frac{\partial R} {\partial T} \right|_{\phi_{{\rm TLC},i},\phi_{{\rm TLC},s}} = \left.\frac{\partial G}{\partial T}\right|_{\phi_{{\rm TLC},i},\phi_{{\rm TLC},s}} = \left. \frac{\partial B}{\partial T}\right|_{\phi_{\rm TLC,i},\phi_{{\rm TLC},s}} = 0.\) For the paint used in this study, Fig. 4 shows that the most appropriate temperatures to isolate these effects are 26.7, 29.1 and 38.0°C, respectively. An examination of Eq.  5 shows that there are two ways to minimize the effects of viewing and lighting angles: choosing subregions where the color gradients \(\left. \frac{\partial {{\mathcal{Z}}}}{\partial \phi_{{\rm TLC},i}} \right|_{T,\phi_{{\rm TLC},s}}\) and \(\left.\frac{\partial {{\mathcal{Z}}}}{\partial \phi_{{\rm TLC},s}}\right|_{T,\phi_{{\rm TLC},i}}\) are small or developing subregions where δϕTLC,i and δϕTLC,s are small. Unfortunately, neither of these values can be directly computed, they can only be inferred. Therefore a more useful way of expressing Eq. 5 in terms of the observed camera image, using pixel spacings δx and δy is:

$$ \delta R = \frac{\partial R}{\partial T} \delta T + \frac{\partial R}{\partial x} \delta x + \frac{\partial R}{\partial y} \delta y. $$
(6)

3 Hue Angle Definition

For TLC calibration purposes, image-averaged \(\overline{R},\) \(\overline{G}\) and \(\overline{B}\) components at a specified temperature are combined to form a color index, expressed as a hue angle (which shall be termed as Q). This is a more convenient approach compared to directly calibrating the temperature response to a 4-D hypersurface of the form \(T \approx f(\overline{R},\overline{G},\overline{B}).\) It is critical to note, however, that hue angle is an interpretation of the actual reflected light spectrum (perceived color). Therefore, it is a parameter that can be designed to meet certain requirements. Hay and Hollingsworth (1996) discuss some of the possible choices. However, these are generally based on constraints derived from color theory, rather than developing accurate, low-uncertainty calibrations. This also means that depending on the definition of the hue angle, the perceived changes in color depend not only on the structure of the applied TLCs, but the corresponding color interpretation. Hacker and Eaton (1995) argue from a physical perspective that a robust definition of Q should produce a monotonic calibration function of temperature for all TLCs, be invariant to linear changes in lighting intensity \((Q(\overline{R},\overline{G},\overline{B}) = Q(c\overline{R},c\overline{G},c\overline{B}))\) and be reflection invariant to white light \((Q(\overline{R},\overline{G},\overline{B}) = Q(\overline{R}+c,\overline{G}+c,\overline{B}+c)).\) Hacker and Eaton (1995) detail, after much experimentation, that a definition of hue that meets these requirements is:

$$ Q = \frac{255}{2 \pi} \tan^{-1} \left\{\frac{\frac{1}{2}\overline{R} -\frac{1}{2}\overline{G}}{-\frac{1}{4}\overline{R} -\frac{1} {4}\overline{G} + \frac{1}{2}\overline{B}}\right\}. $$
(7)

This approach ensures that Q is only a function of temperature and lighting and viewing angles, consistent with the behavior of the color components. This parameter was defined to be an integer varying between 0 ≤ Q ≤ 255. If direct application of Eq. 7 gives values outside this range, \(\frac{2 \pi}{255}\) is added or subtracted to ensure that the value falls in the desired range.

The computation of Q is computationally 4 times more expensive than addition or subtraction because of the conditional statement used to ensure that the computed angle is in the range 0 ≤ tan−1θ ≤ 2π. Therefore, converting a single image of size M ×  M would take 16M 2 operations. Hacker and Eaton (1995) point out that to improve the accuracy of the measurement system, this conversion would be performed on the ensemble average of several collected images at a specified temperature. The average image contains a two-dimensional array of \(\overline{R}(T), \overline{G}(T)\) and \(\overline{B}(T)\) values corresponding to each pixel.

The total change in hue angle may be expressed in terms of the individual color components as:

$$ \delta Q = \left.\frac{\partial Q}{\partial \overline{R}} \right|_{\overline{G},\overline{B}} \delta \overline{R} + \left. \frac{\partial Q} {\partial \overline{G}} \right|_{\overline{R},\overline{B}} \delta \overline{G} + \left. \frac{\partial Q}{\partial \overline{B}} \right|_{\overline{R},\overline{G}} \delta \overline{B}. $$
(8)

As Q is an integer, at a specific temperature the effects of angular dependence via the choice of cell shape and size should ensure that the shift in the measured temperature is within the desired level of accuracy. This can be determined by the approximate relationship:

$$ \delta Q\approx\frac{\partial Q}{\partial T}\;\delta T. $$
(9)

Figure 5 presents the Q and \(\frac{\partial Q}{\partial T}\) curves for the data shown in Fig. 4 using Eq. 7. The useful portion of the calibration curves is where Q monotonically increases. Q cannot reach 255 as this would require \(\overline{R} = \overline{G}\) and \(\overline{B} < \overline{G},\) which is physically impossible for the TLCs under study. For the useful portion of the Q curve the magnitude of the derivative \(\frac{\partial Q}{\partial T}\) ranges from \(3 \leq \left| \frac{\partial Q}{\partial T} \right| \leq 60.\) These values are specific to the TLC under study. With an accuracy condition of |δT| = 0.1°C, the allowable shift in the hue angle δQ is in the range, 0.3 ≤ |δQ| ≤ 6. Similar TLC’s having different temperature ranges probably have similar behavior. For example, a TLC with twice the temperature bandwidth would probably have roughly twice the uncertainty range for the same shift in the hue angle, but we have not tested this hypothesis. To use this condition to determine the acceptable lighting and viewing angle effects on the \(\overline{R}, \overline{G}\) and \(\overline{B}\) components, it is necessary to evaluate the derivatives presented in Eq. 8. If we assume \(\delta \overline{R} \approx \delta \overline{G} \approx \delta \overline{B} \approx \delta \overline{{\mathcal{Z}}},\) the change in Q using Eq. 7 may be expressed as:

$$ \delta Q = \frac{255}{2 \pi} \frac{V^{\prime}_{1} + V^{\prime}_{2}} {V^{\prime 2}_{1} + V^{\prime 2}_{2}} \delta {{\mathcal{Z}}}. $$
(10)
Fig. 5
figure 5

Exemplary Q and \(\frac{\partial \overline{Q}}{\partial T}\) curves using data presented in Fig. 4

The parameters \( V_{1}^{\prime}\) and \( V_{2}^{\prime}\) are defined as:

$$ V_{1}^{\prime} = - \frac{1}{4} \overline{R} - \frac{1}{4} \overline{G} + \frac{1}{2} \overline{B} $$
(11)
$$ V^{\prime}_{2} = \frac{1}{2} \overline{R} - \frac{1}{2} \overline{G}. $$
(12)

Both \( V_{1}^{\prime}\) and \( V_{2}^{\prime}\) are defined as integers that are in the range −127 ≤ \( V_{1}^{\prime}\), \( V_{2}^{\prime}\) ≤ 128. Hacker and Eaton (1995) define the partial saturation, S′, as:

$$ S^{\prime} = \sqrt{V_{1}^{\prime 2} + V_{2}^{\prime 2}}. $$
(13)

Using this parameter, the shift in hue angle, δQ can be evaluated as:

$$ \delta Q = \frac{255}{2 \pi} \frac{V^{\prime}_{1} + V^{\prime}_{2}} {S^{\prime}} \delta \overline{{\mathcal{Z}}}. $$
(14)

Figure 6 displays the ratio \(\frac{\delta Q}{\delta \overline{{\mathcal{Z}}}}\) for the data presented in Fig. 4. This represents the sensitivity of Q to changes in each color component, \(\overline{{\mathcal{Z}}}.\) Using this figure, the maximum \(\frac{|\delta Q|}{|\delta \overline{{\mathcal{Z}}}|}\) value over the useful portion of the Q calibration curve was approximately \(\frac{|\delta Q|}{|\delta \overline{{\mathcal{Z}}}|} \approx 1.5.\) Using this observation, the maximum allowable change in each color component due to the effects of lighting and viewing angles is estimated to be: \(0.2 \leq |\delta \overline{{\mathcal{Z}}}| \leq 4.\) Kodzwa et al. (2007) used the value \(\frac{|\delta Q|}{|\delta {{\mathcal{Z}}}| }\approx 0.7.\) This value was found by averaging \(\frac{|\delta Q|}{|\delta {{\mathcal{Z}}}|} \) over the active range of the TLCs used in this study, giving the range \(0.4 \leq |\delta \overline{{\mathcal{Z}}}| \leq 9.\) These values are specific to the TLC paint used in this imaging system. However, for another application, all that is required to duplicate this process are sample calibration curves for the given imaging system and TLC paint.

Fig. 6
figure 6

Exemplary \(\frac{\delta Q}{\delta \overline{{\mathcal{Z}}}}\) curve using data presented in Fig. 4

It should be stated that Hay and Hollingsworth (1996) reported experimental data with polymer-dispersed TLCs that indicated that another definition of Q produces lower uncertainties.

$$ Q = \frac{255}{2 \pi} \tan^{-1} \left\{\frac{\sqrt{3} (\overline{G} - \overline{B})}{2\overline{R} - \overline{G} - \overline{B}}\right\}. $$
(15)

This definition has been used by Hay and Hollingsworth (1998), Sabatino et al. (2000) and Smith et al. (2001) for temperature measurement on this basis. Using the Kline and McClintock (1953) technique, the ratio of the uncertainties using either definition can be expressed as shown in Eq. 16.

$$ \frac{|\delta_{u} Q|_{1}}{|\delta_{u} Q|_{2}} \approx \frac{\sqrt{12}S^{\prime}}{S \sqrt{1 + \left| \frac{4 V^{\prime}_{1} V^{\prime}_{2} - V^{\prime 2}_{2}}{16 S^{\prime 2}}\right|}} $$
(16)

u Q|1 and |δ u Q|2 are the estimated uncertainties using the definition of Q suggested by Hay and Hollingsworth (1998) and Hacker and Eaton (1995), respectively. S is defined as the saturation and is computed using Eqs. 17, 18 and 19 shown below.

$$ S = \sqrt{V_{1}^{2} + V_{2}^{2}} $$
(17)
$$ V_{1} = 2 \overline{R} - \overline{G} - \overline{B} $$
(18)
$$ V_{2} = \sqrt{3} (\overline{G} - \overline{B}) $$
(19)

It can be analytically shown that SS′, therefore the definition described by Hay and Hollingsworth (1998) will have lower uncertainties using the Kline and McClintock (1953) approach. This is confirmed by Fig. 7 which presents the \(\frac{|\delta_{u} Q|_{1}}{|\delta_{u} Q|_{2}}\) curve using the data presented in 4. Also shown in this figure are S and S′ curves for the same data. This suggests that Eq. 15 can have estimated uncertainties 70% lower than Eq. 7 consistent with the maximum ratio of the two saturation definitions using the previously discussed color component data, \(\left. \frac{S}{S^{\prime}} \right|_{\rm max} \approx 0.21.\) Nevertheless, this definition yields the result \(\frac{|\delta Q|_{2}}{|\delta \overline{{\mathcal{Z}}}|} = 0,\) assuming \(|\delta\overline{R}|\approx|\delta\overline{G}|\approx|\delta\overline{B}|\approx|\delta\overline{Z}|.\) This physically suggests that this definition of Q is insensitive to lighting and viewing angle effects. Experimental results reported by Sabatino et al. (2000) and Günther and von Rohr (2002) demonstrate that this is not the case in practice. On the basis of these inconsistencies, this definition is unsuitable. However, it is important to note that for both definitions, the higher the saturation value, the lower the estimated uncertainty.

Fig. 7
figure 7

Exemplary \(\frac{|\delta_{u} Q|_{1}}{|\delta_{u} Q|_{2}},\) S′ and S curves using data presented in Fig.  4

4 Comparison of point-wise versus cell calibration approaches

Sabatino et al. (2000) measured calibration curves for each image pixel to account for color variations due to lighting and viewing angle effects. This approach is time-inefficient and memory intensive for large images as thousands of calibration curves would be necessary. To demonstrate this, the time required to collect \({{\mathcal{N}}}\) calibration curves for an image of size M × M can be estimated in the following manner:

$$ {{\mathcal{T}}} = {{\mathcal{M}}} ({{\mathcal{N}}} \tau_{1} + \tau_{2}). $$
(20)

where \({{\mathcal{M}}}\) is the number of calibration points, τ1 is the time necessary to convert the \(\overline{R}(T), \overline{G}(T), \overline{B}(T)\) values at each pixel to Q and τ2 is the time necessary to set the temperature of the calibration surface. For the imaging system developed by Kodzwa et al. (2007), τ1 ≈ 0.001 s and τ2 ≈ 180 s. Following the approach reported by Sabatino et al. (2000), \({{\mathcal{T}}} = 6\) hours and if we assume each calibration file is 32 kilobytes, 32M 2 kilobytes of memory would be necessary for storing calibration curves (approximately 5 gigabytes for M = 400). In comparison, if we use 100 calibration curves instead, \({{\mathcal{T}}} = 3\) hours and approximately 3 megabytes of storage would be needed. It is important to point out that Sabatino et al. (2000) used a film camera to capture images that were subsequently scanned. Thus, it is immediately evident that using a process where the image is divided into several subregions, assuming that the same level of accuracy is achieved, presents considerable time and memory savings.

Hollingsworth et al. (1989) and Mukerji and Eaton (2005) accounted for variations in the perceived color across a given region of interest (ROI) by arbitrarily dividing the image into several subregions. Kodzwa et al. (2007) reported a systematic manner of performing this operation. To demonstrate the utility of the previously discussed analytical relationships in developing this approach, key details from this effort are repeated here. A calibration grid that removes the effects of lighting and viewing angles can be found using an adaptive, iterative algorithm using the process: Given an ROI of pixel dimensions [x min,0, y min,0], [x max,0, y max,0], spatial averages for each component are computed using the equation set shown below:

$$ \overline{\overline{R}}_{0} = {{1}\over {\vartheta}} \int\limits_{x_{\rm min,0}}^{x_{\rm max,0}} \int\limits_{y_{\rm min,0}}^{y_{\rm max,0}} \overline{R}(x,y) {\rm d}x {\rm d}y $$
(21)
$$ \overline{\overline{G}}_{0} = \frac{1}{\vartheta} \int\limits_{x_{\rm min,0}}^{x_{\rm max,0}} \int\limits_{y_{\rm min,0}}^{y_{\rm max,0}} \overline{G}(x,y) {\rm d}x {\rm d}y $$
(22)
$$ \overline{\overline{B}}_{0} = \frac{1}{\vartheta} \int\limits_{x_{\rm min,0}}^{x_{\rm max,0}} \int\limits_{y_{\rm min,0}}^{y_{\rm max,0}} \overline{B}(x,y) {\rm d}x {\rm d}y $$
(23)

where \(\vartheta\) is defined as:

$$ \vartheta = (x_{\rm max,0} - x_{\rm min,0})(y_{\rm max,0} - y_{\rm min,0}) $$
(24)

The ROI is divided into four equal-sized subregions, which are defined as cells for the purposes of the grid algorithm. The spatial averages \(\{\overline{\overline{R}}_{i}: i = 1, \ldots, 4\},\) \(\{\overline{\overline{G}}_{i}: i = 1, \ldots, 4\}\) and \(\{\overline{\overline{B}}_{i}: i = 1, \ldots, 4\}\) are then computed for each cell using Eqs. 21, 22 and 23. Defining ɛ R , ɛ G and ɛ B as the differences between the cell mean component values versus the original ROI, as shown below:

$$ \varepsilon_{R}^{2} = \sum_{i = 1}^{4} (\overline{\overline{R}}_{0} - \overline{\overline{R}}_{i})^{2} $$
(25)
$$ \varepsilon_{G}^{2} = \sum_{i = 1}^{4} (\overline{\overline{G}}_{0} - \overline{\overline{G}}_{i})^{2} $$
(26)
$$ \varepsilon_{B}^{2} = \sum_{i = 1}^{4} (\overline{\overline{B}}_{0} - \overline{\overline{B}}_{i})^{2} $$
(27)

The overall mean difference is defined as:

$$ \varepsilon_{RGB} = \sqrt{\varepsilon_{R}^{2} + \varepsilon_{G}^{2} + \varepsilon_{B}^{2}} $$
(28)

The algorithm iterates by defining each cell as an ROI and repeating this process until the following condition is satisfied:

$$ \varepsilon_{RGB} \, \leq \, \chi_{RGB}. $$
(29)

Figure 8 describes this iterative process graphically. This is similar to the adaptive quadrature technique used for integration (Ferziger 1998). Theoretically, χ RGB may be determined using the following argument: \(\overline{R}, \overline{G}\) and \(\overline{B}\) values are represented as integers and consequently have a resolution of \(\frac{1}{2}\) color units. Hence, the maximum allowable difference for each cell, using this argument, should be \(|\overline{\overline{{\mathcal{Z}}}}_{0} - \overline{\overline{{\mathcal{Z}}}}_{i}| = 0.5\) and thus, χ RGB ≈ 1.7. However, Kodzwa et al. (2007) found that this produced a very large number of cells that contained only a few pixels. The division process could only be stopped by restricting the minimum cell size (Δ x min, Δ y min) and the total number of cells. To better understand this result, examining Fig. 8 and performing Taylor series expansions, the difference \(\overline{\overline{R}}_{0} - \overline{\overline{R}}_{i}\) may be expressed as:

$$ \overline{\overline{R}}_{0} - \overline{\overline{R}}_{i} \approx \left. \frac{\partial \overline{\overline{R}}}{\partial x} \right|_{i} \frac{\Delta x}{2} + \left. \frac{\partial \overline{\overline{R}}} {\partial y} \right|_{i} \frac{\Delta y}{2} \approx \frac{1}{2} \delta \overline{\overline{R}}. $$
(30)

If this is inserted into Eq. 25, the following result is obtained:

$$ \varepsilon_{R}^{2} \approx \sum_{i = 1}^{4} \left. \frac{\partial \overline{\overline{R}}}{\partial x} \right|^{2}_{i} \frac{\Delta x^{2}}{4} + \left. \frac{\partial \overline{\overline{R}}} {\partial y} \right|^{2}_{i} \frac{\Delta y^{2}}{4} + \left. \frac{\partial \overline{\overline{R}}}{\partial x} \right|_{i} \left. \frac{\partial \overline{\overline{R}}}{\partial y} \right|_{i} \Delta x \Delta y \approx \delta \overline{\overline{R}}^{2}. $$
(31)
Fig. 8
figure 8

Demonstration of adaptive grid algorithm for calibration

The smallest realizable values for the spacings are Δ x = Δ y = 1, as the image is divided into pixels. The smallest non-zero value for the color component derivatives is \(\frac{\partial \overline{\overline{{\mathcal{Z}}}}}{\partial x} = \frac{\partial \overline{\overline{{\mathcal{Z}}}}}{\partial y} = 1.\) Using these values in Eq. 31, the smallest difference between mean component values is \(\varepsilon_{R} \approx \varepsilon_{G} \approx \varepsilon_{B} \approx \sqrt{6}.\) Thus the minimum realizable value for the calibration system is ɛ RGB ≈ 4.2. This proved that the value χ RGB ≈ 1.7 was unrealistically restrictive. If we assume \(|\delta \overline{\overline{R}}| \approx |\delta \overline{\overline{G}}| \approx |\delta \overline{\overline{B}}| \approx |\delta \overline{\overline{{\mathcal{Z}}}}|,\) the overall mean difference may be estimated as:

$$ \varepsilon_{RGB} = \sqrt{3} |\delta \overline{\overline{{\mathcal{Z}}}}|. $$
(32)

Based on previous analysis we estimated \(0.4 \leq |\delta \overline{\overline{{\mathcal{Z}}}}| \leq 9\) and the maximum realizable value for ɛ RGB is ɛ RGB ≈ 15. To estimate the minimum calibration cell size, the total change Q may also be expressed spatially as:

$$ \delta Q = \frac{\partial Q}{\partial x} \Delta x + \frac{\partial Q}{\partial y} \Delta y. $$
(33)

If again we assume \(\frac{\partial Q}{\partial x} \approx \frac{\partial Q}{\partial y}\) and Δ x ≈ Δ y, the following relationship is obtained:

$$ \left. \Delta x \right|_{\rm min} = \frac{|\delta Q|_{\rm max}}{2 \left| \frac{\partial Q}{\partial x}\right|_{\rm min}}. $$
(34)

Using previous analyses, we estimate |δQ|max ≈ 6 and \(\left| \frac{\partial Q}{\partial x} \right|_{\rm min} \approx 0.3,\) resulting in a cell size of Δ x|min =  10. Kodzwa et al. (2007) found these values to be successful successful in achieving a calibration system with a verified accuracy of ± 0.1°C. The only exception was in regions where S′ was large, invalidating the previously described analysis. As shown in Eq. 14, the effects of lighting and viewing angles become more pronounced as S′ increases.

5 Conclusions

This paper presented a theoretical basis to the quantification and elimination of the effects of lighting and viewing angles on TLC thermography. This gives experimenters the ability to determine the feasibility of various strategies to account for these effects. Although this analysis has several simplifying assumptions, it offers a framework to achieve high-accuracy measurements for a given liquid–crystal application. This has been validated by Kodzwa et al. (2007) for a novel imaging system which was considerably more complicated than previous TLC thermography systems. To implement these techniques this for other TLC paint mixtures, sample calibration curves would be required, but the process would be identical to that presented here. This is because the general color variation trends are identical irrespective of the bandwidth of a given TLC mixture. Thus, researchers can use these procedures to “tune” their TLC measurement system to achieve a specified accuracy. These results specifically apply to wide-band TLCs where the observed color is used as the temperature indicator. As color change or intensity is used with narrow-band crystals, the effects of lighting and viewing angle are considered irrelevant. There are three critical components discussed in this paper: the formulation of the hue angle (Q), the saturation of the image under consideration and the spatial gradients of the color components across the image. By directly examining the shift due to lighting and viewing angles on the individual color components, an additional constraint on the choice of hue angle has been derived. That is, the definition of Q must be sensitive to changes in the individual color components \(\left(\frac{\partial Q}{\partial\overline{{\mathcal{Z}}}} \neq 0\right),\) consistent with experimental observation.

This analysis also demonstrates that a point-wise calibration is no guarantee of accurate measurements. If large color gradients are observed and the image has low saturation, a point-wise calibration can still give unacceptable performance. The presented analysis suggests that the variation of the color components over a given calibration cell should be considerably less than the variation due to temperature.