From 330c7e0032e9f5abc6755bb3467b3d68b1c4b80f Mon Sep 17 00:00:00 2001 From: Anubhav Omar <64382574+RKO4444@users.noreply.github.com> Date: Sun, 18 Oct 2020 03:24:48 +0530 Subject: [PATCH] Update HandGestureRecognition.py --- HandGestureRecognition.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/HandGestureRecognition.py b/HandGestureRecognition.py index 4cf6c76..c5960ec 100644 --- a/HandGestureRecognition.py +++ b/HandGestureRecognition.py @@ -2,6 +2,9 @@ import numpy as np import cv2 import math +import random +import matplotlib +import pandas as pd # Open Camera capture = cv2.VideoCapture(0) @@ -83,7 +86,7 @@ cv2.line(crop_image, start, end, [0, 255, 0], 2) - # Print number of fingers + if count_defects == 0: cv2.putText(frame, "GAALI NOT ALLOW", (50, 50), cv2.FONT_HERSHEY_SIMPLEX, 2,(0,0,255),2) elif count_defects == 1: @@ -99,7 +102,6 @@ except: pass - # Show required images cv2.imshow("Gesture", frame) all_image = np.hstack((drawing, crop_image)) cv2.imshow('Contours', all_image) @@ -109,4 +111,4 @@ break capture.release() -cv2.destroyAllWindows() \ No newline at end of file +cv2.destroyAllWindows()