Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

[Dúvida] Erro ao executar a função anotar_rosto

Olá! Estou tendo problemas ao executar a função anotar_rosto

def anota_rosto(imagem):

  retangulos = detector_face(imagem, 1)

  if len(retangulos) == 0:
    return None
  for k, d in enumerate(retangulos):
    print(f'Rostos identificados: {str(k+1)}')
    cv2.rectangle(imagem, (d.left(), d.top()), (d.right(), d.bottom()), (255, 255, 0), 2)
  return imagem

O erro que ocorre é RuntimeError: Unsupported image type, must be 8bit gray or RGB image. Como eu poderia resolver isso??

1 resposta
solução!

Depois de continuar insistindo, desinstalei e reinstalei o dlib e funcionou.