Lukasiewicz transform and its application to compression ... - CiteSeerX

21 downloads 2891 Views 4MB Size Report
is an (S, S)-bisemimodule and we will call it, shortly, an S-bisemimodule. Note that ... Lemma 5 Let M be a free left S-semimodule, and let X ⊆ M be a basis for.
Lukasiewicz transform and its application to compression and reconstruction of digital images A. Di Nola ∗ , C. Russo ∗,1 Universit` a degli Studi di Salerno Dipartimento di Matematica ed Informatica via Ponte don Melillo 84084, Fisciano (SA) Italy

Abstract We define the Lukasiewicz transform as a residuated map and a homomorphism between semimodules over the semiring reducts of an MV-algebra. Then we describe the “Lukasiewicz Transform Based” (LTB) algorithm for image processing, demonstrating its applicability. Key words: MV-algebras, many valued logic, fuzzy relation equations, residuated maps 1991 MSC: 03B50, 03G10, 06D35

1

Introduction

The concept of transform appears often in the literature of image processing and data compression (see, for instance, [12,18]). Indeed a suitable discrete representation of a problem seems to be the best way – in terms of computability and accuracy of results – to approach many different tasks. On the other hand, the theory of fuzzy relations is widely used in many applications (see, for instance, [5]) and particularly in the field of image processing ([8] – [10], [13] – [17]). As a matter of fact, fuzzy relations fit the problem ∗ Corresponding author. Email addresses: [email protected] (A. Di Nola), [email protected] (C. Russo).

Preprint submitted to Elsevier Science

of processing the representation of an image as a matrix with the range of its elements previously normalized in [0, 1]. In such techniques, however, the approach is mainly experimental and the algebraic context is seldom clearly defined.

For these reasons we focused our attention on the algebraic structures involved, more or less explicitly, in some of these approaches, and especially in the method proposed in [13]. Hence an interest concerning the algebraic structures related to Lukasiewicz logic arose.

Once we fixed the underlying algebras, it turned out immediately that the method proposed in [13] could be somehow generalized. Moreover, recent developments in the theory of MV-algebras, provide us with some tools both interesting from a theoretical point of view and useful for applications.

More precisely, making use of the theory of semimodules over semirings ([7]), and the results presented in [3], we prove that the structures of semimodule defined in a natural way on the (finite) Cartesian power of an MV-chain has exactly one basis, and this fact leads to a natural definition of dimension for this class of semimodules; furthermore, over a fixed MV-chain, there exists only one of these semimodules of a given dimension, up to isomorphisms. These properties of uniqueness mean that, given an MV-chain A and a natural number n, the Cartesian power An – with the operations defined pointwise – is a general example of n-dimensional Lukasiewicz semimodule over the semiring reducts of A, and they also allow a very general and simple definition of a transform having the additional properties of being a semimodule homomorphism and a residuated map (Theorems 22 and 23).

The main topic of this work, the Lukasiewicz transform, is defined by means of a partition of the unit of the MV-algebra [0, 1][0,1] . It turns out that it is also a lattice-based fuzzy transform, according to the definition given in [18].

Such algebraic tools allow us to define a new algorithm for image processing – called Lukasiewicz Transform Based – that yields promising results and can be an object of further studies and developments.

Furthermore we see that the maps attached to the pair compression/reconstruction are well coupled as mathematical objects, since they yield an adjoint pair. 2

2

Preliminary notes

Since many of our results are concerned with the theory of semimodules over semirings, according to [7], we will now recall some basic definitions. Definition 1 A semiring is an algebraic structure (S, +, ·, 0, 1), with two internal binary operations, + and ·, and two constants 0, 1 ∈ S such that (S1) (S2) (S3) (S4)

(S, +, 0) is a commutative monoid; (S, ·, 1) is a monoid; x · (y + z) = xy + xz and (x + y) · z = xz + yz for all x, y, z ∈ S; 0x = x0 = 0 for all x ∈ S.

A semiring is said to be commutative iff the commutative property holds for the multiplication too. We will consider only non-trivial semirings, i. e. semirings such that 0 6= 1. Definition 2 Let S be a semiring. A left S-semimodule is a commutative monoid (M, +M , 0M ) with an external operation, called scalar multiplication, with coefficients in S • : (s, m) ∈ S × M 7−→ s • m ∈ M, satisfying, for all s, s0 ∈ S and m, m0 ∈ M , the following conditions: (M 1) (M 2) (M 3) (M 4) (M 5)

(ss0 ) • m = s • (s0 • m); s • (m +M m0 ) = s • m +M s • m0 ; (s + s0 ) • m = s • m +M s0 • m; 1 • m = m; s • 0M = 0M = 0 • m.

The definition of right S-semimodule is analogous. If S and S 0 are semirings and M is both a left S-semimodule and a right S 0 -semimodule, M will be called an (S, S 0 )-bisemimodule iff it satisfies the following additional condition: (M 6) (s •S m) •S 0 s0 = s •S (m •S 0 s0 ), for all s ∈ S, s0 ∈ S 0 and m ∈ M , where •S and •S 0 mean the external products with scalars in S and in S 0 respectively. In particular, if S is commutative, any left or right S-semimodule is an (S, S)-bisemimodule and we will call it, shortly, an S-bisemimodule. Note that we will always omit the “•” symbol when there will not be any danger of confusion. 3

Throughout this section S will denote the semiring (S, +, ·, 0, 1), and M = (M, +M , 0M ) will be a left semimodule over S. Obviously all the following definitions and results hold both for right and left S-semimodules. Definition 3 Let X be a subset of M and let us give the following definitions. (i) A linear combination of elements of X is a sum

P

f (x)x, where f :

x∈X

X −→ S is a map such that the set {x ∈ X | f (x) 6= 0} (the so called P f (x)x we will always mean “ support” of f ) is finite. By the notation x∈X

linear combinations, i. e. sums where all but a finite number of summands are equal to zero. (ii) Substructures generated by a subset are defined as usual: the subsemimodule generated by X, denoted by hXi, is the intersection of all subsemimodules of M containing X, and it coincides with the set of all the linear combinations of elements of X. (iii) If M is finitely generated, the rank of M is the minimum number n ∈ N such that there exists a set of generators X of M with |X| = n. P (iv) X is linearly independent iff, given two linear combinations f (x)x x∈X

and

P

g(x)x, from

x∈X

P

P

f (x)x =

x∈X

g(x)x it follows that f = g.

x∈X

(v) X will be called linearly dependent if it isn’t linearly independent, i. e. X is linearly dependent iff there exist two functions f 6= g : X −→ S such P P that f (x)x = g(x)x and the supports of f and g are both finite. x∈X

x∈X

(vi) A basis for M over S is a linearly independent set of generators for M over S. (vii) An S-semimodule is called free iff it has a basis over S. Definition 4 Assume M to be a free left semimodule over S. We say that M has dimension n, or that it is n-dimensional, with n ∈ N, iff for each basis B of M over S, |B| = n. In this case we will write dimS M = n. Lemma 5 Let M be a free left S-semimodule, and let X ⊆ M be a basis for M over S. Then, for all y ∈ M \ X, X ∪ {y} is linearly dependent. Moreover, if Y is a set of generators with Y ⊆ X, then X = Y . PROOF. Since hXi = M , there exists a map f : X −→ S, with finite P support, such that f (x)x = y. So let f˜, g : X ∪ {y} −→ S be the maps x∈X

defined by f˜(x) = f (x) f˜(y) = 0,

for all x ∈ X,

and 4

g(x) = 0 g(y) = 1.

for all x ∈ X,

It is clear that both f˜ and g have finite support, and we also have the identity P P f˜(z)z = g(z)z, but f˜ 6= g. z∈X∪{y}

z∈X∪{y}

The second part of the lemma follows immediately from the definitions. Theorem 6 Let M = (M, +, 0) be a free left semimodule over S, and suppose that X is an infinite basis for M . Then, if Y is a basis for M over S, X and Y are equipotent. PROOF. Since X is a set of generators, for all y ∈ Y , there exists a finite S subset Xy of X such that y ∈ hXy i; hence Y ⊆ h Xy i, so M = hY i = y∈Y

h

S

Xy i.

y∈Y

It follows that

S

Xy (⊆ X) is a set of generators for M and, by Lemma 5,

y∈Y

S

X =

y∈Y

Xy ; so we have |X| =

S y∈Y

Xy

≤ |Y |, by a classical set-theoretical

result. The proof for the inverse inequality is completely analogous. Corollary 7 Let M be a free left S-semimodule having a finite basis B over S. Then all the bases of M over S are finite.

3

MV-semimodules and Lukasiewicz semimodules

In this section we will treat semiring and semimodule structures defined on complete MV-algebras by means of their operations and their lattice structure. We refer to [1] for all the basic notions and results about MV-algebras. Definition 8 Let A = (A, ⊕, ,∗ , 0, 1) be a complete MV-algebra, and X be a non-empty set. Then AX = (AX , ⊕, ,∗ , 0, 1) is a complete MV-algebra with operations defined pointwise. By [3], for any MV-algebra A it is possible to define two different semirings: L∧ = (A, ∧, ⊕, 1, 0) and L∨ = (A, ∨, , 0, 1), called the semiring reducts of A. Moreover the monoid M = (AX , ∨, 0) is a bisemimodule over both L∧ and L∨ , with scalar multiplications defined respectively as af = a∗ f and af = a f , for all a ∈ A and f ∈ AX . Analogously (An , ∨, 0) is a bisemimodule over L∧ 5

and L∨ , for any n ∈ N. We will call M an MV-L∧ -semimodule (respectively: MV-L∨ -semimodule) over A. If A is an MV-chain, the MV-semimodules over it will be called Lukasiewicz L∧ -semimodule and Lukasiewicz L∨ -semimodule respectively. Lemma 9 Let A be a non-trivial MV-algebra, and let L∧ and L∨ be the semiring reducts of A. Then M = (A, ∨, 0) is a 1-dimensional free bisemimodule over L∧ and L∨ . Moreover there exists exactly one basis for M, in both cases. PROOF. It is trivial to prove that B = {1} is a basis for M over both L∧ and L∨ . It is also clear that {0} is a linearly dependent set (anyway it does not generate M). Consider M as L∧ -bisemimodule and let x ∈ A \ {0, 1}. If we set f : x ∈ {x} 7−→ x ∈ A

and

g : x ∈ {x} 7−→ 1 ∈ A,

we have f (x)x = x∗ x = 0 = 0 x = g(x)x, so f (x)x = g(x)x but f 6= g. Hence {x} is linearly dependent, for all x ∈ A \ {1}, and this fact also implies – by Lemma 5 – that X is linearly dependent for any subset X of A containing at least one element 6= 1. It follows the thesis for the L∧ -bisemimodule M. The proof for the L∨ -bisemimodule is analogous if we set f : x ∈ {x} 7−→ x∗ ∈ A

and

g : x ∈ {x} 7−→ 0 ∈ A.

Proposition 10 Let A = (A, ⊕, ,∗ , 0, 1) be an MV-algebra, and X be a non-empty set with cardinality κ. Then the monoids (AX , ∨, 0) and (Aκ , ∨, 0) – where ∨ is defined pointwise, as usual – are isomorphic. Moreover they are isomorphic as bisemimodules over L∧ and L∨ too. PROOF. Let ι : κ −→ X be a bijective map, and let α : f ∈ AX 7−→ fι = f ◦ ι ∈ Aκ . It is easy to prove, by direct inspection, that α is both a monoid and a semimodule isomorphism. Theorem 11 Let A be a non-trivial MV-chain and let n ∈ N. Then M = (An , ∨, 0) is an n-dimensional free bisemimodule over L∧ and L∨ . Moreover there exists exactly one basis for M, in both cases. 6

PROOF. We will prove the proposition for M as an L∨ -semimodule. The other case is analogous. n i Let E = {ei }n−1 i=0 ⊆ A , where e denotes the vector having all components equal to 0 except the i-th that is equal to 1.

It is easy to see that E is a set of generators for An . Moreover, if f : E −→ A and g : E −→ A are maps such that

n−1 W

f (ei ) ei =

n−1 W

i=0 n−1 _

  i

i

f e e =

i=0

and

n−1 _

n−1 _ 

g (ei ) ei , we will have:

i=0

 



 

 



 





f ei ei = f e0 , . . . , f en−1



i=0

 

g ei ei =

i=0

n−1 _ 





g ei ei = g e0 , . . . , g en−1



,

i=0

hence f = g. It follows that E is linearly independent and it is a basis for An . Thus, by Corollary 7, all bases of An are finite. Let now m ∈ N and

X = {x1 , . . . , xm } be an arbitrary subset of An of order m. Let us suppose that there exist some of these vectors with at least one component belonging to A \ {0, 1}, and let us call Y the set of such vectors and K the set of all the components – of the vectors in Y – unequal to 0 and 1. Since A is a chain, we have that W z = K ∈ K. So let us set: f : X −→ A defined by f (x) = z ∗ ,

for all x ∈ Y

and

f (x) = 0 for all x ∈ X \ Y,

and g : X −→ A defined by g(x) = 0, for all x ∈ X. Since x ≤ z for all x ∈ K, from the definition of the lattice order in MValgebras, we get immediately _

f (x)x = 0 =

x∈X

_

g(x)x,

x∈X

but f 6= g since z ∗ 6= 0. It follows that any subset X of An containing a vector with at least one component different from 0 and 1 is linearly dependent, therefore any basis of An must be a subset of {0, 1}n . 7

It is very easy also to prove that any X ⊆ An containing the zero vector 0 is linearly dependent. The last step of the proof is to show that, if X ⊆ {0, 1}n is a basis for M, then E = X. Since X is a set of generators for M, for each i ≤ n − 1 there exists a map f : X −→ A such that _ x∈X

f (x)x =

_

f (x) x = ei ,

x∈X

but 0 ∨ 1 = 1 and a b = 1 iff a = b = 1, for all a, b ∈ {0, 1}. n−1 n So, for all x = (xi )n−1 i=0 , y = (yi )i=0 ∈ {0, 1} , we get

x ∨ y = ei

iff

xj = yj = 0 ∀j 6= i and xi ∨ yi = 1,

whence ei ∈ X for all i ≤ n, i. e. E ⊆ X. Then, by Lemma 5, X = E and the proof is now complete. Remark 12 Actually all the previous results are true for the trivial MValgebra {0, 1} too, but they should be proved differently. Thus we decided to omit this case since it is not very interesting – at least for our purposes – and the proofs are quite trivial. Theorem 13 Let A = (A, ⊕, ,∗ , 0, 1) be an MV-chain and n ∈ N. Then, up to isomorphisms, (An , ∨, 0) is the unique Lukasiewicz n-dimensional free bisemimodule over L∧ (respectively: over L∨ ). Moreover it has exactly one basis over both L∧ and L∨ .

PROOF. It follows from Lemma 9, Proposition 10 and Theorems 6 and 11.

4

Residuated maps and the Lukasiewicz transform

In this section we will introduce the Lukasiewicz transform as a residuated map and a homomorphism between semimodules over the semiring reducts of the MV-algebra [0, 1]. From another point of view we can also see that the Lukasiewicz transform is a lattice-based fuzzy transform with respect to triangular fuzzy sets (see [18]). In [1] the authors define a functor Γ between the category of lattice ordered Abelian groups with a strong unit u and the one of MV-algebras. 8

Definition 14 Let A = Γ (hG, +, ui) be an MV-algebra. A finite sequence of elements of A, (a0 , . . . , an−1 ) is a partition of the unit if a0 + · · · + an−1 = u. In [4] the authors define a critically separating class of formulas S = {πba | a ∈ N, b ∈ Z}, of one variable v, in Lukasiewicz logic. In order to simplify the notations, let us assume (as in [4]) the following stipulations: for every formulas φ and ψ we set, as usual, φ ⊕ ψ := ¬φ → ψ and φ ψ := ¬(φ → ¬ψ). Moreover from the above notations, for every positive integer a, we set a.φ := φ ⊕ . . . ⊕ φ. |

{z

atimes

}

Let a ∈ N and b ∈ Z and set: if b < 0, then πba (v) = v ⊕ ¬v; if b ≥ a, then πba (v) = v ¬v; if 0 ≤ b ≤ a − 1, then: π0a (v) = a.v, L π1a (v) = a−1 i=1 F0i (v), ... L πba (v) = a−1 i=b F0,1,...,b−1,i (v), ... a (v) = F0,1,...,a−2,a−1 (v), πa−1 with F0,1,...,b−1,i (v) defined as: for every integer i > 0, F0,i (v) = v i.v, for every integer i > 1, F0,1,i (v) = (F0,1 (v) ⊕ · · · ⊕ F0,i−1 (v)) F0,i (v), and, by induction, for every integer i such that i > b, F0,1,...,b,i (v) = (F0,1,...,b−1,b (v) ⊕ · · · ⊕ F0,1,...,b−1,i−1 (v)) F0,1,...,b−1,i (v). Now let us denote by fπba (v) the McNaughton functions corresponding to the formulas in S; then, if we fix n ∈ N (n > 1) and set ∗



pk (x) = fπn−1 (v) (x) ∧ fπn−1 (v) (x) k−1

k

,

k = 0, . . . , n − 1,

we get a sequence of functions (p0 , . . . , pn−1 ) in [0, 1][0,1] . In analytical form we have p0 (x) =

 −(n − 1)x + 1 0

9

if 0 ≤ x ≤ otherwise

1 n−1

,

(1)

pn−1 (x) =

 (n − 1)x − (n − 2) 0

if n−2 ≤x≤1 n−1 otherwise

(2)

and, for k = 1, . . . , n − 2,    (n − 1)x − (k

k−1 ≤x≤ − 1) if n−1 k pk (x) = −(n − 1)x + k + 1 if n−1 ≤ x ≤    0 otherwise

k n−1 k+1 n−1

.

(3)

Moreover (p0 , . . . , pn−1 ) bears a partition of the interval [0, 1] by the nodes k x0 , x1 , . . . , xn−1 , where xk = n−1 for all k < n. Remark 15 Let us fix an index k < n. The following hold: (i) if x = xk , then pk (x) = 1 and ph (x) = 0, for h 6= k; (ii) if k > 0 and xk−1 < x < xk , then p∗k−1 (x) = pk (x) 6= 0, 1, and ph (x) = 0 for h 6= k − 1, k; (iii) for any x ∈ [0, 1],

n−1 P

pk (x) = 1, then p0 + . . . + pn−1 = 1.

k=0

Let us recall that the MV-algebra [0, 1][0,1] is the image, by the functor Γ, of the lattice ordered Abelian group with strong unit hR[0,1] , +, 1i, where 1 is the map constantly equal to 1 and + is defined pointwise. Proposition 16 The sequence (p0 , . . . , pn−1 ) is a partition of the unit in the MV-algebra [0, 1][0,1] , having the property pk ph = 0 for k 6= h. Moreover it is a fuzzy partition of the real unit interval (see [18]).

PROOF. See the above remark.

According to [2], we set the following Definition 17 Let (X, ≤) and (Y, ≤) be two ordered sets. A map h : X −→ Y is said to be residuated if it is isotone and, for all y ∈ Y , the set {x ∈ X : h(x) ≤ y} admits the greatest element, denoted by h] (y). The map h] : Y −→ X is called the residuum, or the residual map, of h, and the pair (h, h] ) is said to be adjoint. Generally (see subsection 2.2 of [2]), for a residuated map h : X −→ Y , the residuum h] : Y −→ X is the unique isotone map that satisfies both conditions h ◦ h] ≤ IY 10

(4)

and h] ◦ h ≥ IX ,

(5)

where IX , IY are the identity maps. Definition 18 Let (X, ≤) be an ordered set. A function γ : X −→ X is called a closure operator over X iff it satisfies (i) γ is order preserving, (ii) x ≤ γ(x) for all x ∈ X, (iii) γ(γ(x)) = γ(x), for all x ∈ X. Definition 19 Let (X, ≤) be an ordered set. A function δ : X −→ X is called a coclosure operator over X, or an interior operator, iff it satisfies (i) δ is order preserving, (ii) δ(x) ≤ x for all x ∈ X, (iii) δ(δ(x)) = δ(x), for all x ∈ X. Let S be a semiring and let M = (M, +, 0) be an S-semimodule; furthermore, let X be a non-empty set and n ∈ N. We know that both (M X , +, 0) and (M n , +, 0) are S-semimodules with operations defined pointwise. We set the following Definition 20 We call semimodule transform of order n a homomorphism Hn : M X −→ M n such that there exists a map Λn : M n −→ M X having the following properties: T1) Hn ◦ Λn ◦ Hn = Hn , T2) Λn ◦ Hn ◦ Λn = Λn . We recall that, if A = (A, ⊕, ,∗ , 0, 1) is a complete MV-algebra and X is a non-empty set, (AX , ∨, 0) has two bisemimodules’ structures (over L∧ and L∨ ) shown in Definition 8. Definition 21 Let us consider the MV-algebra A = ([0, 1], ⊕, ,∗ , 0, 1), and set X = [0, 1]. Thus AX is the set of all functions from [0, 1] to [0, 1], An is the set of all the n-vectors valued on [0, 1] and L∧ is the semiring reduct ([0, 1], ∧, ⊕, 1, 0). We call fuzzy transform in Lukasiewicz algebra – for short: Lukasiewicz transform – the operator n−1



Hn : f ∈ [0, 1][0,1] 7−→ 

_

x∈[0,1]

11

∈ [0, 1]n ,

f (x) pk (x) k=0

(6)

where p0 , . . . , pn−1 is the partition of the unit defined by (1–3). Let us now define the Lukasiewicz inverse transform as the map: n

Λn : v = (v0 , . . . , vn−1 ) ∈ [0, 1]

n−1 _

7−→

!∗

vk∗

pk

∈ [0, 1][0,1] .

(7)

k=0

In a certain sense, we can say that the vector Hn (f ) represents the components of f with respect to the “frame” (p0 , . . . , pn−1 ). On the other hand Λn tells us the way to linearly perform the elements of the system (p0 , . . . , pn−1 ) by the n-tuple of scalars (v0 , . . . , vn−1 ). Indeed let us consider the sequence (p0 , . . . , pn−1 ). It is easy to verify that Hn (pk ) = ek (the basic vectors introduced in Theorem 11) and pk = Λn (ek ), for all k < n. Theorem 22 Hn is a Lukasiewicz L∧ -semimodule homomorphism.

PROOF. First of all let us observe that, obviously, Hn (0) = (0, . . . , 0). {z

|

n

}

Let now f, g ∈ [0, 1][0,1] , a, b ∈ [0, 1], and let us calculate Hn (af ∨ bg). For all k ∈ {0, . . . , n − 1} we have: [Hn (af ∨ bg)]k =

_

((af (x) ∨ bg(x)) pk (x))

x∈[0,1]

=

_

(af (x) pk (x) ∨ bg(x) pk (x))

x∈[0,1]



=

 _

af (x) pk (x) ∨ 

_

bg(x) pk (x)

x∈[0,1]

x∈[0,1]



=









x∈[0,1]



a∗ (f (x) pk (x)) ∨ 

_

 _

b∗ (g(x) pk (x))

x∈[0,1]



= a∗ 

 _





f (x) pk (x) ∨ b∗ 

x∈[0,1] ∗

(b∗ g(x)) pk (x)



x∈[0,1]



_

x∈[0,1]



=



(a∗ f (x)) pk (x) ∨ 

_

 _ x∈[0,1]



= a [Hn (f )]k ∨ b [Hn (g)]k . 12

g(x) pk (x)

Then Hn (af ∨ bg) = aHn (f ) ∨ bHn (g) for all f, g ∈ [0, 1][0,1] and a, b ∈ [0, 1], whence Hn is a homomorphism. Since, by [2], for any adjoint pair (h, h] ) hold both h ◦ h] ◦ h = h

(8)

and h] ◦ h ◦ h] = h] , (9) from Theorem 23 – where we will prove that (Hn , Λn ) is an adjoint pair – it will follow that Hn is also a semimodule transform of order n. Theorem 23 The map Hn is residuated and Λn is its residual map. Moreover we have Hn ◦ Λn = I[0,1]n . PROOF. It is easy to see that Hn is a residuated map; indeed it can be WJ proved either by direct inspection or by observing that it is defined as a - composition and applying, in a suitable way, some results of [2]. By the way, for the sake of a better readability, we will prove it explicitly. We will prove first that (Hn , Λn ) is an adjoint pair by showing that, for this pair, (4) and (5) hold. It is easy to see that both Hn and Λn are isotone; so let f ∈ [0, 1][0,1] and v = (v0 , . . . , vn−1 ) ∈ [0, 1]n . Then we have: Hn (f ) ≤ v ⇐⇒ [Hn (f )]k ≤ vk ∀k ∈ {0, . . . , n − 1} _

f (x) pk (x) ≤ vk

⇐⇒

∀k ∈ {0, . . . , n − 1}

⇐⇒

x∈[0,1]

f (x) pk (x) ≤ vk f (x) ≤ p∗k (x) ⊕ vk f (x) ≤ f (x) ≤

n−1 ^

∀x ∈ [0, 1], ∀k ∈ {0, . . . , n − 1} ⇐⇒ ∀x ∈ [0, 1], ∀k ∈ {0, . . . , n − 1} ⇐⇒

vk ⊕ p∗k (x) ∀x ∈ X

k=0 n−1 _

⇐⇒

!∗

vk∗

pk (x)

= Λn (v)(x) ∀x ∈ X

⇐⇒

k=0

f ≤ Λn (v). Hence Hn (f ) ≤ v ⇐⇒ f ≤ Λn (v); thus, by setting alternatively v = Hn (f ) and f = Λn (v), we get respectively the (5) and the (4): Hn ◦ Λn ≤ I[0,1]n 13

(10)

and Λn ◦ Hn ≥ I[0,1][0,1] .

(11)

The following step completes the proof. Let i be a fixed index in {0, . . . , n − 1}; by Remark 15, pi 



i n−1



= 1 and



i pk n−1 = 0 for all k 6= i. Let us now consider the i-th component of the vector (Hn ◦ Λn )(v0 , . . . , vn−1 ). It is:



n−1 _

_

n−1 ^



x∈[0,1]

k=0

k=0

x∈[0,1]



n−1 ^

!

vk ⊕ pk (x)

vk ⊕ pk



k=0

i n−1

∗ !

i n−1

∗



=



pi (x)



=

!∗

vk∗ pk (x)

_

n−1 ^

 

v k ⊕ pk

k=0 k6=i



!

pi (x) pi



i n−1



   pi



i i ∧ vi ∧ pi n−1 n−1 





= 1 ∧ vi ∧ 1 = vi . Such inequalities hold for every index i, whence Hn ◦ Λn ≥ I[0,1]n .

(12)

Therefore (10) and (12) yield Hn ◦ Λn = I[0,1]n . Corollary 24 Λn ◦ Hn is a closure operator over [0, 1][0,1] and Hn ◦ Λn is a coclosure operator over [0, 1]n . PROOF. The thesis follows directly from the definition of residuated map and the formulas (8) and (9).

5

Compression method as semimodule homomorphism

The results of this section prove that the Lukasiewicz semiring and semimodule structures form a correct algebraic framework where the method proposed in [13] can be studied, mainly from a theoretical point of view, and improved. 14

Definition 25 Let X and Y be nonempty sets. We call a picture on X × Y a fuzzy relation R defined on X × Y : it is R ∈ [0, 1]X×Y . Definition 26 Let X be a nonempty set. We call a coder of X a fuzzy set A defined on X. It is A ∈ [0, 1]X . In [13] the authors define the compression of a picture R(x, y) in a picture G(i, j) by:

G(i, j) = max{Bj (y)t max{Ai (x)tR(x, y)}}, y∈Y

x∈X

(13)

where t is a continuous t-norm, while {Ai }i∈I and {Bj }j∈J are families of coders with indices in the nonempty sets I and J respectively. Analogously they define the reconstruction phenomenon. In the above sections we saw that the structure ([0, 1]X×Y , ∨, 0) is an L∧ semimodule. Now, given the nonempty sets X, Y, I and J, we can fix two coders – A and B – of I × X and Y × J respectively; then we see that the formula (13), can be rewritten, in the case where t is the Lukasiewicz t-norm, as follows: ! _

G(i, j) =

_

B(y, j)

y∈Y

A(i, x) R(x, y) .

(14)

x∈X

It is easy to see that Theorem 22 can be applied to (14), hence we have that such a compression process is a composition of two semimodule homomorphisms, thus a semimodule homomorphism itself. More precisely, the following results hold. Theorem 27 The maps C1 : R(x, y) ∈ [0, 1]X×Y 7−→

_

A(i, x) R(x, y) ∈ [0, 1]I×Y

x∈X

and C2 : P (i, y) ∈ [0, 1]I×Y 7−→

_

P (i, y) B(y, j) ∈ [0, 1]I×J

y∈Y ∧

are L -semimodule homomorphisms. It follows that the map C2 ◦ C1 is a L∧ -semimodule homomorphism from [0, 1]X×Y to [0, 1]I×J . Corollary 28 The compression (14) is a homomorphism defined on the semimodule of the pictures on X × Y ranging on the semimodule of the pictures on I × J.

15

6

The Lukasiewicz Transform Based (LTB) algorithm for image processing

The Lukasiewicz transform has been defined for functions f : [0, 1] −→ [0, 1]; then the first step of its application to image processing consists of “adapting” the image to the domain of our operator. In other words, each image (i. e. each fuzzy matrix) must be seen as a [0, 1]-valued function defined on (a subset of) [0, 1]. Let us consider a m × n fuzzy matrix X = (xij ), where i = 0, . . . , m − 1, and j = 0, . . . n − 1. It is easy to see that we can rewrite X as a m · n vector (x00 , . . . , x0mn−1 ) by setting, for all k = 0, . . . , mn − 1, x0k = xq(k,n)r(k,n) , where q(k, n) and r(k, n) are, respectively, the quotient and the remainder of the euclidean division k/n. Then we set (

DX =

)

k | k = 0, . . . , mn − 1 ⊂ [0, 1], mn − 1

so we can apply the Lukasiewicz transform to the matrix X rewritten as the map k ∈ DX 7−→ x0k ∈ [0, 1]. (15) fX : mn − 1 Every grey (respectively: RGB colour) image we process is treated as a fuzzy matrix (resp.: three fuzzy matrices, one for each colour), and each matrix is divided in blocks. After these preliminary operations, we apply the Lukasiewicz transform to each block separately.

7

Applying LTB algorithm to grey and RGB colour images

In order to test the method above, we have extracted and processed several images from [19]: the grey images Bridge and Testpat.1k, and the RGB colour ones Mandrill, Lena, Peppers and Redhead. We tested three processes of compression/decompression; in these processes we have divided the fuzzy matrix (or matrices, in case of RGB images) associated to the images in square blocks of sizes mb × nb = 2 × 2, 8 × 8 and 4 × 4, respectively compressed to blocks of sizes hb × kb = 2 × 1, 5 × 5 and 2 × 2 by means of the formulas (15) and (6). The respective compression rates are obviously ρ = (2 × 2)/(2 × 1) = 0.5, ρ = (8 × 8)/(5 × 5) ≈ 0.39 and ρ = (4 × 4)/(2 × 2) = 0.25. The blocks 16

we obtained have been afterwards decompressed to blocks of the respective original sizes, using the formula (7), hence recomposed by giving the images shown below. In Figs. 2, 3 and 7, 8 we show some visual results for Bridge of Fig. 1 and Mandrill of Fig. 6, compared with JPEG compressions of the same ratios (Figs. 4, 5 and 9, 10 respectively). Numerical results – namely: Peak Signal to Noise Ratio and Root Mean Square Error – for all of the images we tested are in Tables 1–3. In Table 4, we show the values of LTB algorithm execution time, compared with JPEG execution time for the same compression ratios. Table 1 Numerical values for grey and RGB colour images (ρ = 0.5) JPEG

LTB

JPEG

LTB

RMSE

RMSE

PSNR

PSNR

Bridge

2.4985

58.4469

40.1773

12.7956

Testpat.1k

0.0833

61.1921

69.7131

12.3969

Lena

2.2606

53.1803

41.0464

13.6158

Mandrill

6.4739

55.8967

31.9075

13.1831

Peppers

2.0813

56.7046

41.7641

13.0584

Redhead

0.4454

57.7974

55.1554

12.8926

Image

Table 2 Numerical values for grey and RGB colour images (ρ = 0.39) JPEG

LTB

JPEG

LTB

RMSE

RMSE

PSNR

PSNR

Bridge

3.6168

56.3420

36.9643

13.1141

Testpat.1k

0.0833

66.2213

69.7131

11.7108

Lena

2.2606

51.6195

41.0464

13.8745

Mandrill

6.5917

53.5997

31.7509

13.5476

Peppers

2.0813

55.8171

41.7641

13.1954

Redhead

0.4454

56.5130

55.1554

13.0878

Image

17

Fig. 1. Bridge

Fig. 2. Bridge compressed and reconstructed by LTB, ρ = 0.5

Fig. 4. Bridge compressed and reconstructed by JPEG, ρ = 0.5

Fig. 3. Bridge compressed and reconstructed by LTB, ρ = 0.25

Fig. 5. Bridge compressed and reconstructed by JPEG, ρ = 0.25

18

Fig. 6. Mandrill

Fig. 7. Mandrill compressed and reconstructed by LTB, ρ = 0.5

Fig. 9. Mandrill compressed and reconstructed by JPEG, ρ = 0.5

Fig. 8. Mandrill compressed and reconstructed by LTB, ρ = 0.25

Fig. 10. Mandrill compressed and reconstructed by JPEG, ρ = 0.25

19

Table 3 Numerical values for grey and RGB colour images (ρ = 0.25) JPEG

LTB

JPEG

LTB

RMSE

RMSE

PSNR

PSNR

Bridge

6.1120

68.3310

32.4071

11.4384

Testpat.1k

0.0833

74.2191

69.7131

10.7205

Lena

2.4819

61.6912

40.2351

12.3263

Mandrill

7.1230

65.7072

31.0775

11.7785

Peppers

2.1147

65.4880

41.6257

11.8076

Redhead

0.4454

67.0408

55.1554

11.6040

Image

8

8.1

Comparing JPEG and LTB algorithms

Computability

The coding/decoding algorithms are usually compared by means of their execution times and the values of some parameters (PSNR, RMSE, MSE). The comparison between the LTB algorithm and JPEG is heavily conditioned by their underlying implementation. Indeed in the compression/reconstruction process the computational time, for each block of sizes 8 × 8, is characterized by the execution of the inverse DCT/DCT. The standard implementation of DCT determines an asymptotic computational time, of the DCT on one block, that is O(m · n), where m and n are, respectively, the numbers of rows and columns of the block. If we process 8×8 blocks, the asymptotic time is not relevant anymore and it is more convenient to look at the number of operations executed. The standard implementation requires in general 1024 products and 896 sums for computing the DCT on a block of these sizes, but there exist several optimized DCT implementations (FastDCT et al., see for instance [11]) that reduce significantly these numbers. For example, the FastDCT proposed in [6] requires only 54 products, 464 sums and 6 arithmetical shifts, giving the same result. Furthermore we should add the time and operations required for other components of the application: quantization, downsampling and entropic encoding. If we set x = mb ·nb ·hb ·kb and y as the number of colour channels of the image (one for grey images, three for RGB images), the LTB algorithm computes, for 20

the compression of one block, x · y products, x · y sums, x · y comparisons and, at most, x·y assignments. If, for instance, we set mb = nb = 3, hb = kb = 2 and y = 3, then the whole compression algorithm requires – for each block – 108 products, 108 sums, 108 comparisons and at most 108 assignments. All these values can be still reduced by means of a suitable advanced implementation. It follows from these considerations that the LTB algorithm requires an execution time much shorter with respect to JPEG. Nevertheless the values in Tab. 4 show that the JPEG application used for our tests (FreeImage Library 3.8, in [20]) is faster for some images. This fact depends on the sampling scheme in blocks of sizes 8×8, that supports an optimization of JPEG’s implementations for several CPU architectures. This is in particular the case of all CPUs supporting MMX, SSE, SSE2, SSE3 and the ones with SIMD (Single Instructions Multiple Data) architecture, using a 64-bit sampling. On the other hand, the source code of our CoDec has been realized with simple C-like optimizations, since our purpose was just showing the feasibility of this approach and the possible results. So this comparison should be read by also considering the possibility of improving the application overworking SIMD architectures’ optimizations. Some improving techniques could be provided, for example, adopting a sampling scheme similar to the one adopted by the JPEG algorithm, i. e. a scheme enabling the algorithm to work on vectors whose size is a multiple of the length of the machine word. For instance, assuming a CPU with SSE support and 32-bit architecture, it could be mb = nb = 8, hb = kb = 4. This sampling where scheme would reduce the required x · y products and comparisons to x·y 4 – as we already stated – x = mb nb hb kb and y is the number of colour channels of the image. Table 4 Running times (in ms) JPEG

LTB

JPEG

LTB

JPEG

LTB

ρ = 0.5

ρ = 0.5

ρ = 0.39

ρ = 0.39

ρ = 0.25

ρ = 0.25

Bridge

80.98

41.85

51.68

290.81

43.64

59.19

Testpat.1k

150.47

123.30

82.13

4888.75

4211.14

181.17

Lena

184.40

98.68

173.47

1835.67

141.04

178.40

Mandrill

187.29

105.62

98.65

6287.89

113.55

4250.62

Peppers

150.61

85.96

92.95

1551.73

98.28

157.85

Redhead

98.33

132.97

93.53

2491.04

97.05

194.70

Image

21

8.2

Numerical indices

With regards to the numerical comparison between JPEG and LTB, even though there is still a consistent gap, the Theorem 24 proves that the LTB algorithm possesses an interesting property: unlike JPEG, an iterative application of the algorithm on the same image is lossy just for the first process and lossless for the subsequent ones. In other words, once we have compressed and reconstructed an image, we can apply the same process again, on the reconstructed image, obtaining exactly the same compressed and the same reconstructed images (with fixed sizes of the blocks). Moreover we must also underline that JPEG is composed of two parts, a lossy compression method and a lossless one, while the LTB is only lossy. This fact draw a possible direction for further studies.

9

Conclusion

In this work we propose a theoretical approach, in the framework of the theories of semimodules and MV-algebras, to the task of image compression. Making use of several tools, both algebraic and logical, we have defined an operator having good mathematical properties and an algorithmic process with interesting, though still improvable, concrete results. Furthermore the Lukasiewicz transform seems to be sufficiently “stable” to be applied to other tasks in the fields of data compression and data mining. In other words, for the Lukasiewicz transform, the properties of being a homomorphism and yielding – together with its inverse transform – an adjoint pair, make it a reliable and versatile tool. Potential extensions in the range of applications of the preceding results, as well as some optimization criteria for the applications of Lukasiewicz transform, can be easily anticipated and will motivate our future work in this area.

References

[1] Cignoli R.L.O., D’Ottaviano I.M.L, Mundici D., Algebraic Foundations of Many-valued Reasoning, Trends in Studia Logica, Kluwer, Dordrecht, 2000. [2] Cohen G., Gaubert S., Quadrat J.-P., Hahn-Banach Separation Theorem for Max-Plus Semimodules, pp. 325–334 in: J.-L. Menaldi, E. Rofman, A. Sulem (Eds.), Optimal Control and Partial Differential Equations, Proceedings of

22

Conference in honour of Professor Alain Bensoussan’s 60th birthday, Dec. 4-5 2000, Paris, published by IOS Press, Amsterdam, 2000. [3] Di Nola A., Gerla B., Algebras of Lukasiewicz’s logic and their semiring reducts, Idempotent mathematics and mathematical physics, 131–144, Contemp. Math., 377, Amer. Math. Soc., Providence, RI, 2005. [4] Di Nola A., Lettieri A., On Normal Forms in Lukasiewicz Logic, Arch. Math. Logic, 43, no. 6, 795–823, 2004. [5] Di Nola A., Sessa S., Pedrycz, W., Sanchez, E., Fuzzy relation equations and their applications to knowledge engineering, Kluwer, Dordrecht, 1989. [6] Feig E. and Winograd S., Fast algorithms for the discrete cosine transform, IEEE Trans. Signal Processing, 40, pp. 2174–2193, Sept. 1992. [7] Golan J. S., The theory of semirings with applications in mathematics and theoretical computer science, Longman Scientific and Technical, Harlow and Wiley, New York, 1992. [8] Hirota K., Kawamoto K., Nobuhara H., Yoshida S.I., On a lossy image compression/reconstruction method based on fuzzy relational equations, Iran. J. Fuzzy Syst., 1, 33–42, 2004. [9] Hirota K., Nobuhara H., Pedrycz W., Relational image compression: optimizations through the design of fuzzy coders and YUV color space, Soft Computing, 9, 471–479, 2005. [10] Hirota K., Pedrycz W.,Fuzzy relational compression, IEEE Trans. Syst. Man Cyber.–Part B, 29 (3), 407–415, 1999. [11] Hung A.C., T.H.-Y. Meng, A Comparison of fast DCT algorithms, Multimedia Systems, 2, no. 5, Dec 1994. [12] Kwak K.-C., Pedrycz W., Face Recognition Using Fuzzy Integral and Wavelet Decomposition Method, IEEE Trans. Syst. Man Cyber.–Part B, 34 (4), 1666– 1675, 2004. [13] Loia V., Sessa S., Fuzzy relation equations for coding/decoding processes of images and videos, Inform. Sci., 171, no. 1-3, 145–172, 2005. [14] Nachtegael M., Van der Weken D., Van De Ville D., Kerre E.E., Philips W., Lemahieu I., An overview of fuzzy and fuzzy-classical filters for noise reduction, Proceedings of the 10th FUZZ-IEEE Conference, 3–6, 2001. [15] Nobuhara H., Pedrycz W., Hirota K., A digital watermarking algorithm using image compression method based on fuzzy relational equations, IEEE Inter. Conference Fuzzy Syst., CD-ROM In: Proc Hawaii, 2002. [16] Nobuhara H., Pedrycz W., Hirota K., Fast solving method of fuzzy relational equations and its application to image compression/reconstruction, IEEE Trans. Fuzzy Syst., 8 (3), 325–334, 2000.

23

[17] Nobuhara H., Takama Y., Hirota K., Image compression/reconstruction based on various types of fuzzy relational equations, Trans. Inst. Electrical Eng. Japan, 121-C(6), 1102–1113, 2001. [18] Perfilieva I., Fuzzy Transforms: Theory and Applications, Fuzzy Sets and Systems, 157, 993–1023, 2006. [19] http://sampl.eng.ohio-state.edu/∼sampl/database.htm [20] http://freeimage.sourceforge.net

24

Suggest Documents