Java

Java

IAT455 Computational Media

1

Assignment 1

How to submit: Submit through canvas only.

Late assignment policy: The mark for a late assignment will be marked down 25% for each day it is late.

Q1: (2 pts)

Suppose you wish to create a wavy effect, as in the figure below. This effect comes from replacing

the image x value by an x value offset by a small amount. Suppose the image size is 160 rows x

120 columns of pixels. Make the maximum shift in x equal to 16 pixels. Write an expression that

would show this transformation and justify your choice of expression.

Q2: (2 pts)

Suppose we decide to quantize an 8-bit grayscale image down to just 2 bits of accuracy. What is

the simplest way to do so? What ranges of byte values in the original image are mapped to what

quantized values?

Q3: (3 pts)

Consider a screen containing plain black text on a solid white background. There will be many long

runs of white pixels in the blank space, and many short runs of black pixels within the text.

Let us take a hypothetical single scan line, with 0 representing a black pixel and 1 representing

white:

IAT455 Computational Media

2

1111111111110001111111111100000111111111111111111111100111111111111

Explain how you would implement the run-length encoding on this scan line. What compression

ratio would you achieve?

Q4: (3 pts)

a) What is the meaning of the pre-multiplied (R, G, B, A) set (0.0, 0.25, 0.25, 0.5)?

b) Representing colors as pre-multiplied (R, G, B, A) sets, what color do we get if we composite

(0.0, 0.25, 0.25, 0.5) OVER (1.0, 0.0, 1.0, 1.0)?

Q5: (Code) (10 points)

Create a composite image of yourself and a famous place of your choice.

Start with an image of yourself, taken on a background containing a limited range of hue (similar to

Figure 6.29 in your textbook). Write code to extract a matte from this image using the ‘Keying

based on chrominance’ method, as explained in class and in your textbook. Then, using the matte,

produce the composite of yourself and the famous place.

Output from your code should show:

  • original image, captured by camera, with background of limited range of hues
  • image of famous place that you will use in your composite
  • the matte image obtained through the ‘Keying based on chrominance’ method
  • intermediate images (if there are any)
  • final composite result

The code should have explanatory comments and should be submitted in zip format, as project

exported from Eclipse. Name your project in this format: FirstnameLastNameA1 (for example:

JohnSmithA1).

Additionally, submit a report in which you explain your process step by step and the challenges or

difficulties you have encountered. Analyze your final composite and explain any artifacts that are

present (areas of incorrect color, transparency, etc).

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"