Click here to load reader
Upload
hamed-parsiani
View
216
Download
1
Embed Size (px)
Citation preview
P e r g a m o n
Computers ind. Engng Vol. 33, Nos 1-2, pp. 437-440, 1997 O 1997 Elsevier Science Ltd
Printed in Great Britain. All rights reserved 0360-8352/97 $17.00 + 0.00
P l l : S0360-8352(97)00131-9
Analysis of Iterated Block Matching Fractals for Image Compression
Hamed Parsiani, Ricardo Gareia Electrical & Computer Engineering Dept.
University of Puerto Rico Mayaguez, Puerto Rico, 00681 [email protected]
A B S T R A C T
The Iterated Block Matching is a Fractal method of near real time Compression of images. It was introduced by Jacquin in 1992. This method encodes an image using the image itself.
In this paper, the mathematical procedure of this method, for both encoder and decoder of images, are explained using Taylor Series expansion.
It is shown that the encoder / decoder computational intensity is not symmetric, hence, it permits a fast decoder at the cost of a slow encoder. © 1997 Elsevier Science Lid
INTRODUCTION
The concept Of Fractals dates back to about 1982, when Mandelbrot [1] observed that what we see around us is an intricate arrangement of features. If an image contains similar details, but at different scales, then it is a fractal image. Once these similarities (or redundancies) are taken out then we have fractal image compression.
The Fractals as conceived by Bamsley [2][3], finds the basic features in an image, creates mathematical models of them, then defines the relations between pieces of the image and the basic features. One needs to know well the relationship between "formulas" for transformations and the resultant stretching, twisting, folding and skewing affecting the underlying image. This method proved to be a hardly acceptable approach to real time compression, as it required an expert to thoroughly analyze one image at a time, find the features, determine the respective "formulas", and then proceed to compression.
Amaud Jacquin's work [4] on the principle of block matching does not rely on modeling of features by formulas. In this work, the Iterated Block Matching is explained and the mathematics of the encoder and decoder are derived using Taylor Series expansion.
437
438 21st International Conference on Computers and Industrial Engineering
ITERATED BLOCK MATCHING ENCODER
The image fractal similarities are exploited by trying to code the image using itself. In this method, the image is broken down into equal size blocks (16x16) called domains. Then an image block (8x8) to be encoded (called range block) is compared for the best match with each domain block (contracted to size 8x8) from the domain pool. The matching parameters obtained are contrast scaiings and luminance shifts. To increase the probability of finding a good match, different orientations (or isometries) of the domain blocks are created which produce a large pool of domain blocks with more varieties.
Contrast Scaling and Luminance Shift Derivation
Consider the Taylor Series expansion of fix), and keep its first two terms.
o r
let
let
let
f ( x ) = f ( a ) + (x - a ) f ' ( a ) + - -
f ( x ) = f ( a ) + (x - a ) f ' ( a )
AY a
f ' ( a ) = Ax "~"
Im = Image,
x = Irdoj
f (x ) = I n ~
a = I~lnj f ( a ) = I~IR,
( x - a y 2! f " ( a ) + . . .
Dj = j,h domain block,
j,h domain block in Im
j,h approximate range block in Im
Mean o f D j
Mean of R~
Ay = f (x) - f (a) = In~g - I~IR, ~ drlR, Ax = x - a = I ~ o j - I~loj A drloj
ay f ' ( a ) --- - ~ = a~ A Contrast Scale Factor -
Approx. Range Derivation
Define Luminance Shift A gi = I~l~i - aiI~loj
Therefore the Approx. Range is I n ~ = otjln~o j + A g~
R j= j,h range block
dr[ Ri
a % (1)
(2)
(3)
Fractal Image Coding
The coding of an image is done block by block in a raster scan fashion. Each block (a range) is coded by searching the pool of domains for the best match. The search time could be reduced by first classifying the image into blocks of the same type. Three block types are
21st International Conference on Computers and Industrial Engineering 439
defined as: shade blocks, midrange blocks, and edge blocks. The domain pool is generated by sliding a window of size DxD (D=2B) across the original image in steps of B/2. Then the blocks are classified accordingly.
Encoding procedure
Scan the image taking one block (range) at a time and doing the following:
Compare Ri against Dj
dr(ImlR~) 1) Calculate ot~- dr(Imloj) 2) Calculate Ag~ = I~[Rj - aiI~loj
3) Form the transformed domain Irnl6j
Imlbj = a/IIr~z)jl+ Ag~,
where Iml6j is the best approximate of the range block to be coded using the best match Dj.
An exhaustive search is made to determine all of ImJbj transformed domains. A distortion
measure (RMS value) is calculated for each In~bj and Ir~R~ ~' j ~ i and the minimum
distortion corresponds to the nearest matched block In~6k to the i 'h range image ImlR~.
To reduce the amount of Encoding Computation the image can be partitioned into smaller size windows (preferably moving windows with the Im[~ at its center) and the search for the best matched block can be done only within this window.
Parameters to be transmitted
Shade Blocks: Average gray level, I~lRi, and the block's location (x,y) are transmitted.
Midrange and Edge Blocks: In the process of finding the best match, several variables are saved. These variables
are: the type of the best found isometry, Ii, the location of the best match domain block, (x,y), the contrast scaling factor, a t , and the luminance shift, Ag~. There are about eight isometrics to be considered. These are:
Identity, rotations of 90, 180, 270 degrees, flip about the horizontal axis, flip about the vertical axis, flip about the diagonal axis of positive slope,
440 21st International Conference on Computers and Industrial Engineering
flip about the diagonal axis of negative slope. The general variables transmitted are: the type of blocks, IHIR~ , the type ofisometry (i=1,...,8), (x,y), ~z~ , and A g i .
DECODING PROCEDURE
1) Initialize the entire image plane to some value or an unrelated image.
The variables received are used for the decoding purposes. If the block type variable indicates a shade block then the uniform value of I~lRi fills a block at the (x,y) address. If the block type is different then the following procedure is implemented.
2) Locate the matched block using the domain (x, y) address. Apply the affine transformation on this domain block to calculate range block.
(i.e. 1 st iteration decoded Range block = a t In~% + A gi )
Do this operation on all of the image blocks.
3) Repeat this process and then measure the change in the image from the previous iteration. If this change is zero or within a negligible threshold value, then stop, otherwise continue the iteration.
CONCLUSION
The encoder algorithm is much more computationally intensive than the decoder since it requires a thorough search for the best match. The computation for every matching operation requires eight isometries to be tested, and for every isometry an oq , and a Agi , and an approximate range, In~k~ must be calculated. Finally an euclidean distance error must be calculated for each matching operation.
The decoder algorithm has substantially lesser computation as the equation of the range block must be mainly iterated upon until the image converges with a minimum error threshold.
REFERENCES
[1] B. Mandelbrot, "The Fractal Geometry of Nature". San Francisco, CA: Freeman, 1982. [2] M.F. Bamsley and S. Demko, "Iterated function systems, and global construction of
fraetals," Proc. Roy. Soc. London, vol. A399, pp. 243-275, 1985. [3] M.F. Barnsley, "Fractals Everywhere". New York, Academic Press, 1988. [4] A.E. Jacquin, "Fractal Image Coding: A Review," Proceedings of the IEEE, vol. 81, No.
10, Oct. 1993.