Hello. My prof. gave me two programs written in C: a lossless compression and a decompression one. I have to implement the Integer Wavelet Transform (I was using the lifting scheme of Haar's function but I changed to the Daubechies 5/3 int-to-int later) to the code blocks to improve the compression ratio.
Everything was going fine in the modified programs except one mistake which also exists in the original programs he handed out.
Among several medical-type images of *.bmp extension, there are two images that cannot be recovered to their initial forms (i.e. just seeing some blocks of black and white instead of seeing a human face) although checking function informs that there is no difference between the files before and after the compressing process.
Remember that the rest images after decompressing look identical to the original ones.
You can take a look of these images here: http://s844.photobucket.com/home/miroseh. Moon surface and Zelda (girl) are not good. X-rayed chest is perfect.
I hope to hear solutions from you. I've stuck with this for weeks.
I attach the create_matrix_image (in compress.cpp) and restorebmp function (in decompress.cpp) as following.
If these still are ambiguous, you can download the source codes and grey images here
Using Borland C/C++ 5.02 compiler is better off: http://www.mediafire.com/?njmm1ovenmm