title: indentifier backgroundSubtractorMOG syntax error
body: <p>Hello i am learning OpenCV motion detection program and currently i have this error saying 'syntax error:identifier BackgroundSubtractorMOG'
  Here is the code </p>
  
  <pre><code>int main()
    {
  string file_name, video_out;
  Mat res, frameMOG, background, framegray, backgroundgray, prevframe;
  int w = 0, h = 0, x = 0, y = 0, i = 0, j = 0, fps, fourcc = 0;
  
  int enteredregion = 0;
  int index = 0;
  int currArea, prevArea = 0;
  int cardetected, prevframecar;
  
  //Reading Filename from user
  cout &lt;&lt; "Please enter file name without spaces: ";
  cin &gt;&gt; file_name;
  video_out = "output.mkv";
  
  //Creating VideoCapture object for opening file
  VideoCapture cap(file_name);
  if (!cap.isOpened())
  {
      cout &lt;&lt; "Could not open file";
      return -1;
  }
  //Mog object creation for background subtraction
  Ptr&lt;BackgroundSubtractor&gt; ptrMOG;
  ptrMOG = new BackgroundSubtractorMOG(); //      &lt;-error points here
  cap.read(background);
  </code></pre>
  
  <p>I also encountered another error   <em>(): is not a member of cv:BackgroundSubtractor</em></p>
  
  <pre><code> frame.copyTo(current);
      GaussianBlur(current, current, Size(9, 9), 0, 0, BORDER_DEFAULT);
      cvtColor(current, framegray, CV_BGR2GRAY);
      medianBlur(framegray, framegray, 9);
  
      ptrMOG-&gt;operator()(framegray, frameMOG);  // &lt;--error points here
      //absdiff(backgroundgray,framegray,frameMOG);
  </code></pre>
  
  <p>Currently i dont know how to get around this errors. I am currently using Visual Studio 2013 and OpenCv 3.0. Here is my library:</p>
  
  <pre><code>   #include "opencv2/objdetect/objdetect.hpp"
     #include "opencv2/highgui/highgui.hpp"
     #include "opencv2/imgproc/imgproc.hpp"
     #include &lt;iostream&gt;
     #include &lt;opencv2/opencv.hpp&gt;
     #include &lt;opencv2/core/core.hpp&gt;
     #include &lt;opencv2/video/background_segm.hpp&gt;
  </code></pre>