Skip to content

Discrete Cosine Transform (DCT)

Definition

A mathematical transform that expresses a block of pixel values as a sum of cosine functions at different frequencies. JPEG applies the DCT to 8x8 pixel blocks. The resulting 64 DCT coefficients represent the spatial frequency content of the block, with low-frequency terms in the top-left of the coefficient matrix and high-frequency terms in the bottom-right.

Applies to
8x8 pixel blocks in JPEG compression
Output
64 DCT coefficients per block
Coefficient layout
Low frequency top-left, high frequency bottom-right
Forensic use
Detecting recompression and manipulation traces

Common questions

Why does JPEG use the DCT instead of storing raw pixels?+

The DCT concentrates most of a natural image's energy into a small number of low-frequency coefficients, so the high-frequency terms can be quantised heavily or discarded with little visible loss. That concentration is what allows JPEG to achieve large file-size reductions while keeping perceived quality high.

How do forensic analysts use DCT coefficients to detect tampering?+

Editing a region and resaving it as JPEG introduces a second round of block-aligned quantisation. This leaves statistical irregularities in the DCT coefficient histograms, sometimes called quantisation artefacts, that differ between the untouched background and the edited region, which double-compression and error-level-analysis tools are built to surface.

Is the DCT unique to JPEG?+

No. The same transform, or close variants, appears in JPEG2000, MPEG and H.264/H.265 video codecs, and various audio codecs, because it is broadly effective at compacting energy for natural signals. Forensic video and audio compression-history tools rely on the same underlying coefficient behaviour.

Related terms

Block Grid Phase
The horizontal and vertical offset of the 8x8 encoding grid relative to the image coordinate origin. A phase of (0,0) means the...
Blocking Artifact
A visual discontinuity at the boundary between two adjacent 8x8 blocks in a JPEG image, caused by independent quantisation of each block....
Compression Floor
The stable low-residual state that a JPEG region approaches after many successive saves at the same quality. Once the DCT coefficients are...
Double JPEG Compression
The situation where an image has been JPEG-encoded, decoded to a bitmap, and then JPEG-encoded again. The second quantisation step leaves a...
Double Quantisation Effect
The statistical artefact that appears in DCT coefficient histograms when a video or image is quantised twice with different step sizes. The...
ELA Residual
The pixel-level absolute difference at a given location after re-compression. High residual means the pixel value moved substantially on re-compression, indicating the...
Error Level Analysis (ELA)
A technique that re-compresses a JPEG at a controlled quality setting and maps the pixel-level difference between the re-compressed and original images....
Intra-Frame vs Inter-Frame Coding
Intra-frame (I-frame) coding compresses each frame independently using DCT quantisation, like a JPEG image. Inter-frame (P-frame or B-frame) coding stores only the...
JPEG Ghost
A visualisation technique introduced by Farid (2009) that reveals regions compressed at a quality factor different from the rest of the image....
Macroblock
The fundamental coding unit in most video codecs: a 16x16 pixel block in luma (brightness) and the corresponding chroma samples. Macroblocks are...
Quantisation
The step in lossy compression where DCT coefficients are divided by a quantisation parameter and rounded to integers. Higher quantisation parameters produce...
Quantisation Parameter (QP)
A per-block or per-slice value that controls the coarseness of the DCT coefficient rounding step in H.264 and H.265. Higher QP means...

Explained in these topics

Your journey to becoming a forensic professional starts here.

Practice with mock tests, learn from structured notes, and get your questions answered by a global forensic community, all in one place.