# 辅导MTSC 887、辅导Matlab程序设计

- 首页 >> Algorithm 算法 MTSC 887 - Image Processing

Digital Image Fundamentals

August 24, 2020

Problem 1 (20 points). Illumination-reflectance modeling

Assume that a flat area with center at (x0, y0) is illuminated by a light

source with intensity distribution

i(x, y) = K · e?[(x?x0)2+(y?y0)2].

Let the reflectance of the area be constant and equal to 4 and let K = 127.

If the digital image is acquired with k bits of intensity resolution, and the

human eye can discent an abrupt change of eight shades of intensity between

adjacent pixels, what value of k will cause visible false contouring?

Problem 2 (20 points). Spatial relationships between pixels

For the below sub-image draw the shortest 4–, 8– and m– path between

pixels m and l and compute the corresponding lengths. Explain if there

does not exit a particular requested path. Solve for i) V = {0, 1} and ii)

Problem 3 (20 points). Image transformations

Show that the forward and inverse Fourier kernels r(x, y, u, v) = e?j2pi(ux/M+vy/N)

and s(x, y, u, v) = 1

MN

ej2pi(ux/M+vy/N) are separable and symmetric.

Programming Assignment 1 (30 points). Image interpolation

Download and unzip test images from blackboard page of the course.

Write a program that will

1. read a grayscale image

2. downsample the image by a factor of i) 2 and ii) 8

3. oversample back up to original resolution

4. compute the squared difference between the image of the previous step

and the original image

5. display all images and differences

6. compute the average squared difference between the two images.

Repeat the above process for i) nearest neighbor and ii) bilinear interpo-

lation. Show your results on 3 of the grayscale test images.

Write your program in function format, i.e. with input and output ar-

guments. One of the input arguments should be the input image filename

so that you can apply your program to any grayscale image. You can use

Matlab’s built-in functions for resampling.

Programming Assignment 2 (30 points). Image quantization

Download and unzip test images from blackboard page of the course.

Write a program that will

1. read a grayscale image

2. quantize pixel intensities to i) 6 and ii) 3 bits of accuracy.

3. compute the absolute difference between the image of previous step and

the original image

2

4. display all images and differences

5. compute the average absolute difference between the two images.

Show your results on 3 of the grayscale test images.

Write your program in function format, i.e. with input and output argu-

ments. One of the input arguments should be the input image filename so

that you can apply your program to any grayscale image. You can not use

Matlab’s built-in functions for quantization.

Programming Assignments Write-up For each programming assign-

ment, you are to turn in a brief report (instructions are posted on blackboard

page of the course). The report will determine the grade for each program-

ming assignment. Be well organized, type your reports and include figure

captions with a short descrption of all figures in the report. Motivation and

initiative are greatly encouraged and will earn extra points.

Digital Image Fundamentals

August 24, 2020

Problem 1 (20 points). Illumination-reflectance modeling

Assume that a flat area with center at (x0, y0) is illuminated by a light

source with intensity distribution

i(x, y) = K · e?[(x?x0)2+(y?y0)2].

Let the reflectance of the area be constant and equal to 4 and let K = 127.

If the digital image is acquired with k bits of intensity resolution, and the

human eye can discent an abrupt change of eight shades of intensity between

adjacent pixels, what value of k will cause visible false contouring?

Problem 2 (20 points). Spatial relationships between pixels

For the below sub-image draw the shortest 4–, 8– and m– path between

pixels m and l and compute the corresponding lengths. Explain if there

does not exit a particular requested path. Solve for i) V = {0, 1} and ii)

Problem 3 (20 points). Image transformations

Show that the forward and inverse Fourier kernels r(x, y, u, v) = e?j2pi(ux/M+vy/N)

and s(x, y, u, v) = 1

MN

ej2pi(ux/M+vy/N) are separable and symmetric.

Programming Assignment 1 (30 points). Image interpolation

Download and unzip test images from blackboard page of the course.

Write a program that will

1. read a grayscale image

2. downsample the image by a factor of i) 2 and ii) 8

3. oversample back up to original resolution

4. compute the squared difference between the image of the previous step

and the original image

5. display all images and differences

6. compute the average squared difference between the two images.

Repeat the above process for i) nearest neighbor and ii) bilinear interpo-

lation. Show your results on 3 of the grayscale test images.

Write your program in function format, i.e. with input and output ar-

guments. One of the input arguments should be the input image filename

so that you can apply your program to any grayscale image. You can use

Matlab’s built-in functions for resampling.

Programming Assignment 2 (30 points). Image quantization

Download and unzip test images from blackboard page of the course.

Write a program that will

1. read a grayscale image

2. quantize pixel intensities to i) 6 and ii) 3 bits of accuracy.

3. compute the absolute difference between the image of previous step and

the original image

2

4. display all images and differences

5. compute the average absolute difference between the two images.

Show your results on 3 of the grayscale test images.

Write your program in function format, i.e. with input and output argu-

ments. One of the input arguments should be the input image filename so

that you can apply your program to any grayscale image. You can not use

Matlab’s built-in functions for quantization.

Programming Assignments Write-up For each programming assign-

ment, you are to turn in a brief report (instructions are posted on blackboard

page of the course). The report will determine the grade for each program-

ming assignment. Be well organized, type your reports and include figure

captions with a short descrption of all figures in the report. Motivation and

initiative are greatly encouraged and will earn extra points.