InTech uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Computer and Information Science » Computer Graphics » "Image Processing", book edited by Yung-Sheng Chen, ISBN 978-953-307-026-1, Published: December 1, 2009 under CC BY-NC-SA 3.0 license. © The Author(s).

# Image Processing and Concentric Ellipse Fitting to Estimate the Ellipticity of Steel Coils

By Daniel C. H. Schleicher and Bernhard G. Zagar
DOI: 10.5772/7053

Article top

## Overview

Figure 1. Image acquisition setup (a) and typical captured image (b).

Figure 2. The camerase→x,e→y–plane is oriented parallel to the coils front side e→ξ'e→η – plane.

Figure 3. Block diagram of the algorithm to estimate ellipticities. The preprocessing is done at pixel level prior to the ellipticity estimation done at curves level.

Figure 4. Circle parameters for the circular Hough transform. The points on the circle (x,y) in image space is mapped onto a line in the accumulator.

Figure 5. Accumulator and signature curve of the CHT of sample image of Fig. 1b.

Figure 6. Different 3 ×3 erosion masks M1... (a), M2... (b), M3... (c), are used to erode all possible types of ramifications of a thinned binary image.

Figure 7. a) is a cutout of the thinned binary edge imageIt(x,y), which is eroded by the templates shown in Fig. 6. (b) shows only points which are removed. (c) is the cutout of the resultant image Ic(x,y)without ramifications (a)–(b)

Figure 8. The tangential vector of a circular arc is normal to the radius vector. (1) acts as a seed to an elliptic curve, (2) will be removed, (3) will be part of an elliptic curve, if it is connected to a seed point.

Figure 9. Plot of the selected elliptic curve segments Csused for the subsequent ellipticity estimation.

Figure 10. Ellipse fitting of curve segments without any constraints leads to unusable results for the ellipticity estimation problem of a coil.

Figure 11. Between each Δsthick sheet metal layer is a small oil gap Δyand Δxin x and y direction. an and bn are the semi major and minor axes of the nth layer.

Figure 12. Simulation of the ellipticity e=f(n)for different inner ellipticities. (Δy = 0.01 mm,ri = 0.3 m,ro = 1 m, β = (1.005, 1.010, 1.015, 1.020, 1.025,1.030))

Figure 13. Elliptic arc segments are extracted from the image of the coils front side, and used to estimate the ellipticity.

Figure 14. The estimated ellipticities of the arc segments are plotted over the major semi axis.

# Image Processing and Concentric Ellipse Fitting to Estimate the Ellipticity of Steel Coils

Daniel C. H. Schleicher1 and Bernhard G. Zagar

## 1. Introduction

In this chapter a particular image processing problem existing in quality assurance for steel industry is addressed. Since the quality standards in steel industry are ever increasing, even steel industry starts to use machine vision systems to monitor their product quality. In case of steel coils a particular figure of merit in quality is the roundness (ellipticity) or lack thereof of the coil. The mathematical correct measure of the roundness is the eccentricitye=a2b2a, with the major semi axis a and the minor semi axis b. But the fastest way for the quality inspector is just to measure a and b of the coil and calculate their ratioe=ab. If ( exceeds a set limit (≈1.03 measured at the innermost coil layer), the coil is considered as cull. As discussed by Schleicher & Zagar (2008; 2009a) the extraction of elliptic arc segments for the ellipticity estimation and the basic concentric ellipse fitting algorithm are the main parts of the algorithm estimating the coils ellipticity. Comparing to ordinary ellipse fitting tasks that require input data distributed over the whole circumference, the estimation of the ellipse parameters using only data forming low length arcs is a much more challenging problem. To achieve a precise estimation of the ellipticity the fact of the common center of the elliptic arcs is used by the concentric ellipse fitting algorithm to estimate the center of the coil precisely. The functionality of the algorithm is show based upon of real coil images.

Indeed some error sources reduce the accuracy, which are discussed at the end of the chapter. The chapter is organized as follows: First the image acquisition system is described. Then the algorithm is explained consecutively in Sec. 3. Further sources of different errors are investigated in Sec. 4. Finally major results are presented (Sec. 5) and a conclusion (Sec. 6) is given.

## 2. Image acquisition system

The image acquisition setup shown in Fig. 1a consists of a camera placed on a tripod, a laser trigger unit to initiate the acquisition and a laptop to store, process and view the images. A single image frame Iraw(x,y)of the coil is acquired, when the coil transported by a lifting ramp reaches its end position triggering a light barrier. The camera is a 1/2” monochrome firewire camera (AVT Guppy 146–B) with 1392×1040 pixels. Its optical zoom is adjusted so as to image the biggest coil full frame, which has an outer diameter of 2 m. The sheet metal layers are 0.5 to 2.5 mm thick and the inner diameter of each coil is known to be 0.6 m. To ensure a circular image of a truly circular coil, the camera chip plane must be oriented parallel to the coils front side (Scheimpflug condition (Luhmann, 2003, p.147)). Figure 2 shows the camera coordinate system {ex,ey,ec} in relation to the world coordinate system{eξ,eη,eζ}, where theξ,η–plane (coil front side) is kept parallel to theex,ey–plane (camera chip). To assure the correct alignment of the camera, a spirit level was used to do the horizontal alignment (ex,ez–plane). Furthermore the horizontal edges of the coils carrier were used to align the rotation about theey–axis that the coils front side is parallel to the camera chip plane. With this setup the image Iraw(x,y)is acquired and processed by the algorithm in the next section.

#### Figure 1.

Image acquisition setup (a) and typical captured image (b).

### Figure 2.

The camerasex,ey–plane is oriented parallel to the coils front side eξ'eη – plane.

## 3. Algorithm

The block diagram of the algorithm, shown in Fig. 3, reflects the structure of this section. The preprocessing, circular hough transform and extraction of all curve segments Caare applied on the pixel level and then a reduced dataset of selected curve segments Csis used for the ellipticity estimation.

#### Figure 3.

Block diagram of the algorithm to estimate ellipticities. The preprocessing is done at pixel level prior to the ellipticity estimation done at curves level.

### 3.1. Preprocessing

The first preprocessing step is to crop Iraw(x,y)to the region of interest, which fits the biggest coil to capture. Further the unsharp masking sharpening algorithm Eqn 1 (Jain, 1989, pp.249– 251) is used to boost the edges of the coil.

 I(x,y)=Iraw(x,y)+λG(x,y) (1)

where G(x,y) is the discrete Laplacian

 G(x,y)=Iraw(x,y)−14[Iraw(x−1,y)+Iraw(x,y−1)+Iraw(x+1,y)+Iraw(x,y+1)] (2)

of the raw image. The parameter λ determines the sharpening power of the algorithm. Setting λ too large leads to a very noisy image result, since the Laplacian is very sensitive to noise. Since the sharpening process is similar to a high pass filter, any influence of the inhomogeneous natural lighting is reduced.

The next important preprocessing step is the segmentation of the image into background and foreground pixels (front side highlighted in Fig. 1a). Usually this is done by comparing the actual image to a background image only (Zivkovic, 2004). Since only a single image of the coil is available this procedure can not be applied and the results of the circular hough transform are used to first find the coils center and then to segment the coils front side, which is described in the next section.

### 3.2. Circular Hough Transform (CHT)

The circular Hough transform (Illingworth & Kittler, 1987; Peng, 2007; Peng et al., 2007) is a transform mapping points in the x,y–plane belonging to circular slopes into parameter space. Thus filling a so called accumulator. A circle in x,y–space can be described by

 (x−xc)2+(y−yc)2=r2 (3)

In parameter space it is then(xc,yc,r). This 3D parameter space can be reduced to a 2D with(xc,yc), we incorporate the constraint that the vectors, which are normal to the circle boundary, must all intersect at the circle center(xc,yc). Figure 4 illustrates this relation between the circle and its center. These normal directions can be obtained by local gray–level detection operators. The normal direction can also be expressed by

 tanθ=y−ycx−xc (4)

### Figure 4.

Circle parameters for the circular Hough transform. The points on the circle (x,y) in image space is mapped onto a line in the accumulator.

Rearranging Eqn 4 yields

 yc=xctanθ+(y−xtanθ) (5)

and transfers the problem in a form similar to the well known (line) Hough transform (HT). The accumulator of the HT, where the circles centers (x^c,y^c) is determined by the peak, is shown in Fig. 5a. Since the determined center is only a rough estimate (denoted by ˆ), the center(xc,yc). After incorporating the circle center (x^c,y^c) in Eqn 3, the radius can be found by histogramming,r2=(xx^c)2+(yy^c)2. This histogram, also called signature curve, shown in Fig. 5b, is used to obtain an estimate for the inner radius ri aswell as the outer:

### Figure 5.

Accumulator and signature curve of the CHT of sample image of Fig. 1b.

radius ro (marked by a red asterisk). Local maxima in the signature curve are marked with a blue asterisk and signals the presence of a circular shape detected in the front side image.

To reduce the execution time of the CHT algorithm the preprocessed image I(x,y)is resized (down sampled) to 150×170 pixels.

Due to the reduced image size the center estimation is only very rough, though fast. Furthermore the two stage concept causes the error of the center estimate to propagate further to the radius estimation in the signature curve. That’s why the signature curve is not very reliable to return the proper real inner and outer radius, respectively. When no proper radii are found, the maximum coil size is chosen to segment the coil front side, since subsequent selection criteria will be applied to the curves before they are used for the fitting process.

### 3.3. Curve extraction

To extract arc curve segments at least of some of the sheet metal layers the Canny edge detector (Canny, 1986) is applied toI(x,y). As a result this edge detector creates a binarized image It(x,y)with thinned out edges. Due to the hysteresis threshold technique (Nixon & Aguado, 2002) implemented within the Canny edge detector, even weak edges are reliably extracted. As a drawback however, some edges, especially those resulting from rather weak gradients, have ramifications and squiggles that need to be taken care of.

### Figure 6.

Different 3 ×3 erosion masks M1... (a), M2... (b), M3... (c), are used to erode all possible types of ramifications of a thinned binary image.

First the ramifications are removed by erosion (Gonzales & Woods, 2002, pp. 525–527) with the templates shown in Fig. 6 and their permutations by 0 , 90 , 180 and 270 .

 Ic(x,y)=It(x,y)−∑M={M1,M2,M3}∑ϕ={00,900,1800,2700}It(x,y)Θrot(M,ϕ) (6)

### Figure 7.

a) is a cutout of the thinned binary edge imageIt(x,y), which is eroded by the templates shown in Fig. 6. (b) shows only points which are removed. (c) is the cutout of the resultant image Ic(x,y)without ramifications (a)–(b)

After the erosion, the resultant image Ic(x,y)contains only disrupted curve segments, which are remapped from the image matrix onto a curve setCa=c1, . . . ,cj, . . . ,cJ, which contains all extracted curve segments denoted by cj(See Fig. 7). The curve segment cj is a M×2vector containing the curve pixels coordinates.

### 3.4. Curve selection

Since the extracted curve set Caalso contains curves derived from the edges of the coils tapes or packaging labels, which must not be processed in the ellipticity estimation algorithm, these curves must also be remove to increase the quality of the estimators input data. Therefore figures of merits are calculated to select only those that are kept for further processing (Cs)and reject straight lines, rather short and very squiggled curves. Useful figures of merit are the curve length and the extend, which is the ratio between curve bounding box and curve length. Furthermore closed curve segments, with an eccentricity eof the ellipse that has the same second-moments as the region (e= 0is actually a circle;e=1 is an ellipse degenerated to a line segment) over a specific threshold (in this application 0.1 turned out to be useful), are also rejected (Rafael C. Gonzalez, 2003).

### Figure 8.

The tangential vector of a circular arc is normal to the radius vector. (1) acts as a seed to an elliptic curve, (2) will be removed, (3) will be part of an elliptic curve, if it is connected to a seed point.

To select only elliptic arc segments which are part of the coil the scalar product ofnr=r/|r|, the normalized radius vector, and t, the tangential vector, is calculated for each point on each arc curve segment cj. Figure 8 shows two curves with typical cases indicated. Concerning an ideal round coil, the scalar product nrt= 0for each arc segment. Since nr and t are normalized, the range of the result of the scalar product is [0,...,1]. The subsequently applied hysteresis thresholding technique (Nixon & Aguado, 2002) returns only reasonable curve segments for the final ellipticity estimation algorithm.

### 3.5. Ellipticity estimation

To estimate the ellipticity an ellipse fit is applied to the dataset. Curve fitting is an extensive topic and even ellipse fitting is discussed in literature very detailed (Gander et al., 1994; Matei & Meer, 2000b; Leedan & Meer, 2000; Halir, 1998; Ahn et al., 2001; Nair & Saunders, 1996; Liu et al., 2006; Lei &Wong, 1999; Fitzgibbon et al., 1999; Halir, 1998).

The paper written by Gander et al. (1994), was one of the first that covered circle and ellipse fitting using least squares and iterative methods.

Figure 10 shows typical fitting results when applying the general ellipse fit algorithm to the previously extracted arc segment datasetCs. Obviously, the common center of the coil can’t be reliably determined, since the general ellipse fit algorithm is executed only for one arc segment at a time. This renders it necessary to consider additional constraints for the fitting algorithm and adopt it to use the whole dataset with all arc segments simultaneously.

In the following sections first the chosen curve fitting algorithm is described on a general way. Then the general, the simple and the new concentric ellipse fit, which incorporates the fact of the common coil center, is described in more detail.

### Figure 9.

Plot of the selected elliptic curve segments Csused for the subsequent ellipticity estimation.

### Figure 10.

Ellipse fitting of curve segments without any constraints leads to unusable results for the ellipticity estimation problem of a coil.

#### 3.5.1. Curve fitting

Before doing the ellipse fit, a short introduction into curve fitting will be given. Therefore the same notation as proposed by Chernov (2007) will be used.

The principal equation for algebraic curve fitting is

 u(x)TΘ=0 (7)
withu(x) = [u1(x), . . . ,uL(x)]T, which is the data transformed in a problem-dependent manner andQ= [q1, . . . ,qL]T, which contains the L unknown variables. The measured data vector x= [x1, . . . ,xI]Tis an I element long vector, assumed to represent the true data x¯i corrupted by some random noise δxi(here assumed to be normally distributed withN(0,σ2I)).
 xi=x¯i+δxi,i=1,...,I (8)

To estimate Θ the approximate maximum likelihood (AML) method (Chernov, 2007) is used.

 FAML=∑i=1IΘTu(xi)u(xi)TΘΘT[∇xu(xi)][∇xu(xi)]TΘ=ΘTAiΘΘTBiΘ→min (9)

The square matrices Aiand Bidepend only on xi and have the sizeL×L.

 Ai=u(xi)u(xi)T (10)
 Bi=[∇xu(xi)][∇xu(xi)]T (11)

Using these matrices for the representation of the input data many popular schemes can be used to solve the minimization problem:

All of the above algorithms were tested for the concentric ellipse fitting problem and only REN showed unstable behavior. The other algorithms only vary in execution time and achieved accuracy, which is also dependent on the maximum number of iterations and the set tolerances. For additional information about these schemes we refer to Chernov (2007). In the following sections the way to obtain the Aiand Bimatrices, Ñxu(xi)andu(xi), respectively, will be described.

#### 3.5.2. General ellipse fitting

A general ellipse can be described by the equation for the algebraic distance

 Fgeneral(x,y)=Ax2+Byx+Cy2+Dx+Ey+F=0 (12)

To obtain the unknown parameters A,..., F of Eqn 13 the AML method is used. Therefore the equation is written in terms u(x) and Θ.

 x=[x,y]T (13)
 u(x)=[x2,xy,y2,x,y,1]T (14)
 Θ=[A,B,C,D,E,F]T (15)

Further we obtain

 Ai=u(xi)u(xi)T=(xi4,xi3yi,xi2yi2,xi3,xi2yi,xi2xi3yi,xi2yi2,xiyi3,xi2yi,xiyixi2yi2,xiyi3,y4,xiyi2,yi3,yi2xi3,xi2yi,xiyi2,xi2,xiyi,xixi2yi,xiyi2,yi3,xiyi,yi2,yixi2,xiyi,yi2,xi,yi,1) (16)
And
 Bi=[∇xu(xi)][∇xu(xi)]T=(4xi2,2xiyi,0,2xi,0,02xiyi,xi2+yi2,2xiyi,1,0,00,2xiyi,4yi2,0,2yi,02xi,1,0,1,0,00,0,2yi,0,1,00,0,0,0,0,0) (17)
With
 ∇xu(x)=[2x,y,0,1,0,00,x,2y,0,1,0]T (18)

#### 3.5.3. Simple ellipse fitting

The denotation simple ellipse fitting (SEF) is used when the simplest form of an ellipse, with the center at the origin (0,0) and no rotation, is to be fitted. Equation 12 is then simplified to

 Fsimple(u,v)=Au2+Cv2+F=0=v2a2+u2b2=0 (19)

Here a and b are the major and minor semi axes and u and v are the coordinates related to the semi axis of the ellipse. To obtain u and v the ellipse must be centered in the origin thus:

 v=x−xc (20)
 u=y−yc (21)
For Aiand Bicalculated by Eqn 12 we further need
 x=[u,v]T (22)
 u(x)=[u2,v2,1]T (23)
 Θ=[A,C,F]T (24)
and
 ∇xu(x)=[2u,00,2v] (25)

to calculate AiandBi.

#### 3.5.4. Concentric ellipses fitting

The concentric ellipse fit takes the whole dataset Csof the coils elliptic arc segments into account, in contrast to the previously discussed algorithms, which use only one curve segment at a time. Thereby a highly precise center estimation is possible. To achieve this, some simplifications needs to be made:

• The rotation of the ellipses is zero.

• The ellipticity of all elliptic curve segments is equal.

For a typical coil the first assumption is justifiable since mainly the acting force of gravity determines the orientation of the semi major axis to be horizontal. Further the requirement of constant ellipticity for all elliptic curve segments doesn’t hold here exactly and will cause a small error, but the center estimation is not affected by this fact (Schleicher & Zagar, 2009b).

First Eqn 12 is rewritten using the center coordinate (xc,yc)and the semi axes a and b.

 F1(x,y)=1a2(x−xc)2+1b2(y−yc)2−1=0=1a2︸Ax2+1b2︸Cy2−1a22xc︸Dx−1b22yc︸Ey+1a2xc2+1b2yc2−1︸F=0 (26)

Introducing e=ab and factorizing 1b2 leads to

 F1(x,y)=1b2(1e2︸A′x2+1︸C′y2−1e22xc︸D′x−2yc︸E′y+1e2xc2+yc2−b2︸F′) (27)

Concerning Eqn 27 the newly introduced parameters A, . . . ,Eare independent on b, while Fcontains the curve dependent parameter b. Therefore Θ must now be written as

 Θ=[A′,C′,D′,E′,F′1,...,F′j,...,F′J]T (28)

using all curve segments in the dataset s, which is indexed as follows: The dataset contains J curves indexed by j, where curve j has Mj points. A point on curve j is denoted by(xj,m,yj,m), where m is the index of the point (m = 1,...,M). Xi=[xj,m,yj,m]T

When concatenating the curves to the input data vector x a point is addressed by index i.

 x=[x1,1,x1,2,...,x1,M1−1,x1,M1,...,xj,1,...,xj,Mj,...,xJ,1,...,xJ,MJy1,1,y1,2,...,y1,M1−1,y1,M1,...,yj,1,...,yj,Mj,...,yJ,1,...,yJ,MJ]T=[x1,...,xi,...,xIy1,...,yi,...,yI] (29)

Furthermore u(x) must also be extended to

 u(xi)=[xj,m2,yj,m2,xj,m,yj,m,0...,1︸1atindex(j+4),...,0]T (30)

In the general sense we can write

 u(xi)=[xj,m2,yj,m2,xj,m,yj,m,δ(1−j),...,δ(J−j)]T (31)

 ∇xu(xi)=[2xi,0,1,0,0,...,00,2yi,0,1,0,...,0]T (32)

Having u(xi)given the matrices Aiand Biare calculated and Θ is estimated using one of the estimators described in Sec. 3.5.1.

Out of all parameters in Θ jointly estimated the center coordinate (xc,yc) and parameter and b are calculated.

First the parameter vector Θ is normalized so that Cis set 1. By comparison of coefficients the center coordinate (xc,yc)are obtained:

 xc=D′2A′ (33)
 yc=−E′2 (34)

Since the other parameters and b

 e=1A′ (35)
 b=A′xc2+yc2−F′ (36)
 =A′D′22A′2+E′24−F′ (37)

are biased due to the (invalid) assumption of equal ellipticity of all segments the simple ellipse fit (Sec.3.5.3) is done for each curve separately, using the previously estimated center coordinate(xc,yc).

The result of the concentric ellipse fit followed by the simple ellipse fit, where the ellipticity ejfor each curve segment is calculated (shown in Fig.13) and discussed after the error analysis in Sec. 5.

## 4. Error analysis

In the following sections the main error sources which influence the accuracy of the estimated ellipticity will be discussed.

### 4.1. Aliasing

When sampling in spatial coordinates the aliasing effect (Jähne, 2002; Burger & Burge, 2006) is similar to consider as the case in the time domain. To be able to reconstruct a sampled signal the sampling frequency fsmust be larger than twice the largest occurring frequency componentfc. In case of the coil image the thinnest sheet metal layer is 0.5 mm, which meansfc= 0.5 mm/layer. Since the Nyquist criterion is also valid for any orientation the spatial frequencies fcmust be multiplied by 2

 fcd=fc2 (38)

For a coil with a diameter of 2 m a minimum camera chip size of

 2000mm0.5mm/layer2⋅1pixel/layer≈5657pixel (39)

in horizontal and vertical direction, respectively, is needed. This corresponds to a 32 Mpixel camera chip. Even if we neglect 2 –factor for the diagonal layers, we still would require a camera chip with 4000 × 4000 = 16 Mpixel.

Luckily the small axial displacement of the sheet metal layers with respect to each other causes some shadings which can be captured very good avoiding aliasing. Also the roughly–textured cut surface of most thick sheet metal layers improves the possibility to recognize a single layer. In the worst case when a coil has thin layers, these layers appear blurred in the image.

Further the goal is still to estimate the ellipticity and not to capture each layer. Assuming that the arc segment is recognized only by its shadow which extends from one layer to the next (one pixel = 2.5 mm in this setup), the relative error for the ellipticity is bounded by

 fe=Δee=a+Δab−abab=Δaa=0.67% (40)

with the major semi axis a=0.3 mand the arc displacementΔa=2.5 mm. Considering fethis error is quite large for high precise ellipticity estimation.

### 4.2. Camera orientation

One possible error source is the miss–orientation of the camera. As described previously the camera chip plane should be oriented strictly parallel to the coils front side. Even when the setup is build up very carefully using a spirit level and using edges of the coils carrier for the adjustment, an error free orientation can not be obtained. For a circular coil, with radius r and a misalignment angleφ, a rough error estimate can easily be obtained:

 Δe=rrcosφ−1=1cosφ−1 (41)

The angle φ can have any direction, since the semi major axis of the resulting ellipse is always rand the semi minor axis isrcosφ. Assuming φ= 1°leads to an error of 0.0152% and even a larger angle of 5 , which should be possible to underbid when adjusting the camera, leads only to 0.55%.

#### Figure 11.

Between each Δsthick sheet metal layer is a small oil gap Δyand Δxin x and y direction. an and bn are the semi major and minor axes of the nth layer.

The assumption of equal ellipticity for all arc segments made in Sec. 3.5.4 leads to a erroneous . Knowing the dimensions of the coil a simulation of the ellipticity progression can be done using the following model.

Assume an ideal circular coil with the inner radiusri, outer radiusro, metal sheet thickness Δs and initial oil gap Δrbetween the layers (see Fig.11). Approximating the layers of the coil, which in reality are forming an so–called Euler’s–spiral, by concentric circular layers, the radius of the nthlayer r(n)is

 r(n)=ri+n(Δs+Δr) (42)

The assumed maximum number of turns on the coil is

 nmax=(r0−ri)/(Δs+Δr) (43)

When applying a virtual vertically acting force (e.g. gravity) on this coil, it is compressed somewhat flat, the layers get elliptic and the oil gap Δy(n) decreases in vertical direction while Δx(n)increases in horizontal direction. Optionally, the oil gap can be modeled to be smaller at the middle layers, since there is a higher inner pressure caused by the winding action in production, by following equation:

 Δy(i)=Δs[α+(1−α)4(i−nmax/2)2nmax2] (44)

Or, since the oil gap is very small in ratio to the metal sheet thickness, to be a constant settingα=1. For the vertical minor semi axis of the coil we obtain:

 b(n)=ri/β+nΔs+∑i=0nΔy(i) (45)

where β=rib(0) is the compression ratio of the inner radius.

Since the mass of the circular coil mc is equal to the mass of the deformed coilmd, also the cut surface of the metal sheet layers must be the same (ñ... density of steel,w... width of the coil).

 mc=md (46)
 n˜wAc=n˜wAe (47)

The areas are calculated by

Ac(n)=π((r(n)+Δs)2r(n)2)
 Ae(a(n),n)=π((b(n)+Δs)⋅(a(n)+Δs)−b(n)a(n)) (48)

Resolving a(n)using Eqns 48, 49 and 50 we obtain

 e(n)=a(n)b(n)=f(ri,r0,Δs,Δy(n),β,n) (49)

Figure 12 shows two simulations of the ellipticity dependency over the turn number for various coil parameter. The layer dependent oil gap Δy(i)has the most effect on coils with thin metal sheets (see Fig. 12c vs. Fig. 12d). Generally the ellipticity decreases strongest within the first third of the radius. Setting Δy(i) =0.001 mmand smaller gives similar results like shown in Fig. 12a. Since the exact conditions of the pressure distribution in the oil gap is unknown and no proper literature could be found considering this problem, this simulation can only give a qualitative evidence for the ellipticity progression.

### 4.4. Estimation errors

A comprehensive analysis of the estimation errors was done by Schleicher & Zagar (2009b), whose results are summarized in this section shortly. Using synthetic curve datasets, similar to Csthe different estimators where evaluated. First the CEF algorithm was applied onto 1500, 5000 and 20000 synthetic datasets. Then the Euclidean distance between d the true

### Figure 12.

Simulation of the ellipticity e=f(n)for different inner ellipticities. (Δy = 0.01 mm,ri = 0.3 m,ro = 1 m, β = (1.005, 1.010, 1.015, 1.020, 1.025,1.030))

center x¯c= (x¯c,y¯c) and estimated center xc= (xc,yc)was calculated, which corresponds to the error of the center estimation.

 μd=E{‖(x¯c−xc|Alg.)‖2} (50)
 σd=Var{‖(x¯c−xc|Alg.)‖2} (51)

With increasing number of datasets μddecreases, justifying and proofing that the CEF algorithm has no bias. Using the best performing HEIV algorithm an error of 0.00251±0.251 pixel distance to x¯c the was obtained. The variance was very similar for all algorithms and is probably limited by the quantisation of the dataset itself.

Furthermore the SEF algorithm was examined, concerning an erroneous center coordinate as input and arc segments with various center angles and lengths. The result was, that for a center displacement of (1,1) (which is very large in relation toσd) the relative ellipticity error fe=Δee was smaller than 0.2 ± 0.3% for all algorithms (except Taubins) when curve segments with a length longer than 1/25 of their circumference where used. Furthermore arcs symmetric around the ellipses apex lead to larger errors than others.

### Figure 13.

Elliptic arc segments are extracted from the image of the coils front side, and used to estimate the ellipticity.

### Figure 14.

The estimated ellipticities of the arc segments are plotted over the major semi axis.

## 5. Results

Figure 13 shows the results of the algorithm described in Sec. 3. The estimated parameters of the extracted curve segments are used to overlay the ellipses onto the image of the coils front side. Furthermore the estimated ellipticities ejare plotted over their major semi axis ajin Fig. 14. Moreover some possible figures of merits, which could characterize the coils quality, are plotted. Depending on the extracted curve segments, the model of ellipticity progression derived in Sec. 4.3 fits more or less perfect. The main error source results from the low camera resolution, which might be changed in future when the cost of high resolution cameras decrease.

## 6. Conclusion

This chapter introduced the problem of ellipticity estimation on hand of a practical problem. To obtain a good ellipticity estimation proper datasets must be obtained. These datasets are generally not very easy to obtain, for which reason also the preprocessing to extract the datasets was discussed in detail. Since only arc segments could be used for the ellipticity estimation, normal ellipticy fits fail. Hence the estimation was split into two parts, first to estimate the center of the coil with the concentric ellipticity estimator and then to estimate the ellipticity of the arc segments. Using the general approach for the ellipse fit, enables also to use different solver implementations for fitting problems. When discussing the errors, it was accented that a lot of error sources affect the final result. The correct understanding of the partial errors helps to optimize the corresponding section of the algorithm.

## 7. Acknowledgements

At first the authors like to thank N. Chernov and Tao Peng for their support. Furthermore the authors gratefully acknowledge the partial financial support for the work presented in this paper by the Austrian Research Promotion Agency under contract grant 814278 and the Austrian COMET program supporting the Austrian Center of Competence in Mechatronics (ACCM). Last but not least the authors thank the company Industrie Logistic Linz (ILL) for its financial and technical support.

## References

1 - S. J. Ahn, W. Rauh, H. Warnecke, J. , 2001 Least-squares orthogonal distances fitting of circle, sphere, ellipse, hyperbola, and parabola, Pattern Recognition 34 12 22832303 .
2 - W. Burger, M. J. Burge, 2006 Digitale Bildverarbeitung. Ein Einführung mit Java und ImageJ, 2 edn, Springer.
3 - J. Canny, 1986 A computational approach to edge detection, IEEE Trans. Pattern Anal. Mach. Intell. 8 6 679698 .
4 - N. Chernov, 2007 On the convergence of fitting algorithms in computer vision, J. Math. Imaging Vis. 27 3 231239 .
5 - W. Chojnacki, M. J. Brooks, A. Hengel, D. Gawley, 2001 Rationalising the renormalization method of Kanatani, J. Math. Imaging Vis. 14 1 2138 .
6 - W. Chojnacki, M. J. Brooks, A. Hengel, D. Gawley, 2004 From FNS to HEIV: A link between two vision parameter estimation methods, IEEE Transactions on Pattern Analysis and Machine Intelligence 26 2 264268 . URL: http://www2.computer.org/portal/web/csdl/doi/10.1109/TPAMI.2004.1262197
7 - W. Chojnacki, M. J. Brooks, A. Hengel, D. Gawley, 2005 FNS, CFNS and HEIV: A unifying approach, J. Math. Imaging Vis. 23 2 175183 . URL: http://www.springerlink.com/content/q1213191kjg81275/
8 - A. Fitzgibbon, M. Pilu, R. Fisher, 1999 Direct least square fitting of ellipses, IEEE Transactions of Pattern Analysis and Machine Intelligence 1 474480 .
9 - W. Gander, G. Golub, R. Strebel, 1994 Least-square fitting of circles and ellipses, BIT 558578 .
10 - R. C. . Gonzales, R. E. Woods, 2002 Digital Image Processing, 2nd Edition, Prentice Hall.
11 - F. Halir, 1998 Numerically stable direct least squares fitting of ellipses, Proc. of the 6th International Conference in Central Europe on Computer Graphice, Visualization and Interactive Digital Media 1 125132 .
12 - J. Illingworth, J. Kittler, 1987 The adaptive hough transform, IEEE Trans. Pattern Anal. Mach. Intell. 9 690698 .
13 - B. Jähne, 2002 Digitale Bildverarbeitung, 5 edn, Springer.
14 - A. K. Jain, 1989 Fundamentals of Digital Image Processing, Prentice-Hall, Inc., Upper Saddle River, NJ, USA.
15 - K. Kanatani, 1997 Statistical optimization and geometric visual inference, AFPAC ‘97: Proceedings of the InternationalWorkshop on Algebraic Frames for the Perception-Action Cycle, 1 Springer-Verlag, London, UK, 306322 .
16 - K. Kanatani, 2005 Further improving geometric fitting, Proc. 5th Int. Conf. 3-D Digital Imaging and Modeling 1 213 . URL: http://www2.computer.org/ portal/web/csdl/doi/10.1109/3DIM.2005.49
17 - K. Kanatani, 2008 Statistical optimization for geometric fitting-theroetical accuracy bound and high order error analysis, Int J Comput. Vis 80 167188 .
18 - Y. Leedan, P. Meer, 2000 Heteroscedastic regression in computer vision: Problems with bilinear constraint, Int. J. Comput. Vision 37 2 127150 . URL: http://www.springerlink.com /content/w5g6738021123286/
19 - Y. Lei, K. Wong, 1999 Ellipse detection based on symmetry, Pattern Recognition Letters 20 4147 .
20 - Z. Liu, Y. , H. Qiao, L. Xu, 2006 Multisets mixture learning-based ellipse detection, Pattern Recognition Letters 39 731735 .
21 - T. Luhmann, 2003 Nahbereichsphotogrammetrie- Grundlagen, Methoden und Anwendungen, 2 edn, Wichmann.
22 - B. Matei, P. Meer, 2000a A general method for errors-in-variables problems in computer vision, In Proceedings, CVPR 2000, IEEE Computer Society Conference on Computer Vision and Pattern Recognition, IEEE Computer Society Press, 1825 .
23 - B. Matei, P. Meer, 2000b Reduction of bias in maximum likelihood ellipse fitting, Pattern Recognition, 2000. Proceedings. 15th International Conference on, 3 794798 vol.3. URL: http://ieeexplore.ieee.org/xpls/abs all.jsp?arnumber=903664 http://www.citeulike.org/user/jfmenudet/article/1639184
24 - P. S. Nair, Saunders Jr, A. T. , 1996 Hough transform based ellipse detection algorithm, Pattern Recognition Letters 17 777784 .
25 - M. S. Nixon, A. S. Aguado, 2002 Feature Extraction and Image Processing, 1 edn, Newnes.
26 - T. Peng, 2007 Detect circles with various radii in grayscale image via hough transform, MATLAB Central File Exchange.
27 - T. Peng, A. Balijepalli, S. Gupta, T. Le Brun, 2007 Algorithms for on-line monitoring of micro spheres in an optical tweezers-based assembly cell, Journal of Computing and Information Science in Engineering 7.
28 - C. Rafael, Woods. Gonzalez, E. Richard, E. S. L. , 2003 Digital Image Processing Using MATLAB, Pearson Prentice Hall.
29 - D. C. H. Schleicher, B. G. Zagar, 2008 Image processing to estimate the ellipticity of steel coils using a concentric ellipse fitting algorithm, Proc. of the 9th. International Conference on Signal Processing (ICSP08), 1 12031211 .
30 - D. C. H. Schleicher, B. G. Zagar, 2009a Ellipticity estimation on steel coils, Proceedings of the 9th International Conference on Quality Control by Artificial Vision.
31 - D. C. H. Schleicher, B. G. Zagar, 2009b Error analysis and enhancing of the ellipticity estimation of steel coils. Accepted for IECON09.
32 - G. Taubin, 1991 Estimation of planar curves, surfaces, and nonplanar space curves defined by implicit equations with applications to edge and range image segmentation, IEEE Trans. Pattern Anal. Mach. Intell. 13 11 11151138 .
33 - Z. Zivkovic, 2004 Improved adaptive gausian mixture model for background subtraction, Proceedings of the International Conference on Pattern Recognition, 2 2831 .