Geometric Computer Vision: Difference between revisions
Line 41: | Line 41: | ||
;Laplacian of Gaussian | ;Laplacian of Gaussian | ||
* Edges are zero crossings of the Laplacian of Gaussian convolved with the signal. | * Edges are zero crossings of the Laplacian of Gaussian convolved with the signal. | ||
Effect of <math>\sigma</math> Gaussian kernel size: | |||
* Large sigma detects large scale edges. | |||
* Small sigma detects fine features. | |||
;Scale Space | |||
* With larger sigma, the first derivative peaks (i.e. zero crossings) can move. | |||
* Close-by peaks can also merge as the scale increases. | |||
* An edge will never split. | |||
===Subtraction=== | |||
* Create a smoothed image by convolving with a Gaussian | |||
* Subtract the smoothed image from the original image. | |||
===Finding lines in an image=== | |||
Option 1: Search for line everywhere. | |||
Option 2: Use Hough transform voting. | |||
===Hough Transform=== | |||
Duality between lines in image space and points in Hough space. | |||
Equation for a line in <math>d = x \cos \theta + y \sin \theta</math>. | |||
<pre> | |||
for all pixels (x,y) on an edge: | |||
for all d, theta: | |||
if d = x*cos(theta) + y*sin(theta): | |||
H(d, theta) += 1 | |||
</pre> |
Revision as of 17:09, 2 February 2021
Notes for CMSC733 Classical and Deep Learning Approaches for Geometric Computer Vision taught by Prof. Yiannis Aloimonos.
Convolution and Correlation
See Convolutional neural network.
Traditionally, fixed filters are used instead of learned filters.
Edge Detection
Two ways to detect edges:
- Difference operators
- Models
Image Gradients
- Angle is given by \(\displaystyle \theta = \arctan(\frac{\partial f}{\partial y}, \frac{\partial f}{\partial x})\)
- Edge strength is given by \(\displaystyle \left\Vert (\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}) \right\Vert\)
Sobel operator is another way to approximate derivatives:
\(\displaystyle
s_x =
\frac{1}{8}
\begin{bmatrix}
-1 & 0 & 1\\
-2 & 0 & 2\\
-1 & 0 & 1
\end{bmatrix}
\) and
\(\displaystyle
s_y =
\frac{1}{8}
\begin{bmatrix}
1 & 2 & 1\\
0 & 0 & 0\\
-1 & -2 & -1
\end{bmatrix}
\)
You can smooth a function by convolving with a Gaussian kernel.
- Laplacian of Gaussian
- Edges are zero crossings of the Laplacian of Gaussian convolved with the signal.
Effect of \(\displaystyle \sigma\) Gaussian kernel size:
- Large sigma detects large scale edges.
- Small sigma detects fine features.
- Scale Space
- With larger sigma, the first derivative peaks (i.e. zero crossings) can move.
- Close-by peaks can also merge as the scale increases.
- An edge will never split.
Subtraction
- Create a smoothed image by convolving with a Gaussian
- Subtract the smoothed image from the original image.
Finding lines in an image
Option 1: Search for line everywhere.
Option 2: Use Hough transform voting.
Hough Transform
Duality between lines in image space and points in Hough space.
Equation for a line in \(\displaystyle d = x \cos \theta + y \sin \theta\).
for all pixels (x,y) on an edge: for all d, theta: if d = x*cos(theta) + y*sin(theta): H(d, theta) += 1