# A Fast Multilevel Fuzzy Transform Image Compression Method

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Preliminaries

#### 2.1. Discrete Dircct and Inverse F-Transforms for Coding/Decoding Images

_{1}, x

_{2}, …, x

_{n}be a set of n-many points of [a,b], called nodes, such that a = x

_{1}< x

_{2}<…< x

_{n}= b. We say that an assigned family of fuzzy sets A

_{1}, …, A

_{n}: [a,b] → [0,1], with A

_{i}(x) a continuous function on [a,b], is a fuzzy partition of [a,b] if the following conditions hold:

- A
_{i}(x_{i}) = 1 for every i = 1, 2, …, n; - A
_{i}(x) = 0 if x is not in (x_{i−1}, x_{i+1}), where we assume x_{0}= x_{1}= a and x_{n+1}= x_{n}= b by commodity of presentation; - A
_{i}(x) strictly increases on [x_{i−1}, x_{i}] for i = 2, …, n and strictly decreases on [x_{i}, x_{i+1}] for i = 1, …, n − 1; - ${{\displaystyle \sum}}_{i=1}^{n}{A}_{i}\left(x\right)=1$ for every x ∈ [a,b].

_{1}, …, A

_{n}} are called basic functions. Moreover, we say that they form a uniform fuzzy partition if

- ▪
- n ≥ 3 and the nodes are equidistant, i.e., x
_{i}= a + h ∙ (i − 1) where h = (b − a)/(n − 1) for i = 1, 2, …, n; - ▪
- A
_{i}(x_{i}− x) = A_{i}(x_{i}+ x) for every x ∈ [0,h] and i = 2, …, n − 1; and - ▪
- A
_{i+1}(x) = A_{i}(x − h) for every x ∈ [x_{i}, x_{i+1}] and i = 1,2, …, n − 1.

_{1}, …, p

_{N}be a set of points in [a,b] on which the values assumed by the function f are known. We call this set of points sufficiently dense with respect to the fuzzy partition {A

_{1}, A

_{2}, …, A

_{n}} if for each basic function A

_{i}, i = 1, …, n, there exists at least a point p

_{j}, j = 1, …, N, such that A

_{i}(p

_{j}) > 0. In this case we can define the n-dimensional vector

**F**= [F

_{1}, …, F

_{n}] with components

_{1}, A

_{2}, …, A

_{n}}. We define the discrete inverse F-tr of the function f with respect to {A

_{1}, A

_{2}, …, A

_{n}} to be the following function defined in the same points p

_{1}, …, p

_{m}of [a,b]:

_{F,n}is called the discrete inverse fuzzy transform of f with respect to the fuzzy partition {A

_{1}, A

_{2},…, A

_{n}}.

_{1}, …, p

_{m}of [a,b]. Then, for every ε > 0, it is proved [2] that there exist an integer n(ε) and a related fuzzy partition {A

_{1}, A

_{2}, …, A

_{n(ε)}} of [a,b] such that P is sufficiently dense with respect to {A

_{1}, A

_{2}, …, A

_{n(ε)}} and the inequality |f(p

_{j}) − f

_{F,n(ε)}(p

_{j})| < ε holds true for every p

_{j}∈ [a, b], j = 1, …, m.

_{1}, x

_{2}, …, x

_{n}∈ [a,b] and y

_{1}, y

_{2}, …, y

_{m}∈ [c,d] be (n + m)-many assigned points, called nodes, such that a = x

_{1}< x

_{2}<…< x

_{n}= b and c = y

_{1}< …< y

_{m}= d. Furthermore, let A

_{1}, …, A

_{n}: [a,b] → [0,1] be a fuzzy partition of [a,b] and B

_{1},…,B

_{m}: [c,d] → [0,1] be a fuzzy partition of [c,d]. Let (p

_{j},q

_{j}) ∈ [a,b] × [c,d], where i = 1, …, N and j = 1, …, M, be a set of (N × M)-many points on which the values assumed by the function f are known. If the sets P = {p

_{1}, …, p

_{N}} and Q = {q

_{1}, …, q

_{M}} of these points are sufficiently dense, respectively, with respect to the partitions {A

_{1}, A

_{2}, …, A

_{n}} and {B

_{1}, …, B

_{m}}, then we define the bidimensional discrete direct fuzzy transform of f given by the matrix

**F**with components

_{1}, A

_{2}, …, A

_{n}} and {B

_{1}, …, B

_{m}} to be given by

_{1}, …, A

_{m}: [1,N]→ [0,1] of [1,N] and, B

_{1}, …, B

_{n}: [1,M]→[0,1] of [1,M] with n < N and m < M.

_{B}of N

_{B}× M

_{B}size, called blocks. For any block we consider the function I

_{B}: (i, j)∈{1, …, N

_{B}} × {1, …, M

_{B}}

^{®}[0,1]), compressing the block via direct F-transform to a block of size n

_{B}× m

_{B}with n

_{B}< N

_{B}and m

_{B}< M

_{B}, obtaining

#### 2.2. Multilevel F-Transform Image Compression

_{0}be the source image. At Level 1, it is coded and decoded by using the direct and inverse F-transforms, respectively. Let ${I}_{1}^{F}$ be the decoded image. In [6], a set of criteria was fixed for stopping the iterations. If the iteration stop criteria are reached, the algorithm stops and the final reconstructed image is given by I

_{1}

^{M}= I

_{1}

^{F}; otherwise, the error at Level 1, I

_{1}= ${I}_{1}^{F}$ − I

_{0}, is calculated, and the process is iterated at Level 2 where the image I

_{1}is coded and decoded by using the direct and inverse F-transforms.

- The PSNR of the reconstructed image at Level h is greater than a prefixed threshold PSNR
_{th}. In this case, the quality of the reconstructed image obtained is already acceptable; - The difference between the PSNR at the sth level and the PSNR at the (s − 1)th level is less than a difference threshold DPSNR
_{th}. The algorithm stops because the contribution to the improvement of the image quality obtainable in the subsequent iterations will be of little significance; - The process has reached the maximum number of iterations s
_{max}.

_{th}, DPSNR

_{th}, and s

_{max}and the compression ratio ρ are set by the user.

_{th}) would imply a high execution time as many cycles will be required to obtain a reconstructed image of the required quality.

## 3. The Fast Multilevel F-Transform Image Compression Method

_{0}be the source image of size N × M and PSNR

_{th}be the threshold of the PSNR index. We apply the F-transform method considering the set D of compression ratios ρ

_{1}< ρ

_{2}< … < ρ

_{n}in the range between ρ

_{min}and ρ

_{max}.

_{First}given by the median value in the set D of compression ratios. Then, the PSNR index is calculated. If the PSNR is greater than PSNR

_{th}, then a stronger compression is performed and the previously used compression ratio is set; otherwise, a weaker compression is performed and the succeeding compression ratio is used. Now we suppose that, at a certain moment, the calculated PSNR index is greater than the threshold PSNR

_{th}, while in the previous cycle it was less than PSNR

_{th}: in this case the process stops and the compression ratio used in the previous cycle is set. Otherwise, if the PSNR index is less than PSNR

_{th}while in the previous cycle it was greater than PSNR

_{th}, the process stops and the current compression ratio is set.

Algorithm 1: Fast MF-tr | ||

Input: | N × M source image I_{0}Sorted set of compression ratios {ρ _{1}, ρ_{2}, …, ρ_{n}}Threshold similarityPSNR _{th}Difference threshold DPSNR _{th}Max number of iterations s _{max} | |

Output: | Reconstructed image | |

1 | ρ:= median({ρ_{1}, ρ_{2}, …, ρ_{n}}) | |

2 | ρ_{Best}: ρ | |

3 | stopIteration:= FALSE | |

4 | PSNR_{old}:= PSNR_{th} | |

5 | WHILE (stopIteration=FALSE) | |

6 | Compress the source image I_{0} via direct F-transform | |

7 | Decompress the source image I_{0} via inverse F-transform | |

8 | Calculate the PSNR index (8) | |

9 | IF (PSNR > PSNR_{th}) AND (PSNR_{old} < PSNR_{th}) THEN | |

10 | ρ_{Best}: = ρ_{old} | |

11 | stopIteration:= TRUE | |

12 | ELSE | |

13 | IF (PSNR < PSNR_{th}) AND (PSNR_{old} > PSNR_{th}) THEN | |

14 | ρ_{Best}:= ρ | |

15 | stopIteration:= TRUE | |

16 | ELSE | |

17 | PSNR_{old}:= PSNR | |

18 | IF (PSNR > PSNR_{th}) THEN | |

19 | ρ:= ρ_{prev} | |

20 | ELSE | |

21 | ρ:= ρ_{next} | |

22 | END IF | |

23 | ENDIF | |

24 | END IF | |

25 | END WHILE | |

26 | CALL MF-tr(I_{0}, PSNR_{th}, PSNR_{th}, DPSNR_{th}, s_{max}) | |

27 | RETURN reconstructed image |

## 4. Test Results

^{−5}, 2.44 × 10

^{−4}, 9.77 × 10

^{−4}, 3.9 × 10

^{−3}, 3.09 × 10

^{−3}, 6.94 × 10

^{−3}, 4.00 × 10

^{−2}, 1.56 × 10

^{−2}, 2.78 × 10

^{−2}, 6.25 × 10

^{−2}, 0.11, 0.25, 1}. The median value in this set is ρ = 4.00 × 10

^{−2}. This was the initial compression ratio used for executing the best compression ratio search. The highest compression ratio in the set is ρ = 1, corresponding to a null compression.

_{th}threshold as the value of the PSNR index for which the trend of the PSNR index varying with the compression ratio showed an approximate plateau for gradually weaker compressions.

_{th}to 28.

^{−2}, obtaining a PSNR value of 23.87. In Figure 3b, we show the decompressed image obtained. The best compression ratio was ρ

_{Best}= 0.11. In Figure 3c, we show the corresponding decompressed (reconstructed) image; the PSNR was 27.68. Using a smaller compression ratio than ρ = 0.11, we obtained PSNR = 28.41, which is greater than the threshold value.

^{−2}, the reconstructed image was obtained at Level 6.

_{th}to 25. By using the median compression ratio ρ = 4.00 × 10

^{−2}, we obtained a PSNR value of 20.79 (Figure 4b); the best compression ratio was ρ

_{Best}= 6.25 × 10

^{−2}, and the corresponding PSNR was 24.38 (Figure 4c). The final image was reconstructed at the second level, obtaining PSNR = 25.16 (Figure 4d).

^{−2}, we obtained a PSNR value of 22.05 (Figure 4b); the best compression ratio was ρ

_{Best}= 0.11 and the corresponding PSNR was 27.87 (Figure 5d). The final image was reconstructed at the third level, obtaining PSNR = 28.10 (Figure 5e).

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Perfilieva, I. Fuzzy transforms. Fuzzy Sets Syst.
**2006**, 157, 993–1023. [Google Scholar] [CrossRef] - Di Martino, F.; Sessa, S. Compression and decompression of images with discrete fuzzy transforms. Inf. Sci.
**2007**, 17, 2349–2362. [Google Scholar] [CrossRef] - Di Martino, F.; Loia, V.; Perfilieva, I.; Sessa, S. An image coding/decoding method based on direct and inverse fuzzy transforms. Int. J. Approx. Reason.
**2008**, 48, 110–131. [Google Scholar] [CrossRef] [Green Version] - Di Martino, F.; Loia, V.; Sessa, S. Fuzzy transforms for compression and decompression of colour videos. Inf. Sci.
**2010**, 180, 3914–3931. [Google Scholar] [CrossRef] - Perfilieva, I.; De Baets, B. Fuzzy transforms of monotone functions with application to image compression. Inf. Sci.
**2010**, 180, 3304–3315. [Google Scholar] [CrossRef] - Di Martino, F.; Sessa, S. A Multi-Level Image Compression Method Based on Fuzzy Transforms. J. Ambient Intell. Humaniz. Comput.
**2019**, 10, 2745–2756. [Google Scholar] [CrossRef] - Toet, A. A morphological pyramidal image decomposition. Pattern Recognit. Lett.
**1989**, 9, 255–261. [Google Scholar] [CrossRef] - Paris, S.; Hasinoff, S.V.; Kautz, J. Local Laplacian filters: Edge-aware image processing with a Laplacian pyramid. Commun. ACM
**2015**, 58, 81–91. [Google Scholar] [CrossRef] - Boiangiu, C.A.; Cotofana, M.V.; Naiman, A.; Lambru, C. A generalized Laplacian Pyramid aimed at image compression. J. Inf. Syst. Oper. Manag.
**2016**, 10, 327–335. [Google Scholar] - Ispas, C.; Boiangiu, C.A. An image compression scheme based on Laplacian Pyramid. J. Inf. Syst. Oper. Manag.
**2017**, 11, 350–358. [Google Scholar] - Walker, J.S.; Nguyen, T.Q. Wavelet-Based Image Compression (Chapter 6). In The Transform and Data Compression Handbook; Rao, K.R., Yip, P.C., Eds.; CRC Press LLC: Boca Raton, FL, USA, 2001. [Google Scholar]
- Song, M.-S. Wavelet Image Compression. Contemp. Math.
**2006**, 414, 41–73. [Google Scholar] - Khan, U.R.; Ahmed, S.; Nazeer, T. Wavelet Based Image Compression Techniques: Comparative Analysis and Performance Evaluation. Int. J. Emerg. Technol. Eng. Res.
**2017**, 5, 9–13. [Google Scholar] - Karthikeyan, C.; Palanisamy, C. An Efficient Image Compression Method by Using Optimized Discrete Wavelet Transform and Huffman Encoder. J. Comput. Theor. Nanosci.
**2018**, 15, 289–298. [Google Scholar] [CrossRef] - Perfilieva, I. Fuzzy transform in image compression and fusion. Acta Math. Univ. Ostrav.
**2007**, 15, 27–37. [Google Scholar] - Perfilieva, I.; Dankova, M. Image fusion on the basis of fuzzy transforms. In Proceedings of the 8th International FLINS Conference on Computational Intelligence in Decision and Control, Madrid, Spain, 21–24 September 2008; pp. 471–476. [Google Scholar]
- Manchanda, M.; Sharma, R. A novel method of multimodal medical image fusion using fuzzy transform. J. Vis. Commun. Image Represent.
**2016**, 40, 197–217. [Google Scholar] [CrossRef] - Di Martino, F.; Sessa, S. Complete image fusion method based on fuzzy transforms. Soft Comput.
**2019**, 23, 2113–2123. [Google Scholar] [CrossRef] - Huynh-Thu, Q.; Ghanbari, M. Scope of validity of PSNR in image/video quality assessment. Electron. Lett.
**2008**, 44, 800–801. [Google Scholar] [CrossRef] - Huynh-Thu, Q.; Ghanbari, M. The accuracy of PSNR in predicting video quality for different video scenes and frame rates. Telecommun. Syst.
**2012**, 49, 35–48. [Google Scholar] [CrossRef]

**Figure 3.**(

**a**) Source image: Lena. (

**b**) Decompressed image at Level 1 (ρ = 4.00 × 10

^{−2}); (

**c**) Decompressed image at Level 2 (ρ = 0.11). (

**d**) Final reconstructed image.

**Figure 4.**(

**a**) Source image: Bridge. (

**b**) Decompressed image at Level 1 (ρ = 4.00 × 10

^{−2}). (

**c**) Decompressed image at Level 2 (ρ = 6.25 × 10

^{−2}). (

**d**) Final reconstructed image.

**Figure 5.**(

**a**) Source image: Airport. (

**b**) Decompressed image at Level 1 (ρ = 4.00 × 10

^{−2}). (

**c**) Decomposed image at Level 2 (ρ = 6.25 × 10

^{−2}). (

**d**) Decomposed image at Level 3 (ρ = 0.11). (

**e**) Final reconstructed image.

**Table 1.**PSNR, structural similarity index (SSIM), and CPU times obtained for the 256 × 256 gray image Lena.

Algorithm | Levels | PSNR | SSIM | CPU Time (s) |
---|---|---|---|---|

MF-tr | 6 | 28.26 | 0.95 | 35.08 |

Fast MF-tr | 2 | 28.29 | 0.96 | 17.57 |

Algorithm | Levels | PSNR | SSIM | CPU Time (s) |
---|---|---|---|---|

MF-tr | 5 | 28.12 | 0.91 | 74.65 |

Fast MF-tr | 2 | 28.10 | 0.92 | 33.28 |

Algorithm | Levels | PSNR | SSIM | CPU Time (s) |
---|---|---|---|---|

MF-tr | 7 | 25.15 | 0.94 | 148.25 |

Fast MF-tr | 3 | 25.16 | 0.94 | 59.86 |

Size | Mean CPU Time (s) | ||
---|---|---|---|

MF-tr | Fast MF-tr | CPU Time Ratio | |

256 × 256 | 37.11 | 17.09 | 0.46 |

512 × 512 | 78.29 | 33.35 | 0.43 |

1024 × 1024 | 151.13 | 62.54 | 0.41 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Di Martino, F.; Perfilieva, I.; Sessa, S.
A Fast Multilevel Fuzzy Transform Image Compression Method. *Axioms* **2019**, *8*, 135.
https://doi.org/10.3390/axioms8040135

**AMA Style**

Di Martino F, Perfilieva I, Sessa S.
A Fast Multilevel Fuzzy Transform Image Compression Method. *Axioms*. 2019; 8(4):135.
https://doi.org/10.3390/axioms8040135

**Chicago/Turabian Style**

Di Martino, Ferdinando, Irina Perfilieva, and Salvatore Sessa.
2019. "A Fast Multilevel Fuzzy Transform Image Compression Method" *Axioms* 8, no. 4: 135.
https://doi.org/10.3390/axioms8040135