I am trying to implement basic homomorphic filtering but I can't seem to understand what happens in the frequency domain when you take the natural logarithm of the function.

In Matlab I'm getting not a number or infinity everywhere.

  • $\begingroup$ without knowing what linear operations you apply to what data in the nonlinear domain, and what problems exactly you get under what circumstances, this will be pretty much impossible to answer. $\endgroup$ – Marcus Müller Jun 8 '19 at 14:29

Plus is the simplest operation : $z = x+y$. Fourier is inherently linear, and good at addressing it. However, most processes and data combination are nonlinear, and they should be dealt with. The second simplest operation is multiplication. Homomorphic filtering deals with $z = x\times y$. It is more complicated, especially because of zeroes.

Logarithms were invented to linearize products. Because $\log z = \log x + \log y$, and then we get back to linear. The problem is that logarithms are not defined everywhere in a simple way, especially with negative numbers. So, it is necessary to deal with that, and I do not know of a naturally sound method. But classically, one offsets and scales data, such as with a modified logarithm:

$$ \mathrm{l}_m (x) = \mathrm{sign}(x) \frac{\log(1+a|x|)}{\log(1+a)} $$

related to companding. When $a$ and $|x|$ are small, this is close to $$\mathrm{sign}(x) \frac{\log(1+a|x|)}{\log(1+a)}\approx \mathrm{sign}(x) \frac{a|x|}{a}\approx x$$ thus back to the linear case.

You can also check: Why do we substract a background image and not divide it?, talking about LIP (Logarithm Image Processing).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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