1 | initial version |
Ask @berak pointed out:
mask_normalBayes.at<uchar>(i,j) = labels_normalBayes.at<int>(0,0);
mask_SVM.at<uchar>(i,j) = labels_SVM.at<float>(0,0);
By changing the cast to an IF test we can test the labels of all 3 classifiers:
mask.at<uchar>(r, c) = (uchar)label.at<float>(0, 0); // CV_32F results
Change it to:
if((uchar)label.at<float>(0, 0)) {
mask.at<uchar>(r, c) = 1;
}
Now it works!
2 | No.2 Revision |
Ask @berak pointed out:out and thanks to @StevenPuttemans to put me on the right track:
mask_normalBayes.at<uchar>(i,j) = labels_normalBayes.at<int>(0,0);
mask_SVM.at<uchar>(i,j) = labels_SVM.at<float>(0,0);
By changing the cast to an IF test we can test the labels of all 3 classifiers:
mask.at<uchar>(r, c) = (uchar)label.at<float>(0, 0); // CV_32F results
Change it to:
if((uchar)label.at<float>(0, 0)) {
mask.at<uchar>(r, c) = 1;
}
Now it works!