tart All work

IMAGE & MULTIMEDIA PROCESSING

Image and Multimedia Processing

Can a video frame be predicted from the one before it? A MATLAB study of motion, image quality, and compression trade-offs.

KMITL multimedia coursework

My contribution

Studied exhaustive block matching and DCT quantization through MATLAB experiments and a written report. The archive does not specify individual authorship for each script.

Download CV (English)

Try it · mini version

See what it can do

Four-panel MATLAB output showing anchor, target, predicted frame, and motion field
The experiment in one view: anchor frame → target frame → block-matched prediction → motion vectors.

KMITL · 01076566 Multimedia Systems · 2025–26 semester 2

What this project does

The report asks a practical video-coding question: how much of a new frame can be explained by moving 16×16 blocks from an earlier frame? It compares exhaustive block matching at integer and half-pixel precision, then tests whether transforming the smaller prediction error produces a sparser set of DCT coefficients.

Inside the project

  • Use the Foreman frame pair to generate a predicted frame, motion-vector field, and prediction-error image.
  • Compare integer-pixel and half-pixel searches at a 16-pixel range, and a narrower 8-pixel integer search.
  • Apply DCT and quantization to both the original image and motion-prediction error at Q=8 and Q=80.

Skills & practical experience

The experiment makes a visible engineering trade-off: finer motion search improves the reported PSNR but costs more computation; prediction leaves a residual with fewer non-zero quantized DCT coefficients in this test.

MATLABMotion estimationExhaustive block matchingHalf-pixel searchPSNRDCT quantizationVideo coding

Descriptions and measured values come from my Multimedia Systems report; figures and MATLAB scripts are preserved in the KMITL archive. These results are for the reported test, not a general codec benchmark. Non-zero coefficient share is a sparsity proxy, not a measured bitrate.

Project context

A course experiment using the Foreman video frame pair—not a trained AI model or a production video codec. Input media is needed to rerun the scripts.

Two video frames16×16 block matchingPredicted frame + motion vectorsPrediction errorDCT + quantization

FROM THE ORIGINAL REPORT · FOREMAN FRAME PAIR

What the experiment found

The same 16×16 block-matching task exposes a choice: search more precisely for a better match, or spend less time computing. These are the report’s measurements for this test pair.

+0.58 dBHalf-pixel versus integer-pixel PSNR
≈4×Runtime for that finer search

Swipe the tables to see every column →

Motion estimation · 16×16 blocks
Search methodRangePSNRTime
Integer-pixel16 px29.88 dB1.02 s
Half-pixel16 px30.46 dB4.06 s
Integer-pixel8 px29.42 dB0.53 s

Narrowing the integer search to 8 pixels nearly halves the runtime, with a 0.46 dB lower PSNR than the 16-pixel search in this run.

Why predict before compressing?

After motion prediction, the error image contains what the earlier frame could not explain. In the report, quantizing its DCT coefficients left fewer non-zero values than quantizing the original image.

DCT + quantization · original image versus prediction error
QInputReported PSNRNon-zero coefficients
8Original42.4298 dB29.7457%
8Prediction error42.7383 dB19.5165%
80Original29.3846 dB4.4350%
80Prediction error33.6007 dB0.5445%

Non-zero coefficient share indicates sparsity; it is not an actual measured bitrate. Q=80 is sparser but has lower reported PSNR than Q=8. Results describe this experiment, not a general codec benchmark.

Project media

Prediction error concentrated around the face and helmet edges in the Foreman frame
Prediction error: the parts of the target frame the motion model did not explain.
Original frame, DCT coefficients, quantized DCT, and reconstructed frame
DCT quantization and frame reconstruction.
Exhaustive block-matching output and PSNR result
Block-matching result and PSNR output.