Security and building intelligence: from people detection to action analysis