Assignment Title

CS 585 HW 1
Yanxing Zhang
09/12/2018


Problem Definition

In this assignment, I got familiar with the basic function of OpenCV. The main goal is to input the pictures of my self and doing some manipulation which includes converting to the grayscale image, flipping the face image and one other way that provided by myself to deal with the pictures. This assignment is just a start of C++ programing using OpenCV and motivate me to do more interesting thing in computer vision. The difficulities is how to program with OpenCv as there are so many function in Opencv.


Method and Implementation

For the grayscale image convertion, I choose the method taught in class that I extracted the pixel value of B,G,R channel and calculate the average for each pixel. The average value is the value for pixel of the grayscale image. For the picture flipping, I went through all the pixel and swap the right side pixel to the left side. For the third method, I just add some white noise point to the grayscale method, I set the pixel value to 255 for each three pixel and go through the whole image.

1. Grayscale image convertion: pixel value = (R+B+G)/3; 2. Flipping image: new pixel value (i, image.cols-j-1) = original pixel value(i,j) (i,j decides the position and go through the whole image); 3. For every three pixel value, the new pixel value = 255.


Experiments

The program just runs and tests once and the output images statisfy what I expected.


Results

Results

Manipulation Input Image Result Image
Grayscale Image
Flipped Image
Noised Image


Discussion


Conclusions

I will keep study OpenCv and use OpenCv to do deeper work in computer vision. Good luck!


Credits and Bibliography

Thank you Shengye Li for giving me some basic suggestion of using OpenCv.