Starting from:

$30

EE384-Lab6 Solved

Problem 1: Histogram Equalization

We will revisit problem 2 of classwork-5 in a mathematical approach. The intensity levels in an image may be viewed as random variables in the interval [0, M]. For an 8-bit gray-scale image, M equals 255. A fundamental descriptor of a random variable is its probability density function (PDF). Let pr(rk) and ps(sk) denote the PDFs of rk and sk, where rk and sk are the intensity levels of the image before and after the histogram equalization. The plots of pr(rk) versus r or ps(sk) versus s are commonly referred to as histograms. The histogram equalization can be considered as a transformation from pr(rk) to ps(sk):

                 (1)

In a low-contrast image, the histogram is often narrow. Broadening the histogram will lead to increase in contrast of the image. One of the broad PDFs that we would like to transform into is a uniform PDF:

                            (2)

From (1) and (2), we have:

            (3)

The right side of above equation is recognized as the cumulative distribution function of r.

With the above information, write a function ‘my_histeq’ to perform the histogram equalization.

Additional reference: http://math.uci.edu/icamp/courses/math77c/demos/hist_eq.pdf 

Problem 2: Edge detection

Write your edge detection function and apply it on the given ‘lena.bmp’ image using: a) Roberts operator

b)      Prewitt operator

c)       Sobel operator

Problem 3: Laplacian edge sharpening

The Laplacian responds only to the fine detail in the image but has a zero response to constant regions and regions of smooth gradient in the image. We can enhance the fine detail in the image artificially by:

𝐼𝑜𝑢𝑡(𝑥, 𝑦) = 𝐼𝑖𝑛(𝑥, 𝑦) + ∇2𝐼𝑖𝑛(𝑥, 𝑦)

Write your function to apply Laplacian to sharpen the image. Test the result on the given ‘blur_image.jpg’ image.

 

More products