Globally Stabilized 3L Curve Fitting Turker Sahin and Mustafa Unel Department of Computer Engineering, Gebze Institute of Technology Cayirova Campus 44 Gebze/Kocaeli Turkey {htsahin,munel}@bilmuh.gyte.edu.tr Abstract. Although some of the linear curve fitting techniques provide improvements over the classical least squares fit algorithm, most of them cannot globally stabilize majority of data sets, and are not robust enough to handle moderate levels of noise or missing data. In this paper, we apply ridge regression regularization to strengthen the stability and robustness of a linear fitting method, 3L fitting algorithm, while maintaining its Euclidean invariance. Introduction Implicit polynomial (IP) models have proven to be more suitable than parametric representations for fitting algebraic curves to data with their advantages like global shape representation, smoothing noisy data and robustness against occlusion [,,3,4,5,6,7,8]. Nonlinear optimization methods have been commonly applied for IP curve modelling; however, they suffer from high computational complexity and cost [,3,4]. Recently linear approaches to curve fitting have started to emerge, which address such problems [9,,]. However, these techniques usually cannot provide globally stabilized fits for many cases and are not robust versus perturbational effects like noise. In this paper as a way to overcome these problems, we apply ridge regression regularization to the 3L fitting method. We have observed that the ridge regression regularization of Gradient method expressed in [] does not provide satisfactory results for reasons like oversensitivity to changes in parameters and normalization. We have obtained better results with regularization of 3L, which we present for verifying the noticeable improvements in global stability and robustness, as well as insensitivity to parameter changes. Implicit Curve Models and Data Set Normalization. Algebraic Curves Algebraic curves are represented by implicit polynomial models of arbitrary degree, n, as: f n (x, y) =a + a x + a y +...+ a n x n + a n, x n y +...+ a n y n A. Campilho, M. Kamel (Eds.): ICIAR 4, LNCS 3, pp. 495 5, 4. c Springer-Verlag Berlin Heidelberg 4
496 T. Sahin and M. Unel Fig.. The 3 Levels of data for a free from boundary = [ xy... y n] [ ] T a a a... a n = Y T A = () }{{}}{{} Y T A where Y T is the vector of monomials and A is the vector of IP coefficients.. Normalization An important concept integrated into many fitting methods is data set normalization to reduce the pathological effects in the resulting IP s, which usually arise because of their high degree terms taking large values. In our experiments radial distance normalization is used. This is a linear process, based on dividing every data point, (x i,y i ) N i=, with the average radial distance of the set i (x i + y i )/ after the center of data has been shifted to origin. It has been N observed to give better results than other proposed normalizations [] in our experiments. 3 The 3L Linear Fitting Method The objective of all linear IP curve fitting techniques is to approximate a given data set with a polynomial as closely as possible by minimization of their algebraic distance. The adopted 3L algorithm [9] uses the following principle for this minimization procedure: closed-bounded IP s should have zero values at the data points, negative values for inside points and positive values for outside points, or vice versa. Thus any data set to be curve fitted is first integrated with two more data sets with points at a distance, inside and outside the original data as in figure. Accordingly the IP function is forced to take + value at the outer layer, at the inner level, and at the intermediate layer. Thus a b vector and the matrix of 3 layers of data as M is prepared such that: b = [ +... +...... ] T (3N ), M = M + M M = Y T Y T... Y T 3N 3N c
Globally Stabilized 3L Curve Fitting 497.5.5.5.5.5.5.5.5.5.5.5.5 Fig.. Some stable 4th and 6th degree 3L fits.5.5.5.5.5.5.5.5.5.5.5.5 Fig. 3. Examples of unstable 3L fits (a) a 4th degree fit for a B plane (b) 6th degree fit of a Shoe; and (c) 8th degree for a Glider where Y i are the vectors of monomials for the 3 layers of data, N is the number of data points, n is the degree of polynomial and c =(n + )(n +)/ isthe number of the coefficients of the IP curve. The resulting curve coefficient vector is obtained by: A = M b () where M =(M T M) M T is the pseudo-inverse matrix for M. This method is Invariant under Euclidean transformations, as the two synthetic layers is formed by using the distance measure. 4 Global Stability by the Ridge Regression Regularization Linear curve fitting techniques achieve local stability around the data points; however, are weak in providing global stability. A reason for this is the near collinearity in the data, which cause the M T M matrix of products of the monomials to be almost singular with some eigenvalues much smaller than the others. Such eigenvalues do not contribute to the fit around the data set and cause extra open unstable branches. Ridge regression is a computationally efficient method for reducing data collinearity and the resulting instability []. By this technique, the condition number of M T M is improved, and the extra curves are moved to infinity, where they disappear giving a stable closed bounded fit. To achieve this, a κd term is applied to equation ( ) as: A κ =(M T M + κd) M T b (3)
498 T. Sahin and M. Unel Here κ is the ridge regression parameter, which is to be increased from to higher values until a stable closed bounded curve is obtained. The other part of the ridge regression term is the diagonal D matrix, which has the same number of terms as the the coefficient vector, A κ. The entries of D can be obtained by: j!k! D ii = β j+k (j + k)! (4) where the index for each diagonal element is calculated according to variation of the degrees of the x and y components in equation ( ) by i = k+ (j+k)(j+k+) +. Also β j+k is chosen to be : β j+k = r,s ;r+s=j+k (r + s)! r!s! N l= x r l yl s (5) or when expanded: β =!!! l β = β = N x 4 l +!!! N x l yl = N l= x l + yl = l= l. l β n = l x l y l +!!!. (x k + y k). (x l + y l ) n yl 4 = l l (x l + y l ) with n the degree of the resulting IP and (x l,y l ) N l= are the elements of the normalized object data. As a result the entries of D are set to the invariantly weighted sum of the diagonal elements of M T M, which is an Euclidean invariant measure. Therefore inherent Euclidean invariance properties of fitting methods are preserved by this approach. 5 Experimental Results and Discussion In this section many fits obtained from ridge regression technique are compared to those of non-regularized 3L, to depict the resulting stability and robustness improvements. The 3L fitting technique occasionally gives reasonable results. Some examples are a boot, a Racket and a Siemens mobile phone in Figure. Here the boot is a 6th degree fit example, while the others are 4th degree IP s. However, generally this fitting method has weak global stability properties, which cause significant problems for applications. One related issue is that usually a
Globally Stabilized 3L Curve Fitting 499.5.5.5.5.5.5.5.5.5.5.5.5 Fig. 4. Stabilization of the B plane fit by ridge regression method: (a) κ = 4 (b) κ =5 4 (c) κ = 3.5.5.5.5.5.5.5.5.5.5.5.5 Fig. 5. Stabilization of the Shoe fit by ridge regression method: (a) κ = 4 κ =5 4 (c) κ =.5 3 (b).5.5.5.5.5.5.5.5.5.5.5.5 Fig. 6. Stabilized 8th degree Glider fit by ridge regression method: (a) κ = 4 (b) κ =4 4 (c) κ =5 4 Fig. 7. The regularized fit for Cd Box of (a) =. (b) =.7. Stabilizing κ = 4 3 for both cases data to be modelled can be fit stably by IP s of one or two different degrees, but not by others. For example, among the objects in Figure, the boot does not have stable 4th or 8th degree fits, while the racket cannot be stabilized above 6th degree IP s. A further problem is this method cannot cannot give stable fits for many important data at all. Some examples are depicted in Figure 3. These curves are with a 4th degree IP for the B plane, 6th degree for the shoe and 8th degree for the glider. Each of these data cannot be stabilized for fits of either
5 T. Sahin and M. Unel.5.5.5.5.5.5.5.5.5.5.5.5 Fig. 8. Robustness improvement of ridge regression method versus noise. First row depict the degradation of 3L Vase fit, and the second row is the robustness of ridge regression based fit, both subjected to no noise in left subplots; moderate noise of σ =.75 in the middle; and much higher noise of σ =. in the right..5.5.5.5.5.5.5.5.5.5.5.5 Fig. 9. The robustness of regularized curve fitting approach against Occlusion: In the first row plots, the left one is data is with no occlusion, middle is with % occlusion, and right is with % occlusion; In the second row are the corresponding fits. 4th or 6th or 8th degrees, but they were modelled by IP s of one of these three degrees for more compact examplification. All data data in Figure 3 can be globally stabilized by ridge regression regularization, which is depicted in figures 4-6. Again these are 4th, 6th and 8th degree fits for the B, the shoe and the glider which indicate the ability of this technique to model data with various degree curves. As presented in their subplots, when the κ parameter is increased from zero to the range 4, the extra unstable curves tend to move away from the actual data set and disappear. The insensitivity of ridge regression based 3L method to variations in the parameter is examplified in Figure 7 for two CD Box fits of =. and
Globally Stabilized 3L Curve Fitting 5 Fig.. Some globally stabilized curves of marine creatures and man-made objects. The first four objects are modelled by 8th degree, the next six of them are modelled by 6th degree and the last two are modelled by 4th degree algebraic curves.7. As observable these fits cannot be distinguished from each other; moreover the stabilizing κ s are the same for both cases. Thus a single can be used for modelling all data sets. In deed, =.5 has been used in all other example figures. Robustness of the this approach has also been verified by fits to noisy and occluded cases. Figure 8 shows the improvement in robustness against noise by ridge regression application over the 3L only case. Here the top row is the nonregularized fits, while the second row is the ridge regression based fits. Also the left subplots depict noise free cases; the middle plots are with moderate noise level of σ =.75; and the right ones are for the much higher noise of σ =.. It can be observed the vase data can be stably fit in presence of much higher noise levels with ridge regression technique, which verifies the remarkable robustness of this technique to Gaussian perturbations. In figure 9 robustness of this regularization for occlusion or data loss has been examplified. The first row depict the employed car data for cases of no occlusion, % of data chopped, and % occlusion from left to right. The lower row shows the corresponding curve fits to each case, which are all stable and very near to each other in shape. Thus this method can also be applied to cases of missing data with reasonable accuracy. Finally we present 4 8th degree fits of various objects in Figure. Nearly all these data could be globally stabilized using κ values of no more than 5 3 and none require κ s more than, which indicate the strong global stabilizability properties of this method. 6 Conclusions The ridge regression Regularization dramatically improves the poor global stability properties of the 3L technique it has been applied. Thus by application of this global stabilization method, a much wider range of data can be accurately fit by IP s of all degrees. Ridge regression also improves the robustness of curves
5 T. Sahin and M. Unel to occlusion and especially noise significantly. The parameter tuning process of this approach is also much simpler, as it is much less sensitive to parameter and normalization changes. Moreover, this method preserves the Euclidean invariance, thus should be very suitable for many important applications in motion identification, pose estimation and object recognition. Acknowledgments. This research was supported from GYTE research grant BAP #3A3. The data of employed marine creatures are courtesy of University of Surrey, UK. References. M. Pilu, A. Fitzgibbon and R. Fisher, Ellipse Specific Direct Least Squares Fitting, Proc. IEEE, International Conference on Image Processing, Lausanne, Switzerland, September 996.. G. Taubin, Estimation of Planar Curves, Surfaces and Nonplanar Space Curves Defined by Implicit Equations with Applications to Edge and Range Segmentation, IEEE TPAMI, Vol. 3, pp. 5-38, 99. 3. G. Taubin, et al. Parametrized Families of Polynomials fo Bounded Algebraic Curve and Surface Fitting, IEEE Transactions on Pattern Analysis and Machine Vision, 6(3):87-33, March 994. 4. D. Keren, D. Cooper and J. Subrahmonia, Describing Complicated Objects by Implicit Polynomials, IEEE Transactions on Pattern Analysis and Machine Vision, Vol. 6, pp. 38-53, 994. 5. W. A. Wolovich and M. Unel, The Determination of Implicit Polynomail Canonical Curves, IEEE TPAMI, Vol. (8), 998. 6. M Unel and W. A. Wolovich, On the Construction of Complete Sets of Geometric Invariants for Algebraic Curves, Advances In Applied Mathematics 4, 65-87,. 7. M Unel and W. A. Wolovich, A New Representation for Quartic Curves and Complete Sets of Geometric Invariants, International Journal of Pattern Recognition and Artificail Intelligence, Vol. 3(8), 999. 8. J. Subrahmonia, D. B. Cooper and D. Keren, Practical Reliable Bayesian Recognition of D and 3D Objects using Implicit Polynomials and Algebraic Invariants, IEEE TPAMI, 8(5):55-59, 996. 9. M.Blane, Z.Lei et al., The 3L algorithm for Fitting Implicit Polynomial Curves and Surfaces to Data, IEEE Transaction on Pattern Analysis and Machine Intelligence, Bol., No.3, March.. Z. Lei and D. B. Cooper, New, Faster, More Controlled Fitting of Implicit Polynomial D Curves and 3D Surfaces to Data, IEEE Conference on Computer Vision and Pattern Recognition, June 996.. T. Tasdizen, J-P Tarel and D. B. Cooper, Improving the Stability of Algebraic Curves for Applications, IEEE Transactions on Image Processing, Vol. 9, No: 3, pp. 45-46, March.