Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 2 Introduction As I eluded to in the last lecture, assignment 2 is going to be about demosaicing. It will consist of 3 parts

Assignment 2

Introduction

As I eluded to in the last lecture, assignment 2 is going to be about demosaicing. It will consist of 3 parts -

Note that you are not to use any library outside of what is available by default in the programming language you choose.

  • Just like before there are 3 text files for you, you won't have to change any code or redo any work for each except for change the width and the height numbers. You just have to run your code for each text file.

  • You will be given a list of values, just like before; but this time around instead of a voltage, an intensity value that is already scaled up to 0-255 (for 8-bit color).

  • Each value corresponds to the intensity recorded at each photodiode. You should assume the photodiodes have a Bayer color filter array installed in front of them. Meaning where last time around you had 256 * 256 photodiodes producing 256 * 256 values - this time around you will have 256 * 256 * 4 photodiodes instead. 4 photodiodes will correspond to a single pixel in the final image (for the simple demosaicing algorithm we'll be implementing).

  • As an "output" for each Part of the assignment, you will be creating a text file using the program you write. Each part is going to ask of you to create an image, and each image will be in this following format -

    • The first line in the file will be RGB to represent that the image uses the RGB colorspace. RGB will be followed by a newline , so - RGB .
    • The second line will be a number representing the height of the image in pixels, so 256 for an image consisting of 256 pixels.
    • The third line in the image would be the width of the image in pixels, so 512 for a 512 pixel wide image.
    • From the fourth line onwards you will have the RGB color for each pixel, so 144 72 44 for the color rgb(144, 72, 44). You will have as many lines as pixels in your image.

    You will be also given a binary to view the "images" in these files later, along with instructions on how to use the binary.

  • Part A

  • Part A is worth 20 points.

    The first task is simply to convert the list of intensity values given to the above image format, take a screenshot of the images using the supplied binary, and attach both the image text files and the screenshots and submit.

    You are to also describe, briefly, what you see in the image and why you think it looks the way it does.

    Just to elaborate a little, last time around you were given a list of voltage values, which you stacked, like so -

    image text in transcribed

    This time around, the images have a bayer color filter array in front of them, like so -

    image text in transcribed

    Since you won't be performing any demosaicing, the colors won't be "merged". Instead you can leave them as is. For instance, if the first intensity value in your file is 84; and the Bayer pattern tells you that the first photodiode is meant for the color blue, then you can represent it as rgb(0, 0, 84), or 0 0 84 in the file.

    What we did there was we just set the other components to 0, and the blue component to the value we were given.

    Do make sure the resolution you enter in the file properly corresponds to the number of pixels in the output image

    Part B

    Part B is worth 60 points

    The second part is where you will actually perform the demosaicing, basically, this -

    image text in transcribed

    You will be "combining" the intensity for 4 photodiodes into 1 by doing this -

    image text in transcribed

    Again, take a screenshot of the image using the supplied binary, and attach both the image file and the screenshot and submit.

    Do make sure the resolution you enter in the file properly corresponds to the number of pixels in the output image

    Part C

    Part C is worth 40 points

    This time around you will be doing this instead -

    image text in transcribed

    Again, take a screenshot of the image using the supplied binary, and attach both the image file and the screenshot and submit.

    Do make sure the resolution you enter in the file properly corresponds to the number of pixels in the output image

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

Describe the main types of meeting setups.

Answered: 1 week ago