close

Вход

Забыли?

вход по аккаунту

?

Basic Image Processing

код для вставкиСкачать
Detecting Image Features: Corner
Corners
Given an image,
denote the image gradient.
For each point p and a neighborhood around p, form the matrix
C is symmetric with two positive eigenvalues.
The eigenvalues give the edge strengths and
eigenvectors give the direction.
Examples
1. Perfectly uniform
2. Step edge
3. Ideal corner
Eigenvectors and eigenvalues of C
Algorithm Detecting Corners
Inputs: Image I and two parameters
sub-window size
the threshold and
1. Compute image gradients over I
2. For the matrix C over a neighborhood Q of p.
1. Compute the second eigenvector
2. If
save p into a list, L.
3. Sort L in decreasing order of
4. Scanning the sorted list top to bottom: for each
current point p delete all points appearing furhter on
the list which belong to the neighborhood of p.
Detecting other structures: lines and curves
Lines and curves are important in computer vision because they
define the contours of objects.
1. Grouping
•
Which image points compose each instance of the target
curve in the image?
2. Model Fitting: Given a set of image points belonging to a
target curve, find the best curve interpolating the points.
Hough Transform
1. Use for line detection.
2. Idea: transform a difficult pattern detection problem into a
simple peak detection problem in the space of parameters.
Parameter Space (m, n)
Divide the parameter space into cells
(depend on the needed accuracy) and
associate each cell with a counter set
to zero initially.
For each point p, increment all counters on the
corresponding line in the parameter space.
Spatial domain
Parameter domain domain
1
1
1
6
0
0
0
1
1
0
1
6
Two peaks
Some important points
1. Keep parameter space finite. Sample wide intervals for both
m and n but cut down on the resolution. Another way of
parameterize a line
2. Local maxima of c(m, n) gives multiple lines
3. Due to noise and other nonlinear contour, local noisy peaks
appear frequently. Thresholding c(m, n) is a good solution to
prune out noisy peaks.
4. Works for other types of curve detection with finite
parameter domain.
Algorithm Hough_Lines
Input a collection of points (pixels) on an image of
size M-by-N.
A, B, contains the discretized intervals of the
parameter of sizes R and T.
1. Discretize the parameter space.
2. Let C(R, T) be an array of integer contours initialized
to be zero.
3.
For each pixel(i, j), for each h= 1, …, T
1. Find index, k, of the element in A closest to
2. Increment C(k, h) by 1
4. Find all local maxima of C.
Remarks on Hough Transform
1. It is a voting algorithm. Each point votes for all
combinations of parameters which may have produced it
if it were part of the target curve (line). The counters in
parameter space can be regarded as a histogram. The
final total of votes c(m) gives the relative likelihood of
the hypothesis a curve with parameter set m exists in the
image.
2. All data points are processed independently.
3. Relatively robust to noise and spurious points are
unlikely to contribute consistently to any single bin.
4. It detects multiple lines (curves)
5. Weakness: 1) dimension of the parameter space 2) nontarget shapes can contribute (low-curvature circles).
Документ
Категория
Презентации
Просмотров
13
Размер файла
188 Кб
Теги
1/--страниц
Пожаловаться на содержимое документа