The purpose of this assignment is to get acquainted with the functionality of the opencv library.
This was done through three sub-tasks, which are discussed below.
Method and Implementation
- Task 1 - Grayscale Conversion
- Task 2 - Flipping the Image
- Task 3 - Blurring an Image
Done using weighting method shown in class. Given an image with R,G,B channels, a new image is constructed as follows -
NEW_PIXEL_VALUE = R * 0.3 + G * 0.59 + B * 0.11
Straightforward task done by making a new image matrix filled in reverse order (the last column of pixels in the original image were used to fill the first column in the new image)
Done as specified in the assignment question. Value of each pixel is replaced with average of values of the corresponding pixel and it's neighbors.
The following are the resulting images from the program:
|Trial||Source Image||Result Image|
While the program runs fine for the given input image, it takes a long time to run for larger images.
This is especially valid for the blur function, since it has to calculate the average over 9 pixels for every pixel in the image.
Libraries like OpenCV are powerful tools for image computation.
Credits and Bibliography
Collaborator: Aaron Jacob