Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Convert Mat to std::set

$
0
0
I have a `cv::Mat` that contains labels (the name of each class used in the training of a classifier). Now I want to check for confusion matrix from the labels and the predictions. I am doing this for each class, so I have done it in a function that I want to call for each label, so, it would be nice to create a `std::set` of labels. The labels are of type `float`, so the `cv::Mat` is `CV_32F`, but `cv::Mat::data`, `cv::Mat::datastart` and `cv::Mat::dataend` are `*uchar`, so the `std::set` is not having the correct labels. std::set< float > lbls(lblMat.datastart, lblMat.dataend); // should be 100, 101, 102, ... // but is 0, 63, 72, ... Any other ideas, please?

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>