2
$\begingroup$

Reversing spectrum of an audio signal is said to be often used in DSP – i.e. applying a low-pass filter is quite a simple operation, compared to a high-pass. So they shift the specrtum by multiplying each other sample by -1, apply the Low-pass filter and then reverse again.

I am wondering if the same processing technique could be applied to images: reverse frequencies, apply edits/processing, reverse again.

Please advice how can a spectrum of a 2D signal be reversed?

Is it something as simple as each other sample inversion as for a 1D audio signal? I'd prefer some code snippets / visual examples to math equations.

I also wonder if FFT of an image, reversing the frequencies, IFFT, FFT, another reversing, IFFT can be considered lossless to the source image?


Upd. I found an amazing github repo "javascript-labs" containing FFT / IFFT implementations in JavaScript. It helped me understand the spectrum inversion better. They just swap quadrants of the FFT image to reverse the spectrum.

Also I discovered to myself that a 2D FT can be parallelized into 1D FT's for vertical and horizontal pixel sets.

My research goal is to find a reversible transform of a source image "S" to another image "T", such as that T carries no visual clues to the content of the original image S. A transformation that is reversible, and also not dependent on precise pixel-to-pixel correspondence. I.e. it should be possible to recover original image S after taking a photo of a printed poster with transformed image T – of course with adequate losses / distortions / color regression. Hypothesis that reversing spectrum of an image would scramble it original content has failed.

$\endgroup$

1 Answer 1

0
+100
$\begingroup$

I think that you should see it as doing it in one dimension and then the other, meaning you'd invert the values of every other pixel in every row, then once it's done do it again for every column, which I suppose means you can do it directly in 2D by inverting pixels in a checkered pattern like this:

1 -1 -1 1

As for your FFT/IFFT question yes it should be lossless, save for small computation errors, and I'm not sure but it might only work with even sizes so the Nyquist and DC components can switch places. However in both cases you'll have to deal with negative pixel values, so that kind of limits you to your own algorithms, unless you do $f(v) = 0.5+0.5v$ on all your values and then undo it.

$\endgroup$
1
  • $\begingroup$ Thank you! Matches what I have come to with my own research meanwhile. $\endgroup$
    – Serge
    Commented Nov 26, 2015 at 14:56

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.