Revision 179c81d65f538a281e57a66cf9d5a894c7841be0 (click the page title to view the current version)
Changes from 179c81d65f538a281e57a66cf9d5a894c7841be0 to 670ecd6ddc77ee062f3d68ea1024c6ac24913dd0
---
title: Lecture: Corner Detection
categories: lecture
---
# Briefing
## Corners and Feature Points
![Universitetsområdet i Ålesund](Images/ntnuaes1.jpg)
![Universitetsområdet i Ålesund (ny vinkel)](Images/ntnuaes2.jpg)
+ What are distinctive points in the image?
+ Distinctive points can (to some extent) be matched in two different images.
## Corners in Mathematical Terms
+ Luminance (colour) is a function $I(x,y)$ in the co-ordinates $x$ and $y$
+ Corners are sharp changes in colour/luminance.
+ Sharp changes are large values in the derivates of $I$,
+ i.e. a large gradient $\nabla I(x,y)$
## Differentiation
+ Sampled signal $f[x]$.
+ The derivative is only defined on continuous functions $f(x)$.
+ Reconstruct the original signal.
+ Assume that it is bandwidth limited.
+ Consider the Discrete Fourier Transform
+ Gives a Frequency Domain representation
+ The signal represented as a sum of sine waves.
+ Nyquist tells us that we can reconstruct the signal perfectly
if it is sampled at twice the highest non-zero frequency.
(At least to samples per wave.)
+ Let $T$ be sampling period
+ $\omega_s=\frac{2\pi}{T}$ is the sampling frequency
+ Ideal reconstruction filter
+ Frequency domain $H(\omega)=1$ between $\pm\pi/T$
+ Time domain
$$h(x)=\frac{\sin(\pi x/T)}{\pi x/T}$$
+ Apply filter
+ Multiply in frequency domain
+ Convolve in time domain
+ Reconstructed function: $f(x) = f[x]* h(x)$
+ Assuming bandwidth limited signal, $\omega_n(f)<\pi/T$
+ The reconstructed function can be differentiated.
### Convolution
$$f[x]*h(x) = \sum_{k=-\infty}^{\infty} f[k]h(x-k)$$
+ Note the convolution of a sampled signal and a continuous one
+ [Demo](https://youtu.be/HW4IamyQnzw)
### Differentiation of the reconstructed signal
$$D\{f(x)\} = D\{f[x]*h(x)\}$$
$$D\{f(x)\} = D\{\sum_{k=-\infty}^{\infty} f[k]h(x-k)\}$$
Both convolution and derivation are linear operators
$$D\{f(x)\} = \sum_{k=-\infty}^{\infty} f[k]D\{h(x-k)\}$$
This is a convolution with the derivative of $h$.
$$D\{f(x)\} = f[k]*D\{h(x)\}$$
### Resampling
Now, we can sample this signal to get
$$S\{f'(x)\} = S\{f(x)*D\{h(x)\} = f[x]*S\{h'(x)\} = f[x]*h'[x]$$
+ In other words, the derivative a sampled signal is a convolution with $h'[x]$.
+ Unfortunately, $h[x]$ has infinite extent, so this is not practical.
+ Truncations would also leave artifacts
### Possible approximations
**Gaussian**
$$g(x) = \frac{1}{\sqrt{2\pi}\sigma}\exp\frac{-x^2}{2\sigma^2}$$
$$g'(x) = \frac{x}{\sigma^2\sqrt{2\pi}\sigma}\exp\frac{-x^2}{2\sigma^2}$$
Also infinite extent, need to trunctate.
**Differences**
$$h'[x] = ½[1,-1]$$
$$h[x]=½[1,1]$$
**Sobel**
$$h[x] = [1,\sqrt{2},1]/(2+\sqrt2)$$
$$h'[x] = [1,0,-1]/3$$
### Going to 2D
## Harris Feature Detector
# Debrief