boltgolt / howdy

🛡️ Windows Hello™ style facial authentication for Linux
MIT License
5.73k stars 299 forks source link

IR emitter don't blink with cv2.VideoCapture #19

Closed janecz-n closed 6 years ago

janecz-n commented 6 years ago

I juste receive my new computer with an IR Camera so I would like to try your software ! :) So I have properly done the installation, selection the device with blinking IR emitter. But when I sudo or use howdy test my emitter blink only once.

I have try to manually:

import cv2
vd = cv2.VideoCapture(int("0"))
vd.read()

And like in howdy test, emitters blink once and then stay in a 'low red state' and don't blink anymore even if I vd.read() again.

Any idea to where I should look ?

boltgolt commented 6 years ago

Ubuntu should come with a program called "Cheese Webcam Booth". Could you launch that and change the "Device" dropdown in the preferences to your IR camera and see if the emitters do light up?

janecz-n commented 6 years ago

The emitters light up at low intensity and don't blink. For now the only command who make them blink is fswebcam -S 9999999999 -d /dev/video0 So basically, I can see my face on IR camera but only if I'm at 3 cm of it :p

boltgolt commented 6 years ago

That sounds like a driver issue. Howdy depends on linux webcam drivers supporting the IR cameras and in a lot of cases the driver just doesn't work. It is weird though that fswebcam can make them blink while skipping frames, but i'm not sure how to bring that to howdy if cheese can't even do that.

Teifun2 commented 5 years ago

I would like to mention that i have the same Problem with the Thinkpad T480. What i find strange is that during the test in the installation (Ubuntu through apt) the IR Emitters work as they should. Flickering on high power. How can that be?

boltgolt commented 5 years ago

Somehow the emitters seem to work correctly on certain frame sizes, see #51

Teifun2 commented 5 years ago

Oh cool. Yes this worked for me as well with 320x320 (and other small resolutions). It seems tough as if the Frame Grabber and the IR Emitters are out of sync because it can happen (in the test) that sometimes there is no "scan frame" for more than one second. I assume this is a Problem with the driver. But it works thanks allot.