A Distributed Solution For Visual Sensor Networks To Detect Targets In Crowds