# Synopse

Laplacian of Gaussian filter.

• g = ialogfilter(f, sigma)
• g: Image.
• f: Image. input image
• sigma: Double. scaling factor
``` 1 from numpy.fft import fft2, ifft2
2 from numpy import *
3
4 def ialogfilter(f, sigma):
5     from ialog import ialog
6     from iaifftshift import iaifftshift
7     from iaisdftsym import iaisdftsym
8
9     if len(shape(f)) == 1: f = f[newaxis,:]
10     h = ialog(shape(f), map(int, array(shape(f))/2.), sigma)
11     h = iaifftshift(h)
12     H = fft2(h)
13     if not iaisdftsym(H):
14        raise Exception, "error: log filter is not symmetrical"
15     G = fft2(f) * H
16     g = ifft2(G).real
17     return g
```

# Description

Filters the image f by the Laplacian of Gaussian (LoG) filter with parameter sigma. This filter is also known as the Marr-Hildreth filter. Obs: to better efficiency, this implementation computes the filter in the frequency domain.

# Examples

## Example 1

```1 from ia636 import ialogfilter, ianormalize
2
5 g07 = ialogfilter(f, 0.7)
7 adshow(g07 > 0, title='positive values')
```

## Example 2

```1 g5 = ialogfilter(f, 5)