I am using the calcHist function to calculate color histograms of images. I am working on a simple image matching application and I am trying to use color histograms as image descriptor to find similar images.
This is the definition:
void calcHist(const Mat* images, int nimages, const int* channels, InputArray mask, OutputArray hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false )
My question is regarding the dims parameter. This is from the OpenCV documentation:
dims – Histogram dimensionality that must be positive and not greater than CV_MAX_DIMS (equal to 32 in the current OpenCV version).
This might be a dummy question, but what is the difference between the results if I set dims as 1 or 3? If I set dims=1 am I only getting histogram for a single channel in the image or is this a histogram that represents all channels in 1D vector?