#10
ECE 253a Digital Image Processing
Pamela Cosman
10/27/11
Solutions for Homework 3
1. Chromaticity diagrams:
Here is the matlab code to plot the tristimulus values:
>
>
>
>
>
>
load cie -ascii
l = cie(:,1);
X = cie(:,2);
Y = cie(:,3);
Z = cie(:,4);
plo
ECE 253a Digital Image Processing
Pamela Cosman
11/17/10
First Name:
Last Name:
ECE 253a QUIZ 2
This cover sheet is provided to give all students equal time. Do not turn it over until everybody
has received a copy of the quiz and you are instructed to sta
#5
ECE 253 Digital Image Processing
Pamela Cosman
10/12/10
Solutions to Homework 1
1. Boundary extraction:
The bwperim command will work:
bw2 = bwmorph(bw,4);
The remove command which is part of bwmorph produces the same result:
bw3 = bwmorph(bw,remove);
# 16 ECE 253a Digital Image Processing
Pamela Cosman
11/11/10
SOLUTIONS FOR HOMEWORK 4
1. Scalar Quantization: Comparing pdfs and distortions of binary quantizers:
You are given an input signal X to quantize. It has a pdf given by
A x, 0 x 1
fX (x) = A +
#21
ECE 253a Digital Image Processing
Pamela Cosman
11/30/10
Solutions to homework 5
These solutions are written by Dawei Wang.
Problem 1: Human Coding
a) One possible codeword assignment is:
Symbol
A
B
C
D
E
F
Probability
0.5
0.25
0.1
0.05
0.05
0.05
Code
# 23
ECE 253a Digital Image Processing Pamela Cosman 12/8/10
Solutions to Homework 6
1. JPEG quality levels
To calculate the MSE, you have to write out the image as a jpeg, and then read it back in and calculate
the MSE. The MATLAB code is:
% For aerial4.
#9
ECE 253a Digital Image Processing
10/26/11
Sampling in 2 dimensions
Sampling refers to making the image discrete in its spatial coordinates. To discuss this, we
need to introduce notation and dene some functions:
The 2-D discrete delta function is dene
# 24
ECE 253a Digital Image Processing
Pamela Cosman
12/9/11
ECE 253a Final Exam Solutions
1. Binary Image Processing: (8 points)
(a) Even though the origin of B1 is not centered, the set (A B1 ) will be an outline of a
square with side length 4L with a s
# 10 ECE 253a Digital Image Processing
Pamela Cosman
10/29/10
QUIZ 1 SOLUTIONS
1. Human Visual System:
(a) The relative luminous eciency function shows, for each wavelength in the visible spectrum, how ecient the human visual system (HVS) is at converting
ECE 253a Digital Image Processing
Pamela Cosman
10/29/10
First Name:
Last Name:
ECE 253a QUIZ 1
This cover sheet is provided to give all students equal time. Do not turn it over until everybody
has received a copy of the exam and you are instructed to sta
#3
ECE 253 Digital Image Processing
Pamela Cosman
9/27/11
HOMEWORK 1
Due Friday October 7 in class
In Matlab, if you type help images you will see the commands of the Image Processing
Toolbox. Within this long list, the commands under the header Morpholog
ECE 253a Digital Image Processing
Pamela Cosman
12/10/10
First Name:
Last Name:
ECE 253a FINAL EXAM
This cover sheet is provided to give all students equal time. Do not turn it over until everybody
has received a copy of the exam and you are instructed to
#24
ECE 253a Digital Image Processing
Pamela Cosman
12/13/10
Solutions to the Final Exam
1. Binary Morphological Operators (8 points):
In quiz 1, problem 2, the operation (A B ) B provides a nice clean letter E. By eroding
rst, the noise blobs will go awa
#7
ECE 253a Digital Image Processing
Pamela Cosman
10/17/11
HOMEWORK 3
Due Wednesday October 26 in class
Comment on Matlabs imshow command: Depending on the version of Matlab, you can use
imshow with type uint8, in which case the input should be integer-v
# 11 ECE 253a Digital Image Processing
Pamela Cosman
10/28/11
HOMEWORK 4
Due Friday November 4 in class
1. Scalar Quantization optimality conditions for squared error distortion
Suppose that a random variable X has the two-sided exponential pdf
fX (x) =
# 18 ECE 253a Digital Image Processing
Pamela Cosman
11/17/10
HOMEWORK 5
Due Monday Nov 29 in class
1. Human coding
In class weve talked about only binary Human codes, but one can use dierent output
alphabets. For example, a ternary Human code is a code o
# 20 ECE 253a Digital Image Processing
Pamela Cosman
11/23/10
HOMEWORK 6
Due Friday Dec 3 in class
1. JPEG quality levels:
This is a simple exercise intended just to give you a feel for the quality versus bit
rate performance of JPEG. Read the images aeri
# 19
ECE 253a
Digital Image Processing
Pamela Cosman
11/19/10
QUIZ 2 SOLUTIONS
1. Human Coding:
(a) One possible codeword assignment is:
Symbol
A
B
C
D
E
F
G
Codeword Length
2
2
2
3
4
5
5
Codeword
11
10
01
001
0001
00001
00000
(Other correct answers are a
Common test image: Lenna
Histogram of Lenna Image
Aerial Image
Histogram of Aerial Image
Look-up Tables (LUT)
Photoshop Brightness/Contrast
Adjustment
LUT for aerial image
Brightness B=13, Contrast C=80
Histogram Equalization:
Continuous Case
Examples of