title: Using open CV's remap function with a source image of a type CV_8SC1
body: <p>Using the open CV's remap function with different types of source images has given me some interesting results.</p>
  
  <p>The following types work as expected: CV_8UC1, CV_16UC1, CV_16SC1, CV_32FC1, CV_64FC1.</p>
  
  <p>The two types that are giving me an error are: CV_8SC1, CV_32SC1.</p>
  
  <p>The interesting part is that CV_16SC1 is working while CV_8SC1 is not.</p>
  
  <p>Does anyone have any insights as why this is happening?</p>
  
  <p>This is my code that I use:</p>
  
  <pre><code>cv::Mat remapX, remapY;
  remapX.create(output_cv_mat.rows, output_cv_mat.cols, CV_32FC1);
  remapY.create(output_cv_mat.rows, output_cv_mat.cols, CV_32FC1);
  
  for(int x = 0; x &lt; remapX.cols; x++) //Column iteration
  { 
      for(int y = 0; y &lt; remapX.rows; y++) //Row iteration
      {                                   
          remapX.at&lt;float&gt;(y, x) = (float)(x);
          remapY.at&lt;float&gt;(y, x) = (float)(remapX.rows - y);
      }
  }
  
  cv::remap(source_cv_mat, output_cv_mat, remapX, remapY, cv::INTER_LINEAR, cv::BORDER_CONSTANT, cv::Scalar(0, 0, 0));
  </code></pre>
  
  <p>The code uses source cv::Mat (the one who's types I am trying out) and output cv::Mat. I create the maps X and Y, use them in for loops and then finish with remap function.</p>
  
  <p>The error I receive with these two types is: </p>
  
  <p>terminate called after throwing an instance of 'cv::Exception'
    what():  OpenCV(4.0.1-dev) /home/aljaz/opencv_build/opencv/modules/imgproc/src/imgwarp.cpp:1805: error: (-215:Assertion failed) ifunc != 0 in function 'remap'</p>