This blog is not for the expert, but for those who like to ask, “what is..?” “how to..?” and “…so what?”. If you want the prove in the form of mathematic equations, this is not the right place you should come.
No mathematic equation will be shown, but prove of the methods and the basic concepts of an algorithm and how to apply it in research, work, or “just for fun”.
The very first topic that I would like to share is the concept of simple image compression. So the first question you might ask is:
1. What is image compression and how to perform image compression?
Image compression is the technique to compress the image to save storage space as well as before transmitting it through some transmission medium. The most common method of image compression is discrete cosine transform (DCT). By taking the DCT of an original image, the low frequencies contents will be transform into the upper left of the DCT matrix… why…? Don’t ask me why, again, this blob is just for those what want to know “how to…?” and “…so what?” but not for “why…?”. If you would like to learn more on the image compression, you can use any search engine, or you might want to use the Google search bar on the right panel of this page to search for the “image compression”. :)
2. So what after I know the DCT concept? How to apply this into image compression?
The low frequencies components, which also carry most of the information of the image, are our focus. The fig 1 shows the original image while fig 2 shows the DCT matrix for the image. Notice that the “white color” is concentrated at the upper left of the DCT matrix? That’s the “information (energy) for the image which also represents the low frequency components of the image. If we perform a inverse DCT for the fig 2, we will get back the fig 1.
3. How to compress the image?
Fig 2 is the DCT matrix of the image. If we through away the high frequencies components, which contain not much information (dark color portion), we can achieve certain level of compression. For example, if I just take quarter of the DCT matrix, I save 75% of the storage!
4. So what is the tradeoff for this storage saving?
We will get some distortion of the image after the reconstruction of the image using the Inversed DCT as shown in fig 4. The level of the distortion is depends on the level of compression you choose. Some visual comparisons are shown in the following figures.
5. What software can I use to work on the above example?
You can use any search engine or the Google search bar on the right panel of this page and search for the “math software”, you would find numbers of useful softwares to perform this.