Implementation of K-nearest neighbors, adaptive boosting, and neural networks to detect the orientation of an image