Image classification with manifold learning for out-of-sample data