normyx / MMM-Facial-Recognition-OCV3

MIT License
51 stars 18 forks source link

Do you offer a way to invert the camera? #19

Open cdmack opened 5 years ago

cdmack commented 5 years ago

Ive been trying to find somewhere in the code for inverting the camera because it does not recognize upside down faces.

Ohiekkar commented 5 years ago

There's no such option.

To achieve this you could change lib/mm/facerecognition.py line 69 image = camera.read() to image = cv2.flip(camera.read(), 0)

This could be added as a config option, but the creator of this module doesn't seem very active.

Siiggyy commented 5 years ago

If you use Picam you can add this line camera.rotation = 180 in that file lib/common/picam.py Put it right here: def run(self): with picamera.PiCamera() as camera: camera.rotation = 180 camera.resolution = (620, 540)