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.
Try it · mini version
See what it can do

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.
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.
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.
Swipe the tables to see every column →
| Search method | Range | PSNR | Time |
|---|---|---|---|
| Integer-pixel | 16 px | 29.88 dB | 1.02 s |
| Half-pixel | 16 px | 30.46 dB | 4.06 s |
| Integer-pixel | 8 px | 29.42 dB | 0.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.
| Q | Input | Reported PSNR | Non-zero coefficients |
|---|---|---|---|
| 8 | Original | 42.4298 dB | 29.7457% |
| 8 | Prediction error | 42.7383 dB | 19.5165% |
| 80 | Original | 29.3846 dB | 4.4350% |
| 80 | Prediction error | 33.6007 dB | 0.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.


