title: identifier calcHist() is undefined in OpenCV in c++
body: <p>I am trying to calculate histogram of an Image using OpenCV in C++, but I get this error:</p>
  
  <pre><code>error: identifier calcHist() is undefined 
  </code></pre>
  
  <p>in OpenCV in C++ in Visual Studio 2013</p>
  
  <p>This is my code</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;opencv2\core\core.hpp&gt;
  #include&lt;opencv2\highgui\highgui.hpp&gt;
  
  using namespace std;
  using namespace cv;
  
  int main(){
      Mat original=imread("my.jpg",CV_LOAD_IMAGE_UNCHANGED);
      namedWindow("Original Image",CV_WINDOW_NORMAL);
      imshow("Original Image",original);
      waitKey(5000);  
      calcHist();
  }
  </code></pre>
  
  <p>But Visual Studio Identifies <code>cvCalcHist()</code> function, unfortunately all the reference materials I have used <code>calcHist()</code> function and I am comfortable with it.</p>