1 Introduction

Background-oriented schlieren (BOS) is an optical flow diagnostic technique used to measure density gradients in a flow field by tracking the apparent distortion of a target dot pattern. Since density and refractive index are proportional for fluids, density gradients in a flow are associated with refractive index gradients, and an object viewed through a variable density medium will appear distorted due to the refraction of light rays traversing the medium. The distortion of the dot pattern is typically estimated by cross-correlating an image of the dot pattern without the density gradients (called the reference image) with a distorted image viewed through the density gradients (called the gradient image) using techniques borrowed from particle image velocimetry (PIV) (Raffel 2015; Meier 2002; Dalziel et al. 2000; Richard and Raffel 2001; Settles and Hargather 2017). Alternatively, the distortion can also be estimated using optical flow algorithms (Atcheson et al. 2009).

Low spatial resolution has been traditionally one of the limitations of BOS compared to the traditional schlieren technique (Hargather and Settles 2012; Elsinga et al. 2004), and is due to the large interrogation window sizes required for the PIV-type cross-correlation algorithms to ensure sufficient signal to noise ratio for the measurements (Keane and Adrian 1992; Westerweel 1997). While multi-pass interrogation schemes and window overlap can increase the spatial resolution (Scarano and Riethmuller 1999; Scarano 2002; Scarano and Riethmuller 2000), adjacent vectors still have some spatial dependence and do not constitute purely independent measurements. Further, correlation methods have been shown in PIV to suffer from bias and random errors in regions with sharp displacement gradients due to peak broadening and peak splitting (Westerweel 2008; Kahler et al. 2012).

An alternative processing approach that can increase the spatial resolution is tracking individual dots from one image to the next, as done in particle tracking velocimetry (PTV) applications (Marxen et al. 2000; Cardwell et al. 2011; Ishikawa et al. 2000; Keane et al. 1995; Fuchs et al. 2017; Lei et al. 2012; Mikheev and Zubtsov 2008; Zhang et al. 2015; Cierpka et al. 2013; Ruhnau et al. 2005). Despite the popularity of PTV methods, such analysis has not received attention for BOS images. The primary factor controlling the performance of PTV methods is the ratio of particle displacement across images to inter-particle distance in the same image, because it affects the reliability of matching the same particle between the two frames. Since typical displacements in PTV applications are about 10 pixels, they are traditionally limited to low seeding densities. However, the displacements are typically very low in BOS applications (< 2–3 pixels in most cases), so large dot densities can be used before the accuracy of the dot matching procedure is affected. For example, even with 20 dots in a 32 × 32 pixels window, the inter-dot distance is still about 3–4 pixels if a dot is about 3 pixels in diameter, so the ratio of dot displacement to inter-dot distance is low enough to ensure reliable measurements. Perhaps more importantly, the dot patterns used for BOS experiments are manufactured, and hence all the information about the dots such as their location, size and number is known. In addition, since there is no out of plane motion, the tracking method can be applied in an iterative manner till all the dots in the frame have been tracked, to achieve near 100% vector yield. Due to these reasons, several of the constraints that are typical of standard PTV measurements are not present in BOS, and tracking can be performed with high accuracy and yield even at large dot densities. Finally, the displacement field in BOS is irrotational as opposed to traditional PTV applied to free-moving tracer particles in a flow, and hence, it can be described by a single scalar potential. This provides an opportunity to improve BOS measurements, especially in outlier detection, similar to divergence-based filtering applied in PIV. The advantage of tracking methods for BOS has also been noted by Charruault et al. (2018) who proposed a tracking algorithm for BOS based on Voronoi cells, and showed that their tracking approach can measure larger image deformations compared to correlation when applied to an air–cavity interface.

One contribution of this paper is to recognize that tracking methods are well suited for BOS measurements due to low displacements typically encountered in these experiments, and also because the dot locations are already known. In addition, the tracking method proposed in this paper is robust to image noise, as it does not require an intensity threshold to detect the peaks, but instead utilizes the prior information about the location of dots on the target. For 15–20 dots in a 32 × 32 window, dot tracking will result in nearly an order of magnitude more vectors compared to correlation processing, and improve accuracy in displacement estimation in regions involving sharp changes in density.

In the following sections, we will introduce a dot tracking methodology for BOS, and compare its performance with the traditional cross-correlation method using synthetic BOS images of buoyancy-driven turbulence and experimental images of the flow field in the exit plane of a converging–diverging nozzle.

2 Dot tracking methodology

A schematic of the dot tracking methodology is shown in Fig. 1. We first describe the standard tracking method, which consists of three steps: (1) particle identification, (2) sizing and centroid estimation and (3) tracking.

Fig. 1
figure 1

Schematic of the proposed dot tracking methodology for BOS

In standard tracking applications, the particles/dots in the image are isolated from the background using intensity thresholding and segmentation procedures. This can be done using a static intensity threshold or a dynamic threshold using a dilatation–erosion procedure, where the threshold is systematically varied to identify overlapping dots (Cardwell et al. 2011; Ohmi and Li 2000). The main limitation common to all these methods is the choice of the intensity threshold which can either lead to missed particles/dots if the threshold is high or falsely identified particles/dots if the threshold is low. This becomes especially problematic in cases with varying background illumination where the same threshold could be “high” in one part of the image with low illumination, and “low” in other parts of the image with higher background illumination. It also makes the method more error prone in the presence of image noise, due to noisy pixels being falsely identified as particles/dots.

Next in the sizing step, the geometrical properties (centroid and diameter) of the identified particles/dots are estimated to subpixel resolution. This can be accomplished using a variety of schemes ranging from a geometrical/intensity-weighted centroid to Gaussian subpixel fitting schemes such as the three/four point Gaussian fits and the least square Gaussian fit (Brady et al. 2009).

Finally in the tracking step, for each dot in the first frame, its corresponding match in the second frame is estimated using a nearest neighbor algorithm. While the nearest neighbor is typically defined as the dot in the second frame that lies closest to the estimated location of the dot in the first frame, it can be generalized using a multi-parametric approach where other properties of the dot such as the peak intensity and diameter can be included to define a weighted residual. The dot in the second frame having the lowest weighted residual and within a pre-defined search radius is defined as the match of the given dot in the first frame, and the dot displacement between the two frames is calculated (Cardwell et al. 2011).

The primary novel contribution of this work is to recognize and utilize in an optimal fashion the prior information about the dot pattern that is available from the target fabrication, and use this information to improve the overall accuracy and robustness of the method. In the identification step, instead of choosing an intensity threshold to separate from the dots from the background, we use the known location of the dots on the target and the mapping function of the camera (obtained from calibration) to project the dot locations on the image plane and create a window around this location. The mapping function of the camera can be determined using a calibration process, and a polynomial mapping function as proposed by Soloff et al. is used in this work (Soloff et al. 1997). The size of the window is chosen to be slightly larger than the diameter of the dot, where the dot diameter can either be specified beforehand based on the manufacturing details or can be calculated from the diameter of the cross-correlation peak (\(d_{\text{p}} = d_{\text{CC}} /\sqrt 2\)) (Raffel et al. 2013).

This window will contain pixels corresponding to the true dot as well as noisy pixels. To separate the dot from the noisy pixels, we use the dynamic segmentation procedure based on erosion–dilatation proposed by Cardwell et al. (2011) to segment the window of pixels to create pixel blobs. In cases where more than pixel blob is detected, we sort the pixel blobs based on their pixel area, peak intensity and distance of the peak from the predicted dot location. We calculate a weighted average of the three properties defined as,

$$C_{\text{p}} = \frac{{\left( {W_{A} \times \left( {\frac{{A_{\text{p}} }}{{\hbox{max} (A_{\text{p}} )}}} \right) + W_{I} \times \left( {\frac{{I_{p} }}{{\hbox{max} (I_{p} )}}} \right) + W_{\Delta x} \times \left( {1 - \frac{{\Delta x_{\text{p}} }}{{\hbox{max} (\Delta x_{\text{p}} )}}} \right)} \right)}}{{W_{A} + W_{I} + W_{\Delta x} }},$$
(1)

where \(A_{\text{p}} ,I_{\text{p}} ,\Delta x_{\text{p}}\) are the pixel area, peak intensity and distance, respectively, for the \(p{\text{th}}\) blob, and \(W_{A} ,W_{I} ,W_{\Delta x}\) are the associated weights. The pixel blob with the highest weighed average is considered to be the true dot and the pixels corresponding to the other blobs are set to zero. For the analysis reported in this paper, the weights were set to 1/3 (equally weighted), but these can be changed for other situations. Once the pixel map for the dot has been extracted, a centroid estimation procedure is performed based on subpixel fitting. An example of this procedure is shown in Fig. 2.

Fig. 2
figure 2

Illustration of the dot identification step using prior information about the dot location

While it is straightforward to see that this approach will work for the reference image (without density gradients), it will also work for the gradient image (with density gradients), because the dot displacements are generally very small (< 2 pixels). Hence, the actual location of the dot in the second frame will still be quite close to the predicted location, and since the window is taken to be larger than the dot diameter, it will be large enough to enclose the dot in the second frame as well. In situations where the displacements are greater, a hybrid tracking approach can be used where the displacements obtained from a coarse correlation pass can be used to estimate the location of the dot in the second frame. For the synthetic and experimental images considered in this paper, this was not required.

Further, the identification and sizing steps can be performed in an iterative manner to ensure that all the dots on the target have been located. This is done by creating a residual image at the end of each iteration by removing the intensity contribution from the identified dots, as shown in Fig. 1. The intensity of the residual image is given by,

$$I^{k + 1} = I^{k} - \mathop \sum \limits_{p = 1}^{{N_{p}^{k} }} I_{0,p} \exp \left[ { - \left\{ {\frac{{\left( {X - X_{p} } \right)^{2} + \left( {Y - Y_{p} } \right)^{2} }}{{2\eta_{p}^{2} }}} \right\}} \right],$$
(2)

where \(I^{k}\) is the image intensity after \(k\) iterations, \(p\) is the dot index, \(N_{p}^{k}\) is the number of dots identified in the kth iteration, and \(X_{p} ,Y_{p} ,\eta_{p}\) and \(I_{0,p}\) are the positions, diameter and the peak intensity of the pth identified dot. In this way, we are able to improve the accuracy of the method by avoiding incorrect matches and displacement errors due to failed identifications.

We also propose an improvement to the displacement estimation step after the dot matching procedure. Traditionally, the displacement is estimated by subtracting the centroids of the two matched particles/dots, but this is error prone because the subpixel fitting procedure is highly sensitive to noise leading to a large position error. This will in turn lead to increased errors in the calculation of the displacements, density gradients and the density field from 2D integration of the density gradients. Further, since the displacements in BOS experiments are typically low, this also severely limits the dynamic range of the measurement. To alleviate this problem, we perform a correlation of the intensity maps of the dots in the two frames to estimate the displacement, as the noise in the pixels is expected to be uncorrelated between the two frames. The intensity maps used are the ones obtained at the end of the identification process where the pixels corresponding to noise/other peaks have been zeroed out, to further improve the correlation signal to noise ratio. In addition, a minimum subtraction operation is also performed where the minimum intensity is taken from the dot window prior to zeroing out the noisy pixels. We refer to this step as a “correlation correction” and in this way we are able to combine the spatial resolution benefit of the tracking method with the noise robustness of the correlation method. As the correlation windows are small (~ 5 × 5 pixels), we perform this using a direct correlation computation without the use of FFT acceleration, to avoid windowing-based artifacts on the processing. This step is illustrated in Fig. 3.

Fig. 3
figure 3

Displacement estimation by correlating the intensity maps of the two matched dots

In the following sections, we will apply this tracking methodology to both synthetic and experimental BOS images and show a substantial improvement in the accuracy, precision and spatial resolution of the results.

3 Error analysis with synthetic images

To provide a baseline for comparing the performance of the correlation and tracking methods, an error analysis was first performed using synthetic images rendered with density fields obtained from direct numerical simulation (DNS) data of homogeneous buoyancy-driven turbulence performed by Livescu et al. (2014) and Livescu and Ristorcelli (2007), and available at the Johns Hopkins turbulence database (Li et al. 2008; Perlman et al. 2007). The flow involves sharp changes in density over small spatial regions, and hence provides a suitable test case for assessing the spatial resolution of the processing schemes.

3.1 Image generation methodology

The synthetic BOS images are rendered using a ray tracing-based image generation methodology described in more detail in Rajendran et al. (2019). The BOS experiment is simulated by generating light rays from the dot pattern and traced through the density gradient field and optical elements to the camera sensor. The trajectory of the light rays through the density gradient field is calculated by solving Fermat’s equation:

$$\frac{\text{d}}{{{\text{d}}\xi }}\left( {n\frac{{{\text{d}}\vec{x}}}{{{\text{d}}\xi }}} \right) = \nabla n,$$
(3)

using a fourth-order Runge–Kutta algorithm following established methods in gradient-index optics literature (Sharma et al. 1982; Brownlee et al. 2010). The refraction through the lens is modeled by Snell’s law and the diffraction pattern on the image sensor is modeled using a Gaussian distribution as in synthetic PIV image generation (Born and Wolf 1980; Raffel et al. 2007) The computationally intensive ray-tracing process is parallelized using graphics processing units (GPUs) and images rendered using this methodology display real-world features such as blurring and optical aberrations which can be adjusted in a controlled manner. This methodology has been tested and validated using known density fields (Rajendran et al. 2019). At the end of the ray-tracing simulations, the final light ray deflections on the camera sensor for all rays originating from a dot are averaged and used as ground truth for displacement of that dot. This process is repeated for all dots on the pattern to estimate the true displacements throughout the field of view.

Two-dimensional (x, y) slices of the flow field from five time instants were chosen, and for each time instant, a three-dimensional density volume was constructed by stacking the same two-dimensional slice along the z-direction, thereby ensuring that the gradient of density in the z-direction was zero. This was done to account for the depth integration limitation of BOS measurements and decouple it from the error analysis. Further, the density data was multiplied by \(1.225\) kg/m3 to simulate air and enclosed in a three-dimensional volume of size 32 mm × 32 mm × 10 mm.

Images of the density field at these snapshots are shown in Fig. 4, along with the density gradient, the theoretical light ray displacements and the light ray displacements from the ray-tracing simulations. The theoretical displacements were calculated by

$$\Delta \vec{X} = \frac{{MZ_{\text{D}} }}{{n_{0} }}\mathop \int \limits_{{z_{i} }}^{{z_{f} }} \nabla n {\text{d}}z \approx \frac{{MZ_{\text{D}} K}}{{n_{0} }} (\nabla \rho )_{\text{avg}} \Delta z,$$
(4)

where \(\Delta \vec{X}\) is the theoretical deflection of a light ray, \((\nabla \rho )_{\text{avg}}\) is the path-averaged value of the density gradient, \(K\) is the Gladstone–Dale constant, \(n_{0}\) is the ambient refractive index, and \(\Delta z\) is the thickness of the density gradient field (Raffel 2015). For the present simulations, the values of the parameters were \(M = 0.12\), \(Z_{\text{D}} = 0.25\;{\text{m}}\), and \(\Delta z = 10\; {\text{mm}}\).

Fig. 4
figure 4

Contours of density, density gradients, theoretical displacements and simulated light ray displacements for the five snapshots of DNS data used in the error analysis

To ensure that the synthetic image analysis is consistent with the experimental data to be shown in the following sections, we generated BOS images with a regular grid of dots on the target. Due to optical distortions, the final light ray locations will be scattered on a warped grid on the image plane corresponding to the image of the dots. The deflections at these locations are interpolated to a regular grid for displaying the figures shown in Fig. 4, where the contours of simulated light ray deflections are seen to correspond reasonably well to the theoretical displacements, and in both cases the regions of large displacements correspond to regions of large density gradients. The simulated light ray deflections will not match the theoretical displacements exactly, partly due to (1) small angle approximations used in the theory and (2) the spatial resolution limitation of the experimental setup due to the finite angle of a ray cone emerging from the target. Both of these are well-known characteristics of BOS experiments (Hargather and Settles 2012). However, these features are common to the images processed by both the correlation and tracking algorithms, and these simulated light ray deflections are considered as the ground truth for conducting the error analysis.

For the present simulations, the dot diameter was 3 pixels and the dot density was 20 dots per 32 × 32 pixels window. As dot patterns can be manufactured in a controlled manner for BOS experiments, we use dot patterns without overlapping dots. For each snapshot of the DNS, ten image pairs were rendered, and the images were corrupted with zero-mean Gaussian noise with a standard deviation of 1, 3 and 5% of the peak image intensity.

3.2 Results

The images were processed using both traditional cross-correlation and the dot tracking method described in Sect. 3. For the correlation, a multi-grid window deformation method was used with a window size of 32 × 32, followed by 16 × 16 pixels without window overlap. For the tracking method, a three-point Gaussian subpixel fit was used for centroid estimation as well as for the displacement estimation using the correlation correction. Then the errors in the final displacements were calculated using the light ray deflection from the ray tracing as the ground truth. Further, the errors were divided into two groups depending on whether the true displacement in that region was above or below a certain threshold. This was done to differentiate the errors due to background image noise, from errors due to lack of spatial resolution. The threshold was chosen to be half the standard deviation of the histogram of theoretical displacements. For each noise level, about 500,000 vectors were used in calculating the error distribution, to ensure statistical convergence of the results.

The CDF of the error distribution is shown in Fig. 5 for all the noise levels. For the case with zero noise, both tracking methods far outperform the correlation method, where nearly all the vectors have an error below 0.01 pixels as opposed to the correlation algorithm, where the error level corresponding to 90% of the vectors is over 0.1 pixels, which is an order of magnitude more than the tracking. Further, the error levels for the correlation are seen to be higher for vectors above the displacement threshold, as these lie in regions with sharp displacement gradients that cannot be captured by the correlation algorithm.

Fig. 5
figure 5

Error levels for the displacement and displacement gradient estimates obtained by the correlation and tracking methods

As the noise level increases, the errors for the tracking methods are seen to increase while they remain nearly the same for the correlation method. The main contribution to error in the tracking method is the position error from the centroid estimation, which is sensitive to image noise. However, the correlation method is robust to image noise in general, because the pixel noise across the two frames will be uncorrelated and hence have a lesser effect on the signal to noise ratio of the correlation plane.

The performance of the processing algorithms can be further understood from looking at the error distributions for the vectors above and below the threshold separately. For the higher noise levels, it is seen that the error from tracking approaches the error from correlation for vectors below the threshold, as the error in this region is dominated by position error due to image noise. However, the tracking methods still outperform the correlation method for vectors above the threshold, as the error in this region is dominated by spatial resolution requirements due to sharp displacement gradients in the flow field. The tracking methods are seen to be robust to this effect, with nearly the same noise levels for vectors both above and below the threshold.

Finally, it is seen that the tracking method with the correlation correction performs best even for the highest image noise as it combines the spatial resolution benefit of tracking and the smoothing effect of the correlation. This is particularly evident from Fig. 5g where it is seen that for vectors below the threshold, the noise level is so high that the pure tracking method performs poorer than the correlation; however, tracking with correlation correction still maintains the same error level as full correlation. For vectors above the threshold the tracking method with correlation correction is still able to maintain the high spatial resolution and performs best overall.

Also shown are the errors in the estimates of the gradient of displacements, corresponding to the second derivative of density. This quantity is needed to perform 2D integration of the density gradient field by solving the Poisson equation, which requires the calculation of the Laplacian of the density field (Venkatakrishnan and Meier 2004). Again, the dot tracking methods far outperform traditional cross-correlation for all noise levels both above and below the threshold, possibly because the displacement gradient is even more sensitive to the spatial resolution of the schemes.

The results of this analysis using synthetic images of physically realistic flow fields demonstrate that the proposed tracking approach, with non-overlapping dots, a priori identification and correlation correction provides a significant reduction in error compared to the conventional cross-correlation method as well as a large improvement in the spatial resolution for flow fields with sharp density gradients.

4 Application to experimental images of flow exiting a converging–diverging nozzle

The tracking methodology was also applied to visualize the exit plane of a converging–diverging nozzle for various pressure ratios. This flow field was chosen because of the presence of shocks, expansion fans and other interesting small-scale features that appear at high-pressure ratios, and serve as a good assessment of the spatial resolution offered by the algorithms. The nozzle geometry, along with the experimental layout and a sample image of the target, is shown in Fig. 6. A regular grid of dots was printed on a transparency and back-illuminated with an LED to serve as the dot pattern. The dots were 0.15 mm in diameter and had a spacing of 0.15 mm, designed to provide a dot diameter of 3–4 pixels to improve the subpixel position estimation, and a dot spacing of about 6–8 pixels to have about 15–20 dots in a 32 × 32 window for high spatial resolution. The chamber pressure was varied from 0 to 60 psi in steps of 5 psi, while the exit pressure was maintained at atmospheric conditions (14.7 psi). For each pressure condition, the flow was allowed to reach steady state before capturing the images. The images were recorded using a PCO Pixelfly camera and a zoom lens set at a focal length of 32 mm. A sample zoomed-in image of the dot pattern for one of the cases shows the sharp displacement gradients involved in this flow field. The changes in displacements happen over a very short length scale, leading to blurring of the dot images. Therefore, this case serves as a good test to gauge the spatial resolution increase obtained by the tracking method.

Fig. 6
figure 6

Details of the experimental setup used to visualize the flow in the exit plane of a converging–diverging nozzle

The images of the dot pattern with and without the flow were analyzed using the tracking and correlation methods described before. For correlation, the images were processed using a two-pass window deformation approach (Scarano 2002) with 32 × 32 pixels interrogation windows with 50% overlap, and with smoothing and universal outlier detection (UOD) (Westerweel and Scarano 2005)-based validation for the first pass. The final pass results are validated by a threshold validation of 3 pixels displacement. The interrogation window size was chosen to 32 × 32 pixels to ensure that a sufficient number of dots were contained in an interrogation window for measurement reliability (Keane and Adrian 1992). For tracking, to initialize the dot identification procedure, the dot locations on the target were calculated using a third-order mapping function of the imaging system proposed by Soloff et al. (1997) to account for higher-order lens distortions. As the dot pattern used in the experiment resembles a typical calibration target albeit with a higher number of dots, the mapping function of the imaging system was first calculated using the position of every fourth dot in the image, obtained using an intensity-weighted centroid-based subpixel estimation scheme to reduce computational effort. Further, as there is no out of plane motion in BOS measurements, the mapping function was only calculated based on one z-plane. Based on the mapping function, the locations of all the intermediate dots were calculated and used to initialize the multi-parametric dot identification procedure with the dynamic segmentation, and the centroids were estimated using a least square Gaussian subpixel fit. At the end of the tracking procedure, the correlation correction was performed on the tracks and the subpixel estimation on the correlation plane was again performed using a least square Gaussian fit. The displacement contours for two chamber pressures are shown in Fig. 7.

Fig. 7
figure 7

Flow in the exit plane of a converging–diverging nozzle obtained from the different processing methods. Left column is for a chamber pressure of 30 psig, and right column is for 55 psig. a, b Correlation, c, d tracking without correlation correction, e, f tracking with correlation correction, g line plot of displacements along X for Y = 600 pixels, h line plot of displacements along Y for X = 500 pixels

From the displacement fields, it can be seen that the results from the tracking analysis shown in Fig. 7c–f better capture small-scale features of the flow as compared to the correlation results shown in Fig. 7a, b, which appear highly smoothed. Further it is seen that the tracking with correlation correction, shown in Fig. 7e, f, provides a smoothing of the noisy displacement field compared to Fig. 7c, d while maintaining the high spatial resolution. The increase in spatial resolution is also evident from the line plots shown in Fig. 7g, h, where tracking is able to better capture the sharp jumps in the displacement field.

To quantify the improvement offered by the tracking-based methods, statistical analysis was performed to estimate the dynamic range of the displacement gradients measured by the three processing methods. The displacement gradients are calculated in the post-processing of BOS data to perform density integration, and are sensitive to the spatial resolution of the measurements. For the tracking results, the displacements were first interpolated onto a regular grid using a natural neighbor interpolation based on Delaunay triangulation (Sibson 1981), with the grid spacing chosen to be 8 pixels corresponding to the dot spacing in the images. The displacement gradients for all three methods were estimated using a noise-optimized fourth-order compact Richardson finite difference scheme proposed by Etebari and Vlachos (Etebari and Vlachos 2005).

Figure 8 shows the PDF and CDF of displacement gradients evaluated over the entire field of view for both pressure conditions using the three processing methods. The flow fields considered here exhibit sharp displacement gradients confined to small portions of the field of view. Therefore, a successful processing methodology must capture both the large displacement gradients in the regions with the shocks and expansion fans, as well as the extended zero displacement regions, due to high spatial confinement of these features. Observing both figures, it can be seen that the range of displacement gradients measured by the correlation-based method is lower than the tracking methods due to a lack of spatial resolution. It can be also seen that the pure tracking method results in a very broad histogram with a short peak at 0. This is a direct result of the effect of image noise on the subpixel centroid estimation as well as due to dot blurring, and hence differences in displacements between successive dots due to intensity fluctuations are also being picked up as displacement gradients. On the other hand, the tracking method with correlation correction is able to maintain both a strong peak at 0, and provide a large displacement gradient range at the same time.

Fig. 8
figure 8

Distribution of displacement gradients in the field of view for both flow fields obtained by the three processing methods

Further, the dynamic range of the measurements is also calculated as the ratio of the maximum displacement gradient to the minimum resolvable displacement gradient of the method. The maximum displacement gradient is calculated from the experimental data and the minimum displacement gradient, which represents the noise floor of the measurements, is estimated from the error analysis presented in Sect. 3.2 for each processing method. The error analysis results are used to estimate the noise floor because a ground truth of the given flow field is not available for estimating an error. The noise floor is defined as the root mean square (RMS) of the displacement gradient error corresponding to the vectors below the threshold, and the errors corresponding to the highest image noise level (= 5%) are used for this calculation, as this noise level was representative of the experimental images and provides a conservative estimate. The results in Table 1 show that the tracking methods offer a large improvement in the dynamic range as compared to the standard cross-correlation method. While the pure tracking method results in an improved spatial resolution as seen in Fig. 7, it also suffers from a higher noise floor, but the correlation correction is able to minimize this effect and achieve a fourfold improvement in the dynamic range as compared to the standard correlation.

Table 1 Dynamic range of the displacement gradients obtained using the three processing methods

Overall, the dot tracking methodology with identification based on prior dot location and correlation correction appears to be more reliable when applied to BOS experimental data using dot patterns of high dot densities, while also increasing the spatial resolution of the measurements. The method is able to resolve displacements in regions with sharp gradients, while simultaneously maintaining a low noise floor, resulting in a fourfold improvement in the dynamic range. While it is possible that the results from the standard correlation analysis can be improved by using smaller windows and increased window overlap, adjacent vectors will still have overlapping information and do not constitute independent information. Further, the interrogation windows need to be centered on the dot centroids to avoid clipping the dot image and introducing Fourier transform-based errors due to aliasing and spectral leakage (Eckstein and Vlachos 2009).

5 Conclusions

In this paper, we proposed a dot tracking methodology for processing BOS images with high dot density based on two features of BOS experiments: (1) low displacements (2–3 pixels) and (2) availability of prior information about dot locations and size from manufacturing. We use the prior information about the dot locations to perform dot identification and sizing without the need for an intensity threshold, making the method more robust to image noise. We also proposed an improvement to the final displacement estimation, where we correlate the intensity maps of the matched dots instead of subtracting their centroid locations, to improve the performance in high noise situations. In this way, we are able to combine the high spatial resolution benefit of tracking with the noise robustness property of correlation methods.

We analyzed the performance of this method and compared it to the conventional cross-correlation algorithm using synthetic and experimental BOS images. For synthetic BOS images of buoyancy-driven turbulence, the tracking methods far outperformed the correlation method especially with low image noise and in regions with a requirement for high spatial resolution. For higher noise levels, the errors in the tracking algorithms increased due to the position error from the subpixel fit being sensitive to image noise; however, the tracking method with the correlation correction at the end was robust to this effect, as the final displacement estimation does not depend on the centroid estimation process, and performed best overall. For experimental BOS images of the flow field in the exit of a converging–diverging nozzle, the tracking methods were able to resolve sharp changes in the density field in the presence of shocks and expansion fans, and improved the dynamic range in the displacement gradient measurement.

The proposed method is applicable to BOS experiments which involve small dot displacements (2–3 pixels or < dot spacing), and where the targets are fabricated in a controlled manner such that the dot locations are known. This opens up a new processing paradigm for BOS measurements using dot tracking methods, and helps in improving the spatial resolution limitation of BOS in comparison to qualitative schlieren measurements. This will enable improved investigation of flows with small-scale features such as shocks, expansion fans and small-scale compressible turbulence.

A limitation of the spatial resolution improvement offered by the tracking method is in situations where there are strong displacement gradients on a scale equal to or less than the dot diameter itself, which will lead to blurring of the dot image as seen in Fig. 6d. In this case, the dot tracking method can only provide an average displacement in this region. Therefore, further improvements in the methodology can include a method to extract additional information about the displacement/density gradient field from the blurred shape of the dot. It is likely that the blurring is related to second-order gradients of the density field.

Another limitation of the method is that it requires non-overlapping dots to reduce position errors in the identification and sizing process. In situations where the dot pattern cannot be manufactured in a controlled manner, the traditional correlation-based approach may be preferable. The correlation-based algorithms may also perform better when used with very dense or speckle-type dot patterns, thus providing the ability to use smaller interrogation windows. However, the dot patterns still need to be on the diameter of about 3 pixels for accurate subpixel fitting, and hence this places a limit on the maximum achievable dot density. It is not clear if the correlation algorithms with speckle patterns and small windows can achieve the same spatial resolution as the tracking-based method with dense non-overlapping dots.

Finally, a code package implementing the dot tracking method proposed in this paper is available at: https://github.rcac.purdue.edu/lrajendr/dot-tracking-package, so that all readers can assess the contribution and benefit from it.