Description

Estimation of the curvature of an interface from a digital 2D image

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Related Documents

Share

Transcript

Estimation of the curvature of an interface from a digital 2D image
Olav Inge Frette
a,b,
*
, George Virnovsky
a
, Dmitriy Silin
c,d
a
International Research Institute of Stavanger (IRIS), Prof. Olav Hanssensvei 15, NO-4068 Stavanger, Norway
b
Department of Petroleum Technology, University of Stavanger, NO-4036 Stavanger, Norway
c
Lawrence Berkeley National Laboratory, 1 Cyclotron Road, MS 90-1116, Berkeley, CA 94729, USA
d
University of California, Berkeley, 415 Davis Hall, Berkeley, CA 94720, USA
a r t i c l e i n f o
Article history:
Received 11 February 2008Received in revised form 30 May 2008Accepted 10 June 2008Available online 22 July 2008
PACS:
02.40.Hw06.30.Bp07.05.Pj61.43.Bn61.43.Gt68.35.Ct
Keywords:
Curvature estimationCondensed phase interfaceDigital image analysisPorous rockCurvature-driven processes
a b s t r a c t
Inthispaperamethodfortheestimationofthecurvaturealongacondensedphaseinterfaceispresented.In a previous paper in this journal [J.W. Bullard, E.J. Garboczi, W.C. Carter, E.R. Fuller Jr., ComputationalMaterialsScience4(1995)103–116]amathematicalrelationshipwasestablishedbetweenthiscurvatureand a template disk located at a given point along the interface. The portion of the computed area of thetemplate disk covering one of the phases was shownto be asymptotically linear inthe curvature. Insteadof utilizingthis relationship, anempirical approach was proposedinBullard et al. inorder tocompensatefor discrete uncertainties. In this paper, we show that this linear relationship can be used directly alongthe interface avoiding the empirical approach proposed earlier. Modiﬁcations of the algorithm are how-ever needed, and with good data smoothing techniques, our method provides good quantitative curva-ture estimates.
2008 Elsevier B.V. All rights reserved.
1. Introduction
Capillary phenomena can have an important role in differentparts of materials science [2]. With capillary phenomena we meanprocesses involving surfaces
1
which occur on length scales wherethe curvatures play an important role. Over the past decades thestudy of high-temperature capillarity has developed as a distinct re-search ﬁeld with contributions both to fundamental research andapplications; see the recent special issue of Current Opinion in SolidState and Materials Science on this diverse subject [3]. Curvature-driven processes include grain boundary migration in bicrystals[4], dendritic growth in solidiﬁcation of alloys [5], dissolution driven
crack growth[6], surface diffusionin molecularbeam epitaxy [7] and
undercooling in eutectics [8]. Processes like these include the move-ment or evolution of surfaces. Different approaches to computermodeling exist for the simulation of these movements like levelset [9], fast marching [9], cellular automaton [10,11], diffusion-lim-
ited aggregation [12], and equivalent sharp surface [13]. For simula-
tions performed on digital images [14], the curvature needs to becomputed along the boundary pixels of the moving surface.
In this paper we present an algorithm for computation of thecurvature of a smooth curve from its digital image. This algorithmis a modiﬁcation of an algorithmpublished in [1] some years back.The basic idea is as follows. Given a curve in 2D, place a templatedisk of a given radius with its center at a point along the curve.Asymptotically, the curvature of the curve at this point dependentlinearly on the area of the template disk that is on one side of thecurve. So the curvature can be estimated by computing this area.Application of this algorithm to a digital image depends on theresolution, which determines the discretization of the surface. Forour purpose, a modiﬁcation of the established algorithm wasneeded,andthisnewmodiﬁedapproachispresentedinthispaper.Itshouldbenotedthatthisalgorithmissuitablenotonlyformate-rial science simulations of surface evolution. It can just as well beused in other scientiﬁc and engineering disciplines where digitalpictures are used and where quantitative estimates of the curva-ture is needed. Some examples are heart wall analysis (medical
0927-0256/$ - see front matter
2008 Elsevier B.V. All rights reserved.doi:10.1016/j.commatsci.2008.06.006
*
Corresponding author. Address: International Research Institute of Stavanger(IRIS), Prof. Olav Hanssensvei 15, NO-4068 Stavanger, Norway. Tel.: +47 51875026;fax: +47 51875200.
E-mail address:
Inge.Frette@iris.no (O.I. Frette).
1
We are aware of the difference in the meanings of surface and interface in theliterature, but for our purpose these concepts are synonymous.
Computational Materials Science 44 (2009) 867–875
Contents lists available at ScienceDirect
Computational Materials Science
journal homepage: www.elsevier.com/locate/commatsci
science) [15], diatom identiﬁcation (biological science) [16], shape
perception (robot engineering) [17] and thin ﬁlm stability (petro-leum engineering) [18].Our paper has three parts – theory, method and results. In thetheoretical part a short introduction into the mathematics of cur-vature is followed by an overview of common approaches to theestimation of the curvature of a curve from its discretized image.Then we present our new approach for curvature estimation. Inthe method part we describe our algorithm. In the last sectionwe present results of computations with this algorithm and com-parethemtoanalyticalsolutions.Acomparisonwiththealgorithmin [1] is included. Our algorithm has also been applied to analyzereal data – SEM images of sedimentary rocks. Results of computedcurvaturesalongthewall of aporeintheporousrockareincluded.
2. Theory
2.1. The curvature of a planar curve: continuous case
We will use the following formula for the curvature
j
of a 2Dcurve
x
=
x
(
t
),
y
=
y
(
t
) parameterized by a parameter
t
[19,20]:
j
¼
y
00
x
0
y
0
x
00
½
x
0
2
þ
y
0
2
3
=
2
ð
1
Þ
If
h
is the angle between the tangent line and the
x
-axis and thearc length
s
is selected as the parameter
t
, then, equivalently,
j
¼
h
0
ﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃﬃ
x
0
2
þ
y
0
2
p
¼
d
h
d
s
ð
2
Þ
We will also employ two more equivalent deﬁnitions of curvature
Path based deﬁnition:
j
=±
k
X
00
(
s
)
k
, where
X
(
s
)=(
x
(
s
),
y
(
s
)) and
s
is the length of the curve.
Osculating circle based deﬁnition:
j
¼
1
R
ð
s
Þ
, where
R
(
s
) is theradius of the osculating circle touching the curve.In both cases, the choice between ‘‘+” and ‘‘
” is determined bythe local convexity convention.Numerical evaluation of the curvature of a curve using any of the formulae presented above requires a numerical differentiation,which is an ill-posed problem [21]. Below, we present an alterna-tive approach.
2.2. Computing the discrete curvature of a curve
Several methods can be proposed to evaluate numerically thecurvature of a discrete object. For example, one could map the dis-crete object into continuous space by using methods like orthogo-nal polynomials, linear regression, or B-splines [22], and thencalculate the curvature in a point using one of the deﬁnitions forcontinuouscurvaturepresentedintheprevioussubsection.Severalproblems associated with such a method have been noticed.Firstly, the methods are limited since the input area needs to bereduced to provide a given accuracy. Secondly, the algorithmsbased on methods like these are time consuming for large inputdata [23].In a widely referenced paper by Worring and Smeulders [24],different approaches found in the literature for the computationof discrete curvatures are evaluated. The approaches are dividedinto three groups corresponding to different formulae for the cur-vature, from the previous subsection: the orientation-based ap-proach which uses Eq. (2), the path-based approach whichaccording to Worring and Smeulders also includes Eq. (1), andthe osculating-circle based approach. They note that these deﬁni-tions are equivalent in a continuous space, but not necessarily soin a discrete one.For the orientation-based approaches three methods are evalu-ated. In the ﬁrst method, the curvature is estimated using a lowpass differential ﬁltering of the estimated tangent direction. Thesecond method is similar to the ﬁrst one except for resampling of the discrete contour in order to reduce the anisotropy of the grid.The third approach is a line ﬁt method. The curvature is calculatedﬁnding the angular difference between two straight lines ﬁtted tothe data near the point of consideration. For the path-based ap-proach one method is evaluated. Using differential Gaussian ker-nels on the
x
- and
y
-coordinate sequences the curvature can beestimated. In the osculating circle-based approach, the curvaturecan be obtained by ﬁnding the circular disk that ﬁts the contourpoints best. Further literature references regarding the evaluationof different methods can be found in Worring and Smeulders’ pa-per [24].
2.3. Computing curvature using a template disk
Our approach for computing the curvature at a point along aboundary of a discrete object is based on the idea of computingthe partial area of a template disk that is placed with its centerin the given point. Since there exists an asymptotically linear rela-tionshipbetweenthiscomputedpartialareaandthecurvature,thecurvature value can be estimated.The theoretical basis for this approach is as follows. For a givencurveseparatingtwo2D‘‘phases”adisktemplateisplacedwithitscenter at a point
P
of the curve, see Fig. 1. The radius
b
of the tem-plate disk is assumed to be small compared to the radius of curva-tureofthecurveat
P
. Assumingsufﬁcientsmoothnessofthecurve,we locate the 2D Cartesian coordinate system with srcin in
P
andthe
x
-coordinate axis is placed along the tangent line of the curve.The position and orientation of the coordinate system imply
f
ð
x
Þ
x
¼
0
¼
d
f
d
x
x
¼
0
¼
0. Hence,
y
¼
f
ð
x
Þ ¼
12d
2
f
d
x
2
!
x
¼
0
x
2
þ
O x
3
ð
3
Þ
By virtue of Eq. (1),
y
¼
12
j
x
2
þ
O
ð
x
3
Þ ð
4
Þ
Axg(x)
γ
y
θ
Prb
Fig. 1.
There exists a linear relationship between the curvature of
c
in
P
and thearea of the circle above
c
. See text for details.868
O.I. Frette et al./Computational Materials Science 44 (2009) 867–875
Rewriting this equation in dimensionless form scaled with theradius
b
of the template disk, (
X
=
x
/
b
,
Y
=
y
/
b
,
K
=
j
b
), yields
Y
¼
12
KX
2
þ
O
ð
X
3
Þ ð
5
Þ
In polar coordinates
r
and
h
, with
R
=
r
/
b
, the equation can bewritten as
R
sin
h
¼
12
KR
2
cos
2
h
þ
O
ð
R
3
Þ ð
6
Þ
Solving for
h
, we get
h
ð
R
Þ ¼
sin
1
12
KR
þ
O
ð
R
3
Þ
ð
7
Þ
The angle
h
can now be interpreted as the angle between thetangent line passing through
P
and the
x
-axis. The area
A
of thetemplate disk outside the line segment can then easily be calcu-lated (in scaled form
a
=
Ab
2
) as
a
¼
Z
10
R
d
R
Z
p
h
ð
R
Þ
h
ð
R
Þ
d
h
ð
8
Þ
Substitution of Eq. (7) into (8) yields
a
¼
p
2
13
K
þ
O
ð
R
3
Þ ð
9
Þ
Or, in terms of
K
,
K
¼
3
a
3
p
2
þ
O R
3
ð
10
Þ
Theerror inthe last equationis small comparedtothetruecur-vature. Thus Eq. (10) can be written (in physical coordinates)
j
’
3
Ab
3
3
p
2
b
ð
11
Þ
The above Eq. (11) establishes the linear relationship betweenthe curvature
j
and the area
A
. This functional relationship willbe the basis for further discussion of curvature estimation below.
2.4. Computing curvature using a discrete template disk
The methoddescribedabove canbe appliedto digital images orgrids. In either case it is assumed that the image or grid is repre-sentedinabinaryformbybeingdividedintoa
background
andintoone or more
regions
. By convention, the background is assumed tobe white while the regions are assumed black. The points in theimage or grid are represented as square pixels. The discrete tem-plate disk is placed with its center along the boundary pixels of the regions. The calculation of area
A
then reduces to the countingof pixels belonging to that part of the template disk laying outsidethe regions. Discretization inevitably introduces errors in the cur-vature evaluation.Firstly, thereis anerror inthe areaof the discretetemplatediskcompared to the theoretical template disk. This error depends onthediameterofthedisk;itdecreaseswhenthediameterofthediskincreases, see Fig. 2. On the other hand, Eq. (11) requires that the
radius of the disk is small compared to the radius of curvature.Hence the optimal size of the template disk should be chosendepending on the curvature of the boundary. At the same timelarge diameters contribute to an additional error due to non-uni-formity of the curvature over larger area of the boundary.When using Eq. (11) in a discrete way an additional error isintroducedsincethearea
A
isadiscreteparameterwhiletheradius
b
is not. Thus Eq. (11) needs to be reformulated in terms of frac-tional area. By introducing
A
tot
=
p
b
2
, Eq. (11) can be written as
j
’
3
p
b A A
tot
12
ð
12
Þ
A
tot
is the area of an analytical disk with radius
b
.
Byapproximating
b
from
b
2
’
A
d
tot
=
p
(where
A
d
tot
isthetotalareaof the discrete template disk) and applying this expression to Eq.(11) we get
j
’
3
p
b A A
d
tot
12
!
ð
13
Þ
Since both the numerator and the denominator are counted inpixels in Eq. (13), the fractional area,
A A
d
tot
, is calculated in a consis-tent manner. Eq. (13) establishes the linear relationship betweenthe computed area and curvature that will be used in this paper.
3. Our method
Our paper focuses on the application of Eq. (13) directly to thedigital image.
3.1. Boundary representation
There are basically two different ways of representing theboundary (also called border, contour) of such a region. The ﬁrst
-4-2024681012145 10 15 20 25 30 35 40 45 50
Pixel diameter [ ]
A r e a e r r o r [ % ]
Fig. 2.
Relative error of discrete circles generated from square pixels.
n
equals one pixel unit.
O.I. Frette et al./Computational Materials Science 44 (2009) 867–875
869
isapixel-basedapproach[17,25]. Inthisapproach,theboundaryisrepresented by those pixels in the regions that are neighbors tobackgroundpixels; see Fig. 3. If the pixels in the regions are4-con-nected all boundary pixels must contain at least one 8-connectedpixel belonging to the background. If the regions are 8-connectedall boundary pixels must contain at least one 4-connected pixelbelonging to the background [25]. In [1] the boundaries are pix-
el-based, and the boundary pixels are called surface pixels. It isnot clear whether the regions are 4- or 8-connected.Thesecondwayof representingtheboundaryis theedge-basedapproach; also called the inter-pixel approach [26,27]. Everysquarepixelhasfoursides–left,right,topandbottom.Thesesidesare also called edges. In this approach, the boundary of a region isunderstood as the collection of edges that are shared between theregion pixels and background pixels; i.e. shared between comple-mentary domains, see Fig. 4. These edges are called crack edges.The two approaches to boundary representation have differentproperties.Pixel-basedboundariesaredependent onthedeﬁnitionof the neighborhood, the area of the boundary is greater than zeroand the boundaries are not shared with adjacent regions. On theotherhand, edge-basedboundarieshavezeroarea, aresharedwithadjacent regions, but contain sub-pixel elements – the edges. Inour paper we use the edge-based approach, and we think that thisrepresentation of the boundary is well suited for the curvaturealgorithm presented below.
3.2. The discrete template disk
We use template disks with odd pixel diameters, like in [1]. Adiscrete template disk with a given diameter is generated byincluding all pixels which have their center located at a distancefrom the center of the circle which is less than
b
, the radius of the circle. Radius
b
is deﬁned as 2
b
=
N
n
where
N
is anodd numberand
n
isdeﬁnedasonepixelunit.Fig.5showsanexampleofatem-plate disk with pixel diameter equal to 15.
3.3. The simulation approach
For a given digital image that has been segmented, the curva-ture is computed for each region. This is done by moving the tem-plate disk along the region boundaries with its center in theboundary pixels, see Fig. 5. The contributing area of the disk willbe calculated and the curvature can be computed from Eq. (13).It turns out that this approach still needs some modiﬁcation inorder to get good results. Finally some data smoothing removeshigh frequency noise from the computed values.
Fig. 3.
Pixel based boundary. Points marked with O are boundary pixels.
Fig. 4.
Edge-based boundary. The thick black line around the region represent theedges.Eachboundaryedgeissharedbetweenaregionpixelandabackgroundpixel.The thickness of the line is exaggerated.
Fig. 5.
Application of discrete template disk. In this example the pixel diameter is15.
Fig. 6.
Sinusoidal test image. Size 300
60 pixels. Curvature computed for the 100pixels in the middle of the image from Start to End. Image is wider than test regionto avoid boundary effects. Region is black, and background is white.870
O.I. Frette et al./Computational Materials Science 44 (2009) 867–875
4. Algorithm modiﬁcation, veriﬁcation, and results
In this section, we present results for our algorithm. Firstly wedescribe the adjustments needed. Followed by this is a discussionabout data smoothing where we propose a simple adaptive algo-rithm of reduction of the high-frequency noise. Thirdly the ques-tion about resolution is discussed. Then we compare ourapproach with the method of Bullard et al., followed by resultsfrom a test using a SEM image of a sedimentary rock. Finally, wediscusssomeuncertaintiesandlimitationsinherentinourmethod.
4.1. Test data set
For testing and veriﬁcation we have used a synthetic case asdigital region – a digitized sinusoidal interface. This sinusoidal isdeﬁned as
y
=
C
sin(
kx
) where
C
=30
n
,
k
¼
2
p
k
with
k
=100
n
, seeFig. 6. As above,
n
is equal to one pixel unit. This test case was cho-sensinceBullardetal.usedasimilaroneintheirpaper.Forthedis-cussionabout resolutionquality we also used twoother sinusoidalinterfaces – one whichwas twice the resolutionof the srcinal andone which was four times the resolution of the srcinal. Resultsfrom an image of a sedimentary rock are included in 4.6.
4.2. Algorithm modiﬁcations
When computing the curvature using Eq. (13) and applying thetemplate disk as described above, we noticed a bias in the com-putedvaluescomparedtotheanalyticalresults. Thereasonforthissystematic error is related to the choice of boundary.
4.2.1. Choice of boundary
In their paper Bullard et al. used template disks with odd pixeldiameters. With an odd diameter there is a unique center pixel inthedisk.Whenthetemplatediskisappliedalongagivenboundaryregion, the diskis placedwithitscenter pixel in eachsurfacepixel,see Fig. 5. The number of pixels in the template disk that is locatedoutside the given region is counted and from this pixel number acurvature value is computed using Eq. (17). We have also usedodd pixel diameter for the template disk. However, since we useedge-based boundarywe need to ﬁnd the corresponding boundarypixels (i.e. the surface pixels) in order to use the template diskproperly. Basically we do the same as Bullard et al., but insteadof using Eq. (17) the curvature is computed using Eq. (13) instead.
Resultsfromasimulationusingapixeldiameterof15areshowninFig. 7. A drift in the simulated results is observed. We also did asimilar simulation where the template disk was applied to theso-calledouterboundary.
2
Fig. 7 shows results from this simulation.We notice that the results are symmetrical around the analyticalcurve. The errors are similar, but have opposite signs. This suggeststhat the solution must lie somewhere ‘‘in between” those two situ-ations. The two simulated curves are computed from boundarieswith extended thickness of one pixel. The edge-based boundary onthe other hand has zero thickness, like an ideal analytical curve.Computing the curvature for a given boundary edge instead of aboundary pixel could possibly be an approach to avoid the reporteddrift errors. To accomplish this we need two computations for eachboundary edge. The template disk will be placed with its center bothin the inner and outer boundary pixels corresponding to the givenedge, see Fig. 8.
Theaveragevalueof thetwocomputedareasisthenusedasin-put value for
A
in Eq. (13), which can be rewritten as
j
’
3
p
b A
ave
A
d
tot
12
!
ð
14
Þ
where
A
ave
¼
A
in
þ
A
out
2
ð
15
Þ
A
in
is the number of pixels in the template disk covering thebackground when the center of the disk is located at the innerboundary. Similarly,
A
out
corresponds to the situation when thecenter of the disk is located at the outer boundary. Notice thatone must use identical disk diameters for these two computations.Fig. 9 shows the results of curvature computation with the adjust-ments included: the bias is practically eliminated.
4.3. Data smoothing
All the ﬁgures based on the sinusoidal simulations have shownsmooth results for the curvature values. High frequency noise isunavoidable given the discrete nature of the region boundaries.Fig. 10 presents an example. Both the srcinal curvature plot and
-0.20-0.15-0.10-0.050.000.050.100.150.200 10 20 30 40 50 60 70 80 90 100
Analytical Inner boundary Outer boundary
Fig. 7.
Curvature bias due to boundary effects, with pixel diameter of 15 pixel. The two curves represent computed values using both inner and outer boundaries.
2
A pixel-based boundary of a given region is deﬁned as all pixels of this region thatare neighbors to background pixels. Alternatively, the boundary can be deﬁned as theset of background pixels that are neighbors to the pixels of the given region. Thesetwo types of boundaries are respectively called inner and outer boundary [28].
O.I. Frette et al./Computational Materials Science 44 (2009) 867–875
871

Search

Similar documents

Tags

Related Search

Estimation of Soil Moisture From SpaceThe Scandinavian archeology and history of anMedieval style in the Renovation of an old AbAn Estimation of Retail Potential of IstanbulImportant of an Accountant in the SocietyRural Sociology for the Provision of an EffecBias Of An EstimatorStory of an hourProtection of Cultural Heritage from Illicit A new variant of Alesia brooch from Italy and

We Need Your Support

Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks