3. Slice Source
image into
tiles
Resize images
from the image
corpus keeping
their aspect ratio
Find average
brightness of each
color channel of the
corpus images
Compare the
distance of the
average brightness
of each image with
the average
brightness of source
image.
Replace each pixel
in the source image
with the image
with the least
distance
PHOTO-MOSAIC
not ‘Pixel Perfect’, but ‘Picture Perfect’
12. Black and White
Used nested loop to traverse each pixel and checked the threshold value of 128. Value greater that 128 corresponded to 255
while the smaller one was changed to 0.
13. Horizontal Flip
Used nested loop to traverse each column in the image matrix. The (x,y) pixel values in each column was replaced with the
value of (x, height-y) pixel value and stored in another 2D array.
14. Average of two images
Used nested loop to traverse the images and added the (x,y)th pixels of both the images and divided the
values by 2. This was stored in a 2D array.
20. The Image
This wasn’t
visible through
eye but came
up well on
camera. The
edges are not
sharp since it
was a big pin
hole. The
building
specifics were
not visible at
all but the sky
came out really
good.