140 likes | 248 Views
DATA HANDLING WITH TWO INDEPENDENT VARIABLES AND THE BEZIER FILTER. P. Venkataraman. What is a Bezier Function ?. A Bezier function is a Bezier curve that behaves like a function. The Bezier curve is defined using a parameter Instead of y=f(x);
E N D
DATA HANDLING WITH TWO INDEPENDENT VARIABLES ANDTHE BEZIER FILTER P. Venkataraman
What is a Bezier Function ? A Bezier function is a Bezier curve that behaves like a function The Bezier curve is defined using a parameter Instead of y=f(x); both x and y depend on the same parameter value; x = x(p) and y = y(p) p : parameter Bernstein basis Number of vertices: 5 Order of the function : 4
Matrix Description of Bezier Function (2D) This allows the use of Array Processing for shorter computer time
The Best Bezier Function to fit the Data For a selected order of the Bezier function (n) Given a set of (m) vector data ya,i, or [Y], find the coefficient matrix, [B] so that the corresponding data set yb,i , [YB ] produces the least sum of the squared error Minimize FOC: Once the coefficient matrix is known, all other information can be generated using array processing For the filter, the best order is chosen on minimum absolute error
Two Dimensional Example Closing DJIA between Aug and Dec 2007 A Bezier function over all the data Order of function = 20 Mean original data = 13172.432 Mean Bezier data = 13172.423 Avg. Error = 98.34 Maximum Data = 14164.53 Std. Dev (original) = 530.19 Std. Dev. (Bezier) = 514.68
Bezier Function in 3D A 3D Bezier function will be a surface in 2D. Bezier surface can be described as a vector-valued function of two parameters r and s
Bezier Filter for 3D Data Given a set of array data [U], assuming an order for each dimension (m, n), find the Bezier function coefficient matrix, [BU] so that the corresponding approximate data [UB] generates the least value for the sum of the squared error over the data array Minimize FOC: Once the coefficient matrix is known, all other information can be generated using array processing For the filter, the best order is chosen on minimum absolute error
3Dimensional Bezier Function – Smooth Data Original Data about 2600 points based on MATLAB Peaks function 3D View of the Data Using the Bezier Filter Contour Plot 3D Plot average error: 6.91e-02
3 Dimensional Bezier Function – Rough Data Same peaks function but randomly perturbed on both sides Less dominant peaks diffused 3D plot Bezier Filter Contour plot 3D plot average error: 6.54e-01
Conclusions Bezier filter is easy to incorporate and can work for regular, unpredictable data, and images The Bezier functions have excellent blending and smoothing properties High order but well behaved polynomial functions can be useful in capturing the data content and underlying behavior A single continuous function is used to capture all data (whole field representation) Gradient and derivative information of the data are easy to obtain The mean of the Bezier data is the same as the mean of the original data Bezier functions naturally decouples the independent and the dependent variables
Current Investigations Using Bezier functions to solve inverse problems in ODE and PDE Using Bezier functions in irregular domains Using Bezier functions in image filtering
Bezier Function in Four Quadrants Bezier function representation Original Image 671 KB Four quads Function order 20 x 20 Coefficient storage = 4*11 KB (3 color streams) = 44 KB