Matrix-Based Ramanujan-Sums Transforms

In this letter, we study the Ramanujan Sums (RS) transform by means of matrix multiplication. The RS are orthogonal in nature and therefore offer excellent energy conservation capability. The 1-D and 2-D forward RS transforms are easy to calculate, but their inverse transforms are not defined in the literature for non-even function <formula formulatype="inline"><tex Notation="TeX">$ ({\rm mod}~ {\rm M}) $</tex></formula>. We solved this problem by using matrix multiplication in this letter.


Matrix-Based Ramanujan-Sums Transforms
Guangyi Chen, Sridhar Krishnan, and Tien D. Bui Abstract-In this letter, we study the Ramanujan Sums (RS) transform by means of matrix multiplication.The RS are orthogonal in nature and therefore offer excellent energy conservation capability.The 1-D and 2-D forward RS transforms are easy to calculate, but their inverse transforms are not defined in the literature for non-even function .We solved this problem by using matrix multiplication in this letter.

I. INTRODUCTION
T HE Ramanujan Sums (RS) were proposed by S. Ramanujan in 1918 [1], and were applied to time-frequency analysis, signal processing, moment invariants, and shape recognition recently ([2]- [9]).The RS are orthogonal in nature and therefore offer excellent energy conservation, similar to the Fourier transform (FT).The RS are operated on integers and hence can obtain a reduced quantization error implementation.Even though the RS transform has so many important properties, it does not have the inverse RS transform for non-even function signals.In this letter, we analyse the RS transform by means of matrix multiplication, which can invert the RS transform easily.We derive both the forward and inverse RS transforms for 1-D signals and 2-D images.A few examples are also tested and our method can recover the 1-D signals and 2-D images perfectly without any errors.
The organization of this letter is as follows.Section II presents a short review of the RS transform and proposes the matrix-based RS transforms for 1-D signals and 2-D images.The inverse RS transforms can recover the signals and images perfectly without any errors.Finally, Section III concludes the letter and proposes future research directions about the RS transform.

II. MATRIX-BASED RS TRANSFORM
The RS transform has been used as means of representing arithmetical functions by an infinite series expansion.The basis of this transform is the building block of number-theoretic functions.The RS are sums of the powers of primitive roots of unity, defined as (1) where means that the greatest common divisor (GCD) is unity, i.e., and are co-prime.The RS have the following multiplicative property: (3) and the orthogonal property: We can also derive by using Euler's formula and basic trigonometric identities.where is the number of samples in the signal.However, there does not exist the inverse RS transform for the input signal in the literature.Haukkanen [10] claimed that every can be written uniquely as (6) where is the set of all even functions .A signal is called even signal if for any .It is easy to show that every even function is a periodic function, but the converse does not hold.This means that for an ordinary input signal, its forward 1-D RS transform exists, but the inverse transform cannot be calculated by using the above formula (6).
In this letter, we represent the 1-D and 2-D forward and inverse RS transforms by means of matrix multiplication.Let us define the matrix (7) where , and means the modular operation.The input signal can be represented as , where the means the transpose of the vector.
The forward 1-D RS transform of a signal can be realized as (8) where .The inverse 1-D RS transform can be obtained as (9) where means the inverse of matrix .It has been proved in [11] that the determinant of the matrix , whose , entry is the Ramanujan sum , is .Therefore, (10) This means that the Matrix in always non-singular.Further reading about the determinant of can be found in [12] and [13].In order to be stable numerically, we can use decomposition to decompose matrix , i.e., .Therefore, (11) We calculate the 1-D forward and inverse RS transforms of three 1-D signals that are used extensively in signal denoising literature.Fig. 1 shows the three input signals in the first row, their forward RS coefficients in the second row, their inverse RS transform signals in the third row, and the difference between the original signals and their reconstructed signals by using the method proposed in this letter in the last row.It can be seen that the error introduced in the transforms is nearly zero.
For 2-D images, we can perform the forward RS transform as (12) This can be written in the matrix form (13) where is defined as in ( 7) and for and .The inverse 2-D RS transform can be given as Authorized licensed use limited to: Ryerson University Library.Downloaded on October 28,2022 at 13:25:37 UTC from IEEE Xplore.Restrictions apply.

III. CONCLUSIONS
In this letter, we have studied the 1-D and 2-D forward and inverse RS transforms by means of matrix multiplication.Our method can find the 1-D and 2-D inverse RS transforms for any kinds of signals and images.Currently, there is no existing inverse RS transform in the literature for non-even functions .This letter fills in this gap by using the matrix notation.
Future research directions about the RS transform are given below.We would like to apply the 1-D and 2-D RS transforms to signal, image, or video compression.This is because the RS transform has very good property to compress the energy of the input signals, images, or videos into a few number of RS coefficients.We would also extend the RS transform to 3D data cube.This may have important applications in hyperspectral imagery analysis.

Fig. 1 .
Fig. 1.The forward and inverse RS transforms for three signals.It can be seen that the errors introduced is nearly zeros.

Fig. 2 .
Fig. 2. The forward and inverse 2-D RS transforms for the Lena image.

Fig. 3 .
Fig. 3.The forward and inverse 2-D RS transforms for the Boat image.We tested the Lena and Boat images of size 512 512 pixels for our 2-D RS transform.Figs. 2 and 3 show the original Lena/ Boat image, its RS coefficients, and the reconstructed image.For visual quality purpose, we only display a 50 50 region of the RS coefficients.It can be seen that the 2-D RS transform compresses the energy of the image into a small number of RS coefficients.Our inverse 2-D RS transform can recover the input image perfectly without errors.The computational complexity of our matrix-based RS transforms is as follows.For 1-D signal, both the forward and backward 1-D RS transforms need flops of operations, where is the signal length.For 2-D images, the forward 2-D RS transform needs flops of operations.The inverse 2-D RS transform also requires flops of operations.