pywinrt / python-winsdk

Python package with bindings for Windows SDK
https://python-winsdk.readthedocs.io
MIT License
74 stars 8 forks source link

I get the ir frame using MediaFrameReader, but the ir lamp blinks. #44

Open Joosaeha opened 7 months ago

Joosaeha commented 7 months ago

I ran it by referring to the article at https://stackoverflow.com/a/77423846/22878393, but the IR lamp blinks irregularly. Is there a way to make the IR lamp always on?

if cv2.countNonZero(cv2.cvtColor(image_array, cv2.COLOR_RGBA2GRAY)) == 0:
                        continue

Among the codes in the link above, the code uses continue when the ir lamp is off, but if there is another infrared ray such as an external environment or LED, the value of countNonZero increases and the screen flickers.

  1. I want the ir led to always be on while getting an ir frame. Is there a way?

https://learn.microsoft.com/en-us/uwp/api/windows.media.devices.infraredtorchcontrol?view=winrt-22621

  1. Is there a way to do this if the InfraredTorchControl in the link is not supported?