On Integer Programming Approaches for Morphological Template Decomposition Problems in Computer Vision P. SUSSNER*, P. M. PARDALOS†, G. X. RITTER‡ University of Florida, Gainesville, FL 32611
Abstract In morphological image processing and analysis, a template or structuring element is applied to an image. Often savings in computation time and a better fit to the given computer architecture can be achieved by using the technique of template decomposition. Researchers have written a multitude of papers on finding such decompositions for special classes of templates. Justifying recent integer programming approaches to the morphological template decomposition problem in its general form, this paper proves the NP-completeness of this problem. Key Words — Computer vision, mathematical morphology, template decomposition, complexity, integer programming.
Introduction Morphological image processing is based on the theory of mathematical morphology, which grew out of the belief that many image processing operations can be expressed in terms of a few elementary operations [13, 18, 19, 9]. The operations of dilation and erosion form the mathematical basis for all morphological operations. The theory of image algebra incorporates all known image processing techniques in a translucent manner [17, 16, 4, 3]. In this setting, many image processing operations — including all morphological operations — are represented as convolutions of the image with a template, also known as structuring element. Computer scientists distinguish between linear convolutions and morphological convolutions. Morphological convolutions either consist of certain combinations * † ‡
E-mail:
[email protected] E-mail:
[email protected] E-mail:
[email protected] 1
of maximum and addition operations or certain combinations of minimum and addition operations. The decomposition of a template in image algebra consists of the representation of a convolution as a sequence of other convolutions, which involve a certain number of operations. In other words, a template is expressed in terms of other templates having certain supports. Decomposition of templates is a helpful technique for increasing the computational efficiency of a multitude of image processing operations, either by decreasing the number of operations required or by organizing the computations into forms more compatible with specialized image processing architectures [6, 5, 11, 12]. Often these architectures call for the decomposition of arbitrary rectangular templates into 3x3 templates. Excellent savings in computation time can be achieved, if a templates decomposes into a small number of horizontal and vertical strip templates. A template is called separable if it can be expressed as the outer product of a column and a row template. Decompositions in linear image processing include Fast Fourier Transforms, Laplacian and Gaussian masks. Decompositions in the nonlinear or morphological domain are thus far only known for a small class of special templates such as separable templates, convex dome shaped templates, and binary templates having certain supports [22, 10, 21, 14, 15]. Recently, researchers have attempted to solve a wide range of decomposition problems for gray-scale morphological templates through formulation as integer programming problems [7]. The most general of these integer programming approaches is concerned with solving arbitrary morphological template decomposition problems [20]. In this paper, we show that the general morphological template decomposition problem is NP-complete. This result justifies the use of integer programming for solving arbitrary instances of morphological template decomposition problems. This paper is organized as follows: First, we introduce the reader to notations from the theory of image algebra. Then we briefly review the integer programming approaches for solving morphological template decomposition problems, which we introduced in a previous paper. Finally, we prove the main complexity results of this paper.
Image Algebra Background The mathematical theory of image algebra provides a mathematical background for all computer vision and image processing applications [17, 16]. In 2
this section, we define some fundamental image algebra operands and operations, which simplify the discussion of the main results of this paper. Our attention focuses on morphological operations. Mathematical morphology, which is only concerned with morphological image processing operations, can be embedded into image algebra [1, 2]. Before we proceed, we introduce some commonly used notations. Notations. Throughout this paper, the set of integers is denoted by Z, and the set of real numbers is denoted by R. We express the maximum of two numbers a and b by a _ b. Similarly, the expression a ^ b stands for the minimum of a and b.
X
Point Sets and Value Sets. A point set is a subset of a topological space. In digital image processing point sets are often assumed to be rectangular discrete arrays. Throughout this paper, we assume that is a subset of Z2 . A value set — often denoted by F — is a homogeneous algebra such as Z, R, R01 = R [ f01g, R+1 or C. The algebraic system associated with R01 will be the lattice ordered semi-group (R01 ; _; +) with the extended arithmetic and logic operations defined as follows:
X
a
01) = (01) + _ (01) = (01) _
+( a
01 8 2 R01 = 8 2 R01
=
a
a
a
a
;
:
a
The dual of this system is the lattice ordered semi-group
R+1 ^
(
;
;
+).
Images and Templates. The theory of image algebra views images as functions and templates are considered functions whose values are images. In particular, an F–valued image over the point set is a function : ! F (i.e. 0 2 F1X), while an F–valued template on is a function : ! FX (i.e. 2 FX X). For notational convenience, we define y as ( ) for all 2 . Note that the image y has representation
a
t X
t
X
t
a X a t X t y X ty
ty = f(x ty (x)) : x 2 Xg where the pixel values ty (x) at location x of this image are called template weights 0 1X at point y. A template t 2 FX is called translation invariant if and only if ty+z(x + z) = ty (x) 8 x y z 2 X = Z2 ;
;
;
3
;
;
whenever at a point
y + z and x + z are elements of X. The support of a templatet 2 0FX 1X y is denoted by (ty ) and defined as follows: (ty ) = fx 2 X : ty (x) 6= 0 g S
S
;
where 0 denotes the zero element of the algebraic structure F. Since we are concerned with morphological operations on images, the value set F of interest will be he real numbers with the symbol 01 appended, i. e. F = R01 = R [ f01g. From now on, we are going to restrict ourselves to this value set. Note that the element 01 acts as a null element in the system (R01 ; _; +) if we view the operation + as multiplication and the operation _ as addition. 0
1X
Example. Let 2 RX01 be the translation invariant template which is determined at each point = (x; y ) 2 by the following function values of 2 :
r
x
X
y
8 7 > > > > 4 > >
02 + ry (x + (1 0)) > > > > 07 + ry (x 0 (1 0)) > : 12
01
if
;
if x1
;
if
x1
=
=
x
01
x
+1
;
1)
;
1)
and y and y
r
x+1
ry =
y
+1
x2
y
+1
r as shown in Figure 1.
Figure 1. The support of the template at point cell indicates the location of the target point
x
x2
else :
We can visualize the rectangular template
x-1
01 01
y-1
y
y+1
2
5
10
4
7
12
-3
0
5
4
y. The hashed y = ( ). x; y
r
Rectangular Templates. A translation invariant template is called rectangular, if S ( y ) forms a rectangular discrete array. We speak in particular of an m 2 n template, if S ( y ) has size m 2 n. We introduce the following convenient notation to denote the weights of an m 2 n template :
r
r
r
rij
where
x~ = ( ~1
x ;x ~2 )
=
y ((x~1 + i 0 1; x~2 + j 0 1))
r
satisfies the conditions x ~1
8x=(
2 2 ) 2 (ry )
x1 ; x ~2
x
x1 ; x
S
:
For example, the 3 2 3 template in Figure 1 has the weight r23 = 12. If is an m 2 1 template, we abbreviate si1 by si , and if is an 1 2 n template, we abbreviate tij by tj . The template is said to be a column template of length m, and the template is said to be a row template of length n.
s
t
s
t
Basic Operations. The basic operations of addition and maximum on R01 induce pixelwise operations on R01 –valued images and templates. For any 0 1 ; 2 RX01 and any ; 2 RX01 X , we set
st (a + b)(x) = a(x) + b(x) 8 x 2 X (a _ b)(x) = a(x) _ b(x) 8 x 2 X (s + t)y = sy + ty 8 y 2 X (s _ t)y = sy _ ty 8 y 2 X
ab
;
;
;
;
;
;
;
:
Additive Maximum Operations. Forming the additive maximum (“ _ ”) of an 0 X 1X X image 2 RX 01 and a template 2 R01 results in the image _ 2 R01 , which is determined by the following function values.
a
3 a3 t
t
a 3_ t)(y) =
(
_
x2X 5
a(x) + ty (x)
:
Clearly, each template
t
2
1X RX 01
0
f
defines a function
X t : RX 01 ! R01
a a3 t _
t 1
The additive maximum of a template 0
is defined as the template 2 RX 01 of ft followed by fs . Specifically,
r
s 3 t ) y ( z) =
(
_
_
2
1X RX 01
0
and a template
X which determines f
tx(z) + sy (x))
(
x2X
:
8
2
1X RX 01
0
s ft , the composition
y z X ;
s
2
:
These relationships induce the associative and distributive laws given later. The “additive maximum” operation represents an example of a morphological convolution. The morphological convolution “additive minimum” is defined similarly and is denoted by the symbol “ ^ ”. In correspondence to the morphological convolutions defined above, Ritter 0 X 1X and also defines a linear convolution operation + for templates 2 R
3
s
2
t
1 RX X :
0
s tyz
( + ) ( )=
X
tx(z) sy (x))
(
x2X
1
y z X ;
2
:
1X RX _ t. 01 satisfy r = s 3 The template r constitutes the additive maximum of the templates s and the template t.
Example. The following column templates Figure 2.
8
rst ;
;
2
0
2 3 r =
y
4
1 sy =
0
5
3
6
6
1 ty=
2 3
Some Properties of Image and Template Operations. The following associative and distributive laws hold for an arbitrary image a RX 01 and arbitrary 0 X 1X R01 : templates s; t
2
2
_ _ _ _
_ _ _ _ _
a 3 (s 3 t) = (a 3 s) 3 t ; a 3 (s t) = (a 3 s) (a 3 t) :
These results establish the importance of template decomposition.
Decompositions of Templates.
A sequence of templates
1X RX 01
0
1 0 1 t ; . . . ; tkn in
together with a strictly increasing sequence of natural numbers (k1 ; . . . ; kn ) is called a weak morphological decomposition (with respect to the 0 X 1X operation “ ”) of a template t R01 if the template t can be represented as follows:
2
3_
_
t = t1 3
...
3_ tk
1
_
_
tk1 +1 3
...
3_ tk
2
_ _
Similarly, a weak linear decomposition of a template t
sequence of templates t1 ; . . . ; tkn in RX 01 sequence of integers (k1 ; . . . ; kn ) such that
1X
1
0
t = t1
t + ... +
k1
+
tk1 +1
0
t + ... +
k2
_
tkn01 +1 3
...
...
3_ tk
n
:
2 0RX1X is given by a
together with a strictly increasing
+ ...+
tkn01 +1
t + ... +
kn
:
In the case where n = 1, we speak of a strong decomposition of the template t. 0 X 1X For example, a strong morphological decomposition of a template t R01 has the following form:
2
_ _
t = t1 3 t2 3
...
3_ tk
:
If the template t strongly decomposes into a column template t1 and a row template t2 , it is referred to as a separable template. 7
Example.
The template r
0 1X 2 RX 01
given in Figure 1 represents a separable
template since this template decomposes into a vertical strip template s 2 and a horizontal strip template t
1X 0 2 RX 01 .
Figure 3. Pictorial representation of a column template
1X RX 01
0
s and a row template t.
5 sy =
7
ty =
-3
0
5
0
Relevance of Template Decompositions. Realizing the convolution of an image a with a template t on a computer is an extremely complex task, since each pixel value at location y depends on all pixel values of a within the neighborhood given by ty . Decomposing the template t often helps to reduce the number of computations involved in forming an image-template product by providing alternative ways to compute this convolution. For example, the application of a separable template to an image is equivalent to the sequential applications of a column template and a row template. Hence, a quadratic problem reduces to a linear problem. Computing the Fourier Transform of an image represents a linear convolution. The speedup of this computation achieved by the Fast Fourier Transform relies heavily on linear template decomposition. Template decompositions have also been successfully used for the purpose of achieving a better fit to the computer architecture. For example, if each processing element has direct neighbors in N, S, W, and E directions, then the user of image processing software benefits from template decompositions into invariant templates having supports of the following form:
8
Researchers have shown that convex, dome-shaped morphological templates decompose into von Neumann templates [11]. A host of researchers has investigated the problem of finding morphological template decomposition into 3 2 3 templates. 1X
0
Morphological Template Decomposition Problem. Let 2 RX 01 be an invariant template, 0 1 2(k1 ; k2 ; .k. .1; kn ) an strictly increasing sequence of natural numn a sequence of subsets of bers and ; ;...; . Is there a sequence of
t
X X
X X 0 X 1X such that the following conditions invariant templates t1 t2 . . . tk 2 R01 ;
;
n
;
are satisfied?
t
X
1. For all i = 1; . . . ; kn the set i contains the support of iz . 2. The template factorizes as follows into a product of the templates 1 ; 2 ; . . . ; kn :
t t
t
t
t = t1 3_ . . . 3_ tk _ . . . _ tk 0 +1 3_ . . . 3_ tk Determine the templates
1
t1 t2 . . . tk ;
;
;
n
n 1
n
:
in this case.
In this paper, we are particularly interested in the following subproblem, which we shall call the separable decomposition problem for rectangular morphological 1X 0 templates. Let a rectangular template 2 RX 01 and an integer k be given.
r
Can the template templates
r be1decomposed into column templates sl 2 0RX01 1X and row
tl 2 0RX01 X such that
r=
k _ i=1
si 3_ ti
:
sl and t0l in this case for all = 1 . . . . 1 X A rectangular template r 2 RX 01 which can be expressed in the form k W r = si 3_ ti is said to have rank . The rank of the template r 2 0RX01 1X
Determine the templates
;
;k
k
i=1
is exactly k , if
l
k
is the smallest integer such that
9
r=
k W i
i=1
s 3_ ti.
Integer Programming Approaches to Morphological Template Decomposition Problems The decomposition of morphological templates is an ongoing research topic, which many researchers investigate. Most researchers have concentrated on decomposing particular types of binary or gray-scale morphological templates. Recently, researchers have provided integer programming solutions to the morphological template decomposition problem; some are focusing on decomposing morphological templates into 3 2 3 templates [7]; others demonstrate how to solve decomposition problems of arbitrary invariant morphological templates [20]. In this section, we review the latter integer programming approach. In this setting, we consider the problem of morphological template decomposition as a subproblem of morphological template approximation. The definition of morphological template approximation requires a notion of distance between two templates. 0 1X and Metrics on Invariant Templates with Finite Support. If s 2 RX 01 0 X 1X are invariant templates with the same finite support S at some t2 R
01
target point y 2 X, then the following equations provide metrics on the set of all invariant templates with that particular finite support:
s t) =
d1 ( ;
s t) =
d2 ( ;
X
x2S
_
x2S
jsy (x) 0 ty(x)j
jsy (x) 0 ty (x)j
:
In particular, the following equivalences hold:
s t) = 0 , s = t
di ( ;
:
Since the templates s and t are invariant, these definitions do not depend on the choice of the target point y 2 X. For the rest of this section, we use the symbol d in order to denote either one of the template metrics d1 or d2 . 1X 0 Morphological Template Approximation Problem. Suppose t 2 RX 01 is an invariant template, (k1 ; k2 ; . . . ; kn ) an strictly increasing sequence of natural 1 0 numbers and X1 ; X2 ; . . . ; Xkn a sequence of subsets of X. Define T to be the 10
set of all sequences
0 1 2 ; ;
s s . . . skn ;
1
which have the following properties: X
si 2 RX01 0 i1 sz Xi 8 = 1 ... n S
i
;
0 1 2 ; ;
;k
:
1
t t . . . tkn 2 T which satisfies the inequality i h h i t1 3_ . . . 3_ tk1 _ . . . _ tkn01+1 3_ . . . 3_ tkn t h i h i s1 3_ . . . 3_ sk1 _ . . . _ skn01 +1 3_ . . . 3_ skn t 8 s1 . . . skn 2 T
Find a sequence of templates
;
d
;
d
;
;
:
;
Note that a solution to the morphological template approximation problem for a fixed, but arbitrary instance yields a solution to the morphological template decomposition problem for the same instance. Integer Programming Formulations. In a previous paper, we indicated how to solve arbitrary instances of the morphological template approximation problem by using an integer programming approach [20]. In particular, we presented an integer programming solution to the following approximation problem:
Given a m 2 n rectangular template k , minimize d
1
k _ i=1
1 0 r 2 RX01 X and an arbitrary integer !
si 3_ ti r
;
;
X are 2 1 column templates and the templates i 2 RX s 01 1 0 ti 2 RX01 X are 1 2 row templates for all = 1 . . . . 0
where the templates
1
m
n
i
m n X X M in
i=1 j =1
qij
11
+
k X l=1
;
! l
pij
;k
l p ij
subj ect to
rij qij
0 0 0 3 + 0 0 0 l
l
si l
l
si
l
M
tj
tj
fij
rij
l pij
qij
=0
l
fij
X k
i
The constant M
;
l
=1
; n; j
1
= 01
l
k
fij
8 = 1 ...
or
= 1 ... ;
; m; l
= 1 ... ;
W should be at least as large as aij i; j; l
0
;k :
l s i
+
l tj
. Note that
the above integer programming formulation generalizes the problem of finding a separable decomposition of r
0 1 2 RX01 X of the form r =
section will show that this problem is NP-complete.
k W
=1
si
i
3_ t . i
The next
Complexity Results In this section, we are going to prove the NP-completeness results which we addressed in the previous sections. In particular, we show that the separable decomposition problem for a rectangular morphological template is NP-complete. However, an instance of this problem is solvable in polynomial time if the parameter k 2. In fact, a decomposition of the form r = s _ t, where s is a column template and t is a row template, can easily be found for any rectangular 1X 0 template r 2 RX 01 [11]. In an upcoming paper, we will construct a separable
3
=
decomposition of the form r template of rank Theorem.
2.
k W
=1
i
The following problem 0
1X
INSTANCE: Let r 2 RX 01 positive integer.
si
3_ t
i
for any rectangular morphological
5 is NP–complete:
be a rectangular
12
m
2
n
template and
k
be a
QUESTION: Is there a collection of column templates sl and row templates tl that
m
1 0 2 RX01 X of length
r
Proof. (1) 5 2 NP:
=
0
k _ sl
l=1
1X
X For any guess of templates s~l 2 01 stage can be performed in polynomial time: 1. Forming 2. Another
R
k ~ W sl
l=1
mn
3_ t~l
0 1 2 RX01 X of length
3_ tl
and t~l
,
n l
= 1 ... ;
;k
, such
?
1 0 2 RX01 X, the checking
costs k (mn)+(k 0 1)(mn) = (2k 0 1)mn operations.
operations are needed for comparing the result with r.
(2) Choice of an NP–Complete Problem
50 :
INSTANCE: Collection C of nonempty subsets of a finite set A and a positive integer k jCj. QUESTION: Is there a collection B of subsets of A with jBj = k such that , for each C 2 C , there is a subcollection of B whose union is exactly C .
The following argumentation shows that 50 is indeed NP–complete: Since 50 represents a subproblem of SET BASIS, which is known to be NPcomplete, it is contained in NP. The problem of SET BASIS only differs from 50 by allowing the empty set as an element of C [8]. The problem of SET BASIS can be partitioned into the problem 50 and a similar problem 500 . Instances of 500 consist of those collections C of subsets of A which include , and a positive integer k jCj. The problems 50 and 500 are polynomially equivalent. Thus, if either one would be contained in P, the problem of SETBASIS would belong to P. (3) Construction of a Transformation f from 50 to 5: Let an instance (C ; k ) of 50 be given, where C is a collection of subsets of a finite set A and k is a positive integer with k jCj. The cardinality of C is bounded from above by 2jAj, the cardinality of the power set of A. Hence, C as well as A are finite sets and they are of the form C = fC1; . . . ; Cmg and A = fa1 ; . . . ; an g for some m; n 2 . We now construct an instance (t; k ) of 5 which is satisfiable if and only if the instance (C ; k ) of 5 is satisfiable. The parameter k remains unchanged and
?
N
0
13
we define an
m
2
r 2 0RX01 1X by setting
template
n
rij
“(”:
n = 01
if aj
2
Ci
else :
(C ) be satisfiable, where is a collection of subsets of = g and is a positive integer with jCj. Hence, there exists a collection B = f 1 . . . g of subsets of = f 1 . . . g such that, for each 2 C , where = 1 . . . , there is a subcollection B B whose union equals
f 1 ... a ;
Let
;k
C
k
B ;
Ci
Ci
A
k
; an
i
; Bk
;
A
a ;
; an
;m
i
.
t
We are now going to show that the instance ( ; k ) of 5 is satisfiable by 1X 0 X 1X 0 l constructing m 2 1 templates l 2 RX 01 and 1 2 n templates 2 R01
s W0 for all = 1 . . . , such that r = s 3_ t 1. =1 0 X 1X for all = 1 . . . We define the row templates t 2 R01 k
l
;
l
;k
t
l
l
l
l
;
;k
as follows:
2 8 = 1 ... = 10 Introducing the notation = f 2 f1 . . 0. g :1 2 B g for all = 1 . . . , X we define the column row templates s 2 RX 01 for all = 1 . . . by setting n
l
tj
if aj
Bl
j
else
Li
l
;
;
;n :
Bl
;k
l si
= 001
if l
l
Li
else
Note that the invariant templates have the same support at each
2
i
i
l
8 = 1 ... i
;
r 2 0RX011X and
y 2 X.
;
;k
s 3_ t 1 2 0RX01 1X
k 0 W l =1
l
l
r=
we first prove that
f( ) 2 i; j
M
2 : N
rij
= 1g = ( ) 2 i; j
M
2
N
:
;m
;m :
In order to show that
(
;
k _ l =1
s 3_ t l
l
k 0 W l =1
ij
s 3_ t 1, l
=1
l
) ;
where M denotes from now on the set f1; . . . ; mg and N denotes from now on the set f1; . . . ; ng. Furthermore, we set K = f1; . . . ; k g. 14
i
2
The above equation follows from the sequence of equivalences below, where M and j 2 N are arbitrary indices. k _
s 3_ t
l =1
l
l
k _
,
+
l
si l =1
=1
ij
l
=1
tj
,9 2 : =1 =0 ,9 2 : 2 , 2 2 , 2 , =1 l
and si
tj
l
j
l
l
K
Li
j
Bl
Bl f or some l j
Li
Ci
rij
:
r = W 0s 3_ t 1 by showing k
We now conclude the proof of the desired equality that the invariant template
the sets
Ci
l
l
l =1
— like the invariant template
r — only
0 and 1 at each location y 2 X. In other words, it suffices to s 3_ t 1 2 f0 1g for all 2 and for all 2 . Recall that =1 are not empty for all 2 .
k 0 W
l
1 l
s 3_ t
l =1
adopts the values show that
k 0 W
l
l
l
;
ij
i
i
8 2 i
9 2
M
ji
j
N
M
: 1=
N
M
k _
=
riji
s 3_ t
l =1
l
l
=1
iji
)8 2 9 2 2 : + =1 )8 2 9 2 2 : =0 )8 2 9 2 : + 0 8 2 i
M
i
i
M
i
M
_ k
l =1
N; li
M
)8 2 )
ji
ji
li
l =1
s 3_ t l
l
ij
K
li i
K
li i
s
j
t
s 3_ t
l
i
0 8 2 j
ij
0 8 2 15
t
li j
s
l
li ji
s
N; li
k _
:
li i
K
M;
8 2 j
N
N
N :
“)”: m
r
21
=
Let (r; k ) be a satisfiable instance of 5, which means that there exist 0 1X 0 1X templates sl 2 RX 01 and tl 2 RX 01 , l = 1; . . . ; k , such that
k 0 W sl
3_ tl
1
. We need to show that the corresponding instance instance l=1 (C ; k) of 50 is satisfiable. We will construct a collection B of k subsets of A such that, for each Ci 2 C , i = 1; . . . ; m, there is a subcollection Bi B whose union is exactly Ci . For all l 2 K , we define Bl as the set of all aj 2 A such that tlj is maximal among all tlj , where j; j 0 2 N , and we denote the collection of these sets by B , i.e. 0
l=
n
If Li some j 0
K
2
,
j
a
B
0
= 1 ...
2 : 02 B=f A
j
lj 8 2 . . . kg
N and t B1 ;
l j
t
0
;
Bi =
l
B
: 2 l
o
8 2
N
l
l
0
2
K
, such that sli + tlj
= 1 for
o
i
L
:
1X
0
K
:
;m
n
j
;B
, denotes the set of all N , then we define i
0
By the definition of r 2 RX 01 , each set Ci equals fj 2 N : rij = 1g. Therefore, we obtain the following sequence of equations for all i = 1; . . . ; m:
i
C
=
(
j
2
:
N
n
k _
l l si + tj
l=1
= 2 : li + lj = 1 n = 2 : li + lj = 1 n = j 2 l : li + lj = 1 =f j 2 l [ =
=1
j
N
s
t
f or some l
j
N
s
t
f or some l
a
B
s
a
t
B
Bl
l2L [ = B i
16
2 2 2
f or some l
f or some l
i :
2 ig L
)
o K
o
i
L
i
L
o
(4) Proof that f is a Polynomial Transformation: By the construction in (3), f maps an instance (C ; k ) of 50 , where C = fC1; . . . ; Cmg is a collection of m subsets of A = fa1; . . . ; ang, to an instance (r; k) of 5. Since the parameter k does not change, the only operations0involved 1X in the computation of f are the ones arising from the computation of r 2 RX 01 . For each weight rij of r, where i 2 M and j 2 N , the index j has to be tested if it belongs to the subset Ci of A = fa1 ; . . . ; an g. This test involves less than n operations. Thus, the computation of f can be performed in less than mn2 operations which implies that f is a polynomial transformation. Remark. It seems reasonable to believe, that the NP-completeness of the following problem can be proven in a similar fashion: does an arbitrary invariant morphological template strongly decompose into a sequence of 3 2 3 templates? Finally, we provide a few easily derivable, but important corollaries to the above theorem. Corollary 1. The problem of finding the rank of a rectangular morphological template is NP-complete. Corollary 2. The separable decomposition problem for rectangular morphological templates is NP-complete. Corollary 3. The general morphological template decomposition problem is NPcomplete. Concluding Remarks. This paper attempts to provide a solid theoretical background for the complexity of all morphological template decomposition problems. We have shown that a particular subproblem 5 of the general morphological template decomposition problem is NP-complete. Hence, global optimization approaches to solve the morphological template decomposition problem have to employ integer programming techniques. Attempts to exploit special structures of certain morphological template decomposition problems will continue to play a predominant role in future efforts to efficiently solve morphological template decomposition problems.
17
Bibliography [1] J.L. Davidson. Nonlinear matrix decompositions and an application to parallel processing. Journal of Mathematical Imaging and Vision, 1(2):28–36, 1992. [2] J.L. Davidson. Nonlinear matrix decompositions and an application to parallel processing. Journal of Mathematical Imaging and Vision, 1:169–192, 1992. [3] J.L. Davidson. Classification of lattice transformations in image processing. Computer Vision, Graphics, and Image Processing: Image Understanding, 57(3):283–306, May 1993. [4] P.D. Gader. Necessary and sufficient conditions for the existence of local matrix decompositions. SIAM Journal on Matrix Analysis and Applications, pages 305–313, July 1988. [5] P.D. Gader. Separable decompositions and approximations for gray-scale morphological templates. CGVIP, 53:288–296, July 1991. [6] P.D. Gader and E.G. Dunn. Image algebra and morphological template decomposition. In Aerospace Pattern Recognition, volume 1098 of Proceedings of SPIE, pages 134–145. Orlando, FL, March 1989. [7] P.D. Gader and S. Takriti. Local decomposition of gray-scale morphological templates. Journal of Mathematical Imaging and Vision, 2:39–50, 1992. [8] M.R. Garey and D.S. Johnson. Computers and Intractibility: A Guide to the Theory of NP-Completeness. W.H. Freeman and Company, New York, 1979. [9] H.J.A.M. Heijmans. Mathematical morphology: A modern approach in image processing based on algebra and geometry. SIAM Review, 37(1):1–36, 1995. [10]S.-Y. Lee and J.K. Aggarwal. Parallel 2–D convolution on a mesh connected array processor. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-9(4):590–594, July 1987. [11]D. Li and G.X. Ritter. Decomposition of separable and symmetric convex templates. In Image Algebra and Morphological Image Processing, volume 1350 of Proceedings of SPIE, pages 408–418, San Diego, CA, July 1990. [12]Z.Z. Manseur and D.C. Wilson. Decomposition methods for convolution operators. Computer Vision, Graphics, and Image Processing, 53(5):428–434, 1991. 18
[13]G. Matheron. Random Sets and Integral Geometry. Wiley, New York, 1975. [14]H. Park and R. T. Chin. Optimal decomposition of convex morphological structuring elements for 4–connected parallel array processors. IEEE Trans. on Pattern Anal. and Mach. Intell., 16(3):304–313, 1994. [15]H. Park and R.T. Chin. Decomposition of arbitrarily shaped structuring elements. IEEE Pattern Analysis and Machine Intelligence, 17(1):2–15, 1995. [16]G.X. Ritter. Recent developments in image algebra. In P. Hawkes, editor, Advances in Electronics and Electron Physics, volume 80, pages 243–308. Academic Press, New York, NY, 1991. [17]G.X. Ritter, J.N. Wilson, and J.L. Davidson. Image algebra: An overview. Computer Vision, Graphics, and Image Processing, 49(3):297–331, March 1990. [18]J. Serra. Image Analysis and Mathematical Morphology. Academic Press, London, 1982. [19]J. Serra. Image Analysis and Mathematical Morphology, Volume 2: Theoretical Advances. Academic Press, New York, 1988. [20]P. Sussner, P.M. Pardalos, and G.X. Ritter. Global optimization problems in computer vision. In C.A. Floudas and P.M. Pardalos, editors, State of the Art in Global Optimization, pages 457–474. Kluwer Academic Publisher, 1995. [21]J. Xu. Decomposition of convex polygonal morphological structuring elements into neighborhood subsets. IEEE Transactions on Pattern Analysis and Machine Intelligence, 13(2), February 1991. [22]X. Zhuang and R.M. Haralick. Morphological structuring element decomposition. Computer Vision, Graphics, and Image Processing, 35:370–382, 1986.
19