Sample Questions for Project Computational Application Math | MATH 179, Assignments of Mathematics

Material Type: Assignment; Professor: Cheng; Class: Proj in Computational/App Math; Subject: Mathematics; University: University of California - San Diego; Term: Spring 2010;

Typology: Assignments

Pre 2010

Uploaded on 03/28/2010

koofers-user-e8k
koofers-user-e8k 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework #4
Turn in the problems marked with a (*).
1. (*) Calculate the sum of
(fi+1,j fi,j)2+ (fi,j +1 fi,j)2
for i= 0, . . . , width 2 and j= 0, . . . , height2 at the end of your averaging inpainter.
Then inpaint “pic5.bmp” with mask “mask1.bmp” running for steps 0,20,40,60,80,100.
Write down the value of the sum for each case and turn that it.
2. (*) Use the median in 3 ×3 squares to inpaint the image “pic4.bmp” with the mask
whose (i, j)th pixel value is 0 if ior jis odd and 1 otherwise. Take initial guess 0.5
for the missing values and inpaint the image for 100 steps using periodic boundary
conditions.
3. (*) Use the median in 3 ×3 squares to inpaint the image “pic5.bmp” with the mask
“mask1.bmp”. Take initial guess 0.5 for the missing values and inpaint the image for
100 steps using Neumann boundary conditions. Print out your result and turn it in.
4. Form the image in [0,1]×[0,1] that has value 0.75 everywhere. Also form the mask in
[0,1] ×[0,1] that has value 0 in [0.25,0.75] ×[0.25,0.75] and value 1 otherwise. Using
initial guess 0.5 for the missing values, inpaint the image with 500 steps of 3×3 median
inpainting.
5. Use the median in 5 ×5 squares to inpaint the image “pic5.bmp” with the mask
“mask1.bmp”. Take initial guess 0.5 for the missing values and inpaint the image for
100 using Neumann boundary conditions. Print out your result and turn it in.
6. (*) Download “pic6.bmp” and add salt and pepper noise at each pixel with probability
0.2 for black, 0.2 for white, and 0.6 for no change. Print out the picture and turn it in.
7. Add salt and pepper noise to “pic6.bmp” at each pixel with probability 0.4 for black,
0.4 for white, and 0.2 for no change. Print out the picture and turn it in.
1

Partial preview of the text

Download Sample Questions for Project Computational Application Math | MATH 179 and more Assignments Mathematics in PDF only on Docsity!

Homework # Turn in the problems marked with a (*).

  1. (*) Calculate the sum of

(fi+1,j − fi,j )^2 + (fi,j+1 − fi,j )^2

for i = 0,... , width−2 and j = 0,... , height−2 at the end of your averaging inpainter. Then inpaint “pic5.bmp” with mask “mask1.bmp” running for steps 0, 20 , 40 , 60 , 80 , 100. Write down the value of the sum for each case and turn that it.

  1. (*) Use the median in 3 × 3 squares to inpaint the image “pic4.bmp” with the mask whose (i, j)th pixel value is 0 if i or j is odd and 1 otherwise. Take initial guess 0. 5 for the missing values and inpaint the image for 100 steps using periodic boundary conditions.
  2. (*) Use the median in 3 × 3 squares to inpaint the image “pic5.bmp” with the mask “mask1.bmp”. Take initial guess 0.5 for the missing values and inpaint the image for 100 steps using Neumann boundary conditions. Print out your result and turn it in.
  3. Form the image in [0, 1] × [0, 1] that has value 0.75 everywhere. Also form the mask in [0, 1] × [0, 1] that has value 0 in [0. 25 , 0 .75] × [0. 25 , 0 .75] and value 1 otherwise. Using initial guess 0.5 for the missing values, inpaint the image with 500 steps of 3×3 median inpainting.
  4. Use the median in 5 × 5 squares to inpaint the image “pic5.bmp” with the mask “mask1.bmp”. Take initial guess 0.5 for the missing values and inpaint the image for 100 using Neumann boundary conditions. Print out your result and turn it in.
  5. (*) Download “pic6.bmp” and add salt and pepper noise at each pixel with probability 0 .2 for black, 0.2 for white, and 0.6 for no change. Print out the picture and turn it in.
  6. Add salt and pepper noise to “pic6.bmp” at each pixel with probability 0.4 for black, 0 .4 for white, and 0.2 for no change. Print out the picture and turn it in.