Wavelet Transform-Based Image Compression
Implement an image compression algorithm using the Discrete Wavelet Transform (DWT). The system should compress images by applying the wavelet transform, discarding insignificant coefficients, and reconstructing the compressed image using the inverse wavelet transform.
Implementation Guidelines
- Image Processing:
- Read the input image and process it.
- Apply the DWT to each color channel (Red, Green, Blue) separately.
- Apply a threshold setting values below a threshold to 0.
- Implement inverse DWT.
- Save reconstructed image.
- Graphical Interface:
- The graphical interface should allow users to load an image, apply the wavelet transform, and display the compressed image.
- Users should also be able to adjust the threshold interactively.
- The interface should show the original and compressed images side by side.
- Running the Program:
- The user can specify the input image, and compression level (threshold).
- The program must measure the run-time needed to perform the compression and decompression.
- The implementation must automatically adapt to the hardware it is running on (CPU cores, memory, etc.).
Testing
All three versions (sequential, parallel, and distributed) must be tested. The parameters that influence the runtime are the image size and the level of compression (threshold). The system should be tested using the following strategies:
- Testing by Image Size: Start with a small image size (e.g., 256x256) and progressively increase the size (512x512, 1024x1024, etc.). Test all configurations at least three times and use the average runtime for comparison.
- Testing by Compression Level: Set the image size to a fixed value (e.g., 1024x1024). For each new configuration, apply different compression thresholds (e.g., 1%, 5%, 10%). Every configuration should be tested multiple times, and the average results should be used.
Present the results with informative charts/figures and explain them in detail. Include both numeric and graphical representations of the results.