ECE 563 Assignment 2

Images for this assignment may be downloaded from impro2.zip.

  1. Generate a grayscale image of the function sinc(x)^4 * sinc(y)^4 over the domain -10 < (x, y) < 10 and scale the pixel values logarithmically to show the secondary maxima (see example).

  2. Do problems 2.11 through 2.17 from the textbook.

  3. Do problems 9.1 through 9.10 from the textbook.

  4. Use morphological erosion to remove the teeth in the image gear_tooth.jpg. Vary the size of the structuring element. For each case show the number of erosions used and the final images. Measure the percentage of pixels removed compared to the original image.

  5. Use morphological operations and the connected-components Matlab functions to find the number of dowel rods in dowels.tif.

  6. Derive formulas for the mean and standard deviation of a uniform [0..1] random image. Compare these results to the measured mean and standard deviation for the uniform random image from the first assignment.

  7. Calculate the entropy H of several grayscale images, including the uniform random image generated on the first assignment. Entropy is defined as

    where M is the number of gray levels and pk is the probability associated with gray level k. Note that a base-2 logarithm is used conventionally. See the file entropy.m in the handout. See p 424-426 of the textbook.

  8. Take a grayscale image and calculate its entropy. Now mask off successive bits, starting from the least significant and plot the entropy as a function of bits in the image. A bit mask of the upper 6 bits can be generated from
    	mask = uint8(hex2dec('fc'));
    	out = bitand(inp,mask);
    
    where inp is the input image and out is the output image. The input should be uint8. The sequence of masks should be hex 'fe' (7 bits), 'fc' (6 bits), 'f8' (5 bits), 'f0' (4 bits), etc. You might also try the masking in reverse order, which ties into the next exercise.

  9. Take a grayscale image and calculate the entropy associated with each bitplane. A bitplane is generated by masking with a single bit, e.g. hex '20'. Plot the entropy vs. bitplane index.


Maintained by John Loomis, last updated 12 Jan 2004