-2
$\begingroup$

DIP : digital image processing

The above image on the right was obtained by following steps

  1. Multiplying the image on the left by $(-1) ^ {(x+y)}$
  2. Computing the DFT
  3. Taking the complex conjugate of the transform
  4. Computing the inverse DFT
  5. Multiplying the image on the left by $(-1) ^{ (x+y)}$

What is the significance of each of the above 5 steps? Here by significance, I mean: what is the benefit of that step? And what loss can occur if we skip that step?

Please note that Steps 1 and 5 involve a multiplication by $-1$ and that $-1$ is raised to the power $(x+y)$.

$\endgroup$
5
  • 1
    $\begingroup$ How do we define "significance" here? Is it something like "what would the result be if you ommit one of these steps"? $\endgroup$
    – A_A
    Commented May 5, 2020 at 10:10
  • $\begingroup$ yes it is like that $\endgroup$
    – DSP_CS
    Commented May 5, 2020 at 10:33
  • $\begingroup$ @engr that reads as if it would work, but it's like the least sensible way of flipping an image I can think of. So the significance of these is "only to illustrate the properties of the DFT". And then, you can't see them as individual steps, at all. You need to see them as one formula. Individually, they make no sense. $\endgroup$ Commented May 5, 2020 at 10:34
  • 3
    $\begingroup$ @engr so, I think, as a logical step of research we can expect from you, I'd recommend you write down the formula what you're doing here, and in proper formatting. I don't know what "(-1)x+y" is supposed to mean, but I'm pretty sure you had written "multiply by (y-x)" if you actually meant (-1)x+y. Without knowing what exactly you meant, we can't even start this. So, first step, write down $\text{output}=\text{something}\cdot \text{IDFT}\left(\text{DFT}^*(\ldots)\right)$, and then reasoning on that. $\endgroup$ Commented May 5, 2020 at 10:37
  • $\begingroup$ engr, although you clarified one thing with the current edit, I'm still looking for the $\text{output}=$ form, and that's really crucial to discussing this here. $\endgroup$ Commented May 5, 2020 at 14:50

2 Answers 2

1
$\begingroup$

For the first and last step I don't see any interpretation to be honest. Actually flipped image along x and y can be achieved only through steps (2) to (4).

(2) Computes the (DFT) Discrete Fourier Transform which takes the image from the spatial domain i.e (x,y) domain to the frequency domain since an image is considered a signal and can be easily manipulated into the frequency domain which values are complex values (i.e in the form of 2+3j for example)

(3) The complex conjugate of the transform helps calculate the symmetrical values of the DFT values thus the flipped version of the image in frequency domain.

(4) Simply helps returning back from the frequency domain to the spatial one so you can display the image easily.

$\endgroup$
1
$\begingroup$

Looking at the effect you have achieved; namely a flip along the horizontal and vertical axes, all you need is to apply steps 2,3, and 4.

The following MATLAB / OCTAVE code would also generate the same flipped image in 3 steps as would given by your 5 step procedure:

% I is the image data
If = fft2(I);             % S1 - Take DFT2 of the real image
Gf = conj( If ) ;         % S2 - Take conjugate of DFT of image
g  = real( ifft2(Gf));    % S3 - Invert back into spatial domain

figure,subplot(2,1,1)
imshow(I);
subplot(2,1,2)
imshow(g);

The flipping result can be seen from the following symmetry property of DTFT / DFT :

$$f[n,m] \leftrightarrow F(\omega_1,\omega_2) \implies f^*[-n,-m] \leftrightarrow F^*(\omega_1,\omega_2) $$

For real data $f^*[-n,-m] = f[-n,-m]$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.