170 likes | 428 Views
Suggestive Contours for Conveying Shape. CS 174 Robert Li May 24, 2004. Contours. S = a smooth closed surface n (p) = unit surface normal at p v (p) = c - p, the view vector. p = a point on S c = the camera. Contour Generator = all p s.t. n (p) ٠ v (p) = 0
E N D
Suggestive Contours for Conveying Shape CS 174 Robert Li May 24, 2004 Sorce: Suggestive Contours for Conveying Shape. (SIGGRAPH 2003) Doug DeCarlo, Adam Finkelstein, Szymon Rusinkiewicz, Anthony Santella.
Contours S = a smooth closed surface n(p) = unit surface normal at p v(p) = c - p, the view vector p = a point on S c = the camera • Contour Generator = all p s.t. n(p)٠v(p) = 0 • set of points on the surface such that the unit surface normal is perpendicular to the view vector. • Contour = The visible portions of the contour generator projected onto the image plane
Curvature • The curvature k(p) = The reciprocal of the radius of the circle that best approximates the curve at p. w = The projection of v onto the tangent plane. • The radial plane = Plane defined by the vectors n, w and the point p. • The radial curve = The set of points in S intersect the radial plane. • w = The un-normalized projection of v onto the tangent plane at p
Suggestive ContoursDefinition I • Suggestive Contour Generator (I): The set of points on the surface at which its radial curvature kr is 0, and the directional derivative of kr in the direction of w is positive: Dwkr > 0
Equivalent DefinitionsDefinition II and III • Suggestive Contour Generator (II) = The set of minima of n ٠ v in the direction of w. • Suggestive Contour Generator (III) The set of points on the contour generator of a nearby viewpoint (of radial distance less than 90 degrees) that are not in radial correspondence with points on the contour generators of any (radially) closer viewpoint • Additionally
Object Space Algorithm • Test each triangle for two vertices whose sign of n dot v is different. Interpolate to get the zero crossing (Hertzmann zero crossing algorithm for smooth surfaces) • Find kr(p) = k1(p) cos2Φ+ k2(p) sin2Φ for each point. k1 and k2 are the principle curvatures of the face and Φ is the angle between w(p) and the principle curvature direction corresponding to k1 • Find the zeros of kr(p) using the zero crossing algorithm These should be loops on the surface • Calculate Dwkr and make sure it is positive • Handle numerical errors
Image Space Algorithm • Approximate n ٠ v by placing a diffuse light source at the camera origin. • Search image for valleys in intensity by finding stable minima of (n ٠ v) /||v||: • For pixel i with intensity pi, define the pixel of the greatest intensity in a radius r around pi to be pmax. • Label i a valley if two conditions are met: no more than a certain percentage s of the pixels in this disk are strictly darker than pi; and pmax- piexceeds a fixed threshold d. • Remove small irregularities with a median filter of radius r.
Results from Paper Contours image space object space
Comparison Between Algorithms • Image: • Slower • Good results • Very easy to implement - < 50 lines of code • Object: • Faster • Theoretically better results • Much harder to implement – several hundred lines of code
Future Directions • Improve object space algorithm. Need less parameters. • Implement algorithms on the GPU by using vertex and pixel shaders. • Work better with smooth surfaces