Question
-The first task is simply to convert the list of inte Your task is to first stack the intensity values in a grid, so that
-The first task is simply to convert the list of inte
-
Your task is to first stack the intensity values in a grid, so that you can use the bayer pattern to figure out which value pertains to which color.
-
Once youve done that, youll turn each value into an RGB color. For instance, the 83 when meant for a red color turns into 83 0 0; for a green color turns into 0 83 0 and for a blue color turns into 0 0 83.
-
Once youve figured out the RGB value for each intensity value, write it out to an output file in the format mentioned above.
-
In these animations, Ive shown a camera sensor with 16 photodiodes giving you 16 intensity values, and Ive stacked them into a 4 by 4 grid so that I can apply the bayer pattern to tell me which intensity value belongs to what color.
-
In the _easy and the _medium text files you are given, there are 262,144 intensity values, which will be stacked in a 512 by 512 grid
- We know that the _easy image is 256 pixels by 256 pixels.
- We know from the Color acquisition lecture that the color from each pixel is derived from 4 photodiodes.
- We know that these photodiodes that produce a single colored pixel are arranged in a 2 by 2 grid.
- Meaning that if the image is 256 by 256 pixels, then the camera sensor would have a grid of 256 * 2 by 256 * 2 photodiodes giving us a 512 by 512 grid.
An example
- Assume a 2 by 2 pixel image.
- The sensor would have 4 by 4 photodiodes, producing 4 * 4 intensity values.
- Lets say those values are - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
-
[ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16] ]
- Once youve done that, you can use the bayer pattern to realise that 1 is the intensity for the color blue, 2 is for green, 3 is for blue again, and 4 is for green again. For the next row, the patten tells us that 5 belongs to green, 6 belongs to red, so on and so forth.
- This would produce the following file, according to the format described above
RGB 4 4 0 0 1 0 2 0 0 0 3 0 4 0 0 5 0 6 0 0 0 7 0 8 0 0 0 0 9 0 10 0 0 0 11 0 12 0 0 13 0 14 0 0 0 15 0 16 0 0
- We used 4 pixels as the height for the image, and 4 pixels as the width, because were not combining the individual intensities into color yet, so a 4 by 4 photodiode grid produces a 4 by 4 image. When we do part B, well actually combine the intensities, and well produce a 2 by 2 image instead.
-
Do make sure the resolution you enter in the file properly corresponds to the number of pixels in the output image
nsity 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started