Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

once you've got those values inside a cv::Mat, you can call calcHist on that.

// read it in:
#include <fstream>

std::vector<float> vec;
ifstream  is("my.txt");
while ( ! is.eof() ) {
    float f;
    is >> f;
    vec.push_back(f);
}

// now make a Mat of that, easy ;)
cv::Mat m(vec);