
A spatial image compression algorithm based on run length encoding
Author(s) -
Abdel Rahman Idrais,
Inad A. Aljarrah,
Osama Al-Khaleel
Publication year - 2021
Publication title -
bulletin of electrical engineering and informatics
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.251
H-Index - 12
ISSN - 2302-9285
DOI - 10.11591/eei.v10i5.2563
Subject(s) - pixel , lossy compression , color cell compression , redundancy (engineering) , path (computing) , data compression , image compression , computer vision , algorithm , computer science , artificial intelligence , compression ratio , encoding (memory) , image quality , mathematics , image (mathematics) , image processing , internal combustion engine , automotive engineering , engineering , programming language , operating system
Image compression is vital for many areas such as communication and storage of data that is rapidly growing nowadays. In this paper, a spatial lossy compression algorithm for gray scale images is presented. It exploits the inter-pixel and the psycho-visual data redundancies in images. The proposed technique finds paths of connected pixels that fluctuate in value within some small threshold. The path is calculated by looking at the 4-neighbors of a pixel then choosing the best one based on two conditions; the first is that the selected pixel must not be included in another path and the second is that the difference between the first pixel in the path and the selected pixel is within the specified threshold value. A path starts with a given pixel and consists of the locations of the subsequently selected pixels. Run-length encoding scheme is applied on paths to harvest the inter-pixel redundancy. After applying the proposed algorithm on several test images, a promising quality vs. compression ratio results have been achieved.