Background subtraction with adaptive spatio-temporal neighborhood analysis