title: opencv linemod throwing runtime errors
body: <p>I am using opencv-2.4.6 and trying to run a simple program to use the <code>cv::linemod</code> functionality.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    #include &lt;opencv2/core/core.hpp&gt;
      #include &lt;opencv2/imgproc/imgproc_c.h&gt; 
      #include &lt;opencv2/imgproc/imgproc.hpp&gt;
      #include &lt;opencv2/objdetect/objdetect.hpp&gt;
      #include &lt;opencv2/highgui/highgui.hpp&gt;
  
  int main(int argc, char **argv) {
  
      cv::Ptr&lt;cv::linemod::Detector&gt; detector;
      detector = cv::linemod::getDefaultLINEMOD();
  
      Mat depth = imread("input/duck/duck_650_depth2.png", CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH);
      Mat color = imread("input/duck/duck_650_rgb2.png", CV_LOAD_IMAGE_ANYCOLOR);
  
      Mat object_mask = Mat(depth.rows, depth.cols, CV_32S);
  
      for (int x = 0; x &lt; depth.cols; x++) {
          for (int y = 0; y &lt; depth.rows; y++) {
              if (depth.at&lt;int16_t&gt;(y, x) &gt; 0) {
                  object_mask.at&lt;int&gt;(y, x) = 1;
              } else {
                  object_mask.at&lt;int&gt;(y, x) = 0;
              }
          }
      }
  
      vector&lt;Mat&gt; sources;
      sources.push_back(color);
      sources.push_back(depth);
      std::string class_id = cv::format("class%d", 1);
      Mat display = color.clone();
      Rect bb;
  
      int template_id = detector-&gt;addTemplate(sources, class_id, object_mask, &amp;bb);
      if (template_id != -1) {
          cout &lt;&lt; " added template " &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>Which compiles fine, however at runtime I get this error:</p>
  
  <pre><code>OpenCV Error: The function/feature is not implemented (Unsupported data type (=4)) in getMorphologyRowFilter, file /home/aly/libs/opencv-2.4.6.1/modules/imgproc/src/morph.cpp, line 894
  terminate called after throwing an instance of 'cv::Exception'
    what():  /home/aly/libs/opencv-2.4.6.1/modules/imgproc/src/morph.cpp:894: error: (-213) Unsupported data type (=4) in function getMorphologyRowFilter
  </code></pre>
  
  <p>I don't really understand what it means? I am using the latest opencv version</p>