Introduction
The purpose of this exercise is to help you understand the various parameters that affect the quality of a compressed image. Using JPEG as an example, you are required to write a program to control the quantization matrices used for compression. A brief discussion of the impact is included as part of the request.
Follow these steps:
Download this image. Note that the image is in bitmap format and is quite large. If you are running on unstable Internet service and have a problem downloading the file, please contact your tutor for assistance. flower.bmp
Write a Java class that converts the bitmap image to JPEG format.
- Add a second viewable pane on your image viewer in TME 1. The original pane should display the original bitmap image, and the second pane should display the converted JPEG image. TME2_Sample_Screen.JPG
- Add a mechanism to input the quantization matrix. It should have three options:
- default JPEG matrix - the numbers can be found on Table 9.1 and Table 9.2 of the textbook;
- a constant number;
- DC component only (i.e. set all other numbers to zero).
- Add an option to the File menu to output the compressed JPEG image to the hard disk.
Deliverables
- All source codes.
- A setup guide to allow your tutor to set up the necessary environment and run the programs.
- Four compressed output files:
- with default quantization matrix;
- A low constant number (e.g. 1);
- A absurdly high number (e.g. 200);
- DC component only.
- A discussion document – discuss the various effects of the output file. Why are they like that? Will JPEG 2000 improve the quality?
- All files must be zipped into one single file using Winzip. Do not include the original image.