Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions HandGestureRecognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand All @@ -109,4 +111,4 @@
break

capture.release()
cv2.destroyAllWindows()
cv2.destroyAllWindows()