©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192

2-D Left-Side Quaternion Discrete : Fast Algorithm

Artyom M. Grigoryan and Sos S. Agaian;

Department of Electrical and Computer Engineering, The University of Texas at San Antonio; One UTSA Circle, San Antonio, USA TX 78249 e-mail: [email protected], [email protected]

In this paper, we introduce the concept of the tensor rep- Abstract resentation of the color image in the quaternion algebra [8] Two-dimension discrete Fourier transform (2-D DFT) is a which allows for effective calculation of the 2-D left-side 2-D fundamental tool in grays-scale image processing. In color ima- QDFT [9, 22]. The proposed tensor algorithm is compared with ging, this transform is used to process separately color channels the existent methods of calculation of the 2-D left-side QDFT. and such processing does not consider interactions between the The complexity of the described algorithms of the left-side 1- color channels. The concept of the quaternion discrete Fourier D and 2-D QDFTs are given. The concept of the tensor repre- transform (QDFT) became a very popular topic in color ima- sentation of 2-D and multidimensional images, fast algorithms, ging. The color image from one of the color model, for instance and the theory of splitting the discrete Fourier transforms by the RGB model, can be transformed into the quaternion algebra 1-D DFTs of the splitting-signals that uniquely represent the and be representedas one quaternion image which allows to pro- image was first introduced and developed by Grigoryan [24]-[30] cess simultaneously of all color components of the image. In this and used not only for fast calculation of the 1-D, 2-D, and 3- work, we describethe algorithm for the 2-D left-side QDFT which D DFTs, cosine, Hadamard, and Hartley transforms [32]-[38], is based on the concept of the tensor representation when the and for image reconstruction from projections in computed to- color or quaternion image is described by a set of 1-D quater- mography [40]-[51], image enhancement [21, 23],[39],[54]-[56], nion signals and the 1-D left-side QDFTs over these signals de- and filtration [4, 57]. The main results of this theory and algo- termine valuesof the 2-D left-side QDFT at correspondingsubset rithms of calculations of 2-D and 3-D DFTs of different orders of frequency-points. The efficiency of the tensor algorithm for cal- as mentioned in [49] were published by other authors by differ- culating the fast left-side 2-D QDFT is described and compared ent names [52, 53], including the discrete Radon transform [Gert- with the existent methods. ner, 1988], the fast multidimensional Radon transform [Labunets, 1999], the finite Radon transform [Mat´uˇsand J. Flusser, 1993], the exact discrete Radon transform [Gu`edon, Barba, and Burger 1995] the mojette transform [Gu`edon and Normand, 2005], the INTRODUCTION discrete periodic Radon transform [Hsung, Lun, and Siu, 1996], The discrete Fourier transform (DFT) with its fast algo- the orthogonal discrete periodic Radon transform [Lun, Hsung, rithm (FFT) plays a fundamental role in several application, such and Shen, 2003], [A. Kingston, 2006], and the generalized finite as signal processing, image enhancement, image de-nosing, au- Radon transform [A. Kingston and I. Svalbe, 2007]. All these dio/image/video compression, image encryption, watermarking, names of transforms relate to the original tensor and modified ten- compressive sensing, and communication systems [1]-[7]. The sor representation which Grigoryan called the paired representa- traditional Fourier transform is used effectively for gray-scale tion [25, 29, 30, 31, 4]. images. For color images, the processing in the frequency do- main is reduced to processing separately color channelswhich do QUATERNION and COLOR IMAGES not consider interactions between the color channels. The three The generalization of complex numbers and arithmetic is color channelsof an image may be represented as a vector field of known as hyper complex numbers, and we consider the quater- quaternion numbers [8], allowing for simultaneous analysis of all nion arithmetic, where attend was made to add more imaginary color data [14]-[20]. In the quaternion algebra, there are differ- numbers similar to the imaginary unit i for complex numbers. To ent definitions of the 2-D quaternion discrete Fourier transform. get the arithmetic with the division the number of such units as They include the two-sided 2-D QDFT, the left-side and right-side known should be 3 or 7, and the number 3 relates to quaternions. 2-D QDFTs [10]-[16],[59]. The fast QDFT algorithms are based The complex numbers z = x + iy represent the points (x,y) on representation of the QDFT by combinations of a few classi- in the complex space C. Figure shows sucha planein part a. The cal 1-D DFT transforms. This allows QDFT for fast numerical adding one new imaginary line to the complex plane does not re- implementation with the standard FFT softwares [60]. sult in a full arithmetic with multiplication and division. Instead,

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.1 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192 we may think to “add” similar complex planes, formally writing numbers form by encoding the red, green, and blue components this operation as C + jC as shown in part b. of the RGB value as a pure quaternion (with zero real part):

fn,m = 0 + i(rn,m + jgn,m + kbn,mk). In quaternion imaging, each color triple is treated as a whole unit [20], and it thus is expected, that by using quaternion ope- rations, a higher color information accuracy can be achieved.

Left-side 1-D QDFT As the generalization of the traditional Fourier transform, the quaternion Fourier transform was first defined by Ell to process quaternion signals [9]. In recent years, many works related to the FIGURE 1: (a) The complex plane C and (b) the abstract combi- quaternion discrete Fourier transform (QDFT) and its application in color image processing have been published [10, 11] and [17]. nation of two complex spaces. The computation the 2-D QDFT of a color image as a one unit, For that, we can imagine two complex planes; one complex not by color components separately, have found many interesting plane C with numbers z1 = x1 + iy1 and another complex plane C application in image enhancement [12, 21, 54, 43]. with numbers z2 = x2 + iy2. If we assume another imaginary unit, Let fn =(an,bn,cn,dn) = an +ibn + jcn +kdn be the quater- j, then the following numbers can be considered: nion signal of length N. The left-side 1-D quaternion DFT (ls- QDFT) is defined as q = z1 + jz2 =(x1 + iy1) + j(x2 + iy2). (1) N−1 np We can denote such a double complex space C2 and call such a Fp = Q1(p) + iQi(p) + jQ j(p) + kQk(p) = ∑ Wµ fn, representation of numbers q to be the (2,2)-representation. n=0 Thus, the complex numbers z1 and z2 in this construction where p = 0 : (N 1) and µ is a unit pure quaternion µ = im1 + 2 − play the same role as the real numbers x and y in the complex jm2 + km3, µ = 1. The kernel of this transform is numbers x + iy. These new numbers q can be written as − Wµ = WN;µ = exp( µ2π/N) = cos(2π/N) µ sin(2π/N). − − q = x + iy + jx +( ji)y 1 1 2 2 Given an angle φ, the multiplication of two quaternion num- bers exp( µφ) and f = a + ib + jc + kd can be written as where the number (i j) should represent another number, or may − be an imaginary number unit, which will be denoted by k or k, − exp( µφ) f =(cos(φ) [im1 + jm2 + km3]sin(φ)) i.e., k = ji or k = ji. These numbers as elements of four (or − · − − (a + ib + jc + kd) “quaternion” in Latin) are called quaternions and first have been · = acos(φ)+(bm1 + cm2 + dm3)sin(φ) described by an English mathematician Hamilton [8]. (2) +i [bcos(φ) (am + dm cm )sin(φ)] The quaternion can be considered as a four-dimensional − 1 2 − 3 generation of a with one real part and three- + j [ccos(φ) ( dm + am + bm )sin(φ)] − − 1 2 3 component imaginary part. The imaginary dimensions are rep- +k [ d cos(φ) (cm1 bm2 + am3)sin(φ)] . resented as i, j, and k. In practice, the i, j, and k are orthogonal − − to each other and to the real numbers. Any quaternion may be This equation is simple to implement in calculation of the 1-D represented in a hyper-complex form as left-side QDFT. Let ϕnp be the angle (2π/N)np. For a real signal xn of length Q = a + bi + c j + dk = a +(bi + c j + dk), N, we consider the traditional N-point DFT of a signal xn, − where a,b,c, and d are real numbers and i, j, and k are three imag- N 1 X = W npx , p = 0 : (N 1), inary units with multiplication laws: p ∑ n n=0 −

i j = ji = k, jk = k j = i, where the kernel W = WN = WN;i = exp( i2π/N) = − − − ki = ik = j, i2 = j2 = k2 = ijk = 1. cos(2π/N) isin(2π/N). We now define the following co- − − − sine and sine− transforms being the real and imaginary parts of The number a is considered to be the real part of Q and (bi + c j + this 1-D DFT: dk) is the “imaginary” part of Q. The quaternion conjugate Q¯ = N−1 a (bi + c j + dk). The property of commutativity does not hold − Cx(p) = Real(Xp) = ∑ xn cos(ϕnp), in quaternion algebra, i.e., Q1Q2 = Q2Q1 for many quaternions n=0 6 N−1 (3) Q1 and Q2. A quaternion number has four components, a real part and Sx(p) = Imag(Xp) = ∑ xn sin(ϕnp), − n three imaginary parts, which naturally coincides with the three =0 components, R(ed), G(reen), and B(lue) of a color pixel for 2- where p = 0 : (N 1). − D images. Therefore, a discrete color image fn,m in the RGB We denote the vector of coefficients (Cx(0),Cx(1), Cx(2), color space can be transformed into imaginary part of quaternion ...,Cx(N 1)) by C(x), and vector (Sx(0),Sx(1),Sx(2),..., −

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.2 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192

Sx(N 1)) by S(x). The four vectors composedby the coefficients We should note that the same numbers of multiplication and ad- − Q1(p), Qi(p), Q j(p), and Qk(p) are denoted by Q1, Qi, Q j, and dition are used for the 1-D right-side QDFT [58]. Qk, respectively. As follows from (2), the 1-D left-side QDFT can In the special case when µ =(i + j + k)/√3, equation (8) be written as can be written as Q + iQ + jQ + kQ = 1 i j k Fp = Q1(p) + iQi(p) + jQ j(p) + kQk(p), = C(a) + m1S(b) + m2S(c) + m3S(d) = i[C(b) m S(a) m S(d) + m S(c)] (4) Q1(p) = Real(Ap) + [Imag(Bp) + Imag(Cp) − 1 − 2 3 = j [C(c) + m S(d) m S(a) m S(b)] +Imag(Dp)]/√3, 1 − 2 − 3 = k [C(d) m S(c) + m S(b) m S(a)]. Qi(p) = Real(Bp) [Imag(Ap) Imag(Cp) − 1 2 − 3 − − +Imag(Dp)]/√3, This equation can also be writen as (9) Q j(p) = Real(Cp) [Imag(Ap) + Imag(Bp) − Q1 + iQi + jQ j + kQk = Imag(Dp)]/√3, − = C(a) + m1S(b) + m2S(c) + m3S(d) Q (p) = Real(Dp) [Imag(Ap) Imag(Bp) k − − = i[ m1S(a) +C(b) + m3S(c) m2S(d)] (5) +Imag(C )]/√3, − − p = j[ m2S(a) m3S(b) +C(c) + m1S(d)] − − where p = 0 : (N 1). The numberof operations of multiplication = k[ m3S(a) + m2S(b) m1S(c) +C(d)]. − − − and addition equal mQFT (N) = 4mFT (N) + 4N, or 8N operations Therefore, if we denote the N-point 1-D DFTs of the parts of real multiplication less than in (8). an, bn, cn, and dn of the quaternion signal fn by Ap, Bp, Cp, and Dp, respectively, we obtain the following algorithm of calculation The Left-Side 2-D QDFT of the 1-D left-side QDFT: The quaternion multiplication is not commutative and the Fp = Q1(p) + iQi(p) + jQ j(p) + kQk(p), definition of the 2-D DQFT is not unique [11]-[13],[60]. Dif- ferent DQFT can be used in image processing, including the left- Q1(p) = Real(Ap) + m1Imag(Bp) side, right-side, and two-side DQFTs. In this section,we consider +m2Imag(Cp) + m3Imag(Dp) the left-side 2-D DQFT. The color image fn,m is considered to be Qi(p) = m1Imag(Ap) + Real(Bp) of size N M which is transformed form RGB color model to the − quaternion× subspace, namely the subspace of pure quaternions. +m3Imag(Cp) m2Imag(Dp) − (6) Let N0 be the g.c.d.(N,M) and N = N0N1, M = N0M1, and Q j(p) = m2Imag(Ap) m3Imag(Bp) − − K = M1N = N1M, where integers N1,M1 1. The left-side 2-D Real C m Imag D ≥ + ( p) + 1 ( p) QDFT of the complex-in-quaternion image fn,m is defined as Qk(p) = m3Imag(Ap) + m2Imag(Bp) − N−1 M−1 m1Imag(Cp) + Real(Dp) np ms − Fp,s = ∑ WN;µ ∑ WM;µ fn,m , n=0 " m=0 # where p = 0 : (N 1). One can note− that no more than 12N operations of real mul- where p = 0 : (N 1) and s = 0 : (M 1). This transform can also − − tiplications plus 4 times mDFT (N) are used for mQFT (N). Thus, be written as [13]: the number of operations of multiplication and addition equal N−1 M−1 M1 np+N1ms mQFT (N) = 4mFT (N) + 12N and aQFT (N) = 4aFT (N) + 12N. Fp s = W fn m, r , ∑ ∑ K;µ , We consider the case when N = 2 , r > 2. The paired trans- n=0 m=0 form algorithm for the N-point DFT uses the real multiplications where p 0 : N 1 and s 0 : M 1 Here, for a given and additions in numbers [4, 29, 23, 30]: = ( ) = ( ). quaternion unit number− µ, the basis exponential− function is r−1 4 µFT (N) = 4 [2 (r 3) + 2] × × r −2 (7) WK;µ = exp( 2πµ/K) = cos(2π/K) µ sin(2π/K). 2 αFT (N) = 2 [(2 6 r 3r 6) + µFT (N)]. − − × × − − − It is assumed that the complex multiplication is performed with This is the left-side 2-D QDFT. two additions and four multiplications. Since the calculation of The inverse left-side 2-D QDFT is calculated by two N-point DFTs over the real signals can be reduced to one N- N−1 M−1 1 −(M1 np+N1ms) point DFT of a complex signal, we assume that 2mFT (N) = 4 fn,m = W Fp,s, × NM ∑ ∑ K;µ µFT (N) and2aFT (N) = 2 αFT (N). The number of operations p=0 s=0 for calculating the N-point× DFT of the real signal is twice less where p = 0 : (N 1) and s = 0 : (M 1). than thenumber of operationsfor thetransform of complexsignal. With the direct− calculation, the separable− 2-D left-side QDFT Two 1-D DFTs with real inputs can be calculated by one DFT requires N M-point 1-D left-side QDFTs and MN-point 1-D left- with complex input [23]. Therefore, the number of operations side QDFTs. The 1-D left-side QDFT requires two 1-D DFTs. when calculating the 1-D left-side QDFT can be estimated as Therefore, the row-column method uses 2N M-point 1-D DFTs mQFT (N) = 8µFT (N) + 12N = 4Nr + 16, and 2MN-point 1-D DFTs. aQFT (N) = 4αFT (N) + 12N = 2N(r + 15) (8) As an example, Figure 2 shows the color image of size 4(r2 + 3r + 4). 1223 1223; the number 1223 is prime. − ×

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.3 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192

This transform, as mentioned in Introduction, in many publica- 200 tions is also named as discrete Radon transform.

Given (p,s), the components of the splitting-signal fTp,s are 400 the following sums (or ray-sums) of the image fn,m along the par- 600 allel lines on the Cartesian lattice

X = XN N = (n,m); n,m = 0,1,...,(N 1) , 800 , { − } 1000 i.e.,

1200 fp,s,t = ∑ fn,m; np + ms = t mod N . 200 400 600 800 1000 1200 (n,m)∈X{ }

This quaternion splitting-signal fT = fp,s,t ; t = 0 : (N 1) is p,s { − } FIGURE 2: The color ’‘girl Anoush” image. calculated as Tensor Representation and the left-side 2-D QDFT fp,s,t = i(rp,s,t ) + j(gp,s,t ) + k(bp,s,t) For the simplicity of calculation, we considerthe N = M = K = fn,m = i rn,m case, i.e., when the left-side 2-D N N-point QDFT of the color- ∑  ∑  × (n,m)∈Vp,s,t (n,m)∈Vp,s,t (11) in-quaternion image fn,m is   N−1 N−1 np+ms + j gn,m + k bn,m . Fp,s = Wµ fn,m, p,s = 0 : (N 1). (10) ∑ ∑ ∑ ∑ (n,m)∈V  (n,m)∈V  n=0 m=0 − p,s,t p,s,t     It is important to note that the kernel of this transform is Here, for a given generator (p,s) from the set JN,N , we define the periodic, following N subsets in the Cartesian lattice:

t+N Vp,s,t = (n,m) X; np + ms = t mod N , t = 0 : (N 1). Wµ = cos(2π(t + N)/N) µ sin(2π(t + N)/N) { ∈ } − − t = cos(2πt/N) µ sin(2πt/N) = Wµ , The imaginary components of the splitting-signals are the − splitting-signals of the red, green, and blue channels of the color when t = 0 : (N 1). Therefore, for the left-side 2-D QDFT, we image. can apply the concept− of the tensor representation [4, 43] and re- The frequency-point (p,s) is called the generator of the duce the calculation and processing of this transform to proces- splitting-signal. The components f are periodic by t, i.e., sing of 1-D signals, which we call the color splitting-signals, or p,s,t f = f . We denote this splitting-signal by the set the quaternion splitting-signals. p,s,t+N p,s,t In the absolute scale, the left-side 2-D QDFT of the color Tp,s = (kp mod N,ks mod N); k = 0 : (N 1) , image is shown in Figure 3. This transform is shifted to the center. − since the signal carries the information about the 2-D DFT at N frequency-points of this set [30, 4],

N−1 kt Fkp mod N,ks mod N = ∑ fp,s,tWµ , k = 0 : (N 1). (12) t=0 −

Indeed, the union of the family of disjoint subsets Vp,s,t , t = 0 : (N 1), is the Cartesian grid and, therefore, the following calcu- lations− hold: N−1 kt ∑ fp,s,tWµ = t=0 N−1 kt = ∑ ∑ (rn,m)i +(gn,m) j +(bn,m)k Wµ FIGURE 3: (a) The left-side 2-D QDFT of the 2-D color-in- t=0 "np+ms=t mod N # N−1 quaternion ‘girl Anoush” image in the absolute scale and shifted k(np+ms) cyclicly to the center. = ∑ ∑ (rn,m)i +(gn,m) j +(bn,m)k Wµ t=0 np+ms=t mod N ! We consider the color image N−1 N−1 n(kp)+m(ks) = (rn,m)i +(gn,m) j +(bn,m)k Wµ . fn,m =(rn,mi + gn,m j + bn,mk) ∑ ∑ n=0 m=0 N−1 N−1   with zero real part in the quaternion algebra. The tensor rep- n(kp)+m(ks) = ∑ ∑ fn,mWµ = Fkp mod N,ks mod N . resentation of the discrete image is the 2-D frequency and 1-D n=0 m=0 time representation, when the image is described by a set of 1-D splitting-signals of length N each, The set JN,N of frequency-points (p,s), or generators, of the splitting-signals is selected in a way that covers the Cartesian lat-

χ : fn,m fTp,s = fp,s,t ;t = 0 : (N 1) ∈ . tice XN,N with a minimum number of subsets Tp,s. For instance, { } → { − } (p,s) JN,N  IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.4 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192 when N 2r r 1 the set J contains 3N 2 generators and 2000 = , > , N,N / real part of the 1−D QDFT of f 1,4,t can be definedas 1000

JN N = (1,s);s = 0 : (N 1) (2p,1); p = 0 : (N/2 1) . , − ∪ − 0

The tensor representation is unique,  and the image can be de- −1000 finedthrough the 2-D DFT calculatedby (12), or directly from the −2000 tensor transform, as shown in [4, 23, 41]. Since 3N/2 splitting- −600 −400 −200 0 200 400 600 signals compose the tensor representation, the calculation of the (a)

2-D DFT is reduced to 3N/2 one-dimensional N-point DFT, in- 2000 stead of 2N such transformation in the traditional row-column i−component of the 1−D QDFT of f 1,4,t method. 1000 It should be noted, that the total number of components of 0 3N/2 splitting-signals equals N2 +N2/2, which exceedsthe num- 2 ber N of points in the image. On the other side, many sets −1000 Tp,s, with generators (p,s) JN,N have intersections at frequency- r ∈ −2000 points. In the N = 2 casewhen r > 1, the color image is described −600 −400 −200 0 200 400 600 by 3N/2 quaternion splitting-signals and 2-D QDFT of the image (b) is split by the 3N/2 1-D QDFT of these signals. The tensor trans- form is therefore redundant. This redundancycan be removed and the 2-D DFT can be calculated in a more effective way, by using FIGURE 5: The (a) real and (b) i-component of the 1223-point the modification of the tensor representation, which is called the left-side QDFT of the quaternion splitting-signal f1,4,t. paired transform [4, 30]. The tensor representation is very effective in another case of In the absolute scale, the 1-D left-side QDFT of the splitting- most interest when N is a prime, since the number of required signal is shown in Figure 6 in part a after shifting to the center. sets Tp,s is N + 1 and the sets intersect only at the point (0,0). The 1-D QDFT this splitting-signal coincides with the 2-D left- Now, we implement the concept of the tensor representation for side QDFT of the image at frequency-points of the set T1,4 which the quaternion images. In this case, the number of such signals are shown in part b. and 1-D QDFT equals (N + 1), because the set of generators can 0.5 1200 ...... be taken as ...... F =203.94 ...... 1000 ...... 0.4 0 ...... J = (1,s);s = 0 : (N 1) (0,1) ...... N,N ...... − ∪ { } ...... 800 ...... 0.3 ...... We consider the representation of this image at frequency- ...... 600 ...... point (p,s)=(1,4). The components of the quaternion splitting- ...... 0.2 ...... 400 ...... signals of the red, green, and blue channels, which are generated ...... 0.1 ...... by this frequency-point (1,4) are shown in Figure 4 in parts a, b, ...... 200 ...... and c, respectively...... 0 0 ...... −600 −400 −200 0 200 400 600 0 500 1000 140 135 (a) (b) r 115 135 1,4,t 130 g 1,4,t b 1,4,t FIGURE 6: (a) The 1-D left-side QDFT the quaternion splitting- 130 125 110 signal f1,4,t (in the absolute scale), and (b) the location of 125 120 frequency-points of the set T1,4 on the Cartesian grid. 105 120 115 Figure 7 illustrates the quaternion 2-D left-side QDFT. The 115 110 100 real part of this quaternion transform is shown in part a in the 0 500 1000 0 500 1000 0 500 1000 (a) (b) (c) absolute scale, and the imaginary part as three-component data is shown in the RGB color model in part a. FIGURE 4: The (a) red, (b) green, and (c) blue components of the splitting-signal f1,4,t. In this case N = 1223. The set of N + 1 = 1224 such triplet splitting-signals of length N each describe the color-in-quaternion image as well as its 2-D QDFT. The splitting-signal f =(r )i +(g ) j +(b )k, t = 0 : (N 1), 1,4,t 1,4,t 1,4,t 1,4,t − is referred to as the color splitting-signal in the quaternion space. The N-point left-side 1-D QDFT of this splitting-signal is shown (a) (b) in Figure 5 in the absolute scale (and with the normalized actor of 1/N2) only for the real part of the transform in part (a) and the FIGURE 7: (a) The real part and (b) the imaginary part of the i-component of the imaginary part in b. left-side 2-D QDFT of the 2-D color-in-quaternion ‘girl Anoush”

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.5 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192 image in the absolute scale and shifted cyclicly to the center. All Figure 8 shows the color image in part a, and the direction 1-D and 2-D quaternion left-side DFTs were calculated for the images generated by three frequency-points (p,s)=(1,1), (1,2) unit number µ =(i + 2 j + k)/√6. and (1,4) in parts b, c, and d, respectively. Thesedirection images were amplified by the factors of 1.5,1.5, and 1.85, respectively. When N = 2r and integer r > 1, the number of N-point 1-D For this example when N = 1223, the color image 1223 QDFTs required to calculate the N N-point 2-D QDFT equals × 1223 is the sum of such 1224 direction images dn,m;p,s; (p,s) 3N/2. For N > 2 prime, the number× of N-point 1-D QDFTs re- J which represents the inverse tensor transform.{ ∈ quired to calculate the N N-point 2-D QDFT equals N + 1. It 1223,1223} × In general case when N is prime, all (N + 1) cyclic-groups should be noted, that the tensor transform is of size N(N + 1) = T intersect only at points (0,0). The following statements hold: N2 + N > N2, but it is not redundant since we can represent the p,s image by one full splitting-signal, let say f ; t = 0 : (N 1) , Statement 1: The quaternion image fn,m of size N N, where { 1,0,t − } × and N other signals as fp,1,t ; t = 0 : (N 2) . The sum of com- N > 2 is a prime, can be calculated as the sum of (N + 1) direc- ponents of splitting-signals{ is the same and− equals} the area (S) of tional images: image, i.e., fn,m = ∑ dn,m;p,s N−1 N−1 N−1 (p,s)∈JN,N ∑ fp,1,t = S = ∑ ∑ fn,m, N−1 t n m 1 (14) =0 =0 =0 = f + f , N ∑ p,1,(np+m) mod N 1,0,n for all p = 0 : (N 1). Therefore, " p=0 # − − n,m = 0 : (N 1). N 2 − fp,1,N−1 = S ∑ fp,1,t . The reconstruction of the color and quaternion images by − t=0 direction images has place for other cases of N. For instance for Each N-point 1-D left-side QDFT can be calculated by two the N = 2r case, we can use the modified tensor representation complex N-point 1-D DFTs. Here, we note for comparison, that which is similar to the paired representation for the 2-D gray-scale the number of N N-point 2-D left-side QDFT in the traditional images (see for details [4, 23, 5]). row-column wise× algorithm requires 2N N-point 1-D left-side Statement 2: The quaternion discrete image of size N N, QDFTs, or 4NN-point complex 1-D DFTs. where N = 2r, r > 1, can be composedfrom its (3N 2) direction× The representation of the color and quaternion image by the images as − 1-D splitting-signals allows us not only calculate the 2-D left-side QDFT, but to reconstruct the image directly from the splitting- fn,m = ∑ dn,m;p,s ∈ 0 signals,or the direction images defined by the splitting-signals. (p,s) JN,N Similar to the gray-scale images [4],[39]-[42], the direction image r−1 1 1 0 from the signal fp,s,t is calculated by (15) = ∑ k ∑ fp,s,(np+ms) mod N 2N 2 k k=0 (p,s)∈2 J r−k r−k n,m;p,s 1 2 ,2 dn,m = d = f (13) 1 0 N p,s,(np+ms) mod N + f . N2 0,0,0 where n,m = 0 : (N 1). 0 − Here, the components fp,s,t are components of the paired repre- sentation [25, 27, 30, 4] which are defined from the tensor repre- sentation by 0 0 f = fp,s,t f . p,s,t − p,s,t+N/2 The last addendum in the formula represents the mean value of the image, which we denote by E[ f ],

1 0 1 E[ f ] = f = S. N2 0,0,0 N2 (a) (b) (1,1)−DI Conclusion The 2-D left-side quaternion discrete Fourier transform (QDFT) is decribed in the tensor representation in the quater- nion algebra wherein the color image can be transformed from for such color models, as RGB or XYZ. The color and quaternion images are uniquely described by a set of quaternion splitting- signals which allow to calculate the 2-D left-side QDFT by a minimum number of 1-D left-side QDFTs. The proposed ten- sor algorithm was shown uses less number of multiplications as (c) (1,2)−DI (d) (1,4)−DI the existent algorithms. The tensor representation is revealing the structure of both right- and let-side 2-D QDFT, is effective, and FIGURE 8: (a) The color image and direction images generated allows for transferring the processingof color and quaternion ima- by (p,s) equal (b) (1,1), (c) (1,2), and (d) (1,4). ges through 1-D splitting-signal.

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.6 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192

References Feature-based image saliency detection,” ICASSP, IEEE Interna- tional Conference on Acoustics, Speech and Signal Processing - Proc. pp. 2808-2812, 2014. [1] L. Rabiner, B. Gold, Theory and application of digital signal pro- [19] Guo, L., Dai, M., Zhu, M. “Quaternion moment and its invari- cessing, Prentice-Hall Inc., 1975. ants for color object classification,” Information Sciences, vol. 273, [2] S.S. Agaian, “Advances and problems of the fast orthogonal trans- pp. 132143,July 2014. forms for signal-images processing applications (Part 1),” in: Pat- [20] A.M. Grigoryan and S.S. Agaian, “Retolling of color imaging in tern Recognition, Classification, Forecasting. Yearbook, The Rus- the quaternion algebra,” Applied Mathematics and Sciences: An sian Academy of Sciences, Nauka, Moscow, Issue 3, pp. 146-215, International Journal (MathSJ), vol. 1, no. 3, pp. 23-39, 2014. 1990. [21] A.M. Grigoryan, J. Jenkinson, S.S. Agaian, “Quaternion [3] Y. Zhou, W. Cao, L. Liu, S. Agaian, C.L. P. Chen, “Fast Fourier Fourier transform based alpha-rooting method for color image transform using matrix decomposition,” Information Sciences, measurement and enhancement,” SIGPRO-D-14-01083R1, vol. 291, pp. 172-183,2015. Signal Processing, vol. 109, pp. 269–289, April 2015, [4] A.M. Grigoryan, S.S. Agaian, Multidimensional discrete unitary (doi:10.1016/j.sigpro.2014.11.019) transforms: Representation, partitioning and algorithms, Marcel [22] S.C. Pei, J.J. Ding, and J.H. Chang, “Efficient implementation of Dekker Inc., New York, 2003. quaternion Fourier transform, and correlation by 2-D [5] A.M. Grigoryan, S.S. Agaian, “Split manageableefficient algorithm complex FFT,” IEEE Trans. Signal Process., vol. 49, pp. 2783-2797, for Fourier and Hadamard transforms, IEEE Trans. Signal Proces- 2001. sing, vol. 48, no. 1, pp. 172-183,2000. [23] A.M. Grigoryan and M.M. Grigoryan, Brief Notes in Advanced [6] S.S. Agaian, K. Panetta, A.M. Grigoryan, “Transform-based image DSP: Fourier Analysis With MATLAB., CRC Press Taylor and Fran- enhancement algorithms,” IEEE Trans. on Image Processing, Group, 2009. vol. 10, no. 3, pp. 367–382,2001. [24] A.M. Grigoryan, “An algorithm of the two-dimensional [7] A.M. Grigoryan, S.S. Agaian, “Transform-based image enhance- Fourier transform,” Izvestiya VUZov SSSR, Radio- ment algorithms with performance measure,” Advances in Imaging electronica, vol. 27, no. 10, pp. 52-57, USSR, Kiev and Electron Physics, Academic Press, vol. 130, pp.165–242,2004. 1984. (translated in http://fasttransforms.com/Art-USSR- [8] W.R. Hamilton, Elements of Quaternions, Logmans, Green and Co., papers/Art−IzvuzovSSSR1984.pdf) London, 1866. [25] A.M. Grigoryan, “An optimal algorithm for computing the [9] T.A. Ell, “Quaternion-Fourier transforms for analysis of 2- two-dimensional discrete Fourier transform,” Izvestiya VUZ dimensional linear time-invariant partial differential systems,” In SSSR, Radioelectronica, vol. 29, no. 12, pp. 20-25, USSR, Proceedings of the 3nd IEEE Conference on Decision and Control, Kiev 1986. (translated in http://fasttransforms.com/Art-USSR- vol. 1-4, pp. 1830–1841,San Antonio, Texas,USA, December1993. papers/Art−IzvuzovSSSR1986.pdf) [10] E. Hitzer, “Quaternion Fourier transform on quaternion fields and [26] A.M. Grigoryan, “New algorithms for calculating discrete generalizations,” Advances in Applied Clifford Algebras, vol. 17, Fourier transforms,” Journal Vichislitelnoi Matematiki i Matem- no. 3, pp. 497-517,May 2007. aticheskoi Fiziki, vol. 26, no 9, pp. 1407-1412, AS USSR, [11] M.H. Yeh, “Relationships among various 2-D quaternion Fourier Moscow 1986. (translated in http://fasttransforms.com/Art-USSR- transforms,” IEEE Signal Processing Letters, vol. 15, pp. 669-672, papers/Art−JVMATofASUSSR1986.pdf) 2008. [27] A.M. Grigoryan and M.M. Grigoryan, “Two-dimensional Fourier [12] S.J. Sangwine, “Fourier transforms of colour images using quater- transform in the tensor presentation and new orthogonal functions,” nion, or hypercomplex, numbers,” Electronics Letters, vol. 32, Avtometria, AS USSR Siberian section, no 1, pp. 21-27, Novosibirsk, no. 21, pp. 1979–1980,October 1996. 1986. [13] S.J. Sangwine, T.A. Ell, J.M. Blackledge, and M.J. Turner, “The dis- [28] A.M. Grigoryan, “An algorithm for computing the two- crete Fourier transform of a color image,” in Proc. ImageProcessing dimensional Fourier transform of equal orders,” Proceed- II Mathematical Methods, Algorithms and Applications, pp. 430– ings of the IX All-Union Conference on Coding and Trans- 441, 2000. mission of Information, Part 2, pp. 49-52, USSR, Odessa [14] T. Shaneyfelt, M. Jamshidi, and S.S. Agaian, “Hierarchical Robotic 1988. (translated in http://fasttransforms.com/Art-USSR- Crane System for Post Grid Array Environments,” System of Sys- papers/Art−AllUnConf1988.pdf) tems Engineering (SoSE), 8th International Conference, pp. 83–87, [29] A.M. Grigoryan, “An algorithm for computing the discrete Fourier 2013. transform with arbitrary orders,” Journal Vichislitelnoi Matematiki [15] A. Kolaman and O. Yadid-Pecht, “Quaternion structural similarity: i Matematicheskoi Fiziki, AS USSR, vol. 30, no. 10, pp. 1576-1581, A new quality index for color images,” IEEE Transactions on Image Moscow 1991. (translated in http://fasttransforms.com/Art-USSR- Processing, 2012. papers/Art−JVMATofASUSSR1991.pdf) [16] Z. Yang and S.-I. Kamata, “Hypercomplex polar Fourier analysis [30] A.M. Grigoryan, “2-D and 1-D multi-paired transforms: Frequency- for color image,” Proceedings - International Conference on Image time type wavelets,” IEEE Trans. on Signal Processing, vol. 49, Processing, ICIP 2011. no. 2, pp. 344–353,Feb. 2001. [17] A. Greenblatt, C.M. Lopez, Sos S. Agaian, “Quaternion neural net- [31] A.M. Grigoryan, “Fourier transform representation by frequency- works applied to prostate cancer Gleason grading, in Proceedings, time wavelets,” IEEE Trans. on Signal Processing, vol. 53, no. 7, Man and Cybernetics, SMC 2013. IEEE International Conference, pp. 2489-2497,July 2005. Manchester, pp. 1144–1149,2013. [32] A.M. Grigoryan, S.S. Agaian, “Efficient algorithm for computing [18] H.-Y. Gao and K.-M. Lam, “From quaternion to octonion: the 2-D discrete Hadamard transform,” IEEE Transactions on Cir-

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.7 ©2016 Society for Imaging Science and Technology DOI: 10.2352/ISSN.2470-1173.2016.15.IPAS-192

cuits and Systems II, vol. 47, no. 10, pp. 1098–1103,October 2000. [49] A.M. Grigoryan and Nan Du, “Principle of superposition by di- [33] A.M. Grigoryan, “Multidimensional Discrete Unitary Transforms,” rection images,” IEEE Trans. on Image Processing, vol. 20, no. 9, chapter 19 (69 pages),in Third Edition Transformsand Applications pp. 2531–2541, September 2011. Handbookin The Electrical Engineering HandbookSeries (Editor in [50] A.M. Grigoryan, “Image reconstruction from finite number of pro- Chief, Prof. Alexander Poularikas), CRC Press, Taylor and Francis jections: Method of transferring geometry,” IEEE Trans. on Image Group, January 11, 2010. Processing, vol. 22, no. 12, pp. 4738–4751,December 2013. [34] A.M. Grigoryan, Sos S. Agaian, “Shifted Fourier transform-based [51] A.M. Grigoryan, “Another Step towards Successful Tomographic tensor algorithms for the 2-D DCT,” IEEE Trans. Signal Processing, Imaging in Cancer: Solving the Problem of Image Reconstruction,” vol. 49, no. 9, pp. 2113–2126,Sep. 2001. in book Computer-Aided Cancer Detection and Diagnosis: Recent [35] A.M. Grigoryan and S.S. Agaian, “Three algorithms for comput- Advances”(J. Tang and S. Agaian, Editors), SPIE Press, chapter11, ing the 2-D discrete Hartley transform,” ICIP 2000 Conference on pp. 295–338, January 2014. Image Processing, pp. 359–362,Sep. 2000. [52] A.M. Grigoryan, “Comments on “The discrete periodic Radon [36] A.M. Grigoryan, “Paired algorithm of the 1-D discrete Hartley transform”,” IEEE Trans. on Signal Processing, vol. 58, no. 11, transform,” The International Signal Processing Conference (ISPC) pp. 5962-5963,Nov 2010. and Global Signal Processing Expo (GSPx), Dallas, March 31-April [53] T. Hsung, D.P.K. Lun, and W. Siu, “Reply to Comments on The 3, 2003. Discrete Periodic Radon Transform,” IEEE Trans. on Signal Pro- [37] S.S. Agaian, H.G. Sarukhanyan, K.O. Egiazarian, and J. Astola, cessing, vol. 58, no. 11, pp. 5963-5964,Nov 2010. Hadamard Transforms, SPIE Press, 2011. [54] A.M. Grigoryan, S.S. Agaian, “Alpha-rooting method of color [38] C. Carranza, D. Llamocca, M. Pattichis, “Fast and scalable compu- image enhancement by discrete quaternion Fourier transform,” tation of the Fourier and inverse discrete periodic Radon transform,” [9019-3], in Proc. SPIE 9019, Image Processing: Algo- IEEE Trans. Signal Processing, vol. 25, no. 1, pp. 119–133,January rithms and Systems XII, 901904 (25 February 2014); 12 p., doi: 2016. 10.1117/12.2040596 [39] A.M. Grigoryan, K. Naghdali, “On a method of paired represen- [55] S.S. Agaian, K. Panetta, A.M. Grigoryan, “A new measure of image tation: Enhancement and decomposition by series direction ima- enhancement,” in Proc. of the IASTED International Conference on ges,” Journal of Mathematical Imaging and Vision, vol. 34, no. 2, Signal Processing & Communication, Marbella, Spain, Sep. 19-22, pp. 185–199,June 2009. 2000. [40] A.M. Grigoryan, “Solution of the problem on image reconstruc- [56] F.T. Arslan, A.M. Grigoryan, “Fast splitting α-rooting method of tion in computed tomography,” Journal of Mathematical Ima- image enhancement: Tensor representation,” IEEE Trans. on Image ging and Vision, vol. 54, Issue 1, pp. 35–63, January 2016. (doi: Processing, vol. 15, no. 11, pp. 3375–3384,Nov. 2006. 10.1007/s10851-015-0588-6) [57] A.M. Grigoryan, E.R. Dougherty, S.S. Agaian, “Optimal Wiener [41] A.M. Grigoryan, M.M. Grigoryan, Image processing: Tensor trans- and Homomorphic Filtration: Review,” Signal Processing, vol. 121, form and discrete tomographywith MATLAB, CRC Press Taylor and pp. 111–138, April 2016, (doi:10.1016/j.sigpro.2015.11.006) Francis Group, 2012. [58] A.M. Grigoryan, S.S. Agaian, “Tensor transform-based [42] A.M. Grigoryan, “Method of paired transforms for reconstruction quaternion Fourier transform algorithm,” Information of images from projections: Discrete model,” IEEE Transactions on Sciences, vol. 320, pp. 62-74, November 2015, (doi: Image Processing, vol. 12, no. 9, pp. 985-994,September 2003. http://dx.doi.org/10.1016/j.ins.2015.05.018) [43] A. Grigoryan, S. Agaian, “Tensor form of image representation: [59] A.M. Grigoryan and S.S. Agaian, “Cell Phone Camera Color Me- enhancement by image-signals,” in Proc. IS&T/SPIEs Symposium dical Imaging via Fast Fourier Transform,” chapter 3, pp. 33–76, on Electronic Imaging Science & Technology, San Jose. CA, 22-23 in book Mobile Imaging for Healthcare Applications, (J. Tang, S. January 2003. Agaian, and J. Tan, Editors), SPIE Press, January 2016. [44] A.M. Grigoryan and N. Du, “Novel tensor transform-based method [60] A.M. Grigoryan and S.S. Agaian, “Color Enhancement and Cor- of image reconstruction from limited-angle projection data,” [9020- rection for Camera Cell Phone Medical Images Using Quaternion 14], SPIE proceedings, 2014 Electronic Imaging: Computational Tools,” chapter 4, pp. 77–117, in book Mobile Imaging for Health- Imaging XII, February 2-6, San Francisco, California, 2014. care Applications, (J. Tang, S. Agaian, and J. Tan, Editors), SPIE [45] F.T. Arslan, J.M. Moreno, and A.M. Grigoryan, “Paired direc- Press, January 2016. tional transform-based methods of image enhancement,” SPIE pro- ceedings, Visual Information Processing XV, vol. 6246 April 18-19, Biography 2006. [46] F.T. Arslan, A.K. Chan, and A.M. Grigoryan, “Directional denois- ing of aerial images by splitting-signals,” IEEE Region 5 Technical, Artyom M. Grigoryan receivedthe PhD degreein Mathema- Professional, and Student Conference (TPS 2006), April 6-8, San tics and Physics from Yerevan State University (1990). He is an Antonio, TX. associate Professor of the Department of Electrical Engineering [47] F.T. Arslan and A.M. Grigoryan, “Enhancement of medical images in the College of Engineering,University of Texas at San Antonio. by the paired transform,” in Proceedings of the 14th IEEE Inter- The author of three books, 9 book-chapters, 3 patents and more national Conference on Image Processing, vol. 1, pp. 537–540,San than 120 papers and specializing in the design of robust filters, Antonio, Texas, September 16-19, 2007. fast transforms, tensor and paired transforms, discrete tomogra- [48] A.M. Grigoryan, Nan Du, “2-D images in frequency-timerepresen- phy, quaternion imaging, image encryption, processing biomedi- tation: Direction images and resolution map,” Journal of Electronic cal images. Imaging, vol. 19, no. 3 (033012),July-September 2010.

IS&T International Symposium on Electronic Imaging 2016 Image Processing: Algorithms and Systems XIV IPAS-192.8