Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Do face recognition on a nao’s camera stream

...

WARNING: this pseudeocode, use only as a reference of how to set up a structure to the image above

Expand
titleSetters
Code Block
languagepy
image = None
def set_image_variable(img):
  image = img

bbox = None
def set_bbox_variable(box):
  bbox = box

# code continues in code box below

Code Block
languagepy
nao = Nao(device_id="nao1")
face_recognition = self.connect(FaceRecognitionService, device_id='local')

nao.top_camera.register_callback(set_image_variable)

face_recognition.register_input(nao.top_camera)
face_recognition.register_callback(set_bbox_variable)

while True:
  image.draw(bbox)
  display(image)