Machine Learning Approach for Railway Machine Vision Systems