A video surveillance architecture for alarm generation and video sequences retrieval