Initial Commit
This commit is contained in:
15
GestureRecognition/HandRecognition.py
Normal file
15
GestureRecognition/HandRecognition.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from PIL import Image
|
||||
from PIL import ImageDraw
|
||||
|
||||
img = Image.open('/Users/piv/Desktop/IMG_0818.png')
|
||||
|
||||
# Create a new image of the cutout.
|
||||
blkimg = Image.new('1', (img.width, img.height)
|
||||
blkdraw = ImageDraw.Draw(blkimg)
|
||||
|
||||
for i in range(1, img.width):
|
||||
for j in range(1, img.height):
|
||||
# getpixel returns tuple (r,g,b,a)
|
||||
pixel = img.getpixel((i, j))
|
||||
if (pixel[0]/pixel[1]) > 1.05 and (pixel[0]/pixel[1]) < 4:
|
||||
|
||||
BIN
GestureRecognition/IMG_0818.png
Normal file
BIN
GestureRecognition/IMG_0818.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 MiB |
Reference in New Issue
Block a user