Questions tagged [dct]

Discrete Cosine Transform (DCT).

A discrete cosine transform (DCT) expresses a sequence of finitely many data points in terms of a sum of cosine functions oscillating at different frequencies. DCT's are important to numerous applications in science and engineering, from lossy compression of audio (e.g. MP3) and images (e.g. JPEG) (where small high-frequency components can be discarded), to spectral methods for the numerical solution of partial differential equations.

More information on Wikipedia: Discrete cosine transform .

277 questions
3
votes
1 answer

Discrete Cosine Transformation formula disparity

Well, I was programming something that required the use of DCT. I found 2 resources for the DCT formula: Mathworks Wikipedia Initially I used the wikipedia version of DCT-II. In the DCT-II section of wiki page, it is written that some authors…
c0da
  • 1,009
  • 3
  • 14
  • 28
3
votes
1 answer

Scipy: generate NxN discrete cosine matrix

Using scipy, is there an easy way to emulate the behaviour of MATLAB's dctmtx function which returns a NxN DCT matrix for some given N? There's scipy.fftpack.dctn but that only applies the DCT. Do I have to implement this from scratch if I don't…
Peter
  • 2,919
  • 1
  • 16
  • 35
3
votes
1 answer

Finding number of quantizing layers in MATLAB

I'm working on image processing, and I have an image that has been DCT'd and quantized for 8 x 8 blocks of the 512 x 512 matrix, now I have to find how many quantizing levels that the image has. Do I need to take the top left pixel and place it in…
Stina
  • 509
  • 1
  • 7
  • 19
3
votes
2 answers

Java: Getting JPEG DCT coefficients histogram

I need a Java library, code snippet,... to get the Frequency distribution of the 64 DCT coefficients of a JPEG file. Any ideas? Thx!
Steven
  • 439
  • 4
  • 15
3
votes
1 answer

Using fftw3 library for dct

I am testing the library just using a discrete cosine transform. #include void dump_vector(int n, double* vec) { for(int i = 0; i < n; i++) printf("%f ", vec[i]); printf("\n"); } int main() { double a[] = {0.5, 0.6,…
FacundoGFlores
  • 7,858
  • 12
  • 64
  • 94
3
votes
1 answer

Discrete Cosine Transformation 1D Matlab

I'm trying to implement DCT in MATLAB by using matrix-vector multiplication. Specifically, I'd like to create the DCT matrix of coefficients then use this to multiply with 1D signal to compute the 1D DCT. Here's my code to produce the DCT…
Mark Ben
  • 177
  • 1
  • 1
  • 14
3
votes
1 answer

LSB-DCT based Image steganography

I'm working on LSB-DCT based Image steganography in which i have to apply LSB to DCT coefficients of the image for data embedding to JPEG.i'm new to all this.so searched and read some research papers they all lack a lot of information regarding the…
Sameer Azeem
  • 548
  • 2
  • 9
  • 22
3
votes
1 answer

how to get feature of png image using 2d dct?

Could I use dct to extract the feature of .png images? Or dct is just for jgp? Because my dataset using png format. I've read several journals, and find that 2d dct could used to extract the feature based on coefficient. I need the features for…
Ana Ain
  • 173
  • 1
  • 3
  • 14
3
votes
1 answer

How to calculate 2D DCT of an image using php?

I'm trying to find 2D DCT(The Discrete Cosine Transform) of an image using php. I have used the following equation to find it. Here is the code I have used to find the DCT. function getGray($img,$x,$y){ $col = imagecolorsforindex($img,…
Tharu
  • 353
  • 1
  • 2
  • 11
3
votes
2 answers

Nice Way to Visualize DCT Coefficients as an Image

I took the image below: Divided it into 8X8 tiles, did a 2D DCT transform on each tile and chopped them to only the first 30 coefficients on each axis. Now I'm trying to visualize the result as an image that will help my intuition on the DCT plane.…
ihadanny
  • 4,377
  • 7
  • 45
  • 76
3
votes
1 answer

how to do histogram for dct coeffcient to show Double Quantiztion effect?

what i want to do is a histogram for quantized DCT coefficient for an image, to detect Double Quantization effect. when i use hist(x) it will categorize it in to 10s and if i changed it to hist(x,20) or 30 it does not really show the DQ effect. so…
nadeem
  • 215
  • 2
  • 10
3
votes
1 answer

Steganography in JPEG

I am working on a Java Steganography project to hide a .txt message in a JPEG image. Broadly speaking, there are 4 steps: Transform each pixel block into 8x8 DCT coefficients. Quantitize each block with some complex calculations. Embed/replace each…
Douglas Grealis
  • 599
  • 2
  • 11
  • 25
3
votes
2 answers

BinDCT implementation for a 32x32 matrix

So I am playing a bit with DCT implementations and noticed they are (relative) slow due to the necessary multiplier calculations. After googling a bit, I came across BinDCT, which results in very good approximations of the DCT and only uses bit…
Remco Ros
  • 1,467
  • 15
  • 31
3
votes
1 answer

What are the input values for DCT?

So I am trying to write a simple bmp to jpeg image converter program. As you may know there are 3 major steps involved in jpeg compression, DCT, Quantization and entropy encoding. I want to write the values computed at each of these intermediate…
rootcage
  • 81
  • 1
  • 5
3
votes
0 answers

More flexbility with Discrete Cosine Transform for Image Hash

I'm using the concept of a perceptual hash for my images. It works well using the DCT as the underlying maths. I get good matches for images which are the same bar some "attack" i.e. aspect ratio, brightness, contrast and most things related to…
Science_Fiction
  • 3,403
  • 23
  • 27
1 2
3
18 19