title: OpenCV error : Assertion failed ((img.depth() == CV_8U || img.depth() == CV_32F)
body: <p>When i try to run this code in Visual Studio 2010 from <a href="http://www.technolabsz.com/2013/05/eye-blink-detection-using-opencv-in.html" rel="nofollow">here</a>. i am getting the following error</p>
  
  <pre><code>OpenCV Error: Assertion failed ((img.depth() == CV_8U || img.depth() == CV_32F)
  &amp;&amp; img.type() == templ.type()) in cv::matchTemplate, file ..\..\..\..\opencv\mod
  ules\imgproc\src\templmatch.cpp, line 249
  An exception occured
  </code></pre>