title: Comparing LAB Color histogram of superpixels OpenCV Python
body: <p>I am trying to compare the LAB color histogram of superpixels of couple of images with different metrics such as correlation, intersection and chi-squared. The problem is when I get the comparison result for each set of superpixels, they are all 0 or 1.</p>
  
  <p>I guess the problem is with the range of values that I am using for each channel of LAB color space. This is the code (in OpenCV Python) that I use to get the color histogram for each superpixel:</p>
  
  <pre><code>segment = cv2.cvtColor(cv2.bitwise_and(frame, frame, mask = mask), cv2.COLOR_BGR2LAB)
  
  hist = cv2.calcHist([segment], [0, 1, 2], None, [8, 8, 8],[0, 100, -110, 110, -110, 110])
  cv2.normalize(hist, hist)
  hist = hist.flatten() 
  </code></pre>
  
  <p>Then, I save these histograms and compare them together. When I do it for RGB, I get normal results, but this is not the case for LAB. I would appreciate if someone could give me a hint on what I might be doing wrong here.</p>