1 Introduction

The flow inside an engine cylinder is extremely complex, and greatly influences the in-cylinder processes such as fuel–air mixing and combustion. Hence, gaining a thorough understanding of in-cylinder flow is important for modern engine developments. Till today, many laser-based diagnostic techniques have been developed; for example, particle image velocimetry (PIV) [1, 2] and molecular tagging velocimetry (MTV) [3,4,5,6]. PIV (or MTV) measures the instantaneous velocity of flow at many points over a plane or volume in the measurement space. The accuracy of these techniques highly depends on data reduction algorithm, and calibration procedure for reconstruction of particle displacements (or laser grids in the case of MTV) from image plane(s) to physical space coordinates. The error in engine flow diagnostics, however, is commonly reported only on the basis of data reduction algorithm [7, 8]. Therefore, the present work is aimed to investigate another major source of error, i.e. calibration procedure, for engine flow diagnostics. This is particularly important when information of actual flow velocity is not available to determine the overall error in measurement such as in engine flows. It is worth noticing that the overall error in measurement is generally reported for simple set-ups where information of actual velocity is available with ease, and with no significant distortions, i.e. when measurement region is viewed directly or through planar optical surface, for example, [9, 10].

The error in the calibration procedure depends on many factors such as detection of centroids of circular marks in the calibration images, size of circular marks and distortions through a transparent cylindrical liner causing local variations in pixel size. An error analysis to detect the centroids of circular objects was performed, and suitable image pre-processing techniques, i.e. Wiener filter plus Laplacian of Gaussian (LoG) edge detector and centroiding algorithm, i.e. Späth algorithm, were determined to define a methodology for centroids detection [11]. This methodology is used in the present work to study the effects of (i) size of circular marks in the calibration images and (ii) distortions through the transparent cylindrical liner, on the calibration error in engine flow diagnostics.

The first factor—size of circular marks in the calibration images—plays an important role on the accuracy of centroids detection. It is to be noted that the size of circular marks in the calibration images largely depends on the receiving optics such as lens and camera, which in turn depends on the application, for example, aerodynamics, in-cylinder engine flow, etc. Thus, the circular mark size varies according to the experimental set-up, and produces different error levels in centroids detection even when the calibration images are processed with the same algorithm. Hence, it is necessary to determine the error levels in centroids detection for different sizes of the circular marks, and to find out the optimum size showing the least error in centroids detection.

The second factor—distortions when viewed through a cylindrical window, such as in engine flow diagnostics—has a considerable effect on the overall error in measurement. Hence, these distortions should be minimized for accurate reconstruction. The distortions through a transparent cylindrical surface are investigated by many researchers. Lowe and Kutt [12] studied refraction through the cylindrical walls, and developed a measurement technique to determine the coordinates of a particle located inside the cylindrical tube. They used images of the particle viewed from two different directions using a single camera and a mirror. It was observed that when imaging through a transparent cylinder, the images appeared distorted due to the curvature of interfaces and difference in refractive indices. Witt et al [13] proposed a method in which cylindrical surface was optically contoured to correct for distortions. However, there are two major drawbacks of this method: first, manufacturing of optical contour is critical and expensive, and second, the method needs to measure geometric parameters of the experimental set-up, which is error-prone and cumbersome. Reuss et al [8] observed that particle images when imaging through a transparent engine cylinder were degraded in quality due to two main factors: aberrations (which result in poor focusing) and low light transmission near the cylinder wall. The authors found significant distortions near the cylinder wall compared with the centre of the cylinder, as was also observed elsewhere [14]. Soloff et al [15] developed a generalized calibration procedure in which non-linear mapping functions were calculated to compensate for optical distortions due to inaccurate optical alignment, lens nonlinearity and refraction by optical windows. They found an overall RMS error of 0.53 pixel in the calibration procedure for velocity field measurements when a distorting medium (two lenses of focal length 450 mm arranged in series) was placed between the lens and the object plane. It is, however, to be noted that the overall error in the calibration procedure was influenced by the error levels in centroids detection of circular marks and in least-square fitting of polynomial for the mapping functions. In the present work, error levels in the calibration procedures (based on both global pixel size and non-linear mapping functions) considering different measurement planes are evaluated for engine flow diagnostics, including errors in centroids detection of circular marks of different sizes. Results are also presented for the calibration errors when distortions are not present, i.e. without the cylindrical liner for direct comparison. To the best of our knowledge, non-linear mapping functions are not utilized in engine flow diagnostics using PIV.

Hence the aim of this work is to determine the error levels in (i) centroids detection in the calibration images (by evaluating the effect of size of circular marks) and (ii) calibration procedure, compensating for distortions when viewed through a transparent cylinder in engine flow diagnostics. For determining the error in centroids detection, synthetic images of a calibration target are generated (see section 2) with different sizes of circular marks and different signal-to-noise ratios (SNRs). The images are pre-processed using the Wiener filter plus LoG edge detector, and later processed using the Späth algorithm to detect the centroids of the circular marks. Section 3 describes processing of synthetic images and calculation of errors in centroids detection. The errors in centroids detection show that circular mark size of 6–8 pixel (radius) is optimum for the calibration images used in flow diagnostics. Acquisition of real images of the calibration target with and without a transparent cylindrical liner and detection of centroids of the circular marks in these images are discussed in section 4. The images are acquired through the transparent liner at five different planes parallel to the image plane at: \( Z = 0 \) (along the diameter of the cylinder), \( Z = \pm 3 \) mm and \( Z = \pm 6 \) mm from the diametral plane (i.e. plane at \( Z = 0 \)). A procedure to quantify the distortions is presented in section 5. It was observed that distortions were increased with the increase in distance (both in positive and negative \( Z \)directions) from the central plane (\( Z = 0 \)). Along the \( X \) direction, distortions were found to be significant in each image, and were increased away from the centre (\( X = 0 \)). However, negligible distortions were observed along the \( Y \) direction. Section 6 focuses on estimating the error levels in the calibration procedure. First, the calibration is performed based on global pixel size (or magnification factor), and then based on non-linear mapping functions as per the procedure given in Soloff et al [15], along with a comparison of overall errors in utilizing different calibration procedures. Finally, conclusions are drawn in section 7.

2 Generation of synthetic images

Synthetic images of a calibration target (typical in flow diagnostics) are generated. It is worth noticing that the calibration target is typically composed of circular marks with known centroids in physical space coordinates. These synthetic images are then used for evaluating the effect of circular mark size on the accuracy of centroids detection of the circular marks. See figure 1 as an example of a synthetic image generated in this work. The intensity distribution of each circular spot follows Gaussian function, equation (1). As suggested by Heikkilä [16], Gaussian white noise is then added in the images for improved representation of real world conditions.

$$ I(X,Y) \, = I_{o} \exp \left[ {\frac{{ - \left( {X - X_{c} } \right)^{2} - \left( {Y - Y_{c} } \right)^{2} }}{{\left( {\frac{1}{8} } \right) D_{o}^{2} }}} \right] $$
(1)

where the centre of the circular mark (diameter \( D_{o} \)) is located at (\( X_{c} , Y_{c} \)) with peak intensity of \( I_{o} \).

Figure 1
figure 1

An example of synthetic image generated in the present work.

Each synthetic image of a calibration target consists of 13 × 13 circular marks. Different sizes of circular marks, ranging from radius of 3 pixel to radius of 10 pixel, are considered. For each size of circular mark, images of six different SNRs are created, and for each SNR, 10 different images are created with the same level of noise but independent of each other.

Image SNR is calculated using (2), adapted from Caso and Bohl [17]:

$$ SNR = \frac{{I_{max} }}{4\sigma } $$
(2)

where \( I_{max} \) is the maximum intensity considering all the pixels in the original image, and \( \sigma \) is the standard deviation of image pixels obtained by subtracting the original image from the image filtered using a 3 × 3 Median filter. Thus for each circular mark size (or radius), a total of 60 synthetic images (10 images per SNR) are generated. See table 1 for the values of SNRs of synthetic images.

Table 1 SNRs of synthetic images.

SNR \( a \) (table 1) has the highest values ranging from 12.9 to 20.6 for mark sizes from 3 to 10 pixel, respectively. However, SNR \( f \) has the lowest values ranging from 3.9 to 4.0 for mark sizes from 3 to 10 pixel, respectively. Other SNR values (for SNRs \( b \), \( c \), \( d \) and \( e \)) are between SNRs \( a \) and \( f \). While creating the synthetic images, a proper care is taken so that they represent the real world conditions. Hence synthetic images are compared to the real images. See figure 2 for the comparison of synthetic image (see, for example, figure 1) with real image [18].

Figure 2
figure 2

Comparison of synthetic and real [18] images based on intensity distribution along the diameter of central circle in the image.

The intensity distribution along the diameter of the central circle is shown for both real and synthetic images. It is clear that the intensity distributions are comparable and follow Gaussian-like distributions with noise. The synthetic image is also compared to the real image in terms of SNR, calculated using (2). The SNRs for the synthetic image and real image are 19 and 18.2, respectively. Thus, it is clear that the synthetic images used in this work are comparable to the real image.

3 Centroids detection and error analysis

Synthetic images are first pre-processed using image filtering and image segmentation. The Wiener filter is used to remove the noise from synthetic images, and LoG edge detector is used to segment the filtered images [11]. The pre-processed images are then processed using the Späth algorithm for centroids detection of the circular marks, as suggested by Adatrao and Mittal [11]. The error in centroids detection is then calculated using (3):

$$ error = \left[ {\sqrt {\frac{1}{n}\sum \left( {\Delta x} \right)^{2} } + \sqrt {\frac{1}{n}\sum \left( {\Delta y} \right)^{2} } } \right]/2 $$
(3)

where \( \Delta x \) and \( \Delta y \) are the differences between detected and actual \( X \)- and \( Y \)-coordinates of the centroids, respectively. Note that the two terms in the numerator of the right-hand side of (3) are the RMS errors in X- and \( Y \)-coordinate, respectively. The total number of circular marks is denoted by \( n \). The value of \( n \) is 1690, as there are 13 × 13 marks in one image for a given size, and 10 images (independent of each other) are generated for each SNR. Note that with the change in field of view, the size of circular marks would also change. Therefore, the errors in the centroids detection are plotted against the circular mark sizes for each image SNR in figure 3, as it would influence the error in the calibration procedure. As expected, for a given size of circular mark, the error is reduced with the increase in SNR. This trend is observed for all sizes of the circular marks. For the images of the circular mark size of 7 pixel (radius), the errors are 0.02 and 0.13 pixel for SNR \( a \) and SNR \( f \), respectively. The errors are found to be between 0.02 and 0.13 pixel for other image SNRs having size of 7 pixel. It is to be noted that for a given noise level, error in centroids detection is decreased with the increase in the size of circular mark up to radius of 7 pixel, and then it is increased with the increase in size of circular mark. For example, for the noise level that corresponds to SNR \( a \), the errors are 0.07, 0.04, 0.02 and 0.05 pixel for circular mark sizes (radii) of 3, 5, 7 and 10 pixel, respectively. For SNR \( f \), the errors are 8.98, 1.27, 0.13 and 0.32 pixel for the circular mark sizes (radii) of 3, 5, 7 and 10 pixel, respectively. They are the highest (SNR \( a \)) and lowest (SNR \( f \)) SNRs considered in this work. In case of an intermediate SNR, for example, SNR \( c \), the errors for the circular mark sizes (radii) of 3, 5, 7 and 10 pixel are 0.34, 0.09, 0.06 and 0.09 pixel, respectively. It is worth noticing that the error levels for circular mark size (radii) of 3 pixel (particularly for SNRs cf) are considerably high when compared with other sizes (radii), i.e. 5, 7 and 10 pixel. This is due to lower image SNR for circular mark size of 3 pixel compared with other sizes (see table 1), and also the availability of a lower number of data points for the least-square fitting for the Späth algorithm.

Figure 3
figure 3

Errors in centroids detection for the images of different sizes of circular marks: (a) for SNRs \( a \)\( c \) and (b) for SNRs \( d \)\( f \).

Thus, the circular mark size of 6–8 pixel (radius) is found to be optimum for the calibration purpose for all SNRs considered in this work.

4 Acquisition of calibration images and processing

In the calibration procedure, a calibration target with circular marks (of known centroids) is placed in the measurement regime and imaged. In this work, a calibration target is imaged through a transparent engine cylinder of 12 mm thickness (outside diameter of 77.5 mm). The images of the calibration target are acquired through the liner at five different planes parallel to the image plane at \( Z = 0 \) mm (along the diameter of the cylinder), \( Z = \pm 3 \) mm and \( Z = \pm 6 \) mm from the diametral plane (i.e. plane at \( Z = 0 \)), as shown in figure 4. Note that in engine flow diagnostics, a perpendicular view with respect to the calibration target is commonly used. The target images are also acquired without the liner for direct comparison, representing the case having no distortions due to cylindrical surface. See figure 5 for the images of the calibration target. The effect of distortions when imaging through the cylindrical liner is clearly visible. Also, it is clear that the distortions are high near the edge of the cylinder. Note that the camera was kept focused on the calibration target at \( Z = 0 \), and was not moved while taking the images of the target at other \( Z \)-positions, as was also reported in Reuss et al [8].

Figure 4
figure 4

(a) Calibration target, (b) located at different positions in a transparent cylindrical liner.

Figure 5
figure 5

Calibration images, and detected centroids of circular marks in the calibration images taken without (left column) and with (right column) liner at \( Z = - \;6 \) mm (a, b), \( Z = 0 \) (c, d) and \( Z = + \;6 \) mm (e, f).

The distortions are quantified by comparing the images of the target acquired with and without the liner. For this purpose, the calibration images are processed to detect the centroids of the circular marks. It is to be noted that only a quarter (upper-left portion) of the image is processed to detect the centroids and to estimate the distortions because of symmetry, as is also observed by Ge et al [14]. It is worth noting that in the case of an oblique view, the whole image should be considered for the analysis. The images are first pre-processed using the Wiener filter and LoG edge detector, and then processed using the Späth algorithm to detect the centroids of the circular marks. The results of the centroids detection are also shown in figure 5 for the images of the target at \( Z = 0 \) and \( \pm \;6 \) mm. Similar results are also observed for the target at \( Z = \pm \;3 \) mm (not shown here).

5 Estimation of distortions

The distortions through the transparent cylindrical liner are quantified using the coordinates of detected centroids in the calibration images acquired with and without the transparent liner. As discussed, the inside diameter of the liner is 53.5 mm with thickness of 12 mm. Lee and Assanis [19] conducted thermo-mechanical analysis to optimize the liner thickness, which was found to be between 13 and 14 mm. Note that with the increase in liner thickness, more distortions are expected. A lens of 100 mm focal length is used to focus the camera for acquiring the calibration images. The separation (or pixel distance) of the \( X \)-coordinates of centroids with respect to the centroids of adjacent circular marks in a calibration image is given by

For circular marks in column 1:

$$ {\text{d}}X = \left| {X_{1} - X_{2} } \right|. $$

For circular marks in columns 2–4:

$$ {\text{d}}X = \left( {\left| {X_{i - 1} - X_{i} } \right| + \left| {X_{i} - X_{i + 1} } \right|} \right)/2. $$

where, \( i = \) 2, 3, and 4, respectively.

For circular marks in column 5:

$$ {\text{dX}} = \left| {{\text{X}}_{4} - {\text{X}}_{5} } \right| $$
(4)

Similarly, the separation of the \( Y \)-coordinates of centroids with respect to the centroids of adjacent circular marks in a calibration image is given by,

For circular marks in row 1:

$$ {\text{d}}Y = \left| {Y_{1} - Y_{2} } \right|. $$

For circular marks in rows 2, 3 and 4:

$$ {\text{d}}Y = \left( {\left| {Y_{j - 1} - Y_{j} } \right| + \left| {Y_{j} - Y_{j + 1} } \right|} \right)/2, $$

where \( j = \) 2, 3, and 4, respectively.

For circular marks in row 5:

$$ {\text{d}}Y = \left| {Y_{4} - Y_{5} } \right|. $$
(5)

Here, suffixes 1, 2, 3, 4 and 5 represent column numbers and row numbers in case of separations along \( X \)- and \( Y \)-axis, respectively. See figures 6 and 7 for the separation values along the \( X \) and \( Y \)-axes, respectively. From figure 6, it is clear that the separations of the \( X \)-coordinates of centroids with respect to the centroids of adjacent circular marks are comparable for all columns in the calibration images acquired without the transparent liner for all \( Z \)-positions. However, in the case of images taken through the transparent cylindrical liner, different separation values are observed among five different columns considered. The separation values (\( {\text{d}}X \)) are observed to decrease while moving towards the edge of the cylinder. However, it is to be noted that the separation values (\( {\text{d}}X \)) are comparable within the same column. This can also be verified from figure 7. It is clear from figure 7 that the separation values (\( {\text{d}}Y \)) along the \( Y \)-axis are comparable in the images acquired with and without the cylindrical liner. Very small variations are observed in the separation values (\( {\text{d}}Y \)) in the case of images taken through the liner. Similar results for the separation values (\( {\text{d}}X \) and \( {\text{d}}Y \)) are also observed for the calibration images taken at \( Z = \pm \;3 \) mm (not shown here). It is worth noticing that the SNR of the calibration image, for example, with the liner at Z = 0 mm is 16.5.

Figure 6
figure 6

Separation of \( X \)-coordinates (\( {\text{d}}X \) in pixel) of centroids with respect to the centroids of adjacent circular marks in the calibration images taken without (left column) and with (right column) the liner at \( Z = - \;6 \) mm (a, b), \( Z = 0 \) (c, d) and \( Z = + \;6 \) mm (e, f).

Figure 7
figure 7

Separation of \( Y \)-coordinates (\( {\text{d}}Y \) in pixel) of centroids with respect to the centroids of adjacent circular marks in the calibration images taken without (left column) and with (right column) the liner at \( Z = - \;6 \) mm (a, b), \( Z = 0 \) (c, d) and \( Z = + \;6 \) mm (e, f).

The separation values are further used to calculate the distortions. Distortion along the \( X \)-axis is defined by

$$ {\text{D}}x = \left| {\left( {{\text{d}}X - {\text{d}}X '} \right)/{\text{d}}X} \right| $$
(6)

where \( {\text{d}}X \) is the separation of the \( X \)-coordinates of centroids with respect to the centroids of adjacent circular marks in the calibration image taken without the liner at a particular \( Z \)-position, and \( {\text{d}}X' \) is the separation of the \( X \)-coordinates of centroids with respect to the centroids of adjacent circular marks in the calibration image taken with the liner at the same \( Z \)-position.

Similarly, distortion along the \( Y \)-axis is given by

$$ {\text{D}}y = \left| {\left( {{\text{d}}Y - {\text{d}}Y '} \right)/{\text{d}}Y} \right| $$
(7)

where \( {\text{d}}Y \) is the separation of the \( Y \)-coordinates of centroids with respect to the centroids of adjacent circular marks in the calibration image taken without the liner at a particular \( Z \)-position, and \( {\text{d}}Y' \) is the separation of the \( Y \)-coordinates of centroids with respect to the centroids of adjacent circular marks in the calibration image taken with the liner at the same \( Z \)-position.

The distortions are shown in figure 8 for the images of the target at \( Z = 0 \) mm and \( Z = \) \( \pm \;6 \) mm. It is to be noted that the distortions along the \( X \)-axis (\( {\text{D}}x \)) are increased as we move towards the edge of the cylindrical liner, whereas the distortions along the \( Y \)-axis (\( {\text{D}}y \)) are comparable and do not vary much towards the edge of the cylindrical liner. Also, the distortions along the \( X \)-axis (\( {\text{D}}x \)) at \( Z = 0 \) are the lowest as compared with the corresponding distortions at other \( Z \)-positions. Similar results for the distortions are observed for the calibration images taken at \( Z = \pm \;3 \) mm (however, not shown here). Note that the distortions along the \( X \)-axis (\( {\text{D}}x \)) are more at \( Z = - \;3 \) mm and \( Z = - \;6 \) mm than those at \( Z = + \;3 \) mm and \( Z = + \;6 \) mm, respectively.

Figure 8
figure 8

Distortions along the \( X \)-axis (left column) and along the \( Y \)-axis (right column) in the calibration images taken through the liner at \( Z = - \;6 \) mm (a, b), \( Z = 0 \) (c, d) and \( Z = + \;6 \) mm (e, f).

This is expected because of the increased distance of the object plane from the lens for \( Z = - \;3 \) mm and \( Z = - \;6 \) mm compared with \( Z = + \;3 \) mm and \( Z = + \;6 \) mm, respectively.

6 Error levels in the calibration procedure

6.1 Calibration procedure based on global pixel size

In engine flow diagnostics, a simple calibration procedure is commonly used to estimate the global pixel size (or magnification factor) for reconstruction of image coordinates to physical space coordinates. The global pixel size \( M \) is calculated using (8):

$$ {\text{displacement}}\,{\text{in}}\,{\text{pixel}}\,{\text{coordinates}} = M \, \times {\text{ displacement}}\,{\text{in}}\,{\text{physical}}\,{\text{space}}\,{\text{coordinates}}. $$
(8)

It is to be noted that \( M \) is calculated along \( X \)- and \( Y \)-axis separately. Displacement in physical space coordinates along the \( X \)-axis is the distance between the centroids of two extreme circular marks in the same row on the calibration target (see figure 4). The pixel coordinates of the centroids of these two circular marks are then detected from the calibration image to estimate the distance between them, which is the corresponding displacement in pixel coordinates along the \( X \)-axis.

The global pixel size \( M \) along the \( X \)-axis is thus calculated from the displacements in physical space coordinates and pixel coordinates using (8). Similarly, \( M \) is also calculated along the \( Y \)-axis considering two extreme circular marks in the same column (see figure 4). Overall error in the calibration is then obtained using (3), where \( \Delta x = X{-}X_{calc} \) and \( \Delta y = Y{-}Y_{calc} \).

Here, \( \left( {X, Y} \right) \)are the image coordinates of a centroid detected in the image, and \( \left( {X_{calc} , Y_{calc} } \right) \) are the image coordinates of a centroid calculated using the global pixel sizes with \( x \) and \( y \) (physical space coordinates in mm) as inputs. The errors in the calibration procedure based on global pixel size are thus calculated for the calibration images acquired with and without the liner for all five \( Z \) positions (figure 9). It is clear that the errors for the calibration images acquired through the liner are more significant than those for the corresponding images taken without the liner. It is about 0.48 pixel for the plane located at \( Z = 0 \), and increases as we move away from the central plane both in positive and negative \( Z \)-directions. It is worth noticing that the RMS error reported for data reduction algorithm at \( Z = 0 \) plane is about 0.3–0.5 pixel in displacement [8]. Hence calibration error in engine flow diagnostics is significant, and therefore it should not be ignored as it influences the directions and magnitudes of displacement vectors during reconstruction. Further, it is to be noted that the errors are relatively higher for planes located at \( Z = - \;3 \) mm and \( Z = - \;6 \) mm compared with \( Z = + \;3 \) mm and \( Z = + \;6 \) mm, respectively.

Figure 9
figure 9

Effect of distortions due to the cylindrical liner on overall errors in the calibration procedures based on global pixel size and mapping functions for calibration images acquired at five locations: \( Z = 0, \pm \;3, \pm \;6 \) mm.

6.2 Calibration procedure based on non-linear mapping functions

The error levels discussed in section 6.1, however, can be reduced using the calibration procedure based on non-linear mapping functions, incorporating local variations in pixel size. The mapping functions (see equation (9) for the relationship between image \( X \)-coordinate and physical space \( x \)- and \( y \)-coordinates) are estimated as per the procedure described in Soloff et al [15]:

$$ X = a_{0} + a_{1} x + a_{2} y + a_{3} x^{2} + a_{4} xy + a_{5} y^{2} + a_{6} x^{3} + a_{7} x^{2} y + a_{8} xy^{2} + a_{9} y^{3} $$
(9)

where \( X \) is the \( X \)-coordinate of a centroid of circular mark detected in the calibration image, whereas \( x \) and \( y \) are the coordinates of this centroid in the physical space. Thus, coefficients \( a_{0} \)\( a_{9} \) are evaluated from the known physical space coordinates of centroids and the detected coordinates of centroids from the image. Similarly, the mapping function is also calculated for \( Y \)-coordinates of centroids of the circular marks.

The calibration images acquired with and without the transparent liner are processed to detect the centroids of the circular marks. These detected \( X \)- and \( Y \)-coordinates are then used to calculate the mapping functions for image \( X \)- and \( Y \)-coordinates. To estimate the accuracy of the calibration procedure, \( X \)- and \( Y \)-coordinates are back-calculated from the mapping functions using the known physical space coordinates \( x \) and \( y \) of the centroids of circular marks, and overall error is then obtained using equation (3). Here, \( \left( {X_{calc} , Y_{calc} } \right) \) are determined using the mapping functions.

See figure 9 for these errors in the calibration procedure based on mapping functions, and their comparison with the errors when global pixel sizes are used for the calibration. The errors for the images of the calibration target acquired without the liner are comparable in the two cases, i.e. calibration based on mapping functions and based on global pixel sizes. However, for the calibration images taken through the liner, the errors with global pixel sizes are considerably higher than those with the mapping functions at each \( Z \) position. The error in the calibration procedure based on mapping functions for the image of the calibration target at \( Z = 0 \), acquired with the liner, is 0.19 pixel, which is lower than the corresponding error (0.48 pixel) when the global pixel sizes are used. This comparison proves the necessity of using the mapping functions for calibration when viewed through a transparent cylinder in engine flow diagnostics. Thus, in this work, error analysis is performed to quantify the errors in processing the calibration images (i.e. error in centroids detection) and in the calibration procedure when imaged through a transparent engine cylinder. The error in processing the calibration images is found to be 0.02 pixel when images with the circular marks of 7-pixel radius are pre-processed using the Wiener filter and LoG edge detector and then processed using the Späth algorithm to detect the centroids of the circular marks. The error in the calibration procedure utilizing non-linear mapping functions is estimated to be about 0.19 pixel (viewed through the liner) for \( Z = 0 \) position. Overall, results show that the calibration based on mapping functions is required for an accurate reconstruction in the engines flow diagnostics, though calibration based on global pixel sizes, however, is commonly used. Note that more number of data points (or circular marks) on the calibration target are expected to further help in reducing the calibration error based on mapping functions.

7 Conclusions

This work evaluated the error levels in the calibration procedure when imaging through a transparent engine cylinder for flow diagnostics. Synthetic images of a calibration target were generated with different sizes of the circular marks and different SNRs. The images were first pre-processed using the Wiener filter and LoG edge detector, and later processed using the Späth algorithm to detect the centroids of the circular marks. Results showed that the error in centroids detection decreased with the increase in the size of circular mark up to radius of 7 pixel, and then it increased with further increase in circular mark size for all image SNRs considered. Thus, the circular mark size (radius) of 6–8 pixel was found to be optimum for the calibration images. The images of a calibration target were also acquired through a transparent cylindrical liner at five different planes (\( Z = 0, \pm \;3, \pm \;6 \) mm) parallel to the image plane (a common configuration in engine flow diagnostics) to estimate the effect of distortions on the calibration accuracy. The distortions were estimated by comparing the calibration images taken with and without the liner. It was observed that distortions increased with increasing distance (both in positive and negative \( Z \)-directions) from the central plane (\( Z = 0 \)). Also, it was found that distortions in each image increased in \( X \)-direction with increasing distance from \( X = 0 \). To evaluate the effect of distortions on the calibration accuracy, global pixel size (or magnification factor) was calculated using the known physical space coordinates and detected image coordinates of the centroids of two extreme circular marks. Hence error in calibration was determined by comparing the detected image coordinates of the centroids to the image coordinates of the centroids calculated using global pixel sizes. It was found that the error increased with the increase in distortions, i.e. with increasing \( Z \)-position from the central plane (\( Z = 0 \)) both in positive and negative \( Z \)-directions. Additionally, the calibration was performed using non-linear mapping functions and errors were calculated. A comparison of errors in the calibration procedures with mapping functions and with global pixel sizes showed that the error levels in calibration based on global pixel sizes were significant at all \( Z \) positions. The work, thus, quantified the error levels in the calibration procedures and proved the importance of utilizing the non-linear mapping functions for engine flow diagnostics, hence improving the accuracy of directions and magnitudes of the displacement vectors during reconstruction.