Sei sulla pagina 1di 29

Content-Based Image Retrieval Using Error

Diffusion Block Truncation Coding Features


Jing-Ming Guo, Senior Member, IEEE, Heri Prasetyo, and Jen-Ho Chen

Shabeeb Ali O

Government Engineering College Kozhikode

December 1, 2018
Outline

I Introduction
I Methodology
I Performance Measurement
I Result
I References
Introduction

I In Classical CBIR (Content Based Image Retrieval) approach


image descriptor is extracted from original image.
I This paper introduce a retrieval scheme that directly
generates image features from compressed stream.
I This paper presents a new approach to index color images
using the features extracted from the compressed stream
Introduction

BTC
I The Block Truncation Coding (BTC) was introduced by Delp
and Mitchell in 1979.
I A technique used for image compression.
I Low Complexity.
I An image is divided into non overlapping blocks of equal size:
’M × N’ pixels
I First and second moment of each block is preserved.
Introduction

BTC: Procedure
I Given an image of size P×Q
I BTC divides the original image into non overlapped blocks of
size : M×N
I These blocks are processed independently and coded using a
two level quantizer. Thus each block will be transmitted as a
set of two values
Introduction

BTC:Procedure
I The first and second moment of the block are calculated as
M X
N
1 X
x= xi,j
M ×N
i=1 j=1

M X
N
1 X
2
x2 = xi,j
M ×N
i=1 j=1

I The corresponding variance is calculated by:

σ2 = x 2 − x 2
Introduction
BTC:Procedure
I BTC is a 1 bit quantizer with threshold therefore, the bitmap
is calculated as

1, if xi,j ≥ x
hi,j =
0, if xi,j < x
I And the reconstructed result is given by:

a, if hi,j = 0
yi,j =
b, if hi,j = 1
I The variables a and b is given by:
r
m−q
r
q
a=x −σ 0
,b = x + σ
m−q q
where m = M × N, and q denotes denotes the number of
pixels greater than x, and q 0 is the number of pixels less than
x.
Introduction
BTC
Introduction
BTC: Disadvantages
I Blocking Effect

Figure: (a) Original Image (b) Blocking Effect after BTC

I False Contour
False contouring is also known as ”posterizing” or
”quantization noise,” and it refers to the creation of false
edges or outlines where the original scene had none.
Introduction

EDBTC : Error Diffused Block Truncation Coding


I It solves inherent problems of BTC.
I The EDBTC compresses an image in an effective way by
incorporating the error diffusion kernel to generate a bitmap
image.
I For each image block, produces a single bitmap image
bm(x, y ) and two extreme (color) quantizers (qmin and qmax ).
I EDBTC bitmap image is constructed by considering the
quantized error which diffuses to the nearby pixels
Introduction
EDBTC
I To generate the bitmap image h(x, y ), the BTC scheme
performs thresholding operation in each block.

1, if f (x, y ) ≥ x
h(x, y ) =
0, if f (x, y ) < x

where f (x, y ) is the interband average value given by


1
f (x, y ) = (fR (x, y ) + fG (x, y ) + fB (x, y ))
3
The fR (x, y ), fG (x, y ), and fB (x, y ) denote the image pixels in
the red, green, and blue (RGB) color channels, respectively.
x is the mean value of interband average pixels of the block.
m X
n
1 X
x= f (x, y )
M ×N
x=1 y =1
Introduction
EDBTC
I The intermediate value o(x, y ) is also generated at the same
time with the bitmap image generation.

xmax , if h(x, y ) = 1
o(x, y ) =
xmin , if h(x, y ) = 0
I The residual quantization error of EDBTC can be computed as

e(x, y ) = f (x, y ) − o(x, y )


I One pixel is only processed once, and the residual
quantization error is diffused and accumulated into the
neighboring unprocessed pixels.
I The value f (x, y ) of unprocessed yet pixel is updated using
the following strategy:

f (x, y ) = f (x, y ) + e(x, y ) ∗ 

where  is the error kernel.


Introduction

EDBTC
I Two extreme color quantizers are computed by looking for the
minimum and maximum of all image pixels in each image
block as:
qmin (i, j) = {min(fR (x, y )), min(fG , (x, y )), min(fB (x, y ))}, ∀x, y
qmax (i, j) = {max(fR (x, y )), max(fG , (x, y )), max(fB (x, y ))}, ∀x, y
Introduction

CBIR: Content Based Image Retrieval


I Indexing
I Searching
Methodology

Indexing
I Images in the databse are converted into feature vectors and
stored
I All images are compressed with EDBTC.
I Descriptors are obtained from two quantizers and bitmap
image
I Decriptors
I CHF: Color Histogram Feature
I BHF: Bit Pattern Histogram Feature
I Vector Quantization is used.
Methodology

Indexing -> Vector Quantization


I Let C ={c1 , c2 · · · cNc } be the color codebook generated using
VQ consisting Nc codewords.
I Let the bit pattern codebook B ={B1 , B2 , · · · BNc } consisting
of Nb binary codewords.
I Given the color codebook the VQ indexes the EDBTC
minimum and maximum quantizers using
i min (i, j) = argmin k qmin (i, j), ckmin k2
k=1,2,..Nc

i max (i, j) = argmax k qmax (i, j), ckmax k2


k=1,2,..Nc

for all i = 1, 2, · · · P/M, and j = 1, 2, · · · Q/N. The symbols i and


j denote the index of image block.
Methodology

Indexing -> Vector Quantization


I At the same time, the VQ indexes the EDBTC bitmap image
bm(i, j) = {h(x, y )|x = 1, 2, · · · m, y = 1, 2, · · · n} with the bit
pattern codebook B = {B1 , B2 , · · · BNc } using:

b(i, j) = argmin δ{bm(i, j), Bk }


k=1,2,···Nb

for all i = 1, 2, · · · P/M, and j = 1, 2, · · · Q/N. The symbol


δ{·, ·} denotes the Hamming distance between two binary
patterns (vectors).
I These VQ-indexed information are useful for indexing an
image.
Methodology

Indexing -> CHF: Color Histogram Feature


I The CHF is derived from the two EDBTC color quantizers.
I The CHFmin and CHFmax are developed from the color
minimum and maximum quantizers, respectively.
CHFmin (k) = Pr {i min (i, j) = k|i = 1, 2, · · · P/M, j = 1, 2, · · · Q/N}
CHFmax (k) = Pr {i max (i, j) = k|i = 1, 2, · · · P/M, j = 1, 2, · · · Q/N}

I The CHFmin and CHFmax are the VQ-indexed histogram from


the color minimum and maximum quantizers, respectively.
Methodology
Indexing -> CHF: Color Histogram Feature
Methodology

Indexing -> BHF: Bit Pattern Histogram Feature


I This feature captures the visual pattern, edge, and textural
information in an image.
I The BHF can be obtained by tabulating the occurrence of a
specific bit pattern codebook in an image.

BHF (k) = Pr {b(i, j) = k|i = 1, 2, · · · P/M, j = 1, 2, · · · Q/N}


Methodology
Indexing -> BHF: Bit Pattern Histogram Feature
Methodology
Searching

Figure: Schematic diagram of image retrieval


Methodology
Searching
I The similarity distance between the two images, namely, query
and target images, is defined as
query target
P c |CHFmin (k) − CHFmin (k)|
δ(query , target) = α1 N k=1 query target
CHFmin (k) + CHFmin (k) + 
query target
PNc |CHFmax (k) − CHFmax (k)|
+α2 k=1 query target
CHFmax (k) + CHFmax (k) + 

PNb |BHF query (k) − BHF target (k)|


+α3 k=1 BHF query (k) + BHF target (k) + 

I where α1 , α2 , and α3 are the similarity weighting constants


representing the percentage contribution of the CHF and BHF
in the proposed image retrieval process.
Performance Measurement

I Precision
nq
P(q) =
L
I Recall
nq
R(q) =
Nq
where nq and Nq denote the number of relevant images
against a query image q, and the number of all relevant
images against a query image q in database. L is the number
of retrieved images
Performance Measurement

I Average Retrieval rate (ARR)

DB
#
1 X
ARR = R(l1 , n)
|DB|
i=1 n≥16

nq
R(l1 , n) =
Nq
where |DB| denotes the total number of images in the
database.
Performance Measurement

Figure: Effectiveness of CHF and BHF


Performance Measurement

Figure: Effectiveness of CHF and BHF


Result

Figure: Retrieved Images (Corel 1000 Dataset)


References

[1] Jing-Ming Guo,Heri Prasetyo and Jen-Ho Chen,


”Content-Based Image Retrieval Using Error Diffusion Block
Truncation Coding Features”, IEEE Trans. Circuits and
Systems., Vol.25, No. 3, pp. 466-481, 2015.
[2] E. J. Delp and O. R. Mitchell, ”Image compression using block
truncation coding”, IEEE Trans. Commun, Vol. 27, No. 9, pp.
1335–1342, 1979
[3] J.-M. Guo and Y.-F. Liu, ”Improved block truncation coding
using modified error diffusion”, IEEE Trans. Consum.
Electron.,Vol.44, No.7 pp. 462–464, 2008.

Potrebbero piacerti anche