Name:_____________________ This is an individual exam. Do not communicate with anyone... EE435: Biometric Signal Processing Exam 1

advertisement
Name:_____________________
EE435: Biometric Signal Processing Exam 1
Due Friday, 2/14/14 (Beginning of Class)
This is an individual exam. Do not communicate with anyone else: if you have questions, ask me. If
you get stuck on a problem, you can ask me for help. In that case, I may determine a point cost for
my help, based on the severity of the problem you are having. I will let you know how much the
help would cost, then you will have the option to accept the help for a deduction in points, or you
can go back and try again on your own.
You’ll have this week’s lab period to work on it, but it won’t be due until Friday at the beginning of
class. Use any of your notes/graded work/handouts from this semester, the Introduction to
Biometrics textbook, the Digital Image Processing using MATLAB textbook (on the biometrics lab
bookshelf), or online MATLAB help as needed.
When you turn in your exam, provide the following:
Hardcopy of:
Your answers to ALL questions in problems 1 and 2 (can be written on these sheets if there is room)
Code for all parts of problem 1
Two scatter plots with decision boundaries for problem 2
Code for all parts of problem 2
Hand these to me on Friday, 2/14 at the beginning of class.
Softcopy of:
image1.png, image2.bmp
The .dat file from problem 2 where you have filled in the 2nd column
Put these softcopies on the shared EE435 Google Drive in a folder you create called “Exam 01”.
Problem
Points Possible
1
40
2
60
Total:
100
Points
1. (40 pts total) Download the “5_67-gray.jpg” and bring it into MATLAB as a variable.
a. (8 pts) Fill in the following information about the image:
Min Value
Max Value
Mean Value
Std Deviation
Rows x cols x depth
b. (8 pts) Which shade of gray (i.e., which pixel value) occurs more times than any other in this
image, and how many times does it occur? How did you figure this out?
Pixel Value: ______________
Number of Occurrences: ____________________
c. (12 pts) Extract a 300 row x 250 column subimage from the 5_67-gray image, with the
upper left corner of the extraction being location (row #, col #) = (193, 182). Use
imwrite to create an image file of this subimage called “image1.png”. Do NOT print out
a copy of the image. For this region, fill in the following:
Max Value
Mean Value
Std Deviation
Number of times the
maximum value
occurred
Mode of the image (the
value that appears most
often)
d. (12 pts) Now take this same subimage and make it into a binary logical image (0 or 1
values) according to the following: for the binary image, the value should be 1 if the original
value in the subimage was > 200 or < 75; otherwise the value in the binary image should be
0. Use imwrite to create an image file of this binary image called “image2.bmp”. Do
NOT print out a copy of the image. How many 1 values are in this binary image? Answer
this below.
Number of 1 values: ____________
Turn in a hardcopy of all your code to answer the questions above.
2. (60 pts total) You are to evaluate a new pattern recognition
system that will try to distinguish an adult US citizen from a
North Korean Citizen. There are two features that are used in
this system that are measured on a person’s right hand: (1) the
largest extent across the entire hand while the fingers are
spread out (in cm); and (2), the area of the palm (in cm2).
The decision boundary for this system follows this equation:
(area of palm in cm2) = −15× (largest extent of the hand in cm) + 152.5
Test how well this system would work using the following steps.
Download the file called USNK_hand.dat file from the course website, and load it into
MATLAB. This is a file consisting of 500 samples of US citizens, and 275 samples of North
Korean citizens. The file is laid out as follows:
Column 1: ground truth—either a 1 (US) or a 2 (North Korean)
Column 2: 0 (all zeros in this column)
Column 3: feature 1--largest dimension of right hand (maximum distance across
palm/fingers when fingers are spread out, measured in cm)
Column 4: feature 2--total area of palm (cm2)
Use the load command to bring the data into MATLAB:
>> load USNK_hand.dat
a. (16 pts) Create a scatter plot of this data, with feature 1 on the x-axis and feature 2 on the yaxis. Include labels, a legend, a title and a grid. Also, using the equation above in a
MATLAB command, plot the decision boundary on the plot as a straight line. The hold
command may be useful to do this. Print out this scatter plot to turn in a hard copy of your
scatter plot and code with your exam.
b. (4 pts) By just looking at the scatter plot, comment on how well this system is designed;
why it would or would not work as well as it might.
c. (4 pts) Based on the scatter plot, would you say that these features were good features to use
to classify US vs North Korean citizens? Why?
d. (16 pts) Using the decision boundary provided, USE MATLAB to determine the accuracy of
the system with this given data (that is, DO NOT just count patterns you see in the scatter
plot). Pattern vectors that fall exactly ON the decision boundary should be classified as US.
Fill in column 2 of the USNK_hand matrix with a 1 (for US) or 2 (for North Korean) based
on this decision boundary. Send me the filled-in USNK_hand matrix in an ascii .dat file
using a command such as the following (insert your last name in the name of the file you
send me):
>> save Turner.dat USNK_hand -ascii
Record the accuracy you calculated, and turn in a hardcopy of your code:
Total number of Errors = _____________
Accuracy = _________ % correct.
e. (4 pts) Suppose a 3rd feature is available for your use (# of fingers on right hand). How
would you use this information in a classifier?
f.
(16 pts) Determine a better decision boundary than the one provided that you would use to
improve accuracy for this problem. Write the equation for the boundary, the resulting
decision rule, and USE MATLAB to determine the accuracy you obtained. Also, using your
decision boundary equation in a MATLAB command, plot the decision boundary on the
scatter plot as a straight line. The hold command may be useful to do this. Include labels, a
legend, a title and a grid. Print out and turn in a hardcopy of your scatter plot and code.
Decision Boundary: ___________________________________________________
Decision Rule: _______________________________________________________
Record the accuracy for your system:
Accuracy = _________ % correct.
Download