Robust vehicle detection under various environmental conditions using an infrared thermal camera and its application to road traffic flow monitoring