ends 375
Homework 2 Problems
1. What would be the effect
of applying the following point operation transformation function to a 6-bit
image?
f(x) = 0 for x < 16
= 16 for 16 <= x < 32
= 32 for 32 <= x < 48
= 48 for 48 <= x < 64
By applying the transformation, most of the image information is lost. For all the input values ( 0-64) , there are now only 4 output values (0, 16, 32, 64).
2. If we applied the following
3 x 3 convolution kernel to an image, what would be the effect on the output
image?
0 0 0
0 8 0
0 0 0
When that kernel is applied to an image, all of the lighter areas of the picture are "blown out". The lighter valued areas become white, while the darker values become lighter as well. Example.
3. If you wanted to "low-pass" filter an image by manipulating its frequency domain power spectra, how would you accomplish this? Low-pass filtering means only allowing spatial frequencies below a maximum frequency in the output image.
To do this the
lower frequencies would be removed, this could be accomplished by applying
either the Gaussian or Box filter.
4. If we modified the JPEG image compression scheme to use only the dc coefficients,
what would the resulting "compressed" images contain?
The dc coefficient is the average pixel intensity value. If we modified
the compression scheme to only use these values the images would contain less
high and low frequency information, and in combination with using JPEG compression,
much information would be lost.
5. Given four adjacent pixels whose 8-bit gray scale values (base 10) are as follows:
P(11,6) = 65 P(12,6) =
69
P(11,7) = 67 P(12,7) = 71
what would be the value of the sub-pixel sample of the image at location [11.75, 6.25]?
Using 'nearest
neighbor' sampling, the value is 69.
If using bilinear interpolation,
69+2(1/4)= 69.5
65+4(3/4)= 69
67=4(3/4)= 70
(69.5+69+70)/3=69.5
6. With a digital camera, take a photograph of yourself **. You may also scan
a photograph of yourself **. Save your photograph as a 240 x 320 image with
no compression [refered to as "the image" throughout the rest of this assignment]
a) In Photoshop, save a copy of the image as a JPEG file with:
high
image quality.
medium
image quality. Show this image.
low
image quality.
calculate the compression ratios for each image quality.
High: 234KB/ 34KB = 6.88:1
Med: 234KB/ 22.9KB = 10.2:1
Low: 234KB/ 17.1KB = 13.7:1
b) Using the Threshold
operation show the image at a:
25%
threshold level.
50%
threshold level.
75%
threshold level.
c) High-Pass
Show
the image after using the built-in High-Pass filter.
Using the Custom filter, show
the image filtered with the kernel
0 -1 0
-1 5 -1
0 -1 0 Compare the resulting images.
The resulting images are completely different. The high pass image got rid of all the low frequency values, and left the image ‘grey-ish’, while the custom filter pixelated the higher frequency areas.
Using the Custom filter,
show
the image filtered with the kernel
-1 -1 -1 What type of filter is this?
-1 8 -1
-1 -1 -1 Laplacian filter
Using the Custom filter,
show
the image filtered with the kernel
-1 0 1 What type of filter is this?
-2 0 2
-1 0 1 Sobel vertical filter
Using the Custom filter,
show
the image filtered with the kernel
1 1 1 What type of filter is this?
0 0 0
-1 -1 -1 Y component Prewitt filter
d) Low Pass
Using the Custom filter, show
the image filtered with the kernel
1 2 1 What type of filter is this?
2 4 2
1 2 1 Gaussian
Determine the filter kernel for a 5 x 5 Gaussian filter.
1 2 4 2 1
2 4 8 4 2
4 8 16 8 4
2 4 8 4 2
1 2 4 2 1 Example
of image.
e) Add noise to your image (use a Gaussian distribution with an amount of 15). Using a median filter of radius 2, try to clear out some of the noise. Show the resulting image. What disadvantages does this method of noise reduction present?
The disadvantages of this method include distortion of image (the image is now quite blurry) and information loss (all the detail is gone from the image, and these actions cannot be reverted).