Generation of 1D and 2D sinusoidal waves are essential for the creation of test patterns, color maps, filter kernels, etc, used either in the spatial or frequency domains.
--
Sinusoid and its equation
parameters used: A=1, W=50, n=3 (or T=50/3 pixels), phi=0)
The maximum period we have to fill the entire signal is the signal length (T=W). Recall the sampling theorem, the minimum period we can sample a sinusoid wave is 2 pixels.
--
left: maximum period wave: T=W=50,
right: minimum period wave: T=2, phi=90 degrees.
For 2D images, a sinusoid wave can also be generated. The image represents a 2D sinusoid which can run in any direction. We can specify this image by specifying frequency and phase parameters in each direction. Below is a 2D wave. Its effective period is 14.14 pixels and the wave direction is 45 degrees.
--
Sinusoid image and its equation
parameters used: A=1, W=200, nw=10 (or Tw=20), phi_w=45,
H=100, nh=5 (or Th=20), phi_h=90.
--
left: first line of the 2D sinusoid wave,
right: first column of the 2D sinusoid wave
The maximum period and minimum period waves we can generate with the above image dimensions are T=200 in the width direction and T=1.41 in 45 degrees direction. It is important to remember that the minimum period is independent of the image dimensions.
--
left: maximum period 2D-wave: Tw=200, Th=0,
right: minimum period 2D-wave: Tw=Th=2, phiw=phiw=45 degrees.
Note: in the high frequency image, a small portion of it is zoomed and
displayed over it.