title: OpenCV SURF function is not implemented
body: <p>When I try to run the sample <code>find_obj.cpp</code> or any OpenCV SURF program I get the following error in command prompt while executing the code. The project builds without errors and warnings. I am using VS2011 beta, OpenCV 2.4 and windows7.</p>
  
  <p>Error message:</p>
  
  <pre><code>OpenCV Error: The function/feature is not implemented &lt; OpenCV was built without SURF support&gt; in unknown function,file ..\..\..\src\opencv\modules\legacy\src\features2d.cpp, line 77
  </code></pre>
  
  <p>I tried to build the OpenCV 2.4 again using Cmake and then VS2011 in debug mode and then added the lib paths in the IDE, but still no result.</p>
  
  <p>How can I fix that?</p>
  
  <pre><code>    #include &lt;opencv2/objdetect/objdetect.hpp&gt;
      #include &lt;opencv2/features2d/features2d.hpp&gt;
      #include &lt;opencv2/core/core.hpp&gt;
      #include &lt;opencv2/highgui/highgui.hpp&gt;
      #include &lt;opencv2/legacy/legacy.hpp&gt;
      #include &lt;opencv2/legacy/compat.hpp&gt;
      #include &lt;opencv2/flann/flann.hpp&gt;
      #include &lt;opencv2/calib3d/calib3d.hpp&gt;
      #include &lt;opencv2/nonfree/features2d.hpp&gt;
      #include &lt;opencv2/nonfree/nonfree.hpp&gt;
  
  using namespace std;
  using namespace cv;
  int main()
  {
      cv::initModule_nonfree();//THIS LINE IS IMPORTANT   
  
     IplImage *image1 = cvLoadImage("C:\\SURF\\1.jpg"); 
      IplImage *image2 = cvLoadImage("C:\\SURF\\2.jpg");
  
      CvMemStorage* memoryBlock = cvCreateMemStorage();
      CvSeq* image1KeyPoints;
      CvSeq* image1Descriptors;
      CvSeq* image2KeyPoints;
      CvSeq* image2Descriptors;
  
      // Only values with a hessian greater than 500 are considered for keypoints
     CvSURFParams params = cvSURFParams(500, 1);
     cvExtractSURF(image1, 0, &amp;image1KeyPoints, &amp;image1Descriptors, memoryBlock, params);
     cvExtractSURF(image2, 0, &amp;image2KeyPoints, &amp;image2Descriptors, memoryBlock, params);
  
     return 0;
  }
  </code></pre>