## CS/ECE 545 Homework 2

Complete by Class 3

Edge Sharpening

Write a program to sharpen an image by computing the Laplacian of the image and adding some amount c of that back to the original image. The resulting mask should be

Your program should accept positive and negative values of c. Test it on the racepoint image and telescope image

• What value(s) of c give the best-looking results?
• What happens to the image when the parameter is too high or too low?

Histogram Equalization

Implement the histogram equalization method described in class (also in the text). Test it on the comet image

• What happens if this method is applied to each band of a color image, such as EAP1?
• Can you suggest a better method of histogram equalization for color images? You do not have to implement it.
• Extra credit: Implement it.

Gray level modification

The values of an 8-bit grayscale input image are modified according to s = 16 sqrt(r), where the factor of 16 guarantees that the result will be in the range 0 to 255. The output is also stored as 8-bit grayscale. If every possible gray value is present in the input image, how many distinct gray values will be present in the output image?

Hint: You may need to write a computer program to answer this question, although the program might not actually operate on images.

Rotational Invariance

Gonzalez and Woods, Problem 3.24.

Hint: You need to show that the Laplacian of f taken in x, y coordinates is the same as in x', y' coordinates. Use the chain rule from calculus to compute derivatives fx, fy, fxx, fyy.

What to hand in
Hand in to class