how to reform a terrain into a pyramid takeshi tokuyama (tohoku u) joint work with jinhee chun...

27
How to reform a terrain into a pyramid Takeshi Tokuyama (Tohoku U) Joint work with Jinhee Chun (Tohoku U) Naoki Katoh (Kyoto U) Pictures from web page of Institute of Egyptology, Waseda University, Japan

Upload: rudolf-rodgers

Post on 01-Jan-2016

218 views

Category:

Documents


1 download

TRANSCRIPT

How to reform a terrain into

a pyramidTakeshi Tokuyama (Tohoku

U)

Joint work with

Jinhee Chun (Tohoku U)

Naoki Katoh (Kyoto U)

Danny Chen (U. Notre Dame)

Pictures from web page of Institute of Egyptology,

Waseda University, Japan

Outline

• Motivations and definitions

• One-dimensional problem

• General case, reducing to the longest path problem in a large DAG

• A two-dimensional problem reducing to the longest path problem in a small DAG

• A higher-dimensional problem reducing to the minimum s-t cut problem in a directed graph

• Applications and discussion

Re-shaping problem: Given a geometric object, transform it to a “well-shaped” object.

The solution depends on the definition of         “well-shaped”.

Convex convex hull, convex approximation

Surface surface reconstruction

Smooth smoothing

Union of simple shapes decomposition problem covering problem Mountain-like shape Pyramid problem

Intuitive (but non-mathematical) formulation

Input: A terrain corresponding to a nonnegative function ρ

Procedure: Move earth from higher to lower positions (smoothing operation losing potential)

Output: A mountain with the maximum positional potential

If d=1, “mountain” means “a region below a nonnegative unimodal curve”.

If d=2, a monochromatic image can be an input, where ρ indicates the brightness

RRxx dtt )}(0|),{(

Examples of pyramid construction problem

Motivations

How to extract the feature of the following picture (or data distribution) ?

•Image processing

•Data mining

•Statistics

Extract a dense rectangle

Image segmentation

Partition the picture into an object and background

Extract as a pyramidic (or “fuzzy”) object

Looks like a sliced onion, but different from the “onion structure” in computational geometry.

Input: A nonnegative function ρ on Rd and a family F of regions in Rd . We assume .

Output: A “pyramid” function from (0,∞)   to F. That is, a series of regions P(t) (0<t<∞) of F satisfying that P(t)     P(t’) if t > t’.

Objective: Maximize

• ρ ( R)  : Integral of ρ over a region R• μ gives the measure of the space

•(e.g. if μ≡1, μ ( R)   is the volume)

Mathematical formulation

0))(())((

tdttPttP

F

F is a set of squares for pyramids in Egypt.

Equivalence of two formulations

For a pyramid with condition (1),

0))(())((

tdttPttP xxx df )()(

2

1 2 positional potential

f(x)= max { t : x       P(t)} :surface function of the pyramid. For the optimal pyramid, for any t,

)()()()()(

tPtPddf

xxxxxxx

This means “move earth to lower position” mass of terrain

―  (1)

One dimensional problem

•Discrete version:   ρ is a nonnegative function on the interval [0, n], and F is the set of all integral intervals in [0,n] .   (output is rectilinear)

• Continuous version: ρ and μ are piecewise-linear functions with n linear pieces, and F is the set of all intervals.  Theorem. The optimal pyramid can be computed in O( n log n) time.

Use convex hull tree

Higher dimensional cases, if |F| is small

Corollary: The optimal pyramid can be computed in O(|F|3) time

G(F): directed graph on F , and a directed edge e(R, R’) exists if and only if R R’

Theorem: A pyramid gives a directed path (R1,R2,…,Rs) in G(F), and the optimal pyramid gives the maximum weight path.

)'()'()()( RtRRtR t(e(R,R’)): solution of

)'\())',(( 2 RRRRet Weight: w(e(R,R’))=

Unfortunately, |F| is often large.

Closed family of regions

A family F of regions is called a closed family if it is closed under union and intersection operations. That is, A B and A∪ ∩B   are members of F if A and B are members of F   

Lemma. If F is closed, the horizontal slice P(t) of the optimal pyramid is the region R(t) maximizing )()( RtR

and

A=R(t) and B=R(t’) A ∪B=R(t) A∩B=R(t’)

What is the region family for this pyramid ?

U(p)= “closure” of the set of all rectangles containing a given point p (rectangle unions stabbed at p)

Rectangle containing a given point p

p

Rectangles containing p

p

Union of rectangles stabbed at p

Corresponding pyramid

Input: pixel grid with n pixels, positive matrices ρ and μ representing functions, and a grid point p.

Output: The optimal pyramid of ρ   for U(p)

nn

Optimal pyramid for the rectangle unions stabbed at p

Theorem. The optimal pyramid for U(p) can be computed in O(n log n γ) time, where γ is the input precision.

-4-2-2-11

-4-2022

-3-1213

-10334-11344

-4-2-2-11

-4-2022

-3-1213

-10334-11344

Algorithm to compute the slide of the optimal pyramid at height t

Matrix ( ρ- t μ )

(for p=(0,0))

-8-4-201

-22442

25643

910107411121184

-8-4-201

-22442

25643

910107411121184

Table of prefix sums

-8-4-201

-22442

25643

910107411121184

-8-4-201

-22442

25643

910107411121184

Computation of the region

-8-4-201

-22442

25643

910107411121184

-8-4-201

-22442

25643

910107411121184

Linear time for computing a flat P(t). (Longest path in a DAG.)

Binary decomposition process attains O(n log nγ) time to compute the pyramid.

Higher   dimensional case

Fd(p) = closure (under union) of the family of d-dimensional axis-parallel orthogonal regions containing a grid point p

Theorem

The optimal pyramid of a d-dimensional terrain in a pixel grid with n pixels with respect to Fd(p) can be computed in O(t(n,n) log nγ) time, where t(n,n) is the time to compute a minimum s-t cut in a directed graph with O(n) nodes and O(n) edges.

-4-2-2-11

-4-2022

-3-12-23

-1033-1-11344

-4-2-2-11

-4-2022

-3-123

-1033-11344

s

t

The cut maximizing the sum of node weights of dominated vertices

The cut in G minimizing the sum of node weights of dominated vertices

= minimum s-t cut in a modified directed graph G’

(Hochbaum(01))

G

Positive weighted nodes

Negative weighted nodes

s

t

Construction of G’ (an example)

-123 1-21 -31

1 1 1

123

3 2

s

t

Other closed region families

Connected lower half region of a grid curve

• Closure of L-shape paths

The optimal pyramid for these region families can be efficiently computed

We can also handle its higher dimensional analogue

Data mining application of segmentation

Output of SONAR data mining system (System for Optimized Numeric Association Rules)

Given a database that contains3.54% of unreliable customers

(Age, Balance) ∈ R⇒ (CardLoanDelay = yes)

R contains about 10% of customersand maximizes the probability (14.39%) of unreliable customers.

Conclusion

Pyramid construction

• A new geometric optimization problem

• Application to fuzzy segmentation

• Application to data mining

• Polynomial time algorithms for special cases

Open problems

•Is the problem NP hard for the families of rectilinear convex regions (or convex regions)?

• Give an efficient algorithm for the family of (axis parallel) rectangles