0% found this document useful (0 votes)
102 views6 pages

Understanding Gaussian Scale Space

This document summarizes a lecture on scale and scale space in image processing. It discusses: 1) Gaussian scale space, which blurs images with Gaussians of increasing standard deviation to create a scale space. 2) Scale invariance properties - if one image is a scaled version of another, their scale spaces will be identical up to a scaling of dimensions. 3) Normalized Gaussian derivatives, which detect edges and blobs in a way that is independent of scale. Peaks in responses to these filters indicate edges and blobs.

Uploaded by

Lokesh Kancharla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views6 pages

Understanding Gaussian Scale Space

This document summarizes a lecture on scale and scale space in image processing. It discusses: 1) Gaussian scale space, which blurs images with Gaussians of increasing standard deviation to create a scale space. 2) Scale invariance properties - if one image is a scaled version of another, their scale spaces will be identical up to a scaling of dimensions. 3) Normalized Gaussian derivatives, which detect edges and blobs in a way that is independent of scale. Peaks in responses to these filters indicate edges and blobs.

Uploaded by

Lokesh Kancharla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

COMP 558 lecture 11

Oct. 8, 2009 (modified Oct. 10)

Today we will look more closely at an important issue scale. Scale has come up indirectly in our
discussions. For example, in the Canny edge analysis, we considered what happens when we stretch
the size of a filter. More recently, when we discussed image registration and Harris corners, we
discussed image distances (length scales) over which we can or cannot assume a first order model
of intensity. Today we will look more closely at scale issues.

Gaussian scale space


We begin with a 1D image I(x). Define family of images
I(x, ) = I(x) G (x).
The function I(x, ) is called a Gaussian scale space. You can think of it as a sequence of blurred
1D images, indexed by the amount of blur which is the standard deviation of the Gaussian.
Note that the Gaussian has the property that
G (x) = sGs (sx)

(1)

i.e.

x2
s2 x2
1
s
e 22 =
e 2s2 2
2
2s
For example, if we squeeze the Gaussian by some factor then the peak of the Gaussian is multiplied
by the same factor. Remember, the Gaussian is a probability function and so it has area 1, and
so if we squeeze it in the horizontal direction then we must expand it in the vertical direction to
preserve area.
Now suppose we have a second image J(x) such that J(x) = I(sx). How is the scale space for
J(x) related to the scale space for I(x) ?
Z
J(x) G (x) =
G (x x )J(x )dx
Z
=
G (x x )I(sx )dx
Z
=
sGs (s(x x ))I(sx )dx , from Eq. (1)
Z
=
Gs (sx sx )I(sx )d(sx )
Z
=
Gs (sx w)I(w)d(w), where w = sx

= (I Gsx )(sx)

()

The scale space for J(x) is squeezed by a factor s relative to the scale space for I(x) and this squeeze
occurs for both dimensions x, .
Similar arguments hold in 2D. For a 2D Gaussian, you can verify that
G (x, y) = s2 Gs (sx, sy).
1

COMP 558 lecture 11

Oct. 8, 2009 (modified Oct. 10)

Go through the steps in the above derivation for 2D. You will see that if I(x, y) = J(sx, sy) then
(J G )(x, y) = (I Gs )(sx, sy).
This says that if you have a second image J() that is a squeezed version of I() and if you blur J()
with some Gaussian, then the resulting image is the same as if you first blur I() with a stretched
Gaussian and then squeeze it.

Edge detection and normalized Gaussian derivatives


Consider a noise-free image edge I(x) = u(x x0 ). To detect edges previously, we convolved them
with a derivative of Gaussian and then looked for a peak in the response. Suppose we define a scale
space by convolving I(x) with a family of first derivative of Gaussian filters:
dI
dG
(x) = G (x) (x) = G (x) (x x0 ) = G (x x0 ).
dx
dx
At the location of the edge x = x0 , we have
I(x)

(I

dG
1
)(x0 ) = G (0) =
dx
2

which depends on .
We can get a response that does not depend on by using a slightly different filter, namely
d

dx G (x). Then (I dG
)(x) will take value 12 at x = x0 which obviously does not depend on
dx
. We refer to this filter as normalized Gaussian derivative and the resulting scale space as the
normalized Gaussian derivative scale space.1
If we have a 2D image, then we define the normalized derivative filter in the same way, namely

(x, y) and similarly for y. Exactly the same arguments as above are used to show that the
G
x
value at a horizontal or vertical edge will be independent of . Using these filters, one defines the
normalized gradient scale space in the obvious way, and one will find that the gradient at an edge
of arbitrary orientation will be independent of . That is, we construct a scale space of image
gradients
G G
I(x, y) = (
,
) I(x, y)
x
y
If we have an edge in the image, namely a line across which there is a change in intensity then
(because we are using normalized derivatives), we expect that at the location of the edge, the
magnitude of the gradient I will be independent of the scale . Note: if you are at a point near
the edge, but not on the edge, then the magnitude of the gradient will depend on sigma.
Next, lets go back to the 1D case and reconsider our two images I() and J() which are related
by I(sx) = J(x). We saw on p. 1 that if make a Gaussian scale space of each image, then these scale
spaces will be identical except for a scaling of the x and dimensions. This property holds for the
scale space defined by a derivative of a Gaussian too, provided we used the normalized derivative.
That is, if I(sx) = J(x) then
(J

dG
dGs
)(x) = (I s
)(sx).
dx
dx

The idea of using normalized derivative scale spaces is generally attributed to T. Lindeberg, e.g. Feature
detection with automatic scale selection, International Journal of Computer Vision, 1998.

COMP 558 lecture 11

Oct. 8, 2009 (modified Oct. 10)

Why? First, here is a quick derivation. (This was not presented in class, but rather was suggested
to me by a student after class):
dG (x)
d
= (J(x) G (x))
dx
dx
d
= (I(sx) sGs (sx)), by substituting from Eq. 1
dx
dGs
= I(sx) s
(sx).
dx
This derivation is correct, as long as you interpret it correctly. When you push the derivative in
on the last line, you must interpet dGdxs (sx) to be the derivative of function Gs (x), evaluated on
the scaled domain sx instead of x. You cannot interpret it to mean dGsdx(sx) which is the derivative
of Gs (sx) with respect to x. The two are not the same, namely the latter is s times the former.
Just to be sure we understand, lets a closer look at the step from the second to third lines of
the quick derivation. It just uses the commutativity and associativity of convolution and says :
J(x)

D(x) (J(x) g(x)) = J(x) (D(x) g(x))


where we have ignored the constants s and we are defining:
f (x) I(sx)
g(x) Gs (sx)
1
D(x) lim0 ((x + ) (x )).
2
With these definitions, the derivative must be interpreted as:
D(x) g(x) = lim0 ((x + ) (x )) g(x)
1
(Gs (sx + ) Gs (sx )
= lim0
2
dGs
(sx).
=
dx
Finally, for completeness, here is the derivation that I did give in class:
J(x)

dG
d
(x) = (J(x) G (x))
dx
dx Z
d
J(x )G (x x )dx ,
=
dx
Z
d
=
I(sx )sGs (sx sx )dx , from Eq. (1)
dx
Z
dGs (sx w)
= I(w)
dw, w = sx , dw = sdx
dx
Z
dGs (sx w) d(sx w)
dw
= I(w)
d(sx w)
dx
Z
dGs
(sx w)dw
()
= I(w) s
dx
dGs
= (I s
)(sx)
dx
3

COMP 558 lecture 11

Oct. 8, 2009 (modified Oct. 10)

where by dGdxs (sx w) in (**), we mean the derivative of Gs (x), but with domain remapped
x sx w.
Exactly the same derivations are applied in 2D when I(sx, sy) = J(x, y), yielding
(J
(J

Gs
G
)(x, y) = (I s
)(sx, sy)
x
x

G
Gs
)(x, y) = (I s
)(sx, sy).
y
y

In a nutshell, this says that if we scale an image and take normalized derivatives, then the scale
spaces are identical, except that the domains (x, y, ) are scaled (stretched or squeezed).
The above scale invariance property of Gaussian derivatives is appealing, since now the height
of the peak response to the edge depends only on the amplitude A of the edge. (We have been
assuming this lecture that the edge amplitude is 1.) Note that Cannys analysis is unaffected if we
used normalized Gaussian derivatives since his S:N and localization analysis is at a single scale only
and doesnt change if we multiply the filter by some number i.e. f (x) f (x).
Normalized second derivative of Gaussian
We know that if we filter a (noise-free) edge, I(x) = u(x x0 ), with a first derivative of a Gaussian
then we get a peak response at the location of the edge. It follows immediately that if we were to
filter the edge with a second derivative of a Gaussian
I(x)

d2 G (x)
dx2

then the response would be zero at the location of the edge.


The second derivative of a Gaussian filter, and its 2D equivalent, have been very important in
computer vision as well as in human vision modelling, and was the basis for an influential early
theory of edge detection2 . The response of this filter to the edge image is:
d2 G (x)
d
dG (x)
u(x x0 )
=
(u(x x0 )
)
2
dx
dx
dx
dG (x x0 )
=
dx
(x x0 ) (xx20 )2

=
e 2
2 3
and note that the response is indeed 0 when x = x0 , as we expect.
Where do the peaks occur? Taking the derivative we get
(xx0 )2
d
d2 G (x)
(x x0 )2
1
2 2

( u(x x0 )
)
=
(1

)
e
dx
dx2
2
2 3

..which attempted to model image processing in the eye and brain. See D. Marr, E. Hildreth, Theory of Edge
Detection, Proc. Royal Soc. Lond. (Series B), 1980.

COMP 558 lecture 11

Oct. 8, 2009 (modified Oct. 10)

and set it to 0. The peak thus occurs when


1

(x x0 )2
=0
2

1
2 .
that is, x = x0 . Substituting, we see that the value of the peak is 2
2e
As we did with the first derivative filter, we can normalize the second derivative filter by multi2
plying by 2 , so the normalized second derivative filter is defined 2 ddxG2 (x). This cancels the 2
dependence in the height of the peaks. Thus we see that if we filter an edge with a normalized
second derivative of a Gaussian (as defined above), then there is a zero-crossing at the location of
the edge and there are peaks (positive and negative) at a distance away from the edge, but the
height of the peaks doesnt depend on . Lets now apply this normalized second derivative to a
problem we have not seen before.
1

Blob detection
Suppose we have a 1D intensity function that has value 1 between x0 and x1 and zero otherwise.
We can define such a pattern as the difference of step edges, namely
I(x) = u(x x0 ) u(x x1 ).
We refer to it as a 1D blob.
If we filter the blob with the normalized second derivative of a Gaussian, then the scale space
2
0
has a very nice property. When = x1 x
, the peaks in the response to the filter 2 ddxG2 (x) will
2
1
coincide at x = x0 + = x1 = x0 +x
, and the two peaks reinforce each other rather than
2
cancelling. The result is we get a large minimum in scale space at the center of the blob. (See figure
below. Matlab code for generating this figure is online next to PDF for these notes.) Note that the
peak value in scale space depends only on the amplitude A of the blob, which we are assuming is 1
in this example. The scale space peak occurs at the center of the blob (in x) and at the half width
of the blob (in ).
If we did not use a normalized second derivative of Gaussian, then we would not have this nice
correspondence between the width of the blob and the scale where the peak occurs.
The 2D case is similar. One uses the normalized Laplacian3 filter,
2norm G (x, y) 2 (

2 G
2 G
(x,
y)
+
(x, y))
x2
y 2

and defines the scale space 2norm G (x, y) I(x, y). In particular, if I(x, y) is a 2D square blob,
namely I(x, y) is constant in (x, y) [x0 , x0 + 20 ] [y0 , + 20 ] and zero outside this square, then
one gets a peak in the scale space at (x, y, ) = (x0 + 0 , y0 + 0 , 0 ).

The Laplacian operator is defined to be the sum

2
x2

2
y 2

COMP 558 lecture 11

Oct. 8, 2009 (modified Oct. 10)

normalized 2nd deriv Gaussian scale space


1

log2(sigma)

log2(sigma)

Gaussian scale space


1

5
100

110

120

130

140

150
x

160

170

180

190

100

200

110

120

130

140

150

160

170

180

190

Figure 1: Blob from x0 = 170 to x1 = 186. Peak in scale space occurs at = 8 or log2 = 3

200

You might also like