代写Lab Resit-INT 302: Image Processing代写Matlab编程
- 首页 >> Java编程Lab Resit-INT 302: Image Processing
Introduction:
This assignment contains four lab tasks. The content covers image resolution, image enhancement, image transform, image compression, morphological operation. This lab assessment includes the programming code and the report. The programming code should be run successfully, and the results should be correct. Moreover, the code quality will also be considered, such as efficiency, comments, and robustness. The report should answer all questions in the tasks, and explain them clearly. It is recommended to add some conclusions about the whole lab.
Objectives:
Through the working in this lab, the students can achieve the learning outcomes A, B, C, D and E:
A: Understand the basic principles of digital image processing
B: Understand the techniques used in digital image processing.
C: Have an appreciation of the areas of applications for various image processing techniques, e.g., image enhancement, image transform, image compression and morphological operations.
D: Apply relevant image processing techniques to a given problem.
E: Have basic skills to develop image processing software.
Lab Tasks (100 marks):
Task 1 Image resolution. (20')
In this task, we use the monochrome image Lenna (i.e., lenna512.bmp) to do the following sub tasks, and let's call the original image Lenna as lo.
1. lo-> down-sampling to l with 1/2 size of lo (both horizontally and vertically) using mean value. First, describe your algorithm and implement it by yourself. Then, display it and compare to the original image. Finally, explain your founding in the report; (10')
2. li-> up-sampling to l' with the same size of lo using nearest neighbor interpolation.l First, describe your algorithm and implement it by yourself. Then, display it and compare to the original image. Finally, explain your founding in the report. (10')
Task 2 Image Enhancement. (20')
1. Describe the algorithm of histogram equalization, and implement this algorithm to enhance the contrast of the image (i.e., lenna512_low_dynomic_range.bmp) and display the enhanced image. you are not allowed to call matlab function directly (12')
2. Moreover, display the histograms of both original image and enhanced image, and explain your founding in the report. (8')
Task 3 Morphological operation (20')
Load the image tool.bmp as im_tool.
1. Extract the boundary of the image, and show it in the report. (6')
2. Do the operations of erosion, dilation, opening and closing. Please use the function of strel to create the structuring element (SE) with the shape of disk (You can set your preferred radius). Show the results after each operation and calculate the number of foreground pixels. (6')
3. Repeat the operation in the second task and show the results, and compare to the results of the second task, write your comment. (8').
Task 4 Image Transform. (20')
1. In the image transform, there are two basic factors of the transform. domain: basis and coefficients. For both 1-D DFT and 1-D DCT for image transform, show their expressions, then specify their basis and coefficients, respectively. (12')
2. Import the monochrome image "lenna512.bmp" as the reference image. Write the code to obtain its transformation results of the 2-D DCT and 2-D DFT and display them in the report. (8')
Task 5 Image Compression and Decompression. (20')
1. Implement the algorithm of Raster-scan DPCM (differential pulse code modulation) coding for an input image based on the following requirements: (10')
In the DPCM, the predictive function p(r,c)f(Block(r,c)) plays an important role. In this task, try to consider different block sizes (e.g., 2 Х2 or 3 X3) and different functions (e.g., average or weighted average).
For example, if the predicted position is the red pixel in Figure 1, then the 2x2 block contains pixels highlighted in white color (i.e., 3 pixels), and the 3x3 block contains the pixels highlighted in both white and blue color (i.e., 8 pixels).
With these neighboring pixels, you can directly average them or weighted average them to get the predicted value p(rc). In the weighted average method, you cand take the weights based on the pixel distance to the predicted position. Here, please use D4 distance, and the weight for the farthest pixels is 1, the weight for thed second farthest pixels is 2, the third one is 3, At the end, you should normalize the results by the summation of all weights.
In summary, you should implement four predictive functions by combination of two block sizes and two weighted methods. Once you get the prediction value p(r,c), you can calculate the difference by e(rc) =x(r,c)-p(r,c).
Use the "lenna512.bmp" as input and show the output of this function e(r.c). Hence, you should show five pictures, one original picture and four DPCM output of difference images. Note that the nearest neighbor pixel padding can be used for the boundary pixels.
Figure 1: Example of block size for prediction
2. Write code to calculate the entropy of input image and the output image of task
(1), respectively. From the view of entropy, which image is the easiest to be compressed? And Why? (10')
Lab Report
Write a short report which should contain a concise description of your results and observations. Include listings of the Matlab scripts that you have written. Describe each of the images that you were asked to display.
Report format: Single column; Fond size: #12, no more than 20 pages. Answer each question completely:
— Do not attach the code at the end of the report, just put the useful code underd each question
— The results maybe contain some figures, please add the index and title of each figure.
Submission deadline will be announced
— Electronic version to LM with a ZIP of all files
zip file name: INT302-Resit-Name-studentID.zip
One file with same file name of ZIP File: Report (with studentID, name, Lab title on the homepage)
One folder: codes and other materials. (I can run it directly)
Marking scheme
80%-100% Essentially complete and correct work.
60%-79% Shows understanding, but contains a small number of errors or gaps.
40%-59% Clear evidence of a serious attempt at the work, showing some understanding, but with important gaps.
20%-39% Scrappy work, bare evidence of understanding or significant work omitted.
<20% No understanding or little real attempt made.