0

I'm making a timelapse video with a Raspberry Pi and a Microsoft Lifecam HD-5000 webcam. Everything is working great except that I have to reset the camera every morning or I end up with totally white images. I think the light sensor gets stuck open overnight.

My image grabbing script runs every two minutes and uses fswebcam to take the pic. I'm using luvcview to reset the camera in the morning, which isn't very elegant because it's not a command-line tool. It works, but I was wondering if there is a cleaner way. I've also tried using sudo rmmod uvcvideo and then sudo modprobe uvcvideo but that didn't work.

Any ideas?

Dave Swersky
  • 111
  • 5

2 Answers2

1

OK, so here's what I figured out:

When I open Luvcview in first thing in the morning, the image is very overexposed for a few seconds, then corrects itself. Apparently opening the stream kicks off the camera's native autofocus and autoexposure features. After some digging, I discovered that fswebcam can grab an image averaged across a number of frames.

So, I waited until mid-morning when it was bright outside, and manually took the first image of the day with one frame. Very overexposed. Tried again with 5 frames, and it looks great. Back to one frame, still looks great.

SUMMARY: The video stream from the camera has to run for longer than a single frame for it to reset itself. I will run the first grab of every hour with a 5-frame exposure to keep the images looking good as the light changes throughout the day.

Dave Swersky
  • 111
  • 5
0

I had this issue and I used two options from fswebcam, one that takes pictures after a delay and one that skips a certain number of frames. This is the stem of the command (then I add some date dependent file name)

fswebcam -d /dev/video0 -r 2560x1440 -S 10 -F 10 -D 1 

Check the manual for -S and -D and play a bit with them. See what works for you.

Hope it helps!

visoft
  • 101
  • 3