title: OpenCV getRectSubPix with Alpha Channel
body: <p>I need to use the getRectSubPix function in my code as part of a process of cropping an rotating a section of my image. This works fine normally with 3 channel images, but as soon as I try to use it with a BGRA or a RGBA mat image it crashes saying to me</p>
  
  <blockquote>
    <p>OpenCV Error: Unsupported format or combination of formats () in cvGetRectSubPix, file /home/biotracking/Downloads/OpenCV-2.4.2/modules/imgproc/src/samplers.cpp, line 550</p>
  </blockquote>
  
  <p>my code is basically like this</p>
  
  <pre><code>                cv::cvtColor(polymask, polymask, CV_BGR2BGRA);
                  getRectSubPix(polymask, cv::Size(sqrt(biggestdistancesquared)*2,sqrt(biggestdistancesquared)*2), src_center, polymask);
  </code></pre>
  
  <p>If this function truly didn't work for Mats with alpha channels that seems crazy. Anybody know?</p>