title: error: 'QRCodeDetector' is not a member of 'cv'
body: <p>I am trying to use the opencv <code>QRCodeDetector</code> class in one of my functions, but unfortunately I am getting an error.
  The error is saying that <code>QRCodeDetector</code> is not a member of <code>cv</code>.</p>
  <p>C++ function code (test_qr.cpp):</p>
  <pre><code>#include &lt;opencv2/opencv.hpp&gt;
  #include &lt;opencv2/core/core.hpp&gt;  
  #include &lt;opencv2/objdetect.hpp&gt;
  #include &lt;opencv2/imgcodecs.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;opencv2/imgproc/imgproc.hpp&gt;
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  void qrCheck(std::vector&lt;std::string&gt;&amp; qrStorage, cv::Mat imageLeft_t0) {
      
      cv::QRCodeDetector qrDecoder = cv::QRCodeDetector(); // Error on this line
  
      std::string data = qrDecoder.detectAndDecode(imageLeft_t0);
  
      if (data.length() &gt; 0) {
          std::cout &lt;&lt; &quot;QR Decoded Data: &quot; &lt;&lt; data &lt;&lt; std::endl;
          qrStorage.push_back(data);
      } else
          std::cout &lt;&lt; &quot;QR Code Not Detected&quot; &lt;&lt; std::endl;
  }
  </code></pre>
  <p>In case you want to see my cmake file:</p>
  <pre><code>cmake_minimum_required(VERSION 3.11)
  project( DisplayImage )
  
  set(CMAKE_CXX_STANDARD 11)
  
  find_package(OpenCV REQUIRED)
  include_directories(${OpenCV_INCLUDE_DIRS})
  
  add_executable( DisplayImage test_qr.cpp )
  target_link_libraries( DisplayImage ${OpenCV_LIBS} )
  </code></pre>
  <p>I also tried doing something similar to this: <a href="https://stackoverflow.com/questions/32493710/backgroundsubtractormog-is-not-a-member-of-cv">‘BackgroundSubtractorMOG’ is not a member of ‘cv’</a>
  But it didn't help.</p>