1. INTRODUCTION
Image coding and compression is used mainly for effective data storage and transmission over a
network and in some cases for encryption. Image data is also coded for achieving compression to
optimize the use of these resources. In digital image compression, depending upon the quality of
decompressed image the compression algorithms employed are categorised in the categories like
Lossless compression, Lossy compression, and Near-lossless compression. The data redundancy is a
statistically quantifiable entity, it can be defined as R_D=1-1โCR, where the CR is the compression
ratio represents the ratio of number of bits in compressed representation to number of bits in original
representation. A compression ratio of โCโ (or โCโ:1) means that the original data contains โCโ
information bits for every 1 bit in the compressed data. The associated redundancy of 0.5 indicates that
50% of the data in the first data set is redundant. Three primary data redundancies can be found and
used in digital image compression i.e. coding redundancy, interpixel redundancy, and psychovisual
redundancy. When one or more of these redundancies are considered as a key component for reduced
representation of data and accordingly these redundancies are encoded with some method the
compression is achieved, Sayood (2017). There is no right or wrong decision when deciding between
lossless and lossy image compression techniques. Depending on what suits your application the most,
you can choose. Lossy compression is a fantastic option if you don't mind sacrificing image quality in
exchange for smaller image sizes. However, if you want to compress photographs without sacrificing
their quality or visual appeal, you must choose lossless compression Kumar and Chandana (2009).
Based on a knowledge of visual perception, the irrelevant part of the data may be neglected, a lossy
compression, includes a process for averaging or eliminating this unimportant information to reduce
data size. In lossy compression the image quality is compromised but a significant amount of
compression is possible. When the quality of decompressed image and integrity are crucial then lossy
compression shouldn't be employed Ndjiki-Nya et.al (2007). Not all images react the same way to
lossy compression. Due to the constantly changing nature of photographic images, some visual
elements, including slight tone variations, may result in artefacts (unintended visual effects), but these
effects may largely go unnoticed. While in line graphics or text in document images will more
obviously show the lossy compression artefacts than other types of images. These may build up over
generations, particularly if various compression algorithms are employed, so artefacts that were
undetectable in one algorithm may turn out to be significant in another. So, in this scenario one should
try to bridge the consequences of lossless and lossy compression algorithms. So, the near-lossless
compression algorithm should be practiced in case of document images to optimise the compression
ratio and the quality of reconstruction Ansari et al. (1998). One of the very famous Error detection and
correction technique used in channel coding may be used for the digital image compression Caire et.al
(2004) and Hu et.al (2000). In this paper use of Hamming codes with different specifications for
various compression algorithms mentioned above is done and the compression is achieved.
2. HAMMING CODES
When the channel is noisy or error-prone, the channel encoder and decoder are crucial to the overall
encoding-decoding process. By adding a predetermined amount of redundancy to the source encoded
data, it is possible to minimize the influence of channel noise. As the output of the source encoder is
highly sensitive to transmission noise, it is based on the principle that enough controlled redundant
bits must be added to the data being encoded to guarantee that a specific minimum number of bits will
change during the transmission. Hamming demonstrated, showed that all single-bit errors can be
detected and corrected if 3 bits of redundancy are added to a 4-bit code word, providing the Hamming
distance between any two valid code words 3 bits. The 7-bit Hamming (7, 4) code word P1, P2, D3,
P4, D5, D6, D7 for a 4-bit binary number b1,b2,b3,b4โ
D3,D5,D6,D7 padded with parity bits
p1,p2,p3โ
P1,P2,P4 .
https://doi.org/10.17993/3ctic.2022.112.225-237
3C TIC. Cuadernos de desarrollo aplicados a las TIC. ISSN: 2254-6529
Ed. 41 Vol. 11 N.ยบ 2 August - December 2022
227