0

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.

Marcus Müller
  • 24,744
  • 4
  • 29
  • 50
  • 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. – Marcus Müller Jun 08 '19 at 14:29

1 Answers1

1

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).

Laurent Duval
  • 28,803
  • 3
  • 26
  • 88