Cip Assignment2
Cip Assignment2
Test images
Manasa K 18MCMI04
The background is kept black as RGB cannot produce black. So the image seems little
dark.
Dithering using CMY dots. The each pixel is subtracted by 255 to get corresponding
CMY pixel.
M 2 C1 Y 5 M 4
C4 Y 3 M1 Y 6
The filter used is for CMY space. The same procedure is
Y 4 C2 Y 2 M 3
C 5 G5 Y 1 C 3
followed to this also, only in place of RGB we use CMY dots.
Manasa K 18MCMI04
The background is kept white as CMY cannot produce white. So the image seems little
bright.
Original image
Floyd-Steinberg's error-diffusion
Manasa K 18MCMI04
Original image
In Standard error diffusion algorithm, there is not much of patterns, its just wavy for first
pic, then for second pic, there was many patterns. After changing the coefficients, more
patterns were visible in both pictures.
B G
3. Color filter array: The mask considered is . The image is considered. According
G R
to the mask we take out each pixel value. Suppose the first pixel (R,G,B) we take the
Blue value out of that and store it. Second pixel (R,G,B) we take green value out of that
and store it. Like this we continue to store one value out of each pixel. This is called color
filtering. Original image will be of three dimensions. This obtained color filter from that
image will be only two dimensions. Here we go from color image to gray scale image.
Demosaic: The obtained color filter we take it and we construct the color image. The gray
scale image to color image. The filter is shown above. We take 2x2 of the color filter
image values. All individual values are taken, if there is more than one individual color
we take average of those respective colors. That is, we take all blue colors find average of
it, place in blue position (R,G,B). Similarly we consider other colors and average it and
place it.
G B
Then we have to slide our 2x2 window, but now the stored color will be .
R G
B G
So we have to make it again. We can use np.roll() function, we can roll the
G R
matrix along axis 1 to get it. Horizontally we roll along axis 1. Vertically we roll along
axis 0.
In first image shown below, the orange flower doesn’t seem much different from the
original one.
In Second image shown below, the water plane there is difference from the original one.
As there is color bleed.
In the third image shown below, the chameleon there is little difference from the original
one at the eyes, because of color bleed.
Manasa K 18MCMI04
Color filter
Demosaic
Manasa K 18MCMI04
Color filter
Demosaic
Manasa K 18MCMI04
Color filter
Demosaic