Math 2601.
SVD image compression Extra Credit.
Nolan Leake

This is the web front end to my maple based image compressor.  When you type a URL into the box below and hit enter, a CGI script on my webserver calls "wget" (a command line ftp/http downloader) to download the image into a temporary directory.  It then calls "convert" to change the format (gif, jpg, etc) of the image to raw binary pixels.  It also bilinear-filters the image to 80 by 80 pixels, and converts to greyscale.  The CGI script then reads this file into memory, converts the binary values (from 0 to 255) to space seperated, textual floating point numbers between 0 and 1.  The script then generates a maple script using the proper rank, and calls the command line version of maple to run it. The maple procedure reads the image matrix, does the SVD, zeros out all but the K highest values, and then multiplies U &* C &* inverse(V) to get the decompressed image.  The maple procedure then saves this uncompressed matrix back to disk.  Now, the CGI script reads the output file maple wrote, and converts it back to a raw binary image file.  Finally, the script calls convert again to convert to a GIF file, which is then sent back to your browser by the webserver.

It takes up to 3 minutes to process, this machine is only a 90Mhz pentium.

I also reduced the image size to 60 by 60 pixels, to keep processing time under control.

An example image is in the URL box below.  You can choose the rank approximation with the dropdown list box.

This is an example image (uncompressed), which is the default in the text box:
you really need a graphical browser for this!


rank:


When you've had enough fun with image compression, check out my java game (its an test of my 3D engine, which is itself an application of linear algebra).


-------------------