Sensitivity and resolution response of optical flow-based background-oriented schlieren to speckle patterns

The degraded resolution and sensitivity characteristics of background-oriented schlieren (BOS) can be recovered by utilizing an optical flow (OF)-based image processing scheme. However, the background patterns conventionally employed in BOS setups suit the needs of the cross-correlation approach, whereas OF is based on a completely different mathematical background. Thus, in order to characterize the resolution and sensitivity response of OF-based BOS to the background generation configurations, a parametric study is performed. First, a synthetic assessment based on an analytical solution of a one-dimensional shock tube problem is conducted. Then, a numerical assessment utilizing direct numerical simulation data of density-driven turbulence is performed. Finally, the applicability of the documented conclusions in realistic scenarios is tested through an experimental assessment over a plume of a swirling heated jet.


Introduction
Optical visualization techniques for refractive index variations have been extensively used for the characterization of nonreactive and reactive flows over many decades.The sensitivity of these methods to refractive index variations (i.e.schlieren, shadowgraphy or interferometry) enables flow property changes such as density, concentration and temperature to be recorded.A relatively newer addition to this family is a technique referred to as background-oriented schlieren (BOS), which utilizes the linear relationship between the density and refractive index expressed by the Gladstone-Dale equation (Richard and Raffel 2001).The name 'background-oriented' originates from the use of a pattern in the background of a refractive index variation over which the motion of optical features is traced.The resultant information provides a synthetic schlieren image that is originally obtained as a direct light impingement to a photo detector (figure 1).
BOS is performed by acquiring a pair of images with or without the presence of density variations occurring in a flow field.These images contain randomly distributed illumination intensities whose positions on the image plane are modified by the presence of a density-varying medium between the recorded scene and the image acquisition system (Settles 2001).As the pair of images is processed, the observed variations in the background pattern are traced by means of various digital image processing approaches (Hargather et al 2011).Due to its capability for quantitative characterization of density-varying flows by means of an inexpensive and simple setup that can be used for both two-and three-dimensional applications, BOS has received great interest from fluid dynamics researchers.However, it is associated with a severe sensitivity limitation originating from an inherent focusing problem (Raffel 2015).Considering a generic optical configuration for a BOS setup, increasing the sensitivity demands an amplification of the distance between the object and the background, while minimizing the distance between the object and the camera.However, this is constrained for two main reasons: the divergence of light rays necessitating corrections (Elsinga et al 2004) and the well-documented geometric blur of the flow features of interest (Gojani et al 2013).
Furthermore, the sensitivity and resolution of a BOS system are also governed by the image processing approach utilized to characterize the deviations of the light rays from their original paths.The most common method employed for this purpose is the cross-correlation algorithm (Westerweel 1997), which is associated with oversmoothening due to the averaging effects (Hargather and Settles 2012) and a bandwidthlimited dynamic range (Kähler et al 2012).Nevertheless, the problem of inferior sensitivity and resolution can be addressed through the application of the optical flow (OF) image processing technique, which defines the apparent motion of objects within the image plane by means of brightness patterns (Davies 2012).This is proven to enable OF to go beyond the resolution and accuracy limits of particle image velocimetry (PIV) algorithms for reconstructing density field information (Atcheson et al 2009).Thus, leveraging from its elevated sensitivity and resolution characteristics, various researchers have preferred to use OF.Accordingly, Hayasaka et al (2016) used a variational formulation of OF to characterize laser-induced underwater shock waves, where the residuals of brightness constancy assumption (non-zero divergence) are utilized to detect the shock wave shape and location.Moreover, Nicolas et al (2017) performed three-dimensional (3D) reconstruction of a supersonic jet flow employing the Lucas-Kanade OF approach, which relies on a windowbased neighborhood dependency.Furthermore, OF as the processing tool of choice is also applied to combustion studies for the tomographic reconstruction of flames (Grauer et al 2018).
Since the displacement of the light rays induced by refractive index variations is captured via the motion of the illumination features over the background patterns, the characteristics of the patterns play a crucial role in determining the resolution and accuracy limits of BOS.Conventionally, they are adjusted to suit the needs of the cross-correlation approach.This requires a high signal-to-noise ratio (SNR) in correlation maps that yields random dot patterns whose specifications are adjusted based on the optical setup.Accordingly, the concentration, size, intensity profile and interparticle distance of the random speckles are specified to maximize the contrast, minimize peak-locking, and maximize the subpixel interpolation accuracy (Adrian and Westerweel 2011).Alternatively, multi-scale procedural noise patterns can be used as background images (Atcheson et al 2008), relaxing the shortcomings of random noise functions (Yang et al 2014).Although synthetic assessments attribute the greatest accuracy to OF with procedural background patterns, it is shown that unavoidable experimental uncertainties in illumination and printing artifacts make random dot patterns a more robust option (Cakir et al 2022b).
Nevertheless, due to the scarcity of quantitative assessments on the use of OF for BOS, a proper characterization of background pattern specifications does not exist.Rather, the available literature concentrates on the performance of various OF algorithms over a set of background images optimized for cross-correlation (Li et al 2023) or the variation in the generation algorithm of patterns (Vinnichenko et al 2023).While it is still the case that speckle or random dot-based backgrounds are the most popular choice among BOS users, the background generation rules relying on the cross-correlation algorithm lack compatibility with the mathematical background of OF estimation.Thus, even though OF is able to establish sensitivity and resolution limits far beyond what cross-correlation is capable of, without the optimization of background patterns, the measurement technique lacks a serious step of evolution.
Accordingly, this study aims to respond to this need to create a framework for background pattern optimization for maximizing the image processing capabilities of OF in the use of BOS.This is achieved by an extensive quantitative characterization of the sensitivity and resolution limits of OFbased BOS in response to the computer-generated speckle patterns.A parametric study investigating the impact of speckle size, concentration and distribution randomness in flow scenarios that are common to BOS applications is conducted.Accordingly, two synthetic investigations utilizing a 1D shock tube (section 3.1) and high-resolution direct numerical simulation (DNS) dataset are performed (section 3.2).Moreover, an experimental assessment by means of a heated air jet is conducted to demonstrate the theoretical and applicability considerations associated with their employment (section 4).As a result, a set of guidelines for the choice of background generation parameters for different flow scenarios is extracted based on the resultant performance specifications of each individual case and their correlations.

Optical flow
The various approaches to OF analysis can be broadly distinguished into two different groups: gradient-based and variational algorithms.A common feature of these methods is the brightness constancy assumption (equation ( 1)), where the intensity of pixels moving within the image plane is assumed to be constant (Kearney et al 1987): Following the gradient-based approach, the displacement (δ x , δ y ) of the normalized illumination intensities (I) can be represented as functions of the temporal (I t ) and spatial pixel intensity gradients (I x , I y ).Nevertheless, the underdetermined structure of the resultant governing equation set requires a problem closure to obtain a unique solution, which leads to the well-known aperture problem (Galvin et al 1998).Hence, gradient-based schemes contain additional energy functions (equation ( 2)), which include quadratic penalization (ρ D , ρ S ) of the displacement vector residuals, enforcing the brightness constancy proposed (Horn and Schunck 1981).Furthermore, the function to be minimized also contains a penalty contribution from the displacement vector gradients for enhanced robustness, while the weighting between the two terms is controlled by a regularization parameter, λ: The numerical implementation of the gradient-based OF estimation is performed by means of constructing a linear system of equations that is solved for the displacements of δx and δy.Based on the brightness constancy assumption given in equation ( 1), the energy function definition (equation (2)) can be expressed in terms of the spatial illumination derivatives instead of the temporal (the difference between wind-on and reference images for BOS).Moreover, the penalization can be expanded utilizing the quadratic penalty functions, which allow the Euler-Lagrange equation to be applied since every term in equation ( 2) is twice continuously differentiable: λ∆δx − I x (I x δx + I y δy) = I x I t λ∆δy − I y (I x δx + I y δy) = I y I t .
(3) Thus, discretizing the spatial derivatives via the finite difference approach, the governing equation set can be written in a discrete form as a linear system of equations: Here, x refers to the displacements representing the OF estimation (x = [δx δy] ′ ), which are computed at each hierarchical level in an iterative manner, minimizing the energy function value integrated over the entire image plane.Therefore, the OF estimation is dictated by two main factors; first, the intensity of the illumination intensity changes between the two images of BOS measurements (I t = I n − I 0 ), which is driven by the optical configuration of the setup and the flow under investigation, and secondly, the spatial distribution of the illumination intensity variations (I x and I y ) that form the coefficient matrix A, which is a function of the background pattern.

BOS background generation
A speckle pattern is composed of a binary illumination field when generated in a synthetic environment.Nevertheless, when the pattern is printed and illuminated by means of a light source in experimental setups, the acquired light intensity distribution scattered by a binary dot is in the form of a Gaussian function due to the diffraction-limited image diameter.Thus, four main features of speckle size (d P ), speckle concentration (N I ), interparticle size (∆ P ) and randomness ratio (RR) of speckle distribution can be identified as image generation parameters (figure 2).However, in consideration of the overall uniformity of speckle distributions over the entire image plane, the interparticle distance should be maximized for each d P and N I combination to prevent empty spots over the background patterns.Moreover, two other features also influence the imaged intensity patterns, which are the magnification factor (M) of the optical setup and the utilized aperture setting of the objective (f # ).Due to the fact that BOS is associated with a wellknown defocusing phenomenon originating from the distance between the background and the schlieren features of interest (Z D ), a small aperture is preferred in almost all situations.There are multiple resources quantifying the theoretical tradeoff regarding the influence of aperture (f # ) and magnification (M) on the resolution and sensitivity of the BOS measurement configurations (Gojani et al 2013).This trade-off exists since the elevation of sensitivity by increasing the distance Z D also amplifies the geometric blur on the schlieren features.These experimentally verified theoretical predictions hold regardless of the image processing method of choice since they are associated with the optics instead of the mathematics of image processing algorithms.Accordingly, the spatial resolution (∆ s ) of a BOS setup that can be described via equation ( 5) is as follows: Here, d d refers to the diffraction-limited minimum image diameter, which corresponds to the circle of minimum confusion.
Utilizing equation ( 5), the resolution limits for the BOS setups with varying optical settings can be computed (figure 3).Moreover, while the distance Z D has no influence on the imaged intensity distributions, the change of f # also modifies the peak and range of illumination intensities surrounding the speckles by varying the diffraction-limited minimum image diameter (d d ) (figure 4).Thus, d d , which is influential both on the imaged background patterns and the optical resolution of the setup, can be estimated using equation ( 6): λ corresponds to the wavelength of the light source, which is in most BOS applications in the range of 450 < λ < 550 nm.
Based on equation ( 6), it is observed that M also influences the diffraction-limited diameter of the imaged speckles.However, in practical applications of BOS, especially ones where the flow features of interest require a field of view significantly larger than the sensor size of the cameras, M has a value in the order of O(10 −1 ); hence, the contribution of M to d d is rather insignificant compared to f # .Thus, in this study, the effect of imaging optical configuration is characterized by means of the aperture size only.Then, the nominal imaged speckle size d Σ is computed by combining the original speckle size (Md P ) and the diffraction-limited minimum image diameter (d d ): The synthetic representation of the diffraction-limited speckle image is modeled by means of a Gaussian function (Adrian and Yao 1985), where the standard deviation σ is assigned as half of the computed overall image blur (σ ≈ d Σ /2).The corresponding speckle images are provided in figure 4 with the illumination intensity distributions obtained at various aperture values (figure 4, left).

Synthetic assessments
The synthetic assessments of the different background pattern generation and imaging configurations are performed by means of two cases.First, the theoretical solution of a 1D shock tube is utilized, which contains supersonic flow features such as expansion fans and shock waves (section 3.1).Then, the results of a high-fidelity DNS simulation are raytraced to have a spatially varying, large range of displacement magnitudes in section 3.2.For both cases, a set of generated background patterns including the diffraction influence of the aperture size is provided in table 1.A computerized BOS setup is configured to capture the refractive index variations induced by the synthetic flow fields discretized by a sensor of size 512 × 512 pixels.Additionally, by considering the spatial dependency of BOS measurements on the distribution of speckles, each noise pattern is sampled 50 times.Moreover, the synthetic images are provided with additive Gaussian noise (generated via a built-in noise generation function in MATLAB) to stimulate experimental imperfections (Cakir et al 2022a).

Sod's shock tube
The Sod shock tube problem is an idealized 1D model of a rectangular or circular cross-section pipe filled with a gas of discontinuously varying properties (Sod 1978).The flow field information is obtained by solving the 1D Riemann problem in the shock tube, which yields the density (figure 5, first row) and density gradient (figure 5, second row) profiles.The two features of the expansion fan and the shock wave are utilized to   serve as step and pointwise inputs, respectively, with unit pixel displacement magnitude to measure the sensitivity and resolution response of OF-based BOS.In this regard, the sensor size (µ), magnification (M) factor and distance Z D are adjusted accordingly.Figure 6 (third row) illustrates the displacement fields computed from the exact solution and reconstructed by the OF approach.It can be observed from the quantitative Three main regions of deviations from the reference displacement magnitudes are apparent, which correspond to the extremities of the expansion fan and the shock wave itself.Firstly, for every λ >0 there exists a penalization on the displacement gradients that prevents the image processing algorithm from accurately capturing discontinuous variations in the displacement field (equation ( 2)).Secondly, resolving the extremities of an expansion fan or a shock wave is challenging due to the optical distortions associated with regions of large second-order gradients of the refractive index (Elsinga et al 2005).There is also a physical limitation related to the resolution of these features.Shock waves and Mach waves have thicknesses within the same order of magnitude as the mean free path of the gas molecules (Puckett andStewart 1950, Robben andTalbot 1966).Hence, utilizing equation ( 5) to perform a theoretical estimation on the resolution limits of BOS setups with varying parameters of optical configurations, the typical resolution that can be achieved is found to be in the order of millimeters (Gojani et al 2013).This refers to the fact that the BOS system possesses a pixel projection size larger than two orders of magnitude compared to the flow field features of interest.Hence, the density gradient variations induced by the shock and Mach waves are well confined within a single pixel of the photo sensor and not fully resolvable due to the optical limitations of the setup.Therefore, their presence results in unit pixel displacement inputs in the image plane (a stepwise input for the first Mach wave and a pointwise input for the shock wave).
In order to characterize the resolution and sensitivity response, two parameters are introduced for the displacement detection of step and pointwise pixel inputs.These inputs represent the distinctive features observed in high-speed compressible flow scenarios, being expansion fans and shock waves.Expansion fans provide an opportunity to measure the response of the image processing algorithm to a step pixel input existing over the first Mach wave of the expansion fan.The corresponding behavior is quantified very similarly to the approach followed by Kähler et al (2012).Hence, the step response width (SRW), referring to the distance between the first pixel with non-zero displacement value and the first pixel matching the input from the expansion fan (step pixel input), is defined in equation ( 8): The parameter x refers to the pixel location with respect to the reference displacement input, as shown in figure 6.Nonetheless, the quantification of the response to the presence of a shock wave is of a different nature due to the fact that the exact value of displacement induced by the shock wave cannot be captured.Thus, an aspect ratio (AR) is defined as the ratio of the pointwise response width (PRW) to the pointwise response height (PRH) that contains both the width and the height of the response (equation ( 9)): To start with the influence of speckle concentration, the resolution increase is obvious, with a higher concentration of speckles by reduction of the SRW and AR (figure 7).The coefficient matrix (A) being composed of intensity gradients over the background patterns, the high concentration of illumination intensity changes (which is provided by the speckles) directly contributes to the construction of a densely populated coefficient matrix.This improves not only the accuracy of the computation of the displacement vectors but also the uniqueness of the solution.
Moreover, the capability of capturing a step response is observed to increase with lower speckle sizes, where it converges to a limiting value for d P > 2 (figure 7, left) while the detrimental effect is identified as the precision of shock capturing.The difference favors smaller speckle sizes of high concentration.A higher density of smaller speckles (d P ∼ 3 pix) yields a larger variance of intensity gradients over the background in comparison to a lower density of larger speckles (d P ∼ 5 pix).In the case of large speckles, the gaps between the speckles lack sufficient illumination signal, while the intensity variation over the speckles is lower in magnitude, which causes the displacement induced by the shock to be suppressed.Moreover, as smaller speckles are utilized over the shock wave with a significantly smaller thickness, the motion of the speckles can be detected more easily as the displacement induced by the shock wave computed over localized illumination intensity gradients.This also plays a key role in determining the impact of aperture on the image processing performance.First of all, decreasing the aperture leads to lower values for both SRW and AR as the depth of field is improved (figure 7, middle and right).However, employing the smallest aperture causes the diffraction-limited image diameter to increase, lowering the intensity of illumination gradients over the speckles.Since this is analogous to increasing the speckle size, it leads to a lower SRW range being obtained, while the capturing capability of the shock wave is degraded (figure 7, right).
Furthermore, although varying the randomness ratio of distribution is not effective for the detection of step inputs in the case of small speckles, an optimum range (30 ⩽ RR ⩽ 70%) is noted for the shock capturing accuracy (figure 8, first row).Increasing the speckle size, the influence of the randomness ratio of speckle distributions on the step response becomes apparent.While the minimum values of SRW are detected at RR ∼ 80% with a relatively high concentration of speckles (N I ∼ 0.03 ppp), the highest accuracy in terms of capturing the shock wave is obtained at a slightly lower randomness ratio (RR ∼ 70%).Although a key reason for this can be the limited range of speckle concentrations as the upper value decreases with the increasing speckle size bounded by the allowable space, another reason is the uniformity of the coverage increasing with higher speckle sizes.

Homogeneous buoyancy-driven turbulence
A numerical assessment of the influence of background generation and imaging parameters on the accuracy of OF-based BOS is performed using DNS data of homogeneous buoyancydriven turbulence (Livescu and Ristorcelli 2008) (figure 9, left).Density gradients in the central plane of the 3D simulation volume are extruded to create a constant refractive index field along the line of sight, which is compatible with a planar BOS application (figure 9, middle).Then, the ray displacements due to the density variations are rendered via ray-tracing.A synthetic optical setup is configured such that a maximum displacement value of ∼8 pixels is obtained in order to characterize the dynamic range over a relatively large extent of displacement magnitudes (figure 9, right).
As the ray-traced background pairs are processed with the OF, the regularization parameter (λ) is optimized by means of a bounded non-linear optimization algorithm to obtain the highest reconstruction accuracy of the displacement field with each background pattern.This is performed by computing the AEPE values over six dedicated regions (figure 9, middle).The accumulated value of the AEPE is utilized to compose the cost function for the optimization procedure.Consequently, not only the minimum AEPE value that is achievable with each background, but also the corresponding λ value is computed.
Firstly, an immediate improvement in reconstruction accuracy is captured when the speckle size is increased above d P > 1 pix.In contrast to a scenario containing compressible flow features (shock waves and expansion fans), the numerical test case does not comprise a discontinuous displacement field.This situation relaxes the demand on sensitivity, whereas chaotic spatial distribution of displacement vectors requires a less sparse coefficient matrix.Accordingly, for a constant speckle size (d P ), raising the concentration of speckles (N I ) allows the reconstruction accuracy to increase.Nonetheless, the reduction in AEPE stops when the speckle concentration exceeds a certain limit, which varies based on the speckle size (figure 10, left).This is attributed to the overpopulation of the  background, which is only possible for small sizes of speckles (d P ⩽2).As speckles are defined in circular shapes, larger speckles yield larger gaps between the speckles.Overall, the best combination of these parameters is achieved with d P = 2 pix and N I = 0.039 ppp, which yields a pattern that is densely populated with high-contrast illumination intensity gradients to enable the best displacement capturing capabilities.
Regarding the influence of randomness of the speckle distributions, no major variation in terms of the accuracy within the range of d P >1 pix and 50% ⩽ RR is observed (figure 10, left).When the randomness of the pattern is reduced below 50%, significant degradation of the reconstruction accuracy is attained regardless of the speckle size except for d P > 4 pix at moderate to high speckle concentrations.This is due to the fact that speckles with a size and concentration of d P ⩽ 3 pix and N I > 0.016 ppp are more prone to aliasing errors which are associated with displacements over a region of pixels being misinterpreted by the image processing algorithm due to depraved uniqueness of the solution as known values of the linear system loses variance over individual elements.
Moreover, in order to assess the capability of the image processing approach to reconstruct the entire spectrum of spatial frequency, the distributions of reconstruction errors in relation to the local displacement magnitude are analyzed.This is especially important in flow field scenarios where large and small displacements co-exist (i.e.turbulent flows).First, the main reason for the low concentration patterns yielding a low accuracy is identified to be due to the heavy accumulation of large error values over regions of higher displacement magnitudes (figure 11).As the speckle concentration is increased, a clear distinction in terms of the distribution of error levels over the entire spectrum of displacement magnitudes is observed.The corresponding AEPE values are smaller at higher concentrations, but more importantly the capability to resolve multiple levels of the spatial frequency spectrum is improved.While the overall distribution of the errors is observed to be compressed  toward lower values, a high dispersion of reconstruction errors in the higher displacement magnitude regions with an increasing maxima of the end-point error range is noted.
Comparing the error distributions obtained with varying randomness ratios (figure 12), a strong correlation between error magnitudes and displacement magnitudes is obtained for the fully structured background patterns (RR = 0%).The greater accuracy of reconstruction observed in figure 11, where decreasing the randomness of the speckle distribution just below RR = 100% achieves better accuracy, is also validated.Although with a fully random distribution of speckles the maximum error values are slightly lower, a higher concentration of amplified error values obtained within the process of estimating the OF over large displacement vectors contributes to the slightly lower overall accuracy.
Consequently, there is a significant dependency of optimum configurations of speckle patterns on the flow features of interest.Hence, increasing the resolution and sensitivity over different flow features demands different background configurations for the best respective performance.Smallest speckles become more beneficial in the case of detection of extremely localized flow features, such as shock waves.A high concentration of the smallest possible detectable speckles (d P ∼ 1 pix) yields much higher accuracy and precision.However, with the increasing complexity of displacement distributions due to turbulence, larger speckles of size 2 ⩽ d P ⩽ 3 pix provide the best performance.Accordingly, while the discontinuous displacement structures in the shock tube case required the maximum concentration of speckles, the best results for the DNS case are achieved with N I = 0.039 ppp, which corresponds to two speckles less per 16 × 16 pix interrogation window.Finally, for both flow scenarios, a slightly lower randomness of speckle distributions is shown to be preferable.However, the influence of the randomness ratio is also observed to be highly dependent on the speckle size.

Experimental assessment: heated jet of air
The experimental setup employed in this work is implemented around a heated air jet generated by a Steinel HL 1610 S heat gun.It ejects air at a temperature of 600 K with a speed of 4.7 m s −1 from a nozzle of diameter 33 mm, which corresponds to a nozzle diameter-based Reynolds number of Re D = 3200.The BOS setup is composed of a Hamamatsu ORCA-Flash4.0V3 Digital CMOS camera (2048 × 2048 pixels, 16 bits, 6.5 µm pixel size), an f = 150 mm Nikkor lens, a 10 000 lm 80 Watt cool white LED as the light source, and backgrounds laser printed on 240 g m −2 paper (figure 13).The distances between the camera, the background and the heat gun are configured in consideration of three different factors.On top of the trade-off between the increased sensitivity and defocusing of the schlieren object, the resolution of the flow features in the spatial domain is aimed to be limited to a spatial resolution level that can be matched by the maximum shutter speed of the camera while a continuous light source is employed.Accordingly, 1000 images for each background pattern at an acquisition frequency of f aq = 100 Hz are recorded with an exposure time of t = 5 ms to limit the temporal averaging of flow features and to allow sufficient illumination signal to be captured utilizing an aperture of f # = 16 (table 2).In line with the synthetic assessments, the total range of background generation configurations is uniformly downsampled to obtain the 37 combinations provided in table 2. In order to establish a reference for the assessment of the non-intrusive flow property reconstructions using BOS, local temperature measurements are performed over the jet axis at six different longitudinal positions (1 ⩽ L/D ⩽ 6) from the exit of the heat gun via a K-type thermocouple transversed radially over a distance of two nozzle exit diameters at each longitudinal position with a resolution of 3 mm (figure 14).The thermocouple data are acquired at f aq = 5 kHz for 10 s at each position and a direct conversion of the thermocouple signal to temperature is performed using the EX1401 16-channel isolated thermocouple and voltage measurement instrument that utilizes an active cold junction to convert the voltage input to temperature output with an uncertainty of ∼0.2 K.
Figure 15 (middle) shows an instantaneous snapshot of the processed BOS images of the heated jet exiting the heat gun.A strong swirling behavior is induced by the fan, which accelerates the flow out of the nozzle.This allows the heat gun to discharge air with large-scale turbulent structures.Although the swirling flow behavior cannot be clearly captured by means of line-of-sight techniques such as schlieren imaging, the 2D projection of the integrated density gradients is able to demonstrate the interaction of the heated flow with the surrounding air.As the jet is discharged with T exit ∼ 600 K to room temperature, strong refractive index gradients are reconstructed at the exit of the nozzle.Moreover, shear layers are observed between the jet and the still air, over which Kelvin-Helmholtz (KH) instabilities are induced.The length scales of these instabilities are rather small in proximity to the jet exit.Hence, the abrupt temperature variation between the heated jet and the surrounding air leads to the high-contrast refractive index variations mentioned above.Moving further downstream, the eddies generated via the KH instabilities grow in size, which spreads the jet spatially at a relatively constant rate, which is confirmed via the time-averaged displacement map (figure 15, right).This also yields an increase in the rate of heat transfer as the eddies existing over the shear layers not only transport momentum between the fast jet and the surrounding still air but also thermal energy.Thus, the lower level of temperature gradients causes the contrast obtained over the refractive index variations to be reduced.Thus, the lower level of temperature gradients reduces the refractive index variations.These findings are in line with the literature on heated  Once the displacement fields for the OF estimation are computed for each time instant, a total of 1000 time samples are assembled to perform a statistical analysis.Due to the low speed of the flow exiting the heat gun nozzle, a time correlation analysis is performed to improve the statistical convergence rates over the time duration of image acquisition.Hence, an integral time scale based on the nozzle exit velocity and diameter is computed, which corresponds to T int = 0.033 (m)/4.7 (m s −1 ) = 7 ms.Thus, a sampling period of 2.5T int = 20 ms is selected, which reduces the sampling frequency to f samp = 50 Hz.This allows the convergence in terms of time-averaged statistics to be achieved within ∼150 images instead of the full dataset of 1000 images, reducing the image processing effort four times (250 images are processed for each background pattern configuration) (figure 16).
BOS also allows the resultant temperature field to be computed by relating the displacements to density gradients, which in turn yields a temperature field using the ideal gas relation.Since the jet exhibits an axisymmetric behavior averaged in time, the inverse Abel transform can be employed to compute planar gradients, which can be directly related to the changes in refractive index as described by Xiong et al (2020).Accordingly, a modified refractive index field (ñ = ñ(r)) is defined as a function of the radius from the central axis of the nozzle exit: This allows a relationship to be driven between the deflection angles of (ε x , ε y ) and the line-of-sight integrated refractive index field Applying the inverse Abel inversion to ñ and substituting the formulation for (ε x , ε y ), the relation between the induced light ray deflections and the refractive index field can be expressed as in equation ( 12): Equations ( 10) and ( 12) allow the computation of refractive index distributions at each longitudinal distance from the nozzle exit to be computed.Then, the Gladstone-Dale relation (n = 1 + Kρ) is utilized to relate the refractive index variations to the density field.Here, K refers to the Gladstone-Dale constant, which has a value of 0.223 × 10 −3 m 3 kg −1 in the case of air.Then, the modified refractive index field can be directly related to the temperature field using the ideal gas law as shown in equation (13): where n 0 is the refractive index of air at ambient conditions and the pressure is assumed to be constant due to the direct exposure of the low-speed jet to the atmospheric conditions (p = 1 atm).First, the temperature profiles employing background patterns with a fully random distribution of speckles (RR = 100%) are reconstructed to perform investigations of the response of the OF to the varying speckle size (d P ) and concentration (N I ) (figure 17).Starting with the smallest speckle size (d P = 1 pix), a clear underprediction of the temperature increase toward the center of the jet axis is observed.The low concentration of speckles yielding a less populated pattern results in a low level of SNR since the only illumination features that OF can utilize belong to the interference pattern of the light source with the irregularities over the paper, which are of low intensity in comparison to the imaged speckles.As the speckle concentration is increased, a gradual improvement in reconstruction accuracy is captured for the temperature field in proximity to the jet exit (L/D = 1) while achieving considerably good accuracy for L/D = 3 and L/D = 5 directly above N I > 0.012.One main reason attributed to this is the amplitude of temperature gradients being relatively large due to the high temperatures at the exit of the nozzle and being very localized owing to the small length scales of turbulent structures.Hence, the region of the jet exit is rather challenging to perform displacement detection, which requires a higher concentration of speckles to capture these localized gradients.Overall, the highest accuracy and precision for d p = 1 pix is obtained at N I = 0.070 ppp, while there exist local extremes in the error distribution yielding a large overall accuracy deficit, especially for N I < 0.060 ppp (figure 18).Furthermore, investigating the influence of speckle size on the performance of OF-based BOS, an accuracy jump between the patterns with d P = 1 pix and d P >1 pix is attained.For speckles with size d P = 2 pix and d P = 3 pix, much larger illumination regions are obtained, providing a high SNR of illumination gradient maps for the displacements induced over the backgrounds.Thus, the resultant temperature gradients are reconstructed with greater accuracy.The best reconstruction capability is attributed to the highest concentration of speckles (N I = 0.036), while no significant difference between the results of N I = 0.024 ppp and N I = 0.036 ppp is observed qualitatively.Nevertheless, when the error distribution over the entire low field is extracted, both the mean and median error values are observed to be lower, with N I = 0.036 ppp for d p = 2 pix, indicating not only better temperature reconstruction accuracy but also higher precision (figure 18).Increasing the speckle size further to d p = 3 pix, the accuracy deficit between different levels of speckle concentrations becomes even smaller.Visually, only small underpredictions of the temperature profile close to the jet core are observed for N I = 0.004 ppp (L/D = 1, 3 and 5), and the temperature reconstruction errors provided in figure 18 confirm the small variation in reconstruction accuracy with the increasing speckle concentration.Moreover, it also lowers the bounds of the maximum error values as well as increasing the precision of the measurements until d p = 4 pix, which is quantified for each speckle size 1 < d p < 3 pix at the concentration level of N I = 0.024 ppp.Going beyond the speckle size of d P > 3 pix, the accuracy of reconstruction is observed to be decreasing.Furthermore, the distribution of error values is more spread out, referring to a lower precision of detecting the correct temperature values.As a result, the highest accuracy for RR = 100% is obtained with d P = 3 pix at the given concentration levels, which correlates well with the numerical assessment using the DNS data.This is associated with the fact that both flow scenarios contain localized refractive index variations.Thus, it requires more densely populated patterns with smaller speckles to avoid large illumination features to contain the entire displacement vector, which is analogical to peak locking for block matching (Scharnowski and Kähler 2020).
Starting with the smallest speckle size (d P = 1 pix) to assess the impact of speckle distribution randomness, a rather small difference between the different randomness ratios (RR) is observed.Increasing the randomness further improves the accuracy of reconstruction toward the outer perimeter of the jet, while at the center, the highest temperature value is obtained with RR = 50% and RR = 75% (figure 19).Analyzing the accumulated error distribution provided in figure 18, a clear trend of improving accuracy with increasing randomness is revealed.Additionally, the precision is observed to increase with the increasing randomness as the distribution of the error values is bounded.Increasing the speckle size, a more significant variation in temperature profiles, especially in proximity to the jet exit, is observed by varying the RR.The most drastic accuracy drop is revealed for RR = 25%, with severe underestimations both for L/D = 1 and L/D = 5.This is also confirmed by the error distributions and average error values extracted in figure 18.Further increasing the randomness ratio yielded increasing accuracy of the temperature field reconstruction with the highest accuracy obtained using RR = 100%, while the highest precision was obtained with RR = 50%.An interesting result is obtained in terms of the accuracy of RR = 0% being relatively high compared to the other randomness ratios, which is unexpected given the numerical assessment.
These results obtained in terms of the impact of background pattern randomness are partially in agreement with the numerical assessment performed using the DNS.Nevertheless, within the numerical assessment, it was observed that a mid to high randomness ratio would correspond to the maximum accuracy of reconstruction, while the experimental results suggest this to be at RR = 100%.The variation between the experimental and numerical results is associated with the fact that in the numerical simulations, a more organized flow formation is present in comparison to the experimental case, which is highly turbulent, and the scales of the turbulent fluctuations extend well below the optical resolution limits of the setup.Hence, decreasing the scale of the flow features aimed to be reconstructed demands a higher level of randomness to prevent any aliasing-related issues within the spatial frequency domain.

Conclusions
Although BOS is associated with resolution and sensitivity deficits, the use of OF-based image processing provides a unique opportunity to recover high-fidelity density field variations.However, the background patterns conventionally employed in BOS setups suit the needs of the cross-correlation approach, whereas OF is associated with a completely different mathematical background.Thus, in order to characterize the resolution and sensitivity response of OF-based BOS to the background generation configurations, a parametric study is performed.For this purpose, a theoretical assessment utilizing the 1D shock tube problem, a numerical assessment using a high-fidelity DNS simulation and an experimental assessment with a heated jet of air are employed.
The assessment over compressible flow features revealed the optimum choice for maximizing local resolution by employing a high density (N I = 0.08 ppp) of small speckles (d P = 1 pix), which enables the smallest SRW and PRW representing the highest resolution capabilities.This enables the user to carefully construct a background that locally respects the respective features' characteristics for experiments where the positions of the flow structures can be roughly predicted.Moreover, the increased complexity of the distribution and range of displacement vectors in the case of turbulent flow resulted in slightly different outcomes.It was found to be preferable to have larger speckles (d P = 2 pix) with a high concentration (N I = 0.048 ppp).However, the turbulent flow field is observed to be more sensitive to overcrowding of the background patterns.Finally, the thermally induced density gradients generated by the hot air exiting the heat gun pose an even more challenging case in terms of providing a flow field that is highly turbulent, with scales ranging well beyond the spatial and temporal resolution limits of the optical setup.Accordingly, the conclusions drawn for the influence of speckle size and concentration are observed to be in agreement with the reconstructions over the buoyancy-driven turbulence field.Nevertheless, the highest accuracy of reconstruction is obtained with even larger speckles in comparison to the numerical assessment (d P = 3 pix).The effect of the randomness ratio is also observed to be more critical in the case of the experimental assessment, where the highest level of resolution capabilities is achieved with the highest level of pattern randomness (RR = 100%), which is suggested to be due to the larger range of turbulent length scales in the case of the experiments.

Figure 1 .
Figure 1.Experimental setup of the BOS system with the illumination configuration and the background pattern (left), heated air jet (middle) and image acquisition system (right).

Figure 3 .
Figure 3. Spatial resolution of a BOS setup for varying magnification and aperture settings computed using equation (5).

Figure 4 .
Figure 4.The influence of varying aperture on the normalized illumination intensities of diffraction-limited imaging of speckles (left).Corresponding images of speckles sized d P = 2 pixels with f # = 6, f # = 12, f # = 18 and f # = 24 (second to fifth column).

Figure 5 .
Figure 5. Density (first row) and density gradient (second row) profiles within the shock tube 0.7 s after the diaphragm rupture.Corresponding density gradient distribution within the tube computed from the theoretical result and reconstructed with OF (third row).Displacement magnitude averaged across the span of the tube reconstructed with OF in comparison to the theoretical result (fourth row).

Figure 6 .
Figure 6.The definition of OF response to a step-like displacement input as step response width (SRW) (left) and pointwise input as pointwise response width (PRW) and height (PRH) (right).

Figure 8 .
Figure 8. Response of OF to step (color-coded) and pointwise (labeled) input with varying speckle concentration randomness ratio (RR) and speckle size (d P = 1 pix (first row), d P = 2 pix (second row), d P = 3 pix (third row) and d P = 4 pix (fourth row)) imaged with an apertures of f # = 12.

Figure 10 .
Figure 10.AEPE values accumulated over the six regions of interest computed with optimized regularization parameters for varying speckle concentration (N I ), speckle size (d P ) and speckle distribution randomness ratio (RR) for an aperture setting of f # = 16.

Figure 11 .
Figure 11.End-point error distributions over reference displacement vectors (colored via displacement magnitude) in the six regions of interest computed with optimized regularization parameters for varying speckle concentration (N I ) and speckle size (d P ) at a randomness ratio of RR = 100% for an aperture setting of f # = 16.

Figure 12 .
Figure 12.AEPE values accumulated over the six regions of interest computed with optimized regularization parameters for N I = 0.023 ppp and d P = 2 pix, for varying speckle distribution RR values and for an aperture setting of f # = 16.

Figure 13 .
Figure 13.BOS experimental setup with the heat gun.

Figure 14 .
Figure 14.Thermocouple setup for local temperature measurements over the plume of the heated air jet.

Figure 15 .
Figure 15.A raw image from the BOS setup (left), instantaneous snapshot of the displacement field reconstructed via OF (middle) and time-averaged displacement field (right).

Figure 16 .
Figure 16.Statistical convergence history of time-averaged displacement fields obtained with OF processing of BOS images.

Figure 17 .
Figure 17.Time-averaged temperature fields reconstructed by means of OF-based BOS using fully random (RR = 100%) background patterns of speckle sizes d P = 1 pix (first column), d P = 2 pix (second column) and d P = 3 pix (third column) with varying speckle concentrations (N I ).A sample time-averaged global temperature field is provided with the temperature information extracted over three locations of L/D = 1 (third row), L/D = 3 (second row) and L/D = 5 (first row) for comparison with the thermocouple measurements.

Figure 18 .
Figure 18.Box plots (Tukey et al 1977) of temperature field reconstruction errors obtained with OF-based BOS utilizing various background pattern configurations and the thermocouple measurements as a reference.

Figure 19 .
Figure 19.Time-averaged temperature fields reconstructed by means of OF-based BOS using background patterns of varying randomness ratios (RR) with speckle sizes and concentrations of d P = 1 pix and N I = 0.048 ppp (first column), d P = 2 pix and N I = 0.024 ppp (second column) and d P = 3 pix and N I = 0.024 ppp (third column).A sample time-averaged global temperature field is provided with the temperature information extracted over three locations of L/D = 1 (third row), L/D = 3 (second row) and L/D = 5 (first row) for comparison with the thermocouple measurements.

Table 1 .
Configuration details for the generated synthetic speckle patterns.

Table 2 .
Configuration details for the background patterns and testing conditions.