DXcam
DXcam copied to clipboard
Video mode with output_color="GRAY" ValueError
This doesn't work
import dxcam
camera = dxcam.create(output_color="GRAY")
camera.start(video_mode=True)
frame = camera.get_latest_frame()
I got this error :
Traceback (most recent call last):
File "C:\Users\jeanp\miniconda3\envs\tm\lib\site-packages\dxcam\dxcam.py", line 179, in __capture
self.__frame_buffer[self.__head] = frame
ValueError: could not broadcast input array from shape (1080,1920) into shape (1080,1920,1)
Exception in thread DXCamera:
Traceback (most recent call last):
File "C:\Users\jeanp\miniconda3\envs\tm\lib\threading.py", line 932, in _bootstrap_inner
Easy to fix, a quick workaround is to expand the array after doing the color conversion.
BTW awesome project thank you !
Thanks for the report! A stupid mistake by me to assume HWC output and merged without actually testing :(
Fixed in the upcoming release