New fast algorithm for hypercomplex decomposition and ... - IEEE Xplore

1 downloads 0 Views 434KB Size Report
Abstract: In order to calculate the cross-correlation of two color images treated as vector in a holistic manner, a rapid verti- cal/parallel decomposition algorithm ...
Journal of Systems Engineering and Electronics Vol. 21, No. 3, June 2010, pp.514–519 Available online at www.jseepub.com

New fast algorithm for hypercomplex decomposition and hypercomplex cross-correlation Chunhui Zhu∗ , Yi Shen, and Qiang Wang School of Astronautics, Harbin Institute of Technology, Harbin 150001, P. R. China

Abstract: In order to calculate the cross-correlation of two color images treated as vector in a holistic manner, a rapid vertical/parallel decomposition algorithm for quaternion is presented. The calculation for decomposition is reduced from 21 times to 4 times real number multiplications with the same results. An algorithm for cross-correlation of color images based on decomposition in time domain is put forward, in which some properties pointed out in this paper can be utilized to reduce the computational complexity. Simulation results show the effectiveness and superiority of the proposed method.

the results are demonstrated. The relationship of Fourier transform and inverse Fourier transform of pure quaternions is deduced in the fourth part. In the fifth part a novel result about the cross-correlation of hypercomplex series is presented. Since color images in RGB format can be represented using pure quaternions f (m, n) = r(m, n)i + g(m, n)j + b(m, n)k

quaternion decomposition, hypercomplex.

So the results for hypercomplex can be used for color image processing.

DOI: 10.3969/j.issn.1004-4132.2010.03.025

2. Mathematical preliminaries

Keywords: color image processing, color image cross-correlation,

1. Introduction In recent years, hypercomplex has been extensively used for the aspects of color image processing such as color edge detection [1], color image filters [2], color image registration [3], motion estimation, face recognition, watermarking and image fusion. Cross-correlation is an important operation for these applications. Ell and Sangwine have presented a method to decompose a quaternion q into components of parallel q and perpendicular q⊥ to another pure quaternion p [4], and developed the forms that can be used to compute the cross-correlation of two color images based on the decomposition in frequency domain [4–6]. In this paper, a distinct and clear result of decomposition is developed and a method to compute the cross-correlation based on the decomposition in time domain is put forward. The results are shown to be more compactly and need less computational complexity. In the second part the mathematical preliminaries necessary are introduced so that this paper is self-contained. Then a simple and visualizing form of decomposing and Manuscript received October 7, 2008. *Corresponding author. This work was supported by the National Natural Science Foundation of China (60604021; 60874054).

In this part the mathematical preliminaries necessary are introduced. Be similar to complex, hypercomplex has a real part and an imaginary part, what is different from complex is that quaternion’s imaginary part has three components, i.e., a quaternion q appears as the following form q = a + bi + cj + dk where a, b, c, d are real numbers and i, j, k are imaginary units with i2 = j2 = k2 = −1 ij = k,

jk = i,

ki = j

a and bi + cj + dk are called the real part and the imaginary part of q respectively, denoted by S(q) = a V (q) = bi + cj + dk For a color image f (m, n) with scales M × N represented by quaternions, the right Fourier and inverse right Fourier transform is defined respectively as below M−1 −1  N mu nv 1 f (m, n)e−μ2π( M + N ) FfR (u, v) = √ M N m=0 n=0 (1a)

Chunhui Zhu et al.: New fast algorithm for hypercomplex decomposition and hypercomplex cross-correlation M−1 −1  N mu nv 1 f (m, n) = √ FfR (u, v)eμ2π( M + N ) M N u=0 v=0 (1b) where μ is an imaginary unit, i.e., μ is a pure quaternion i+j+k √ , which is with μ2 = −1. In this paper, let μ = 3 the direction of luminance and the direction perpendicular to μ is the direction of chrominance. As we can see that

so that

F R (FfR (u, v)(FgR )⊥ (u, v))

(2)

(a1 d2 − d1 a2 − b1 c2 − c1 b2 )k which causes the another form of Fourier transform called the left Fourier transform and the left inverse Fourier transform M−1 −1  N mu nv 1 e−μ2π( M + N ) f (m, n) FfL (u, v) = √ M N m=0 n=0 (3a) M−1 N −1   mu nv 1 eμ2π( M + N ) FfL (u, v) f (m, n) = √ M N u=0 v=0 (3b) Since the results got by (1a) and (1b) can be easily generalized to (3a) and (3b), only (1a) and (1b) are discussed in this paper. For convenience they are called Fourier transform and inverse Fourier transform. The cross-correlation of two images represented by hypercomplex as f (m, n) and g(m, n) is

cr(m, n) =

f (x, y)g(x − m, y − n)

(4)

Ell and Sangwine in [4] have deduced that for a pure quaternion q = b1 i + c1 j + d1 k and another pure unit quaternion p = b2 i + c2 j + d2 k, there is q = q⊥ + q , where 1 q⊥ = (q + pqp), q⊥ ⊥ p (8a) 2 1 q = (q − pqp), q  p (8b) 2 and  qp = −pq, q⊥p (9) qp = pq, q  p What’s more, if the real part of p is nonzero whose imaginary part is a unit one there is qp = p¯q

The non-commutative characteristic of quaternions’ multiplication also makes the convolution property of Fourier transform [7] as (5), which is usually used to compute the cross-correlation for complex, invalid for hypercomplex, so it inspires to develop a new way to compute the cross-correlation of two color images represented by quaternions. If t(n) = x(n) ∗ y(n), then (5)

(10)

In this section a simple and visualizing form of decomposition is developed in Theorem 1. Theorem 1 For a pure quaternion q = b1 i + c1 j + d1 k and another pure unit quaternion p = b2 i + c2 j + d2 k, there are q = αqp p (11) q⊥ = q − αqp p

(12)

where αqp = b1 b2 + c1 c2 + d1 d2

x=0 y=0

F [t(n)] = F [x(n)]f [y(n)]

(7b)

3. Decomposition

q1 q2 = (a1 a2 − b1 b2 − c1 c2 − d1 d2 ) +

M−1  M−1 

(7a)

cr(m, n) = F −R (FfR (u, v)(FgL ) (u, v) + Ff−R (u, v)(FgL )⊥ (u, v))

there is q1 q2 = q2 q1

(a1 c2 − c1 a2 − d1 b2 − b1 d2 )j +

(6)

cr(m, n) = F −R (FfR (u, v)(FgR ) (u, v)) +

so that for two quaternions, the commutative law of multiplication is not tenable. That is for

(a1 b2 − b1 a2 − c1 d2 − d1 c2 )i +

t(n) = F −1 (F [x(n)]F [y(n)])

where “∗” means convolution and F is the Fourier transform of complex. There are some results got by Ell and Sangwine as mentioned above in abstract with the following form

ij = ji

q1 = a1 + b1 i + c1 j + d1 k q2 = a2 + b2 i + c2 j + d2 k

515

Proof Due to (2) pqp = b3 i + c3 j + d3 k where b3 = (d22 + c22 + d22 )b1 − 2b2 (b1 b2 + c1 c2 + d1 d2 ) c3 = (b22 + c22 + d22 )c1 − 2c2 (b1 b2 + c1 c2 + d1 d2 ) d3 = (b22 + c22 + d22 )d1 − 2d2 (b1 b2 + c1 c2 + d1 d2 ) (13) Since p is a unit quaternion, there is

516

Journal of Systems Engineering and Electronics Vol. 21, No. 3, June 2010

b22 + c22 + d22 = 1 Denoted αqp = b1 b2 + c1 c2 + d1 d2 , (8) can be rewritten into pqp = q − 2αpq p (14) From (8) and (14), we reach that

with size of 1 200 × 1 920. In the same conditions, the time for decomposing the right column is 23.266 0 with the method in [4], and 3.437 0 with the method according to Theorem 1.

4. Fast method for computing F R and F −R

q = αpq p

(15)

Theorem 2 For a series of real numbers x(m, n) (m = 0, 1, . . . , M − 1; n = 0, 1, . . . , N − 1), there is

q⊥ = q − αqp p

(16)

Fx−1 (u, v) = Fx (u, v)

Since (9) and (10) provide a “commutative law” for multiplication of quaternions, the parallel/perpendicular decomposition can be widely used as a basis skill when processing color image represented by hypercomplex. To compute the decomposition of a pure quaternion with (8), it needs 3 ×3 + 4 × 3 = 21 times real number multiplications, but with (15), only 3 + 3 = 6 times real number i+j+k √ multiplications. Moreover when p = μ = , only 3 3 + 1 = 4 times real number multiplications are needed. The decomposition results of images are demonstrated in Fig. 1. The images in the left column are 1.51 MB with size of 512 × 512 and in the right column are 13.2 MB

where Fx (u, v) is the real number Fourier transform of real number series x(m, n). Proof Fx (u, v) =

M−1 −1  N

x(m, n)e−μ2π(

mu nv M + N )

m=0 n=0

Since x(m, n) are real numbers, Fx (u, v) =

M−1 −1  N

mu

x(m, n)e−μ2π( M

+ nv N )

=

m=0 n=0 M−1 −1  N

x(m, n)eμ2π(

mu nv M + N )

= Fx−1 (u, v)

m=0 n=0

Denote f (m, n) = b(m, n)i + c(m, n)j + d(m, n)k, then √ M N FfR (u, v) = M−1 −1  N

mu

f (m, n)e−μ2π( M

+ nv N )

=

m=0 n=0

i

M−1 −1  N

mu

+ nv N )

+

mu nv M + N )

+

b(m, n)e−μ2π( M

m=0 n=0

j

M−1 −1  N

c(m, n)e−μ2π(

m=0 n=0

k

M−1 −1  N

d(m, n)e−μ2π(

mu nv M + N )

m=0 n=0

√ M N Ff−R (m, n) = M−1 −1  N

mu

f (m, n)eμ2π( M

+ nv N )

=

u=0 v=0

i

M−1 −1  N

mu

+ nv N )

+

mu nv M + N )

+

b(m, n)eμ2π( M

u=0 v=0

j

M−1 −1  N

c(m, n)eμ2π(

u=0 v=0

Fig. 1

Decomposition of color image

k

M−1 −1 N  u=0 v=0

d(m, n)eμ2π(

mu nv M + N )

Chunhui Zhu et al.: New fast algorithm for hypercomplex decomposition and hypercomplex cross-correlation

According to (10), pq = q p¯ when the real part of p is nonzero.

According to Theorem 2 M−1 −1  N

mu

b(m, n)eμ2π( M

+ nv N )

=

xu

yv

xu

e−μ2π( M + N ) g⊥ (x − m, y − n) mu

b(m, n)eμ2π( M

+ nv N )

Similarly,

m=0 n=0 M−1 −1  N

xu

mu nv M + N )

So c(m, n)eμ2π(

√ M N FrR (u, v) =

mu nv M + N )

m=0 n=0

− mu

d(m, n)eμ2π( M

+ nv N )

yv

xu

e−μ2π( M + N ) g (x − m, y − n)

=

m=0 n=0

M−1 −1  N

M−1 −1 M−1 −1  N  N

=

f (x, y)g(x − m, y − n) ·

m=0 n=0 x=0 y=0 xu

yv

e−μ2π( M + N ) eμ2π(

m=0 n=0 M−1 −1  N

yv

g (x − m, y − n)e−μ2π( M + N ) =

c(m, n)eμ2π(

M−1 −1  N

yv

g⊥ (x − m, y − n)e−μ2π( M + N ) =

m=0 n=0 M−1 −1  N

517

d(m, n)eμ2π(

mu nv M + N )

m=0 n=0

So only three Fourier transforms of real number series Fb (u, v), Fc (u, v), Fd (u, v) are needed to get FfR and Ff−R .

(x−m)u + (y−n)v M N

)

Decompose g into g +g⊥ , using (9)−(10) and exchange the summation turn √ M N FrR (u, v) = −

5. Novel formula for computing cross-correlation

M−1 −1 M−1 −1  N  N

yv

xu

f (x, y)e−μ2π( M + N ) ·

m=0 n=0 x=0 y=0

The cross-correlation of two color images represented by hypercomlplex is denoted by (4) and Ell and Sangwine have got the results (7a) and (7b) based on decomposition in frequency domain. In this section a novel formula is developed for computing cross-correlation of two color images which is based on decomposition in time domain and is proved to need less computational complexity. i+j+k √ , using the decomposing method Denote μ = 3 above, g(m, n) can be decomposed into

g (x − m, y − n)eμ2π( M−1 −1 M−1 −1  N  N

(x−m)u + (y−n)v M N

xu

)



yv

f (x, y)e−μ2π( M + N ) ·

m=0 n=0 x=0 y=0

g⊥ (x − m, y − n)eμ2π( −

M−1 −1  N

(x−m)u + (y−n)v M N

xu

)

=

yv

f (x, y)e−μ2π( M + N ) ·

x=0 n=0 M−1 −1  N

g (x − m, y − n)eμ2π(

(x−m)u + (y−n)v M N

)



m=0 n=0

g(m, n) = g⊥ (m, n) + g (m, n) Considering that g(m, n) are pure quaternions, g(m, n) = −g(m, n). M−1 −1  N √ mu nv M N FrR (u, v) = r(m, n)e−μ2π( M + N ) = m=0 n=0 M−1 −1 M−1 −1  N  N

M−1 −1  N

yv

x=0 n=0 M−1 −1  N

g⊥ (x − m, y − n)eμ2π(

(x−m)u (y−n)v + N ) M

x=0 n=0

According to definition (1a) and (1b) FrR (u, v) =

f (x, y)g(x−m, y −n)·

m=0 n=0 x=0 y=0

e

xu

f (x, y)e−μ2π( M + N ) ·

(x−m)u yv −μ2π( xu + (y−n)v ) M + N ) μ2π( M N

e

xu

yv

Consider term g(x−m, y−n)e−μ2π( M + N ) in the above equation g(x − m, y − n) = g⊥ (x − m, y − n) + g (x − m, y − n)



M−1 −1  N

yv

xu

f (x, y)e−μ2π( M + N ) Fg−R (u, v) − 

x=0 y=0 M−1 −1  N x=0 y=0

xu

yv

f (x, y)eμ2π( M + N ) Fg−R (u, v) = ⊥

√ (u, v) + Ff−R (u, v)Fg−R (u, v)) − M N (FfR (u, v)Fg−R ⊥ 

518

Journal of Systems Engineering and Electronics Vol. 21, No. 3, June 2010

that is FrR (u, v) = √ (u, v) + Ff−R (u, v)Fg−R (u, v)) − M N (FfR (u, v)Fg−R ⊥  Make an inverse Fourier transform to the above equation √ r(m, n) = − M NF −R · [FfR (u, v)Fg−R (u, v) + Ff−R (u, v)Fg−R (u, v)] ⊥ 

(17)

Equations (7a) and (7b) both are based on decomposition in frequency domain. A result based on decomposition in time domain is developed by (17). Jiang [8] has discussed that the computational complexities — the real number multiplication quantities needed by (7a) and (7b) are respectively M N (7 log2 (M N ) + 105)

(18)

M N (6.5 log2 (M N ) + 105)

(19)

and According to (17), a decomposition which apparently needs a less computational complexity than the results of (7a) and (7b) needs 4M N multiplications for decomposition in the third part, M N (1.5 log2 (M N ) + 3) multiplications for a Fourier transform and an inverse Fourier transform of the same pure quaternion series f (m, n) in total, M N (0.5 log2 (M N ) + 1) multiplications for an inverse Fourier transform of a pure quaternion series of g parallel to μ, M N (2 log2 (M N )+4) multiplications for an inverse Fourier transform of a pure quaternion series of g⊥ perpendicular to μ, M N (2 log2 (M N )+ 4) multiplications for an inverse Fourier transform of a hypercomplex series. Note that since g⊥ ⊥μ, the real part of Fg−R (u, v) is zero. ⊥ 28M N multiplications for two hypercomplex multiplications is needed in (17). So the computational complexity for (17) is M N (5.5 log2 (M N ) + 43) (20) For an image of 240 × 240, the proportion of computational complexity is (20) 5.5 × 15.813 8 + 43 = = 0.625 5 (19) 6.5 × 15.813 8 + 105 and for an image of 8 × 8, the proportion of computational complexity is (20) 5.5 × 6 + 43 = = 0.527 8 (19) 6.5 × 6 + 105 The result reported in this paper can provide a more practical method for computing the cross-correlation of two color images represented by hypercomplex with its

clear and visualization than the result in [8], and has less computational complexity than (7a) and (7b).

6. Conclusions The Fourier transform and cross-correlation of hypercomplex provide a tool to analyze color images in the whole view. The parallel/perpendicular decomposition can help overcoming the non-commutation of multiplication for hypercomplex to some extent. Theorem 1 provides a method to decrease the computational complexity of decomposition from 21 to 4 times multiplications. The relationship of Fourier transform and inverse Fourier transform is discussed for the convenience of computing cross-correlation. Cross-correlation in the form of hypercomplex can realization more color correlative information of two color images than the traditional form. The method presented in this paper is base on the decomposition in time domain and reduces the computational complexity, so it makes hypercomplex’s application in color image processing more practical.

References [1] T. A. Ell, S. J. Sangwine. Hypercomplex Wiener-Khintchine theorem with application to color image correlation. Proc. of IEEE International Conference on Image Processing, Vancouver, Canada, 2000: 792–795. [2] C. E. Moxey, S. J. Sangwine, T. A. Ell. Hypercomplex correlation techniques for vector image. IEEE Trans. on Image Processing, 2003,51(7): 1941–1953. [3] C. E. Moxey, T. A. Ell, S. J. Sangwine. Hypercomplex operator and vector correlation. Proc. of European Signal Processing Conference, Toulouse, France, 2002, 3: 247–250. [4] S. J. Sangwine. Color image edge detector based on quaternion convolution. Electronics Letters, 1998, 34(10): 969–971. [5] S. J. Sangwine, T. A. Ell. Color image filters based on hypercomplex convolution. Proc. of IEE Vision Image and Signal Processing, 2000, 147(2): 89–93. [6] C. E. Moxey, S. J. Sanngwine, T. A. Ell. Color-grayscale image registration using hypercomplex phase-correlation. Proc. of IEEE International Conference on Image Processing, Rochester, NY, 2002: 385–388. [7] J. H. Leng. Fourier transformation. Beijing: Tsinghua University Press, 2004. (in Chinese) [8] S. H. Jiang. Novel algorithm for hypercomplex Fourier transform and hypereomplex correlation with applications. ACTA Electronic Sinica, 2008, 36: 100–105. (in Chinese)

Biographies Chunhui Zhu was born in 1985. She received her B.S. degree in School of Mathematics from Jilin University in 2007. She is currently working towards the Ph.D. degree in control science and Engineering in Harbin Institute of Technology and now being a visiting student in electronical and computer engineering in Duke University, NC, USA. Her research interests include fast signal and image processing algorithms with applications in medical image reconstruction and computational electromagnetic. E-mail: [email protected]

Chunhui Zhu et al.: New fast algorithm for hypercomplex decomposition and hypercomplex cross-correlation Yi Shen was born in 1965. He received his B.S., M.S. and Ph.D. degrees from Harbin Institute of Technology (HIT) in 1985,1998 and 1995, respectively. Since 1997, He has been a professor with the Department of Control Science and Engineering, HIT. His current research interests include fault diagnosis of control system, ultrasound signal processing, and flight vehicle control. E-mail: [email protected]

519

Qiang Wang was born in 1975. He received his B.S., M.S. and Ph.D. degrees in control science and engineering from Harbin Institute of Technology in 1998, 2000, 2004, respectively. He has been a professor in Department of Control Science and Engineering, Harbin Institute of Technology since 2008. His research interests include multi-sensor data fusion, wireless sensor networks and intelligent detection technology. E-mail: [email protected]

Suggest Documents