As I knkw the DCT is discrete cosine transform that mostly used in time domain analysis to frequency domain. Also 8x8 is used in nomaly in img processing. I don't know why that is defined by 8x8 .anyway 8x8 is used in processing.

BTW, I am want to know what is the difference between 25x25 and 8x8 in dct? Is this just for quality?


1 Answer 1


There exist different variants of discrete cosine transforms. They mostly vary on a phase shift. The most commonly-used type is known as type-II. Since the works of K. R. Rao et al. in the seventies, it was shown to possess near-optimal properties.

The DCTs are invertible, possess certain symmetry properties that make them useful and practical in sound (signal) or image processing. They can technically be applied to any patch size 13, 8x8, 25x32... Power-of-two patches benefit from faster and more optimized computations. 8x8 are standard for natural image due to:

  1. a size small enough so that image chunks are stationnary enoguh to be quite-well represented by cosine waves
  2. a small memory footprint for digital implementation

Now, it is more common to find 4, 8, 16, and 32 sizes in image and video coding, and even non-square blocks (4x8) with close to DCT transforms.

The quality is not a real question for the DCT, since it is invertible. It is more related to a match between your data, the transform on the processing (e.g. compression). You might have data and applications where a 25x25 DCT would work better. Then you will probably hit some difficulties for optimized implementations.

  • $\begingroup$ What kinds of work or cases need a 25x25? "You might have data and applications where a 25x25 DCT would work better."? $\endgroup$
    – gmotree
    Commented Aug 25, 2015 at 7:51
  • $\begingroup$ Just suppose you have 100x100 pixel images, with stationnary over a 25 pixel range (due to your distance measurement to a specific object). Then the 25x25 will match precisely your scale of observation. You may have a look too at M.T. Heideman, “Computation of an Odd-Length DCT from a Real-Valued DFT of the Same Length,” IEEE Trans. Signal Processing, vol. 40, no. 1, pp. 54–61, Jan 1992. $\endgroup$ Commented Aug 25, 2015 at 10:07
  • $\begingroup$ But not only 25 pixel range but also 8 pixel is too matched precisely.my question is what benefits in there if I choose vary range. $\endgroup$
    – gmotree
    Commented Aug 26, 2015 at 2:32
  • 1
    $\begingroup$ To be able to choose an adaptive range based on your objectives and the properties of the data is indeed wise, as you can better capture the features you are looking at (spectral, spatial, sparsity). For instance longer patch have better frequency resolution in general. Conservely, this comes with the price of an increased complexity in algorithms. $\endgroup$ Commented Aug 26, 2015 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.