Anda di halaman 1dari 5

Tugas 5

PRAKTIKUM TEKNOLOGI SISTEM ELEKTRONIKA AUDIO VIDEO

DOSEN PENGAMPU:
YASDINUL HUDA, S.Pd.,M.T.

OLEH:
IRSYAD SHIDIQ
17065044

PROGRAM STUDI PENDIDIKAN TEKNIK ELEKTRONIKA


JURUSAN TEKNIK ELEKTRONIKA
FAKULTAS TEKNIK
UNIVERSITAS NEGERI PADANG
2022
TEKNOLOGI SISTEM ELEKTRONIKA AUDIO VIDEO

Eksperimen 6

[Motion Estimation for Video Coding]


Yao Wang and Xiaofeng Xu,
eeweb.poly.edu/~yao/EE4414/exp2_motion.doc
Yasdinul Huda

1. Introduction
Seperti yang telah Anda pelajari di kuliah, prediksi kompensasi gerak (motion
compensated prediction) adalah langkah penting dalam teknik pengkodean video
modern.
Untuk percobaan ini, Anda diberikan program MATLAB (link file dukungan)
untuk melakukan estimasi gerak (motion estimation) dan kompensasi gerak (motion
compensation) menggunakan teknik yang berbeda: EBMA, Exhaustive Block
Matching Algorithm. (with integer or half-pel accuracy) dan HBMA, Hierarchical
Block Matching Algorithm. Anda harus membaca kode MATLAB dan mencoba
memahami bagaimana setiap algoritma diimplementasikan. Anda juga diminta
untuk menjalankan program ini dengan pengaturan parameter yang berbeda
dan mencatat hasil prediksi dan waktu perhitungan yang dihasilkan. Dari
eksperimen ini, Anda harus menghargai (appreciate) trade-off antara akurasi prediksi
dan waktu komputasi dengan algoritma dan pengaturan parameter yang berbeda.
Program lain menerapkan blok DCT pada gambar, mengukur koefisien DCT,
dan menghitung jumlah koefisien non-zero setelah kuantisasi. Jumlah koefisien non-
zero adalah indikator yang baik dari bit rate (laju bit) yang diperlukan untuk kode
frame. Dengan menerapkan program ini pada frame video asli dan kesalahan prediksi,
dan membandingkan jumlah koefisien non-zero yang dihasilkan, Anda juga dapat
menghargai penghematan bit-rate dengan estimasi gerak.

2. Experiment

1. EBMA_main.m is the main program for performing motion estimation using


EBMA. You can call fuction EBMA_integer(..) or EBMA_half(…) from
EBMA_main.m to execute integer or half-pel accuracy EBMA. It also calls for
plot_MV_function(…), which plots the estimated motion field. Go through these
programs to understand the underlying operations. Note you can view the Matlab
programs using MATLABEditor. Either click on those files, or uses the “open”
menu in MATLAB command window. In EBMA_main.m, which variables
should be changed if you want to do motionween the following two frames:
‘foreman66.Y’ and ‘foreman69.Y’? What if you want to change the horizontal and
vertical search range?
2. Run the program EBMA_main as is, which calls EBMA_integer() function, and
uses a preset block size (=16) and search range (=16). Capture all images and
record the running time and PSNR. Save the predicted image into “pimg1”. (this
can be done simply at the command window by entering >>pimg1=pimg;)
3. Now, open EBMA_main.m, change the line that calls EBMA_integer(..) to call
EBMA_half(…) instead. Save the file, and run EBMA_main again. Capture all
images and record the running time and PSNR.
Save the predicted image into “pimg2”. Compared to the results obtained using
EBMA_integer(), which method is more accurate, which method takes more time?
Explain why.
4. Edit the EBMA_main.m program to change horizontal search range into “8”.
Also change the EBMA_half(…) back to EBMA_integer(…) to run integer
accuracy EBMA. Save the program and run it again. Capture all images and
record the running time and PSNR. Save the predicted image into “pimg3”.
Compared to the results obtained using EBMA_integer() with search range =16,
which method is more accurate, which method takes more time? Explain why.
5. The function video_coding(..) is intended to show the required bit rate and
reconstructed image, when we apply DCT to the prediction error image and
quantize the DCT coefficients. Instead of applying run-length coding to the
quantized DCT coefficients, the program simply counts the number of non-zero
coefficients after quantization. This number is a good indicator of the required bit
rate for coding an image. It also shows you the original image, DCT image
without quantization, quantized DCT image, and the reconstructed image from the
quantized DCT coefficients. As a comparison, it also applies the same processing
on the original image. Go through this program and try to understand the
underlying processing. This program uses a MATLAB function “blkproc(…)”,
which performs the same function on every block of an image, where the function
can be a built-in MATLAB function or a user-defined function. You can type
“help blkproc” on the MATLAB command window to learn more about how this
function works.
6. Run this program with the predicted image from using half-pel motion estimation
(step 3) as the input of this program. Note that in this case, you should use ‘img2’
for the first parameter “Anchor_Img”, and use ‘pimg2’ for the second parameter
“Predict_Img”. Hint: To run the program, on the MATLAB command window,
type “video_coding (img2,pimg2)”. Enter “8” for the quantization factor. Capture
all images and record the percentage of non-zero coefficients and PSNRs. What is
percentage of non-zero coefficients when DCT is applied to the original image?
What is percentage when DCT is applied to the error image? Which way (DCT
on original image or DCT on error image) will lead to lower bit rate? Which
method gives you better reconstructed image? (both visually and in terms of
PSNR). Explain why.
7. Which factor gives you the smaller percentage of non-zero coefficients
(correspondingly bit rate)? And why?
3. Report
Your report should start with a general description of what you did in this experiment,
followed by the results and observations you obtained. You should answer all the
questions (written in italics in the proceeding instructions), with the corresponding
figures next to your answers.

HASIL PRATIKUM

Anda mungkin juga menyukai