Error when reading from camera at random
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 412
- PR merge metrics
- No merged PRs in 30d
Description
It seems that howdy randomly fails to read from my IR sensor
here is the error
```
[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.cpp (998) tryIoctl VIDEOIO(V4L2:/dev/v4l/by-path/pci-0000:04:00.4-usb-0:1:1.0-video-index0): select() timeout.
Unknown camera, please check your 'device_path' config value.
Traceback (most recent call last):
File "/lib/security/howdy/compare.py", line 193, in
gsframe = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.2.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
Unknown error: 1
```
It does work perfectly the rest of the time.
----
I've searched for similar issues already, and my issue has not been reported yet.
Linux distribution (if applicable): Ubuntu 20.04
Howdy version: 2.5.1
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with /lib/security/howdy/compare.py around line 193 and inspect how the configured device_path is opened and how failed camera reads are handled. Reproduce the intermittent timeout on Ubuntu 20.04 with the reported IR sensor, then verify that a missing frame no longer causes the shown OpenCV error and that normal facial authentication remains functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, opencv, python
- Domain
- authentication, operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100