An Investigation on Image Compression Using the Trigonometric Bézier Curve with a Shape Parameter

A trigonometric B´ezier curve analogous to the cubic polynomial B´ezier curve, with a shape parameter, is presented in this work. The proposed curve inherits properties similar to those of cubic polynomial B´ezier curve, and the shape of the curve can be adjusted by altering the value of the shape parameter while the control polygon is fixed. With the shape parameter, the proposed curve can be made closer to the given control polygon than the general cubic B´ezier curve. Then, image compression using the trigonometric B´ezier curve approximation method is investigated. Experimental results show that the trigonometric B´ezier curve approximation is an effective method for dealing with image compression problems.


Introduction
It is well known that the trigonometric polynomials have important applications in different areas, such as electronics or medicine [1].Recently, trigonometric polynomials and splines have received very much attention within Computer-Aided Geometric Design (CAGD), especially in curve and surface modeling.The C-Bézier curves and surfaces were presented in [2].The C-Bézier curves of higher order are defined in [3].The quadratic trigonometric polynomial curves with a shape parameter were presented in [4].The cubic trigonometric polynomial curves were constructed in [5].The nonuniform algebraic trigonometric B-splines were presented in [6].A cubic trigonometric Bézier curve with two-shape parameters was defined in [7].In [8], a family of quasi-cubic trigonometric curves was discussed.The algebraic-trigonometric blended splines were presented in [9,10].The Bézier curve, particularly the quadratic and cubic Bézier curve, has gained widespread application.The first purpose of this work is to present a trigonometric Bézier curve analogous to the cubic Bézier curve.
Along with the intersection among different disciplines, the technology of curves and surfaces modeling has been adopted to deal with several problems.The schemes based on curves and surfaces modeling were used to deal with the image compression.Image coding making use of the B-spline surfaces was presented in [11].The improved Bspline surface approximation was used to deal with region coding in [12].Image coding based on the quadratic Bézier curve approximation is discussed in [13,14].In [15], image compression using the cubic rational Bézier curve approximation is presented.However, up to now, the trigonometric curves and surfaces have not been adopted to deal with image compression problems.The second purpose of this work is to investigate image compression using the proposed trigonometric Bézier curve approximation.
The present work is organized as follows.In Section 2, the basis functions of the trigonometric Bézier, with a shape parameter, are defined and the properties of the basis functions are discussed.In Section 3, the trigonometric Bézier curve with a shape parameter is presented and some properties of the proposed curve are shown.In Section 4, image compression using the proposed trigonometric Bézier curve approximation is investigated.A short conclusion is given in Section 5.

The Trigonometric Bézier Basis Functions
Firstly, the definition of the trigonometric Bézier basis functions is given as follows.

The Trigonometric Bézier Curve
3.1.Definition and Properties of the QCT-Bézier Curve.On the basis of the trigonometric Bézier basis functions, the corresponding curve with a shape parameter can be defined as follows.
From the definition of the trigonometric Bézier basis function, some properties of the trigonometric Bézier curve can be obtained as follows.
Theorem 4. The trigonometric Bézier curve defined as (5) has the following properties.
(a) Terminal properties: the curve interpolates the first and the end control points and tangent to the first and the end edges of the control polygon; that is, (c) Geometric invariance: the shape of a curve is independent of the choice of coordinates; that is, where q is an arbitrary vector in R 2 or R 3 , and T is an arbitrary  ×  matrix,  = 2 or 3.
Remark 5. From Theorem 4, the trigonometric Bézier curve has the same properties to the general cubic Bézier curve.So, the curve defined as ( 5) is named the quasi-cubic trigonometric Bézier curve (QCT-Bézier curve for short) in the following work.
Remark 6. Han [5] constructed a cubic trigonometric polynomial curve with a shape parameter over the space {1, sin , cos , sin 2 , sin 3 , cos 3 }.In contrast with the curve presented by Han [5], the QCT-Bézier curve presented in this work is defined over the more concise space {1, sin , cos , sin 2 }, which could make the amount of calculation smaller.

Shape Control of the QCT-Bézier
Curve.When the control points are kept unchanged, the shape of the general cubic Bézier curve cannot be adjusted, while the shape of the QCT-Bézier curve can be easily adjusted by altering the value of the shape parameter.The QCT-Bézier curve has the following behavior by altering the value of the shape parameter .
Theorem 7. Suppose b 1 and b 2 be on the same side of the edge b 3 − b 0 and all the control points be kept unchanged, the QCT-Bézier curve P() defined as (5) will move in the direction to the control polygon as  increase.And it will move in the opposite direction to the control polygon as  decreases.
Proof.From (5), From (9), when the control points b  ( = 0, 1, 2, 3) are kept unchanged, the curve would make closer or farther to the midpoint of the edge b 2 − b 1 as  increases or decreases and also indicates that the curve would move in the direction or the opposite direction to the control polygon as  increases or decreases.
Figure 2 shows the effects on shape of the QCT-Bézier curve by altering the value of , where the curves are generated by setting  = 0.5 (dashed line),  = 1.0 (solid line),  = 1.5 (dotted line), and  = 2.0 (dash-dotted line).
A close QCT-Bézier curve can be constructed by setting b 3 = b 0 .Figure 3 shows closed CT-Bézier curves and the global effects on the curves by altering the value of , where the curves from the inside out are generated by setting  = 0.2,  = 0.5,  = 0.8,  = 1.0,  = 1.2,  = 1.5,  = 1.8, and  = 2.0, respectively.Furthermore, control polygons provide an important tool in geometric modeling.It is an advantage if the curve being modeled tends to preserve the shape of its control polygon.Now some relations of the QCT-Bézier curve and the general cubic Bézier curve corresponding to their control polygons are showed as follows.Proof.By simple computation, Theorem 8 and Corollary 9 show that, with the shape parameter , the QCT-Bézier curve can be made closer to the given control polygon than the general cubic Bézier curve or close to the general cubic Bézier curve.
Figure 4 shows the relations between the QCT-Bézier curve and the general cubic Bézier curve.In Figure 4, the solid line and dashed line is the QCT-Bézier curve for  = 1.9 and  = 1.7, respectively; the dotted line is the general cubic Bézier curve.

Image Compression Using the QCT-Bézier Curve Approximation
Digital image compression is to select the effective methods to remove or reduce information redundancy and relevance of the image, so as to decrease the requirements of storage space and transmission bandwidth.The schemes based on curves or surfaces approximation were used to deal with the image compression problems [11][12][13][14][15].However, up to now, image compression using the trigonometric curves or surfaces approximation has not been discussed.The following work is an investigation about using the QCT-Bézier curve approximate method to deal with image compression problems.The schematic diagram of image compression and reconstruction, using the QCT-Bézier curve approximate method, is illustrated in Figure 5.

Hilbert Scanning Sequences.
Hilbert scanning curve is one of space filling curves and has a one-to-one mapping between an n-dimensional space and a one-dimensional space.Because the Hilbert scan can keep the relevancy of neighboring points in the original space as far as possible, it has been used in image compression extensively.The process of constructing a Hilbert scanning curve for the area size of  ×  is shown in [13,14].
A two-dimensional digital image can be converted into a one-dimensional gray sequence by the Hilbert scan. Figure 6 shows a two-dimensional digital image with the size of 256 × 256 and the corresponding Hilbert scanning sequence.

Optimal Piecewise Approximation to the Scanning Sequence.
The accuracy of the curve approximation will become worse if the global approximation is used to the scanning sequence.In order to get a better approximation effect, the scanning data points should be divided into several partitions.Then, piecewise QCT-Bézier curves are employed to approximate the partitions.
Here, a simple method for initially dividing the scanning sequence is adopted.The value, recorded as , is introduced to determine the length of the initial partitions, and then the whole scanning sequence is divided into several partitions according to every partition with  data points.Generally, the value of  can be of , /2, or /4 when the considered image with the size of  × .
Remark 10.The approximate curve will become the data if the considered partition only has one data point, will become a line if the considered partition has two data points, and will become a quadratic interpolate curve if the considered partition has three data points.So, partitions with more than three data points are considered in the following discussion.According to the terminal properties of the QCT-Bézier curve, the QCT-Bézier curve for approximating to the considered partition can be expressed as follows: (12) where   () ( = 0, 1, 2, 3) are the QCT-Bézier basis functions defined as (1) and  1 and  2 are two pending values.
When the QCT-Bézier curve expressed as ( 12) is used to approximate the considered partition, the absolute error of   ( = 0, 1, 2, . . ., ) is Because the QCT-Bézier curve has a shape parameter , for a given partition, the absolute error of each data point can Mathematical Problems in Engineering be small as far as possible by altering the value of , and the  should satisfy that From ( 16), the minimum point  =  * can be computed by some numerical algorithms (such as interior-point, SQP, active-set, and trust-region-reflective).Taking  =  * into (12), the optimal QCT-Bézier approximation curve to the considered partition can be written as follows: Then, the maximum absolute error of the considered partition is Suppose  be the maximum absolute error of approximation.If the maximum absolute error of the considered partition satisfies  max ≤ , then the considered partition is confirmed as one of the final partitions.If the maximum absolute error of the considered partition satisfies  max > , the th data point with the largest absolute error is founded out, and the data points in front of the th data point are chosen as a new considered partition for approximating by using the optimal QCT-Bézier curve determined by (17); repeat this process until the maximum absolute error of the considered partition satisfies  max ≤ .

Coding and Decoding of the Image.
Assuming a partition is finalized and the gray values of the partition are   ( = 0, 1, 2, . . ., ); then the approximation parameters ,  * ,  0 ,  * 1 ,  * 2 , and   are adopted to code the partition.Coding every partition, then the compressed data of the image are obtained.
Remark 11.The previous coding process is suitable for the partitions with more than three data points.For the partitions with only one or two data points, the one or two data points are stored to code the corresponding partitions.For the partitions with three data points, the coefficients of the quadratic curve interpolating the three data points are stored to code the corresponding partitions.
The process of decoding the compressed data is the inverse process of the coding.The corresponding QCT-Bézier curve (a data point when having only one data, or a line when having two data points, or a quadratic interpolated curve when having three data points) of a partition can be obtained by the stored parameters n,  * ,  0 ,  * 1 ,  * 2 , and   , the curve is expressed as (17).From (17), the recovery gray values of the data points between  0 and   are computed as Every partition is decoded sequentially and the inverse process of Hilbert scan is used to restore the recovery gray values to the original position of the image.Then, the reconstructed image can be obtained.
The proposed method for image compression is a scheme for lossy compression.The precision of the compressed image is determined by initial partition length  and the allowed maximum absolute error .

Experimental Results and Discussion
The effect of compression is quantitatively estimated by using the peak signal-to-noise ratio (PSNR), which is defined as PSNR = 10 log 10 255 2 MSE (dB) , where (, ) and Ô(, ) are, respectively, the elements of the original and the reconstructed images.The efficiency of the compression is quantitatively estimated by using the bit rate (BR) which is defined as where  2 is the number of pixels in the input image and  c denotes the total number of bits used in the compressed data of the image.
The Cameraman image and Lena image with the size of 256 × 256 (8 bits) are used as examples.When the length of the initial partitions  and the maximum allowed absolute error  are of different values, the results about PSNR and BR of the Cameraman, using the QCT-Bézier curve approximation ( * = 1.5), are shown in Table 1.
When  = 64 and  = 25, the input image and the reconstructed image are shown in Figure 7, and the corresponding Hilbert scanning sequences of the input image and the reconstructed image are shown in Figure 8.
Remark 12.In practical operation, the calculation amount of the QCT-Bézier curve approximation is big because of needing to compute the shape parameter of each optimal approximate curve.To reduce the calculated amount, the shape parameter  * of every optimal approximate curve can be of the same value.The value of  * can be obtained through machine test, which makes the BR lower and the PSNR higher.Then, only five approximation parameters, namely, ,  0 ,  * 1 ,  * 2 and   , are used to code every partition.When the length of the initial partitions  is fixed with 256, and the maximum allowed absolute error  is of different values, the results of the Lena image about BR, PSNR, and average required time (including the process of coding and decoding), using the QCT-Bézier curve approximation ( * = 2), the quadratic Bézier curve approximation [13], and the cubic rational Bézier curve approximation are compared in Table 2.
From Table 2, the QCT-Bézier curve approximation can obtain higher PSNR and lower BR than the quadratic Bézier curve approximation and can obtain almost equivalent PSNR and BR to the cubic rational Bézier curve approximation.Meanwhile, Table 2 shows that the average required time of QCT-Bézier curve approximation is generally less than the quadratic Bézier curve approximation and the cubic rational Bézier curve approximation.Consequently, the QCT-Bézier curve approximation is an effective method to deal with image compression problems.
Remark 13.The trigonometric Bézier curves have some advantages which the rational Bézier curves do not have.For example, the trigonometric Bézier curves can be used to exactly represent some common curves in engineering, such as ellipse and parabola [7,8], which is difficult for the general rational Bézier curves to achieve.Although both QCT-Bézier curve and cubic rational Bézier curve show the similar performance in dealing with the image compression problems, as a nontraditional curve modeling method in CAGD, the trigonometric curves have not been adopted to deal with image compression problems up to now.If other more appropriate trigonometric curves are used to deal with image compression, it would achieve better results.Hence, the investigation of this work not only presents an effective method for dealing with image compression problems, but also extends the use of the trigonometric curves.

Conclusion
The QCT-Bézier curve presented in this work has the similar properties to the general cubic Bézier curve.However, the shape of the QCT-Bézier curve can be easily adjusted by altering the value of the shape parameter.With the shape parameter, the proposed curve can be made closer to the given control polygon than the general cubic Bézier curve or close to the cubic Bézier curve.Because of the advantages of the QCT-Bézier curve, the QCT-Bézier curve approximation method can be effectively applied to deal with image compression problems.

3 Figure 4 :
Figure 4: Relations between the QCT-Bézier curve and the general cubic Bézier curve.

Figure 5 :Figure 6 :
Figure 5: The Schematic diagrams of image compression and reconstruction.

Figure 7 :Figure 8 :
Figure 7: The input image and the reconstructed image.(a) Input image, (b) Reconstructed image.

Table 1 :
Experimental results of the Cameraman image.

Table 2 :
Comparison of the BR and PSNR on Lena image.