1 | initial version |
I've received a number of adequate answers on StackOverflow (see here). Turns out I had two problems, not just one. Not only was I using a wrong function (I should have used cv::cvtColor(image, imageGrayClassify, CV_BGR2GRAY) instead), but I also used a reference to an image that wasn't in the indicated path (I should have backed out into the parent directory and then go into the "src" directory where I keep all images). I've decided to stick with .ptr instead of .at<uchar> .
2 | filled in a missing function |
I've received a number of adequate answers on StackOverflow (see here). Turns out I had two problems, not just one. Not only was I using a wrong function (I should have used cv::cvtColor(image, imageGrayClassify, CV_BGR2GRAY) instead), instead of image.convertTo(imageGrayClassify, COLOR_BGR2GRAY) ), but I also used a reference to an image that wasn't in the indicated path (I should have backed out into the parent directory and then go into the "src" directory where I keep all images). I've decided to stick with .ptr instead of .at<uchar> .