Optical sensors for railway infrastructure monitoring