# EECS101: HOMEWORK #3

\$30.00

## Description

Written Problem
Consider a region growing method that uses the homogeneity measure
H(Ri) = TRUE if σ
2
i ≤ 1
H(Ri) = FALSE if σ
2
i > 1
where σ
2
i
is the sample variance of the pixels in region Ri
. Assume that the method starts
with the upper left pixel and always attempts to grow to a new connected pixel (assuming eight
neighbors) whose gray level is closest to the average of the gray levels of the current region. For
the grayscale image below, find the first region that will be generated using this algorithm (grow
from the upper left pixel until H(R1) is FALSE). Circle this region in the image and compute
the mean and sample variance of the region. For each step in the region growing process, write
down the pixel values in the current region and their mean and variance.
Assume that the sample variance σ
2
i of a region Ri
is defined by
σ
2
i =
1
N
X
j
(Ij − µ)
2
where N is the number of pixels in Ri
, Ij are the pixel values in Ri
, and µ is the mean of the
pixel values in Ri
. The sum is over the pixels in Ri
. The gray-level image is
8 8 14 10 11
12 9 12 10 10
12 10 12 12 8
14 11 8 9 11
Computer Problem
For each of three supplied 512 × 512 gray level images
1) Display the gray level image
2) Use GIMP or IrfanView to display a gray level histogram of the image.
3) Choose a threshold that will separate object from background
4) Write a program to threshold the gray level image to obtain a binary image. For display
purposes, let gray level 0 indicate background and let gray level 255 indicate object in the
binary image. Your program should print out the area and center of area of the object and
output the binary image with the center of area indicated by a small cross with gray level 128.
You may assume for all calculations that there is only one connected object in the binary image.
You do not need to find connected components.
5) Display the binary image that your program generates and check that your center of area
appears correct.
For each of the three images, submit your generated binary image and the values for your
threshold, the object area, and the object center of area (x, y). Assume that the origin (0, 0) of
the (x, y) coordinate system is at the bottom left corner of the image.