You are designing an image compression system as a component of a new video monitoring system for a robotic manufacturing line. Your task is to optimize the image compression system so that the reconstructed decompressed images have PSNR of at least 29dB achieved with the minimal possible number of retained transform coefficients.
In particular, assume the image compression system uses the wavelet transform with Daubechies-3 filter-bank. Then, run compression iteratively for the number of decomposition levels J changing from 1 to 9 and apply this to a selection of at least 5 images from the test image folder. Then, for each case, identify the number of retained (non-zero) transform coefficients for which the system achieves the PSNR of 29dB. Finally, by comparing the obtained performance, select the best number of decomposition levels J such that the identified number of retained coefficients is minimal.
For clarity, this list of tasks is tabularized below:
A. Select J from 1 to 9 and apply the forward wavelet transform using the Daubechies-3 filter-bank.
B. Select a threshold for the magnitude (absolute value) of transform coefficients and apply it – zero out all the transform coefficients that have the magnitudes below this threshold.
C. Apply the inverse wavelet transform using the same number of decomposition levels J and the same filter type.
D. Compare the reconstructed image to the original one using the PSNR calculation.
E. If PSNR is smaller than 29dB, return to B using a smaller threshold (the image is too compressed and you need to discard less information); if PSNR is larger than 29dB, return to B using a larger threshold (the image is too good and we can afford to discard more information in order to reduce the number of retained coefficients).
F. Once you find a threshold that achieves PSNR of 29dB (plus / minus 0.2db), denotes the number of retained coefficients as the minimal rate for that case.
G. Repeat A-F for different J until you find out the minimal rate for each J between 1 and 9.
H. Compare the minimal rates and select J that results in the smallest minimal rate.