Detection of rail switch passages through image processing on railway line and use of condition-monitoring approach