130 likes | 235 Views
Reduce and Super Smooth your Surface Data with the Bezier Filter. One Dimensional Example. 1. 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.
E N D
Reduce and Super Smooth your Surface Data with the Bezier Filter
One Dimensional Example 1 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
What is a Bezier Function ? 2 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 3 This allows the use of Array Processing for shorter computer time
The Best Bezier Function to fit the Data 4 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
Decoupling Independent and Dependent Variables 5 The matrix definition for the Bezier function is It can be recognized as And can be decoupled as
Two Dimensional Bezier Function – Smooth Data 6 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
Two Dimensional Bezier Function – Rough Data 7 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
Bezier Function in Image Handling 8 The original image is 960 x 1280 pixels of size 671 KB True image processing in MATLAB Bezier filter applied to Red, Green and Blue color separately and combined Highly nonlinear color distribution
Single Bezier Functions for the Image 9 Original image Bezier function representation Size = 671 KB Function order 20 x 20 Coefficient storage = 11 KB (3 color streams)
Bezier Function in Four Quadrants 10 Bezier function representation Original Image 671 KB Four quads Function order 20 x 20 Coefficient storage = 4*11 KB (3 color streams) = 44 KB
Conclusions 11 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 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