From: z_youngwd@ccsvax.sfasu.edu
Newsgroups: alt.fractals
Subject: Fractal Image Compression
Date: 12 Sep 92 09:00:50 CST
Organization: Stephen F. Austin State University


A few days ago I posted some preliminary work on fractal image
compression in /tmp@ftp.uu.net.

For those of you who don't know, (read the FAQ) there is an
ftp site for chaos related programs and papers at

                  lyapunov.ucsd.edu

in the /pub directory.

Matt Kennel has allowed me to place my work in the 
/pub/young-fractal directory.

Here are the contents.

-rw-r-----  1 ftp      staff        4555 Sep 11 01:00 unifs09b.doc
-rw-r-----  1 ftp      staff     1160674 Sep 11 00:57 unifs09b.tar.Z
-rw-r-----  1 ftp      staff      976666 Sep 11 00:54 unifs09b.zip

Both the .tar.Z and .zip files have identical contents.  Please anonymous
ftp them if you are interested.

They contain the following compressed images.

MILO.IFS : a cat
COLLIE.IFS : a dog
PUNKY.IFS : a cat
FIJI.IFS : a native of the fiji islands (guess?)
GASPRA.IFS : an asteroid
LENA.IFS : standard picture of woman used in evaluating compression algs.
MARA.IFS : a man
ELLE.IFS : elle macpherson
ISLAND.IFS : an island scene
MANDRILL.IFS : a primate
MOUNT.IFS : a mountain
SMITH.IFS : the smithsonian
WWHEEL.IFS : a waterwheel

The original images are included.  Both files are viewed during decompression
There is some code for converting the .ifs files to .tga files.

UNIFS was written in 'C', and compiled using GCC 1.08 for MSDOS systems.
The source is included, along with some sample compressed images.
(I'm a mathematician, not a 'C' programmer... I just dabble in 'C',
no hate mail, please)

The file UNIFS.EXE is prepended with a copy of GO32.EXE.

                  ***** GETTING UNIFS.EXE TO RUN *****

UNIFS.EXE will run only on a 386 or higher.  A math coprocessor
is required.

I recommend at least 1 meg of memory, but it will be _slow_.
It is very fast as long as is doesn't have to page to disk.

Drivers for supported video cards are included.
You'll have to decide by the driver filename whether there is
one for your card.  These come straight from GCC 1.08 distribution.

AHEADA.GRD AHEADB.GRD ATI.GRD CHIPS.GRD EVEREX.GRD GENOA.GRD OAK.GRD
PARADISE.GRD TRIDENT.GRD TRIDNT89.GRD TSENG3K.GRD TSENG4K.GRD VGA.GRD
VIDEO7.GRD 

You need to set the following environment variables:
        set 387=yes
        set GO32=driver foo.grd gw 640 gh 480

The program is written to display at 640x480 with 256 shades of gray.
(of course we know vga cards only display 6 bits worth)
The 640x480 will allow you to see all of the data mentioned below.
If all you can get is 320x200x256... it will run but you'll be missing
alot.


                   ***** INFORMATION ON IMAGES *****

The images are _not_ stored optimally.  I'm still working on the actual
compression routines, so I'm not concerned with writing the files out
optimally just yet.  My thesis doesn't have to be finished until
June 1993, so don't expect anything soon.

Each transformation uses 56 bits of storage, but only 38 bits
are significant.

At 38 bits per transformation, COLLIE compressed to 17646 bytes.
This is a compression ratio of 3.71 to 1.  You can judge the
quality for yourself.  If you don't like using only the significant
bits, it compresses to 26005 bytes.  This is a compression ratio
of 2.51 to 1. (still pretty good)

At decompression time, you will see 3 values displayed.

        Number of Transformations = what else
        RMS = root mean square error
        PSNR = peak signal to noise ratio (in decibels)

I included the source for skeptics...
Don't waste your time trying to reverse engineer the compression
scheme... the basic idea is in Yuval Fisher's paper in

               /pub/inls-ucsd/fractal-2.0.tar

The paper is _very_ informative.

Enjoy.

Wayne Young
z_youngwd@ccsvax.sfasu.edu