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.
I want the ir led to always be on while getting an ir frame. Is there a way?
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?
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.
https://learn.microsoft.com/en-us/uwp/api/windows.media.devices.infraredtorchcontrol?view=winrt-22621