IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 19, NO. 6, JUNE 2010 1587
Constrained and Dimensionality-Independent
Path Openings
Cris L. Luengo Hendriks, Member, IEEE
Abstract—Path openings and closings are morphological opera-
tions with flexible line segments as structuring elements. These line
segments have the ability to adapt to local image structures, and
can be used to detect lines that are not perfectly straight. They also
are a convenient and efficient alternative to straight line segments
as structuring elements when the exact orientation of lines in the
image is not known. These path operations are defined by an ad-
jacency relation, which typically allows for lines that are approxi-
mately horizontal, vertical or diagonal. However, because this defi-
nition allows zig-zag lines, diagonal paths can be much shorter than
the corresponding horizontal or vertical paths. This undoubtedly
causes problems when attempting to use path operations for length
measurements. This paper 1) introduces a dimensionality-indepen-
dent implementation of the path opening and closing algorithm by
Appleton and Talbot, 2) proposes a constraint on the path opera-
tions to improve their ability to perform length measurements, and
3) shows how to use path openings and closings in a granulometry
to obtain the length distribution of elongated structures directly
from a gray-value image, without a need for binarizing the image
and identifying individual objects.
Index Terms—Granulometry, image analysis, length distribu-
tion, line segment, mathematical morphology, path closing, path
opening.
I. INTRODUCTION
P
ATH openings and closings are morphological operations
whose structuring elements are flexible line segments.
These line segments have a general orientation, but due to their
flexibility they can rotate and bend to adapt to local image
structures. Path openings and closings were first proposed by
Buckley and Talbot [1], and received a more thorough theoret-
ical foundation by Heijmans et al. [2], [3]. A path opening of
length is equivalent to the supremum of all openings with
structuring elements composed of connected pixels arranged
according to a specific adjacency relation. In 2-D, there are four
simple adjacency relations: one that produces approximately
horizontal lines, one that produces approximately vertical
lines, and two that produce approximately diagonal lines. The
horizontal path is formed by adding pixels either horizontally
or diagonally, but always to the right [North-East (NE), East
Manuscript received August 26, 2009; revised January 23, 2010. First pub-
lished March 08, 2010; current version published May 14, 2010. The associate
editor coordinating the review of this manuscript and approving it for publica-
tion was Prof. Dan Schonfeld.
The author is with the Centre for Image Analysis, Swedish University of Agri-
cultural Sciences, Uppsala, Sweden (e-mail: cris@cb.uu.se).
Color versions of one or more of the figures in this paper are available online
at http://ieeexplore.ieee.org.
Digital Object Identifier 10.1109/TIP.2010.2044959
(E) and South-East (SE) neighbors]. The vertical path is formed
using the North-West (NW), North (N) and NE neighbors,
and the diagonal paths using either the N, NE and E or the E,
SE and South (S) neighbors. Fig. 1 shows the horizontal path
connectivity diagram and some example horizontal paths.
Obviously, computing the opening with each of the possible
connected path structuring elements of length is prohibitive
even for small values of , since there are such paths.
Buckley and Talbot [1] proposed a recursive algorithm to com-
pute path openings that is (with the number of pixels
in the image), and needs temporary images. Later, Ap-
pleton and Talbot [4], [5] proposed a more efficient algorithm
that seems to be , and only requires three tempo-
rary images. Both algorithms are explicitly defined for 2-D im-
ages. Section II proposes a simplification to the Appleton and
Talbot algorithm, which allows for a definition that is indepen-
dent of image dimensionality.
A granulometry is a standard tool in mathematical mor-
phology that builds a size distribution of objects in an image
by applying an opening (or closing) of increasing size, and
summing all pixel values after each step [6], [7]. In previous
work [8], we have shown how a supremum of openings (or an
infimum of closings) with line structuring elements at all ori-
entations can be used in a granulometry to measure the length
of objects in the image without segmenting the image first.
Because the number of orientations needed increases linearly
with the line length in 2-D [9], this can be a time-consuming
operation in a 2-D image. But it becomes prohibitive in 3-D,
where the number of orientations needed depends quadratically
on the length. It is, therefore, attractive to use path openings
instead. In 2-D, there are only four orientations over which
to compute the path opening, independent of path length. In
3-D, there are 13 possible orientations. Using Appleton and
Talbot’s algorithm, the operation’s cost grows logarithmically
with length, for any number of dimensions. Two-dimensional
path openings have recently been used in a similar manner to
detect roads in satellite images [10].
There is, however, one caveat when using path openings: as
will be shown, diagonal paths can zig-zag (e.g., N, E, N, E, N,
etc. instead of NE, NE, NE, NE, NE, etc. ), resulting in a path
that is physically much shorter than expected given the pixel
count. Section III shows how to avoid this. The constraint intro-
duced in that section also narrows the possible orientations for
one path, making it more selective. This constraint is similar to
that proposed by Buckley and Yang [11] for shortest path ex-
traction, though implemented in a very different manner.
Section IV-D shows how the methods proposed in this paper
can be applied to estimate the length of wood fibers in a 3-D mi-
crotomographic image, without the need to identify individual
1057-7149/$26.00 © 2010 IEEE