I have a folder of positives and another of negatives images in JPG format, and I want to train an SVM based on that images, I\'ve done the following but I receive an error:
Just as the error says, You need to change type of Your matrix, from integer type, probably CV_8U, to floating point one, CV_32F or CV_64F. To do it You can use cv::Mat::convertTo(). Here is a bit about depths and types of matrices.