# What are the Even and Odd Components of a 2D Signal

A signal $$x$$ can be decomposed into its even, $$x_e$$, and odd, $$x_o$$, parts. By,

$$x_e(t) = \frac{1}{2} [x(t) + x(-t)]$$

$$x_o(t) = \frac{1}{2} [x(t) - x(-t)]$$

What would be the equivalent for a multidimensional signal, such as a image signal?

• \Will just component-wise odd and even parts work for you? – Dilip Sarwate Oct 17 '18 at 6:33
• In 1D we can make x(-t) = x(N-t) to compute then, which is like a repetition of the signal. I am not sure if I could apply the same principle for, let's say, images. – Eduardo Reis Oct 17 '18 at 6:42
• My goal is to understand what a even kernel would be, so I can use Hartley transform instead of Fourier in my application. Unless my kernels are even, the Convolution theorem would not be a element-wise multiplication in the transformation domain. – Eduardo Reis Oct 17 '18 at 6:44

In higher dimensions, provided the definition domain is symmetric, an even multivariate function can be defined (see MathWorld Even Function) by the identity:

$$f(-x_1,-x_2,\ldots,-x_n)= f(x_1,x_2,\ldots,x_n)$$

hence one can define the even part:

$$f_e = \frac{f(x_1,x_2,\ldots,x_n)+f(-x_1,-x_2,\ldots,-x_n) }{2}$$

and the odd part follows by completion. Not everything becomes intuitive, since $$\sin(x_1,x_2)$$ becomes even...

Let us now switch to 2D for simplicity. Sometimes, the domain of $$f(x,y)$$ is not symmetric, or varies, like what happens for a convolution kernel. It is possible to define an extended notion of eveness, around an arbitrary center $$(x_0,y_0)$$:

$$f_e(x,y) = \frac{f(x,y)+f(2x_0-x,2y_0-y) }{2}$$ with $$f_o(x,y) = \frac{f(x,y)-f(2x_0-x,2y_0-y) }{2}\,.$$

In a discrete situation, such as an image filter with $$m\in \{0,\ldots,M\}$$ and $$n\in \{0,\ldots,N\}$$, one can thus split $$x[m,n]$$ as a decentered even $$x_e[m,n] = \frac{x[m,n] + x[2\frac{M}{2}-m,2\frac{N}{2}-n] }{2}\,,$$

and odd part $$x_o[m,n] = \frac{x[m,n] - x[2\frac{M}{2}-m,2\frac{N}{2}-n] }{2}\,.$$

The even part of a 2D image $$x[n,m]$$ is defined as:

$$x_e[n,m] = \frac{x[n,m] + x[-n,-m] }{2}$$

and the odd part is $$x_o[n,m] = \frac{x[n,m] - x[-n,-m] }{2}$$.

• I guess it's obvious to most but why are the two answers above different in the second term ? Accounting for the flips of the n's and m's, the first answer has x[(N - n) , (M -m)] as the second term and the second term in the last answer is x[-n,-m] Thanks. – mark leeds Oct 18 '18 at 6:39
• My answer defines evenness as a symmetry about origin according to the theoretical DTFT convention. Laurent's answer uses the idea of symmetry to include an arbitrary point. Then uses this to specialize the evennes into DFT convention. In DFT convention, x[-n,-m] is equivalent to x[N-n, M-m] as the sequences are periodic. Note that incidentally one can prefer the modulus operator for every expression in DFT which makes evennes as $$x_e[n,m] = \frac{ x[ (n)_N ,(m)_M ] + x[ (-n)_N ,(-m)_M ]}{2}$$ where $(k)_K$ is the modulus of $k$ wrt $K$. @markleeds – Fat32 Oct 18 '18 at 11:17
• @Fat32 Thanks a lot, very clean and straight. – Eduardo Reis Oct 18 '18 at 20:47
• @Fat32: Printing out and will read carefully. Thanks. – mark leeds Oct 19 '18 at 6:10