Ask Your Question

Revision history [back]

As I understand joint histograms from this paper: Comparing Images Using Joint Histograms, G. Pass and R. Zabih, in Multimedia Systems, 1999 [pdf], it's an histograms of two different features (color and gradient, color and edge, etc.) more or less like in joint probabilities.

The accumulate flag is for computing a unique histograms from many images, or to update it during time (compute histograms for patches of images and sliding to all patches => get the incremental histogram which is equivalent to the histogram of the full image). The concatenation is trivial: H1 of size n, H2 of size m gives H3 of size n+m, specially if the feature are different, if features are the same and n==m, therefore, H3(i) = H1(i)+H2(i), eventually normalize after.

The joint is more complex and probably imply the manual construction of histograms. With the example, H3 is size n*m, therefore, you have to compute your histograms manually for both primitives in parallel. If you want to do that with OpenCV, you probably need a trick...

Let us know if you find a good solution and/or if it could be interesting to integrate it in OpenCV.