Starting from:
$30

$24

EE475 Homework 2 Solved

INTERPRETATION of HISTOGRAMS: Consider the following images and histograms.  State which histogram goes with which image? Explain briefly why. 




HOW TO QUANTIZE IMAGES
The idea of quantization of images looked straightforward.  However, in real life, one may not know exactly the range of values of the input luminance, so that mismatches between the quantizer aperture (range of min-to-max steps) and the input signal.  Consider a scene of a dark-colored barn with a light colored roof against a bright sky or a TV news speaker wearing a dark jacket and standing against a gray background.  Assume that 0 is dark and 255 is light. 
Sketch what the histogram might look like if (offset: the center point of the quantizer staircase; scale: aperture of the staircase)
    i) Sketch what the histogram might look like if digitization is done properly
    ii) Digitized with gain set too low (zero offset)
    iii) Digitized with gain set to high (zero offset)
    iv) Digitized with too much offset with the correct gain (e.g.,  offset past the middle mass)
    v) Digitized with too little offset with the correct gain (e.g., 255 is below the middle mass)
    vi) Digitized with too much offset and too much gain
    vii) What do spikes up the left or right edge of the  histogram indicate, as in the example below?  

    I. HISTOGRAM EQUALIZATION
Implement your own histogram equalization function in MATLAB. Try your function on the image “lumberjack” images, and validate with “histeq.m” MATLAB function. Compare your results with adaptive histogram equalization method. You can use MATLAB embedded function “adapthisteq.m”. Why do we obtain better results with adaptive histogram equalization? Comment on the results. 

Lumberjack

Spine



COLOR IMAGE ENHANCEMENT
Consider RGB image Kugu and Beach. Perform contrast stretching for each color channel separately and then combine the result. For example, the resulting image for one channel is defined as follows
Ifullcontrast (x,y) = (I(x,y) - c)*(b-a)/(d-c) + a
where a and b are the lower and upper limits to which image intensity values will be extended, and c and d are the value limits in the original image. Record the values of a,b,c,d used for the operation.  

Repeat the same operation after RGB image is converted into HSV color space. You can use “rgb2hsv.m” MATLAB function. In this case, do NOT apply any operation to hue and saturation channels, apply contrast stretching to only V (intensity) channel. Then, combine the results, convert HSV image back into RGB color space and display the resulting images. Comment on the results. 





EFFECTS of FILTERING on HISTOGRAMS
Consider the two images below. 



    a) Sketch intuitively the histograms for the two images above if the black = 0, and white = 255. 
    b) Plot the histograms of the images. Blur the images using 3x3 averaging filter (you can use MATLAB imfilter or conv2 functions).  Is it different than what you expect as a histogram just by looking at the images?  Comment on why does it differs from the histogram you have sketched in a)?
    c) Blur the images with a 9x9 box filter. Assume that pixels outside the image borders are zero. Comment on the resulting histograms. Your box filter consists of a 9x9 matrix, all elements consisting of 1/49s; you can use a matrix of all 1’s and divide the result by 81 and integerize.   


HISTOGRAM DISTANCE
Histogram match the badly illuminated faces to the better illuminated face, the yaleB26_P08A+000E+00 face. Crop the face with a window before histogram processing.  Find the histogram distances as a measure of how well we have accomplished histogram matching. There are various histogram distances, among which we will use two of them: 
    i) The chi-square histogram distance between histograms p and q, namely:  .  
    ii) The Kullback-Leibler distance 
Compare the histogram distances before and after histogram matching by listing them in a table.  




 

More products