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

Authors: Juncheng Li; Dongbiao Zhao
Journal: Mathematical Problems in Engineering
 (2013)

---

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


---

## Body

## 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 Section2, 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α(α∈(0,2]), the following four functions of t(t∈[0,1]) are called the trigonometric Bézier basis functions with a shape parameter
(1)B0(t)=(1-S)[1+(1-α)S],B1(t)=αS(1-S),B2(t)=αC(1-C),B3(t)=(1-C)[1+(1-α)C],
where S:=sin(π/2)t, C:=cos(π/2)t.Theorem 2.
The trigonometric Bézier basis functions defined as (1) have the following properties:(a)
nonnegative property:Bi(t)≥0(i=0,1,2,3),(b)
partition of unity:∑i=03Bi(t)≡1,(c)
monotonicity: For fixedt∈[0,1], B0(t) and B3(t) are monotonically decreasing for shape parameter α; B1(t) and B2(t) are monotonically increasing for shape parameter α,(d)
symmetry:Bi(1-t)=B3-i(t)(i=0,1,2,3),(e)
properties at the endpoints(2)B0(0)=1,B1(0)=0,B2(0)=0,B3(0)=0,B0(1)=0,B1(1)=1,B2(1)=0,B3(1)=0,B0′(0)=-π2α,B1′(0)=π2α,B2′(0)=0,B3′(0)=0,B0′(1)=0,B1′(1)=0,B2′(1)=-π2α,B3′(1)=π2α.Proof.
(a) Fort∈[0,1] and α∈(0,2]; then
(3)S≥0,C≥0,1-S≥0,1-C≥0,1+(1-α)S≥0,1+(1-α)C≥0,
it is obvious thatBi(t)≥0(i=0,1,2,3).
(b)∑i=03Bi(t)=[1-αS+(α-1)S2]+(αS-αS2)+(-α+αC+αS2)+[α-αC+(1-α)S2]≡1.
(c) For fixedt∈[0,1], then
(4)dB0dα=S(S-1)≤0,dB1dα=S(1-S)≥0,dB2dα=C(1-C)≥0,dB3dα=C(C-1)≤0.
Therefore,B0(t) and B3(t) are monotonically decreasing for shape parameter α, B1(t) and B2(t) are monotonically increasing for shape parameter α.
By simple deduction, the remaining cases follow obviously.Figure1 shows the curves of the trigonometric Bézier basis functions for α=0.5 (dotted lines), for α=1.0 (dashed lines), and for α=1.5 (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 thatbi(i=0,1,2,3) are four control points in ℝ2 or ℝ3,
(5)P(t)=∑i=03Bi(t)bi,t∈[0,1],α∈(0,2]
is called the trigonometric Bézier curve with a shape parameter, where Bi(t)(i=0,1,2,3) 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,(6)P(0)=b0,P(1)=b3,P′(0)=π2α(b1-b0),P′(1)=π2α(b3-b2).(b)
Symmetry: for the same shape parameterα, both b0, b1, b2, b3 and b3, b2, b1, b0 define the same curve in a different parameterization; that is,
(7)P(t;b0,b1,b2,b3)=P(1-t;b3,b2,b1,b0).(c)
Geometric invariance: the shape of a curve is independent of the choice of coordinates; that is,(8)P(t;b0+q,b1+q,b2+q,b3+q)=P(t;b0,b1,b2,b3)+qP(t;b0*T,b1*T,b2*T,b3*T)=P(t;b0,b1,b2,b3)*T,
where q is an arbitrary vector in ℝ2 or ℝ3, and T is an arbitrary m×m matrix, m=2 or 3.(d)
Convex hull property: a curve withP(t) must lie inside its control polygons span by bi(i=0,1,2,3).Remark 5.
From Theorem4, 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,sint,cost,sin2t,sin3t,cos3t}. 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,sint,cost,sin2t}, 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.
Supposeb1andb2be on the same side of the edgeb3-b0and all the control points be kept unchanged, the QCT-Bézier curve P(t) 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),
(9)∥P(12)-b1+b22∥=∥B0(12)b0+[B1(12)-12]b1+[B2(12)-12]b2+B3(12)b3∥=12|1-(2-1)α|∥b0-b1-b2+b3∥.
From (9), when the control points bi(i=0,1,2,3) are kept unchanged, the curve would make closer or farther to the midpoint of the edge b2-b1 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.Figure2 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).Figure 2
The QCT-Bézier curves with different shape parameters.A close QCT-Bézier curve can be constructed by settingb3=b0. 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.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 pointsbi(i=0,1,2,3) are not collinear and bi(i=1,2) on the same side of the b3-b0; let b*=(b1+b2)/2, relationships between the QCT-Bézier curve P(t) defined as (5) and the general cubic Bézier curve B(t)=∑i=03(3i)ti(1-t)ibi are as follows:(a)
P(0)=B(0), P(1)=B(1).(b)
If(3/4)(2+1)≤α≤2, then ∥P(1/2)-b*∥≤∥B(1/2)-b*∥.Proof.
By simple computation,(10)P(0)=b0=B(0),P(1)=b3=B(1),B(12)-b*=18(b0-b1-b2+b3),P(12)-b*=12[1-(2-1)α](b0-b1-b2+b3).
If (3/4)(2+1)≤α≤2, then (3-22)/2≤(1/2)[1-(2-1)α]≤1/8, so ∥P(1/2)-b*∥≤∥B(1/2)-b*∥.Corollary 9.
Whenα=(3/4)(2+1), the QCT-Bézier curve is close to the cubic Bézier curve; that is, P(1/2)=B(1/2).Theorem8 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.Figure4 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.Figure 4
Relations between the QCT-Bézier curve and the general cubic 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 thatbi(i=0,1,2,3) are four control points in ℝ2 or ℝ3,
(5)P(t)=∑i=03Bi(t)bi,t∈[0,1],α∈(0,2]
is called the trigonometric Bézier curve with a shape parameter, where Bi(t)(i=0,1,2,3) 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,(6)P(0)=b0,P(1)=b3,P′(0)=π2α(b1-b0),P′(1)=π2α(b3-b2).(b)
Symmetry: for the same shape parameterα, both b0, b1, b2, b3 and b3, b2, b1, b0 define the same curve in a different parameterization; that is,
(7)P(t;b0,b1,b2,b3)=P(1-t;b3,b2,b1,b0).(c)
Geometric invariance: the shape of a curve is independent of the choice of coordinates; that is,(8)P(t;b0+q,b1+q,b2+q,b3+q)=P(t;b0,b1,b2,b3)+qP(t;b0*T,b1*T,b2*T,b3*T)=P(t;b0,b1,b2,b3)*T,
where q is an arbitrary vector in ℝ2 or ℝ3, and T is an arbitrary m×m matrix, m=2 or 3.(d)
Convex hull property: a curve withP(t) must lie inside its control polygons span by bi(i=0,1,2,3).Remark 5.
From Theorem4, 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,sint,cost,sin2t,sin3t,cos3t}. 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,sint,cost,sin2t}, 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.
Supposeb1andb2be on the same side of the edgeb3-b0and all the control points be kept unchanged, the QCT-Bézier curve P(t) 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),
(9)∥P(12)-b1+b22∥=∥B0(12)b0+[B1(12)-12]b1+[B2(12)-12]b2+B3(12)b3∥=12|1-(2-1)α|∥b0-b1-b2+b3∥.
From (9), when the control points bi(i=0,1,2,3) are kept unchanged, the curve would make closer or farther to the midpoint of the edge b2-b1 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.Figure2 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).Figure 2
The QCT-Bézier curves with different shape parameters.A close QCT-Bézier curve can be constructed by settingb3=b0. 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.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 pointsbi(i=0,1,2,3) are not collinear and bi(i=1,2) on the same side of the b3-b0; let b*=(b1+b2)/2, relationships between the QCT-Bézier curve P(t) defined as (5) and the general cubic Bézier curve B(t)=∑i=03(3i)ti(1-t)ibi are as follows:(a)
P(0)=B(0), P(1)=B(1).(b)
If(3/4)(2+1)≤α≤2, then ∥P(1/2)-b*∥≤∥B(1/2)-b*∥.Proof.
By simple computation,(10)P(0)=b0=B(0),P(1)=b3=B(1),B(12)-b*=18(b0-b1-b2+b3),P(12)-b*=12[1-(2-1)α](b0-b1-b2+b3).
If (3/4)(2+1)≤α≤2, then (3-22)/2≤(1/2)[1-(2-1)α]≤1/8, so ∥P(1/2)-b*∥≤∥B(1/2)-b*∥.Corollary 9.
Whenα=(3/4)(2+1), the QCT-Bézier curve is close to the cubic Bézier curve; that is, P(1/2)=B(1/2).Theorem8 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.Figure4 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.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 [11–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.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 ann-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 N×N is shown in [13, 14].A two-dimensional digital image can be converted into a one-dimensional gray sequence by the Hilbert scan. Figure6 shows a two-dimensional digital image with the size of 256×256 and the corresponding Hilbert scanning sequence.Two-dimensional image and the corresponding Hilbert scanning sequence. (a) input image, (b) the corresponding Hilbert scanning sequence.
(a)
(b)


### 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 asL, 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 L data points. Generally, the value of L can be of N, N/2, or N/4 when the considered image with the size of N×N.Supposedi(i=0,1,2,…,n)be a section of the scanning sequence, which is obtained from a curve p(x) satisfying that
(11)p(in)=di,i=0,1,2,…,n.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)f(t)=B0(t)d0+B1(t)y1+B2(t)y2+B3(t)dn,
where Bi(t)(i=0,1,2,3) are the QCT-Bézier basis functions defined as (1) and y1 and y2 are two pending values.In order to determiney1 and y2, the intervals [0,1] and di(i=0,1,2,…,n) are divided into half, respectively. The data points located in [0,1/2] are assumed as d0,d1,…,dm, and the other data points located in (1/2,1] are assumed as dm+1,dm+2,…,dn.Setg1=(1/m)∑i=1mdi, g2=(1/(n-m-1))∑i=m+1n-1di. According to (12), let
(13)f(13)=B0(13)d0+B1(13)y1+B2(13)y2+B3(13)dn=g1,f(23)=B0(23)d0+B1(23)y1+B2(23)y2+B3(23)dn=g2.From (13), y1 and y2 can be computed as follows:
(14)[y1y2]=[B1(13)B2(13)B1(23)B2(23)]-1[g1-B0(13)d0-B3(13)dng2-B0(23)d0-B3(23)dn].Takingy1 and y2 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 di(i=0,1,2,…,n) is
(15)εi=|di-f(in)|.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
(16)minF(α)=∑i=0nεi2=∑i=0n[di-f(in)]2s.t.0<α≤2.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:
(17)f*(t)=B0(t)d0+B1(t)y1*+B2(t)y2*+B3(t)dn.Then, the maximum absolute error of the considered partition is(18)εmax=max0≤i≤n{|di-f*(in)|}.SupposeMbe the maximum absolute error of approximation. If the maximum absolute error of the considered partition satisfies εmax≤M, then the considered partition is confirmed as one of the final partitions. If the maximum absolute error of the considered partition satisfies εmax>M, the ith data point with the largest absolute error is founded out, and the data points in front of the ith 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≤M.


### 4.3. Coding and Decoding of the Image

Assuming a partition is finalized and the gray values of the partition aredn(i=0,1,2,…,n); then the approximation parameters n, α*, d0, y1*, y2*, and dn 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 parametersn, α*, d0, y1*, y2*, and dn, the curve is expressed as (17). From (17), the recovery gray values of the data points between d0 and dn are computed as
(19)di=f*(in)(i=0,1,2,…,n).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 lengthL and the allowed maximum absolute error M.


## 4.1. Hilbert Scanning Sequences

Hilbert scanning curve is one of space filling curves and has a one-to-one mapping between ann-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 N×N is shown in [13, 14].A two-dimensional digital image can be converted into a one-dimensional gray sequence by the Hilbert scan. Figure6 shows a two-dimensional digital image with the size of 256×256 and the corresponding Hilbert scanning sequence.Two-dimensional image and the corresponding Hilbert scanning sequence. (a) input image, (b) the corresponding Hilbert scanning sequence.
(a)
(b)


## 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 asL, 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 L data points. Generally, the value of L can be of N, N/2, or N/4 when the considered image with the size of N×N.Supposedi(i=0,1,2,…,n)be a section of the scanning sequence, which is obtained from a curve p(x) satisfying that
(11)p(in)=di,i=0,1,2,…,n.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)f(t)=B0(t)d0+B1(t)y1+B2(t)y2+B3(t)dn,
where Bi(t)(i=0,1,2,3) are the QCT-Bézier basis functions defined as (1) and y1 and y2 are two pending values.In order to determiney1 and y2, the intervals [0,1] and di(i=0,1,2,…,n) are divided into half, respectively. The data points located in [0,1/2] are assumed as d0,d1,…,dm, and the other data points located in (1/2,1] are assumed as dm+1,dm+2,…,dn.Setg1=(1/m)∑i=1mdi, g2=(1/(n-m-1))∑i=m+1n-1di. According to (12), let
(13)f(13)=B0(13)d0+B1(13)y1+B2(13)y2+B3(13)dn=g1,f(23)=B0(23)d0+B1(23)y1+B2(23)y2+B3(23)dn=g2.From (13), y1 and y2 can be computed as follows:
(14)[y1y2]=[B1(13)B2(13)B1(23)B2(23)]-1[g1-B0(13)d0-B3(13)dng2-B0(23)d0-B3(23)dn].Takingy1 and y2 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 di(i=0,1,2,…,n) is
(15)εi=|di-f(in)|.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
(16)minF(α)=∑i=0nεi2=∑i=0n[di-f(in)]2s.t.0<α≤2.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:
(17)f*(t)=B0(t)d0+B1(t)y1*+B2(t)y2*+B3(t)dn.Then, the maximum absolute error of the considered partition is(18)εmax=max0≤i≤n{|di-f*(in)|}.SupposeMbe the maximum absolute error of approximation. If the maximum absolute error of the considered partition satisfies εmax≤M, then the considered partition is confirmed as one of the final partitions. If the maximum absolute error of the considered partition satisfies εmax>M, the ith data point with the largest absolute error is founded out, and the data points in front of the ith 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≤M.


## 4.3. Coding and Decoding of the Image

Assuming a partition is finalized and the gray values of the partition aredn(i=0,1,2,…,n); then the approximation parameters n, α*, d0, y1*, y2*, and dn 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 parametersn, α*, d0, y1*, y2*, and dn, the curve is expressed as (17). From (17), the recovery gray values of the data points between d0 and dn are computed as
(19)di=f*(in)(i=0,1,2,…,n).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 lengthL and the allowed maximum absolute error M.


## 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(20)PSNR=10log102552MSE(dB),MSE=1N2∑i=1N∑j=1N[O(i,j)-O^(i,j)]2,
where O(i,j) and O^(i,j) 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(21)BR=BcN2,
where N2 is the number of pixels in the input image and Bc denotes the total number of bits used in the compressed data of the image.The Cameraman image and Lena image with the size of256×256 (8 bits) are used as examples. When the length of the initial partitions L and the maximum allowed absolute error M 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.Table 1
Experimental results of the Cameraman image.
Length of the initial partitionsL
Maximum allowed errorM
PSNR (dB)
BR (bits/pixels)
64
25
35.365
1.926
30
35.035
1.710
35
34.742
1.548
128
25
35.115
1.679
30
34.774
1.472
35
34.468
1.309
256
25
34.801
1.561
30
34.401
1.351
35
34.081
1.188WhenL=64 and M=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.The input image and the reconstructed image. (a) Input image, (b) Reconstructed image.
(a)
(b)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.
(a)
(b)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, n, d0, y1*, y2* and dn, are used to code every partition.When the length of the initial partitionsL is fixed with 256, and the maximum allowed absolute error M 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 [15], are compared in Table 2.Table 2
Comparison of the BR and PSNR on Lena image.
Algorithm
Maximum allowed errorM
PSNR (dB)
BR (bits/pixels)
Average required time (s)
Quadratic Bézier curve approximation [13]
25
31.249
1.644
11.700
30
30.577
1.443
12.934
35
29.757
1.286
13.908
Cubic rational Bézier curve approximation [15]
25
33.282
1.403
13.582
30
32.897
1.193
13.558
35
32.561
1.027
13.556
QCT-Bézier curve approximation
25
33.261
1.422
12.692
30
32.801
1.212
12.824
35
32.539
1.036
12.830From Table2, 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.



---

*Source: 731648-2013-07-02.xml*