Human Computer Interaction project utilizing OpenCV and C++
Identifies a color target in webcam frame and uses that input to either paint or move a mouse.
- Opencv >= 3.0
- X11
Create a build directory, run cmake .., and then run make.
mkdir build
cd build
cmake ..
make
Run the Painting file in the build directory and use a red color target to virtually "paint".
cd build
./Painting
To change the the color target, add lower and upper bound HSV values when running the file
./Painting lower_H lower_S lower_V upper_H upper_S upper_V
Press the 's' key to save the image, and enter a file name including extension in the command line. The images will be saved in the folder saved_outputs. Press the 'esc' key to exit the painting canvas.
Run the Determine Color file to determine the lower and upper bound HSV values of a color target with a GUI. Adjust the sliders until only your color target is displayed, and press the 's' key to output the bounds to the terminal.
python3 determineColor.py
Run the Mouse file in the build directory and use a red color target to move the mouse around.
cd build
./Mouse
To change the color target, add lower and upper bound HSV values when running the file
./Mouse lower_H lower_S lower_V upper_H upper_S upper_V
Press the 'esc' key to exit the program.
Written by Sam Coleman and Kate Mackowiak for Software Systems at Olin College of Engineering