Create a grayscale image of your face by converting your color image.
Flip your face image horizontally, i.e. left to right, right to left.
Come up with a third way of manipulating your face that produces an interesting output. For example, you may create a blurred image of your grayscale face by assigning to each pixel the average grayscale pixel value of itself and its 8 neighbors. Hint: You may have to run your program a few times to make the blurring noticeable.
Method and Implementation
To read,save images I have used openCV.
For grayscale, I have taken mean value of each pixel of images to create gray image.
To flip image horizontally, I have inverted the image and then mathematically substracted the fliped image from original.
For third problem, I have changed the background lights of images. For this I have used convertTo function.
Following images were generated by using the above functions:
|Trial||Source Image||Result Image|
|Custom (Removed green channel)|
As C++ allows images to be visualized as 3D array, it becomes easy to do mathematical manipulation in images.