SlideShare a Scribd company logo
M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp.168-173 
www.ijera.com 168 | P a g e 
ROI Based Image Compression in Baseline JPEG 
M M M Kumar Varma#1, Madhuri. Bagadi#2 Associate professor1, M.Tech Student2 Sri Sivani College of Engineering, Department of Computer Science Srikakulam, Andhrapradesh,, India ABSTRACT To improve the efficiency of standard JPEG compression algorithm an adaptive quantization technique based on the support for region of interest of compression is introduced. Since this is a lossy compression technique the less important bits are discarded and are not restored back during decompression. Adaptive quantization is carried out by applying two different quantization to the picture provided by the user. The user can select any part of the image and enter the required quality for compression. If according to the user the subject is more important than the background then more quality is provided to the subject than the background and vice- versa. Adaptive quantization in baseline sequential JPEG is carried out by applying Forward Discrete Cosine Transform (FDCT), two different quantization provided by the user for compression, thereby achieving region of interest compression and Inverse Discrete Cosine Transform (IDCT) for decompression. This technique makes sure that the memory is used efficiently. Moreover we have specifically designed this for identifying defects in the leather samples clearly. 
I. INTRODUCTION 
Images are being used very extensively to depict, analyze and share information in the world today. With the advent of new age gadgets like Smartphones and social networking websites like Facebook the use of images has increased even more. So, with the ever increasing usage of images, the need for efficient compression techniques without the loss of vital information is necessary. JPEG (Joint Photographic Experts Group) is a standardized compression method for organizing and storing digital images [1]. JPEG uses a lossy form of compression based on the discrete cosine transform [2]. There has been always a selectable tradeoff between storage size and image quality using JPEG. In Baseline Sequential Quantization the whole image can be compressed with desired quality,But the Region of Interest compression is not achieved. Adaptive Quantization should be used to obtain the desired compression for the subject and the background separately. Kakarala and Bagadi described that the traditional JPEG compression standard, unlike JPEG2000, does not prescribe a means for spatially-variable quantization of transform coefficients. This prevents useful features such as region-of-interest (ROI) coding, where, for example, the subject in a photograph may be lightly compressed while the background is heavily compressed to hide irrelevant details [3]. 
II. LITERATURE REVIEW 
The American Mathematical Society described the process of Baseline compression algorithm (lossy compression) taking an example of image whose dimensions are 250x375 giving a total of 93750 pixels requiring 281250 bytes of storage. However, that image is finally compressed such that it takes 32414 bytes for storage i.e., the image has been compressed by a factor of roughly nine. This article describes how the image can be represented in such a small file (compressed) and how it may be reconstructed (decompressed) from this file. The color space transformation used in preparing the image for compression is explained in detail [5]. Aruna and Ramesh demonstrated a simple method for signaling adaptive quantization to the decoder, using the empty slots in standard baseline Huffman table. This is useful for ROI coding, which has the advantage of improving image quality in selected regions. They also showed how the encoder may be modified to produce an output that is in compliant with the standard and how the decoder may be modified to correctly recover the adaptively quantized image [6].The basic concepts and definitions involved in simple JPEG compression are referred. Description of differences between lossless and lossy compressions, Baseline sequential and progressive formats etc. Overview of the Baseline sequential JPEG encoding and decoding processes as a whole using flowcharts and various other figures [2]. Kakarala and Bagadi showed how the quantization may be adapted in each block and how the adaption may be signaled to the decoder in a memory efficient manner. They also explained how this adaptation allows ROI (Region of Interest) coding of subject and background. Examples are shown to illustrate adaptive quantization, signaling and decoding [3]. 
Ken cabeen and Peter gent explained the need for image compression and also illustrated the 
RESEARCH ARTICLE OPEN ACCESS
M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. 
www.ijera.com 169 | P a g e 
various equations of the DCT and its uses with image 
compression. The JPEG method is described step by 
step in detail. They also showed how the DCT 
(Discrete Cosine Transformation) and the IDCT 
(Inverse DCT) are applied to each block. This whole 
process is demonstrated taking a matrix as an 
example which represents the block of image-pixel 
values [4].Tutorial-Po-Hong Wu, Ting-Yu Chen 
describes the popular JPEG still image coding 
format. The purpose is to compress images while 
maintaining acceptable image quality. Also the focus 
is on the DCT and quantization. The entropy coding 
is also briefly discussed [7]. 
III. PROPOSED ALGORITHM 
IV. DETAILED ALGORITHM OF 
COMPRESSION 
STEP 1: The image is broken into 8x8 Blocks of 
Pixels. 
STEP 2: Working from left to right,top to bottom 
DCT(DiscreteCosine Transform) is applied to each 
block. 
STEP 3: Each block is compressed through 
Quantization. 
STEP 4: The array of compressed blocks that 
constitute the image is stored in drastically reduced 
amount of space. 
STEP 5: When desired the image is re-constructed 
through Decompression, a process that Uses Inverse 
DCT. 
STEPS 1-5 above use DCT based image 
Compression[8]. 
V. HOW JPEG ALGORITHM WORKS 
FOR A GIVEN IMAGE 
First, the image is broken into 8x8 blocks of 
pixels as shown in the image below. 
Fig: Shows an image with 8x8 blocks and inset image 
[image source[5]]. 
Now we convert this image into a matrix 
representation of pixels. Let each pixel is represented 
by p bits, the pixel value is in the range of (0, 2^p-1). 
We represent this matrix as Original as shown below. 
Fig: Matrix representation of the pixels [4] 
Pixel values are shifted from (0,2^p-1) to (-2^p- 
1,(2^p-1)-1).Since our p=8 so shift the values 
from(0,255) to (-12,127) because DCT requires range 
be centered around 0.Each value of the matrix from 
left to right and top to bottom is leveled off by 
subtracting 128.We represent the matrix by M. 
Load the input 
image 
Identify the ROI(Region 
Of Interest) 
Compress the ROI and the rest of 
the image with different Quality 
values 
Display the Resultant image
M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. 
www.ijera.com 170 | P a g e 
Fig: Levelled of matrix [4] 
1) Discrete Cosine Transform (DCT): 
DCT converts intensity function into weighted sum of periodic basis (cosine) functions. It identifies band of spectral information which can be thrown away without loss of quality .So DCT converts spatial domain to frequency domain. The DCT equation computes the i,jth entry of the DCT of an image 
Where x,y range from 0 to N-1 
To get the matrix form of the above equation, we will use the following equation 
N is the size of the block. P(x, y) represents x yth element of the image represented by matrix P. DCT matrix of an 8x8 blocks is as shown below: 
Fig: DCT matrix for 8x8 blocks [4] Resultant Matrix D is obtained by multiplying original matrix M with DCT matrix T and then again multiplying with transpose of DCT matrix T’ so that the original value of M is retained. The Discrete Cosine Transformation is accomplished by matrix multiplication 
D=TMT’ 
Resultant Matrix D is obtained: 
Fig: Resultant Matrix D. [4] 
2) QUANTIZATION 
Varying levels in 8x8 blocks of DCT coefficient in which compression and quantization are obtained by selecting specific quantization matrices are compressed by quantization. 
Fig: Quantized 8x8 block of DCT coefficients (level 50). [4]
M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. 
www.ijera.com 171 | P a g e 
For a quality level greater than 50 (less compression, higher image quality), the standard quantization matrix is multiplied by (100-quality level)/50. For a quality level less than 50 (more compression, lower image quality), the standard quantization matrix is multiplied by 50/quality level. [4] 
Fig: Quantized 8x8 block of DCT coefficients (level 10). [4] 
Fig: Quantized 8x8 block of DCT coefficients (level 90). [4] Quantization is achieved by dividing each element in the transformed image matrix D by the corresponding element in the quantization matrix, and then rounding to the nearest integer value. 
Quantization matrix Q50 is used: 
Fig: Quantized Matrix [4]. In the matrix C obtained above, the lowest frequency coefficients situated in the upper –left corner are sensitive to human eye, so they are not discarded where as high frequency coefficients which are less important situated in the lower right corner are discarded leading to a lossy compression. 
3) CODING 
The image which is constituted of an array of compressed blocks is stored in a drastically reduced amount of space. An encoder converts all coefficients of quantized matrix C to a stream of binary data after which most of the coefficients are zeros. 
Fig: zig-zag sequence of compressed binary data [4]. 
4) DECOMPRESSION 
Then the image is re-constructed through decompression, a process that uses the Inverse DCT.Reconstruction of our image begins by decoding the bit stream representing the quantized matrix C. 
퐶푖,푗=푟표푢푛푑( 퐷푖,푗 푄푖,푗 ) 
푅푖,푗= 푄푖,푗 ∗(퐶푖,푗)
M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. 
www.ijera.com 172 | P a g e 
5) INVERSE DISCRETE COSINE 
TRANSFORM(IDCT) 
The Inverse Discrete Cosine Transform (IDCT) 
is applied to matrix R by multiplying transpose of 
DCT matrix first T’ and then with DCT matrix T, 
which is rounded to the nearest integer. Original 
Matrix M is obtained by adding 128 to each entry so 
that the pixel value range from (0, 2^p-1). 
Fig: Output Matrix (Decompressed) [4]. 
VI. EXPERIMENTAL RESULTS 
The process of coding was carried out with the 
help of MATLAB. First with the quality value 
provided by the user, the pure image is compressed 
with the desired quality.Finally the selected portion 
which is important to the user is compressed by 
providing more quality and the portion of image 
which is irrelevant to the user is compressed with less 
quality, thus gaining Region of Interest compression. 
This process is implemented on defective leather 
samples. Here, only the defective part of the leather 
sample is important and thus we can use Region of 
interest compression by compressing the defect with 
high quality so that the defect is very clear. Whereas 
the rest of the sample can be compressed more as it 
contains the irrelevant information. Thus, Region of 
interest compression gives more efficient results(by 
highlighting the defects) than compressing the whole 
image with the same quality. 
The original image of a leather sample is 
Complete image compression with quality 95% 
The size of this image which is compressed with 
the same quality throughout is 35.5MB. 
VII. REGION OF INTEREST 
COMPRESSION 
The Region of Interest is selected i.e. the defect 
is selected by the user 
restored image from dct
M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com 
ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. 
www.ijera.com 173 | P a g e 
Quality of compression that is applied to the 
background is 1% Quality of compression that is 
applied to the subject(Defect) is 95% 
The size of this image which is compressed based on 
Region of Interest is 5.64MB. 
VIII. CONCLUSION 
In this paper, we describe a much efficient 
method of compressing image based on the idea of 
what is required and what is not in the image data, 
and there by applying the required amount of 
compression at different parts of the image. The user 
can select any part of image and can enter the 
required quality for compression, if the subject is 
more important then more quality to the subject is 
provided by the user and less to the background. 
otherwise if the subject is irrelevant to user and 
background is important then more quality is 
provided to the background and less to the subject. 
By using this we can create images that are memory-efficient 
that contains only the required data from the 
JPEG file. 
REFERENCES 
[1] http://en.wikipedia.org/wiki/Image_file_for 
mats#JPEG.2FJFIF; Wikipedia 
[2] http://en.wikipedia.org/wiki/JPEG;Wikipedi 
a 
[3] A method for signalling block-adaptive 
quantization in baseline sequential JPEG 
Kakarala, R. ; Bagadi, R. TENCON 2009 - 
2009 IEEE Region 10 Conference; 
10.1109/TENCON.2009.5396160 
[4] Image Compression and Discrete Cosine 
Transform ;Ken Cabeen and Peter Gent, 
Math 45,College of Redwoods. 
[5] http://www.ams.org/samplings/feature-colu 
mn/fcarc-image-compression 
[6] http://www.ijmer.com/papers/Vol2_Issue4/F 
N2428292831.pdf 
[7] Advance Digital Signal Processing-JPEG 
for Still Image Compression-Tutorial-Po- 
Hong Wu, Ting-Yu Chen 
[8] Gonzalez, R.C. and R.E.Woods, “Digital 
image processing”, New Jersey: Prentice 
Hall, 2002 
overall image

More Related Content

PDF
Efficient Image Compression Technique using JPEG2000 with Adaptive Threshold
CSCJournals
 
PDF
Automatic Determination Number of Cluster for NMKFC-Means Algorithms on Image...
IOSR Journals
 
PDF
Performance analysis of Hybrid Transform, Hybrid Wavelet and Multi-Resolutio...
IJMER
 
PDF
Jl2516751681
IJERA Editor
 
PDF
Medial axis transformation based skeletonzation of image patterns using image...
International Journal of Science and Research (IJSR)
 
PDF
A New Approach for Segmentation of Fused Images using Cluster based Thresholding
IDES Editor
 
PDF
Content Based Image Retrieval Using 2-D Discrete Wavelet Transform
IOSR Journals
 
PDF
4 ijaems jun-2015-5-hybrid algorithmic approach for medical image compression...
INFOGAIN PUBLICATION
 
Efficient Image Compression Technique using JPEG2000 with Adaptive Threshold
CSCJournals
 
Automatic Determination Number of Cluster for NMKFC-Means Algorithms on Image...
IOSR Journals
 
Performance analysis of Hybrid Transform, Hybrid Wavelet and Multi-Resolutio...
IJMER
 
Jl2516751681
IJERA Editor
 
Medial axis transformation based skeletonzation of image patterns using image...
International Journal of Science and Research (IJSR)
 
A New Approach for Segmentation of Fused Images using Cluster based Thresholding
IDES Editor
 
Content Based Image Retrieval Using 2-D Discrete Wavelet Transform
IOSR Journals
 
4 ijaems jun-2015-5-hybrid algorithmic approach for medical image compression...
INFOGAIN PUBLICATION
 

What's hot (14)

PDF
Property based fusion for multifocus images
IAEME Publication
 
PDF
G04302058063
ijceronline
 
PDF
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
IOSR Journals
 
PDF
Comparative Study between DCT and Wavelet Transform Based Image Compression A...
IOSR Journals
 
PDF
Improved nonlocal means based on pre classification and invariant block matching
IAEME Publication
 
PDF
Ijcatr04051016
Editor IJCATR
 
PDF
F0342032038
ijceronline
 
PDF
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
IJCSEA Journal
 
PDF
H010315356
IOSR Journals
 
PDF
Image Enhancement Using Filter To Adjust Dynamic Range of Pixels
IJERA Editor
 
PDF
Cc24529533
IJERA Editor
 
PDF
A Study of Image Compression Methods
IOSR Journals
 
PDF
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
PDF
Paper id 27201451
IJRAT
 
Property based fusion for multifocus images
IAEME Publication
 
G04302058063
ijceronline
 
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
IOSR Journals
 
Comparative Study between DCT and Wavelet Transform Based Image Compression A...
IOSR Journals
 
Improved nonlocal means based on pre classification and invariant block matching
IAEME Publication
 
Ijcatr04051016
Editor IJCATR
 
F0342032038
ijceronline
 
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
IJCSEA Journal
 
H010315356
IOSR Journals
 
Image Enhancement Using Filter To Adjust Dynamic Range of Pixels
IJERA Editor
 
Cc24529533
IJERA Editor
 
A Study of Image Compression Methods
IOSR Journals
 
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Paper id 27201451
IJRAT
 
Ad

Viewers also liked (20)

PDF
Improving Data Storage Security in Cloud using Hadoop
IJERA Editor
 
PPT
Yellow Magic
Manuela Szekely
 
PDF
Enhancing Data Integrity in Multi Cloud Storage
IJERA Editor
 
PPTX
Ciencias sociales
Ana Maria
 
PDF
Design and Development of GIS Based Utility Management System at DOS Housing ...
IJERA Editor
 
PPTX
Tipos de lance de consórcio motos
Consórcio de Motos
 
PDF
Weekly Rainfall Analysis for Crop Planning Using Markov’s Chain Model for Kan...
IJERA Editor
 
DOCX
El teatro
Patricio Castillo
 
PPT
Blue Magic
Manuela Szekely
 
PDF
Design and Optimisation of Sae Mini Baja Chassis
IJERA Editor
 
PPT
tejeRedes. Resumen
tejeRedes
 
PDF
An On-Chip Bus Tracer Analyzer With Amba AHB For Real Time Tracing With Lossl...
IJERA Editor
 
PDF
Resultado categoria Plantados: CPAQ – Concurso Paulista de Aquapaisagismo 2014
AquaA3.com.br - Aquarismo Alagoano
 
PPT
Violet & Purple Magic
Manuela Szekely
 
PPTX
Cuento con 2 finales silemad lee
Silemadlee
 
PDF
Непосредственная образовательная деятельность в старшей группе экологического...
Ресурсный центр ГБОУ ЦРР - детский сад 26
 
PPT
Reunió De Pares
SES Sant Llorenç de Morunys
 
PDF
Palabra Dulce Conversatorio MUISCA 2011
María Eugenia Gallo Arbeláez
 
PPT
Tropical Dream
Manuela Szekely
 
PDF
HTML, CSS & JS: olhando pra frente
Luiz Oliveira
 
Improving Data Storage Security in Cloud using Hadoop
IJERA Editor
 
Yellow Magic
Manuela Szekely
 
Enhancing Data Integrity in Multi Cloud Storage
IJERA Editor
 
Ciencias sociales
Ana Maria
 
Design and Development of GIS Based Utility Management System at DOS Housing ...
IJERA Editor
 
Tipos de lance de consórcio motos
Consórcio de Motos
 
Weekly Rainfall Analysis for Crop Planning Using Markov’s Chain Model for Kan...
IJERA Editor
 
Blue Magic
Manuela Szekely
 
Design and Optimisation of Sae Mini Baja Chassis
IJERA Editor
 
tejeRedes. Resumen
tejeRedes
 
An On-Chip Bus Tracer Analyzer With Amba AHB For Real Time Tracing With Lossl...
IJERA Editor
 
Resultado categoria Plantados: CPAQ – Concurso Paulista de Aquapaisagismo 2014
AquaA3.com.br - Aquarismo Alagoano
 
Violet & Purple Magic
Manuela Szekely
 
Cuento con 2 finales silemad lee
Silemadlee
 
Непосредственная образовательная деятельность в старшей группе экологического...
Ресурсный центр ГБОУ ЦРР - детский сад 26
 
Palabra Dulce Conversatorio MUISCA 2011
María Eugenia Gallo Arbeláez
 
Tropical Dream
Manuela Szekely
 
HTML, CSS & JS: olhando pra frente
Luiz Oliveira
 
Ad

Similar to ROI Based Image Compression in Baseline JPEG (20)

PDF
Jl2516751681
IJERA Editor
 
PDF
Survey paper on image compression techniques
IRJET Journal
 
PDF
Paper id 25201490
IJRAT
 
PDF
B017120611
IOSR Journals
 
PDF
Jv2517361741
IJERA Editor
 
PDF
Jv2517361741
IJERA Editor
 
PDF
An efficient image compression algorithm using dct biorthogonal wavelet trans...
eSAT Journals
 
PDF
DCT based Steganographic Evaluation parameter analysis in Frequency domain by...
IOSR Journals
 
PDF
J017156874
IOSR Journals
 
PDF
Use of Wavelet Transform Extension for Graphics Image Compression using JPEG2...
CSCJournals
 
PDF
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
inventionjournals
 
PDF
An improved image compression algorithm based on daubechies wavelets with ar...
Alexander Decker
 
PDF
B070306010
IJERD Editor
 
PDF
steganography based image compression
INFOGAIN PUBLICATION
 
PDF
Jpeg image compression using discrete cosine transform a survey
IJCSES Journal
 
PDF
An approach for color image compression of bmp and tiff images using dct and dwt
IAEME Publication
 
PDF
41 9147 quantization encoding algorithm based edit tyas
IAESIJEECS
 
PDF
Review of Diverse Techniques Used for Effective Fractal Image Compression
IRJET Journal
 
PDF
Wavelet based Image Coding Schemes: A Recent Survey
ijsc
 
PDF
Post-Segmentation Approach for Lossless Region of Interest Coding
sipij
 
Jl2516751681
IJERA Editor
 
Survey paper on image compression techniques
IRJET Journal
 
Paper id 25201490
IJRAT
 
B017120611
IOSR Journals
 
Jv2517361741
IJERA Editor
 
Jv2517361741
IJERA Editor
 
An efficient image compression algorithm using dct biorthogonal wavelet trans...
eSAT Journals
 
DCT based Steganographic Evaluation parameter analysis in Frequency domain by...
IOSR Journals
 
J017156874
IOSR Journals
 
Use of Wavelet Transform Extension for Graphics Image Compression using JPEG2...
CSCJournals
 
Matlab Implementation of Baseline JPEG Image Compression Using Hardware Optim...
inventionjournals
 
An improved image compression algorithm based on daubechies wavelets with ar...
Alexander Decker
 
B070306010
IJERD Editor
 
steganography based image compression
INFOGAIN PUBLICATION
 
Jpeg image compression using discrete cosine transform a survey
IJCSES Journal
 
An approach for color image compression of bmp and tiff images using dct and dwt
IAEME Publication
 
41 9147 quantization encoding algorithm based edit tyas
IAESIJEECS
 
Review of Diverse Techniques Used for Effective Fractal Image Compression
IRJET Journal
 
Wavelet based Image Coding Schemes: A Recent Survey
ijsc
 
Post-Segmentation Approach for Lossless Region of Interest Coding
sipij
 

Recently uploaded (20)

PPTX
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
PDF
Zero Carbon Building Performance standard
BassemOsman1
 
PPTX
Information Retrieval and Extraction - Module 7
premSankar19
 
PPTX
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
JUAL EFIX C5 IMU GNSS GEODETIC PERFECT BASE OR ROVER
Budi Minds
 
PDF
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
2025 Laurence Sigler - Advancing Decision Support. Content Management Ecommer...
Francisco Javier Mora Serrano
 
PDF
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
PDF
Software Testing Tools - names and explanation
shruti533256
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PPTX
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
PDF
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
PDF
Introduction to Data Science: data science process
ShivarkarSandip
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
Zero Carbon Building Performance standard
BassemOsman1
 
Information Retrieval and Extraction - Module 7
premSankar19
 
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
JUAL EFIX C5 IMU GNSS GEODETIC PERFECT BASE OR ROVER
Budi Minds
 
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
2025 Laurence Sigler - Advancing Decision Support. Content Management Ecommer...
Francisco Javier Mora Serrano
 
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
Software Testing Tools - names and explanation
shruti533256
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
Introduction to Data Science: data science process
ShivarkarSandip
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 

ROI Based Image Compression in Baseline JPEG

  • 1. M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp.168-173 www.ijera.com 168 | P a g e ROI Based Image Compression in Baseline JPEG M M M Kumar Varma#1, Madhuri. Bagadi#2 Associate professor1, M.Tech Student2 Sri Sivani College of Engineering, Department of Computer Science Srikakulam, Andhrapradesh,, India ABSTRACT To improve the efficiency of standard JPEG compression algorithm an adaptive quantization technique based on the support for region of interest of compression is introduced. Since this is a lossy compression technique the less important bits are discarded and are not restored back during decompression. Adaptive quantization is carried out by applying two different quantization to the picture provided by the user. The user can select any part of the image and enter the required quality for compression. If according to the user the subject is more important than the background then more quality is provided to the subject than the background and vice- versa. Adaptive quantization in baseline sequential JPEG is carried out by applying Forward Discrete Cosine Transform (FDCT), two different quantization provided by the user for compression, thereby achieving region of interest compression and Inverse Discrete Cosine Transform (IDCT) for decompression. This technique makes sure that the memory is used efficiently. Moreover we have specifically designed this for identifying defects in the leather samples clearly. I. INTRODUCTION Images are being used very extensively to depict, analyze and share information in the world today. With the advent of new age gadgets like Smartphones and social networking websites like Facebook the use of images has increased even more. So, with the ever increasing usage of images, the need for efficient compression techniques without the loss of vital information is necessary. JPEG (Joint Photographic Experts Group) is a standardized compression method for organizing and storing digital images [1]. JPEG uses a lossy form of compression based on the discrete cosine transform [2]. There has been always a selectable tradeoff between storage size and image quality using JPEG. In Baseline Sequential Quantization the whole image can be compressed with desired quality,But the Region of Interest compression is not achieved. Adaptive Quantization should be used to obtain the desired compression for the subject and the background separately. Kakarala and Bagadi described that the traditional JPEG compression standard, unlike JPEG2000, does not prescribe a means for spatially-variable quantization of transform coefficients. This prevents useful features such as region-of-interest (ROI) coding, where, for example, the subject in a photograph may be lightly compressed while the background is heavily compressed to hide irrelevant details [3]. II. LITERATURE REVIEW The American Mathematical Society described the process of Baseline compression algorithm (lossy compression) taking an example of image whose dimensions are 250x375 giving a total of 93750 pixels requiring 281250 bytes of storage. However, that image is finally compressed such that it takes 32414 bytes for storage i.e., the image has been compressed by a factor of roughly nine. This article describes how the image can be represented in such a small file (compressed) and how it may be reconstructed (decompressed) from this file. The color space transformation used in preparing the image for compression is explained in detail [5]. Aruna and Ramesh demonstrated a simple method for signaling adaptive quantization to the decoder, using the empty slots in standard baseline Huffman table. This is useful for ROI coding, which has the advantage of improving image quality in selected regions. They also showed how the encoder may be modified to produce an output that is in compliant with the standard and how the decoder may be modified to correctly recover the adaptively quantized image [6].The basic concepts and definitions involved in simple JPEG compression are referred. Description of differences between lossless and lossy compressions, Baseline sequential and progressive formats etc. Overview of the Baseline sequential JPEG encoding and decoding processes as a whole using flowcharts and various other figures [2]. Kakarala and Bagadi showed how the quantization may be adapted in each block and how the adaption may be signaled to the decoder in a memory efficient manner. They also explained how this adaptation allows ROI (Region of Interest) coding of subject and background. Examples are shown to illustrate adaptive quantization, signaling and decoding [3]. Ken cabeen and Peter gent explained the need for image compression and also illustrated the RESEARCH ARTICLE OPEN ACCESS
  • 2. M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. www.ijera.com 169 | P a g e various equations of the DCT and its uses with image compression. The JPEG method is described step by step in detail. They also showed how the DCT (Discrete Cosine Transformation) and the IDCT (Inverse DCT) are applied to each block. This whole process is demonstrated taking a matrix as an example which represents the block of image-pixel values [4].Tutorial-Po-Hong Wu, Ting-Yu Chen describes the popular JPEG still image coding format. The purpose is to compress images while maintaining acceptable image quality. Also the focus is on the DCT and quantization. The entropy coding is also briefly discussed [7]. III. PROPOSED ALGORITHM IV. DETAILED ALGORITHM OF COMPRESSION STEP 1: The image is broken into 8x8 Blocks of Pixels. STEP 2: Working from left to right,top to bottom DCT(DiscreteCosine Transform) is applied to each block. STEP 3: Each block is compressed through Quantization. STEP 4: The array of compressed blocks that constitute the image is stored in drastically reduced amount of space. STEP 5: When desired the image is re-constructed through Decompression, a process that Uses Inverse DCT. STEPS 1-5 above use DCT based image Compression[8]. V. HOW JPEG ALGORITHM WORKS FOR A GIVEN IMAGE First, the image is broken into 8x8 blocks of pixels as shown in the image below. Fig: Shows an image with 8x8 blocks and inset image [image source[5]]. Now we convert this image into a matrix representation of pixels. Let each pixel is represented by p bits, the pixel value is in the range of (0, 2^p-1). We represent this matrix as Original as shown below. Fig: Matrix representation of the pixels [4] Pixel values are shifted from (0,2^p-1) to (-2^p- 1,(2^p-1)-1).Since our p=8 so shift the values from(0,255) to (-12,127) because DCT requires range be centered around 0.Each value of the matrix from left to right and top to bottom is leveled off by subtracting 128.We represent the matrix by M. Load the input image Identify the ROI(Region Of Interest) Compress the ROI and the rest of the image with different Quality values Display the Resultant image
  • 3. M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. www.ijera.com 170 | P a g e Fig: Levelled of matrix [4] 1) Discrete Cosine Transform (DCT): DCT converts intensity function into weighted sum of periodic basis (cosine) functions. It identifies band of spectral information which can be thrown away without loss of quality .So DCT converts spatial domain to frequency domain. The DCT equation computes the i,jth entry of the DCT of an image Where x,y range from 0 to N-1 To get the matrix form of the above equation, we will use the following equation N is the size of the block. P(x, y) represents x yth element of the image represented by matrix P. DCT matrix of an 8x8 blocks is as shown below: Fig: DCT matrix for 8x8 blocks [4] Resultant Matrix D is obtained by multiplying original matrix M with DCT matrix T and then again multiplying with transpose of DCT matrix T’ so that the original value of M is retained. The Discrete Cosine Transformation is accomplished by matrix multiplication D=TMT’ Resultant Matrix D is obtained: Fig: Resultant Matrix D. [4] 2) QUANTIZATION Varying levels in 8x8 blocks of DCT coefficient in which compression and quantization are obtained by selecting specific quantization matrices are compressed by quantization. Fig: Quantized 8x8 block of DCT coefficients (level 50). [4]
  • 4. M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. www.ijera.com 171 | P a g e For a quality level greater than 50 (less compression, higher image quality), the standard quantization matrix is multiplied by (100-quality level)/50. For a quality level less than 50 (more compression, lower image quality), the standard quantization matrix is multiplied by 50/quality level. [4] Fig: Quantized 8x8 block of DCT coefficients (level 10). [4] Fig: Quantized 8x8 block of DCT coefficients (level 90). [4] Quantization is achieved by dividing each element in the transformed image matrix D by the corresponding element in the quantization matrix, and then rounding to the nearest integer value. Quantization matrix Q50 is used: Fig: Quantized Matrix [4]. In the matrix C obtained above, the lowest frequency coefficients situated in the upper –left corner are sensitive to human eye, so they are not discarded where as high frequency coefficients which are less important situated in the lower right corner are discarded leading to a lossy compression. 3) CODING The image which is constituted of an array of compressed blocks is stored in a drastically reduced amount of space. An encoder converts all coefficients of quantized matrix C to a stream of binary data after which most of the coefficients are zeros. Fig: zig-zag sequence of compressed binary data [4]. 4) DECOMPRESSION Then the image is re-constructed through decompression, a process that uses the Inverse DCT.Reconstruction of our image begins by decoding the bit stream representing the quantized matrix C. 퐶푖,푗=푟표푢푛푑( 퐷푖,푗 푄푖,푗 ) 푅푖,푗= 푄푖,푗 ∗(퐶푖,푗)
  • 5. M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. www.ijera.com 172 | P a g e 5) INVERSE DISCRETE COSINE TRANSFORM(IDCT) The Inverse Discrete Cosine Transform (IDCT) is applied to matrix R by multiplying transpose of DCT matrix first T’ and then with DCT matrix T, which is rounded to the nearest integer. Original Matrix M is obtained by adding 128 to each entry so that the pixel value range from (0, 2^p-1). Fig: Output Matrix (Decompressed) [4]. VI. EXPERIMENTAL RESULTS The process of coding was carried out with the help of MATLAB. First with the quality value provided by the user, the pure image is compressed with the desired quality.Finally the selected portion which is important to the user is compressed by providing more quality and the portion of image which is irrelevant to the user is compressed with less quality, thus gaining Region of Interest compression. This process is implemented on defective leather samples. Here, only the defective part of the leather sample is important and thus we can use Region of interest compression by compressing the defect with high quality so that the defect is very clear. Whereas the rest of the sample can be compressed more as it contains the irrelevant information. Thus, Region of interest compression gives more efficient results(by highlighting the defects) than compressing the whole image with the same quality. The original image of a leather sample is Complete image compression with quality 95% The size of this image which is compressed with the same quality throughout is 35.5MB. VII. REGION OF INTEREST COMPRESSION The Region of Interest is selected i.e. the defect is selected by the user restored image from dct
  • 6. M M M Kumar Varma Int. Journal of Engineering Research and Applications www.ijera.com ISSN : 2248-9622, Vol. 4, Issue 9( Version 1), September 2014, pp. www.ijera.com 173 | P a g e Quality of compression that is applied to the background is 1% Quality of compression that is applied to the subject(Defect) is 95% The size of this image which is compressed based on Region of Interest is 5.64MB. VIII. CONCLUSION In this paper, we describe a much efficient method of compressing image based on the idea of what is required and what is not in the image data, and there by applying the required amount of compression at different parts of the image. The user can select any part of image and can enter the required quality for compression, if the subject is more important then more quality to the subject is provided by the user and less to the background. otherwise if the subject is irrelevant to user and background is important then more quality is provided to the background and less to the subject. By using this we can create images that are memory-efficient that contains only the required data from the JPEG file. REFERENCES [1] http://en.wikipedia.org/wiki/Image_file_for mats#JPEG.2FJFIF; Wikipedia [2] http://en.wikipedia.org/wiki/JPEG;Wikipedi a [3] A method for signalling block-adaptive quantization in baseline sequential JPEG Kakarala, R. ; Bagadi, R. TENCON 2009 - 2009 IEEE Region 10 Conference; 10.1109/TENCON.2009.5396160 [4] Image Compression and Discrete Cosine Transform ;Ken Cabeen and Peter Gent, Math 45,College of Redwoods. [5] http://www.ams.org/samplings/feature-colu mn/fcarc-image-compression [6] http://www.ijmer.com/papers/Vol2_Issue4/F N2428292831.pdf [7] Advance Digital Signal Processing-JPEG for Still Image Compression-Tutorial-Po- Hong Wu, Ting-Yu Chen [8] Gonzalez, R.C. and R.E.Woods, “Digital image processing”, New Jersey: Prentice Hall, 2002 overall image