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
2
votes
0 answers

Jpeg Image Compression: Quantization issue

While encoding a raw image to a jpeg image, a 8x8 data unit is level shifted, transformed using a 2-D DCT, quantized and Huffman encoded. I have first performed the Row DCT and then the column DCT and i have rounded the result to the nearest…
Ram
  • 437
  • 3
  • 13
2
votes
2 answers

How can I find quantized coefficients from MATLAB using Sallee's code?

First, I admit that this is a homework question. However, I seem to be stuck. I need to get all quantized coefficients from a jpeg image using Phil Sallee's JPEG Toolbox (link listed at the bottom of the table under an "update" heading)(I'll be…
user1181913
  • 63
  • 1
  • 4
2
votes
1 answer

DCT julia equivalent to scipy.fftpack.dct

I wonder how I could compute the following in Julia import scipy.fftpack scipy.fftpack.dct([1,2,3], axis=0) array([ 1.20000000e+01, -3.46410162e+00, -4.44089210e-16]) I have seen that FFTW.jl seems to have the equivalent of import…
David Buchaca
  • 206
  • 1
  • 5
2
votes
1 answer

Different outputs of DCT from OpenCV and Scipy.fftpack.dctn?

I am calculating DCT of grayscale image of size 32x32 Using OpenCV def _dct(image): result = cv2.dct(np.float32(image)/255.0) return (result * 255.0) Using Scipy.fftpack.dctn dctn(image) Output of both functions first using cv2.dct()…
Amish
  • 197
  • 1
  • 11
2
votes
1 answer

Orthogonality of a 4x4 matrix

I am working on a MATLAB task which deals with stain removal. What am I doing? I have been given a 4x4 matrix. I have then been told that it may well be orthogonal. I have to make it prove that the DCT matrix is actually orthogonal. This is the…
Henrik.A
  • 31
  • 5
2
votes
1 answer

How to do watermarking in the Frequency Domain?

I am new in Matlab and I have an assignment that is asking for watermarking an image using DCT transform: Read Lin.jpg color image and apply DCT. Threshold the logo.jpg (watermark) into binary and ten times of its strength, and then add it to the…
Hadi GhahremanNezhad
  • 2,377
  • 5
  • 29
  • 58
2
votes
1 answer

How to implement dct when the input image size is not a scale of 8?

I learned that if one needs to implement dct on a image of size (H, W), one needs a matrix A that is of size (8, 8), and one needs to use this A to compute with a (8, 8) region F on the image. That means if the image array is m, one needs to compute…
coin cheung
  • 949
  • 2
  • 10
  • 25
2
votes
1 answer

JPEG Extract DCT tables

I am developing an image viewer/editor using VS2008 ,MFC and WIC and I would like to recompress jpegs as closely (quality-wize) as possible to their original, after image processing. Does anyone know how to extract luminance and chrominance tables…
Pifcnt
  • 117
  • 1
  • 10
2
votes
1 answer

Discrete Cosine Transform (DCT) Coefficient Distribution

I have two images : Original Image Binarized Image I have applied Discrete Cosine Transform to the two images by dividing the 256x256 image into 8x8 blocks. After, I want to compare their DCT Coefficient Distributions. import matplotlib.mlab as…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
2
votes
3 answers

DCT compression

How does the DCT (Discrete Cosine Transform) help to compress sound (or any wave-like data)? According to the DCT transform there are N input values and N output values as a result. Where is the compression achieved and how?
maximus
  • 4,201
  • 15
  • 64
  • 117
2
votes
1 answer

How to detect similar objects in this picture?

I want to find patterns in image. Saying "to find patterns" I mean "to detect similar objects", thus these patterns shouldn't be some high-frequency info like noise. For example, on this image I'd like to get pattern "window" with ROI/ellipse of…
olha
  • 2,132
  • 1
  • 18
  • 39
2
votes
2 answers

binDCT algorithm for 8x8 matrix

I've googled about the implementation of a fast DCT. I've found the Loeffler algorithm and I have implemented in C++ and in ARM assembly with NEON. Moving ahead, I've found the binDCT that avoid floating calculation. My reference paper/schema is…
Chris
  • 277
  • 4
  • 15
2
votes
2 answers

DCT coefficients and MV extraction in ffmpeg Mpeg-4 encoding

I'm using ffmpeg and libx264 to encode a video and I want to extract the DCT coefficients and motion vector of each frame during the encoding process. What is the best way to do this? I read in the ffmpeg manual that is possible to use the debug…
2
votes
0 answers

JPEG Steganography, Inconsistent DCT Coefficients and errors

My problem is as follows : My problem is that even after doing LSB replacement after the quantization step I still get errors and changes on the detection side. for strings, letters get changed but for bitmaps the image isn't readable as deduced…
LatFoued
  • 21
  • 5
2
votes
3 answers

Fast implementation of an 8-point 1d DCT for modified JPEG decoder

I've been working on a custom video codec for use on the web. The custom codec will be powered by javascript and the html5 Canvas element. There are several reasons for me wanting to do this that I will list at the bottom of this question, but…
YAHsaves
  • 1,697
  • 12
  • 33