title: OpenCV Error: Unsupported format or combination of formats (type=16)
body: <p>I have an Android application which uses BOW + SVM method for object detection. I'm using DynamicSURF  for feature detection, OpponentSURF for descriptor extraction and FlannBased matcher. I'm getting the frame in RGBA format so I'm I'm converting in it to BGR. </p>
  
  <p>The problem comes when I try to compute features. The following error is given: </p>
  
  <pre><code>03-08 23:31:07.965: E/cv::error()(1578): OpenCV Error: Unsupported format or combination of formats (type=16
  03-08 23:31:07.965: E/cv::error()(1578): ) in void cv::flann::buildIndex_(void*&amp;, const cv::Mat&amp;, const cv::flann::IndexParams&amp;, const Distance&amp;) [with Distance = cvflann::L2&lt;float&gt;, IndexType = cvflann::Index&lt;cvflann::L2&lt;float&gt; &gt;], file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/flann/src/miniflann.cpp, line 315
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>    Mat matBGR;
      cvtColor(matRGBA, matBGR, CV_RGBA2BGR);
  
      const Ptr&lt;FeatureDetector&gt; detector =   FeatureDetector::create("DynamicSURF");
      const Ptr&lt;DescriptorExtractor&gt; descriptors = DescriptorExtractor::create("OpponentSURF");
      const Ptr&lt;DescriptorMatcher&gt; matcher = DescriptorMatcher::create("FlannBased");
      BOWImgDescriptorExtractor bowDE(descriptors, matcher);
  
      FileStorage fileStorage(dictionaryPathString + dictionaryNameString, FileStorage::READ);
  
      Mat dictionary;
  
      fileStorage["dictionary"] &gt;&gt; dictionary;
      fileStorage.release();
      bowDE.setVocabulary(dictionary);
  
      Mat features;
      vector&lt;KeyPoint&gt; keypoints;
  
      detector-&gt;detect(matBGR, keypoints);
      KeyPointsFilter::retainBest(keypoints, 1700);
      bowDE.compute(matBGR, keypoints, features);
  </code></pre>
  
  <p>Do you have any idea what causes this problem? I searched for solutions but I didn't find a solution.</p>