Monday, March 4, 2013

Distracted! AGAIN!

Am still chasing the instability I mentioned in an earlier post and frankly it is not as much fun as trying new things.   This time it is setting up a Raspberry Pi as a webcam located in our bedroom and looking out at the Thames.   We just bought our place at the end of last year and much of our view of the river is sheltered during the summer by a big willow.   Last week the willow got a haircut and we now have an onobstructed view of the river from the 1st floor.   Hence the need for a webcam to bring this view down to my study!

I have struggled a little with getting one of the webcam solutions to work on my RPi.   I did finally get motion to work following the instructions here.  Unfortunately I can only seem to get a low resolution (320x240) to work.   Will update this post as I make progress.

Solved my resolution issue with the help of the RPi Forum and user Gomoto in particular.   As an aside I have to say how impressive the RPi Forum is in terms of the rapidity and quality of responses to a post.   In any case, here is a link to the solution.  Note this only applies to Python captures and does not seem to work for command line applications.

With resolution now working I was able to get my motion sensitive BirdCam to take these photos:


The motion detection in these photos is provided by a simple function that calculates the mean differences between two images (absdiff from opencv).   Given the simplicity of my requirement it works pretty well.   I do have to adjust for the threshold at which point I declare the motion to be interesting but it weeds out most of the chaff from wind movement and changing light.

I am still distracted by this line of interest.   In my next post I will describe the integration of the above technology with an SLR in the pursuit of improved image quality.

No comments:

Post a Comment