Content uploaded by Supanut Chaidee

Author content

All content in this area was uploaded by Supanut Chaidee on Sep 03, 2015

Content may be subject to copyright.

NUMERICAL FITTING OF PLANAR PHOTOGRAPHIC IMAGES

WITH SPHERICAL VORONOI DIAGRAMS

Supanut CHAIDEE and Kokichi SUGIHARA

Graduate School of Advanced Mathematical Sciences, Meiji University, Japan

ABSTRACT: There are many phenomena that generate polygonal tessellations on surfaces of 3D

objects. One interesting example is the jackfruit, a multiple fruit found in the tropics. A recent study

found the best-fit spherical Voronoi diagram from a photo of jackfruit skin, but the optimization

was relative to the radius of the sphere and the height of the spikes. In this study, we propose a

method for adjusting the position of the center of the sphere in addition to these parameters.

Experiments were conducted using both ideal and real data. However, convergence with real data

has not been confirmed due to relaxation of the convergence condition.

Keywords: Spherical Voronoi diagram, Jackfruit, Discrepancy, Circular search, Method of steepest

descent.

………………………………………………………………………………………………………....

1. INTRODUCTION

Many natural phenomena result in displays of

polygon-like tessellations; examples include

the patterns seen with animal territories and

on fruit skins. From a mathematical viewpoint,

there is a well-known polygonal tessellation

called the Voronoi diagram which divides a

space into subdivisions corresponding to a

given set of generators in such a way that a

point in the space is assigned to the nearest

generator. Voronoi diagrams are widely used

as tools for understanding natural phenomena

[1, 5]. Verifying that a given tessellation is a

Voronoi diagram is useful when constructing

a mathematical model of a polygonal pattern

found in nature.

Several criteria have been proposed for

evaluating the difference between a particular

tessellation and a Voronoi diagram [1, 3, 4, 9].

However, these only apply to Voronoi

diagrams in 2D space.

The items of interest are typically

encountered as a particular type of 3D object

covered by spikes, or a spike-containing

object (see Section 2.1 for a more detailed

definition). One interesting example of a

spike-containing object is the jackfruit

(Artocarpus Heterophyllus), a multiple fruit

found in various tropical locations [6, 7, 8].

The jackfruit skin is an ellipsoid-like surface

covered by a polygon-like tessellation. The

skin of a jackfruit and a close-up of the

pattern are shown in Figure 1. Each cell of the

tessellation contains a blunt spike, which we

will represent as a spike dot. Based on

knowledge of the biology of the jackfruit, the

tips of the spikes can be considered to be the

generators of the tessellation.

Figure 1: (left) Jackfruit; (right) close-up of

the pattern on the skin of a jackfruit.

Recently, we [2] proposed a method for

fitting a spherical Voronoi diagram to a 2D

photograph of a curved surface of a

spike-containing object. In that paper, the

proposed optimization problem was to find

the spherical Voronoi diagram that best fits a

F21

The 10th Asian Forum on Graphic Science 2015

August 4-7, 2015, Bangkok ISBN 978-4-9900967-2-4

© 2015 Japan Society for Graphic Science

2

surface covered by spikes of approximately

uniform height. However, the optimization

problem only considered adjusting the radius

of the sphere radius and the height of the

spike height; the center of the sphere was

fixed.

In this study, we propose a method that

also allows the center of the sphere to be

optimized. We conducted experiments with

both ideal and real data, based on a photo of

jackfruit skin.

2. PROBLEM FORMULATION

In this section, we state the basic assumptions

and propose a framework for judging the

difference between two tessellations. All of

the assumptions in this section follow from

our previous study, mentioned above [2].

2.1 Basic assumptions

We assume that a jackfruit can be considered

to be a spike-containing object; that is, we

assume that it is an object with a convex

surface covered by spikes of approximately

uniform height, that it contains a polygon-like

tessellation on the surface, such that each

tessellation cell contains exactly one spike,

and that it can be approximated by a sphere.

A photograph of a jackfruit is assumed to

be an orthogonal projection onto the XZ-plane.

The spike dots, which correspond to the tips

of the spikes, also appear in the photo.

From a given photo, we can extract the

spike-containing tessellation T, which is a

convex tessellation embedding of a planar

3-regular straight graph, such that each cell of

T contains a unique spike dot.

After we extract the tessellation T from

the photo, we construct the Voronoi diagram

with respect to the set of spike dots B.

However, we cannot directly compare the

tessellations from a planar photographic

image to the planar Voronoi diagram due to

the distortions that arise in the projection.

Therefore, we construct a spherical Voronoi

diagram for solving this problem, as follows.

First, we project the spike dots from a

spike-containing tessellation onto a sphere of

radius R+h. Next, in order to obtain the

generators, we project the spike dots to a

sphere of radius R. Following this, we

construct the spherical Voronoi diagram V

S

.

Finally, we project the Voronoi vertices onto

the XZ-plane and connect them with

polygonal line segments; the resulting planar

straight line graph is an approximation of V,

the Voronoi diagram projected onto the plane.

We are now ready to compare the two

tessellations, T and V.

2.2 Criterion for measuring the difference

between two tessellations

To compare a spike-containing tessellation T

with the corresponding projected spherical

Voronoi diagram V, we define the

discrepancy Δ

T,V

to be the ratio of the sum of

the differences between the two tessellations.

to the sum of the areas of the tessellations:

where A

T

and A

V

are the areas of the

tessellations T and V, respectively, and and D

T

= A

T

– A, D

V

= A

V

– A such that A is the sum

of areas of an intersection between cells of T

and V corresponding to the same spike dots.

We will assume that there is not much

different between D

T

and D

V

. A

T

, A

V

are not

much different also. The steps described

above are shown in Figure 2.

Figure 2: (left) Photo of the surface of a

jackfruit; (center) tessellations T and V shown

by dashed and solid line, respectively; (right)

differences between T and V.

3. FRAMEWORK FOR FITTING A

VORONOI DIAGRAM TO A PLANAR

TESSELLATION

Errors from measurements can easily occur in

the case of photographs. We would like to

find the spherical Voronoi diagram which

Δ

T ,V

= (D

T

+ D

V

) / ( A

T

+ A

V

)

3

best fits a given tessellation. The parameters

of the projected sphere consist of its center

(x, z), its radius R, and the spike height h.

3.1 Discrepancy function

For each set of parameter values x, z, R, and h,

there exists a unique spherical Voronoi

diagram with respect to the geodesic distance.

Hence, the ratio Δ

T,V

is unique to a given

Voronoi diagram, and so we can define the

discrepancy as a function of the variables x, z,

R, and h, denoted as D(x, z, R, h) = Δ

T,V

.

To obtain the best-fit Voronoi diagram,

we optimize with respect to the parameters;

that is, we find x, z, R, and h that minimize

D(x, z, R, h). However, it is difficult to derive

the discrepancy function algebraically, and so

we present a method for numerical

optimization of the parameters.

3.2 Optimization problem for acquiring the

best-fit spherical Voronoi diagram

We begin by introducing a framework for

finding the best-fit spherical Voronoi diagram

with respect to the parameters x, z, R, and h.

Algorithm 1: Fitting the Spherical Voronoi

Diagram (also see [2])

Input: B: set of spike dots on the XZ-plane

T: initial tessellation containing B

x = (x, z, R, h)

Output: x, z, R, h minimizing D(x, z, R, h)

Definition: function D(x, z, R, h)

1. Project spike dots from the XZ-plane

to a sphere of radius R+h;

2. Project spike dots from the sphere

with radius R+h to a sphere with

radius R, using a projection centered

on the origin of the sphere;

3. Construct V

S

using the spike dots

obtained in Step 2;

4. Create V, the projection of V

S

onto

the XZ-plane;

5. Compute D

T

, D

V

, A

T

, A

V

, Δ

T,V

;

6. Define D(x, z, R, h) ← Δ

T,V

.

end Definition

Procedure:

1. Calculate D(x);

2. Search for x′= (x′, z′, R′, h′) such

that D(x) > D(x′) (use the method

described below);

3. if x′ is found, then

x ← x′; D(x) ← D(x′);

go to Step 2;

else

report x and D(x);

end if;

end Procedure

In Algorithm 1, we need to find a decreasing

sequence of discrepancies tending to the

minimum. We begin by considering the

discrepancy function obtained from ideal data,

that is, a spherical Voronoi diagram from

which we obtain the parameters. Figure 3

shows the discrepancies for various values of

x and z when R and h are fixed at the values

for the ideal data (top), and for various values

of R and h when x and z are fixed at the

values for the ideal data (bottom); here, the

ideal tessellation T is the projection of the

spherical Voronoi diagram for (x, z, R, h) =

(0.2, 0.2, 18, 0.4). In the top panel, the

horizontal plane represents the XZ-plane, and

in the bottom panel, it represents the Rh-plane;

in both panels, the vertical axis represents the

discrepancy.

Figure 3: Plot of the discrepancy vs (top) the

xz-plane when R and h are fixed; (bottom) the

Rh-plane when x and z are fixed.

The method of steepest descent can be applied

0.10

0.15

0.20

0.25

0.30

0.10

0.15

0.20

0.25

0.30

0.0

0.1

0.2

0.3

16

17

18

19

20

0.30

0.35

0.40

0.45

0.50

0.00

0.01

0.02

0.03

4

to the discrepancy function in Figure 3 (top),

but we cannot consider all variables

simultaneously. As can be seen in Figure 3

(bottom), when we fix the variables x and z,

there is a sharp change of pitch at the valley

line, and the bottom of the valley is almost

horizontal. Thus, the direction of steepest

descent of the discrepancy gradient is

orthogonal to the bottom of the valley, and

hence, the ordinary method of steepest

descent method will oscillate, repeatedly

crossing the valley.

Hence, we divide the variables into two

groups {x, z} and {R, h}, and optimize them

separately using different methods. We use

the method of steepest descent to optimize x, z

for fixed R, h, and we use a primitive

technique called a circular search to optimize

R, h for fixed x, z.

Intuitively, the method of steepest

descent can be described as follows. Let

D(x, z) be a discrepancy function with respect

to x and z, and let R and h be fixed. We start

from an initial guess, the vector x = (x

0

, z

0

).

At x, we find S, the direction in which D(x)

decreases most rapidly; that is, S = –

∇D(x)/||∇D(x)||, where .

Next, we search for the smallest value of the

function on the line passing through x in the

direction S. We move to that point, let it be

the new initial point, and repeat the process.

In practice, the gradient ∇D(x) is

approximated by the forward difference:

It is written as .

The following algorithm shows the use of

the gradient approximation in the method of

steepest descent.

Algorithm 2: Method of Steepest Descent

Input: initial x

0

=(x

0

, z

0

), step size β for the

line search, sphere radius R

0

, spike height h

0

,

increments Δx and Δz, tolerances θ

1

and θ

2

,

number of iterations m

Output: x, z minimizing D(x, z)

Definition: function D(x, z) ← D(x, z, R

0

, h

0

),

as defined in Algorithm 1

Procedure:

1. Set x ← x

0

, β ← β

0

, n = 1;

2. Calculate D(x);

3. Set D

x

← D(x);

4. Calculate ΔD/Δx and ΔD/Δz;

5. Set ;

6. Calculate and set

y ← x – β∇*D/||∇*D ||

7. Calculate D(y);

8. Set D

y

← D(y);

9. if D

x

> D

y

then

Set x ← y; D

x

← D

y

; n ← n+1;

go to Step 10;

else

β ← β/2; n ← 1;

go to Step 2;

end if;

10. If |D

y

– D

x

| <

θ

1

and |y – x| <

θ

2

for

fixed times n = m then

terminate;

else

go to Step 2;

end if;

end Procedure

For the optimization of variable {R, h}, we

introduce a primitive technique called the

circular search. This technique was provided

as Algorithm 3 in our previous study [2], and

we summarize it here as follows.

We wish to find the point on the line for

which the function is minimized. We begin by

letting the initial point be the center of a

searching circle of radius

α

. We consider a

finite number of points located at equal

intervals on the circle and search for the point

at which the function is smallest. Note that

when a circle is placed over the valley line, it

crosses it at two points. Therefore, we need to

check which direction minimizes the function;

however, since we are only considering a

finite number of points, we may not obtain the

overall minimum. Thus, we employ a binary

∇D(x) =

∂ D

∂ x

,

∂ D

∂ z

( )

T

∂D

∂x

≈

ΔD

Δx

=

D(x + Δx, z) − D(x)

Δx

∂D

∂z

≈

ΔD

Δz

=

D(x, z + Δz) − D(x)

Δz

∇

∗

D(x) =

ΔD

Δx

,

ΔD

Δz

( )

T

∇

∗

D(x) =

ΔD

Δx

,

ΔD

Δz

( )

T

5

search to determine which of these points

results in a smaller discrepancy. We then

make this point the center of a new searching

circle and again seek the smallest discrepancy.

If we reach a point at which the next

discrepancy is greater than that obtained in

the previous step, we decrease the radius of

the circle and repeat the search.

Let M

i

be the discrepancy function at the

i-th iteration. In our algorithm [2], we

decrease the searching radius if M

i

≤ M

i+1

. In

this study, we propose relaxing the

convergence condition by defining a tolerance

θ

3

; that is, we decrease the searching radius

when M

i

– M

i+1

≤ θ

3

.

Algorithm 2 and the circular search

algorithm give the details of the procedure

part of Algorithm 1. In the first step of our

implementation, we use the method of

steepest descent to optimize x, z, and then in

the second step, we use a circular search to

optimize R, h. Let D

k

be the final discrepancy

from the k-th iteration. We alternate between

these two optimization steps until D

k

– D

k+1

<

max{θ

1

, θ

3

}.

4. EXPERIMENTAL RESULTS

In this section, we present the results of

implementing the proposed algorithm with

ideal and real data.

For the method of steepest descent, we

set Δx = Δz = 10

–3

,

β

= 0.1, θ

1

= 10

–8

, θ

2

= 10

–6

,

and m = 10; for the circular search, we set

α

=

0.1 and θ

3

= 10

–6

. We used Wolfram

Mathematica

®

10.0 for our implementation.

4.1 Experiments with ideal data

In the case of ideal data, we used a

spherical Voronoi diagram with fixed

parameters: (x, z, R, h) = (0.2, 0.2, 18, 0.4).

In [2], we used various initial values of R

and h, and observed how the parameters

changed for fixed values of x and z. In this

paper, we performed two experiments with

ideal data.

In the first experiment, we fixed R and h

at the correct values and then used the method

of steepest descent to adjust x and z. The

results of the first experiment are shown in

Table 1.

Table 1: Optimization results for various

initial values used in the first experiment

Initial Value

Converging Value

x

z

Discrepancy

x

z

Discrepancy

0.0000

0.0000

6.198×10

–1

0.2000

0.2000

3.344×10

–5

0.0000

0.2000

4.877×10

–1

0.2000

0.2000

3.013×10

–5

0.0000

0.4000

6.212×10

–1

0.2000

0.2000

3.183×10

–5

0.2000

0.0000

4.281×10

–1

0.2000

0.2000

2.622×10

–5

0.2000

0.4000

4.282×10

–1

0.2000

0.2000

2.736×10

–5

0.4000

0.0000

6.212×10

–1

0.2000

0.2000

2.115×10

–5

0.4000

0.2000

4.878×10

–1

0.2000

0.2000

2.687×10

–5

0.4000

0.4000

6.198×10

–1

0.2000

0.2000

2.469×10

–5

From Table 1, it can be seen that x and z

converge to the correct answer: x = 0.2000, z

= 0.2000; the standard deviation of x and z are

3.850 × 10

–6

and 4.941 × 10

–6

, respectively.

This shows that the method of steepest

descent works for optimizing x and z.

For the second experiment, we optimized

all of the variables by alternately using the

method of steepest descent and a circular

search. For the ideal data, we could use the

circular search as in [2], without the need to

relax the convergence condition. The results

are shown in Table 2, where (S) indicates the

method of steepest descent and (C) indicates

the circular search.

Table 2: Results for the second experiment:

parameters x, z, R, and h, and the

discrepancies after optimization

Round

x

z

R

h

Discrepancy

0

–0.1000

–0.1000

17.00

0.3000

8.543×10

–1

1 (S)

0.1994

0.1978

17.00

0.3000

1.654×10

–2

2 (C)

0.1994

0.1978

18.00

0.3887

4.924×10

–3

3 (S)

0.1999

0.1997

18.00

0.3887

2.268×10

–3

4 (C)

0.1999

0.1997

18.00

0.3984

6.720×10

–4

5 (S)

0.2000

0.2000

18.00

0.3984

3.144×10

–4

6 (C)

0.2000

0.2000

17.99

0.3996

6.666×10

–5

7 (S)

0.2000

0.2000

17.99

0.3996

6.666×10

–5

Table 2 shows that we can find the correct

values of x, z, R, and h from the given initial

values. Thus, we see that our proposed

method determines the appropriate parameter

values with a very small discrepancy.

6

4.2 Experiments with real data

For our experiments with real data, we again

used the jackfruit tessellation and initial

values that we used in [2]. The condition for

convergence of the circular search was

relaxed with θ

3

= 10

–6

; that is, the search will

cease if the difference in the discrepancies of

the k-th and k+1-st rounds is less than 10

–6

.

The experimental results are shown in Tables

3, 4, and 5. Figure 4 shows the changes of

discrepancy after optimization from Table 3.

Table 3: Parameters x, z, R, and h, and the

discrepancies after optimization; initial values

were from measurements

Round

x

z

R

h

Discrepancy

0

0.0000

0.0000

3.300

0.1500

0.1712

1 (S)

–0.0200

–0.0172

3.300

0.1500

0.1235

2 (C)

–0.0200

–0.0172

9.281

0.5330

0.1191

3 (S)

–0.0176

–0.0158

9.281

0.5330

0.1186

4 (C)

–0.0176

–0.0158

9.380

0.5460

0.1185

5 (S)

–0.0176

–0.0157

9.380

0.5460

0.1185

6 (C)

–0.0176

–0.0157

9.380

0.5460

0.1185

Table 4: Parameters x, z, R, and h, and the

discrepancies after optimization; various

initial values of R and h

Round

x

z

R

h

Discrepancy

0

0.0000

0.0000

1.800

0.0500

0.1919

1 (S)

–0.0228

–0.0197

1.800

0.0500

0.1407

2 (C)

–0.0228

–0.0197

9.374

0.5289

0.1217

3 (S)

–0.0178

–0.0160

9.374

0.5289

0.1186

4 (C)

–0.0178

–0.0160

9.472

0.5511

0.1185

5 (S)

–0.0176

–0.0158

9.472

0.5511

0.1185

6 (C)

–0.0176

–0.0158

9.472

0.5511

0.1185

Table 5: Parameters x, z, R, and h, and the

discrepancies after optimization; various

initial values of R and h

Round

x

z

R

h

Discrepancy

0

0.0000

0.0000

1.800

0.4000

0.4140

1 (S)

–0.0069

–0.0074

1.800

0.4000

0.4130

2 (C)

–0.0069

–0.0074

3.473

0.2206

0.1334

3 (S)

–0.0173

–0.0147

3.473

0.2206

0.1196

4 (C)

–0.0173

–0.0147

4.371

0.2566

0.1188

5 (S)

–0.0175

–0.0155

4.371

0.2566

0.1187

6 (C)

–0.0175

–0.0155

4.471

0.2598

0.1187

7 (S)

–0.0175

–0.0156

4.471

0.2598

0.1187

8 (C)

–0.0175

–0.0156

4.471

0.2598

0.1187

Figure 4: The different area between T and V

in a photo before optimization; (right) The

different area between T and V in a photo

after optimization

From Tables 3, 4, and 5, we can see that the

results each converge to a local minimum, but

they do not converge to the same values. This

occurs because the discrepancy function is

very complicated and contains many local

minima. We also note that the discrepancy is

very sensitive to changes in each of the

variables, and thus, relaxation of the condition

for convergence of the circular search also

affects the values to which the variables

converge.

5. CONCLUDING REMARKS

In this study, we proposed a method for fitting

a spherical Voronoi diagram to a

spike-containing tessellation. We optimized

the fit for four variables by optimizing

separately for two groups of two variables

each. Experiments using ideal data showed

that the proposed method works well.

However, additional experiments with real

data should be performed with a stronger

convergence condition.

ACKNOWLEDGMENTS

The first author acknowledges the MIMS

Ph.D. Program of the Meiji Institute for

Advanced Study of Mathematical Sciences,

Meiji University, and the Development and

Promotion of Science and Technology Talents

Project (DPST) of the Institute for the

Promotion of Teaching Science and

Technology (IPST), Ministry of Education,

Thailand. This research is partly supported by

the Grant-in-Aid for Basic Research No.

24360039 of MEXT.

7

REFERENCES

[1] Aurenhammer, F., Klein, R., and Lee,

D.T. Voronoi Diagrams and Delaunay

Triangulations. World Scientific

Publishing Company (2013).

[2] Chaidee, S., and Sugihara, K.

Approximation of Fruit Skin Patterns

Using Spherical Voronoi Diagrams,

submitted.

[3] Honda, H. Description of Cellular

Patterns by Dirichlet Domains: The

Two-Dimensional Case. J Theor Biol, (3),

523-543 (1978).

[4] Honda, H. Geometrical Models for Cells

in Tissues. Int Rev Cytol, 81,191-246

(1983).

[5] Okabe, A., Boots, B., Sugihara, K., and

Chiu, S.N. Spatial Tessellations: Concepts

and Applications of Voronoi Diagrams

(2nd ed). John Wiley and Sons (2000).

[6] Sharma. M. R., Morphological and

Anatomical Investigations on Artocarpus

Forst: II The Inflorescence, Proc Nat Instit

Sci India, 29, 77-92 (1963).

[7] Sharma. M. R., Morphological and

Anatomical Investigations on Artocarpus

Forst: III The Flower, Phytomorphol, 15,

185-201 (1965).

[8] Sharma. M. R., Morphological and

Anatomical Investigations on Artocarpus

Forst: IV The Fruit, P Indian Acad Sci B,

60 (6), 380-393 (1964).

[9] Suzuki, A., and Iri, M. Approximation of a

Tessellation of the Plane by a Voronoi

Diagram. J Oper Res Soc Jpn, 29 (1),

69-97 (1986).

ABOUT THE AUTHORS

1. Supanut CHAIDEE, M. of Sc., is a Ph.D.

student of the MIMS Ph.D. Program of

the Meiji Institute for Advanced Study of

Mathematical Sciences, Meiji University.

He is also a DPST scholarship student

affiliated with IPST, Ministry of

Education, Thailand. His e-mail and

postal addresses are as follows:

schaidee@meiji.ac.jp

Graduate School of Advanced

Mathematical Sciences, Meiji University,

4-21-1 Nakano, Nakano-ku, Tokyo

164-8525, Japan.

2. Kokichi SUGIHARA, Dr. of Eng., is a

professor at Meiji Institute for Advanced

Study of Mathematical Sciences,

Organization for the Strategic

Coordination of Research and Intellectual

Property, Meiji University. His e-mail and

postal addresses are as follows:

kokichis@meiji.ac.jp

Graduate School of Advanced

Mathematical Sciences, Meiji University,

4-21-1 Nakano, Nakano-kkiu, Tokyo

164-8525, Japan.