font size fix & added analyze
This commit is contained in:
parent
635ed95fde
commit
dd1067ad11
4
main.py
4
main.py
@ -40,6 +40,8 @@ if cam.isOpened():
|
||||
font = ImageFont.truetype("HalloweenFont.ttf", font_size)
|
||||
if TIMER>0:
|
||||
draw.text((180, 400), str(TIMER), font=font,fill=(255,0,0,255))
|
||||
else:
|
||||
draw.text((30, 400), "ANALYZING...", font=font,fill=(255,0,0,255))
|
||||
img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)
|
||||
img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
|
||||
cv2.imshow('webcam',img)
|
||||
@ -68,7 +70,7 @@ if cam.isOpened():
|
||||
draw.text((59, 452), str(text), font=font,fill=(255,0,0,255))
|
||||
img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)
|
||||
cv2.rectangle(img,(30,550),(450,600),(255,255,255), 5)
|
||||
cv2.rectangle(img,(30,550),(30+math.floor(int(fearPoint)*420/100),450),(255,255,255), -1)
|
||||
cv2.rectangle(img,(30,550),(30+math.floor(int(fearPoint)*420/100),600),(255,255,255), -1)
|
||||
img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
|
||||
cv2.imshow('webcam',img)
|
||||
cv2.waitKey(3000)
|
||||
|
Loading…
Reference in New Issue
Block a user