cgo/hsimage

Created BMPs are always black

Opened this issue · 2 comments

I'm running the example code from the Readme on Gentoo 2.2, kernel version 3.13.7. I've got an HP Webcam-50, which works fine in other programs like guvcview and Skype. The generated BMPs from hsimage are all 160x120 and entirely black.

Alright, I figured out the problem. According to the Python V4L2 layer some people need to "[wait] between starting the video device and capturing the picture, to get a good picture from cameras that require a delay to get enough brightness."

Introducing a short threadDelay into the grab function would solve the problem, but better yet would be adding a grabDelay function, or a setDelay command for the monad.

cgo commented

Hey milo-trujillo,
sorry for the delay; I haven't been visiting github for a while.
It's true, some cameras need longer than others to adjust brightness. Would you like to add the delay function you suggested to the monad?

Cheers,
Christian