ECE 563 Assignment 3
Images and m-files for this assignment may be downloaded from
impro3.zip and head.zip.
Individual Work
- Select a color photograph, with lots of bright colors. It should be a photograph, not
a magazine or book image. Scan the photograph twice at the same resolution (70-150 dpi), once at
24-bit color and once at 8-bit grayscale. Be careful not to move the photograph between scans.
Load both images into Matlab. Convert the color image to grayscale (rgb2gray) and
generate a histogram of the difference between that image and the scanned grayscale image.
Display a scaled 'difference' image obtained by mapping the image such that positive values
range from (0.5 to 1) or negative values range from (0 to 0.5) depending on which
range is larger. See kitchen1.
- Using your scanned photograph, determine the
coefficients in the equation Y = a0 + a1*X,
where X is the scanned grayscale
image and Y is the color image converted to grayscale by rgb2gray.
Calculate the correlation between the two images before and after linear correction.
- Using the same photograph, determine the
coefficients in the equation Y = k1 R + k2 G + k3 B
by the method of least
squares where (R, G, B) are values from the 24-bit digitized image and
Y are values from the 8-bit grayscale digitized image. Subtract the image
resulting from your fit from the grayscale image and generate a histogram of
the differences. Find the maximum deviations and the rms deviation of the error.
Scale the difference image to full grayscale range and examine the result. Does
the difference image correlate with the the original image?
- Photograph (or scan) a collection of objects that would be suitable
for binary image analysis of shapes. Suggestions include keys, coins,
washers, stamps, leaves, and puzzle pieces. Show the histogram of your
image and select an appropriate threshold using (a) Matlab threshold
function and (b) manual selection.
Group Projects
- Do textbook problems 10.20, 10.22, 10.23, 10.24, and 10.25
- Generate 10 uniform random images. Average the first n images, where n = 1 .. 10.
Display the results (image and histogram) and calculate the mean and standard deviation
of the resulting images. Explain what is happening.
- The image graycard_75dpi.tif is a scanned image of a Kodak gray reference card.
Find the mean and standard deviation of the image. Generate a gaussian random image with the
same mean and standard deviation. Display the two images side by side and assess their similiarity
or difference.
- Generate a binary image with an array of regular polygons with 3 to 8 sides. You may use
polygon.m for this purpose.
- For the binary images of a spade, club, heart, and diamond, generate a table of features,
to include the centroid, rectangular extent (width and height), area,
perimeter, and circularity. You may find the Matlab routine regionprops useful.
Reference:
William Pratt, Digital Image Processing, (Third Ed)
Wiley-Interscience, 2001. p 596-597.
- Generate a cross-section of the MRI head as shown below
Generate a movie of the MRI head starting from image 127 downto image 0.
Maintained by John Loomis,
last updated 22 Jan 2005