Zone & Walking Direction Detection using USB Camera
Posted: Tuesday 10 May 2016 23:14
TRiXWooD Scripts viewtopic.php?f=23&t=12145&p=87422#p87422
Update motioneye & pikrellcam: viewtopic.php?f=35&t=8390#p90233
Hi!
Does anybody has any experience with zones detection where zones can be rooms or part of rooms? Using domoticz, pi, motion, and usb camera's?
Especially: hints on the program motion (or are there others) because that will be the main thing to tackle, setting up a pi with the cam is no problem and which cams for 25 euro do have good lighting or properties (like auto focus)?
Cuz I have it working using a mac but I want more flexibility and more remote position of the camera's where the usb cables can not reach (but ethernet or wifi can).
On my mac I have a setup with 6 usb cameras with the program securityspy, which lets me split the image of a cam in 4 virtual cams all with motion detection and it fires applescript to enable virtual motion sensors in domoticz. This means if somebody walks from left to right, i can detect which of the motion sensors went first and trigger another sensor which indicates walk direction on that cam. (up down, left right, and diagonal 2x that 8 directions yes
I am experimenting in my living room with creating virtual sensors presence for different zones (couch, desk, entree, dinning area) and walk direction logic such that the lights in some zones get a +20% brightness ik you are entering them... (and leaving them -%20) which I found very handy when late at night when watching a movie you want to go to your desk, or bathroom and things light up when you go there, it's usefull and fun... (the fun part is to do other stuff with zone detection, use your imagination )well its this is a great puzzle to put it al together and it works, well i have not enough camera's so not all zones work. Biggest problem. The program is far too expensive, still stuck within the reach of the mac usb cable length.
I want to keep it affordable, thus this night I am going to get a pi to do all this... actually i want an a+ model pi if i get my hands on some and either use the pi camera module (ir filter?) or break apart an external usb one and place it in a nice little wooden box with round corners with 2 holes (one camera other power), such that i can place them more undetected in my living rooms (except for the tv, no electronics visible, it's a living room not my personal lab, and i notice people getting uncomfortable with all the camera presence even though mostly pointed at feets and cats
I myself feel a little uncomfortable with 6 visual camera pointing at me.. :/ But have no problem when I hide them under my couch, under my desk, or between the books.
Anyway the external housing of the camera and pi that is future, i currently still have one spare old with no case B so that will do.
Btw, thinking os using the system so follow my cat around when i am away... always wondering what that little rascal is up to when I am gone...
This means installing motion, (i checked it has multiple areas, no need to split the image) get the usb cam working, set it up as an ip cam, and somehow interface this with domoticz which handles the zones detection.
So has anyone has any hints on the program motion (or are there others) because that will be the main thing to tackle, setting up a pi with the cam is no problem.
Also going to try to have multiple camera on one pi... one pi and 3 cams under my cough out of sights i can get atleast detect 4 zones... (desk, entree, dinning, kichen entree, that is 4 out of 7 zones i divided my living room in
plus entering and exiting triggers well. I am going for that.
I bought some cheap trust usb cams for this (9 euro a piece), since i did not know this experiment would work, it did! But you do not want the cheapest, they can't see that well in the dark
Thats fine for zones where the light is always on like my attic where when I pull down the stairs the light goes on, and when I close it it goes off. And my attic had two zones at the moment detecting happily with only one strategically placed cam. But will not work in the living room or any other area which is much darker.
Anybody have any hints which cams for 25 euro do have good lighting and other properties (like auto focus), i got one 10 years ago also from trust that does all these thing for around 25 euro so... but i am googling my ass off, getting nowhere. Any hints in this department (brand, type) would be appreciated.
Btw why? Because motion sensor cost alot, one pi zero 9 bucks or pi a+ 25 euro, camera 8-20 euro and stuff like power, wifi, cable I figured I could make the pi into an advance motion sensor with walk direction and have the benifit of a security camera all in one for 25-60 bucks... comparing to z-wave prices and other similar products, not bad and more functionality
with each additional camera adding optional support 
Update motioneye & pikrellcam: viewtopic.php?f=35&t=8390#p90233
Hi!
Does anybody has any experience with zones detection where zones can be rooms or part of rooms? Using domoticz, pi, motion, and usb camera's?
Especially: hints on the program motion (or are there others) because that will be the main thing to tackle, setting up a pi with the cam is no problem and which cams for 25 euro do have good lighting or properties (like auto focus)?
Cuz I have it working using a mac but I want more flexibility and more remote position of the camera's where the usb cables can not reach (but ethernet or wifi can).
On my mac I have a setup with 6 usb cameras with the program securityspy, which lets me split the image of a cam in 4 virtual cams all with motion detection and it fires applescript to enable virtual motion sensors in domoticz. This means if somebody walks from left to right, i can detect which of the motion sensors went first and trigger another sensor which indicates walk direction on that cam. (up down, left right, and diagonal 2x that 8 directions yes
I want to keep it affordable, thus this night I am going to get a pi to do all this... actually i want an a+ model pi if i get my hands on some and either use the pi camera module (ir filter?) or break apart an external usb one and place it in a nice little wooden box with round corners with 2 holes (one camera other power), such that i can place them more undetected in my living rooms (except for the tv, no electronics visible, it's a living room not my personal lab, and i notice people getting uncomfortable with all the camera presence even though mostly pointed at feets and cats
Anyway the external housing of the camera and pi that is future, i currently still have one spare old with no case B so that will do.
Btw, thinking os using the system so follow my cat around when i am away... always wondering what that little rascal is up to when I am gone...
This means installing motion, (i checked it has multiple areas, no need to split the image) get the usb cam working, set it up as an ip cam, and somehow interface this with domoticz which handles the zones detection.
So has anyone has any hints on the program motion (or are there others) because that will be the main thing to tackle, setting up a pi with the cam is no problem.
Also going to try to have multiple camera on one pi... one pi and 3 cams under my cough out of sights i can get atleast detect 4 zones... (desk, entree, dinning, kichen entree, that is 4 out of 7 zones i divided my living room in
I bought some cheap trust usb cams for this (9 euro a piece), since i did not know this experiment would work, it did! But you do not want the cheapest, they can't see that well in the dark
Anybody have any hints which cams for 25 euro do have good lighting and other properties (like auto focus), i got one 10 years ago also from trust that does all these thing for around 25 euro so... but i am googling my ass off, getting nowhere. Any hints in this department (brand, type) would be appreciated.
Btw why? Because motion sensor cost alot, one pi zero 9 bucks or pi a+ 25 euro, camera 8-20 euro and stuff like power, wifi, cable I figured I could make the pi into an advance motion sensor with walk direction and have the benifit of a security camera all in one for 25-60 bucks... comparing to z-wave prices and other similar products, not bad and more functionality