Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

calcHist() usage for RGB histogram...?

The code:


    int imgCount = 1;
    int dims = 3;
    const int sizes[] = {256,256,256};
    const int channels[] = {0,1,2};
    float* rRange = {0,256};
    float* gRange = {0,256};
    float* bRange = {0,256};
    const float ranges[] = {rRange,gRange,bRange};
    Mat mask = Mat();

    calcHist(&src, imgCount, channels, mask, hist, dims, sizes, ranges);

Produces "error: No matching function..." among other errors..

What are my mistakes?

click to hide/show revision 2
fix the broken code

calcHist() usage for RGB histogram...?

The code:


    int imgCount = 1;
    int dims = 3;
    const int sizes[] = {256,256,256};
    const int channels[] = {0,1,2};
    float* rRange = {0,256};
    float* gRange = {0,256};
    float* bRange = {0,256};
    const float ranges[] = {rRange,gRange,bRange};
    Mat mask = Mat();

    calcHist(&src, calcHist(src, imgCount, channels, mask, hist, dims, sizes, ranges);

Produces "error: No matching function..." among other errors..

What are my mistakes?