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
1 answer

height_in_blocks in libJPEG in C#

I Need to access DCT coefficients and apply LSB in BitMiracle.LibJpeg.Classic.jvirt_array[] JBlock = oJpegDecompress.jpeg_read_coefficients(); the problem is i can't access…
Sameer Azeem
  • 548
  • 2
  • 9
  • 22
2
votes
1 answer

DCT transform in MATLAB

I want to find the DCT matrix of a picture. I tested the following code. But I can't see values of DCT matrix. Here is my code: image = image; [m,n] = size(image); imvector = reshape(image, m*n, 1); imdct = dct(imvector); imagedct =…
2
votes
1 answer

What is the effect of storing a larger value in a grayscale png image?

I am trying to perform the DCT on an image with block size 8X8 in java. After performing DCT on the first block, I get the very first value as "372". After performing the DCT on the entire image, I wrote the values into a PNG-grayscale image.Values…
Rohit S
  • 395
  • 4
  • 18
2
votes
0 answers

In getting back the matrix after applying Discrete cosine transform in Java

I want to apply DCT on an image, but before doing that on such a big matrix, I wanted to apply the DCT and IDCT on a 2X2 matrix. Following is the code I have written to perform the DCT and IDCT on a 2X2 matrix.But am not getting back the original…
Rohit S
  • 395
  • 4
  • 18
2
votes
1 answer

calculating image similarity of two "line drawing" images

I am developing an Android app for kids to learning writing letters, one function is to rate their drawing of the letters,I am stuck on how to determine whether the drawing is in good shape. What I am doing now is saving the drawing as a image and…
gherkin
  • 476
  • 7
  • 24
2
votes
1 answer

using DCT for embeding watermark

I wrote down an openCV code .I tried to embed a 64X64 pix watermark image in a 512X512 image. my code has 5 parts: reading two pictures( watermark and original image that I want to embed watermark in it) resize 2 readed images to specified…
N_Kh
  • 271
  • 1
  • 4
  • 11
2
votes
2 answers

Is there any way to control the concatenation of the blockproc output?

This is a follow up to the question: Overlapping sliding window over an image using blockproc or im2col? So by using the code : B = blockproc(A, [1 1], @block_fun, 'BorderSize', [2 2], 'TrimBorder', false, 'PadPartialBlocks', true) I was able to…
StuckInPhDNoMore
  • 2,507
  • 4
  • 41
  • 73
2
votes
2 answers

Discrete cosine Transform (DCT) in java

This is the sourcecode DCT .. !!! unknown array of 4x4 DCT will be done by splitting the 4x4 array into several blocks past yyang 2x2 transformation on each block ... !!! I want to ask, how to display an array that has been done, but with size 4x4…
Jamsir Crown
  • 49
  • 2
  • 7
2
votes
1 answer

Converting fftw library calls to OpenCV calls

I am trying to use OpenCV instead of fftw because of the more permissive license of OpenCV. With the help of FFTW fftwf_plan_r2r_2d() with FFTW_REDFT01 equivalent I am aware that it is currently wrong, it's just what I have as an initial idea. I…
Kachinsky
  • 573
  • 1
  • 7
  • 20
2
votes
1 answer

DCT using integer only

I need to implement DCT transform, but i can't use float or double types. There is a lot of implementations on the internet, but all of them use float. Does anyone know any source with DCT on integers? P.S I need it to implement Color Layout…
mlodziaszka
  • 89
  • 2
  • 10
2
votes
1 answer

Jpeg DCT and IDCT not calculated properly

I'm trying to calculate DCT and IDCT of an input image, and display the IDCT output as resultant image. But my IDCT values are going above 300. My input image is a '.rgb' image. I am also considering the height and width of the input image as…
Vizzard
  • 55
  • 4
2
votes
1 answer

DCT 2D without FFT

I'm trying to implement DCT (Discrete Cosine Transform) in Matlab but without using Fast Fourier Transform, just by using the next formula: I know this can be inefficient but this way I will get how it works. First I divided my grayscale image in…
Jorge Zapata
  • 2,316
  • 1
  • 30
  • 57
2
votes
1 answer

In jpeg image compression, what is the effect of increasing block size on the values of DCT coefficients statistically?

For example increasing block size from 8x8 to 16x16. I expect the coefficients will decrease because there will be an averaging between the corresponding coefficients for the merged blocks ( in the above example: 4 blocks of 8x8 composes 1 block of…
2
votes
1 answer

Jpeg quantization table (16x16)

I try to study jpeg image compression. I've got one problem for quantization step, I am not able to find quantization table for matrices 16x16. I am searching for the matlab code for JPEG quantization table (16x16) for digital image compression…
2
votes
0 answers

libjpeg, access to DCT coefficients after quantization, but before entropy coding

I need access to the DCT coefficient tables after the quantization (jpeg_write_scanlines?), but before the Huffman entropy coding, and before writing the file to disk. Is that possible with libjpeg? I know that as a workaround I could write a…
dschwen
  • 21
  • 4