shapelets correlated with surface normals produce surfaces peter kovesi school of computer science...

49
Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Upload: sarai-abdon

Post on 01-Apr-2015

220 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shapelets Correlated with Surface Normals Produce Surfaces

Peter Kovesi

School of Computer Science & Software Engineering

The University of Western Australia

Page 2: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shape from Shading and Shape from Texture attempt to

• Calculate the surface normal direction at each point in the image, and then

• Infer the surface shape from the surface normals.

Page 3: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Surface normals are usually calculated in terms of slant and tilt

N

slant

Slant is the angle between the viewing direction and the surface normal

surface

eye

Page 4: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Tilt is the angle of the projection of the surface normal on a plane perpendicular to the viewing direction

viewer plane perpendicularto viewing direction

N

slant

tilt

projection of surface normal

Page 5: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Tilt often has an ambiguity of Problem:

Page 6: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Tilt often has an ambiguity of Problem:

Page 7: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Problem:

Regularization schemes are often used to deal with noise. However, they typically involve the minimization of an Energy Term that has mixed units

E = α fx − ˆ f x∑2

+β ˆ f xx

2

+ γ I − ˆ n ⋅s2

+ ...

surface gradient error(highly nonlinear with surface angle)

bending energy shading error

Page 8: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Problem:

Regularization schemes are often used to deal with noise. However, they typically involve the minimization of an Energy Term that has mixed units

E = α fx − ˆ f x∑2

+β ˆ f xx

2

+ γ I − ˆ n ⋅s2

+ ...

surface gradient error(highly nonlinear with surface angle)

bending energy

• The weighting parameters have to act as unit conversion operators.• The appropriate values will be dependent on scale. • This can be problematic if the regularization is being applied within a

multi-scale framework. • Discontinuities have to be automatically detected and treated specially.

shading error

Page 9: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Alternative approach:

Project the surface gradients onto a set of integrable basis functions and reconstruct the surface from these.

Frankot and Chellappa [1988] first introduced this approach using Fourier basis functions.

Features of work presented here:• Localized, non-orthogonal basis functions are used.• Correlations with basis functions are performed with

respect to slant and tilt rather than in terms of gradient in x and y.

• Ambiguities of in tilt can be considered.• Low quality reconstructions are possible with slant

information alone.

Page 10: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Decomposing and Reconstructing Signals with Basis Functions

signal

filtered at scale 2

filtered at scale 4

filtered at scale 6

Reconstruction obtained by summing band-passed signals over 6 scales

band-pass filters/wavelets

Page 11: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

We only have the gradient of the surface…

Page 12: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

We only have the gradient of the surface…

Differentiation is linear

f ∗ ′ ′ g = ′ f ∗ ′ g

surface band-pass filter

surface gradient

Page 13: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

We only have the gradient of the surface…

Differentiation is linear

A band-passed version of the signal can be obtained from a correlation performed between the gradient of the signal and integral of the band-pass filter.

f ∗ ′ ′ g = ′ f ∗ ′ g

surface band-pass filter Integral of band-pass filter(shapelet gradient)

surface gradient

Page 14: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Choice of Shapelet

• The gradient of shapelet function must satisfy the admissibility condition of zero mean.

• Must ensure preservation of phase information in the signal.

• The bank of shapelet filters should provide a uniform coverage of the signal spectrum so that it is faithfully reconstructed.

These requirements are satisfied by a Gaussian

Page 15: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Note that correlating the gradient of one shapelet filter with the gradient of the signal will correspond to extracting a band of frequencies from the signal gradient.

Page 16: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Note that correlating the gradient of one shapelet filter with the gradient of the signal will correspond to extracting a band of frequencies from the signal gradient.

The signal gradient spectrum differs from the original signal spectrum in that its amplitudes are scaled by the frequency.

Page 17: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Note that correlating the gradient of one shapelet filter with the gradient of the signal will correspond to extracting a band of frequencies from the signal gradient.

The signal gradient spectrum differs from the original signal spectrum in that its amplitudes are scaled by the frequency.

The sum of the shapelet gradient transfer functions should form a curve that is inversely proportional to frequency to counteract the scaling of the gradient spectrum. The net result will then be an even coverage of the original signal spectrum.

Page 18: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shapelet bank formed by five Gaussians with height proportional to scale.

Transfer functions of the gradients of the shapelets above.

The sum forms a curve that is approximately inversely proportional to frequency.

Page 19: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

A bank of shapelets will not form an orthogonal basis set

This does not matter if we have a strongly redundant basis set. (Achieved by using a continuous wavelet transform.)

A non-orthogonal basis set can be considered to be the sum of several orthogonal basis sets.- We get accurate reconstruction up to a scale factor

Page 20: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

• The scaling of the reconstruction due to the redundancy of the basis set can be determined and corrected if required.

• Overcomplete basis sets have the advantage that small changes in local features result in correspondingly small changes in the basis coefficients.

• Overcompleteness also provides robustness to noise.

Page 21: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

In Summary:

• Correlate the gradients/normals of the surface with the gradients/normals of a set of basis functions.

• These correlation results correspond to bandpassed versions of the original signal.

• Reconstruct surface by summing correlation results.

Perform correlation in terms of slant and tilt separately

- slant and tilt are calculated by different means.- slant and tilt have differing degrees of uncertainty.

Page 22: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Correlation of Slant

Slant lies in the range 0 - which only provides gradient magnitude information.

The slant correlation at scale i is formed by

With no tilt information this correlation measure matches positive and negative gradients equally. (No distinction between concave or convex shape)

)tan(=∇

C∇i = ∇ f ∗∇ si

gradient of surface

gradient of shapelet at scale i

Page 23: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Correlation of Tilt

• If gradient magnitudes match and tilts match correlation is +ve

• If gradient magnitudes match and tilts differ by correlation is -ve

• If tilts differ by /2 correlation is 0

Use the cosine of the tilt difference as a correlation measure

Cτi = cos(τ f − τ si)

tilt of surface tilt of shapelet at scale i

Page 24: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Overall Correlation

Ci = C∇i ⋅Cτi

Reconstruction

R = Ci

i

Page 25: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

synthetic test surface

needle diagram ofsurface normals

Page 26: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

surface normals reconstruction over 2 scales

reconstruction over 4 scales reconstruction over 6 scales

Page 27: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shapelet reconstruction using the gradients of the range data

Range data from OSU database

Page 28: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Slant and tilt with Gaussian noise of 0.3 radians standard deviation

Shapelet reconstruction

Terzopoulos multigrid reconstructionFrankot Chellappa reconstruction

Page 29: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Allowing for Tilt Ambiguity of

)(cos2sfC −=

When tilts are aligned value is 1When tilts are orthogonal value is 0When tilts are opposite value is 1

… results in rectification of the band-pass components of the surface

Page 30: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Reconstruction with a tilt ambiguity of

reconstruction oframps surface

bumps surface

reconstruction

Page 31: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Reconstruction with slant data alone

Slant-only reconstruction of bumps Slant-only reconstruction of ramps

Slant-only reconstruction of sincSinc function

Page 32: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Slant-only reconstruction of face …after segmentation and negation

Page 33: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shapelet reconstruction

Real data: Surface normals from texture

Page 34: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 35: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Sand ridges: Slant set to /4 at all pointsTilt set to 0 for white regions, for black regions

Shapelet reconstruction

Page 36: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shape from Occluding Contours

Manually marked contours

Surface normals at occluding contours are perpendicular to viewing direction.

This is a powerful cue to shape.

Page 37: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

At all points slant is set to 0, except along contours where slant is set to , and tilt is set to be perpendicular to contour.

This gradient field is not integrable.

A crude approximation of the surface normals in the scene…

Page 38: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Shapelet reconstruction

Page 39: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 40: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Manually drawn contours

Page 41: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 42: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 43: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 44: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 45: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia

Conclusions

• Reconstructions from surface normals using shapelets is simple and the process is robust to noise.

• The use of basis functions implicitly imposes a continuity constraint in the reconstruction.

• Being able to treat slant and tilt separately permits data with tilt ambiguity, or no tilt data, to be considered.

• Much can be made from limited amounts of surface normal data. This allows some some aspects of structure to be deduced from line drawings.

Page 46: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 47: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 48: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia
Page 49: Shapelets Correlated with Surface Normals Produce Surfaces Peter Kovesi School of Computer Science & Software Engineering The University of Western Australia