Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.
Diogo Cruz edited this page Feb 16, 2019 · 2 revisions

This application was built using OpenCV with Python. The application is executed with the command python hand_detection.py.

There are three arguments that can be passed:

  • --left to show the ROI on the left (by default is on the right side);
  • --shot to take an image from the webcam instead of its video;
  • --input=<path> to analyze a picture instead of the webcam feed.

When the app starts, a window with a “welcome” message is shown.

Welcome screen

The user can then press “v” to start the color calculator. Here, a blue square is shown inside a green square. The user has to place his hand inside the blue square, in order to calculate the skin color, and press “v” again.

Start screen ROI color set

If the Region of Interest, ROI, doesn’t satisfy the user he can press “n” to redo the capture. If any other key is pressed, the app starts the hand video detection where the hand is detected.

In the image, the detected hand can be seen and the signal it is doing is written on the image. The capture in the range of skin color is shown on the top-right side, and on the bottom-right side is shown the image that is being analysed after applying the optimizations mentioned in Hand Video Detection.

Hand detected and signal it is doing written to the image

The user can change the sensibility of each value of HSV color range to detect, in a range from 0% to 100%, using 3 track bars on the top of the screen.

Trackbars to change values to detect
Clone this wiki locally