• Views 927
• Citations 2
• ePub 25
• PDF 513
`Mathematical Problems in EngineeringVolume 2013, Article ID 731648, 8 pageshttp://dx.doi.org/10.1155/2013/731648`
Research Article

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

1College of Automation Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
2College of Mechanical-Electrical Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China

Received 7 March 2013; Revised 14 June 2013; Accepted 19 June 2013

Copyright © 2013 Juncheng Li and Dongbiao Zhao. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

A trigonometric Bézier curve analogous to the cubic polynomial Bézier curve, with a shape parameter, is presented in this work. The proposed curve inherits properties similar to those of cubic polynomial Bézier 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ézier curve. Then, image compression using the trigonometric Bézier curve approximation method is investigated. Experimental results show that the trigonometric Bézier curve approximation is an effective method for dealing with image compression problems.

#### 1. 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 B-spline 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.

#### 2. The Trigonometric Bézier Basis Functions

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

Definition 1. For arbitrary real value , the following four functions of are called the trigonometric Bézier basis functions with a shape parameter where , .

Theorem 2. The trigonometric Bézier basis functions defined as (1) have the following properties:(a)nonnegative property: ,(b)partition of unity: ,(c)monotonicity: For fixed , and are monotonically decreasing for shape parameter ; and are monotonically increasing for shape parameter ,(d)symmetry: , (e)properties at the endpoints

Proof. (a) For and ; then
it is obvious that .
(b) .
(c) For fixed , then
Therefore, and are monotonically decreasing for shape parameter , and are monotonically increasing for shape parameter .
By simple deduction, the remaining cases follow obviously.

Figure 1 shows the curves of the trigonometric Bézier basis functions for (dotted lines), for (dashed lines), and for (solid lines).

Figure 1: The trigonometric Bézier basis functions.

#### 3. 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.

Definition 3. Given that are four control points in or , is called the trigonometric Bézier curve with a shape parameter, where are the trigonometric Bézier basis functions defined as (1).

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, (b)Symmetry: for the same shape parameter , both , , , and , , , define the same curve in a different parameterization; that is, (c)Geometric invariance: the shape of a curve is independent of the choice of coordinates; that is, where is an arbitrary vector in or , and is an arbitrary matrix, or 3.(d)Convex hull property: a curve with must lie inside its control polygons span by .

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 . 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 , which could make the amount of calculation smaller.

##### 3.2. 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. Supposeandbe on the same side of the edgeand all the control points be kept unchanged, the QCT-Bézier curve 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 are kept unchanged, the curve would make closer or farther to the midpoint of the edge 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 (dashed line), (solid line), (dotted line), and (dash-dotted line).

Figure 2: The QCT-Bézier curves with different shape parameters.

A close QCT-Bézier curve can be constructed by setting . 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 , , , , , , , and , respectively.

Figure 3: The closed CT-Bézier curves with different shape parameters.

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.

Theorem 8. Suppose that the control points are not collinear and on the same side of the ; let , relationships between the QCT-Bézier curve defined as (5) and the general cubic Bézier curve are as follows:(a), .(b)If , then .

Proof. By simple computation, If , then , so .

Corollary 9. When , the QCT-Bézier curve is close to the cubic Bézier curve; that is, .

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 and , respectively; the dotted line is the general cubic Bézier curve.

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

#### 4. 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 [1115]. 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.

Figure 5: The Schematic diagrams of image compression and reconstruction.
##### 4.1. Hilbert Scanning Sequences

Hilbert scanning curve is one of space filling curves and has a one-to-one mapping between an -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 and the corresponding Hilbert scanning sequence.

Figure 6: Two-dimensional image and the corresponding Hilbert scanning sequence. (a) input image, (b) the corresponding Hilbert scanning sequence.
##### 4.2. 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 , , or when the considered image with the size of .

Supposebe a section of the scanning sequence, which is obtained from a curve satisfying that

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: where are the QCT-Bézier basis functions defined as (1) and and are two pending values.

In order to determine and , the intervals and are divided into half, respectively. The data points located in are assumed as , and the other data points located in are assumed as .

Set , . According to (12), let

From (13), and can be computed as follows:

Taking and into (12), the QCT-Bézier curve for approximating to the considered partition can be got.

When the QCT-Bézier curve expressed as (12) is used to approximate the considered partition, the absolute error of is

Because the QCT-Bézier curve has a shape parameter , for a given partition, the absolute error of each data point can 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

Supposebe the maximum absolute error of approximation. If the maximum absolute error of the considered partition satisfies , then the considered partition is confirmed as one of the final partitions. If the maximum absolute error of the considered partition satisfies , 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 .

##### 4.3. Coding and Decoding of the Image

Assuming a partition is finalized and the gray values of the partition are ; then the approximation parameters , , , , , 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, , , , , and , the curve is expressed as (17). From (17), the recovery gray values of the data points between 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 .

#### 5. Experimental Results and Discussion

The effect of compression is quantitatively estimated by using the peak signal-to-noise ratio (PSNR), which is defined as 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 is the number of pixels in the input image and denotes the total number of bits used in the compressed data of the image.

The Cameraman image and Lena image with the size of (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 (), are shown in Table 1.

Table 1: Experimental results of the Cameraman image.

When and , 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.

Figure 7: The input image and the reconstructed image. (a) Input image, (b) Reconstructed image.
Figure 8: Hilbert scanning sequences of the input image and the reconstructed image. (a) Hilbert scanning sequence of the input image, (b) Hilbert scanning sequence of the reconstructed image.

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, , , , 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 , the quadratic Bézier curve approximation [13], and the cubic rational Bézier curve approximation [15], are compared in Table 2.

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

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.

#### 6. 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.

#### Acknowledgment

This work was supported by the National Nature Science Foundation of China under Grant no. 51175261.

#### References

1. J. Hoschek and D. Lasser, Fundamentals of Computer Aided Geometric Design, AK Peters, Wellesley, Mass, USA, 1993, Translated L. L. Schumaker.
2. J. Zhang, “C-Bézier curves and surfaces,” Graphical Models and Image Processing, vol. 61, no. 1, pp. 2–15, 1999.
3. Q. Chen and G. Wang, “A class of Bézier-like curves,” Computer Aided Geometric Design, vol. 20, no. 1, pp. 29–39, 2003.
4. X. Han, “Quadratic trigonometric polynomial curves with a shape parameter,” Computer Aided Geometric Design, vol. 19, no. 7, pp. 503–512, 2002.
5. X. Han, “Cubic trigonometric polynomial curves with a shape parameter,” Computer Aided Geometric Design, vol. 21, no. 6, pp. 535–548, 2004.
6. G. Wang, Q. Chen, and M. Zhou, “NUAT B-spline curves,” Computer Aided Geometric Design, vol. 21, no. 2, pp. 193–205, 2004.
7. X. A. Han, Y. Ma, and X. Huang, “The cubic trigonometric Bézier curve with two shape parameters,” Applied Mathematics Letters, vol. 22, no. 2, pp. 226–231, 2009.
8. J. Li, D. Zhao, B. Li, and G. Chen, “A family of quasi-cubic trigonometric curves,” Journal of Information and Computational Science, vol. 7, no. 13, pp. 2847–2854, 2010.
9. B. Y. Su and J. Q. Tan, “A Family of quasi-cubic blended splines and applications,” Journal of Zhejiang University: Science, vol. 7, no. 9, pp. 1550–1560, 2006.
10. L. Yan and J. Liang, “A class of algebraic-trigonometric blended splines,” Journal of Computational and Applied Mathematics, vol. 235, no. 6, pp. 1713–1729, 2011.
11. T. Watanabe, “Image coding making use of B-spline surfaces,” IEEE Transactions on Circuits and Systems for Video Technology, vol. 7, no. 2, pp. 409–413, 1997.
12. J. Pan and Q. Liao, “Region coding using improved B-spline surface approximation,” Electronics Letters, vol. 36, no. 2, pp. 129–130, 2000.
13. S. Biswas, “One-dimensional B-B polynomial and Hilbert scan for graylevel image coding,” Pattern Recognition, vol. 37, no. 4, pp. 789–800, 2004.
14. S. Biswas and B. C. Lovell, Bézier and Splines in Image Processing and Machine Vision, Springer, London, UK, 2008.
15. J. Li, D. Zhao, and Y. Lu, “Image compression using Hilbert scan and cubic rational Bezier curve approximation,” Journal of Computational Information Systems, vol. 7, no. 12, pp. 4311–4318, 2011.