# Parametric Study to Improve Subpixel Accuracy of Nitric Oxide Tagging Velocimetry with Image Preprocessing

Authors: Ravi Teja Vedula; Mayank Mittal; Harold Schock
Journal: Journal of Combustion
 (2017)

---

## Abstract

Biacetyl phosphorescence has been the commonly used molecular tagging velocimetry (MTV) technique to investigate in-cylinder flow evolution and cycle-to-cycle variations in an optical engine. As the phosphorescence of biacetyl tracer deteriorates in the presence of oxygen, nitrogen was adopted as the working medium in the past. Recently, nitrous oxide MTV technique was employed to measure the velocity profile of an air jet. The authors here plan to investigate the potential application of this technique for engine flow studies. A possible experimental setup for this task indicated different permutations of image signal-to-noise ratio (SNR) and laser line width. In the current work, a numerical analysis is performed to study the effect of these two factors on displacement error in MTV image processing. Also, several image filtering techniques were evaluated and the performance of selected filters was analyzed in terms of enhancing the image quality and minimizing displacement errors. The flow displacement error without image preprocessing was observed to be inversely proportional to SNR and directly proportional to laser line width. The mean filter resulted in the smallest errors for line widths smaller than 9 pixels. The effect of filter size on subpixel accuracy showed that error levels increased as the filter size increased.


---

## Body

## 1. Introduction

Flow field inside the engine cylinder is one of the most important factors controlling the fuel combustion process and hence engine performance [1, 2]. This realization arises in the automotive engine community after attaining relatively significant knowledge on in-cylinder flows and their cycle-to-cycle variations in the past few decades, while noticing the occasional dominance of the high-speed fuel spray in preparation of combustible air-fuel mixture [3–5]. Flow measurement techniques such as laser Doppler velocimetry (LDV [6–9]), particle image velocimetry (PIV [10–15]), and molecular tagging velocity (MTV [16]) continue to play a crucial role in understanding in-cylinder flows of an automotive engine. Effective quantitative details such as in-cylinder flow velocity, velocity root-mean-square (rms), circulation, and turbulent length and time scales are being made possible from such advanced measurement techniques. Magnetic resonance imaging is yet another technique, majorly used in medical field, which has been recently employed for engine flow studies in the form of magnetic resonance velocimetry (MRV) [17–19]. A major advantage of MRV is that optical access is not needed for data acquisition, allowing it to be used for flow imaging in highly complex geometries. Molecular tagging velocimetry offers multipoint, planar measurements demanded for engine flow studies, overcoming the single-point measurement issues of LDV and hot-wire anemometry. The number of particle images per interrogation region or the particle image density is an important parameter that affects the PIV measurement uncertainty [20, 21]. Particle image density sometimes increases as the chamber volume decreases during piston compression. This would heighten the probabilities of increase in particle size and correlation peak uncertainty; the particle size increases due to agglomeration and/or thermal expansion due to higher temperatures [12]. Having mentioned these uncertainties, there are several PIV-based works that captured the velocity field throughout the engine cycle [22, 23]. Nevertheless, MTV is relaxed from maintaining such desired levels of particle image density as seen for PIV within the temporally varying cylinder volume due to piston motion. Another point to note is occasionally in PIV; the particles cannot follow the flow when the flow motion undergoes high spatial and temporal acceleration [24]. Fulfilling the Stokes number condition Sk<0.1 [16] could be an option for verifying the flow-following capability. However, a study showed that the particles tracked the flow properly even when the Sk value was greater than 0.1 and only failed to follow for measurements in the Taylor length scale [25]. A brief overview with several applications of MTV for engine flow studies is given in [26]. MTV is a flow measurement technique that is based on one of the two luminescence principles: phosphorescence and fluorescence. In the phosphorescence technique, a pulsed laser marks a pattern on excitation of the phosphorescent molecules (premixed or inherent) in the flow. The long-lived phosphorescence of these tracers is captured at two instants of time (undelayed, time zero; delayed, time Δt). In the fluorescence technique, a “write” laser photodissociates the seeded or inherent molecule in the flowing medium. The new photoproduct is excited with another “read” laser and the corresponding fluorescence is captured at two instants of time (undelayed and delayed). The Lagrangian displacement vector evaluated within a known time span provides the flow velocity. By using a collection of tagged lines instead of a laser sheet, spatial resolution of MTV could be controlled to some extent with the MTV grid spacing while taking into account other factors such as the laser line width and optics arrangement. Also, using laser lines reduces the amount of wall reflections due to reduced number of photons per unit area, impinged on the optical window or the liner.Biacetyl has been demonstrated to be an elegant molecular tracer for flow measurements mainly due to its longer phosphorescence lifetime which allows measuring both high and low speed flows. Epstein developed a new quantitative flow visualization technique using biacetyl as the seeder to measure the time resolved, three-dimensional flow in a transonic compressor rotor [27]. Hiller et al. [28] demonstrated the applicability of biacetyl as a molecular tracer for laser-marking method for velocity measurements in gas flows. Biacetyl phosphorescence MTV was used for several in-cylinder swirl and tumble flow studies in an optical engine. Phosphorescence MTV with biacetyl tracer suffers from quenching due to O2. Hence the engine flow studies using biacetyl phosphorescence adopted N2 as the working medium, assuming that it represents the air motion. Such an assumption is worthwhile, and this technique offered planar and three-dimensional whole field detection of in-cylinder flows and their cycle-to-cycle variations using molecule as the seed [29–31]. Nevertheless, an analysis of in-cylinder flows using air as the working fluid would be more convenient than using nitrogen based system, especially at low manifold pressures. Nitric oxide (NO) tagging velocimetry has been in use for measuring high-speed air flows without exhibiting any major quenching effects [32, 33]. This MTV technique is a fluorescence-based type wherein a seed molecule is photodissociated to create NO line(s). On identifying the usage of toxic gases as the conventional seed molecules for NO MTV, Elbaz and Pitz [34] employed nitrous oxide (N2O) as the seed to create N2O-to-NO tag lines. Nitrous oxide, also called “laughing gas,” is nontoxic and sometimes used as an aerosol agent in foods. Based on the photodissociation chemistry of N2O, both the initial amount of N2O seeded and the fraction which is dissociated to NO would determine the signal-to-noise ratios (SNRs) of the resulting grid images. The laser energy density (J/cm2) as required to achieve desired levels of N2O dissociation demands maximum energy utilization, starting from the laser output. Furthermore, maintaining a uniform energy density for multiple beams to construct a sufficiently dense MTV grid would determine the thickness of the laser lines. For instance, an excitation beam of 5 mJ and 0.47 mm nominal diameter was used to obtain 25% dissociation of N2O in 4% N2O-air mixture [34]. The same energy density (~3 J/cm2) could be achieved with a beam of 2.3 mJ and 1 mm nominal diameter assuming all the other parameters to be constant.Spatial correlation technique [35] has been the standard method employed to correlate undelayed and delayed MTV images of in-cylinder flows and thereby determine the corresponding Lagrangian displacement vector. Instead of a direct cross correlation coefficient I1·I2- as used for PIV image processing [36], a normalized direct cross correlation or the spatial correlation coefficient is used for MTV images and is written as(1)R=I1·I2--I1-·I2-σI1σI2,where the overbar is for expected value, I is the intensity field, and σ is the standard deviation. Subscripts 1 and 2 represent source window (on undelayed image) and roam window (on delayed image) for MTV and interrogation spots at two recording times for PIV.An illustration of this data processing method is included later in this work. The spatial correlation function is discrete and the flow displacement is computed with single pixel resolution. Hence, a fitting polynomial is used for correlation values in the vicinity of its peak to attain subpixel accurate displacements. Accuracy of MTV measurements for engine flow studies was previously reported to be within 0.1 pixels, (i) using spatial correlation technique in a steady flow rig model [37] and (ii) using spatial correlation in combination with a decoupled technique [38] for in-plane velocity component of stereoscopic measurements [31].Having realized the potential application of N2O MTV for in-cylinder air flow studies, the authors here investigated the effect of image SNR and laser line width (LW) on the subpixel accuracy of flow displacements. Several image filtering techniques are evaluated, and the performance of selected filters is analyzed in terms of error reduction. The current study builds on the work of [35, 39]. Effect of factors such as image SNR, contrast enhancement, laser line width, and source window size (related to MTV’s spatial correlation technique) on subpixel accuracy was studied in [35]. Effect of image preprocessing on displacement error reduction was analyzed using image filters in [39]. Caso and Bohl [39] utilized multiple filter techniques for image preprocessing; however, the results of only mean and sigma (modified mean) filters were presented. The current work reproduces some of the results obtained in the above two works while discussing in more detail the performance of various image filters in enhancing the image quality and MTV error reduction. These discussions will be corroborated with visual demonstrations and graphical results. Although the prime motive is to assess the requirements to develop an N2O MTV measurement system for engine flow studies, this analysis work is applicable to any 2D-MTV (grid pattern) technique in general. Synthetic images were generated to perform these studies, and the details of the generation process are discussed in the next section.


## 2. Methods: Synthetic Image Generation and Image Filtering Techniques

MTV technique requires that a pair of images (undelayed image at the initial time,t1=t, and delayed image at the later time, t2=t+Δt) be acquired during the luminescence lifetime of the molecular tracer. The first (or undelayed) image, representing a region of tagged flow, was simulated by laying down an 8 × 13 grid of Gaussian profile “laser lines” as shown in Figure 1. It should be noted that the excimer laser outputs a rectangular beam having a top-hat intensity profile along one axis and a Gaussian profile along the other. Depending on the axis chosen for reducing the beam into a sheet, the laser lines can be considered to be of Gaussian profile. In addition, it was observed previously that the error magnitude was higher for Gaussian profile than for non-Gaussian profile [35]. Hence, Gaussian profile laser lines are implemented for the current study to investigate the performance of image filters under limited experimental optimizations. These lines were characterized by w (note that, in the present work, line width corresponds to 2w+1 pixels) their peak intensity, Imax, and the location of the line center, d, via(2)I=Imaxexp-d2/w2.In the present work, Imax was fixed at 80 counts and a uniform background intensity of 30 counts was added to the image to simulate nonzero black levels typically seen in intensified CCD cameras. This led to a maximum intensity of 190 counts where the lines intersected. The second (or delayed image), representing the tagged region at the later time, was generated by displacing the laser lines of the original image by a known displacement vector. This simulation strategy was used in prior studies; see, for example, [35, 39]. In this work, Gaussian white noise was added to both undelayed and delayed simulated images, and then the pixel intensities were scaled to achieve the desired contrast. Caso and Bohl [39] also added the same level of noise to both undelayed and delayed simulated images for a more accurate reflection of real-world conditions. As demonstrated using Figures 1(a) and 1(b), the magnified view of a chosen section of the whole image showed more clearly the details of signal and noise distributions. Hence, hereafter this magnified region of the original images is considered in discussion.Figure 1
(a) Simulated undelayed image having an8×13 MTV grid and (b) zoomed-in view of the highlighted region in (a).
(a) (b)Signal-to-noise ratio is one of the crucial image features that determine the accuracy of flow parameters in techniques such as particle image velocimetry and molecular tagging velocimetry. As the name indicates, optical SNR can be described as the ratio of photon signal to the noise present around this signal. One of the ways to determine the image SNR is by using a reference image [40]. In the absence of a reference image, determining SNR becomes more challenging and uncertain due to unavailability of a source for comparison. This situation is more applicable in MTV or any other experimental techniques. In such cases, considering a local neighborhood of a pixel would be the preferred way of detecting probable presence of noise and thereby evaluating SNR value. The neighborhood of a pixel can be sampled in several ways, among which the 4-connected and 8-connected neighborhood are most commonly used [41]. In the 4-connected neighborhood, the signal and noise are considered at 4 pixels that are adjacent to the edges of a central pixel (Figure 2(a)). Additionally, diagonal pixels are included in the 8-connected neighborhood (Figure 2(b)).Figure 2
Pixels highlighted in (a) 4-connected neighborhood and (b) 8-connected neighborhood around a chosen central pixel.
(a) (b)The pixel-wise SNR values were determined at the central pixels of the 8-connected neighborhood window and in the end were averaged to obtain the pixel-mean SNR of the whole image. The default definition used here for SNR was(3)SNR=meanAP×QstandarddeviationAP×Q,where AP×Q is the pixel intensity matrix of size P×Q.The SNR of an image in general can be enhanced using different image filtering techniques. These techniques make use of either spatial filters, for example, mean, median, sigma, and Wiener filters, or frequency filters, for example, ideal pass, Gaussian, and Butterworth filters [42, 43]. Selected filters were applied to the simulated images and their effectiveness in enhancing the image SNR was evaluated.


### 2.1. Spatial Filters

A spatial filter replaces the value at a given pixel with an operand value (mean, median, threshold-based sigma, etc.) of all pixels within a selected neighborhood. Several types of mean filters such as arithmetic mean, contraharmonic mean, and alpha-trimmed mean filters were tested on the simulated images (not shown here). It was observed that the arithmetic mean filter was more effective in noise removal in the current images compared to the other two. Hence, the arithmetic mean was chosen to analyze the performance of the mean filter. Figures3(a)–3(d) show the original image and the preprocessed images obtained by applying various spatial filters. The corresponding SNR values evaluated from (3) were noted above these images. As seen in the mean-filtered image (Figure 3(b)), a significant amount of noise was removed from the highly noisy image (Figure 3(a)). However, the averaging of signal intensities resulted in a relatively darker or low intensity grid; grid nodes in the mean-filtered image are notably dimmer than in the original image. The filtered image SNR value increased which could suggest that the mean filter was effective in noise removal.Figure 3
(a) Original, (b) mean-filtered, (c) median-filtered, and (d) Wiener-filtered image. Here LW = 9 pixels.
(a) (b) (c) (d)In general, median filters are known for removing the impulse noise or “salt-and-pepper” noise. This is apparent when Figure3(c) is compared with Figures 3(a) and 3(b). The median filter remarkably removed the noise present in the line-to-line gap (or void region), black/clean regions compared to spotted regions in Figure 3(a) and shaded regions in Figure 3(b). Another advantage of median filter over mean filter is that the former prevents or minimizes significantly the smoothening of the actual signal intensities especially as apparent here at the grid nodes. However, the laser lines in the median-filtered image were nonuniform, with additional intensities randomly appended. This latter feature of random intensity addition can be attributed to the original noise and might have been detected by the MATLAB code as signal intensity, thereby resulting in a higher SNR value. Similar to the median filter, the Wiener filter could remove noise in the void regions (in Figure 3(d)). However, the noise overlaid on the actual lines was not removed completely and is visually apparent; see Figure 3(d). The higher SNR of the Wiener-filtered image might be again due to the falsification of noise as signal intensity. These visual observations will be revisited in Section 4.2 to assess quantitatively the performance of these filters in reducing the measured displacement errors.


### 2.2. Frequency Filters

While spatial filtering techniques are applied in the spatial domain, frequency filtering techniques are applied to the image of interest in the frequency domain. The idea here is to process the raw images by analyzing the gradient of intensities, that is, the rate of change of a chosen intensity level in the frequency domain. This is attained using the convolution theorem, which states that the Fourier transform of the product of two functions in the spatial domain is the convolution of the transforms of the two functions in the frequency domain. In general, noise signals have peak frequency values due to sharp intensity transitions and hence a low-pass filter is preferred for noise removal [42]. Commonly used low-pass frequency filters are the ideal pass filter, Gaussian filter, and Butterworth filter. For the current study, the Gaussian filter was considered due to the well-known “ringing” effect of ideal pass filter and itself acting as a special case of Butterworth filter. Given that the simulated images were generated by adding a Gaussian white noise, the performance of the Gaussian filter in error reduction could be considered as a reference to assess the performance of other filters. Figure 4 shows the performance of the Gaussian filter with a cut-off frequency of 50 Hz on the highly noisy image. As expected, the filtered image (Figure 4(b)) contained minimal noise levels both at the void regions and along the MTV lines. Also, the intensities at the grid nodes and along the lines are brighter with the Gaussian filter when compared to those in the mean-filtered image (included in Figure 4(c) for ease in comparison). With the Gaussian Fourier transform, a threefold increase in image SNR value was noted compared to the original image.Figure 4
(a) Original image, (b) filtered image after applying the Gaussian filter, and (c) mean-filtered image. Here LW = 9 pixels.
(a) (b) (c)


## 2.1. Spatial Filters

A spatial filter replaces the value at a given pixel with an operand value (mean, median, threshold-based sigma, etc.) of all pixels within a selected neighborhood. Several types of mean filters such as arithmetic mean, contraharmonic mean, and alpha-trimmed mean filters were tested on the simulated images (not shown here). It was observed that the arithmetic mean filter was more effective in noise removal in the current images compared to the other two. Hence, the arithmetic mean was chosen to analyze the performance of the mean filter. Figures3(a)–3(d) show the original image and the preprocessed images obtained by applying various spatial filters. The corresponding SNR values evaluated from (3) were noted above these images. As seen in the mean-filtered image (Figure 3(b)), a significant amount of noise was removed from the highly noisy image (Figure 3(a)). However, the averaging of signal intensities resulted in a relatively darker or low intensity grid; grid nodes in the mean-filtered image are notably dimmer than in the original image. The filtered image SNR value increased which could suggest that the mean filter was effective in noise removal.Figure 3
(a) Original, (b) mean-filtered, (c) median-filtered, and (d) Wiener-filtered image. Here LW = 9 pixels.
(a) (b) (c) (d)In general, median filters are known for removing the impulse noise or “salt-and-pepper” noise. This is apparent when Figure3(c) is compared with Figures 3(a) and 3(b). The median filter remarkably removed the noise present in the line-to-line gap (or void region), black/clean regions compared to spotted regions in Figure 3(a) and shaded regions in Figure 3(b). Another advantage of median filter over mean filter is that the former prevents or minimizes significantly the smoothening of the actual signal intensities especially as apparent here at the grid nodes. However, the laser lines in the median-filtered image were nonuniform, with additional intensities randomly appended. This latter feature of random intensity addition can be attributed to the original noise and might have been detected by the MATLAB code as signal intensity, thereby resulting in a higher SNR value. Similar to the median filter, the Wiener filter could remove noise in the void regions (in Figure 3(d)). However, the noise overlaid on the actual lines was not removed completely and is visually apparent; see Figure 3(d). The higher SNR of the Wiener-filtered image might be again due to the falsification of noise as signal intensity. These visual observations will be revisited in Section 4.2 to assess quantitatively the performance of these filters in reducing the measured displacement errors.


## 2.2. Frequency Filters

While spatial filtering techniques are applied in the spatial domain, frequency filtering techniques are applied to the image of interest in the frequency domain. The idea here is to process the raw images by analyzing the gradient of intensities, that is, the rate of change of a chosen intensity level in the frequency domain. This is attained using the convolution theorem, which states that the Fourier transform of the product of two functions in the spatial domain is the convolution of the transforms of the two functions in the frequency domain. In general, noise signals have peak frequency values due to sharp intensity transitions and hence a low-pass filter is preferred for noise removal [42]. Commonly used low-pass frequency filters are the ideal pass filter, Gaussian filter, and Butterworth filter. For the current study, the Gaussian filter was considered due to the well-known “ringing” effect of ideal pass filter and itself acting as a special case of Butterworth filter. Given that the simulated images were generated by adding a Gaussian white noise, the performance of the Gaussian filter in error reduction could be considered as a reference to assess the performance of other filters. Figure 4 shows the performance of the Gaussian filter with a cut-off frequency of 50 Hz on the highly noisy image. As expected, the filtered image (Figure 4(b)) contained minimal noise levels both at the void regions and along the MTV lines. Also, the intensities at the grid nodes and along the lines are brighter with the Gaussian filter when compared to those in the mean-filtered image (included in Figure 4(c) for ease in comparison). With the Gaussian Fourier transform, a threefold increase in image SNR value was noted compared to the original image.Figure 4
(a) Original image, (b) filtered image after applying the Gaussian filter, and (c) mean-filtered image. Here LW = 9 pixels.
(a) (b) (c)


## 3. MTV Data Processing

As discussed earlier, analyzing the effect of image SNR and laser line width on MTV subpixel accuracy is crucial when employingN2O MTV for in-cylinder flow studies. The MTV grid displacements have been attained at subpixel accuracy level using a combination of spatial correlation techniques and polynomial fitting [38]. As seen in Figure 5, there is an undelayed image (a) taken immediately (O~ns) after the photon impingement by laser and the delayed image (b) taken after allowing the flow to move (O~μs). The small solid square is the source window, covering only one grid node in the undelayed image. The principle is to obtain the displacement at each grid node, thereby resulting in a global Lagrangian displacement vector. As seen clearly from this figure, the grid node covered by the source window on the undelayed image is displaced, due to flow motion, to a new location (see smaller solid square on the delayed image on the right). Also, there is a larger dashed square, called roam window, marked surrounding the solid square on the delayed image. This roam window is concentric to the source window’s center located on the undelayed image. To show such concentricity, a dotted square is introduced in Figure 5(a); in actual processing, there is no dotted square window applied on the undelayed image.Figure 5
(a) and (b): undelayed and delayed MTV images, showing source (solid squares) and roam (dashed square) windows. Adapted from [35].
(a) (b)A spatial correlation coefficient,Rr,s, is determined between the intensity field I1 of the source window and I2 of the roam window as a function of pixel displacement r,s between them. From the obtained array of R(r,s), the maximum value represents the location of the displaced source window and, hence, the grid node. Figures 6(a) and 6(b) show sample pixel intensities of a section of undelayed and delayed MTV images. A 7×7 source window, as highlighted in Figure 6(a), has its center at row R8 and column C8 with pixel intensity of 255 (grayscale maximum value). This pixel represents the intersection of two laser lines or in other words the central pixel of an MTV grid node. On correlating the intensity field of source window and a roam window (size of 15×15 in this case) on the delayed image, the window highlighted in Figure 6(b) is determined to correlate well (Rmax = 0.9984). Hence for this example, the tagged flow moved two pixels in bothX andY directions as indicated by the new window centered at (R10, C10).Figure 6
Illustration of spatial correlation technique: (a) a7×7 source window with center at (R8, C8) on the undelayed image and (b) highlighted window on the delayed image whose intensities correlate best with those of source window. Thus the tagged region is displaced two pixels in X and Y direction with the center at (R10, C10); correlation coefficient peak Rmax=0.9984.
(a) (b)From the illustration above, it is expected that the source window should contain sufficient intensity gradients in order to attain more accurate correlations. Such a displacement obtained is of pixel accuracy. In order to obtain the desired subpixel accuracy, the spatial correlation technique includes a higher-order polynomial fitting about the correlation peak of theR matrix. For each simulated case in the present work, one undelayed image (total 104 grid nodes formed by 8 horizontal and 13 vertical laser lines) and five delayed images were considered. This provided in total 1040 grid displacements in the X and Y directions for each case. A source window of 27×27 was chosen for evaluating the synthetic image displacements. The rms error of displacement was defined as follows:(4)rmserror=stdevDispX+stdevDispY2,where DispX and DispY are the MTV grid node displacements in the X and Y directions obtained from the correlation technique and stdev is the standard deviation. In addition, the statistical error quoted as the 95% error level or confidence level of displacement [39], (5)95%Error  level=DispX_meas-DispX_actual2+DispY_meas-DispY_actual2,was used for the current analysis. Here subscripts “meas” and “actual” represent the values obtained from spatial correlations and the original values used to create the synthetic images.


## 4. Results and Discussion

### 4.1. Effects of SNR and Line Width on Subpixel Accuracy without Filtering

Figure7 shows the sample of original undelayed images (partial grid taken from the whole 8 × 13 grid) for various SNR values with a laser line width of 11 pixels. Image SNRs showed values from 2.5 to 1.2 for a to i without filtering. As will be discussed later, the SNR values changed when the images were preprocessed using various filters. Hence, for suitable comparisons and a consistency in the discussion, the SNR values are designated alphabetically while the numerical values are mentioned wherever appropriate. The SNR values for biacetyl MTV images captured in previous engine flow studies usually ranged from 7 to 15 (values based on (3)), with a laser line width of about 11 pixels. Simulating the image noise is complex due to various sources of noise seen in the actual experimental images such as shot, dark current, hot pixel, and readout noises [44]. Also, the fluorescence yield of the nitric oxide molecules as seen in N2O MTV depends on several factors. Some of these factors are the read laser energy, in-cylinder air pressure and temperature, and the NO number density. Considering all the aforementioned signal and noise uncertainties possible with N2O MTV, the current work investigates the worst case scenario by simulating images with much lower SNRs than those seen with experimental biacetyl MTV images. The effect of SNR on rms displacement error (see (4) and without filtering) is shown in Figure 8. Few spurious correlations as detected for images with SNR h and i were removed from the error calculations. The rms displacement error without filtering rapidly decreased until the image SNR was greater than 1.6, followed by a gradual decline as the image SNR was increased further.Figure 7
Synthetic images of various SNR values with LW = 11 pixels.Figure 8
Effect of image SNR on rms displacement error without filtering using 15 × 15 and 27 × 27 source window sizes. Here LW = 11 pixels.To analyze the effect of line width on displacement accuracy, synthetic images were generated with different LWs (i.e., 3 to 15 pixels) for a given noise level. It should be noted that, for the same level of noise, SNR value increased with the increase in line width. For example, in the case of SNR f, SNR value increased from 1.5 to 1.9 when the line width was increased from 9 pixels to 11 pixels. Therefore, SNR valuesA, D, F, and H in Figure 9 and in the rest of this work are the averaged values of SNRs a, d, f, and h, respectively, obtained with all the LWs for a given noise level. In this way, the image SNRh that included an LW of 11 pixels was shown to be 1.6 (Figure 7) and the image SNRH that represents the average of all LWs from 3 to 15 pixels at this noise level was shown to be 1.4 (Figure 9). Figure 9(a) shows that the displacement error increased as SNR decreased and also as the LW increased. The latter observation of displacement error increasing with LW is important in two ways. First, MTV accuracy depends on the presence of sufficient intensity gradients in the source window (recall the discussion on Figure 6). For a given source window size (15 × 15 in Figure 9(a)), a wider tag line occupies more pixels and increases the possibility of intensity flatness across the window. Figure 9(b) shows the corresponding error levels using a larger source window of 27 × 27 pixels2. The maximum error values for a given image SNR using a larger window reduced by more than half. Also, the slopes of displacement error curves in Figure 9(a) became steeper with LW as the amount of image noise present was higher. Second, the dissociation of N2O-to-NO depends on the laser energy density which can be increased by narrowing the laser line width. The observations in Figures 9 and 12 could be useful for designing the N2O MTV optical setup (laser line forming optics) for engine air flow studies.Figure 9
Displacement error levels (without filtering) for different SNR values and various line widths using a source window size: (a) 15 × 15 and (b) 27 × 27.
(a) (b)


### 4.2. Effects of SNR and Line Width on Subpixel Accuracy Using Different Filters

The performance of different filters, discussed in Section2, is investigated in reducing the displacement error. The set of undelayed and delayed images with an SNR value of F (or 1.6) was used for this comparison study. Figure 10 shows the MTV displacement error levels with different filters of 5×5 window size and for the original images, without filtering, for various line widths. It was observed that when compared to the original images, the mean and Gaussian filters enhanced subpixel accuracy levels for all line widths, while the median filter enhanced the accuracy levels for line widths greater than 9 pixels. It was interesting to observe that the Wiener filter performed similar to or even better than the median filter in some cases (at LW <9 pixels). However, the corresponding filtered image, as in Figure 3(d), showed visually apparent noise levels. This could be due to the presence of sufficient amounts of spatial gradients of intensity field along two orthogonal directions, which is advantageous when using the spatial correlation technique. Overall, the mean filter resulted in the smallest errors for smaller LWs, while the Gaussian filter was superior at LWs greater than 9 pixels followed by the mean filter. Hence, the mean filter is shown to be highly effective in reducing image noise and thus MTV displacement error.Figure 10
Displacement error levels with filtered undelayed and delayed images using different filters for image SNRF (or 1.6).In addition, the mean filter enhanced the displacement accuracies or reduced the rms displacement error for different SNR values froma to i (at a given LW). Figure 11 shows the comparison plot of displacement error without filtering and with mean filter for various SNRs and a line width of 11 pixels. Notice that although the SNR values obtained from image filtering were higher than without filtering, a common x-axis was considered for ease in comparison by choosing the original image SNR values (without filtering). Also, spurious correlations earlier observed with SNR h and i did not occur with the filtered images. Nevertheless, these points were removed while calculating the errors to be consistent while comparing filtered and nonfiltered results. It was observed that the effect of mean filter in reducing the 95% error level was more apparent for highly noisy images than for less noisy images. However, the least noisy image or the image with highest SNR value considered in this work showed higher displacement error with filtering than without filtering. This can be noted as the limiting case of the mean filter. The mean filter stretches the signal levels, thereby attenuating signal peak intensities (at nodes), while the task of filtering noise is minimal due to lack of significant noise in the original image.Figure 11
Effect of mean filter in reducing displacement error for different image SNRs using 15 × 15 (a) and 27 × 27 (b) source window, with LW = 11 pixels.
(a) (b)Figure 12
(a) Error levels for different SNR values and various line widths with and without employing a5×5 window mean filter and (b) magnified view of the section highlighted in (a).
(a) (b)Figure12 shows the error levels after employing a 5×5 mean filter on the undelayed and delayed images. The corresponding error levels without filtering as seen in Figure 9 are included here for direct comparison. Applying a mean filter to the original images reduced the displacement errors, with exceptions observed for lower line widths. The error levels were higher with filtered images for laser line widths thinner than 5 pixels, as seen in the magnified section (Figure 12(b)).Figure13 demonstrates the effect of mean filter on processing images of different LWs. Additional grid lines were included to enhance the visualization of filtering effect on different line widths. It was observed that the mean-filtered images smoothed both signal intensities and image noise. The former feature of attenuating the signal is more apparent at LW = 3. This illustration further adds to the understanding of why error levels increased for LW below 5 pixels, as seen in Figure 12.Figure 13
Original (a and c) and mean-filtered images (b and d) for selected SNRs and different line widths at each SNR.
(a) (b) (c) (d)The 95% error level values with and without filtering are tabulated in Figure14. The effectiveness of the spatial mean filter in reducing the error levels depended on both image SNR and line width. The mean filter showed a significantly positive impact on error reduction for lower SNR images (e.g., error level of 0.7 without filter → 0.2 with filter for LW = 15, SNR =H) compared to that for a higher SNR image (0.04 → 0.02 for LW = 15, SNR =A). On the other hand, error levels were aggravated with higher SNR images until the line width was greater than 9 pixels. This line width limit was also seen in [39]. The line width after which the mean filter enhanced the MTV displacement subpixel accuracy at each SNR value is highlighted by underlining the error values in Figure 14. From these observations it is realized that the thicker the MTV laser lines are in a high quality mean-filtered image, the better the subpixel accuracy is expected to be. An alternate way to show the limit of line width below which mean filter worsens the subpixel accuracy is by introducing a normalized error parameter (NE):(6)NE=95%errorlevelw/o  filter-95%errorlevelwith  filter95%errorlevelw/o  filter.Figure 15 illustrates the efficacy of the proposed parameter. Here, a negative value of NE indicates that the error was increased using a particular filter, mean 5×5 filter in this case, whereas a positive value indicates that the error decreased with the filter application. This plot readily shows the line width limits beyond which applying mean filter reduced the errors for SNR D, 9, SNR F, 9, and SNR H, 7. Thus, the normalized error parameter readily provides the aforementioned line width limits without the need to plot curves of error levels with and without filtering (Figure 12) or list the individual error values (Figure 14).Figure 14
Pixel error levels for various line widths and different image SNRs.Figure 15
Normalized error level for different image SNRs and various line widths.In addition, the effect of mean filter window size on the resulting displacement error is analyzed by considering one of the less noisy images (original image SNR = 1.9) and different line widths. As seen in Figure16(a), the 95% error level increased with the window size k. The mean filter, when applied for a relatively larger neighborhood window, resulted in what we describe as “signal stretching.” Figure 16(b) shows the mean-filtered images that were used in the spatial correlation technique to attain the MTV displacements and the corresponding errors. The signal stretching characteristic is noticed by observing how the grid nodes were enlarged and MTV lines were widened or stretched, thereby representing a pseudo intensity distribution. As the filter size increased, the lines became wider and the image became blurred. The highly blurred images with larger line widths reduced the effect of filter size on displacement error, especially for k=9 and 7 with LW = 11 as noted in Figure 16(a). The features of signal stretching and independence of filter size for LWs greater than 11 pixels were also noted in [39]. For more noisy images (not shown here), it was expected and confirmed that the displacement error values were higher compared to those for the less noisy images. In addition, the effect of filter size on displacement error was much less for larger line widths.Figure 16
(a) RMS displacement error and (b) mean-filtered simulated images of different line widths and filter window sizes for less noisy image set.
(a) (b)


## 4.1. Effects of SNR and Line Width on Subpixel Accuracy without Filtering

Figure7 shows the sample of original undelayed images (partial grid taken from the whole 8 × 13 grid) for various SNR values with a laser line width of 11 pixels. Image SNRs showed values from 2.5 to 1.2 for a to i without filtering. As will be discussed later, the SNR values changed when the images were preprocessed using various filters. Hence, for suitable comparisons and a consistency in the discussion, the SNR values are designated alphabetically while the numerical values are mentioned wherever appropriate. The SNR values for biacetyl MTV images captured in previous engine flow studies usually ranged from 7 to 15 (values based on (3)), with a laser line width of about 11 pixels. Simulating the image noise is complex due to various sources of noise seen in the actual experimental images such as shot, dark current, hot pixel, and readout noises [44]. Also, the fluorescence yield of the nitric oxide molecules as seen in N2O MTV depends on several factors. Some of these factors are the read laser energy, in-cylinder air pressure and temperature, and the NO number density. Considering all the aforementioned signal and noise uncertainties possible with N2O MTV, the current work investigates the worst case scenario by simulating images with much lower SNRs than those seen with experimental biacetyl MTV images. The effect of SNR on rms displacement error (see (4) and without filtering) is shown in Figure 8. Few spurious correlations as detected for images with SNR h and i were removed from the error calculations. The rms displacement error without filtering rapidly decreased until the image SNR was greater than 1.6, followed by a gradual decline as the image SNR was increased further.Figure 7
Synthetic images of various SNR values with LW = 11 pixels.Figure 8
Effect of image SNR on rms displacement error without filtering using 15 × 15 and 27 × 27 source window sizes. Here LW = 11 pixels.To analyze the effect of line width on displacement accuracy, synthetic images were generated with different LWs (i.e., 3 to 15 pixels) for a given noise level. It should be noted that, for the same level of noise, SNR value increased with the increase in line width. For example, in the case of SNR f, SNR value increased from 1.5 to 1.9 when the line width was increased from 9 pixels to 11 pixels. Therefore, SNR valuesA, D, F, and H in Figure 9 and in the rest of this work are the averaged values of SNRs a, d, f, and h, respectively, obtained with all the LWs for a given noise level. In this way, the image SNRh that included an LW of 11 pixels was shown to be 1.6 (Figure 7) and the image SNRH that represents the average of all LWs from 3 to 15 pixels at this noise level was shown to be 1.4 (Figure 9). Figure 9(a) shows that the displacement error increased as SNR decreased and also as the LW increased. The latter observation of displacement error increasing with LW is important in two ways. First, MTV accuracy depends on the presence of sufficient intensity gradients in the source window (recall the discussion on Figure 6). For a given source window size (15 × 15 in Figure 9(a)), a wider tag line occupies more pixels and increases the possibility of intensity flatness across the window. Figure 9(b) shows the corresponding error levels using a larger source window of 27 × 27 pixels2. The maximum error values for a given image SNR using a larger window reduced by more than half. Also, the slopes of displacement error curves in Figure 9(a) became steeper with LW as the amount of image noise present was higher. Second, the dissociation of N2O-to-NO depends on the laser energy density which can be increased by narrowing the laser line width. The observations in Figures 9 and 12 could be useful for designing the N2O MTV optical setup (laser line forming optics) for engine air flow studies.Figure 9
Displacement error levels (without filtering) for different SNR values and various line widths using a source window size: (a) 15 × 15 and (b) 27 × 27.
(a) (b)


## 4.2. Effects of SNR and Line Width on Subpixel Accuracy Using Different Filters

The performance of different filters, discussed in Section2, is investigated in reducing the displacement error. The set of undelayed and delayed images with an SNR value of F (or 1.6) was used for this comparison study. Figure 10 shows the MTV displacement error levels with different filters of 5×5 window size and for the original images, without filtering, for various line widths. It was observed that when compared to the original images, the mean and Gaussian filters enhanced subpixel accuracy levels for all line widths, while the median filter enhanced the accuracy levels for line widths greater than 9 pixels. It was interesting to observe that the Wiener filter performed similar to or even better than the median filter in some cases (at LW <9 pixels). However, the corresponding filtered image, as in Figure 3(d), showed visually apparent noise levels. This could be due to the presence of sufficient amounts of spatial gradients of intensity field along two orthogonal directions, which is advantageous when using the spatial correlation technique. Overall, the mean filter resulted in the smallest errors for smaller LWs, while the Gaussian filter was superior at LWs greater than 9 pixels followed by the mean filter. Hence, the mean filter is shown to be highly effective in reducing image noise and thus MTV displacement error.Figure 10
Displacement error levels with filtered undelayed and delayed images using different filters for image SNRF (or 1.6).In addition, the mean filter enhanced the displacement accuracies or reduced the rms displacement error for different SNR values froma to i (at a given LW). Figure 11 shows the comparison plot of displacement error without filtering and with mean filter for various SNRs and a line width of 11 pixels. Notice that although the SNR values obtained from image filtering were higher than without filtering, a common x-axis was considered for ease in comparison by choosing the original image SNR values (without filtering). Also, spurious correlations earlier observed with SNR h and i did not occur with the filtered images. Nevertheless, these points were removed while calculating the errors to be consistent while comparing filtered and nonfiltered results. It was observed that the effect of mean filter in reducing the 95% error level was more apparent for highly noisy images than for less noisy images. However, the least noisy image or the image with highest SNR value considered in this work showed higher displacement error with filtering than without filtering. This can be noted as the limiting case of the mean filter. The mean filter stretches the signal levels, thereby attenuating signal peak intensities (at nodes), while the task of filtering noise is minimal due to lack of significant noise in the original image.Figure 11
Effect of mean filter in reducing displacement error for different image SNRs using 15 × 15 (a) and 27 × 27 (b) source window, with LW = 11 pixels.
(a) (b)Figure 12
(a) Error levels for different SNR values and various line widths with and without employing a5×5 window mean filter and (b) magnified view of the section highlighted in (a).
(a) (b)Figure12 shows the error levels after employing a 5×5 mean filter on the undelayed and delayed images. The corresponding error levels without filtering as seen in Figure 9 are included here for direct comparison. Applying a mean filter to the original images reduced the displacement errors, with exceptions observed for lower line widths. The error levels were higher with filtered images for laser line widths thinner than 5 pixels, as seen in the magnified section (Figure 12(b)).Figure13 demonstrates the effect of mean filter on processing images of different LWs. Additional grid lines were included to enhance the visualization of filtering effect on different line widths. It was observed that the mean-filtered images smoothed both signal intensities and image noise. The former feature of attenuating the signal is more apparent at LW = 3. This illustration further adds to the understanding of why error levels increased for LW below 5 pixels, as seen in Figure 12.Figure 13
Original (a and c) and mean-filtered images (b and d) for selected SNRs and different line widths at each SNR.
(a) (b) (c) (d)The 95% error level values with and without filtering are tabulated in Figure14. The effectiveness of the spatial mean filter in reducing the error levels depended on both image SNR and line width. The mean filter showed a significantly positive impact on error reduction for lower SNR images (e.g., error level of 0.7 without filter → 0.2 with filter for LW = 15, SNR =H) compared to that for a higher SNR image (0.04 → 0.02 for LW = 15, SNR =A). On the other hand, error levels were aggravated with higher SNR images until the line width was greater than 9 pixels. This line width limit was also seen in [39]. The line width after which the mean filter enhanced the MTV displacement subpixel accuracy at each SNR value is highlighted by underlining the error values in Figure 14. From these observations it is realized that the thicker the MTV laser lines are in a high quality mean-filtered image, the better the subpixel accuracy is expected to be. An alternate way to show the limit of line width below which mean filter worsens the subpixel accuracy is by introducing a normalized error parameter (NE):(6)NE=95%errorlevelw/o  filter-95%errorlevelwith  filter95%errorlevelw/o  filter.Figure 15 illustrates the efficacy of the proposed parameter. Here, a negative value of NE indicates that the error was increased using a particular filter, mean 5×5 filter in this case, whereas a positive value indicates that the error decreased with the filter application. This plot readily shows the line width limits beyond which applying mean filter reduced the errors for SNR D, 9, SNR F, 9, and SNR H, 7. Thus, the normalized error parameter readily provides the aforementioned line width limits without the need to plot curves of error levels with and without filtering (Figure 12) or list the individual error values (Figure 14).Figure 14
Pixel error levels for various line widths and different image SNRs.Figure 15
Normalized error level for different image SNRs and various line widths.In addition, the effect of mean filter window size on the resulting displacement error is analyzed by considering one of the less noisy images (original image SNR = 1.9) and different line widths. As seen in Figure16(a), the 95% error level increased with the window size k. The mean filter, when applied for a relatively larger neighborhood window, resulted in what we describe as “signal stretching.” Figure 16(b) shows the mean-filtered images that were used in the spatial correlation technique to attain the MTV displacements and the corresponding errors. The signal stretching characteristic is noticed by observing how the grid nodes were enlarged and MTV lines were widened or stretched, thereby representing a pseudo intensity distribution. As the filter size increased, the lines became wider and the image became blurred. The highly blurred images with larger line widths reduced the effect of filter size on displacement error, especially for k=9 and 7 with LW = 11 as noted in Figure 16(a). The features of signal stretching and independence of filter size for LWs greater than 11 pixels were also noted in [39]. For more noisy images (not shown here), it was expected and confirmed that the displacement error values were higher compared to those for the less noisy images. In addition, the effect of filter size on displacement error was much less for larger line widths.Figure 16
(a) RMS displacement error and (b) mean-filtered simulated images of different line widths and filter window sizes for less noisy image set.
(a) (b)


## 5. Preprocessing Experimental MTV Images Using Filters

The spatial and frequency domain filters discussed in this work were applied to biacetyl MTV images. Figure17(a) shows the MTV delayed image without any filtering applied and will be called hereafter as the “baseline” image. This image was recorded previously along the in-cylinder tumble plane that symmetrically bisects the intake and exhaust valves of an optical engine. Details of the experimental setup can be found in related works [29, 30]. The engine was operated at 2500 rpm and the MTV images were acquired at 107 CAD before TDC during compression stroke. The piston surface was located at the bottom of the MTV grid as indicated with the dashed line in Figure 17(a). Figures 17(b)–17(d) show the MTV delayed image on applying mean, Gaussian, and median filters, respectively. These filtered images demonstrated the intensity attenuation and noise behavior as observed from the simulated images: The mean filter reduced the noise level while simultaneously attenuating the signal pixel intensities (Figure 17(b)). Median filter retained the intensities of actual laser grid and the lines are clearer than with other filters (Figure 17(c)). However, significant amount of “salt-and-pepper” noise remained in the filtered image. Gaussian filtered image exhibited reduced noise levels similar to those in the mean-filtered image while retaining the grid intensities similar to those seen with median filter (Figure 17(d)). The effects of these filters on MTV measurement accuracy were quantified by evaluating the grid displacements using spatial correlation technique within the region highlighted in Figure 17(a).Figure 17
(a) Baseline delayed biacetyl MTV image without any filtering and (b) mean-filtered, (c) median-filtered, and (d) Gaussian filtered delayed image. The baseline image was taken at 107 CAD before TDC during compression stroke.
(a) (b) (c) (d)Figure18 shows the corresponding velocity vectors plotted at these grid points using the baseline undelayed and delayed images (not shown here; delay time = 12 μs). The flow direction was influenced by the piston surface wall interaction as indicated by the upward-pointing curved vectors near the bottom-right of the vector plot. It should be noted that this vector plot is away from and does not include the piston boundary as highlighted in Figure 17(a). In addition, the whole flow field was redirected from the almost vertically downward movement during intake stroke to a more lateral motion (Figure 18) due to upward moving piston during compression stroke.Figure 18
Velocity vector field along an in-cylinder tumble plane at 107 CAD before TDC during compression stroke at 2500 rpm.The displacement of the baseline delayed image was considered as the reference value and thenoise reduction index (NRI) due to the filtered delayed images (mean, Gaussian, and median) was analyzed from the deviation: (7)NRI=δXfilter-δXbase2+δYfilter-δYbase2,where δX and δY are subpixel displacements of grid points in “X” and “Y” direction, and the subscripts filter and base indicate if these values were taken from the baseline image or filtered image. The statistical relation in (7) is termed as the noise reduction index because the laser line width in the experimental MTV images was 11 pixels and it was determined that the mean filter would reduce the measurement error at this LW (see Figure 14). The LW limits for median and Gaussian filters, however, were not determined in this work and are assumed here to share the same values as for the mean filter.The error values were calculated for an 8 × 8 grid (64 grid points). A few spurious correlations were detected which were removed by applying an error processing algorithm in MATLAB code. Figure19 shows the plotted values of deviations, after removing spurious correlations, for all the grid points. With the baseline displacements as reference, the displacements calculated from median-filtered image were closer to those of the baseline with an average NRI value of 0.16 pixels for the chosen laser grid. On the other hand, displacements calculated from mean-filtered image showed the highest noise reduction capacity (average NRI of 0.4 pixels) among all the filters.Figure 19
Eccentricity values of flow displacements using different image filters with reference being the baseline unfiltered image displacements.


## 6. Conclusions

Realizing the capability ofN2O molecular tagging velocimetry to measure air flows, the authors here investigated the potential application of N2O MTV for in-cylinder air flow measurements. Based on the working principle of N2O MTV and the related optical setup for in-cylinder MTV grid formation, it was identified that the image SNR and laser line width depend on several working parameters (e.g., laser energy density and NO fluorescence signal). Hence, a parametric study of image SNR and MTV laser line width was made to understand their effects on the subpixel accuracy levels of flow displacements with and without image preprocessing. Although the prime focus of this work is on N2O MTV, the current discussions can be applied to other MTV techniques such as biacetyl MTV because both techniques share identical laser grid setup. Synthetic MTV images having different levels of Gaussian white noise were generated for this work. The rms displacement error was used to characterize the subpixel accuracy, apart from the 95% error level that was used to compare the current results with those in previous works. The rms displacement error without filtering rapidly decreased until the image SNR was greater than 1.6, followed by a gradual decline as the image SNR was increased further. The 95% error level (confidence interval) and its slope increased and became steeper, respectively, as SNR decreased and also as line width increased. One of the key aspects to minimize noise or spurious detection while applying MTV for in-cylinder flow measurements is to select proper source window size for spatial correlations. This was demonstrated in this work wherein the error levels were reduced by more than half when switching from a source window of 15×15 to 27×27 pixels2.In the second part of this work, the effect of image preprocessing on error reduction was analyzed using a Gaussian filter and various spatial filters such as mean, median, and Wiener filter. It was observed that the mean filter was effective in removing visual noise and increased the image SNR, while the median- and Wiener-filtered images contained visibly apparent levels of noise. When compared to the Gaussian filter, the mean filter resulted in smaller error levels for LW <9 pixels and slightly higher error levels for LW >9 pixels, in agreement with results from a similar work. From a priori knowledge of simulated image noise distribution (Gaussian white noise), the performance of the mean filter indicates that it is very effective in enhancing the displacement subpixel accuracy. Also, the mean filter reduced the displacement error significantly for more noisy images compared to that for less noisy images. However, the least noisy image showed higher displacement error with filtering than without filtering. This was attributed to the intensity attenuation as a result of signal stretching, which was more apparent for LW <5 pixels. The limit of line width below which mean filter worsened the subpixel accuracy moved from 11 pixels to 7 pixels as the image noise increased. In addition, error levels increased as the filter size was increased and became almost independent of filter size for LW ≥11 as also seen in previous works. The simulation results were further validated using experimental images taken along the in-cylinder tumble plane.



---

*Source: 6159802-2017-02-20.xml*