Machine vision automates roof-inspection system of trains