Differential Geometry Some figures from Cipolla & Giblin and DeCarlo et al. Goal • Analyze qualitative shape of surface (e.g., convex vs. concave vs. saddle) • Understand surface curvatures • Approach: parameterize surface, look at derivatives in different directions Surface Parameterization • Locally smooth, continuous parameterization (u,v) s(u,v) = [X(u,v), Y(u,v), Z(u,v)]T • Consider only on local patches of the surface Surface Parameterization • Locally smooth, continuous parameterization (u,v) s(u,v) = [X(u,v), Y(u,v), Z(u,v)]T • Consider only on local patches of the surface • r defines an “immersed surface” iff Jacobian has rank 2 (otherwise locally looks like a line) J su Xu sv Yu Z u Xv Yv Z v Tangent Planes and Normals • The vectors su and sv define a tangent plane • Defined iff su and sv are not parallel – Equivalent to saying s is an immersed surface • Unit surface normal = normal to tangent plane su sv n su sv n sv su Vectors on Surfaces • Consider two vectors w1 and w2 defined at a point p on the surface • Basic operation: how to compute dot product? • Trivial if vectors defined in terms of (x,y,z) • What if defined in terms of (u,v)? That is, w1,u w 2,u , w 2 w1 w1,v w 2 ,v • In general, w1 w 2 w1,u w 2,u w1,v w 2,v First Fundamental Form w1 w 2 w1,u su w1,v sv w 2,u su w 2,v sv su su w1,u w1,v su sv I (w1 , w1 ) su sv w 2,u sv sv w 2,v • I is called the first fundamental form – Symmetric bilinear form on the surface – Specific to a particular parameterization – Matrix is identity iff su and sv are orthonormal Curves on Surfaces • Consider a curve c(t) = (U(t), V(t)) • Velocity along the curve c(t ) suU (t ) svV (t ) 2 I (U ,V ) • So, I describes how much surface is “stretched” • Does not change if surface is “bent” without stretching Areas on Surfaces • For a region on a surface, area is given by s s dudv s s sin dudv A u u v v ( su sv ) 2 dudv ( su su )( sv sv )1 ( su su )( sv sv ) det( I ) dudv • So, sqrt of det of matrix I gives stretch of area Normal Curves • A normal curve is defined by the intersection of a surface and a plane containing the normal Normal Curvatures • Curvature of a curve is reciprocal of radius of circle that best approximates it • Curvature of a normal curve is called a normal or sectional curvature • Defined at a point p in a particular direction w Finding Normal Curvatures • Consider a normal curve c(t) = (U(t), V(t)) n n+dn c(t) r r c n c c r n c I(c, c) Second Fundamental Form • So, need to find component of change in normal in the c’ direction as we move along curve (i.e., in the c’ direction) • More generally, can ask about change in normal in direction w1 as we move in direction w2 • This is called the second fundamental form II(w1, w2) – Also a symmetric bilinear form on the surface Second Fundamental Form II (w1 , w 2 ) w1 Dw 2 (n) w1 nu (w 2 su ) n v (w 2 sv ) w1,u su n u w1,v su n v sv nu w 2,u sv nv w 2,v • Note sign convention – this produces positive curvature for convex surfaces with outwardpointing normals II and Second Derivatives su n 0 suu n su nu 0 su nu suu n su n u su n v sv nu suu n suv n sv nv suv n svv n • So II is related to the second derivatives of the surface Normal Curvatures • The normal curvature in the direction w can be written as II (w, w ) w I (w, w ) Principal Curvatures • The normal curvature varies between some minimum and maximum – these are the principal curvatures 1 and 2 • These occur in the principal directions d1 and d2 • Eigenvalues and eigenvectors of the matrix I-1II – 1 and 2 must exist and be real (symmetric matrix) – d1 and d2 must be perpendicular to each other Frénet Frames • d1, d2, and n are mutually perpendicular • Natural to define a coordinate system according to these directions – the Frénet frame • In this coordinate system, the matrix of II becomes diagonal Euler’s Formula • Working in the Frénet frame, w w d1 1 0 w d1 w d 2 w 0 d2 2 2 w 1 cos2 2 sin 2 • Euler’s formula for normal curvature • is the angle between w and d1 Computing Curvatures on Meshes • For range images: use (u,v) parameterization of range image, finite differences for derivatives • Options for general meshes: – Fit a smooth surface, compute analytically – Compute normal curvature to neighboring vertices, least squares fit to a quadratic in – Compute normal curvature to neighboring vertices, do SVD (curvatures are some function of singular values) Gaussian and Mean Curvature • The Gaussian curvature K = 1 2 • The mean curvature H = ½ (1 + 2) • Equal to the determinant and half the trace, respectively, of the curvature matrix • Enable qualitative classification of surfaces Positive Gaussian Curvature: Elliptic Points • Convex/concave depending on sign of H • Tangent plane intersects surface at 1 point Negative Gaussian Curvature: Hyperbolic Points • Tangent plane intersects surface along 2 curves Zero Gaussian Curvature: Parabolic Points • Tangent plane intersects surface along 1 curve Properties of Curvatures • Attached shadows always created along parabolic lines • Sign of curvature of image contours (silhouettes) equals sign of Gaussian curvature of surface – Inflections of the contour occur at parabolic points on the surface • Apparent motion of specular highlights ~ 1/ Using Curvatures for Recognition/Matching • Curvature histograms: compute 1 and 2 throughout surface, create 2D histograms • Invariant to translation, rotation • Alternative: use 2 / 1 – also invariant to scale – Shape index: S 12 1 tan 1 [0..1] 1 2 1 2 • Curvatures sensitive to noise (2nd derivative…), so sometimes just use sign of curvatures Using Curvatures for Segmentation • Sharp creases in surface (i.e., where |1|is large) tend to be good places to segment • Option #1: look for maxima of curvature in the first principal direction – Much like Canny edge detection – Nonmaximum suppression, hysteresis thresholding • Option #2: optimize for both high curvature and smoothness using graph cuts, snakes, etc. Using Curvatures for Visualization • Ridge and valley lines often drawn – Local maxima and minima of larger (in magnitude) curvature in principal direction – Makes interpretation of surfaces easier in some cases • Suggestive contours – Zeros of normal curvature in projection of view direction into tangent plane – Positive derivative of curvature in projected view dir