Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 Implement a Demosaicing Algorithm Implement the simple demosaicing algorithm seen during the lecture, or a more advanced one. Apply it to IMG 4 7

3 Implement a Demosaicing Algorithm
Implement the simple demosaicing algorithm seen during the lecture, or a more advanced one.
Apply it to IMG 4782.
Important: in the processing pipeline, do not change the data type (i.e., do not transform
it to unsigned 8-bits integers). Conversion to a less accurate type should be done only when
exporting results to an image format. Hint: no need to apply a median filter on U and V
channels; it is slow and wont improve much the image. Hint: if it looks grayish, its normal:
you havent applied some color balance yet.
4 Improve the Luminosity
As you probably noticed, the image you obtained after demosaicing is quite dark. Apply a
gamma correction I suggest \gamma =0.3, and not to normalize using np.min and np.max but
np.percentile with values of 0.01 and 99.99.
Evaluate at least one other curve than y = x\gamma .
Hint: use the percentiles to normalize data in [0,1] as you would normally do with min and
max (set negative values to 0, and values greater than 1 to 1), apply the gamma correction,
and invert the transform to get back the the previous range of values.
Hint: here is how to use the percentile approach:
a = np.percentile(data,0.01)
b = np.percentile(data,99.99)
data =(data - a)/(b-a)
data[data<0]=0
data[data>1]=1
5 White Balance
The last step for processing raw sensor data is to apply white balance. Implement the gray
world in your algorithm.
Hint: because of the multiplications, some values might become greater than 255; clip them
to this maximum.
6 Initial HDR Implementation
This exercise is the initial implementation of HDR images, as seen during the lecture. You
will find on StudOn a set of photos (from 00.CR3 to 10.CR3). For each of them, the exposure
time was half the one of the previous photo.
Combine them to produce HDR raw data. Then, apply the demosaicing algorithm and the
white balance. Decrease the dynamic range by computing the logarithm of this data, and
downscale it to the [0,255] interval. Then save the resulting image.
You should obtain the same result as what is shown in the slides.
7 iCAM06
Implement the iCAM06 HDR method, as explained on the slides. Try different settings to find
the ones you like the best.
Hint: bilateral filters are slow, so while developing your solution, use at first very small kernels
to minimize the run time.
8 Win
.. or at least try to!
Implement a demosaicing function named process raw which takes two parameters:
1. The path to a raw file (CR3 format)
2. The path to wich the resulting JPG image has to be saved
Hint: you will be judged based on the quality of your image, so when saving it to the JPG
format, set a high quality setting, such as 98 or 99, not 75!
Provide code for each one differentely 3,4,5,6,7,8

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

Step: 3

blur-text-image

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

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions