Added client with interface to have the possibility to react to emotions
This commit is contained in:
17
hackathon/own_robot.py
Normal file
17
hackathon/own_robot.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from robot import Robot
|
||||
import cv2 as cv
|
||||
|
||||
from cli import print_emotions
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class OwnRobot(Robot):
|
||||
count = 0
|
||||
|
||||
def update(self, image, emotions):
|
||||
self.count += 1
|
||||
if self.count > 10:
|
||||
self.count = 1
|
||||
print_emotions(emotions)
|
||||
cv.imwrite(os.sep.join(["img", f"ownRobot{self.count}.png"]), image)
|
||||
Reference in New Issue
Block a user