forked from Arshad221b/Sign-Language-Recognition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathISL.py
More file actions
26 lines (16 loc) · 595 Bytes
/
Copy pathISL.py
File metadata and controls
26 lines (16 loc) · 595 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import cv2
import numpy as np
cap = cv2.imread('a.png',0)
retval, threshold = cv2.threshold(cap, 100, 255, cv2.THRESH_BINARY)
cv2.imshow('threshold',threshold)
edges = cv2.Canny(threshold,100,200)
cv2.imshow('Edges',edges)
converted = cv2.cvtColor(cap, cv2.COLOR_BGR2HSV)
skinMask = cv2.inRange(converted, lower, upper)
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (11, 11))
img_dilation = cv2.dilate(cap, kernel, iterations=1)
cv2.imshow('Input', img)
cv2.imshow('Erosion', img_erosion)
cv2.imshow('Dilation', img_dilation)
cv2.waitKey(0)
cv2.destroyAllWindows()