Feature Extraction
Manos Baltsavias, Haris Papasaika
Feature Extraction Manos Baltsavias, Haris Papasaika OVERVIEW - - PowerPoint PPT Presentation
Feature Extraction Manos Baltsavias, Haris Papasaika OVERVIEW APPLICATIONS - Object detection and localisation (2D measurement) - Matching (3D information) - Image analysis and scene interpretation , e.g. Edgels -> edge segments ->
Manos Baltsavias, Haris Papasaika
OVERVIEW
APPLICATIONS
Edgels -> edge segments -> closed edges (2D structures) -> 3D structures …. and much more TASKS
FEATURE TYPES
corners, junctions, high curvature gradient, gravity center, line ends, edgels
curved or straight edge or line segments, closed edges, polygonal approximations
segmented regions, blobs, specific shapes (ellipses, etc.)
combination of features and their relations
Examples From left to right: Different feature types, e.g. points, edges, regions
ATTRIBUTES OF FEATURES
Position: 3nd points or center of line, gravity center, polygon nodes Geometric:
elongation, axes of symmetry, number/position of singular points, compactness Radiometric: edge sign and strength, grey level statistics on either side of edge, multiple spectral channels, autocorrelation Textural: co-occurence matrix, homogeneity, texture gradients, textural filters, grey level moments Topological: above, left, adjacency, common end points, intersect, parallel, vertical, touch, overlap, contains, contained Comparisons: ordering of attributes, seldomness of features or attributes Spectral: Motion: features on static or moving objects Time: change of feature attributes over time Symbolic: set of constituent features/attributes, their relationships descriptions Feature combination -> new features - > symbolic description CHOICE OF ATTRIBUTES Discrimination power: statistical properties of each attribute in all features, information-theoretic measures (e.g. entropy-based) Independence: correlations between attributes in all features
PROPERTIES OF GOOD FEATURES / ATTRIBUTES Detection - Density: appearance in all images, sufficient density Seldomness-Distinctness: unique or seldom in image, distinct in neighbourhood Invariance-Stability: robust with respect to geometric and radiometric transformations, insensitive to noise Localisation: permit precise localisation Interpretability: permit interpretation (for subsequent image analysis), e.g. junctions, edges, regions, YES; edgels, NO Speed: feature extraction speed
IMAGE FEATURES
EDGES
Here, focus on intensity
Here, focus on 2D edges
The role of edges in object detection and reconstruction
Edge models (from Gonzalez and Woods)
Edges (the real life) 3D representation of grey values as surface. Below 3 zoomed parts showing the problems with the edge definition and the noise.
EDGE ATTRIBUTES AND RELATIONS Usual attributes
More complicated attributes possible, e.g.
RICH FEATURE ATTRIBUTES AND RELATIONS (HENRICSSON, 1996)
The construction of a flanking region. The source edge is black, the interfering edges are gray and the region is encoded in gray-values indicating the distance from the source edge. (A) schematically shows the construction of a flanking region, (B-D) the effect of using different region widths and
disturbances (outliers), (G) same as (F) after excluding the outliers with robust estimation.
EDGE ATTRIBUTES
EDGE RELATIONS
EDGE RELATIONS Grouping of edges based on similarity:
Extraction of edge/linear features
Other edge detection approaches possible, e.g.
Extraction of edge/linear features
Edge extraction (example with Sobel operator). From left: original image, magnitude of gradients, gradient orientation (0-180 o) coded as grey values (0-255).
Ramp edge examples (from Gonzalez and Woods). From top to bottom, addition of Gaussian noise with mean 0 and sigma=0, 0.1,1 and 10. Left column shows grey values, second the first derivatives, third the second derivatives. The higher the derivatives, the higher the effect of noise.
Preprocessing
The edges are detected from the zero crossing of the LoG.
with s, i.e. first a low-pass filtering (Gaussian), then high-pass filtering (Laplace)
detection
Examples of edge detection (all refer to gradient magnitude) Results with Canny. From top left to bottom right increasing value of σ.
Examples of edge detection (all refer to gradient magnitude) Results with Canny after deletion of the short edges.
Examples of edge detection (all refer to gradient magnitude) Top: left discrete differentiator, right Roberts. Bottom: left 3x3 Prewitt, right 3x3 Sobel.
Examples of edge detection (all refer to gradient magnitude)
Top: left DoG, 7x7 mask size, excitatory σ =1, inhibitory s =1.6 ; right original – 5x5 local average Bottom: left 3x3 compass with 8 masks ; right Laplace
Examples of edge detection (all refer to gradient magnitude) 3x3 Kirsch with 8 masks.
Computation of threshold for binarising gradients
extracted, or visual inspection of results
the threshold such that N% (e.g. 10%) of the gradients is larger than the threshold, i.e. keep the N% higher gradients
threshold such that no edges due to noise are detected
Example: edge tracking in a 4-neighbourhood Efficient storage of edgels as chain code.
point, number of edgels, direction code for every edgel)
Original image
4-neighbourhood. Chain code is: Start point: x=3, y=5 Number of points: 44 Directions: 2,2,0,2,0,0,0,6,6,0,6, ......4,2,2,4,2,2 8-neighbourhood. Chain code is: Start point: x=3, y=5 Number of points: 28 Directions: 2,1,1,0,7,6,7,1,2,1,0, .........4,3,4,3,3,3,2,2
Closing of gaps
mask), SE symmetric
combination
small, the direction of the detected edge should not change much, i.e. search space is a circle segment
Starting from an edge endpoint send 11 search rays of length 4 within an angle tolerance with respect to the orientation of the last edgel. Two other edge endpoints were detected and were connected to the first
dark, the new ones lighter.
direction possible gap
search space
Problems of edge tracking (and generally edge detection)
roof edge and road edge)
deleted in a post-processing step)
Semi-automated approaches
edge (edge following)
edges (snakes), in the segmentation lecture
Example of edge extraction
Option 1:
Search for the line at every possible position/orientation What is the cost of this operation?
Option 2:
Use a voting scheme: Hough transform
φ w
φ w
φ=0 φ=180
w=0 w=100
φ w
φ=0 φ=180
w=0 w=100
There are generalised versions for ellipses,
For the straight line transform we need to
The input image could also benefit from edge
Single line segments not isolated Will still fail in the face of certain textures
Line : http://www.dai.ed.ac.uk/HIPR2/houghdemo.html http://www.dis.uniroma1.it/~iocchi/slides/icra2001/java/hough.html Circle : http://www.markschulze.net/java/hough/
Circles have three parameters
Center (a,b) Radius r
Circle f(x,y,r) = (x-a)2+(y-b)2-r2 = 0 Task: Given an edge point at (x,y) in the image, where
could the center of the circle be? Find the center of a circle with known radius r given an edge image with no gradient direction information (edge location only)
Original image Edge detection Hough transform
Geometric features
repeatable under transformations
2D characteristics of the signal
high informational content
Comparison of different detectors [Schmid98] Harris detector
Feature points are used for:
Image co-registration 3D reconstruction Motion tracking Object recognition Indexing and database retrieval Robot navigation … other
Corners are local image features characterised by
Intersection points between two or more edge
Work directly with the values of brightness of
Usually based on the study of derivatives
(orientation, magnitude) of grey-level or color image
Extract object boundaries first then analyze its
Use edge detectors first then analyze the curvature
Less reliable
2
2
Sum over a small region, the hypothetical corner Gradient with respect to x times gradient with respect to y Matrix is symmetric
From Linear Algebra, it follows that because C is symmetric:
With R a rotation matrix, λ eigenvalues.
Filter image. Compute magnitude of the
We construct C in a window. Use Linear Algebra to find λ1
If they are both big, we have
C.Harris, M.Stephens. “A Combined Corner and Edge
We should easily recognize the point by looking through a
Shifting a window in any direction should give a large
“flat” region: no change in all directions “edge”: no change along the edge direction “corner”: significant change in all directions
2 ,
x y
Intensity Shifted intensity Window function
Window function w(x,y) = Gaussian 1 in window, 0 outside
For small shifts [u,v] we have a bilinear approximation:
2 2 ,
x x y x y x y y
where M is a 2×2 matrix computed from image derivatives:
direction of the slowest change direction of the fastest change
(λmax)-1/2 (λmin)-1/2
λ1 λ2 “Corner” λ1 and λ2 are large,
λ1 ~ λ2;
E increases in all
directions
λ1 and λ2 are small; E is almost constant
in all directions
“Edge” λ1 >> λ2 “Edge” λ2 >> λ1 “Flat” region Classification of image points using eigenvalues of M:
2
1 2 1 2
(k – empirical constant, k = 0.04-0.06)
λ1 λ2 “Corner” “Edge” “Edge” “Flat”
eigenvalues of M
magnitude for an edge
region R > 0 R < 0 R < 0 |R| small
Compute corner response R
Find points with large corner response: R>threshold
Take only the points of local maxima of