Content-based retrieval and real time detection from video sequences acquired by surveillance systems