Starting from:

$25

ME6406-Homework 1 Solved

1. Pin-hole optics  
 Consider a dark edge projected through a pinhole. Show that

              =A = 1 cos−1 s      s   Rs 2 

                                                    −     1−

                        O           R R             

                                                                  

where−R s R  ; s is the displacement of the pinhole center from

the edge; δO is the pin hole projection area; and δA is portion of δO in  the dark area. Plot ρ as a function of s/R.    Fig. 1 

 

2. Histogram equalization  
Figure 2 shows an 8-bit gray-scale image of an eye-retina.  

 

Fig. 2 eyeball.png

(a)   Perform a histogram equalization of the sub-region shown in image matrix; give your results by completing Table 1. Show the histogram equalized results of sub-region matrix.

Gray level 
# of pixels 
cdf 
qk 
round(qk) 
113 


5.31 

 ׃

 ׃

 

 ׃

 ׃
128 

48 
255 
255 
Table 1 

 

(b)   Perform histogram equalization on an image by writing a Matlab script for the following:

I.        Read in and display the image ‘eyeball.png’.

II.     Compare by displaying the original and processed images and their histograms.  

Suggested Matlab functions:  imshow, imhist or hist, histeq 
 

3. Filtering masks

(a) Show the value of a 5x5 Gaussian filter with  equal to 2 pixels.

 

Sobel operator 
(b)   Use a 3x3 Sobel operator to calculate the magnitude and direction of the gradient at pixel (X, Y)=(4, 5) in Fig. 2. Indicate the direction of the gradient on the pixel. (Note: Sobel operator is coordinate dependent. Be sure to use consistent coordinate systems on the sub-regions.)

(c)   Write a Matlab script to compute the gradient of an image.  For illustration, use the Sobel operator on the image “IC_pin.png” shown Fig. 3(a). Display the gradient images (Gx, Gy, G). Suggested Matlab functions: edge.m

Gaussian operator and Difference of Gaussian (DOG):

(d)   Use an m×m Gaussian filter mask with different (=1, 2 and 5) to smooth the noisy image shown in Fig. 3(b). Compare the effect of  on the smoothed image. Suggested Matlab functions: imfilter.m.  

 Notes: ‘Smoothing effects are more prominent as sigma increases. Mask size increases as sigma increases. 

(e)   Perform DoG operation (with =1 and =2) on Fig. 3(c) and show the processed image.

 

                           (a) ‘IC_pin.png’                        (b) ‘salt_and_pepper_checker.png’                    (c) ‘checker.png’                  

Fig. 3

4. Low-level information processing 
(a)   Read in and convert the image (Fig. 4) into a gray-scale image. Binarize the image using three different thresholds; the “best or preferred” value, and an over-estimate and under-estimate values. (Use image histogram to help pick the threshold values).  

(b)   Obtain the area and centroid of the two objects (nut and shelf) in the image with an appropriate threshold.  

Suggested Matlab functions: rgb2gray.m, im2bw.m, bwlabel.m, regionprops.m
  

Figure 4 ‘nut_and_shell.png’ 

 

More products