7 Lec 7 CV S2021
7 Lec 7 CV S2021
Lecture 7
Spatial Image Processing
c = normxcorr2(onion,peppers);
figure, surf(c), shading flat
– Associative
– Distributive
– Linear
• Second Derivative
– Laplacian is a second order isotropic derivative
• Provide the gradient maxima in both directions
• Second Derivative
– More noisier than first derivative so we adopt the
same approach of reducing the noise followed by
gradient computation
• Similarity Measures
– Sum of Absolute Differences (SAD)
Window
In red
Window
In red
• Application: Skeletonization
The process of
increasing/decreasing an
image’s size.
a. Original Image
b. Sub sampling every
7th pixel in both
directions
c. Sub sampling every
7th pixel in both
directions after
smoothing (i.e. first
remove high
frequency component
by blurring with a
gaussian kernel then
subsample)
d. Up sampling image in
c to original size by
pixel replication
Robotics and Intelligent Machine Engineering, NUST 35 / ??
Image Pyramid
Problematic?
• Region Features
– contiguous groups of pixels that are homogeneous
with respect to some pixel property. For example
the set of pixels that represent a red object against
a non-red background
• Line features
– describe straight lines in the world. Straight lines
are distinct and very common in man-made
environments – for example the edges of
doorways, buildings or roads
• Interest Points
– distinctive points in a scene which can be reliably
detected in different views of the same scene
Are we done?
• Line is represented as
• Problematic for vertical lines where
• To handle infinity problems we represent line
with polar coordinates (ρ,θ) i.e. we work in
another space
Most of the array contains zero votes (dark blue) and the light curves are
trails of single votes corresponding to each of the five input points. These
curves intersect and those points correspond to lines with more than one
vote. We see four locations where two curves intersect, resulting in cells
with two votes, and these correspond to the lines joining the four outside
points
Robotics and Intelligent Machine Engineering, NUST 56 / ??
Hough Transform
• Failure cases:
– scene contains a lot of texture
– the edges are indistinct
• Inherent Limitation: Hough transform
estimates the direction of the line by fitting
lines to the edge pixels. It ignores rich
information about the direction of the edge at
each pixel
• Intuition
# of Unique points?
• Formal Definition
Similarity is measured between central window and shifted window in all eight cardinal
directions
Measure of Cornerness
Most basic corner detector a.k.a. Moravec’s Corner Detector