Silvia E Zieger1, Peter D Jones2, Klaus Koren1. 1. Aarhus University Centre for Water Technology (WATEC), Department of Biology, Section for Microbiology, Aarhus University, 8000, Aarhus C, Denmark. 2. NMI Natural and Medical Sciences Institute at the University of Tübingen, 72770, Reutlingen, Germany.
Abstract
Optical chemical imaging has established itself as a valuable technique for visualizing analyte distributions in 2D, notably in medical, biological, and environmental applications. In particular for image acquisitions on small scales between few millimeter to the micrometer range, as well as in heterogeneous samples with steep analyte gradients, image resolution is essential. When individual pixels are inspected, however, image noise becomes a metric as relevant as image accuracy and precision, and denoising filters are applied to preserve relevant information. While denoising filters smooth the image noise, they can also lead to a loss of spatial resolution and thus to a loss of relevant information about analyte distributions. To investigate the trade-off between image resolution and noise reduction for information preservation, we studied the impact of random camera noise and noise due to incorrect camera settings on oxygen optodes using the ratiometric imaging technique. First, we estimated the noise amplification across the calibration process using a Monte Carlo simulation for nonlinear fit models. We demonstrated how initially marginal random camera noise results in a significant standard deviation (SD) for oxygen concentration of up to 2.73% air under anoxic conditions, although the measurement was conducted under ideal conditions and over 270 thousand sample pixels were considered during calibration. Second, we studied the effect of the Gaussian denoising filter on a steep oxygen gradient and investigated the impact when the smoothing filter is applied during data processing. Finally, we demonstrated the effectiveness of a Savitzky-Golay filter compared to the well-established Gaussian filter.
Optical chemical imaging has established itself as a valuable technique for visualizing analyte distributions in 2D, notably in medical, biological, and environmental applications. In particular for image acquisitions on small scales between few millimeter to the micrometer range, as well as in heterogeneous samples with steep analyte gradients, image resolution is essential. When individual pixels are inspected, however, image noise becomes a metric as relevant as image accuracy and precision, and denoising filters are applied to preserve relevant information. While denoising filters smooth the image noise, they can also lead to a loss of spatial resolution and thus to a loss of relevant information about analyte distributions. To investigate the trade-off between image resolution and noise reduction for information preservation, we studied the impact of random camera noise and noise due to incorrect camera settings on oxygen optodes using the ratiometric imaging technique. First, we estimated the noise amplification across the calibration process using a Monte Carlo simulation for nonlinear fit models. We demonstrated how initially marginal random camera noise results in a significant standard deviation (SD) for oxygen concentration of up to 2.73% air under anoxic conditions, although the measurement was conducted under ideal conditions and over 270 thousand sample pixels were considered during calibration. Second, we studied the effect of the Gaussian denoising filter on a steep oxygen gradient and investigated the impact when the smoothing filter is applied during data processing. Finally, we demonstrated the effectiveness of a Savitzky-Golay filter compared to the well-established Gaussian filter.
Chemical imaging and mapping is the analytical approach to acquire
a visual image of an analyte distribution by measuring its spectral,
spatial, or temporal information in 2D or even 3D.[1] The general term optical chemical imaging encompasses a
variety of methods, including Raman microscopy[2,3] and
hyperspectral imaging.[4,5] As a subcategory of optical chemical
imaging, luminescence-based chemical imaging employs luminescent dyes,
the luminescence properties of which can be correlated with the concentration
of a target analyte.[1,6] Those luminescent-based optical
chemical sensors are also called optodes. The main detection methods
used for such optodes are (i) ratiometric imaging[4,7] and
(ii) lifetime-based imaging.[8,9] In ratiometric imaging
an analyte-sensitive indicator dye and an analyte-insensitive reference
dye are combined in an optode, and the intensity ratio of the indicator
relative to the reference dye is determined for ratiometric read-out
(Figure ). In contrast,
lifetime-based imaging correlates the luminescence decay time of the
indicator with the analyte concentration. While the latter one is
a self-referenced method that is less susceptible to optical interferences
than intensity-based imaging techniques, it requires, however, a more
complex and sophisticated detection system. In recent years, optical
chemical imaging has advanced tremendously, particularly since it
became possible to image analyte distributions using simple and affordable
color cameras.[6,7,10] Since
then, optodes have proven to be valuable tools for various biological,
environmental, and medical applications, especially when it comes
to the mapping of analyte distributions and dynamics in heterogeneous
and complex samples at the microscale[11−19] or across scales.[20−22]
Figure 1
Camera measures light intensity at discrete locations
for each
color, yet all measurements include variation. (A) A sensor element
is defined by a red pixel and its neighboring green pixels. (B) The
sensor signal is the ratio of intensities of the two colors. (C,D)
Representative sample of 70 000 pixels from an image
acquired under homogeneous anoxic conditions demonstrates the variation
in the green and red pixels and in their ratio. While variation in
each channel could arise from an inhomogeneous light source or sensor
thickness, the variation which remains in the ratio demonstrates that
camera noise is the dominant source of variation. Mean and standard
deviation (SD) are indicated above the histograms.
Camera measures light intensity at discrete locations
for each
color, yet all measurements include variation. (A) A sensor element
is defined by a red pixel and its neighboring green pixels. (B) The
sensor signal is the ratio of intensities of the two colors. (C,D)
Representative sample of 70 000 pixels from an image
acquired under homogeneous anoxic conditions demonstrates the variation
in the green and red pixels and in their ratio. While variation in
each channel could arise from an inhomogeneous light source or sensor
thickness, the variation which remains in the ratio demonstrates that
camera noise is the dominant source of variation. Mean and standard
deviation (SD) are indicated above the histograms.With the set goal of visualizing analyte distributions in
finer
details, image resolution, as well as image accuracy and precision,
became crucial parameters to describe the image quality. While microscopic
imaging often aims at visualizing structural elements (e.g., organelles
or macromolecules within cells),[23] optodes
aim to visualize analyte dynamics and interactions on a spatial scale
of few micrometers to centimeters with the highest resolution possible,
that is, to perceive the smallest possible change in an analyte.[24] However, inherent camera noise can deteriorate
the image quality as it obscures relevant information.[25] Even if the initial signal variation that occurs
during image acquisition is marginal, this random but not entirely
avoidable signal variation can propagate and amplify as measurement
uncertainty through the data processing, affecting thus the accuracy
and precision of the analyte distribution significantly (Figure ).[26−28] Hence, it is
vital to improve our understanding of noise and image resolution as
well as how our selected evaluation procedures will affect the final
result.
Figure 2
Mathematical meaning of calibration measurements and measurements
of unknown concentrations. Calibration points of known concentration
are marked as black dots and their standard deviation as vertical
error bars. The interpolation demonstrates a nonlinear Stern–Volmer
equation used for O2 sensing determining the best estimate
and a corresponding prediction envelope (shown in gray). For measurement
analysis, the ratiometric intensity R0/R (horizontal dashed lines) is translated into
a probability of the oxygen concentration (solid lines) using the
Stern–Volmer fit. Horizontal error bars indicate the standard
deviation around each best estimate.
Mathematical meaning of calibration measurements and measurements
of unknown concentrations. Calibration points of known concentration
are marked as black dots and their standard deviation as vertical
error bars. The interpolation demonstrates a nonlinear Stern–Volmer
equation used for O2 sensing determining the best estimate
and a corresponding prediction envelope (shown in gray). For measurement
analysis, the ratiometric intensity R0/R (horizontal dashed lines) is translated into
a probability of the oxygen concentration (solid lines) using the
Stern–Volmer fit. Horizontal error bars indicate the standard
deviation around each best estimate.In general, sources of noise are manifold, including optical crosstalk
within the optode (e.g., light guidance effects[9,26] and
optode inhomogeneity[29]). Further sources
of noise are noise arising during image acquisition summarized as
transduction noise or due to nonoptimal camera settings, for instance
when the ISO value must be high or the exposure time long.[9] To cope with noise arising from the optode, different
approaches for optode fabrication have been proposed.[29] Fischer et al.[26] presented a
high-resolution optode based on a fiber optic faceplate consisting
of millions of individual light-guiding fibers, which prevents optical
crosstalk within the optode. In another approach, Kühl et al.[30] reduced the thickness of the O2 optode
to 1–2 μm (cf. Figure S1)
and were thus able to produce an optode with particular high resolution
for microscopic applications with a fast O2 sensor response.[24] In addition to instrumental considerations,
a few optimized evaluation approaches have been proposed to cope with
noisy images,[20] and smoothing filters were
introduced in image postprocessing to increase the signal-to-noise
ratio. However, while being generally beneficial for reducing image
noise, denoising filters can also lead to a loss of spatial resolution
and therefore to a loss of important information about analyte distribution.
Hence, a conflict arises between image resolution and noise reduction,
especially when fine heterogeneities (mm−μm) should be
resolved in complex samples.In this work, we therefore address
the question of how precisely
we can predict the concentration of the target analyte at a single
pixel level within a noisy chemical image and how selected denoising
filters will affect the final result. Thus, we first introduce the
reader to the concept of calibration-associated uncertainty in chemical
imaging. We then use an oxygen optode to generate a calibration curve
based on the Stern–Volmer equation and apply a Monte Carlo
method to estimate the uncertainty propagation and amplification across
this nonlinear calibration curve. To demonstrate the impact of the
initial marginal noise for small-scale imaging, we image a sample
with a steep oxygen gradient over a few millimeters and investigate
the impact of different denoising filters on the final results notably
on the accuracy of the oxygen penetration depth.
Results
and Discussion
The general purpose of this paper is to investigate
uncertainty
propagation in optical chemical imaging and to discuss the trade-off
between high image resolution and noise mediation. This discussion
is particularly relevant when optical chemical imaging is performed
on small scales, for example, a few millimeters or even micrometers.
The results shown in the main article refer to a platinum(II)-porphyrin
based O2 optode incorporating an optical isolation layer
and when images are acquired with camera settings 2 (Table ), while information for other
camera settings as well as additional studies complementing the main
messages of the paper are shown in the Supporting Information.
Table 2
Camera Settings Used
to Investigate
Their Influence on the Camera Noise
camera settings
aperture
f-number
exposure
time [sec]
1
2.8
2
2
2.8
4
3
5
4
Uncertainty Propagation
along the Calibration
Process
An overview of the initial measurement uncertainty
resulting from random camera noise during image acquisition and its
propagation along the calibration is shown in Figure and summarized in Table . Throughout the analysis, we assume that
the pixels within the images are homogeneously distributed and independent
from each other, as the dominant variation is introduced by the camera
chip. This assumption is supported by the analysis of noise correlation
in homogeneous samples. Calibration images at constant O2 concentrations contain stochastic white noise, which is uncorrelated
among pixels, between red/green channels, and between subsequent images.
At a bulk level, we assume a constant and homogeneous O2 concentration over time and space. Following eq , the sample size of 273 900 individual
pixels (830 × 330 pixels) reduces thus the experimental standard
deviation of the mean (SDM) for the ratiometric signal to a fractional
error (SDM/mean) of 0.01% for each calibration point. We are therefore
confident that the initial values for the ratiometric signal are accurate
(validated by the reference sensor; see Supporting Information) and close to their expected values (low SDM).
The standard deviation SD of the initial ratiometric signal is also
small for each calibration point, with a fractional error ranging
between 3.2 and 3.6% relative to the intensity level and indicates
thus that the sample values scatter homogeneously around the mean
value without outliers distorting the average value (Table ).
Figure 3
Uncertainty propagation
across the calibration procedure exemplified
for optode 1 using camera settings 2. The calibration steps shown
are (A) initial ratiometric signal for each calibration point, (B)
Stern–Volmer plot obtained after fitting the ratiometric intensity
to the oxygen concentration according to the simplified Stern–Volmer
model. The marker points “o” represent the mean, and
the colored area represents the standard deviation SD. The error bars
shown represent the standard deviation of the ratiometric signal (A)
and of the oxygen concentration (B). The latter was determined by
the Monte Carlo simulation for multivariate uncertainty propagation.
Table 1
Initial Measurement Uncertainty Due
to Random Camera Noise and Its Propagation along the Calibration Process
for Optode 1 and Camera Settings 2
initial ratiometric signal R
normalized
signal R0/R
O2 concentration upon Monte
Carlo simulation [% air]
expected O2 concentration [% air]
mean
SD
SDM
mean
SD
SDM
mean
SD
SDM
0
1.88
0.06
1.15 × 10–4
1.00
0.05
0.96 × 10–4
0
2.7
0.5 × 10–2
25
1.38
0.05
0.96 × 10–4
1.37
0.07
1.34 × 10–4
25
5.1
1.0 × 10–2
50
1.13
0.04
0.76 × 10–4
1.67
0.08
1.53 × 10–4
51
8.0
1.5 × 10–2
76
0.99
0.04
0.67 × 10–4
1.90
0.09
1.72 × 10–4
77
11.6
2.2 × 10–2
100
0.91
0.03
0.61 × 10–4
2.07
0.10
1.91 × 10–4
101
15.3
2.9 × 10–2
Uncertainty propagation
across the calibration procedure exemplified
for optode 1 using camera settings 2. The calibration steps shown
are (A) initial ratiometric signal for each calibration point, (B)
Stern–Volmer plot obtained after fitting the ratiometric intensity
to the oxygen concentration according to the simplified Stern–Volmer
model. The marker points “o” represent the mean, and
the colored area represents the standard deviation SD. The error bars
shown represent the standard deviation of the ratiometric signal (A)
and of the oxygen concentration (B). The latter was determined by
the Monte Carlo simulation for multivariate uncertainty propagation.The subsequent step of the calibration, the
normalization of the
signal ratio R0/R (cf. eq ), affects both uncertainties
(SD and SDM) in the same way. Both uncertainties increase on average
by up to 80% compared to the initial value of the ratiometric signal
uncertainty (Table ). Model fitting, in turn, inherently introduces additional scatter
since experimental data are correlated with theoretically driven models,
in this case, the simplified Stern–Volmer model. The model
fit, and the Monte Carlo simulation for nonlinear uncertainty propagation
thereby estimates the average O2 concentration and its
dispersion for each acquired image of known O2 concentration
(calibration image). The thereby computed sample mean for the O2 concentration corresponds well with the expected value for
all calibration points, which is also indicated by the general low
SDM (Table ). However,
toward higher O2 concentrations, uncertainty propagation
causes the sample mean of the O2 concentration to deviate
from the expected value with a relative error of 1–2%. The
fractional error of the SD (SD/mean) is 15% at higher O2 concentrations and increases at lower O2 concentrations
(>20%). This in turn, leads to an increased detection limit for
the
O2 indicator. Consequently, for a sensitive detection of
the O2 concentration in the trace range, other specialized
luminescence indicators are required, as it is not possible to measure
equally accurately and sensitively over the entire oxygen range (0–100%
air) with only one indicator.[31−34]
Impact of Camera Settings
on the Prediction
Function
Camera noise cannot be avoided, but appropriate
camera settings can reduce it, thereby enhancing the image quality.
An important parameter defining the image quality is the light exposure,
describing how much light reaches the camera detector. While under-/overexposure
is usually avoided in photography to prevent image quality degradation
and the acquisition of false signal values, fluorescence-based optical
chemical sensing may require that the exposure is adjusted accordingly
to acquire sufficient signal intensities. For a given optical configuration
(LED, filter, etc.), two camera settings mainly control the image
exposure: the exposure time (shutter speed) and the aperture (f-number).
By comparing the image histogram and the corresponding tables in the Supporting Information (Figure S2 and Table S1
to Table S3) and summarizing the uncertainty of the ratiometric signal
as well as its propagation toward the O2 concentration,
it can be deduced that camera setting 2 (aperture 2.8, exposure 4
s) is the most favorable among the presented measurement settings
and results in the lowest uncertainty in all calibration points. In
other words, at “optimal” camera settings, such as setting
2, images are captured to achieve a high signal level for the individual
color channels (red and green) without oversaturation. It must be
mentioned, however, that the optimal camera settings determined here
cannot be considered absolute but must be adapted to the respective
experimental setup depending on the camera and the illumination sources
used. Even though the average signal level of the initial signal ratio
is not as high as for camera setting 3 (aperture 5), camera setting
2 features the lowest SD and SDM ranging between 0.06 (0% air) to
0.03 (100% air) and 1.15 × 10–4 (0% air) to
6.11 × 10–5 (100%), respectively (Table S1). However, increasing the shutter speed
to double as done for the camera settings 1 (exposure 2 s; Table ), results in underexposed
images in which the camera noise amplifies leading thereby to an increased
SDM (setting 1, 1.53 × 10–4 (0% air) to 7.64
× 10–5 (100%); setting 2, 1.15 × 10–4 (0% air) to 6.11 × 10–5 (100%
air)). Through uncertainty propagation, the determined O2 concentrations are hence less certain compared to camera settings
2. In addition, Table S1 to Table S3 show
that while the shutter speed primarily affects the uncertainty, that
is, SD and SDM, decreasing the aperture by half deteriorates the overall
signal more significantly and degrades not only the uncertainty (SD
and SDM) but also the mean calculated O2 level (setting
3). In a direct comparison of camera settings 1 and 3, in which the
aperture size is halved, and the exposure time is doubled, the SD
of the ratiometric signal intensity R is higher for
camera setting 3 for all calibration points (Table S1).
Noise Reduction due to
Smoothing Filters
Image noise is an undesirable byproduct
of image acquisition that
obscures intrinsic information and degrades the qualitative and quantitative
interpretation of an experiment.[35] In-camera
algorithms translating captured sensor data into an image, or denoising
algorithms applied for image postprocessing, face the challenge of
determining whether measured differences in pixel values represent
noise or real “photographic information”. While the
former should be reduced in the process, the latter must be retained,
especially when imaging at a microscopic level requires high image
resolution. Image processing algorithms thus tackle the challenge
to find a trade-off between reducing unwanted noise to a minimum and
preserving maximal spatial information.A common method for
mediating image noise during image postprocessing is to apply an image
smoothing filter. The effectiveness of these filters depends on different
parameters, including the type of the filtering function and the size
of the pixel group used to average the pixel in its center (kernel).
To investigate the impact of the smoothing filter on the image noise
and the image resolution, we imaged an O2 optode monitoring
the O2 concentration gradient between the anoxic water
body and the oxic headspace (Figure ). Upon acquisition, the raw images containing the
ratiometric signal intensities were smoothed with a Gaussian filter
in three different ways and compared to the original, nonsmoothed
image: (i) along the horizontal axis, (ii) along the vertical axis,
and (iii) with a squared mask in both directions. Further side studies,
applying the Gaussian filter at different stages along the data processing
or implementing Savitzky-Golay filter functions instead of a Gaussian
filter, can be found in the Supporting Information (section 5 and section 6).
Figure 7
Experiment on O2 concentration
gradient: (A) O2 optode monitoring the O2 concentration along the
anoxic water body and the oxic headspace; (B) 3D image of the calculated
O2 concentration for each pixel in the marked area. The
O2 concentration ranges between 0 and 100% air. In both
panels, the depth profile is indicated as a dotted line.
The results of the smoothing approach
using a Gaussian filter in
different directions are presented 3-fold: Figure and an interactive image sequence included with the Supporting Information illustrate
the impact of the smoothing filter in qualitative terms. For demonstration
purposes, the size of the filter mask is altered between 1 and 81
with a step size of 5 pixels in the image sequence. To compare the
original images and the effect of the smoothing filter on the image
quality, we highly recommend inspecting the animated image sequence
in the appendix. Additionally, Figure displays the O2 penetration depth (O2 concentration < 5% air) as a quantitative parameter to
describe the impact of the smoothing approach on the image resolution
and the accuracy of the measurement results.
Figure 4
Depth profile along the
O2 concentration gradient from
the oxic headspace to the anoxic water body after applying different
denoising approaches. Denoising using a Gaussian filter either (A) along
the horizontal axis, (B) along the vertical axis, and (C) along both
axes as a square filter mask. In each panel, the average O2 concentration recorded by the O2 optode is presented
as a solid orange line and the respective standard
deviation (SD) as a bright-colored area around the mean. The
line width is 1 pixel, that is, 0.036 mm. In each panel, a
reference depth profile recorded by the microsensor is shown
as a black solid line. In each panel, an excerpt of the optode
image is shown as a 2D insert to visualize the transition. Here, the
size of the filter mask is set to 51 pixels, whereas the mask size
for the image sequence is altered between 1 and 81 with an increment
of 5 pixels.
Figure 5
O2 penetration depth (<5% air) for
different
filter mask widths (1–81 px or 0–3 mm)
and smoothing approaches. While the horizontal smoothing filter (marked
in orange) has no impact on the O2 penetration depth, the
vertically (blue) and 2-dimensionally (green) applied Gaussian filter
affect the penetration depth significantly. As a reference, the penetration
depth determined by the microsensor is shown in black.
Depth profile along the
O2 concentration gradient from
the oxic headspace to the anoxic water body after applying different
denoising approaches. Denoising using a Gaussian filter either (A) along
the horizontal axis, (B) along the vertical axis, and (C) along both
axes as a square filter mask. In each panel, the average O2 concentration recorded by the O2 optode is presented
as a solid orange line and the respective standard
deviation (SD) as a bright-colored area around the mean. The
line width is 1 pixel, that is, 0.036 mm. In each panel, a
reference depth profile recorded by the microsensor is shown
as a black solid line. In each panel, an excerpt of the optode
image is shown as a 2D insert to visualize the transition. Here, the
size of the filter mask is set to 51 pixels, whereas the mask size
for the image sequence is altered between 1 and 81 with an increment
of 5 pixels.O2 penetration depth (<5% air) for
different
filter mask widths (1–81 px or 0–3 mm)
and smoothing approaches. While the horizontal smoothing filter (marked
in orange) has no impact on the O2 penetration depth, the
vertically (blue) and 2-dimensionally (green) applied Gaussian filter
affect the penetration depth significantly. As a reference, the penetration
depth determined by the microsensor is shown in black.The standard way to denoise images is to apply the filter
along
both axes to ensure consistent treatment of all pixels. However, as
can be seen in Figure C or rather in the image sequence in the
Supporting Information and Figure , this approach sacrifices the resolution of the O2 concentration gradient. Even though the average O2 concentration coincides well with the microsensor profile at the
beginning, the smoothing results in a deterioration of the optode
profile with a larger filter mask. Furthermore, the O2 penetration
depth as a measure of image resolution and result accuracy increases
with the size of the filter mask resulting in a penetration depth
of 0.50 mm (filter mask width of 81 pixels) compared to the initial
penetration depth of 0.12 mm (filter mask width of 1 pixel). Consequently,
essential information is being lost, which is however intrinsically
vital for high-resolution imaging at the microscale.However,
besides the risks that face denoising methods, they can
be beneficial when applied in the right way. As Figure and the image sequence in the Supporting Information show, the Gaussian filter applied
only along the horizontal axis mainly affects the noise, that is,
the standard deviation (SD) of the depth profile. The noisy signal
of the recorded O2 depth profile improves in accuracy,
and the O2 concentration transition remains unchanged even
with a larger filter mask, demonstrating thus the beneficial effects
of the denoising method. The depth profile, in particular underneath
the surface and at the transition phase, coincides well with the O2 profile recorded by the microsensor. The deviation of the
optode profile from the microsensor above the surface, however, can
be explained by different effects, an optical crosstalk within the
optode due to light guidance, a smearing effect occurring at the meniscus
of the water surface, and a signal blur due to oxygen diffusion in
the sensing chemistry (cf. Figure S1).[26,30] The image resolution described in terms of O2 penetration
depth also displays the beneficial effect of this approach as can
be seen in Figure . Both the microsensor and the optode upon horizontal image smoothing
feature a similar penetration depth of 0.11 mm and 0.14 mm on average,
respectively. The small offset between the microsensor and the optode
results from metrological constraints, since it was not entirely possible
to define the exact same surface depth for both sensors.In
contrast, the smoothing filter applied only along the vertical
axis demonstrates the risks of noise reduction (Figure ). Also in this case, the signal becomes
smoother, and the SD is reduced compared to the original image, however,
the noise reduction has a significant impact on the image resolution,
in particular at the anoxic–oxic transition. Even a small filter
mask with a width of 15 pixels (0.53 mm) leads to a noticeable deterioration
of the image resolution as can be seen for the penetration depth in Figure . At this mask size,
the penetration depth increases from 0.12 mm to 0.16 mm which corresponds
to a relative error of 27.30% compared to the original image. Moreover,
the image sequence in the Supporting Information
demonstrates how a misapplied smoothing filter for noise reduction
can distort the general shape of the O2 gradient profile.Furthermore, as shown in Figure S6,
it makes no difference to the calculated penetration depth whether
the smoothing filter is applied to the individual color images (red
and green), to the ratiometric signal R, or the normalized
signal R0/R later in
the course of the data analysis. This observation is especially true,
when the size of the filter mask is in the range of the expected penetration
depth.However, the type of filter function chosen affects the
penetration
depth, as shown in Figure and in Table S6, although it should
be noted that in our study no difference was found between a second
and third order polynomial function for the Savitzky-Golay filter,
apart from the fact that more pixels are needed for the latter. In
the case of horizontal smoothing, the result for the penetration depth
generally improves, meaning the horizontal smoothing leads to a similar
result compared to the depth determined by the microsensor, especially
when the length of filter mask increases. This trend corresponds to
what is shown in Figure (filter mask 51 px or 1.8 mm) and the image sequence in the Supporting Information. In general, however,
the determined penetration depth of the smoothed images is significantly
larger than that of the nonsmoothed images (Figure A), although the differences between Gaussian filters and
Savitzky-Golay filters are marginal (see Table S6). In the case of a square filter mask or when the smoothing
is applied along the vertical axis, the Savitzky-Golay filter yields
better results, that is, the determined penetration depth is closer
to the depth determined by the microsensor, especially for larger
filter masks (Figure B,C). Here, it is important to point out that the vertical smoothing
(Figure B) leads to
better results than the nonsmoothed images when the filter mask is
in the range of the penetration depth. The results deteriorate only
when the filter mask increases and are then far off the reference
value. The situation shown in Figure A,B perfectly exemplifies the discussed dilemma. It
may be advantageous to smooth noisy images to improve results and,
for example, to determine the depth of penetration in heterogeneous
images at the best possible spatial resolution. On the other hand,
a smoothing filter must not be used without caution, otherwise relevant
information will be distorted or even lost.
Figure 6
Comparison of the O2 penetration depth (<5% air)
for different filter functions and filter mask widths (1–21
px or 0–0.9 mm). The smoothing filters are applied either (A)
along the horizontal axis, (B) along the vertical axis, and (C) along
both axes as a square filter mask. In addition, the penetration depth
determined by the microsensor (0.113 mm) and in the nonsmoothed images
(0.123 mm) is indicated as black dashed or as gray dotted line, respectively.
Comparison of the O2 penetration depth (<5% air)
for different filter functions and filter mask widths (1–21
px or 0–0.9 mm). The smoothing filters are applied either (A)
along the horizontal axis, (B) along the vertical axis, and (C) along
both axes as a square filter mask. In addition, the penetration depth
determined by the microsensor (0.113 mm) and in the nonsmoothed images
(0.123 mm) is indicated as black dashed or as gray dotted line, respectively.
Conclusion
We report
the impact of random camera noise on the final prediction
function for chemical imaging and demonstrate its propagation along
the calibration process for well-established ratiometric O2 imaging. First, we investigated how measurement uncertainties propagate
and amplify along the nonlinear calibration process (Stern–Volmer
fit) using a Monte Carlo simulation and demonstrate how unfavorable
camera settings impact the camera noise even further. We demonstrated
how unavoidable image noise produces an imprecise calibration curve
(Figure ). We further
demonstrated how an optical isolation layer (Figure S4, Table S4) or optimized camera settings (Table S1) can reduce the image noise. Notably for the latter,
we emphasize that although the absolute values of the uncertainty
propagation depend on the specific camera or the general illumination
of the experimental setup, the described trend remains the same.Second, we demonstrated how image smoothing, as a common approach
for noise reduction, can reduce noise, but it also ultimately affects
the image resolution. For demonstration purposes, we investigated
the impact of image smoothing filters on quantification of a steep
O2 concentration gradient over a few millimeters between
an anoxic water body and an oxic headspace. This simple example demonstrated
how prior knowledge of a sample allowed the selection of a one-dimensional
Gaussian filter to reduce noise while maintaining resolution in the
direction of the chemical gradient. In the absence of such prior knowledge,
more advanced filters such as anisotropic diffusion[36,37] could be applied to chemical imaging. In addition, our tests have
shown that while the stage when the smoothing filter is applied during
data processing is less influential, the selection of the filter function
is very much so. On the basis of our findings (Figure S7), it thus appears that it is more advantageous to
use a Savitzky-Golay filter for noise reduction than a Gaussian filter,
even though the former is to date underutilized and not yet well established.The trade-off between noise reduction and image resolution is critical
for precise understanding and quantification of the information revealed
by chemical imaging. These considerations become increasingly important
when imaging samples with resolutions from millimeters down to a few
micrometers, as reduced dimensions and light intensity lead to significant
image noise at reasonable exposure times. We hope that our study will
support improved quantitative analysis of chemical imaging data, both
as a refresher for experienced researchers and as an example for newcomers
to the field.
Material and Methods
The main purpose of this article is to estimate the measurement
uncertainty resulting from optical chemical imaging and its propagation
along the calibration/evaluation process. Therefore, we focus on the
imaging setup and image analysis; further information on the fabrication
of the optode, a general description of the optode calibration, and
a description of the concentration gradient experiment can be found
in the Supporting Information.
Imaging Setup
The imaging setup consisted
of an LED light and a digital RGB camera as a readout system. The
images were taken with a single-lens reflex (SLR) camera (EOS 1300D,
Canon, Japan) onto which a macro-objective lens (Macro 100 F2.8 D,
Tokina, Japan) was mounted and set to a final image resolution of
712 dpi (280 pixels per cm). To minimize background fluorescence,
a plastic filter (#10 medium yellow; LEEfilters.com) in front of a
round orange 530 nm long-pass filter (OG530 SCHOTT, 52 mm × 2
mm) was attached to the front of the objective lens. For excitation
of the O2 optode, a 470 nm UV LED (r-s components, Copenhagen,
Denmark) was used together with a short-pass filter to avoid optical
crosstalk between LED and camera. The LED was connected to the computer
via a USB-controlled LED driver unit (trigger box, imaging.fish-n-chips.de)
and the entire imaging setup was controlled by the software look@RGB
(imaging.fish-n-chips.de). To investigate the influence of camera
settings on the camera noise, images were acquired with three different
camera settings (Table ).
Image
Analysis
Images were analyzed
following an intensity-based ratiometric approach.[7] To perform the ratiometric approach, the software look@RGB splits the images into their respective color channels
(red, blue, and two green channels) and the ratiometric signal R was calculated by dividing the red by one of the green
color channels, according to the fluorescence emission spectra of
the indicator and the reference dye, respectively (cf. Figure ). The ratio R was then correlated to the O2 calibration according to
a simplified Stern–Volmer Fit:[38,39]for the
normalized ratiometric signal determined
by dividing the anoxic ratio R0 by ratio R, where Ksv is the Stern–Volmer
quenching constant and f and (1 – f) are the quenchable and nonquenchable fraction of the
immobilized indicator. This method is well established in optical
chemical sensing, and further information on intensity-based O2 imaging can be found in the literature.[7,40,41] For more details on the oxygen calibration,
including the actual oxygen concentration for each calibration point,
refer to the Supporting Information, for
example, Table S1.
Uncertainty Propagation
The Guide
to the Expression of Uncertainty in Measurement (GUM) provided by
the Joint Committee for Guides in Metrology (JCGM) is the definitive
document for assessing measurement uncertainty and its propagation
along the calibration process. The GUM summarizes international accredited
definitions and rules for evaluating measurement uncertainty.[35,42,43] All parameter definitions and
methods for uncertainty propagation used within this paper are taken
from this guide. Definitions and approaches taken from other sources
are marked accordingly. For clarification and illustration of the
mathematical meaning of the definitions, reference is made to Figure .
Definitions
of Parameters Associated with
Measurement Uncertainty
Uncertainty
General expression of
doubt about the validity
of a measurement result, including the qualitative concept and quantitative
measures. The parameter itself describes any deviation from the expected
value resulting from systematic errors and imperfect correction of
systematic errors.
Experimental Standard Deviation (SD)
A statistical
measure of the dispersion of results from the expected value for a
series of the same measured parameter. The experimental standard deviation
SD is calculated as follows:where x is the result of the i-th measurement and x is the arithmetic
mean of n repetitions
considered.Experimental standard deviation of the mean (SDM)
considers the variability of sample deviations within the measurement
and relates this variability to the sample size. Following the theorem
of large numbers, the experimental standard deviation of the mean
SDM iswhere SD is the experimental standard deviation
of n repetitions considered. In the literature, the
SDM is often referred to as the standard error of the mean (SEM),
although this is not correct according to the GUM.
Probability
Density Function (PDF)
The PDF of a continuous
random variable X derives from the distribution function
and describes the relative likelihood that the value of the random
sample x equals that sample point. The
PDF is used to construct probability distributions using integrals
and to study and to classify probability distributions. It thus considers
any influence on the measurement result, for example, the ratiometric
signal of the optode.
Expectation Value
Best estimate
of the probability
density function to describe the correlation between the O2 concentration and the signal ratio using a simplified Stern–Volmer
fit (eq ) as it is the
common standard in optical chemical sensing of O2 dynamics.
Image Resolution
Description of how many details can
be seen in the image. Quantitative parameters for image resolution
include among others pixel resolution and spatial resolution. Pixel
resolution describes the number of effective pixels of a digital camera
contributing to the final image, and the number of photodiodes, that
is, pixel sensors, is a multiple of the pixel number itself. The more
practical parameter, however, is the spatial resolution, which describes
how close two lines in an image can still be resolved. The spatial
resolution is influenced by image generation processes and image postprocessing
techniques.
Image Noise
An unwanted byproduct
of image acquisition
that disguises the intrinsic information and degrades the actual image
resolution. While noise related to incorrect settings, such as shutter
speed or other exposure settings, can be avoided by preshooting, random
image noise or noise related to the camera technology itself (banding
noise) cannot be controlled.
Uncertainty
Propagation along the Calibration
Procedure
To investigate the impact of the initial uncertainty
on the final result, the uncertainty propagation was estimated in
the following way. First, the signal ratio R was
determined for each calibration point as described in section . On the basis of visual
inspection, a homogeneous area was selected within the optode scene
and averaged to obtain the initial measurement signal (Figure C). The standard deviation
SD and the standard deviation of the mean SDM were calculated according
to eqs and 3 (Figure D).In the following step of the calibration, the normalization
of the ratiometric signal R0/R, the uncertainty propagation was determined according to Taylor[27] for linear functions:where q is the total uncertainty
of the normalized signal ratio R0/R, and ∂R and ∂R0 are the individual uncertainties of the variables R and R0. The uncertainty ∂q corresponds to the experimental standard deviation SD,
while the corresponding experimental standard deviation of the mean
SDM can be derived according to eq . The ratios ∂q/∂R and ∂q/∂R0 are the derivatives of the uncertainty q with respect to the signal ratio R and the initial
signal ratio R0, respectively, under anoxic
conditions.In the subsequent fit process, the normalized ratiometric
signal R0/R is correlated
with the
oxygen concentration according to the nonlinear Stern–Volmer
model (eq ), while calculating
the uncertainty propagation from the signal ratio to the oxygen concentration.
The purpose of the fit is to find optimal values for the fit parameters f and Ksv. Since the fit parameters
themselves are subject to uncertainty, we first determine the uncertainty
of these fit parameters using eq , assuming well-defined values for the oxygen concentrations.
Then, we calculate the uncertainty propagation toward the oxygen concentration
with respect to all contributing sources of uncertainty, that is,
the uncertainty of the ratiometric signal intensity as well as the
uncertainty of the fit parameters. However, since the Stern–Volmer
fit is a nonlinear calibration function, it is not possible to determine
an analytical solution for the uncertainty propagated to the oxygen
concentration.[42] Therefore, we estimated
the uncertainty using the Monte Carlo method as a numerical approach.
The Monte Carlo method iteratively selects random values for each
PDF of each input parameter, thereby numerically determining the uncertainty.[35] According to the central limit theorem and the
law of large numbers, the mean value of the numerical result converges
toward the expected value.[44] The estimation
of the uncertainty propagation requires the best value for the fit
parameters in eq (Ksv and f) and their corresponding
covariance matrix. On the basis of these results, random samples are
drawn for each parameter, assuming a normal multivariate distribution
in which the mean value corresponds with the best value of the fit
parameter and the standard deviation is determined from the covariance
matrix. The O2 concentration is then calculated for each
point of the sample from the transformed eq . By subsequent calculation of the mean and
the experimental standard deviations of the derived sample results,
the Monte Carlo method provides an approximate solution of the expected
value.All calculations shown in this study were performed using
Python
3.8.5. For estimation of the error propagation and in particular for
the Monte Carlo simulation, the Python packages uncertainty (pythonhosted.org/uncertainties,
version 3.1.5) and mcerp (pythonhosted.org/mcerp, version 0.12) were
used. The final version of the Python code is openly available on
GitHub (github.com/silviaelisabeth/Noise-vs-Resolution) and can be
consulted for detailed information on the individual calculation steps.
The data set used for calibration and measurement analysis is available
online at Mendeley Data.[45]
Noise Reduction—Reduce Uncertainty
by Smoothing
An O2 concentration gradient experiment
was established between the air-filled headspace and the anoxic water
body as described in the Supporting Information. Upon image acquisition, a smoothing filter was applied for image
postprocessing to investigate the impact of denoising algorithms on
random image noise as well as on spatial resolution. Here, either
a Gaussian filter or a low degree polynomial Savitzky-Golay filter
was used for smoothing.A Gaussian filter is a denoising method
convolving the image with a weighted function similar to a 2-dimensional
Gaussian function:where x and y are the distance of the pixel of interest from the kernel
center
and σ is the standard deviation of the Gaussian filter. Each
pixel of the image is thereby considered individually and adjusted
in comparison to its surrounding pixels (kernel) to avoid rapid changes
in intensity.In contrast, a Savitzky-Golay filter is a 1-dimensional
finite
impulse response of polynomial order, described by the following equation:[46]where N is the number of
convoluting integers used for normalization, Y is the pixel of interest
of the original data, and m is the length of the
filter mask. The filter coefficients C (convolution integers) are defined by the chosen
polynomial order and are listed in the publication by Savitzky and
Golay. As for the Gaussian filter, each pixel is considered individually
and adjusted in comparison to its surrounding pixels (defining the
filter mask).To investigate the effect of smoothing filters
on the image noise
and (spatial) resolution, the smoothing filters were applied to the
measured O2 concentration gradient between the anoxic water
body and the oxic headspace. The smoothing filters were applied along
both the horizontal and vertical axis, and as a squared filter mask
with a filter width varied between 1 and 81 pixels at a pixel
spacing of 5. Initially, the filters were applied to the ratiometric
signal intensity after dividing the red by the green color images.
However, to further investigate the impact of the smoothing filter
on the O2 concentration, we applied the smoothing filters
at different stages during the image processing. Thus, we applied
the filters to the individual color images, the ratiometric images R, and the normalized ratiometric images R0/R. Further information on this can
be found in the Supporting Information.
The corresponding filter function for the Gaussian filter (GaussianFilter)
was taken from the Python package openCV (github.com/opencv, version
4.5.1.48), while the Savitzky-Golay filter (savgol_filter) was taken
from the Python package SciPy (scipy-cookbook.readthedocs.io, version 1.7.1).After application of the smoothing filters,
a depth profile was
drawn as shown in Figure at an image width of 3 mm from the oxic
headspace to the anoxic water body with a line width of 1 pixel,
that is, 0.036 mm. The O2 concentration profile was validated
against a fiber based O2 microsensor (see Supporting Information).Experiment on O2 concentration
gradient: (A) O2 optode monitoring the O2 concentration along the
anoxic water body and the oxic headspace; (B) 3D image of the calculated
O2 concentration for each pixel in the marked area. The
O2 concentration ranges between 0 and 100% air. In both
panels, the depth profile is indicated as a dotted line.
Authors: Klaus Koren; Maria Moßhammer; Vincent V Scholz; Sergey M Borisov; Gerhard Holst; Michael Kühl Journal: Anal Chem Date: 2019-02-20 Impact factor: 6.986