# Enhancement of Curve-Fitting Image Compression Using Hyperbolic Function

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. 2D Curve-Fitting of Image

## 3. The Proposed Method

#### 3.1. Simple $4\times 4$ Block Compression Algorithm

**Step 1: pre-processing**

- Find t(1,1) : $t(1,1)=min\left(g\right(1,1),g(1,4),g(4,1),g(4,4\left)\right)$.
- Find l(1,1) : $l(1,1)=max\left(g\right(1,1),g(1,4),g(4,1),g(4,4\left)\right)$.
- Limitation, using Equation (10) for each pixel point in this block$$g(x,y)=\left\{\begin{array}{cc}t(1,1),\hfill & g(x,y)<t(1,1)\hfill \\ l(1,1),\hfill & g(x,y)>l(1,1)\hfill \\ g(x,y),\hfill & \mathrm{otherwise}\hfill \end{array}\right.$$

**Step 2: initial values**

- Rotate the block to satisfy (minimum corner at $t(1,1)$) then find ${m}_{0}$ and ${m}_{1}$$${m}_{0}=\left\{\begin{array}{cc}0,\hfill & \mathrm{If}\text{}\mathrm{block}\text{}\mathrm{not}\text{}\mathrm{rotated}\text{}\mathrm{about}\text{x-axis}\hfill \\ 1,\hfill & \mathrm{If}\text{}\mathrm{block}\text{}\mathrm{rotated}\text{}\mathrm{about}\text{x-axis}\hfill \end{array}\right.$$$${m}_{1}=\left\{\begin{array}{cc}0,\hfill & \mathrm{If}\text{}\mathrm{block}\text{}\mathrm{not}\text{}\mathrm{rotated}\text{}\mathrm{about}\text{y-axis}\hfill \\ 1,\hfill & \mathrm{If}\text{}\mathrm{block}\text{}\mathrm{rotated}\text{}\mathrm{about}\text{y-axis}\hfill \end{array}\right.$$
- Find initial values of $a,b,c,$ and d as$a=t(1,1)$$b=t(4,4)-t(1,1)$$c={\displaystyle \frac{\left[t\right(4,1)-t(1,1\left)\right]+\left[t\right(4,4)-t(1,4\left)\right]}{4\times b+1}}$Adding 1 to the denominator to avoid dividing by zero.$d=0.5-c$

**Step 3: values enhancement**

- Calculate the values of $z(x,y)$ for $x=1,\dots ,4$ and $y=1,\dots ,4$ using Equation (3) for each pixel point of the block.
- Calculate the error using Equation (11):$$Error=\sum _{y=1}^{4}\sum _{x=1}^{4}[t(x,y)-z(x,y)]$$
- Repeat 1, 2 and 3 while $\left|Error\right|>e.$

**Step 4: coding**

#### 3.2. Simple $4\times 4$ Block Decompression Algorithm

**Step 1: decoding**

**Step 2: block values calculation**

- Calculate the values of $z(x,y)$ for $x=1,\dots ,4$ and $y=1,\dots ,4$ using Equation (3) for each point of the block.
- Re-rotate the block using the values of ${m}_{0}$ and ${m}_{1}$.

## 4. Experimental Results

#### 4.1. Objective Test (PSNR)

#### 4.2. Subjective Test (Edges)

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## Abbreviations

CR | Compression Ratio |

MSE | Mean Squared Error |

PSNR | Peak Signal-to-Noise Ratio |

SSIM | Structural Similarity Index |

bpp | bits per pixel |

## References

- Li, P.; Shen, H.; Zhang, L. A Method of Image Resolution Enhancement Based on the Matching Technique. Available online: http://www.isprs.org/proceedings/xxxv/congress/comm3/papers/356.pdf (accessed on 10 October 2018).
- Mussarat, Y.; Sajjad, M.; Muhammad, S. Intelligent image retrieval techniques: A survey. J. Appl. Res. Technol.
**2014**, 12, 87–103. [Google Scholar] [CrossRef] - Alsayem, H.A.; Kadah, Y.M. Image restoration techniques in super-resolution reconstruction of MRI images. In Proceedings of the 2016 33rd National Radio Science Conference (NRSC), Aswan, Egypt, 22–25 February 2016; pp. 188–194. [Google Scholar]
- Bharti, P.; Gupta, S.; Bhatia, R. Comparative analysis of image compression techniques a case study on medical images. In Proceedings of the IEEE International Conference on Advances in Recent Technologies in Communication and Computing, Kottayam, Kerala, India, 27–28 October 2009; pp. 820–822. [Google Scholar]
- Liu, F.; Hernandez-Cabronero, M.; Sanchez, V.; Marcellin, M.W.; Bilgin, A. The current role of image compression standards in medical imaging. Information
**2017**, 8, 131. [Google Scholar] [CrossRef] - Al-Bastaki, Y.A. Adaptive GIS Image Compression and Restoration Using Neural Networks. Math. Comput. Appl.
**2003**, 8, 191–200. [Google Scholar] [CrossRef] - Gonzalez, R.C.; Woods, R.E. Digital Image Processing, 3rd ed.; Prentice-Hall, Inc.: Upper Saddle River, NJ, USA, 2006; ISBN 013168728X. [Google Scholar]
- Kabir, M.A.; Mondal, M.R.H. Edge-based and prediction-based transformations for lossless image compression. J. Imaging
**2018**, 4, 64. [Google Scholar] [CrossRef] - Hassan, S.A.; Hussain, M. Spatial domain lossless image data compression method. In Proceedings of the International Conference on Information and Communication Technologies, Karachi, Pakistan, 23–24 July 2011; pp. 1–4. [Google Scholar]
- Miklos, P. Comparison of spatial and frequency domain image compression methods. In Proceedings of the 4th International Conference and Workshop Mechatronics in Practice and Education, Subotica, Serbia, 4–5 May 2017; pp. 57–60. [Google Scholar]
- Watanabe, T. Picture coding employing b-spline surfaces with multiple vertices. Electron. Comm. Jpn. Part I
**1997**, 80, 50–65. [Google Scholar] [CrossRef] - Lu, T.; Le, Z.; Yun, D. Piecewise linear image coding using surface triangulation and geometric compression. In Proceedings of the 2000 Data Compression Conference (DCC), Snowbird, UT, USA, 28–30 March 2000; pp. 410–419. [Google Scholar]
- Zhou, H.; Zheng, J.; Wei, L. Representing images using curvilinear feature driven subdivision surfaces. IEEE Trans. Image Process.
**2014**, 23, 3268–3280. [Google Scholar] [CrossRef] - Hsu, W.; Chen, K. Segmentation-based compression using modified competitive network. J. Med. Biol. Eng.
**2014**, 34, 542–546. [Google Scholar] [CrossRef] - Biswas, S. Segmentation based compression for gray level images. Pattern Recognit.
**2003**, 36, 1501–1517. [Google Scholar] [CrossRef] - Ameer, S.; Basir, O. Image compression using plane fitting with inter-block prediction. Image Vis. Comput.
**2009**, 27, 385–390. [Google Scholar] [CrossRef] - Sadanandan, S.; Govindan, V.K. Image compression with modified skip line encoding and curve fitting. Int. J. Comput. Appl.
**2013**, 74, 24–30. [Google Scholar] - Liu, Y.; Peng, S. A new image compression algorithm base on rotating mapping and curve fitting. In Proceedings of the 12th International Conference on Signal Processing (ICSP), Hangzhou, China, 19–23 October 2014; pp. 934–937. [Google Scholar]
- Sajikumar, S.; Anilkumar, A.K. Image compression using chebyshev polynomial surface fit. Int. J. Pure Appl. Math. Sci.
**2017**, 10, 15–27. [Google Scholar] - Al-Bahadili, R. Adaptive polynomial fitting for image compression based on variance of block pixels. Eng. Technol. J.
**2015**, 33, 1830–1844. [Google Scholar] - Banerjee, R.; Das Bit, S. An energy efficient image compression scheme for wireless multimedia sensor network using curve fitting technique. Wirel. Netw.
**2017**, 25, 167–183. [Google Scholar] [CrossRef] - Sanchez, V.; Aulí-Llinàs, F.; Serra-Sagristà, J. Piecewise mapping in HEVC lossless intra-prediction coding. IEEE Trans. Image Process.
**2016**, 25, 4004–4017. [Google Scholar] [CrossRef] [PubMed] - Beitollahi, M.; Hosseini, S.A. Using savitsky-golay smoothing filter in hyperspectral data compression by curve fitting. In Proceedings of the 26th Iranian Conference on Electrical Engineering (ICEE), Mashhad, Iran, 8–10 May 2018; pp. 452–557. [Google Scholar]
- Butt, A.M.; Sattar, R.A. On Image Compression Using Curve Fitting. Master’s Thesis, The Blekinge Institute of Technology, Karlskrona, Sweden, 2010. [Google Scholar]
- Strobach, P. Quadtree-structured recursive plane decomposition coding of images. IEEE Trans. Signal Process.
**1991**, 39, 1380–1397. [Google Scholar] [CrossRef] - Ameer, S. Investigating Polynomial Fitting Schemes for Image Compression. Ph.D. Thesis, University of Waterloo, Waterloo, ON, Canada, 2009. [Google Scholar]
- Philips, W. Recursive computation of polynomial transform coefficients. Electron. Lett.
**1991**, 27, 2337–2339. [Google Scholar] [CrossRef] - Hasegawa, M.; Yamasaki, I. Image data compression with nonuniform block segmentation and luminance approximation using bilinear curved surface patches. Syst. Comput. Jpn. Banner
**2002**, 33, 31–40. [Google Scholar] [CrossRef] - Shi, C.; Wang, L.; Zhang, J.; Miao, F.; He, P. Remote Sensing Image Compression based on direction lifting-based block transform with content-driven Quadtree coding adaptively. Remote Sens.
**2018**, 10, 999. [Google Scholar] [CrossRef] - AL Wahab, D.S.; Zaghar, D.; Laki, S. FIR Filter design based neural network. In Proceedings of the 11th International Symposium on Communication Systems, Networks, and Digital Signal Processing (CSNDSP 2018), Budapest, Hungary, 18–20 July 2018; pp. 1–4. [Google Scholar]
- Yu, C.-Y.; Lin, C.-Y.; Yang, S.-C.; Lin, H.-Y. Eight-scale image contrast enhancement based on adaptive inverse hyperbolic tangent algorithm. Algorithms
**2014**, 7, 597–607. [Google Scholar] [CrossRef]

**Figure 2.**Some examples of 2D $tanh$ function. (

**a**): Vertical Edge; (

**b**): Horizontal Edge; (

**c**): Diagonal Edge.

**Figure 3.**Results of Compression Method. (

**a**): result of matrix a; (

**b**): result of matrix b; (

**c**): result of matrix c.

**Figure 4.**

**The first column**: original images;

**the second column**: results of proposed method;

**the third column**: results of JPEG method,

**the fourth column**: results of 1st-order curve-fitting.

**Figure 5.**

**The first column**: original images edge detection;

**the second column**: results of edge detection for proposed method;

**the third column**: results of edge detection for JPEG method;

**the fourth column**: results of edge detection for 1st order curve-fitting.

Image Name | PEPPER | BOAT | LENA | HOUSES | CLOWN | MAN |
---|---|---|---|---|---|---|

size | 257 K | 257 K | 257 K | 257 K | 257 K | 1 M |

MSE of proposed method | 64 | 117 | 37 | 448 | 81 | 83 |

MSE of 1st order | 8793 | 9643 | 1025 | 9265 | 4606 | 7867 |

PSNR of proposed method | 30.10 | 27.4 | 32.50 | 21.6 | 29.0 | 28.90 |

PSNR of 1st order | 8.70 | 8.30 | 8.02 | 8.46 | 11.49 | 9.17 |

Image Name | PEPPER | BOAT | LENA | HOUSES | CLOWN | MAN |
---|---|---|---|---|---|---|

PSNR | 30.1 | 27.4 | 32.5 | 21.6 | 29.0 | 28.9 |

Proposed method | 0.8420 | 0.7931 | 0.8917 | 0.7142 | 0.8525 | 0.8160 |

JPEG | 0.7849 | 0.7347 | 0.8633 | 0.6601 | 0.7342 | 0.7462 |

**Table 3.**Objective and subjective test results for the same CR (5.3). (${}^{1}$ Neither quantization nor Huffman coding are used.)

Method | PEPPER | BOAT | LENA | HOUSES | CLOWN | MAN | |
---|---|---|---|---|---|---|---|

JPEG ^{1} | PSNR | 29.9 | 27.8 | 32.0 | 22.5 | 29.5 | 29.7 |

SSIM | 0.7849 | 0.7347 | 0.8633 | 0.6601 | 0.7342 | 0.7462 | |

Proposed | PSNR | 30.1 | 27.4 | 32.5 | 21.6 | 29.0 | 28.9 |

SSIM | 0.8420 | 0.7931 | 0.8917 | 0.7142 | 0.8525 | 0.8160 |

© 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**

Khalaf, W.; Zaghar, D.; Hashim, N.
Enhancement of Curve-Fitting Image Compression Using Hyperbolic Function. *Symmetry* **2019**, *11*, 291.
https://doi.org/10.3390/sym11020291

**AMA Style**

Khalaf W, Zaghar D, Hashim N.
Enhancement of Curve-Fitting Image Compression Using Hyperbolic Function. *Symmetry*. 2019; 11(2):291.
https://doi.org/10.3390/sym11020291

**Chicago/Turabian Style**

Khalaf, Walaa, Dhafer Zaghar, and Noor Hashim.
2019. "Enhancement of Curve-Fitting Image Compression Using Hyperbolic Function" *Symmetry* 11, no. 2: 291.
https://doi.org/10.3390/sym11020291