Morphological Simplification

40
APES: Ghrist, Rossignac, Szymczak, Turk 1 NSF CARGO DMS-0138320 Georgia Tech, May 2004 Morphological Simplification Jason Williams and Jarek Rossignac GVU Center, IRIS Cluster, and College of Computing Georgia Institute of Technology www.cc.gatech.edu/~jarek

description

Morphological Simplification. Jason Williams and Jarek Rossignac GVU Center, IRIS Cluster, and College of Computing Georgia Institute of Technology www.cc.gatech.edu/~jarek. Overarching objective. SIMPLIFICATION Understand what it means to simplify a shape or behavior - PowerPoint PPT Presentation

Transcript of Morphological Simplification

Page 1: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 1NSF CARGO DMS-0138320 Georgia Tech, May 2004

Morphological SimplificationJason Williams and Jarek Rossignac

GVU Center, IRIS Cluster, and College of Computing

Georgia Institute of Technologywww.cc.gatech.edu/~jarek

Page 2: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 2NSF CARGO DMS-0138320 Georgia Tech, May 2004

Overarching objective

SIMPLIFICATIONUnderstand what it means to simplify a shape or behaviorDevelop explicit mathematical formalisms

independently of any particular domain or representation not stated as the result of some algorithmic process

Propose practical implementations

MULTI-SCALE ANALYSISExplore the possibility of analyzing the evolution of a shape or behavior, as it is increasingly simplified, so as to understand its morphological structure and identify/measure its features identify features of interior, boundary, exterior

assess their resilience to simplification

Page 3: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 3NSF CARGO DMS-0138320 Georgia Tech, May 2004

Complexity measures for 2D shapes

Many measures of complexity are useful in different contexts:

• Visibility: Convex, star… number of guards needed • Stabbing: Number of intersections with “random” ray• Wiggles: energy in high frequency Fourier coefficients• Algebraic: Polynomial degree of bounding curves• Fidelity: accuracy required (Hausdorff, area

preservation)• Processing: Number of bounding elements• Transmission: compressed file size• Fractal: Fractal dimension• Kolmogorov: Length of data and program

We focus primarily on morphological ones:• Sharpness: curvature statistics• Smallest feature size: distance between non adjacent

parts of boundary• Topological: Number of components and holes• Non-roundness: perimeter2 /Area

Page 4: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 4NSF CARGO DMS-0138320 Georgia Tech, May 2004

What do we simplify and how much?

Simplification replaces a shape by a simpler one

• What do we mean by “simpler”?• Informally, we want to

– Remove details• Reduce sharpness and wiggles• Eliminate small components and holes• Hence increase the smallest feature size

– Shorten (tighten) the perimeter• While minimizing local changes in density

– Ratio of interior points per square unit

• How much do we want to simplify– We want to be able to use a geometric measure, r, to specify which of the details should be simplified and how

– What does the measure mean? What is the size of a detail?

Page 5: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 5NSF CARGO DMS-0138320 Georgia Tech, May 2004

Restricting simplification to a tolerance zone

• We want to restrict all changes to the envelop: tight zone around the boundary bS of the shape S– the yellow fat curve, is the offset (bS)r f bS by r

• We further restrict all changes to the Mortar – the green region, is the mortar Mr(bS)=(bSr)r of S • We explain why in the next few slides

EnvelopMortar

Page 6: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 6NSF CARGO DMS-0138320 Georgia Tech, May 2004

We need a vocabulary

To discuss and to measure simplicity, we need precise terms

• We will use three different measures– Smothness (value defined using Differential Geometry)– Regularity (value defined using Morphology)– Mortar (area near the details defined using Morphology)

• We want to be able to:– Measure smoothness at every point of the boundary of the shape– Measure regularity at every point in space– Measure the global regularity and smoothness of the whole shape

– Define and compute the Mortar for the desired tolerance– Simplify the shape in the Mortar: increasing its regularity & smoothness

• A boundary point may be r-smooth or not, r-regular or not

Page 7: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 7NSF CARGO DMS-0138320 Georgia Tech, May 2004

• A shape S is r-smooth if the curvature of every point B in its boundary bS exceeds r

• How to check for r-smoothness at B?– For C2 curves: compare radius of curvature to r– For polygons: estimate radius of curvature

• R=v2/(av)z , where v=AC/2 and a=BC–AB

• A point may be r-smooth, but not r-regular

r-smoothness

r-smooth

not r-smooth

r:

A

B

C

Page 8: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 8NSF CARGO DMS-0138320 Georgia Tech, May 2004

r-regularity

• A shape S is r-regular if S=Fr(S)=Rr(S)– Fr(S) = Srr, r-Fillet (closing) = area not reachable by r-disks out of S

– Rr(S)= Srr, r-Rounding (opening) = area reachable by r-disks in S

– Each point of bS can be approached by a disk(r) in S and by one out of S

Original L is not r-regular

Removing the red and adding the green makes it r-regular

This shape is r-smooth, but not r-regular

Page 9: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 9NSF CARGO DMS-0138320 Georgia Tech, May 2004

• Boundary is resilient to thickening by r– bS can be recovered from its rendering as a curve of

thickness 2r

• One-to-one mapping from boundary to its two offsets by r– The boundary of Sr (resp. Sr) may be obtained by offsetting

each point of bS along the outward (resp. inward) normal. No need to trim.

• r-regularity implies r-smoothness

Properties of r-regular shapes

Page 10: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 10NSF CARGO DMS-0138320 Georgia Tech, May 2004

When is a point of bS smooth, regular?

• How to check for r-regularity at B?– Check whether offset points is at distance r from bS• Dist(B±rN,bS)<r ?

– Want a set-theoretic definition?

• B is r-regular if it does not lie in the mortar Mr(S)

• The mortar is the set of all points that are not r-regular

• It is defined in the next slide

Page 11: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 11NSF CARGO DMS-0138320 Georgia Tech, May 2004

Mortar (definition)

Core = Rr(S)

Mortar: Mr(S) = Fr(S) – Rr(S)

Anticore = Fr(S)

Rounding: Rr(S)

Removes the red

Fillet: Fr(S)

Adds the green

Original set S

The plane is divided into core, mortar, and aniticore

Page 12: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 12NSF CARGO DMS-0138320 Georgia Tech, May 2004

Example of Mortar

Original shape

Core

Mortar

Page 13: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 13NSF CARGO DMS-0138320 Georgia Tech, May 2004

Properties of the mortar

• All points of the mortar are closer than r to the boundary bS– Restricting the effect of simplification to the mortar will ensure that we do not modify the shape in places far from its boundary

• The mortar excludes r-regular regions– Restricting the effect of simplification to the mortar will ensure that regular portions of the boundary are not affected by simplification

S Mr(S) M2r(S)

Page 14: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 14NSF CARGO DMS-0138320 Georgia Tech, May 2004

The mortar is the fillet of the boundary

• Theorem: Mr(S) is the topological interior of Fr(bS)– Remove lower-dimensional (dangling) portions

S

bS

Mr(S)

i(Fr(bS))

Page 15: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 15NSF CARGO DMS-0138320 Georgia Tech, May 2004

Using the Mortar to decompose bS

Given r, the regular segments of S are defined as the connected components of r-regular points of bS.

• Th1: Regular segment = connected component of bS–Mr(S)

• Places where the core and anticore touch

• Th2: Irregular segment = connected component of bSMr(S)

• Note that irregular points may still be r-smooth

Core = Rr(S)

Mr(S) = Fr(S) – Rr(S)

Regular segments

Page 16: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 16NSF CARGO DMS-0138320 Georgia Tech, May 2004

Mortar for multi-resolution analysis of space

Mr(S) M2r(S)

Regularity of a feature indicates its “thickness”

Page 17: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 17NSF CARGO DMS-0138320 Georgia Tech, May 2004

Analyzing the regularity of space

• The regularity of a point B with respect to a set S is defined as the minimum r for which B Mr(S)– Points close to sharp features or constrictions are

less regular– Different from signed distance field

Page 18: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 18NSF CARGO DMS-0138320 Georgia Tech, May 2004

Morphological Simplifications

• Fillet (closing) fills in creases and concave corners

• Rounding (opening) removes convex corners and branches

• Fillet and rounding operations may be combined to produce more symmetric filters that tend to smoothen both concave and convex features

• Fr(Rr(S)) and Rr(Fr(S)) combinations tend to:– Simplify topology: Eliminate small holes and components

– Smoothen the shape almost everywhere– Regularize almost everywhere– Increase roundness (by reducing perimeter)

• However they – Do not guarantee r-regularity or r-smoothness– Tend to increase or to decrease the density

Neither Fr(Rr(S)) nor Rr(Fr(S)) will make this set r-regular

Page 19: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 19NSF CARGO DMS-0138320 Georgia Tech, May 2004

Rounding and filleting combos

Fr(S)

Rr(Fr(S))

Rr(S)

S

Fr(Rr(S))

F2r(S)

R2r(F2r(S))

R2r(S)

F2r(R2r(S))

Page 20: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 20NSF CARGO DMS-0138320 Georgia Tech, May 2004

Which is better: FR or RF?

Fr(S)

Rr(Fr(S))

Rr(S)

S

Fr(Rr(S))

Removed by rounding

Which option is better?The one that best preserves average density

Page 21: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 21NSF CARGO DMS-0138320 Georgia Tech, May 2004

The Mason filter

• We don’t have to make a global choice of FR versus RF

• Do it independently for each component of the mortar

• The Mason algorithmFor each connected segment M of Mr(S)

replace MS by MFr(Rr(S)) or by M Rr(Fr(S)), whichever best preserves the shapei.e., minimizes area of the symmetric difference between original and result

“Mason: Morphological Simplification", J Williams, A Powell, and J Rossignac. GVU Tech. Report GIT-GVU-04-05.

http://www.gvu.gatech.edu/~jarek/papers.html

• Mason preserves density (average area) better than a global Fr(Rr(S)) or Rr(Fr(S)), but does not guarantee smoothness nor minimality of perimeter

Page 22: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 22NSF CARGO DMS-0138320 Georgia Tech, May 2004

Mason in Granada

Rr(Fr(S))

S

Fr(Rr(S))

Mason

Mortar Mr(S): removed&added

Page 23: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 23NSF CARGO DMS-0138320 Georgia Tech, May 2004

Mason on a simple shape

S

Mason

Rr (Fr

(S))Fr (Rr

(S))

Page 24: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 24NSF CARGO DMS-0138320 Georgia Tech, May 2004

3D Mason in China

Page 25: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 25NSF CARGO DMS-0138320 Georgia Tech, May 2004

Can we improve on Mason?

• Want to ensure r-smoothness• Want to minimize perimeter

• Willing to give up some r-regularity• Willing to give up some density preservation

• Formulate the solution using a Tight Hull… next slide

Page 26: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 26NSF CARGO DMS-0138320 Georgia Tech, May 2004

• The tight hull, TH(R,F), of a set R inside a set F is the set H that has the smallest perimeter and satisfies RHF– Extends the idea of a convex hull, CH(R), which may be defined in 2D as the simply connected set that contains R and has smallest perimeter. Hence, CH(R)=TH(R,F) where F is the whole plane.

• bH is the shortest path around R in F

Tight Hulls

R

F

Page 27: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 27NSF CARGO DMS-0138320 Georgia Tech, May 2004

Related prior art

• O(n) algorithm exists based on the Visibility graph– “Euclidean shortest path in the presence of rectilinear barriers”, D.T.

Lee and . P. Preparata, Netwirks, 14:393-410, 1984– “Shortest paths and networks” Joe Mitchell, in Handbook of Discrete and

Computational Geometry, Page 610, 2004.– “Shortest Paths in the Plane with Polygonal Obstacles" J Storer and J Reif

• Relative convex hull– Jack Sklansky and Dennis F. Kibler. A theory of nonuniformly digitized

binary pictures. IEEE Transactions on Systems, Man, and Cybernetics, SMC-6(9):637-647, 1976.

– http://www.cs.mcgill.ca/~stever/pattern/MPP/node7.html#SECTION00041000000000000000

• Minimal Perimeter Polygon– Steven M. Robbin, April 97– http://www.cs.mcgill.ca/~stever/pattern/MPP/talk.html

Page 28: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 28NSF CARGO DMS-0138320 Georgia Tech, May 2004

Properties of tight hulls

• Let H= TH(R,F) • bH contains the portions of bR that are on the

convex hull of R– bRbCH(R) bH

• bH is made of some convex portions of bR and of some concave portions of bF joined by short-cuts (straight edges)

• Edge (A,B) is a short-cut if A is a silhouette point for B and vice versa.

R

F

Page 29: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 29NSF CARGO DMS-0138320 Georgia Tech, May 2004

• Start with CH(R), the convex hull of R• Identify each edge (A,B) of CH(R) that is not on bR

and that crosses bF• Compute shortest path from A to B in F–R

Computing tight hulls for polygons

Page 30: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 30NSF CARGO DMS-0138320 Georgia Tech, May 2004

Computing tight hulls for smooth shapes

• Shortest path– Reasonably easy for shapes bounded by lines and circular

arcs.

• Track minimum distance field backwards – Propagate constrained distance field from A– Walk back from B along the gradient until you reach A

• Constrained curvature flow– Iterative smoothing (contraction) of boundary of Fr(S)

while preventing penetration in Rr(S) and in the complement of Fr(S)

• Morphological shaving (for discrete representations)– Grow core by adding to it straight line segments of

contiguous mortar pixels that start and end at a core pixel

Page 31: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 31NSF CARGO DMS-0138320 Georgia Tech, May 2004

Tightening

• The tightening of a shape S is: Tr(S) = TH(Rr(S),Fr(S))– “Tightening: Perimeter-reducing, curvature-limiting

morphological simplification", Jason Williams and Jarek Rossignac. In preparation.

S

Page 32: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 32NSF CARGO DMS-0138320 Georgia Tech, May 2004

Example of tightening

Page 33: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 33NSF CARGO DMS-0138320 Georgia Tech, May 2004

Topological choices of tightening

Invalid ?

Invalid ?

Page 34: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 34NSF CARGO DMS-0138320 Georgia Tech, May 2004

Properties of tightenings

• bTr(S) is r-smooth

• Tr(S) may have irregular parts

Page 35: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 35NSF CARGO DMS-0138320 Georgia Tech, May 2004

The road-tightening problem

• By law, the state must own all land located at a distance less or equal to r from a state road.

• The states owns an old road C and wants to make it r-smooth so it becomes a highway.

• Can it do so without purchasing any new land?– For simplicity, assume first that C is a manifold closed loop.

Page 36: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 36NSF CARGO DMS-0138320 Georgia Tech, May 2004

3D tightening

Page 37: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 37NSF CARGO DMS-0138320 Georgia Tech, May 2004

The road-tightening solution

• Let S be the area enclosed by C.

• The new road will be bTr(S).– With some restrictions on C, we can extend this result to open road segments.

Page 38: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 38NSF CARGO DMS-0138320 Georgia Tech, May 2004

Comparisons simplified shapes

R(F(S))

F(R(S))mason

tighte

ning

Page 39: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 39NSF CARGO DMS-0138320 Georgia Tech, May 2004

FR, RF, mason, tightening

Blue = Tightening

Yellow = CoreYellow = CoreYellow = CoreYellow = Core

cyan = cyan = MortarMortarcyan = cyan = MortarMortar

red = R(F(S))

Green = F(R(S))

brown = Mason

Page 40: Morphological Simplification

APES: Ghrist, Rossignac, Szymczak, Turk 40NSF CARGO DMS-0138320 Georgia Tech, May 2004

Summary and future work

• We propose to measure simplicity by regularity and smoothness– Defining regularity for all points of space will support a multi-resolution analysis of shape (interior, boundary, exterior)

• We restrict simplifications to the mortar, ensuring that regular areas are preserved– Mason improves on FR and RF combos by better preserving density

– Tightening improves on Mason by minimizing perimeter and guaranteeing r-smoothness

– We have applied it to the tightening of curves

• Future plans– Multi-resolution shape analysis and segmentation using regularity

– Higher dimensions: surfaces, volumes, animations