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?

  • You could try uvcdynctrl. Not sure if it can reset the camera, but it can save and load controls to/from a file. – M Noit Nov 20 '13 at 11:46
  • man luvcview to see options. – Wilf Nov 22 '13 at 16:09
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.