Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can create a matrix from you "table of values" and then call cv::calcHist on this matrix, because OpenCV can build histograms for CV_8U and CV_32F types. Here is how you can create a matrix from an array of floats:

float* Idata=new float[480*640*3];
Mat I(480, 640, CV_32FC3, Idata);

More examples in the OpenCV Cheatsheet. And you can always build a Mat on top of std::vector.