Saturday, June 7, 2008

Assignment #8 - Pictures

(4) Combinations of shrink and enlarge functions used to compare different methods:

a) Shrink2 + Large2:

b) Shrink2 + Large3:c) Shrink3 + Large2:d) Shrink3 + Large3:
(d) was even more washed out using imwrite; imshow was used.
(5) The wiki image (code below):
Enlarging the Facebook Rainbow:
(2) Nearest Neighbor - Method 2:
shrink2: f=0.75 + large2: r=4/3


shrink2: f=0.25 + large2: r=4





shrink2: f=0.1 + large2: r=10





(3) Imwrite does not seem to work to display enlarged images using bilinear interpolation (large3). The code runs in Octave but the images are very washed out. The images are similar to those created from large2, with slightly poorer resolution.
(1)a) f1=1, f2=0.5

b) f1=0.5, f2=1

c) f1=0.2, f2=0.8 Since (c) is very dark, I experimented with different factors. In the image below, f1=0.25 & f2=1, these factors are as close as I could come to the ones suggested in part (c), before the image had black lines.

Assignment #8 - Code











Thursday, June 5, 2008

Shrinking an Image - Pics for Method 2

Images created using imwrite for shrinking an image, using the preferred Code: Method 2.


























I left the images created using imshow up because they show the change in resolution, when shrinking the size of an image (i.e. reducing the number of pixels), better:


Note: This above image is how imread/imshow displays the facebook rainbow in Octave.

































Method 2 displays the best pictures when shrinking an image. The pictures for Method 3 are very similar, but with slightly poorer resolution. Method 1 produced images for f=0.1 that were almost entirely white for the two internet pics.

Shrinking and Image - Code




'Click' to better view the teensy tiny pdf files.