<< Chapter < Page Chapter >> Page >
Method to drop DCT coefficients within image framework.

Compression algorithm

Dropping dct coefficients

Our framework and JPEG are both based around the discrete cosine transform. Just like with sound, certainfrequencies in an image are more noticeable than others, so taking them out of the image doesn’t change the image much. We used the 2Ddiscrete cosine transform (DCT) as seen in equation 1 to take an image and converts it into the frequencies that make up the image, in otherwords it takes us into the frequency domain.

B p q = α p α q m = 0 M 1 n = 0 N 1 A m n cos ( π ( 2 m + 1 ) p 2 M ) cos ( π ( 2 n + 1 ) q 2 N ) w h e r e : 0 p M 1 0 q N 1 α p = { 1 / M , p = 0 2 / M , 1 p M 1 α q = { 1 / N , q = 0 2 / N , 1 q N 1 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuYxb8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGceaqabeaacaWGcbWaaSbaaSqaaiaadchacaWGXbaabeaakiabg2da9iabeg7aHnaaBaaaleaacaWGWbaabeaakiabeg7aHnaaBaaaleaacaWGXbaabeaakmaaqahabaWaaabCaeaacaWGbbWaaSbaaSqaaiaad2gacaWGUbaabeaakiGacogacaGGVbGaai4CaiaacIcadaWcaaqaaiabec8aWjaacIcacaaIYaGaamyBaiabgUcaRiaaigdacaGGPaGaamiCaaqaaiaaikdacaWGnbaaaaWcbaGaamOBaiabg2da9iaaicdaaeaacaWGobGaeyOeI0IaaGymaaqdcqGHris5aaWcbaGaamyBaiabg2da9iaaicdaaeaacaWGnbGaeyOeI0IaaGymaaqdcqGHris5aOGaaiykaiGacogacaGGVbGaai4CaiaacIcadaWcaaqaaiabec8aWjaacIcacaaIYaGaamOBaiabgUcaRiaaigdacaGGPaGaamyCaaqaaiaaikdacaWGobaaaiaacMcaaeaacaWG3bGaamiAaiaadwgacaWGYbGaamyzaiaacQdaaeaacaaIWaGaeyizImQaamiCaiabgsMiJkaad2eacqGHsislcaaIXaaabaGaaGimaiabgsMiJkaadghacqGHKjYOcaWGobGaeyOeI0IaaGymaaqaaiabeg7aHnaaBaaaleaacaWGWbaabeaakiabg2da9KazaaEacaGG7bGcfaqabeGabaaabaGaaGymaiaac+cadaGcaaqaaiaad2eaaSqabaGccaGGSaGaamiCaiabg2da9iaaicdaaeaadaGcaaqaaiaaikdacaGGVaGaamytaaWcbeaakiaacYcacaaIXaGaeyizImQaamiCaiabgsMiJkaad2eacqGHsislcaaIXaaaaaqaaiabeg7aHnaaBaaaleaacaWGXbaabeaakiabg2da9KazaaEacaGG7bGcfaqabeGabaaabaGaaGymaiaac+cadaGcaaqaaiaad6eaaSqabaGccaGGSaGaamyCaiabg2da9iaaicdaaeaadaGcaaqaaiaaikdacaGGVaGaamOtaaWcbeaakiaacYcacaaIXaGaeyizImQaamyCaiabgsMiJkaad6eacqGHsislcaaIXaaaaaaaaa@AE52@

There are several transforms that could have been utilized to get the image into the frequency domain. The DCT, however, is a purely real transform. Thus, manipulating the frequencies is much more straightforward compared to other transforms. From here we could take the DCT of the entire image and then throw away frequencies that are less noticeable. Unfortunately this would make the image blurry and cause the image to lose edges. To solve this problem the image is divided into 8x8 blocks, to preserve the integrity of the image. To drop insignificant frequencies, JPEG compression utilizes a quantization matrix. We simplified this process by using a threshold value and dropping frequencies below the threshold. Thus our compression algorithm models the basic functionality of the JPEG standard.

The result of taking the DCT. The numbers in red are the coefficients that fall below the specified threshold of 10.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Elec 301 projects fall 2005. OpenStax CNX. Sep 25, 2007 Download for free at http://cnx.org/content/col10380/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Elec 301 projects fall 2005' conversation and receive update notifications?

Ask