1 / 12

Lab of COMP 319

Lab of COMP 319. Final Project: Image Compression with MATLAB. Lab tutor : Yao Zhang, Shenghua ZHONG Email: zsh696@gmail.com csshzhong@comp.polyu.edu.hk Lab 4: Nov 30, 2011. Outline of Lab 4. Some important reminders of final project

osric
Download Presentation

Lab of COMP 319

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab of COMP 319 Final Project: Image Compression with MATLAB Lab tutor : Yao Zhang, Shenghua ZHONG Email: zsh696@gmail.com csshzhong@comp.polyu.edu.hk Lab 4: Nov 30, 2011

  2. Outline of Lab 4 • Some important reminders of final project • Some important steps and information of final project • How to debug the user defined function

  3. Important reminders of final project • Deadline:Mon Dec. 15 at 23:59pm. • Penalty for late submission • Tue. Dec. 16       00:00 - 23:59          25% deduction • Wed. Dec. 17     00:00 - 23:59          50% deduction • Thu. Dec. 18       00:00 - 23:59          75% deduction • After Dec. 18 23:59                       Zero point • Please try your best to finish the project and submit it on time !

  4. Important reminders of final project • There are only two functions should be and can be modified and submitted: Compress.m and Decompress.m. • There is no need to submit a final project report. • your personal compress.m and decompress.m functions will be scored by using the uniform main.m function, so submission of other functions or files is useless and unallowed.

  5. Important reminders of final project • You can observe the MSE value and the compression ratio to check the performance of your functions. • The MSE value and compression ratio will be given above your recovered image, you can check them according to the grading sample listed on the course’s webpage. • The compression ratio should larger than 1, otherwise the score of your final project will be zero!

  6. Important reminders of final project • 4. The components in the matrixes orig_image, comp_image and reco_image should be the integers. • The size of the reco_image should be same with the size of orig_image. • Don't make any modification of the provided functions expect  Compress.mandDecompress.m. • Don't read the image file when youmodify Compress.mandDecompress.m, otherwise, you will get zero point in the final project.

  7. How to Debug User-Defined Function • User-defined functions are stored as M-files. Each must start with a function definition line that contains • the word “function”, • one or several variables that defines the function output, • a function name, and • one or several variablesused for the input argument. • Save the function as M-file using the same name in your function • Some examples: • function output = my_function(x) • function[output1, output2] = my_function(x1,x2,x3) • Hints: The function name and the names of the input and output variables are arbitrary and selected by the programmer, but the word “function” can not be changed. 7

  8. Review of Lab 2 about User-Defined Function function output = poly(x) % This function calculates the value of a third-order % polynomial output = 3*x.^3+5*x.^2-2*x+1 comments Save above commands into an M-file and then type the below commands in command window to observe the results: >> a=4; >> poly(a) >> b=1:5; >> poly(b) 8

  9. How to Debug User-Defined Function • Compress.m, Decompress.m, and xxx.m except main.m are both user-defined function. • They like a black box (user only know the input and output parameters) • Debug is important to check whether the programms are correct.

  10. The First Step to Debug User-Defined Function Set breakpoint at the line of the Entry to the user-defined functionin the main.m

  11. The Second Step to Debug User-Defined Function Run main.m to the Entry

  12. The Third Step to Debug User-Defined Function Click Step in button and go into the user-defined function

More Related