Sale!

CS 447/547: Computer Graphics Homework 2 solved

Original price was: $35.00.Current price is: $35.00. $17.50

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

Question 1: This question concerns human’s intensity perception. Humans are tuned to the ratio
of intensities, not their absolute difference. If we want to make a perceptually uniform intensity
system with intensities 𝑙1 = 1, 𝑙2, 𝑙3,𝑙4, 𝑙5,
𝑙6 = 32. What are the values of 𝑙2, 𝑙3, 𝑙4, and 𝑙5 ?
Question 2: CIE L*a*b* color space is often considered approximately perceptually uniform. We
can convert RGB into L*a*b* in two steps:
Step 1: Convert RGB to XYZ using the formula in our lecture 2.
Step 2: Convert XYZ to L*a*b*.
L*a*b* is not a linear color space, so converting XYZ to L*a*b* is more complicated than RGB
to XYZ. We will use the following formulas to the conversion.
𝐿
βˆ— =
{

 

116 βˆ— (
π‘Œ
π‘Œπ‘›
)
1
3
βˆ’ 16
π‘Œ
π‘Œπ‘›
> 0.008856
903.3 βˆ— (
π‘Œ
π‘Œπ‘›
) 𝑒𝑙𝑠𝑒
π‘Ž
βˆ— = 500 βˆ— (𝑓 (
𝑋
𝑋𝑛
) βˆ’ 𝑓 (
π‘Œ
π‘Œπ‘›
))
𝑏
βˆ— = 200 βˆ— (𝑓 (
π‘Œ
π‘Œπ‘›
) βˆ’ 𝑓 (
𝑍
𝑍𝑛
))
where
𝑓(𝑑) = {
𝑑
1
3 𝑑 > 0.008856
7.787 βˆ— t +
16
116 𝑒𝑙𝑠𝑒
Here Yn = 1.0 is the luminance, and Xn = 0.950455, Zn = 1.088753.
Suppose we have two colors in RGB color space: (0.5, 0, 0) and (1, 1, 1).
a. What are the coordinates for these two colors in L*a*b* color space?
In computer graphics, we often need to perform linear interpolation between two colors. The
linear interpolation from (r1, g1, b1) and (r2, g2, b2) can be implemented as follows.
π‘Ÿ(𝑒) = (1 βˆ’ 𝑒)π‘Ÿ1 + π‘’π‘Ÿ2
𝑔(𝑒) = (1 βˆ’ 𝑒)𝑔1 + 𝑒𝑔2
𝑏(𝑒) = (1 βˆ’ 𝑒)𝑏1 + 𝑒𝑏2
b. We want to interpolate from (0.5, 0, 0) to (1, 1, 1) in 5 steps, which can be achieved by using
u=0, u=0.25, u=0.5, u=0.75, u=1, respectively. Compute the 5 RGB colors.
c. Compute the corresponding coordinates in L*a*b* color space of the above 5 RGB colors.
d. Plot two graphs: one showing L* as a function of u and the other showing a* as a function of
u.
Here we can see that L* and a* are not a linear function of u.
Question 3: Consider the three sensors, A, B and C, shown below. Sensor A has a response of 1
between 400nm and 500nm, Sensor B responds between 450nm and 600nm, and Sensor C
responds between 550nm and 700nm.
What is the response of each of these three sensors to the following spectrum? You need to give
actual points.

Question 4: The Sobel operator is used in image processing for edge detection. The following
shows a 3 Γ— 3 Sobel filter mask for a vertical edge detector.
[
1 0 βˆ’1
2 0 βˆ’2
1 0 βˆ’1
]
a. What is the response of this filter to the following 6 Γ— 6 image? Ignore the boundary pixels
that do not have all the pixel values for the filter, so we will get a 4 Γ— 4 image.
[

 

 

0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1]

 

 

b. What is the response of this filter to the following 6 Γ— 6 image? Again, ignore the boundary
pixels that do not have all the pixel values for the filter, so we will get a 4 Γ— 4 image.
[

 

 

0 0 0
0 0 0
0 0 0
1 1 1
1 1 1
1 1 1
0 0 0
0 0 0
0 0 0
1 1 1
1 1 1
1 1 1]

 

 

c. Can you design a 3 Γ— 3 filter that can detect the horizontal edge in the image shown in (a)?
Question 5: Gaussian is one of the most popular filters in computer graphics. What is the 9Γ— 9
2D guassian filter mask? (Use the method described in Lecture 4: first construct a 1d filter mask,
and then construct the corresponding 2D filter mask. You are not required to fill in the actual
number for the 2D filter mask, and a correct formula is good enough.).