title: Calculate the Normalized Histogram of Image in hsv space in matlab
body: <p>I'm writing an algorithm from an article. I did everything that was in the article untill now, but my answer is wrong and I can't understand why.  </p>
  
  <p>According to article there are these steps:  </p>
  
  <ol>
  <li><p>Input  a video data and extract it to frames according to a special rate (I've done this correctly and the result is 500 frames which are images in <code>jpeg</code>. I don't have a problem in this part)  </p></li>
  <li><p>Use the color histogram because the color feature is the most expressive feature. For 
  this color histogram in hsv color space only the hue component should be calculated.  </p></li>
  <li><p>The quantization of the color histogram is set to 16 color bins  </p></li>
  <li><p>The meaningless frames which are monochromatic frames due to fade-in/fade-out 
  effects should be removed. This is done by computing the standard deviation of the frame feature vector.  </p></li>
  </ol>
  
  <p>I've done all of the above as it was mentioned in the article. The standard deviation for monochromatic frames should be equal to zero or a small value but mine is <code>1500</code>, <code>1000</code>, <code>1700</code> and numbers like these. What is wrong with this code?</p>
  
  <pre><code>b=imread('pics\image-1.jpeg');
  hsv = rgb2hsv(b);
  h = hsv(:,:,1);
  hHist = hist(h(:),16);
  %computing standard deviation
  f=std2(hHist)
  </code></pre>