template<int ROWS, int COLS, int SRC_T, int DST_T, typename P_T>
void hls::Scale( hls::Mat<ROWS, COLS, SRC_T>& src,
                 hls::Mat<ROWS, COLS, DST_T>& dst,
                 P_T scale=1.0,
                 P_T shift=0.0 );


  • src – the input image.
  • dst – the outputimage.
  • scale – value of scale factor.
  • shift – value added to the scaled elements.


Converts an input image src with optional linear transformation, save the result as image dst.
Image data must be stored in src, the image data of dst must be empty before invocations. Invoking this function will consume the data in src, and filling the image data of dst.
src and dst must have the same size and number of channels. scale and shift must have the same data types.

OpenCV reference

cvScale, cvConvertScale