template<int WIN_ROWS, int ROWS, int COLS, int SRC_T, int DST_T, int MAP1_T, int MAP2_T>
void hls::Remap( hls::Mat<ROW, COL, SRC_T>& src,
                 hls::Mat<ROW, COL, DST_T>& dst,
                 hls::Mat<ROW, COL, MAP1_T>& map1,
                 hls::Mat<ROW, COL, MAP2_T>& map2 );


  • src – the input image.
  • dst – the output image.
  • map1, map2 – the remapping.


Remaps the source image src to the destination image dst according to the given remapping. For each pixel in the output image, the coordinates of an input pixel are specified by map1 and map2.
This function is designed for streaming operation for cameras with small vertical disparity. It contains an internal linebuffer to enable the remapping that contains WIN_ROW rows of the input image. If the row r_i of an input pixel corresponding to an output pixel at row r_o is not in the range [r_o-(WIN_ROWS/2-1], r_o+(WIN_ROWS/2-1) then the output will be black.
In addition, because of the architecture of the line buffer, the function will use fewer resources if WIN_ROWS and COLS are powers of 2.

OpenCV reference

cvRemap, cv::remap