Ask Your Question

Revision history [back]

Joint histograms

I am currently implementing a c++ version of the paper:

Guo, Z., Zhang, L., & Zhang, D. (2010). A completed modeling of local binary pattern operator for texture classification. Image Processing, IEEE Transactions on, 19(6), 1657-1663. PDF

In the final step of the algorithm (page 4), the information of two histograms must be joined. They comment that there are two ways to combine two histograms: in concatenation or jointly:

  • Concatenation: concatenate the two histograms together.
  • Jointly: calculate a joint 2D histogram of the histograms

I don't know if it is possible to do a joint 2D histogram with Opencv. CalcHist function copes with the calculation of the histogram of image(s). It has a parameter accumulate. If it is set, the histogram is not cleared in the beginning. This feature allows user to compute a single histogram from several images. So it would be another way of combining two histograms?

So:

  1. Is it possible to do a joint 2D histogram with Opencv?
  2. If the parameter accumulate on function CalcHist is set to 1, is it equivalent to do a 2D histogram?. If not, would it be a third way of combining two histograms?

I would be thankful, if somebody could help Thanks in advance