title: 1D histogram opencv with double values
body: <p>I'm trying to create an histogram using opencv. I have an image (32 bit) that came out from a blurring operation, so I just know that the values are in the range [-0.5; 0.5] but I don't know anything else about the starting data.</p>
  
  <p>the problem is that I don't understand how to set the parameters to compute such histogram.
  the code I wrote is:</p>
  
  <pre><code>int numbins=1000;
  float range[]={-0.5, 0.5};
  float *ranges[]={range};
  CvHistogram *hist=cvCreateHist(1, &amp;numbins, CV_HIST_ARRAY, ranges, 1);
  cvCalcHist(&amp;img, hist);
  </code></pre>
  
  <p>were img is the image I want to get the histogram. if I try to print the histogram I just get a black picture, while with the same function I get a correct histogram if use a grayscale 8bit image.</p>