Chapter 8 The Facet Model

8.1 Introduction facet model: image as continuum or piecewise continuous intensity surface observed digital image: noisy, discretized sampling of distorted version general forms:

1. piecewise constant (flat facet model), ideal region: constant gray level

2. piecewise linear (sloped facet model), ideal region: sloped plane gray level

3. piecewise quadratic, gray level surface: bivariate quadratic

4. piecewise cubic, gray level surface: cubic surfaces

8.2 Relative Maxima relative maxima: first derivative zero, second derivative negative

8.3 Sloped Facet Parameter and Error Estimation least-squares procedure: to estimate sloped facet parameter, noise variance

g(r, c) = αr + βc + γ + η(r, c)

g: image function r: row c: column α: slope in row direction β: slope in column direction γ: bias η: noise having mean 0 and variance σ^{2}

8.4 Facet-Based Peak Noise Removal peak noise pixel: gray level intensity significantly differs from neighbors (a) peak noise pixel, (b) not =====Fig. 8.1=====

8.5 Iterated Facet Model facets: image spatial domain partitioned into connected regions facets: satisfy certain gray level and shape constraints facets: gray levels as polynomial function of row-column coordinates

8.6 Gradient-Based Facet Edge Detection gradient-based facet edge detection: high values in first partial derivative

8.7 Bayesian Approach to Gradient Edge Detection The Bayesian approach to the decision of whether or not an observed gradient magnitude G is statistically significant and therefore participates in some edge is to decide there is an edge (statistically significant gradient) when,

P (edge|G) > P (nonedge|G)

P (edge|G): given gradient magnitude, conditional probability of edge P (nonedge|G): given gradient magnitude, conditional probability of nonedge

P (edge|G) = \frac{P (G|edge)P (edge)}{P (G)}

P (nonedge|G) = \frac{P (G|nonedge)P (nonedge)}{P (G)}

P (G|edge)P (edge) > P (G|nonedge)P (nonedge)

possible to infer P (G|edge) from observed image data

P (G) = P (G|edge)P (edge) + P (G|nonedge)P (nonedge)

P (G|edge) = \frac{P (G) − P (G|nonedge)P (nonedge)}{P (edge)}

= \frac{P (G) − P (G|nonedge)P (nonedge)}{1 − P (nonedge)}

8.8 Zero-Crossing Edge Detector gradient edge detector: looks for high values of first derivatives zero-crossing edge detector: looks for relative maxima in first derivative zero-crossing: pixel as edge if zero crossing of second directional derivative underlying gray level intensity function f takes the form

f(r, c) = k_{1} + k_{2}r + k_{3}c + k_{4}r^{2} + k_{5}rc + k_{6}c^{2} + k_{7}r^{3} + k_{8}r^{2}c + k_{9}rc^{2} + k_{10}c^{3}

8.8.1 Discrete Orthogonal Polynomials discrete orthogonal polynomial basis set of size N: polynomials deg. 0..N − 1 discrete Chebyshev polynomials: these unique polynomials

P_{0}(r) = 1
P_{1}(r) = r
P_{n}(r) = r^{n} + a_{n−1}r^{n−1} + ... + a_{1}r + a_{0}

P_{n}(r): orthogonal to P_{0}(r), ..., P_{n−1}(r), thus

_{r∈R}^{∑} P_{k}(r)(r^{n} + a_{n−1}r^{n−1} + ... + a_{1}r + a_{0}) = 0, k = 0, ..., n − 1

discrete orthogonal polynomials can be recursively generated

P_{i+1}(r) = rP_{i}(r) − β_{i}P_{i−1}(r)

β_{i} = \frac{∑_{r∈R} rP_{i}(r)P_{i−1}(r)}{∑_{r∈R} P_{i−1}(r)^{2}}

P_{2}(r) = r^{2} − \frac{μ_{2}}{μ_{0}}

P_{3}(r) = r^{3} − \frac{μ_{4}}{μ_{2}}r

P_{4}(r) = r^{4} + \frac{(μ_{2}μ_{4} − μ_{0}μ_{6})r^{2} + (μ_{2}μ_{6} − μ_{4}^{2})}{μ_{0}μ_{4} − μ_{2}^{2}}

μ_{k} = _{s∈R}^{∑} s^{k}

8.8.2 Two-Dimensional Discrete Orthogonal Polynomials 2-D discrete orthogonal polynomials creatable from tensor products of 1D from above equations

Index Set  Discrete Orthogonal Polynomial Set
\{−\frac{1}{2}, \frac{1}{2}\}  \{1, r\}
\{−1, 0, 1\}  \{1, r, r^{2} − \frac{2}{3}\}
\{−\frac{3}{2}, −\frac{1}{2}, \frac{1}{2}, \frac{3}{2}\} \{1, r, r^{2} − \frac{5}{4}, r^{3} − \frac{41}{20}r\}
\{−2, −1, 0, 1, 2\} \{1, r, r^{2} − 2, r^{3} − \frac{17}{5}, r^{4} + 3r^{2} + \frac{72}{35}\}

8.8.3 Equal-Weighted Least-Squares Fitting Problem weight

\frac{P_{m}(r)}{∑_{s∈R} P_{m}^{2}(s)}

e.g. r: row, c: column, k_{5}: rc numerator, ∑(rc)^{2} denominator =====Fig. 8.8=====

8.8.4 Directional Derivative Edge Finder We define the directional derivative edge finder as the operator that places an edge in all pixels having a negatively sloped zero crossing of the second directional derivative taken in the direction of the gradient r: row c: column ρ: radius in polar coordinate α: angle in polar coordinate, clockwise from column axis r = ρ sin α, c = ρ cos α directional derivative of f at point (r, c) in direction α:

f′_{α}(r, c) = lim_{h→0} \frac{f(r + h sin α, c + h cos α) − f(r, c)}{h}

f′_{α}(r, c) = \frac{∂f}{∂r} (r, c) sin α + \frac{∂f}{∂c} (r, c) cos α

second directional derivative of f at point (r, c) in direction α:

f′′_{α}(r, c) = \frac{∂^{2}f}{∂r^{2}} (r, c) sin^{2} α + 2\frac{∂^{2}f}{∂r∂c}(r, c) sin α cos α + \frac{∂^{2}f}{∂c^{2}} (r, c) cos^{2} α

f′′′_{α}(r, c) = \frac{∂^{3}f}{∂r^{3}} (r, c) sin^{3} α + 3\frac{∂^{3}f}{∂r^{2}∂c}(r, c) sin^{2} α cos α

+3\frac{∂^{3}f}{∂r∂c^{2}}(r, c) sin α cos^{2} α + \frac{∂^{3}f}{∂c^{3}} (r, c) cos^{3} α

8.9 Integrated Directional Derivative Gradient Operator integrated directional derivative gradient operator: more accurate

step edge direction =====joke=====

8.10 Corner Detection corners: to detect buildings in aerial images corner points: to determine displacement vectors from image pair gray scale corner detectors: detect corners directly by gray scale image

8.11 Isotropic Derivative Magnitudes gradient edge: from first-order isotropic derivative magnitude

8.12 Ridges and Ravines on Digital Images A digital ridge (ravine) occurs on a digital image when there is a simply connected sequence of pixels with gray level intensity values that are significantly higher (lower) in the sequence than those neighboring the sequence. ridges, ravines: from bright, dark lines or reflection, variation ...

8.13 Topographic Primal Sketch 8.13.1 Introduction The basis of the topographic primal sketch consists of the labeling and grouping of the underlying image-intensity surface patches according to the categories defined by monotonic, gray level, and invariant functions of directional derivatives. categories:

• peak

• pit

• ridge

• ravine

• saddle

• flat • hillside

topographic primal sketch: rich, hierarchical, structurally complete rep.

Invariance Requirement histogram normalization, equal probability quantization: nonlinear, enhancing peak, pit, ridge, valley, saddle, flat, hillside: have required invariance

Background primal sketch: rich description of gray level changes present in image description: includes type, position, orientation, fuzziness of edge topographic primal sketch: two-dimensional gray level variations

8.13.2 Mathematical Classification of Topographic Structures topographic structures: invariant under monotonically increasing intensity tran.

Peak peak: knob: local maximum in all directions =====Fig. 8.24===== peak: curvature downward in all directions at peak: gradient zero at peak: second directional derivative negative in all directions point classified as peak if

||∇f|| = 0, λ_{1} < 0, λ_{2} < 0

||∇f||: gradient magnitude λ_{1}: second directional derivative in w^{(1)} direction λ_{2}: second directional derivative in w^{(2)} direction

Pit pit: sink: bowl: local minimum in all directions pit: gradient zero, second directional derivative positive

||∇f|| = 0, λ_{1} > 0, λ_{2} > 0

Ridge ridge: occurs on ridge line ridge line: a curve consisting of a series of ridge points walk along ridge line: points to the right and left are lower ridge line: may be flat, sloped upward, sloped downward, curved upward,... ridge: local maximum in one direction =====Fig. 8.25=====

||∇f|| ≠ 0, λ_{1} < 0, ∇f · w^{(1)} = 0
or ||∇f|| ≠ 0, λ_{2} < 0, ∇f · w^{(2)} = 0
or ||∇f|| = 0, λ_{1} < 0, λ_{2} = 0

Ravine ravine: valley: local minimum in one direction walk along ravine line: points to the right and left are higher

||∇f|| ≠ 0, λ_{1} > 0, ∇f · w^{(1)} = 0
or ||∇f|| ≠ 0, λ_{2} > 0, ∇f · w^{(2)} = 0
or ||∇f|| = 0, λ_{1} > 0, λ_{2} = 0

Saddle saddle: local maximum in one direction, local minimum in perpendicular dir. saddle: positive curvature in one direction, negative in perpendicular dir. saddle: gradient magnitude zero saddle: extrema of second directional derivative have opposite signs

||∇f|| = 0, λ_{1} ∗ λ_{2} < 0

Flat flat: plain: simple, horizontal surface =====Fig. 8.26===== flat: zero gradient, no curvature

||∇f|| = 0, λ_{1} = 0, λ_{2} = 0

flat: foot or shoulder or not qualified at all foot: flat begins to turn up into a hill shoulder: flat ending and turning down into a hill =====joke=====

Hillside hillside point: anything not covered by previous categories hillside: nonzero gradient, no strict extrema slope: tilted flat (constant gradient)

λ_{1} = λ_{2} = 0

convex hill: curvature positive (upward)

λ_{1} ≥ λ_{2} ≥ 0, λ_{1} ≠ 0

concave hill: curvature negative (downward)

λ_{1} ≤ λ_{2} ≤ 0, λ_{1} ≠ 0 saddle hill: up in one direction, down in perpendicular direction

λ_{1} ∗ λ_{2} < 0

inflection point: zero crossing of second directional derivative

Summary of the Topographic Categories mathematical properties of topographic structures on continuous surfaces =====Table 8.5=====

Invariance of the Topographic Categories topographic labels: invariant under monotonically increasing gray level tran. monotonically increasing: positive derivative everywhere

Ridge and Ravine Continua entire areas of surface: may be classified as all ridge or all ravine

8.13.3 Topographic Classification Algorithm peak, pit, ridge, ravine, saddle: likely not to occur at pixel center peak, pit, ridge, ravine, saddle: if within pixel area, carry the label

Case One: No Zero Crossing no zero crossing along either of two directions: flat or hillside no zero crossing: if gradient zero, then flat no zero crossing: if gradient nonzero, then hillside hillside: possibly inflection point, slope, convex hill, concave hill,... =====Table 8.6=====

Case Two: One Zero Crossing one zero crossing: peak, pit, ridge, ravine, or saddle =====Table 8.7=====

Case Three: Two Zero Crossings LABEL1, LABEL2: assign label to each zero crossing =====Table 8.8=====

Case Four: More Than Two Zero Crossing more than two zero crossings: choose the one closest to pixel center more than two zero crossings: after ignoring the other, same as case 3

8.13.4 Summary of Topographic Classification Scheme one pass through the image, at each pixel 1. calculate fitting coefficients, k_{1} through k_{10} of cubic polynomial

2. Use above coefficients to find gradient, gradient magnitude, eigenvalues, ...

3. search in eigenvector direction for zero crossing of first derivative

4. recompute gradient, gradient magnitude, second derivative, then classify

=====Garfield 17:8=====

Previous Work web representation [Hsu et al. 1978]: axes divide image into regions

Project due Dec. 21 Write the following programs to detect edge:

1. zero-crossing on the following four types of images to get edge images (choose proper thresholds), p. 349

2. Laplacian, Fig. 7.33

3. minimum-variance Laplacian, Fig. 7.36

4. Laplacian of Gaussian, Fig. 7.37

5. Difference of Gaussian, (use tk to generate D.O.G.)

D. Marr, Vision, W.H. Freeman, San Francisco, p.54-74, 1982. =====Marr, Vision, Fig. 2.9===== =====Marr, Vision, Fig. 2.16===== dog (inhibitory σ = 1, excitatory σ = 3, kernel size=11)