Hi all,
video surveillance using RPI(wheezy)/motion/USB-cam is exactly what I'm currently working on as well!
But my approach and the direction I come from may be a bit different...
A while ago I've tried a WiFi attached cam (1280x720) with motorised pan/tilt - was about 140EUR.
It lasted a mere week and I brought it back - was lame (picture quality was below standards, the need to use ActiveX for activation/configuration and use was out of question, the reaction time of my wife's flowers in the sun was faster - all in all complete BS).
Then I stumbled over RPI - and had known a bit about motion before - and thought: hey - a RPI, a web cam and a bit of slim Linux is always faster and less expensive than the BS I tried before! ...
My need for surveillance lies in watching over our property, rather my wife's roadster and my bike standing in the driveway.
We've had issues of people trying to steal the bike navigation system (failed - left it behind because of a SW pin lock - LOL) and somebody letting the air out of the tires on one of the cars...
That means I'm looking for motion detection ("motion" does that very well!), clear crisp pictures - preferably wide-angled (no mushy video streams), infrared (IR) sensitivity and the possibility to configure and harden the setup to my personal gusto.
My current setup is a
RPI running on a current stable wheezy with "motion", a Logitech C270 (IR modded)* @1280x720 and a USB WiFi plug for WPA2 communication within our home network.
I've played with the motion stream opt @2fps, but deactivated it again - jumpy frames and high network/CPU loads opted that out for me (not sure about the bottleneck - I believe network related).
I configured motion to provide a "lastsnap" every second (overwrite mode) and to capture images @2fps only if movement is detected.
I can definitly confirm that "motion" hogs 100% CPU!
It seems to make no difference how heavy I load the config with activated opts - but I have no clear proof from testing yet...
IR modded)*
The
C270 (Logitech) is a cheap cam (19EUR) - but as well easy to open and manipulate: I've opened it and removed the IR filter to enable the near IR sensitivity.
It works - more or less. Given you have flooded the area with IR light (850-940nm) it will produce an adequatly clear image - enough to make out a face within 3-5 yards.
The light sensitivity in general is poor - images are fuzzy, dark and there is a lot of noise (I presume heat from hot pixels).
The problem is the focus - the very short lense system (fix focus) is made and set for visible (day) light and not for the added wavelength of near IR.
That means either daylight images are halfway sharp with a slight fringe (due to the removed IR filter) or IR night images are sharp - thus rendering the daylight images a bit mushy. That is using the stock lense as is.
Another
problem with this cam is the USB device access on SW restart - when I restart the motion service the image access fails.
When I replug the USB the image access fails.
Only a reboot cures the problem (strange enough the cam can remain plugged under power in the USB hub).
Any ideas on this one?
The box says it supports 1280x720 (HD 720p), yet under Linux 1280×960 are possible. I have not explored that further due to slight stability issues right from the start (cam quit on me during 1280×960 stream - 1280×720 was stable though).
The other problem is the missing "wideangledness" needed for typical surveillance. (it's a web cam for video chat - duh)
I might invest some time to mod another (they were so cheap I bought two more - LOL) - I want to try to put a proper wide angle glass lense to it and see if focus and view angle change positivly...
Currently my goal is to stick with the RPI, but maybe change the USB cam to one with a better quality.
I want to mount the camera (and maybe even the RPI itself) in a DIY aluminum case (with acrylic window and weather proofing) outside on the house wall (elevated and out of normal reach). I want to include high powered wide angle IR LEDs for night vision.
I will be using the mask option (already gaining positive experience in tests - easy to configure!) to NOT capture unwanted street movement - thus generating unneeded image data.
If I can't solve the wide angle issue I'll resort to one of two approaches:
Either use two "good" cams on one RPI (not load tested yet - any experience out there?) or mount the cam reverse, looking into a wide angled mirror and then reversing the image in "motion".
Hope this helpes somebody.
I'll be glad to share further details if requested!
And I'm happy about any feedback concerning a cam with a good lense that will allow removal of the IR filter for near IR night vision?!?
Anybody got a good IR LED light source running yet?
May the PI be with you
dman