Image Anal Stereol 2005;24:95-104 Original Research Paper CHARACTERIZATION OF DIESEL SPRAY IMAGES USING A SHAPE PROCESSING METHODOLOGY Cecile Petit1,2, Wolfgang Reckers2, Jean-Marie Becker1,3 and Michel Jourlin1 1TSI Laboratory (Traitement du Signal et Instrumentation, UMR 5516 CNRS, Saint-Etienne, France); 2Delphi (Technical Center Luxembourg); 3CPE Lyon (Ecole Supérieure de Chimie, Physique, Electronique, Lyon, France) e-mail: cecile.petit@delphi.com, wolfgang.reckers@delphi.com, becker@cpe.fr, michel.jourlin@univ-st-etienne.fr (Accepted April 25, 2005) ABSTRACT In Diesel engines, a key element in achieving a clean and efficient combustion process is a proper fuel-air mixing, which is a consequence of the fuel spray development and fuel-air interaction inside the engine combustion chamber. The spray structure and behavior are classically described by the length (penetration) and width (angle) of the spray plume but these parameters do not give any clue on the geometrical injection center and on the spray symmetry. The purpose of this paper is to find out original tools to characterize the Diesel spray: the virtual spray origin is the geometrical injection center, which may (or may not) coincide with the injector axis. Another interesting point is the description of the Diesel spray in terms of symmetry: the spray plume internal and external symmetry characterize the spray and the injector performance. Our approach is first to find out the virtual spray origin: after the image segmentation, the spray is coded with the Freeman code and with an original shape coding from which the moments are derived. The symmetry axes are then computed and the spray plumes are discarded (or not) for the virtual spray origin computation, which is derived from a Voronoi diagram. The last step is the internal and external spray plume symmetry characterization thanks to correlation and mathematical distances. Keywords: Diesel sprays, Freeman coding, image processing, moments, symmetry, Voronoi diagram. INTRODUCTION The key element of combustion engines is their combustion chamber. In a Diesel combustion chamber, the injector is usually placed at the top of the chamber, delivering fuel inside it. When the piston moves up, temperature and pressure raise, the spray evaporates and the swirl transports the fuel droplets and the vapor. Fig. 1. A Diesel combustion chamber. Present day investigations about Diesel sprays all aimed at the reducing of pollutant emissions, without harming efficiency. Ideally, the spray should not hit the chamber walls, avoiding thus the creation of pollutant emissions, but should penetrate enough inside the chamber for providing the right mixing between air and fuel. Classically, the individual spray plumes penetration and angle (as defined on Fig. 2) are computed to understand the spray evolution inside the combustion chamber in terms of length and width. Empirical relations between these parameters have been established in Lefebvre (1989). Fig. 2. A Diesel spray with five plumes. The penetration and angle are represented on plume 1. The Virtual Spray Origin (VSO) is defined as an ideal intersection point of the spray plumes symmetry axes. 95 Petit C et al: Characterization of Diesel spray images using a shape processing methodology The automated calculation of these parameters relies on an accurate determination of the virtual spray origin (VSO). Moreover, the comparison between the respective positions of the VSO and the “true” injector axis should provide an evaluation of the Diesel spray, as in the perfect case the injector axis and the VSO are coincident. Other spray parameters may be defined in order to characterize individual spray plumes or to compare spray plumes: internal and external symmetry tools provide information about the fuel flow and the injector performance. Indeed, when the internal and external symmetry of a single spray plume is perfect, it indicates not only a symmetric flow but also an efficient injector design regarding those parameters. The comparison spray plume to spray plume quantifies the flow similarity coming out of the injector, its design symmetry and performance. This paper presents a method to compute the virtual spray origin of a Diesel spray which is the injection center, then different tools to characterize the spray plume internal and external symmetry are presented. The virtual spray origin calculation was first done manually in Le Visage et al., (1997) but this method was subjective and not accurate. Then, an algorithm based on a sliding mask positioning was developed by Lliasova et al., (1998), but when the spray plumes positions change, the virtual spray origin would be shifted (hence would not correspond to the real origin). Concerning the spray plumes symmetry study, the authors have not found any reference on the topic in the literature. THE STATE OF THE ART IN DIESEL SPRAYS IMAGING Different optical techniques permit to obtain quantitative or qualitative information about fuel liquid and vapor. Several visualization techniques exist, as backward or forward scattering, holography, tomography, endoscopic measurements, Fraunhofer diffraction. The articles by Chigier (1991) and Hiroyasu et al., (2002) review in depth existing techniques for liquid and/or vapor phases visualization, providing (or not) the concentration information. Backward or forward methods are mainly used to assess in a qualitative way the spray liquid phase. Its principle relies on the Mie theory explained in Van de Hulst (1957) based on the scattering of light by spherical droplets. The qualitative observation of the vapor phase can be done thanks to the Schlieren technique, which permits the observation of the refractive index gradient. The Background Oriented Schlieren (BOS) is described in Richard et al., (2001). Quantitative liquid and vapor phases visualizations are possible using Laser Induced Exciplex Fluorescence (LIEF) presented in Kim et al., (2001). This method, using a dopant, provides simultaneously the concentration of the liquid and of the vapor phases, using the excitation of these phases by an excimer laser causing the fluorescence of the liquid and vapor at different wavelengths. Another method referred to as the Laser Absorption Scattering technique (LAS) described in Zhang et al., (2003), permits the observation of the droplets and the vapor distributions thanks to the measurement of the droplets optical thickness (visible light) and to the joint vapor and droplets optical thickness (ultraviolet light). This dual wavelength method needs 1-3 dimethyl -naphthalene as test fuel which strongly absorbs ultraviolet light and is nearly transparent to visible light. METHODS IMAGE ACQUISITION DEVICE. The device used is schematized on Fig. 3. It is based on the backward scattering of light by the fuel droplets presented in Chigier (1991), giving qualitative information about the liquid phase. Fig. 3. The optical device used for image acquisition. The pulse generator delivers a reference signal to the injector driver box and the imaging system, which then triggers the light source and the CCD camera. Images are taken during the light flashes. IMAGE PROCESSING STEPS. Raw images are affected by background grey levels, inhomogeneous illumination and noise. They require a pre – processing. A background image can 96 Image Anal Stereol 2005;24:95-104 be subtracted from the raw image, and then a reference image (taken with a uniform white screen) is used to decrease the effect of non-homogeneous illumination. Additional filtering may be necessary; median filter can as well be used carefully because the contrast is sensitive to filtering. The next step is segmentation. The spray object is determined using Entropy Maximization method defined in Pun (1981). The principle of this segmentation is the maximization of the image entropy (in the Shannon sense). Then the inside boundary of the objects is calculated with a sliding pattern, and afterwards coded with a Freeman 4 – code presented in Freeman (1974). (a) (b) Fig. 4. (a) A shape contour coding with the Freeman 4 - code and the edges indexing. (b) The vertices indexing. VIRTUAL SPRAY ORIGIN (VSO) CALCULATION VSO is based on the spray plumes symmetry axes computation. Indeed, all the axes of regularly shaped sprays (elongated spray plumes), should approximately meet at the VSO vicinity (see Fig. 2): A raw virtual spray origin (RVSO) is first determined as the barycenter of the symmetry axes intersections; then the accurate virtual spray origin (AVSO) is found using the Voronoi diagram. In order to compute the RVSO, the spray plumes symmetry axes have to be determined. The symmetry axis of a regular 2D object should be the primary principal axis. By definition, the secondary principal axis is perpendicular to the first one intersecting it into the shape’s center. These two principal axes define the dispersion of the shape in two dimensions. They can be simultaneously obtained by minimization of inertia J about an axis ? (dist refers to distance). Freeman (1974) described a computation of the shape’s moments of inertia of order (p, q) using Freeman 4 – code. The approach taken here is more general but it is described in detail. (a) (b) (c) Fig. 5. (a) Input spray plume and its principal axes. (b) Segmented image. (c) Freeman 4 - code of the spray plume and its principal axes. Inertia J is calculated with this formula: J= \\[dist(P(x,y),axisA)]2dxdy. (1) Peobject Using the parametric definition of a line (0,p), Eq. 1 becomes: J= tf(xcosO + ysinO-p)2dxdy. (2) (x,y)eS The issue is to find 0 and p such that J is minimal, or more generally, extremal. Let us consider a closed contour coded with the Freeman 4 - code. This closed contour has an even number of edges (2n), its vertices are S0, S1, …, S2n-1 (with S0 = S2n). Concerning the initialization, S0(x0, y0) is chosen as one of the vertices (there may be more than one such point) which is reached on its north side and left on its east side. The vertices are indexed according to an anticlockwise direction. An even index vertex S2k has (xk, yk) as its coordinates, an odd index vertex S2k+1 has (xk+1, yk) as its coordinates (see Figs. 4a,b). In this way the sequence of vertices is: {S0 x 0,y^Six1, y 0 , S 2 x 1,yX.., S 2^Axn ,y^)}. (3) 97 Petit C et al: Characterization of Diesel spray images using a shape processing methodology By definition, the shape moment of order (p,q) is: I = pq ^xpyqdxdy, (4) (x;y ^object which can be shown to be (using the preceding coding scheme): I = pq _____1_____^ x k +1fy x1yk k+1 k+1 yk ) (5) We emphasize the fact that the shape we consider is an object with a “continuous” meaning, not just a discrete set of pixels: it is the subset of the place delimited by the Freeman - coded boundary. Using these notations, the expansion of Eq. 2 gives (with X = (x1,x2,x3)= (cos0,sin0,-p): J = XTAX [cos6> sin6> -p] I 20 I 11 I 1 11 02 I 0 I 10 I 01 rcosè sin« .(6) The problem is to minimize XTAX under x12 + x22 = 1 constraint. Let us consider the following matrixes A = det(A).A_1 (adjoint matrix of A) and matrix K (which plays a technical role): \a b d bce d e f c = I I -I2 20 00 01 e = II -II b = II 1001 d = II 1110 20 01 f = I20I 11 01 20I02 I 11I 00 I 02I 10 (7) K [1 0 0] 0 1 0 0 0 0 (8) The problem is equivalent to minimizing XTAX under the constraint \KX\ = 1. Using a Lagrange multiplier described in Strang (1986), we can replace this minimization by: AX = AKX 1 X OX A <=> juX = A-1KX, AadKX (9 for a certain µ. In this way X appears as an eigenvector associated with eigenvalue µ of the following: [a b 0] B = AadK (10) Let us attribute the following names: \a bl b c , [d e]. M VT (11) (12) Let Xk (k = 12) be an eigenvector of M associated to (non zero !) eigenvalue ?k. It is easy to verify that 2 X ^kk AkVTXk (which belongs to R3) is an eigenvector [cos èl of B possessing the desired structure sin, p if X = 1 which is always is taken such that Ak\\Xk\ possible. We do not give here the computational details of how to obtain Xk and Xk because they are quite standard. From here, we obtain: 0 = polar angle of Xk and p = -AkVTXk. SPRAY PLUMES DISCARDING The principal axes calculation works well on regular shaped spray plumes. Concerning irregular shaped spray plumes, Fig. 7e clearly shows a typical case where some irregular shaped spray plumes must be discarded for the RVSO calculation in order to be reexamined later on, once the AVSO has been determined. Once the first and second inertia axis are determined, their inertia J’ and J” can be readily obtained using Eq. 6. Discarding spray plumes can be done e.g. by computing J”/J’ ratio. If the ratio is large (J”/J’ >> 1) the corresponding plume is kept, otherwise the ratio is close to one and the spray plume is discarded. _ _ _ p _ 2 11 _ 98 Image Anal Stereol 2005;24:95-104 Once this discarding process is done, the non discarded main axes intersect at different points; their barycenter is the RVSO. ACCURACY ENHANCEMENT WITH THE VORONOI DIAGRAM By definition, the AVSO should be the nearest point to the spray plumes. In the Voronoi diagram, each Voronoi vertex is the nearest point to three sites. Thus the Voronoi vertex barycenter is the nearest point to the set of sites. In our case, this principle may be applied; the sites would be the spray plumes starting points (calculated thanks to the RVSO), the AVSO is then the barycenter of the Voronoi diagram vertices. An example is given in Fig. 6, with labeled spray plumes and cells. (a) (b) Accurate virtual spray origin (c) Fig. 6. (a) Labeled spray plumes after sorting. (b) Zoom on image (a). (c) Labeled Voronoi diagram of the spray plumes starting points. RESULTS AND DISCUSSION EXAMPLES OF THE INERTIA AXES AND OF THE AVSO CALCULATIONS In Fig. 5, the first image is an input single spray plume. The binary image is computed, and then the Freeman 4 - code defined in Freeman (1974) of the shape is derived and the first and second principal axes are determined. Examples of the AVSO calculation may be observed in Fig. 7. AXES RECALCULATION FOR DISCARDED SPRAY PLUMES As explained before, some spray plumes may have been discarded for the RVSO calculation. It may be interesting to calculate the first principal axis of these discarded spray plumes, knowing that this axis should minimize inertia J (Eq. 6), with the constraint that AVSO should belong to this axis. If (x0,y0) are the AVSO coordinates, the parametric representation (?, p) of the corresponding axis is determined by: dJ To 0 (13) x0cosO + y0sinO-p = 0 It can be shown that a solution of Eq. 13 is: tanf C with: 1 0 = -Arc p = x0cos6 + y0sin6, A = I20 + x20I00-2x0I10 B = I02+y20I00-2y0I01 C = 2(I 11+y0x0I00-y0I10-x0I01 (14) (15) (16) Fig. 7c shows the initial principal axis and the revised principal axis (the AVSO belongs to it). 99 Petit C et al: Characterization of Diesel spray images using a shape processing methodology (a) — Recalculated principal axis — Initial principal axis (b) (c) R for regular shaped spray plumes I for irregular shaped spray plumes (d) between themselves which could indicate the similarity between two spray plumes. Furthermore, the spray uniformity could be derived calculating a single correlation (or distance) for the whole spray. The spray plume interior can be analyzed using one of the distances (17), (18), (19). h(u, v) (resp. q(u, v)) is the grey level of the (u, v) pixel in the first (resp. second) image. d1 = 1 *Z\h(u,v)-q(u,v], (17) d2 = d -2^{h{u,v)-q{u,v)) n u,v sup§h(u,v)-q(u,v\), (18) (19) n refers to the number of couples (h(u,v),q(u,v)). A symmetrized spray plume with respect to its axis is calculated; then the input spray and the symmetrized spray plume are compared pixel to pixel as shown on Fig. 8. (a) (e) (f) Fig. 7. Application of the AVSO calculation. (a), (c) and(e) are input images, (b), (d) and (f) are the respective binary image. In (c), one plue is irregular shaped, so its axis is not used for the RVSO calculation, the recalculated axis, processed after the AVSO calculation is presented. In (e), the first principal axes for regular and irregular shaped spray plumes are represented. INTERNAL SYMMETRY OF A SINGLE SPRAY PLUME The spray plumes principal axes have been calculated beforehand. Now, it would be interesting to know the single spray plumes symmetry by comparing their interior and exterior. Note that the tools presented in this part could be used to compare spray plumes (b) Fig. 8. (a) Input spray plume. (b) Symmetrized spray plume with respect to the axis. The correlation coefficient measures the degree of similarity between two sets of data. In our application, the first image (x) refers to as the input spray plume and the second image (y) refers to as the perfectly symmetric spray plume with respect to the axis (see Fig. 8). Between these two images, one half part is n u,v u,v 100 Image Anal Stereol 2005;24:95-104 completely equal (as the mirror spray plume has been created, see Fig. 8b), so the correlation will only depend on the two different half parts, thus it amounts to the computation of the correlation coefficient between the two initial half parts of the input spray plume. Let us define the ascending order of the first image grey levels’ x1 < ...