https://machinelearningmastery.com/logistic-regression-for-image-classification-using-opencv/