﻿ First Order Fuzzy Transform for Images Compression

Journal of Signal and Information Processing
Vol.08 No.03(2017), Article ID:78733,17 pages
10.4236/jsip.2017.83012

First Order Fuzzy Transform for Images Compression

Ferdinando Di Martino1, Salvatore Sessa2, Irina Perfilieva3

1Università degli Studi di Napoli Federico II, Dipartimento di Architettura, Napoli, Italy

2Università degli Studi di Napoli Federico II, Centro Interdipartimentale di Ricerca Calza Bini, Napoli, Italy

3University of Ostrava, Institute for Research and Applications of Fuzzy Modeling, Ostrava, Czech Republic

Received: May 16, 2017; Accepted: August 22, 2017; Published: August 25, 2017

ABSTRACT

In this paper, we present a new image compression method based on the direct and inverse F1-transform, a generalization of the concept of fuzzy transform. Under weak compression rates, this method improves the quality of the images with respect to the classical method based on the fuzzy transform.

Keywords:

Fuzzy Transform, Generalized Fuzzy Partition, Basic Function, Hilbert Space, Image Compression, PSNR

1. Introduction

We present a new image compression method based on the discrete direct and inverse F1-transform which is a generalization of the classical fuzzy transform [1] [2] identified as F0-transform (for brevity, F-transform).

The F-transform compression technique [3] is a lossy compression method used in image and video analysis [4] - [18] and in data analysis [19] - [25] as well. In [26] , the concept of the F-transform was extended to the cases with various types of fuzzy partitions. In [1] [27] , the Fs-transform (s ≥ 1), a generalization of the F-transform, was presented: in other terms, the constant components of the F-transform were replaced by polynomials in order to capture more information of the original function. In particular, the F1-transform was used for the edge detection problem [1] [2] . The aim of this paper is to improve the quality of the decoded images after their compression via the F1-transform-based method.

Strictly speaking, we divide images of sizes N × M into smaller images (called blocks) of sizes N(B) × M(B) and then we code each block into another one of sizes n(B) × m(B), where n(B) < N(B) and m(B) < M(B). The compression is performed by calculating the direct F1-transform components with first degree polynomials. Afterwards, we calculate the inverse F1-transform and obtain the corresponding decoded blocks, recomposed to obtain the final reconstructed image. In Figure 1, we describe this process in detail.

The compression rate is given by $\rho =\left(n\left(B\right)×m\left(B\right)\right)/\left(N\left(B\right)×M\left(B\right)\right)$ . The quality of a decoded image is measured by the Peak Signal to Noise Ratio (PSNR) index.

In Section 2, we recall the definition of h-uniform generalized fuzzy partition and the concept of F1-transform. In Section 3, a F1-transform-based compression method is presented and it is applied to images considered as fuzzy relations: there every image is partitioned into smaller blocks and the direct and inverse F1-transforms are calculated for each block. Then the decoded blocks are recomposed and the PSNR index is calculated. In Section 4, tests are applied to grey image datasets and the results are compared with similar results obtained by using the classical F-transform compression method. Section 5 contains the conclusions.

2. Generalized Fuzzy Partition and F1-Transform

We recall the main concepts [2] that will be used in the sequel. We consider a set of points (called nodes) ${x}_{0},{x}_{1},{x}_{2},\cdots ,{x}_{n},{x}_{n+1},n\ge 2$ of $\left[a,b\right]$ such that $a={x}_{0}\le {x}_{1}<{x}_{2}<\cdots <{x}_{n}\le {x}_{n+1}=b$ . We say that the fuzzy sets ${A}_{1},\cdots ,{A}_{n}:\left[a,b\right]\to \left[0,1\right]$ form a generalized fuzzy partition of $\left[a,b\right]$ , if for each $k=1,2,\cdots ,n$ , there exist ${{h}^{\prime }}_{k},{{h}^{″}}_{k}\ge 0$ such that ${{h}^{\prime }}_{k}+{{h}^{″}}_{k}>0$ , $\left[{x}_{k}-{{h}^{\prime }}_{k},{x}_{k}+{{h}^{″}}_{k}\right]\subseteq \left[a,b\right]$ and the following constraints hold:

Figure 1. The F1-transform image compression method.

1) (locality) ${A}_{k}\left(x\right)>0$ if $x\in \left[{x}_{k}-{{h}^{\prime }}_{k},{x}_{k}+{{h}^{″}}_{k}\right]$ and ${A}_{k}\left(x\right)=0$ if $x\notin \left[{x}_{k}-{{h}^{\prime }}_{k},{x}_{k}+{{h}^{″}}_{k}\right]$ ,

2) (continuity) Ak is continuous in $\left[{x}_{k}-{{h}^{\prime }}_{k},{x}_{k}+{{h}^{″}}_{k}\right]$ ,

3) (covering) for each $x\in \left[a,b\right]$ , $\sum _{k=1}^{n}{A}_{k}\left(x\right)>0$ .

The fuzzy sets $\left\{{A}_{1},\cdots ,{A}_{n}\right\}$ are called basic functions. If the nodes ${x}_{0},{x}_{1},\cdots ,{x}_{n},{x}_{n+1}$ are equidistant, i.e. ${x}_{k+1}-{x}_{k}=h$ for $k=0,1,2,\cdots ,n$ , where $h=\left(b-a\right)/\left(n+1\right)$ , if ${h}^{\prime }>h/2$ and the following additional properties hold:

4) ${{h}^{\prime }}_{1}={{h}^{″}}_{n}=0$ , ${{h}^{″}}_{1}={{h}^{\prime }}_{2}=\cdots ={{h}^{″}}_{n-1}={{h}^{\prime }}_{n}={h}^{\prime }$ and ${A}_{k}\left({x}_{k}-x\right)={A}_{k}\left({x}_{k}+x\right)$ for each $x\in \left[0,{h}^{\prime }\right]$ and $k=2,\cdots ,n$ ,

5) ${A}_{k}\left(x\right)={A}_{k-1}\left(x-h\right)$ and ${A}_{k+1}\left(x\right)={A}_{k}\left(x-h\right)$ for every $x\in \left[{x}_{k},{x}_{k+1}\right]$ and $k=2,\cdots ,n$ , then $\left\{{A}_{1},\cdots ,{A}_{n}\right\}$ is called an $\left(h,{h}^{\prime }\right)$ -uniform generalized fuzzy partition. In this case we can find a function ${A}_{0}:\left[-1,1\right]\to \left[0,1\right]$ , called generating function, which is assumed to be even, continuous and positive everywhere except on the boundaries, where it vanishes, in such a way we have that for $k=1,2,\cdots ,n$ :

${A}_{k}\left(x\right)=\left\{\begin{array}{l}{A}_{0}\left(\frac{x-{x}_{k}}{h}\right)\text{}x\in \left[{x}_{k}-h,{x}_{k}+h\right]\\ \text{0otherwise}\text{.}\end{array}$ (1)

If $h={h}^{\prime }$ , then the $\left(h,{h}^{\prime }\right)$ -uniform generalized fuzzy partition is said h-uniform generalized fuzzy partition. We can extend the notion of h-uniform generalized fuzzy partition from an interval to the rectangle $\left[a,b\right]×\left[c,d\right]$ , so that we have the family of basic functions $\left\{{A}_{k}×{B}_{l},k=1,\cdots ,n,l=1,\cdots ,m;n,m\ge 2\right\}$ , where ${A}_{k}×{B}_{l}$ is the product of the corresponding functions from the h1-uniform generalized fuzzy partition $\left\{{A}_{1},\cdots ,{A}_{n}\right\}$ of $\left[a,b\right]$ and from the h2-uniform generalized fuzzy partition $\left\{{B}_{1},\cdots ,{B}_{m}\right\}$ of $\left[c,d\right]$ . Then we can say that $\left\{{A}_{k}×{B}_{l},k=1,\cdots ,n,l=1,\cdots ,m;n,m\ge 2\right\}$ is an h-uniform generalized fuzzy partition of $\left[a,b\right]×\left[c,d\right]$ , where $h={h}_{1}\cdot {h}_{2}$ . In the sequel we consider only such h-uniform generalized fuzzy partitions.

Let ${A}_{k}\left(x\right)$ be a basic function of $\left[a,b\right]$ and ${L}_{2}\left({A}_{k}\right)$ be the Hilbert space of square integrable functions $f:\left[{x}_{k-1},{x}_{k+1}\right]\to R$ (reals) with weighted inner product:

${〈f,g〉}_{k}=\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}f\left(x\right)g\left(x\right){A}_{k}\left(x\right)\text{d}x$

Likewise, we define the Hilbert space ${L}_{2}\left({A}_{k}×{B}_{l}\right)$ of square integrable in two variables functions $f:\left[{x}_{k-1},{x}_{k+1}\right]×\left[{y}_{l-1},{y}_{l+1}\right]\to R$ with weighted inner product:

${〈f,g〉}_{kl}=\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}\underset{y{}_{l-1}}{\overset{{y}_{l+1}}{\int }}f\left(x\right)g\left(x\right){A}_{k}\left(x\right){B}_{l}\left(y\right)\text{d}x\text{d}y$ (2)

Two function $f,g\in {L}_{2}\left({A}_{k}×{B}_{l}\right)$ are orthogonal if ${〈f,g〉}_{kl}=0$ . Let ${L}_{2}^{p}\left({A}_{k}\right)$ and ${L}_{2}^{r}\left({B}_{l}\right)$ , $p,r\ge 0$ be two linear subspaces of ${L}_{2}\left({A}_{k}\right)$ and ${L}_{2}\left({B}_{l}\right)$ with orthogonal basis given by polynomials ${\left\{{P}_{k}^{i}\left(x\right)\right\}}_{i=0,\cdots ,p}$ and ${\left\{{Q}_{k}^{j}\left(y\right)\right\}}_{j=0,\cdots ,r}$ , respectively.

We consider an integer $s\ge 0$ and all pairs of integers (i, j) such that $0\le i+j\le s$ . We introduce a linear subspace ${L}_{2}^{s}\left({A}_{k}×{B}_{l}\right)$ of ${L}_{2}\left({A}_{k}×{B}_{l}\right)$ having as orthogonal basis the following:

${\left\{{S}_{kl}^{ij}\left(x,y\right)={P}_{k}^{i}\left(x\right){Q}_{l}^{j}\left(y\right)\right\}}_{i=0,\cdots ,p;\text{}j=0,\cdots ,r:i+j\le s}$ (3)

where s is the maximum degree of polynomials ${P}_{k}^{i}\left(x\right){Q}_{\text{l}}^{j}\left(y\right)$ . For s = 1, the orthogonal basis of the linear space ${L}_{2}^{1}\left({A}_{k}×{B}_{l}\right)$ is the following:

$\left\{{S}_{kl}^{00}\left(x,y\right)={P}_{k}^{0}\left(x\right){Q}_{\text{l}}^{0}\left(y\right),{S}_{kl}^{10}\left(x,y\right)={P}_{k}^{1}\left(x\right){Q}_{\text{l}}^{0}\left(y\right),{S}_{kl}^{01}\left(x,y\right)={P}_{k}^{0}\left(x\right){Q}_{\text{l}}^{1}\left(y\right)\right\}$ (4)

Let ${L}_{2}\left(\left[a,b\right]×\left[c,d\right]\right)$ be a set of functions $f:\left[a,b\right]×\left[c,d\right]\to R$ such that for $k=1,\cdots ,n$ , $l=1,\cdots ,m$ , $f|\left[{x}_{k-1},{x}_{k}{}_{+1}\right]×\left[{y}_{k-1},{y}_{k}{}_{+1}\right]\in {L}_{2}\left({A}_{k}\right)×{L}_{2}\left({B}_{l}\right)$ , where the function $f|\left[{x}_{k-1},{x}_{k}{}_{+1}\right]×\left[{y}_{k-1},{y}_{k}{}_{+1}\right]$ is the restriction of f on $\left[{x}_{k-1},{x}_{k+1}\right]×\left[{y}_{k-1},{y}_{k+1}\right]$ . Then the following theorem holds:

Theorem 1. ( [2] , lemma 5). Let $f\in {L}_{2}\left(\left[a,b\right]×\left[c,d\right]\right)$ . Then the orthogonal projection of $f$ on ${L}_{2}^{s}\left({A}_{k}×{B}_{l}\right)$ , $s\ge 0$ , is the polynomial of degree s given by

${F}_{kl}^{s}\left(x,y\right)=\sum _{0\le i+j\le s}{c}_{kl}^{ij}{S}_{kl}^{ij}\left(x,y\right)$ (5)

for every $\left(x,y\right)\in \left[a,b\right]×\left[c,d\right]$ , where the coefficients ${c}_{kl}^{ij}$ are given by

${c}_{kl}^{ij}=\frac{\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}f\left(x,y\right){S}_{kl}^{ij}\left(x,y\right){A}_{k}\left(x\right){B}_{l}\left(y\right)\text{d}x\text{d}y}{\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}{\left({S}_{kl}^{ij}\left(x,y\right)\right)}^{2}{A}_{k}\left(x\right){B}_{l}\left(y\right)\text{d}x\text{d}y}$ (6)

Following [2] , let $\left\{{A}_{k}×{B}_{l},k=1,\cdots ,n,l=1,\cdots ,m,n,m\ge 2\right\}$ be an h-uniform generalized fuzzy partition of $\left[a,b\right]×\left[c,d\right]$ and $f\in {L}_{2}\left({A}_{k}×{B}_{l}\right)$ . For s = 1, the orthogonal basis of the linear subspace ${L}_{2}^{1}\left({A}_{k}×{B}_{l}\right)$ is given by the polynomials:

$\begin{array}{l}{S}_{kl}^{00}\left(x,y\right)={P}_{k}^{0}\left(x\right){Q}_{l}^{0}\left(y\right)=1\\ {S}_{kl}^{10}\left(x,y\right)={P}_{k}^{1}\left(x\right){Q}_{l}^{0}\left(y\right)=x-{x}_{k}\\ {S}_{kl}^{01}\left(x,y\right)={P}_{k}^{0}\left(x\right){Q}_{l}^{1}\left(y\right)=y-{y}_{l}\end{array}$ (7)

Let ${F}_{kl}^{1}$ be the orthogonal projection of $f|\left[{x}_{k-1},{x}_{k}{}_{+1}\right]×\left[{y}_{k-1},{y}_{k}{}_{+1}\right]$ on ${L}_{2}^{1}\left({A}_{k}×{B}_{l}\right)$ given point wise as

${F}_{kl}^{1}\left(x,y\right)=\sum _{0\le i+j\le 1}{c}_{kl}^{ij}{S}_{kl}^{ij}\left(x,y\right)={c}_{kl}^{00}+{c}_{kl}^{10}\left(x-{x}_{k}\right)+{c}_{kl}^{01}\left(y-{y}_{l}\right)$ (8)

for every $\left(x,y\right)\in \left[a,b\right]×\left[c,d\right]$ , where the three coefficients ${c}_{kl}^{00},{c}_{kl}^{10},{c}_{kl}^{01}$ are defined by Theorem 1:

${c}_{kl}^{00}=\frac{\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}f\left(x,y\right){A}_{k}\left(x\right){B}_{l}\left(y\right)\text{d}x\text{d}y}{\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}{A}_{k}\left(x\right)\text{d}x\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}{B}_{l}\left(y\right)\text{d}y}$ (9)

${c}_{kl}^{10}=\frac{\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}f\left(x,y\right)\left(x-{x}_{k}\right){A}_{k}\left(x\right){B}_{l}\left(y\right)\text{d}x\text{d}y}{\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}{A}_{k}\left(x\right){\left(x-{x}_{k}\right)}^{2}\text{d}x\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}{B}_{l}\left(y\right)\text{d}y}$ (10)

${c}_{kl}^{01}=\frac{\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}f\left(x,y\right)\left(y-{y}_{l}\right){A}_{k}\left(x\right){B}_{l}\left(y\right)\text{d}x\text{d}y}{\underset{{x}_{k-1}}{\overset{{x}_{k+1}}{\int }}{A}_{k}\left(x\right)\text{d}x\underset{{y}_{l-1}}{\overset{{y}_{l+1}}{\int }}{B}_{l}\left(y\right){\left(y-{y}_{l}\right)}^{2}\text{d}y}$ (11)

Then the matrix ${F}_{nm}^{1}\left[f\right]=\left({F}_{11}^{1},\cdots ,{F}_{nm}^{1}\right)$ , defined from (8), is called F1-transform of the function $f\in {L}_{2}\left({A}_{k}×{B}_{l}\right)$ with respect to the h-uniform generalized fuzzy partition $\left\{{A}_{k}×{B}_{l},k=1,\cdots ,n,l=1,\cdots ,m;n,m\ge 2\right\}$ . We define the inverse F1-transform of the function $f\in {L}_{2}\left({A}_{k}×{B}_{l}\right)$ to be a function ${\stackrel{^}{f}}_{nm}^{1}:\left[a,b\right]×\left[c,d\right]\to R$ as

${\stackrel{^}{f}}_{nm}^{1}\left(x,y\right)=\frac{\sum _{k=1}^{n}\sum _{l=1}^{m}{F}_{nm}^{1}\left(x,y\right){A}_{k}\left(x\right){B}_{l}\left(y\right)}{\sum _{k=1}^{n}\sum _{l=1}^{m}{A}_{k}\left(x\right){B}_{l}\left(y\right)}$ (12)

For sake of completeness, we point out the utility of the concept of inverse F1-transform which stands in the approximation of the function $f\in {L}_{2}\left({A}_{k}×{B}_{l}\right)$ under certain suitable assumptions. For example, we have the following result:

Theorem 2. ( [2] , theorem 14). Let $\left\{\left({A}_{k}\left(x\right),{B}_{l}\left(y\right)\right),k=1,\cdots ,n,l=1,\cdots ,m,n,m\ge 2\right\}$ be an h-uniform generalized fuzzy partition of $\left[a,b\right]×\left[c,d\right]$ and ${\stackrel{^}{f}}_{nm}^{1}$ be the inverse F1-transform of $f$ with respect to this fuzzy partition. Moreover let $f$ be four times continuously differentiable on $\left[a,b\right]×\left[c,d\right]$ and Ak (resp., Bl) be four times continuously differentiable on $\left[a,b\right]$ (resp., $\left[c,d\right]$ ). Then the following holds for every $\left(x,y\right)\in \left[a,b\right]×\left[c,d\right]$ :

$f\left(x,y\right)-{\stackrel{^}{f}}_{nm}^{1}\left(x,y\right)=O\left({h}^{2}\right)$ (13)

In other words, the Equality (13) says that we can approximate a function in two variables, four times continuously differentiable on $\left[a,b\right]×\left[c,d\right]$ , with the inverse F1-transform (12) unless to O (h2).

3. F1-Transform Image Compression Method

We are interested to the case discrete, i.e. we consider functions in two variables which assume a finite number of values in $\left[0,1\right]$ like finite fuzzy relations. Indeed, let R be a grey image of sizes $N×M$ , $R:\left(i,\text{}j\right)\in \left\{1,\cdots ,N\right\}×\left\{1,\cdots ,M\right\}\to \left[0,1\right]$ , $R\left(i,j\right)={R}_{ij}$ being the normalized value of the pixel $P\left(i,j\right)$ , that is $R\left(i,j\right)=P\left(i,j\right)/{N}_{lev}$ if Nlev is the length of the grey scale. Let $\left\{{A}_{1},\cdots ,{A}_{n}\right\}$ and $\left\{{B}_{1},\cdots ,{B}_{m}\right\}$ be two h-uniform generalized fuzzy partitions of $\left[a,b\right]=\left[1,N\right]$ and $\left[c,d\right]=\left[1,M\right]$ , respectively, where $a=1$ , $b=N$ , ${x}_{k}=k,k=1,2,\cdots ,n,n\ll N$ , $c=1$ , $d=M$ , ${y}_{l}=l,l=1,2,\cdots ,m,m\ll M$ . Slightly modifying (8), then we can define the (discrete) F1-transform ${R}_{nm}^{1}={\left[{R}_{kl}^{1}\right]}_{n×m}$ of R the matrix whose entries are defined as

${R}_{kl}^{1}={c}_{kl}^{00}+{c}_{kl}^{10}\cdot |i-k|+{c}_{kl}^{01}|j-l|$ (14)

where ${c}_{kl}^{00}$ , ${c}_{kl}^{10}$ , ${c}_{kl}^{01}$ are given as (by rewriting the Equations (9), (10), (11) in the following form, slightly modified):

${c}_{kl}^{00}=\frac{\sum _{j=1}^{M}\sum _{i=1}^{N}{R}_{ij}{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{j=1}^{M}\sum _{i=1}^{N}{A}_{k}\left(i\right){B}_{l}\left(j\right)}$ (15)

${c}_{kl}^{10}=\frac{\sum _{j=1}^{M}\sum _{i=1}^{N}{R}_{ij}|i-k|{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{i=1}^{N}{A}_{k}\left(i\right){\left(i-k\right)}^{2}\sum _{j=1}^{M}{B}_{l}\left(j\right)}$ (16)

${c}_{kl}^{01}=\frac{\sum _{j=1}^{M}\sum _{i=1}^{N}{R}_{ij}|j-l|{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{i=1}^{N}{A}_{k}\left(i\right)\sum _{j=1}^{N}{B}_{l}\left(j\right){\left(j-l\right)}^{2}}$ (17)

The Formula (14) is considered as a compressed image of the original image R. ${R}_{nm}^{1}$ can be decoded by using the following inverse (discrete) F1-transform ${R}_{NM}^{1}={\left[{R}_{ij}^{1}\right]}_{N×M}$ defined for every $\left(i,\text{}j\right)\in \left\{1,\cdots ,N\right\}×\left\{1,\cdots ,M\right\}$ as

${R}_{ij}^{1}=\frac{\sum _{k=1}^{n}\sum _{l=1}^{m}{R}_{kl}^{1}{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{k=1}^{n}\sum _{l=1}^{m}{A}_{k}\left(i\right){B}_{l}\left(j\right)}$ (18)

We divide the image R of sizes $N×M$ in sub-matrices RB of sizes $N\left(B\right)×M\left(B\right)$ , called blocks ( [26] [28] ), each compressed to a block ${\left[{R}_{kl}^{1B}\right]}_{n\left(B\right)×m\left(B\right)}$ of sizes

$n\left(B\right)×m\left(B\right)$ $\left(3\le n\left(B\right) , $k=1,\cdots ,n\left(B\right)$ , $l=1,\cdots ,m\left(B\right)$ , via the discrete F1-transform, as Formula (14), of components ${R}_{kl}^{1B}$ given by

${R}_{kl}^{1B}={c}_{kl}^{00B}+{c}_{kl}^{10B}|i-k|+{c}_{kl}^{01B}|j-l|$ (19)

We rewrite (15), (16), (17) as

${c}_{kl}^{00B}=\frac{\sum _{j=1}^{M\left(B\right)}\sum _{i=1}^{N\left(B\right)}{R}_{ij}^{B}{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{j=1}^{M\left(B\right)}\sum _{i=1}^{N\left(B\right)}{A}_{k}\left(i\right){B}_{l}\left(j\right)}$ (20)

${c}_{kl}^{10B}=\frac{\sum _{j=1}^{M\left(B\right)}\sum _{i=1}^{N\left(B\right)}{R}_{ij}^{B}|i-k|{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{i=1}^{N\left(B\right)}{A}_{k}\left(i\right){\left(i-k\right)}^{2}\sum _{j=1}^{M\left(B\right)}{B}_{l}\left(j\right)}$ (21)

${c}_{kl}^{01B}=\frac{\sum _{j=1}^{M\left(B\right)}\sum _{i=1}^{N\left(B\right)}{R}_{ij}^{B}|j-l|{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{i=1}^{N\left(B\right)}{A}_{k}\left(i\right)\sum _{j=1}^{M\left(B\right)}{B}_{l}\left(j\right){\left(j-l\right)}^{2}}$ (22)

The basic functions $\left\{{A}_{1},\cdots ,{A}_{n\left(B\right)}\right\}$ and $\left\{{B}_{1},\cdots ,{B}_{m\left(B\right)}\right\}$ form an h-uniform generalized uniform fuzzy partition of $\left[1,N\left(B\right)\right]$ and $\left[1,M\left(B\right)\right]$ , respectively. They are generated by the basic functions ${A}_{0}\left(x\right)=0.5\left[1+\mathrm{cos}\left(\text{π}x\right)\right]$ and ${B}_{0}\left(y\right)=0.5\left[1+\mathrm{cos}\left(\text{π}y\right)\right]$ , respectively. Then we have that

$\begin{array}{l}{A}_{1}\left(x\right)=\left\{\begin{array}{l}0.5\left(1+\mathrm{cos}\frac{\text{π}}{{h}_{1}}\left(x-{x}_{1}\right)\right)\text{if}\text{\hspace{0.17em}}x\in \left[{x}_{1},{x}_{2}\right]\\ \text{0}\text{ }\text{otherwise}\end{array}\\ {A}_{k}\left(x\right)=\left\{\begin{array}{l}0.5\left(1+\mathrm{cos}\frac{\text{π}}{{h}_{1}}\left(x-{x}_{k}\right)\right)\text{if}\text{\hspace{0.17em}}x\in \left[{x}_{k-1},{x}_{k+1}\right]\\ \text{0otherwise}\end{array}\\ {A}_{n}\left(x\right)=\left\{\begin{array}{l}0.5\left(1+\mathrm{cos}\frac{\text{π}}{{h}_{1}}\left(x-{x}_{n}\right)\right)\text{if}\text{\hspace{0.17em}}x\in \left[{x}_{n-1},{x}_{n}\right]\\ \text{0otherwise}\end{array}\end{array}$ (23)

where $n=n\left(B\right)$ , ${h}_{1}=\left(N\left(B\right)-1\right)/\left(n-1\right)$ , ${x}_{k}=1+{h}_{1}\left(k-1\right),k=2,\cdots ,n-1$ and

$\begin{array}{l}{B}_{1}\left(y\right)=\left\{\begin{array}{l}0.5\left(1+\mathrm{cos}\frac{\text{π}}{{h}_{2}}\left(y-{y}_{1}\right)\right)\text{if}\text{\hspace{0.17em}}y\in \left[{y}_{1},{y}_{2}\right]\\ 0\text{otherwise}\end{array}\\ {B}_{l}\left(y\right)=\left\{\begin{array}{l}0.5\left(1+\mathrm{cos}\frac{\text{π}}{{h}_{2}}\left(y-{y}_{t}\right)\right)\text{if}\text{\hspace{0.17em}}y\in \left[{y}_{t-1},{y}_{t+1}\right]\\ \text{0otherwise}\end{array}\\ {B}_{m}\left(y\right)=\left\{\begin{array}{l}0.5\left(1+\mathrm{cos}\frac{\text{π}}{{h}_{2}}\left(y-{y}_{m}\right)\right)\text{if}\text{\hspace{0.17em}}y\in \left[{y}_{m-1},{y}_{m}\right]\\ \text{0otherwise}\end{array}\end{array}$ (24)

where $m=m\left(B\right)$ , ${h}_{2}=\left(M\left(B\right)-1\right)/\left(m-1\right)$ , ${y}_{l}=1+{h}_{2}\cdot \left(l-1\right)$ , $l=2,\cdots ,m-1$ . In Figure 2, we show the basic functions (23) for N = 16 and n = 4.

The compressed block ${\left[{R}_{kl}^{1B}\right]}_{n\left(B\right)×m\left(B\right)}$ is decoded to a block ${\left[{R}_{ij}^{1B}\right]}_{N\left(B\right)×M\left(B\right)}$

of sizes $N\left(B\right)×M\left(B\right)$ by using the inverse F1-transform defined for every $\left(i,\text{}j\right)\in \left\{1,\cdots ,{N}_{B}\right\}×\left\{1,\cdots ,{M}_{B}\right\}$ as

${R}_{ij}^{1B}=\frac{\sum _{k=1}^{n\left(B\right)}\sum _{l=1}^{m\left(B\right)}{R}_{kl}^{1B}{A}_{k}\left(i\right){B}_{l}\left(j\right)}{\sum _{k=1}^{n\left(B\right)}\sum _{l=1}^{m\left(B\right)}{A}_{k}\left(i\right){B}_{l}\left(j\right)}$ (25)

which approximates the original block RB. Making the union of all the decoded blocks R1B, we obtain a fuzzy relation (denoted with) R1 of sizes $N×M$ . Then we measure the RMSE (Root Mean Square Error) given by

Figure 2. Cosine basic functions (N = 16, n = 4)

$\text{RMSE}=\sqrt{\frac{\sum _{i=1}^{N}\sum _{j=1}^{M}{\left({R}_{ij}-{R}_{ij}^{1}\right)}^{2}}{N×M}}$ (26)

which implies that PSNR is the following:

$\text{PSNR}=20{\mathrm{log}}_{10}\frac{{N}_{lev}-1}{\text{RMSE}}$ (27)

4. Test Results

We compare our method with the classical F-transform compression method, but here no comparison is made with the one inspired to the Canny method used in [2] .

For our tests we have considered the CVG-UGR image database extracting grey images of sizes 256 × 256 (cfr., http://decsai.ugr.es/cvg/dbimagenes/). For brevity, we only give the results for three images as Lena, Einstein and Leopard whose sources are given in Figures 3(a)-(c), respectively.

In Table 1, we show the PSNR of the F-transform and F1-transform methods for some values of the compression rate in the image Lena.

We make the following remarks on Table 1:

− for weak compression rates the quality of the decoded image under the F1-transform method is better than the one obtained with the F-transform method;

− for strong compression rates the quality of the images decoded in the two methods is similar;

− the difference between the two PSNR’s in the two methods overcomes 0.1 for ρ > 0.25.

In Figure 4, we show the trend of the PSNR for the two methods.

In Figures 5(a)-(d) (resp., Figures 6(a)-(d)), we show the decoded images of Lena obtained by using the F-transform (resp., F1-transform) for ρ = 0.0.0625, 0.16, 0.284444 and 0.444444, respectively.

(a) (b) (c)

Figure 3. (a) Lena; (b) Einstein; (c) Leopard.

Figure 4. PSNR trend for the source image Lena.

Table 1. PSNR of the F-transform and F1-transform methods for some values of the compression rate in the image Lena.

(a) (b)(c) (d)

Figure 5. (a) F-tr under ρ = 0.0.0625; (b) F-tr under ρ = 0.16; (c) F-tr decoded (ρ = 0.284444); (d) F-tr decoded (ρ = 0.444444).

(a) (b)(c) (d)

Figure 6. (a) F1-tr decoded (ρ = 0.0.0625); (b) F1-tr decoded (ρ = 0.16); (c) F1-tr decoded (ρ = 0.284444); (d) F1-tr decoded (ρ = 0.444444).

In Table 2 and Figure 7, we show the PSNR obtained using the F-transform and F1-transform methods for some values of the compression rate in the image Einstein: this table confirms the same results obtained for the image Lena in Table 1.

In Figures 8(a)-(d) (resp., Figures 9(a)-(d)) we show the decoded images of Einstein obtained using the F-transform (resp., F1-transform) method for ρ = 0.0.0625, 0.16, 0.284444 and 0.444444, respectively.

In Table 3 we show the PSNR values obtained using the F-transform and F1-transform methods for some values of the compression rate in the image Leopard.

Figure 7. PSNR trend for the source image Einstein.

Table 2. PSNR results obtained for the source image Einstein.

(a) (b) (c) (d)

Figure 8. (a) F-tr decoded (ρ = 0.0.0625); (b) F-tr decoded (ρ = 0.16); (c) F-tr decoded (ρ = 0.284444); (d) F-tr decoded (ρ = 0.444444).

(a) (b) (c) (d)

Figure 9. (a) F1-tr decoded (ρ = 0.0.0625); (b) F1-tr decoded (ρ = 0.16); (c) F1-tr decoded (ρ = 0.284444); (d) F1-tr decoded (ρ = 0.444444).

Table 3 confirms the results obtained for the images Lena and Einstein: the quality of the decoded image obtained by using the F1-transform is better than the one obtained using the F-transform for weak compression rates. In Figure 10, we show the trend of the PSNR index obtained by using the two methods.

In Figures 11(a)-(d) (resp., Figures 12(a)-(d)), we show the decoded images of Leopard obtained by using the F-transform (resp., F1-transform) method for ρ = 0.0.0625, 0.16, 0.284444, 0.444444, respectively.

In Figure 13, we show the trend of the difference of PSNR by varying the compression rate for all the images in the dataset above considered.

Figure 10. PSNR trend for the source image Leopard.

Table 3. PSNR results obtained for the source image Leopard.

(a) (b) (a) (b)

Figure 11. (a) F-tr decoded (ρ = 0.0.0625); (b) F-tr decoded (ρ = 0.16); (c) F-tr decoded (ρ=0.284444); (d) F-tr decoded (ρ=0.444444).

(a) (b) (a) (b)

Figure 12. (a) F1-tr decoded (ρ = 0.0.0625); (b) F1-tr decoded (ρ = 0.16); (c) F1-tr decoded (ρ = 0.284444); (d) F1-tr decoded (ρ = 0.444444).

Figure 13. PSNR trend for all the images in the dataset considered.

Summarizing, we can say that the presence of the coefficients of the F1-transform is negated by noise introduced during the strong compressions, while this effect increases considerably using weak compressions rates.

5. Conclusion

We give an image compression method based on the direct and inverse F1-transform. The results show that the PSNR of the reconstructed images with the F1-transform-based compression method is better than the one obtained with the F-transform-based compression. In the tested dataset of images, we find that the difference between the two corresponding PSNR values is greater than 0.1 (resp., 0.25) for ρ = 0.25 (resp., ρ ≈ 0.5). In the next papers, we shall use the F1-transform in data analysis problems.

Acknowledgements

We also accomplish this research under the auspices of the INDAM-GCNS, Italy. The last author acknowledges a partial support from the European Regional Development Fund in the IT4Innovations Centre of Excellence project (CZ.1.05/ 1.1.00/02.0070).

Cite this paper

Di Martino, F., Sessa, S. and Perfilieva, I. (2017) First Order Fuzzy Transform for Images Compression. Journal of Signal and Information Processing, 8, 178-194. https://doi.org/10.4236/jsip.2017.83012

References

1. 1. Perfilieva, I. and Hodáková, P. (2013) F1-Transform of Functions of Two Variables. Proceedings of EUSFLAT 2013, Advances in Intelligent Systems Research, Milano, 32, 547-553.

2. 2. Perfilieva, I., Hodáková, P. and Hurtik, P. (2014) Differentiation by the F-Transform and Application for Edge Detection. Fuzzy Sets and Systems, 288, 96-114. https://doi.org/10.1016/j.fss.2014.12.013

3. 3. Perfilieva, I. (2006) Fuzzy Transform: Theory and Application. Fuzzy Sets and Systems, 157, 993-1023. https://doi.org/10.1016/j.fss.2005.11.012

4. 4. Di Martino, F., Loia, V. and Sessa, S. (2003) A Method in the Compression/Decompression of Images Using Fuzzy Equations and Fuzzy Similarities. Proceedings of the 10th IFSA World Congress, Istanbul, 30 June-2 July 2003, 524-527.

5. 5. Di Martino, F., Loia, V., Perfilieva, I. and Sessa, S. (2008) An Image Coding/Decoding Method Based on Direct and Inverse Fuzzy Transforms. International Journal of Approximate Systems, 48, 110-131. https://doi.org/10.1016/j.ijar.2007.06.008

6. 6. Di Martino, F. and Sessa, S. (2007) Compression and Decompression of Images with Discrete Fuzzy Transforms. Information Sciences, 177, 2349-2362. https://doi.org/10.1016/j.ins.2006.12.027

7. 7. Di Martino, F., Loia, V. and Sessa, S. (2010) A Segmentation Method for Images Compressed by Fuzzy Transforms. Fuzzy Sets and Systems, 161, 56-74. https://doi.org/10.1016/j.fss.2009.08.002

8. 8. Di Martino, F., Loia, V. and Sessa, S. (2010) Fuzzy Transforms for Compression and Decompression of Colour Videos. Information Sciences, 180, 3914-3931. https://doi.org/10.1016/j.ins.2010.06.030

9. 9. Di Martino, F., Hurlik, P., Perfilieva, I. and Sessa, S. (2014) A Color Image Reduction Based on Fuzzy Transforms. Information Sciences, 266, 101-111. https://doi.org/10.1016/j.ins.2014.01.014

10. 10. Di Martino, F. and Sessa, S. (2013) Coding B-Frames on Color Videos with Fuzzy Transforms. Advances on Fuzzy Systems, 2013, Article ID: 652429. https://doi.org/10.1155/2013/652429

11. 11. Di Martino, F., Loia, V. and Sessa, S. (2012) Fragile Watermarking Tamper Detection with Images Compressed by Fuzzy Transform. Information Sciences, 195, 62-90. https://doi.org/10.1016/j.ins.2012.01.014

12. 12. Di Martino, F., Loia, V. and Sessa, S. (2013) Image Matching by Using Fuzzy Transform. Advances on Fuzzy Systems, 2013, Article ID: 760705, 10 p.

13. 13. Loia, V. and Sessa, S. (2005) Fuzzy Relation Equations for Coding/Decoding Processes of Images and Videos. Information Sciences, 171, 145-172. https://doi.org/10.1016/j.ins.2004.04.003

14. 14. Nobuhara, H., Pedrycz, W. and Hirota, K. (2000) Fast Solving Method of Fuzzy Relational Equation and Its Application to Lossy Image Compression. IEEE Transactions on Fuzzy Systems, 8, 325-334. https://doi.org/10.1109/91.855920

15. 15. Nobuhara, H., Pedrycz, W. and Hirota, K. (2005) Relational Image Compression: Optimizations through the Design of Fuzzy Coders and YUV Color Space. Soft Computing, 9, 471-479. https://doi.org/10.1007/s00500-004-0366-7

16. 16. Nobuhara, H., Hirota, K., Di Martino, F., Pedrycz, W. and Sessa, S. (2005) Fuzzy Relation Equations for Compression/Decompression Processes of Colour Images in the RGB and YUV Colour Spaces. Fuzzy Optimization and Decision Making, 4, 235-246. https://doi.org/10.1007/s10700-005-1892-1

17. 17. Perfilieva, I. and De Baets, B. (2010) Fuzzy Transforms of Monotone Functions with Application to Image Compression. Information Sciences, 180, 3304-3315. https://doi.org/10.1016/j.ins.2010.04.029

18. 18. Vajgl, M., Perfilieva, I. and Hodáková, P. (2012) Advanced F-Transform Based Image Fusion. Advances in Fuzzy Systems, 2012, Article ID: 125086, 9 p. https://doi.org/10.1155/2012/125086

19. 19. Di Martino, F., Loia, V. and Sessa, S. (2010) Fuzzy Transforms Method and Attribute Dependency in Data Analysis. Information Sciences, 180, 493-505. https://doi.org/10.1016/j.ins.2009.10.012

20. 20. Di Martino, F., Loia, V. and Sessa, S. (2011) Fuzzy Transforms Method in Prediction Data Analysis. Fuzzy Sets and Systems, 180, 146-163. https://doi.org/10.1016/j.fss.2010.11.009

21. 21. Holcapek, M. (2011) A Smoothing Filter Based on Fuzzy Transform. Fuzzy Sets and Systems, 180, 69-97. https://doi.org/10.1016/j.fss.2011.05.028

22. 22. Perfilieva, I., Novak, V. and Dvorak, A. (2008) Fuzzy Transforms in the Analysis of Data. International Journal of Approximate Reasoning, 40, 26-46. https://doi.org/10.1016/j.ijar.2007.06.003

23. 23. Stěpnicka, M. and Polakovic, O. (2009) A Neural Network Approach to the Fuzzy Transform. Fuzzy Sets and Systems, 160, 1037-1047. https://doi.org/10.1016/j.fss.2008.11.029

24. 24. Stěpnieka, M., Dvorák, A., Pavliska, V. and Vavrícková, L. (2011) A Linguistic Approach to Time Series Modeling with the Help of F-Transform. Fuzzy Sets and Systems, 180, 164-184. https://doi.org/10.1016/j.fss.2011.02.017

25. 25. Troiano, L. and Ktriptani, P. (2011) Supporting Trading Strategies by Inverse Fuzzy Transform. Fuzzy Sets and Systems, 180, 121-145. https://doi.org/10.1016/j.fss.2011.05.004

26. 26. Bede, B. and Rudas, I.J. (2011) Approximation Properties of Fuzzy Transforms. Fuzzy Sets and Systems, 180, 20-40. https://doi.org/10.1016/j.fss.2011.03.001

27. 27. Perfilieva, I., Dankova, M. and Bede, B. (2011) Towards a Higher Degree F-Transform. Fuzzy Sets Systems, 180, 3-19. https://doi.org/10.1016/j.fss.2010.11.002

28. 28. Di Martino, F., Loia, V. and Sessa, S. (2003) A Method for Coding/Decoding Images by Using Fuzzy Relation Equations. In: Bilgic, T., De Baets, B. and Kaynak, O., Eds., Fuzzy Sets and Systems—IFSA 2003, Lecture Notes in Artificial Intelligence, Vol. 2715, Springer, Berlin, 436-441. https://doi.org/10.1007/3-540-44967-1_52